BE Computer Engineering (Pokhara University) Artificial Intelligence (PU, CMP 346) Question Paper 2078 Nepal
This is the official BE Computer Engineering (Pokhara University) Artificial Intelligence (PU, CMP 346) question paper for 2078, as set in the regular annual examination. It carries 100 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Artificial Intelligence (PU, CMP 346) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BE Computer Engineering (Pokhara University) Artificial Intelligence (PU, CMP 346) exam or solving previous years' question papers, this 2078 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt all / any as specified.
(a) Define a rational agent and explain the PEAS (Performance measure, Environment, Actuators, Sensors) framework used to specify a task environment. (6 marks)
(b) An autonomous vacuum-cleaning robot operates in a two-room environment. Give the PEAS description for this agent. (4 marks)
(c) Classify a task environment along the following dimensions and justify your classification for the vacuum-cleaning robot: fully vs. partially observable, deterministic vs. stochastic, episodic vs. sequential, and single vs. multi-agent. (4 marks)
(a) Rational Agent and the PEAS Framework (6 marks)
A rational agent is an agent that, for each possible percept sequence, selects an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has. Rationality is not omniscience; it depends on the performance measure, the agent's prior knowledge, the available actions, and the percept sequence to date.
To design a rational agent we must first specify the task environment completely. This is done using the PEAS description:
- P — Performance measure: the criterion that defines success (e.g., for a taxi: safe, fast, legal, comfortable trip, maximize profit).
- E — Environment: the world in which the agent operates (e.g., roads, traffic, pedestrians, weather).
- A — Actuators: the components through which the agent acts on the environment (e.g., steering, accelerator, brake, horn, display).
- S — Sensors: the components through which the agent perceives the environment (e.g., cameras, GPS, speedometer, sonar).
Fully specifying PEAS lets us judge whether the agent behaves rationally.
(b) PEAS for an Autonomous Vacuum-Cleaning Robot (4 marks)
| PEAS | Description |
|---|---|
| Performance measure | Amount of dirt cleaned, number of clean squares per time step, minimum energy/battery used, minimum movement, avoidance of obstacles and falls |
| Environment | The two rooms (square cells), dirt, walls, obstacles/furniture, charging dock |
| Actuators | Wheels/motors for movement (left, right, forward), suction/cleaning brush, possibly a vacuum pump |
| Sensors | Dirt sensor, bump/contact sensor, location/cliff sensor, wall/obstacle sensor, battery-level sensor |
(c) Classifying the Task Environment (4 marks)
- Partially observable: The robot's sensors detect only the current cell (dirt + location); it cannot perceive the dirt status of the other room at once. Hence the environment is partially observable.
- Stochastic (in practice): If actions always succeed deterministically (clean removes dirt, move always reaches the target), it is deterministic; but with wheel slip, sensor noise, or unpredictable re-appearing dirt, it is stochastic. A real robot is best modelled as stochastic.
- Sequential: The current decision (which cell to clean/where to move) affects future states and future cleaning, so it is sequential, not episodic.
- Single-agent: Only one robot acts; there is no other agent whose behaviour the robot must reason about, so it is single-agent.
(Additionally it is static during deliberation, discrete if cells/actions are finite, and known if the robot knows the effects of its actions.)
(a) Distinguish between uninformed and informed (heuristic) search strategies with suitable examples. (4 marks)
(b) State the A* search evaluation function f(n) = g(n) + h(n) and define each term. Explain what is meant by an admissible heuristic and a consistent (monotonic) heuristic. (6 marks)
(c) Prove that A* tree search is optimal when the heuristic h(n) is admissible. (6 marks)
(a) Uninformed vs Informed (Heuristic) Search (4 marks)
| Aspect | Uninformed (Blind) Search | Informed (Heuristic) Search |
|---|---|---|
| Information used | Only the problem definition (no domain knowledge about goal distance) | Uses a problem-specific heuristic estimating cost to the goal |
| Guidance | Explores systematically, no sense of direction | Guided towards the goal, expands fewer nodes |
| Efficiency | Generally slower, expands more nodes | Generally faster, more efficient |
| Examples | BFS, DFS, Uniform-Cost Search, Iterative Deepening | Greedy Best-First Search, A* Search |
(b) A* Evaluation Function and Heuristic Properties (6 marks)
A* evaluates each node by:
- = the actual cost of the path from the start node to .
- = the estimated cost of the cheapest path from to a goal (the heuristic).
- = the estimated cost of the cheapest solution through .
A* always expands the frontier node with the lowest .
Admissible heuristic: never overestimates the true cost of reaching the goal from , i.e.
An admissible heuristic is optimistic. (e.g., straight-line distance for road navigation.)
Consistent (monotonic) heuristic: For every node and every successor reached by action with step cost ,
This is a form of the triangle inequality. Consistency implies admissibility and guarantees that is non-decreasing along any path, so A* graph search is optimal without re-expanding nodes.
(c) Proof that A* Tree Search is Optimal with an Admissible Heuristic (6 marks)
Claim: If is admissible, A* tree search returns an optimal solution.
Proof (by contradiction):
Let be the cost of the optimal solution. Suppose A* terminates by selecting a sub-optimal goal node with cost
Since is a goal, , therefore
Now consider the optimal solution path. At the moment is chosen for expansion, there must exist some node on the frontier that lies on an optimal path to the optimal goal (because the optimal path starts at the root and the root's descendants are on the frontier until expanded). For this node :
Because is admissible, , so
(Here since is on an optimal path.)
A* always expands the frontier node with the lowest value. Since it selected instead of , we must have
Combining (1), (2) and (3):
which gives — a contradiction.
Therefore A* can never select a sub-optimal goal for expansion before an optimal one, i.e. A* tree search is optimal when is admissible.
(a) Explain the resolution inference rule and outline the steps to convert a propositional sentence into Conjunctive Normal Form (CNF). (6 marks)
(b) Using resolution refutation, prove that the following knowledge base entails Q:
- P ⇒ Q
- (L ∧ M) ⇒ P
- (B ∧ L) ⇒ M
- (A ∧ P) ⇒ L
- (A ∧ B) ⇒ L
- A
- B
(8 marks)
(a) Resolution Rule and Conversion to CNF (6 marks)
Resolution inference rule (propositional): Given two clauses, one containing a literal and the other its negation , resolution produces a new clause (the resolvent) consisting of all the remaining literals of both clauses:
Resolution is sound and refutation-complete: to prove , we add to the KB and derive the empty clause (a contradiction, ).
Steps to convert a sentence to CNF (a conjunction of disjunctions of literals):
- Eliminate biconditionals: replace with .
- Eliminate implications: replace with .
- Move negations inward using De Morgan's laws and double-negation, so applies only to literals: , , .
- Distribute over : apply until the sentence is a conjunction of clauses.
(b) Resolution Refutation Proof that the KB entails Q (8 marks)
Step 1 — Convert each sentence to clauses (CNF). Using :
| # | Sentence | Clause |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 |
Step 2 — Negate the goal and add it: clause 8 = .
Step 3 — Apply resolution to derive the empty clause:
- Resolve 5 with 6 9: .
- Resolve 9 with 7 10: .
- Resolve 3 with 7 11: .
- Resolve 11 with 10 12: .
- Resolve 2 with 10 13: .
- Resolve 13 with 12 14: .
- Resolve 1 with 14 15: .
- Resolve 15 with 8 (the empty clause).
The empty clause is derived, so the assumption leads to a contradiction. Therefore .
(Note: clause 4 is not needed; the proof goes through using clauses 5, 6, 7, 3, 2, 1.)
(a) Draw the architecture of a single artificial neuron (perceptron) and describe the role of weights, bias and activation function. (5 marks)
(b) Explain the working of the backpropagation algorithm used to train a multilayer feedforward neural network, clearly describing the forward pass, error computation and weight-update phases. (7 marks)
(a) Architecture of a Single Artificial Neuron / Perceptron (5 marks)
A single neuron takes several inputs, computes a weighted sum plus a bias, and passes the result through an activation function to produce one output.
Diagram (described): Inputs each enter the neuron along an edge carrying a weight . Inside the neuron a summing junction computes the net input, a constant bias is added, and the sum is fed to an activation function block whose single output line gives .
Roles:
- Weights (): scale the importance/strength of each input; a large positive weight makes that input excitatory, a negative weight inhibitory. They are the learnable parameters adjusted during training.
- Bias (): an extra learnable constant that shifts the activation threshold, allowing the neuron to fire even when all inputs are zero; it lets the decision boundary be offset from the origin.
- Activation function (): introduces non-linearity so the network can model complex functions; common choices are the step function (perceptron), sigmoid , tanh, and ReLU .
(b) The Backpropagation Algorithm (7 marks)
Backpropagation trains a multilayer feedforward network by gradient descent, propagating the output error backwards to update every weight. It has three phases per training example (or batch):
1. Forward pass. Present the input vector and compute, layer by layer, the activation of every neuron until the output layer produces :
2. Error computation. Compare the network output with the target using a loss function, e.g. mean-squared error:
Compute the error term (delta) for each output neuron:
then propagate deltas backwards to each hidden neuron :
3. Weight-update phase. Using gradient descent with learning rate , adjust every weight (and bias) in the direction that reduces the error:
These three phases are repeated over all training examples for many epochs until the error falls below a threshold or stops improving. The key idea is the chain rule, which lets the gradient be computed efficiently by reusing the deltas from the layer above.
Section B: Short Answer Questions
Attempt all / any as specified.
Compare Breadth-First Search and Depth-First Search in terms of completeness, optimality, time complexity and space complexity. State one situation where each is preferred.
Comparison of BFS and DFS (let = branching factor, = depth of shallowest goal, = maximum depth of the tree):
| Criterion | Breadth-First Search (BFS) | Depth-First Search (DFS) |
|---|---|---|
| Completeness | Complete (if finite) | Not complete (can loop/go infinite on infinite-depth paths) |
| Optimality | Optimal if all step costs are equal | Not optimal |
| Time complexity | ||
| Space complexity | — stores whole frontier (high) | — stores only current path (low) |
| Data structure | FIFO queue | LIFO stack / recursion |
When preferred:
- BFS is preferred when the solution is shallow and we need the shortest (fewest-step) path, and memory is not a constraint.
- DFS is preferred when memory is limited or solutions are deep in the tree, where exploring one branch fully uses far less space.
What is knowledge representation? Briefly explain semantic networks and frames as knowledge-representation schemes, mentioning one advantage and one limitation of each.
Knowledge Representation (KR) is the area of AI concerned with how to encode knowledge about the world in a form that a computer can use to solve complex tasks and perform reasoning/inference. A good KR scheme should be representationally adequate, inferentially efficient, easy to acquire, and clear.
Semantic Networks
A semantic network represents knowledge as a graph of nodes (concepts/objects) connected by labelled arcs (relationships), typically is-a (class membership/inheritance) and has-part links. Example: Dog —is-a→ Mammal —is-a→ Animal.
- Advantage: Intuitive, visual, and supports inheritance of properties down the is-a hierarchy, reducing redundancy.
- Limitation: Lacks standard semantics for quantifiers and negation; meaning of links can be ambiguous and reasoning is not always sound.
Frames A frame is a record-like data structure representing a stereotyped object or situation as a collection of slots (attributes) and fillers (values), where fillers may be defaults, constraints, or procedures (demons/procedural attachments). Frames are organized in hierarchies with inheritance.
- Advantage: Organizes related knowledge together, supports default values and inheritance, making it natural and efficient for structured/stereotypical knowledge.
- Limitation: Inflexible/rigid for knowledge that does not fit a fixed slot structure, and handling exceptions and reasoning can be cumbersome.
Draw and explain the basic architecture of an expert system. Differentiate between forward chaining and backward chaining used by its inference engine.
Architecture of an Expert System
An expert system mimics a human expert's decision-making in a narrow domain. Its main components (diagram described):
User
| (queries / answers)
[User Interface]
|
[Inference Engine] <----> [Knowledge Base (rules + facts)]
| ^
[Explanation Facility] [Knowledge Acquisition Module]
[Working Memory] ^
Domain Expert / Knowledge Engineer
- Knowledge Base: stores domain knowledge as facts and IF–THEN production rules.
- Inference Engine: the reasoning component that applies rules to the facts to derive conclusions.
- Working Memory: holds the current facts/intermediate results of a session.
- User Interface: lets the user enter queries and receive advice.
- Explanation Facility: explains how a conclusion was reached and why a question is asked.
- Knowledge Acquisition Module: lets experts/engineers add or update knowledge.
Forward Chaining vs Backward Chaining
| Aspect | Forward Chaining | Backward Chaining |
|---|---|---|
| Direction | Data-driven — starts from known facts and applies rules to derive new facts until the goal is reached | Goal-driven — starts from a hypothesis/goal and works backwards to find facts that support it |
| Reasoning | Bottom-up | Top-down |
| Best when | Many possible conclusions from few facts (monitoring, design, prediction) | A specific goal to prove (diagnosis, classification) |
| Example | A planning/configuration system | A medical diagnosis system (e.g., MYCIN) |
Forward chaining matches rule antecedents against facts and fires rules to add consequents; backward chaining takes the goal as a rule consequent and recursively tries to establish its antecedents as sub-goals.
Represent the following English statements in First-Order Predicate Logic:
(a) Every student who studies passes the exam. (b) Some birds cannot fly. (c) All cats are animals. (d) John loves everyone who loves Mary.
Representation in First-Order Predicate Logic:
(a) Every student who studies passes the exam.
(b) Some birds cannot fly.
(c) All cats are animals.
(d) John loves everyone who loves Mary.
Note on the patterns: universal statements ('every/all') use with an implication (); existential statements ('some') use with a conjunction ().
Explain the Hill-Climbing search algorithm. Discuss the problems of local maxima, plateaus and ridges, and state one technique to overcome each.
Hill-Climbing Search
Hill-climbing is a local search (greedy) algorithm. It keeps only the current state and repeatedly moves to the neighbouring state that has the best (highest) value of the objective/heuristic function, stopping when no neighbour is better (a peak).
current <- initial state
loop:
neighbour <- highest-valued successor of current
if VALUE(neighbour) <= VALUE(current):
return current // local optimum reached
current <- neighbour
It is fast and memory-cheap but can get stuck because it never looks beyond the immediate neighbours.
Problems and Remedies
| Problem | Description | Technique to overcome |
|---|---|---|
| Local maximum | A peak higher than its neighbours but lower than the global maximum; the algorithm stops there | Random-restart hill climbing (restart from random states and keep the best); or simulated annealing |
| Plateau | A flat region where neighbours have equal value, giving no direction to climb | Allow sideways moves for a limited number of steps to cross the flat area |
| Ridge | A sequence of local maxima arranged so that single moves all go downhill, though the ridge ascends diagonally | Use larger / compound moves or random-restart; move in several directions at once |
A general technique that escapes all three is simulated annealing, which occasionally accepts worse moves with a probability that decreases over time.
Differentiate between supervised, unsupervised and reinforcement learning with one example application of each.
| Type | How it learns | Data | Example application |
|---|---|---|---|
| Supervised learning | Learns a mapping from inputs to outputs using labelled training data (input–output pairs); generalizes to predict labels for new inputs | Labelled (features + target) | Email spam classification; house-price prediction |
| Unsupervised learning | Finds hidden structure/patterns in data without any labels (clustering, dimensionality reduction, association) | Unlabelled | Customer segmentation by clustering; market-basket analysis |
| Reinforcement learning | An agent learns by interacting with an environment, taking actions and receiving rewards/penalties, to maximize cumulative reward | Reward signal (trial and error) | Game playing (e.g., AlphaGo, chess); robot navigation |
Key differences: supervised learning needs labelled data and predicts known outputs; unsupervised learning needs no labels and discovers groupings; reinforcement learning has no fixed dataset—it learns an optimal policy from delayed reward feedback.
What is Natural Language Processing (NLP)? Briefly explain the phases of NLP (lexical, syntactic, semantic, discourse and pragmatic analysis).
Natural Language Processing (NLP) is a branch of AI that enables computers to understand, interpret, generate and manipulate human (natural) language — text or speech. It combines computational linguistics with machine learning. Applications include machine translation, chatbots, sentiment analysis, and information extraction.
Phases of NLP
- Lexical (morphological) analysis: Breaks text into basic units — tokens/words — and analyses word structure (stems, prefixes, suffixes). It identifies the parts of words. Example: splitting a sentence into words and identifying that 'running' = 'run' + 'ing'.
- Syntactic analysis (parsing): Checks that words are arranged according to grammar rules and builds a parse tree showing grammatical structure. Example: rejecting 'school the goes boy' as ungrammatical.
- Semantic analysis: Derives the meaning of the sentence from the meanings of words and their arrangement; resolves word-sense ambiguity. Example: understanding 'hot dog' as a food, not a warm animal.
- Discourse analysis: Interprets meaning across multiple sentences, handling references such as pronouns. Example: resolving 'it' or 'he' to the entity mentioned in a previous sentence.
- Pragmatic analysis: Interprets language using real-world knowledge and context/intent to derive the actual intended meaning. Example: understanding 'Can you pass the salt?' as a request, not a question about ability.
Write short notes on any TWO of the following:
(a) Simple reflex agent (b) Model-based reflex agent (c) Goal-based agent (d) Utility-based agent
(Answer any TWO — all four given for reference.)
(a) Simple Reflex Agent Selects actions based only on the current percept, ignoring percept history. It works on condition–action (IF–THEN) rules, e.g. if dirty then suck. Simple and fast, but works correctly only in fully observable environments and fails when the right action depends on unseen state.
(b) Model-Based Reflex Agent Maintains an internal state (a model of the world) that tracks the part of the environment it cannot currently see, updated using percept history and knowledge of how the world evolves and how its actions affect the world. It can therefore act sensibly in partially observable environments. It still uses condition–action rules but applies them to the maintained internal state.
(c) Goal-Based Agent Extends the model-based agent with explicit goal information describing desirable situations. It chooses actions by reasoning (using search and planning) about which sequence of actions will achieve its goal. More flexible than reflex agents because behaviour can be changed simply by specifying a new goal, but it requires deliberation.
(d) Utility-Based Agent Uses a utility function that maps each state (or sequence of states) to a real number measuring degree of happiness/desirability. When several action sequences reach the goal, or when goals conflict or are uncertain, it chooses the action that maximizes expected utility, giving rational decisions about trade-offs (e.g., a faster vs. safer route).
Frequently asked questions
- Where can I find the BE Computer Engineering (Pokhara University) Artificial Intelligence (PU, CMP 346) question paper 2078?
- The full BE Computer Engineering (Pokhara University) Artificial Intelligence (PU, CMP 346) 2078 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
- Does the Artificial Intelligence (PU, CMP 346) 2078 paper come with solutions?
- Yes. Every question on this Artificial Intelligence (PU, CMP 346) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
- How many marks is the BE Computer Engineering (Pokhara University) Artificial Intelligence (PU, CMP 346) 2078 paper?
- The BE Computer Engineering (Pokhara University) Artificial Intelligence (PU, CMP 346) 2078 paper carries 100 full marks and is meant to be completed in 180 minutes, across 12 questions.
- Is practising this Artificial Intelligence (PU, CMP 346) past paper free?
- Yes — reading and attempting this Artificial Intelligence (PU, CMP 346) past paper on Kekkei is completely free.