SECTION A
1a. There are two jugs called four and three; four holds a maximum of four
gallons and three a maximum of three gallons. How can we get 2 gallons in
the jug four?
Solution:
1. Fill the 3-gallon jug.
2. Pour the water into the 4-gallon jug.
3. Fill the 3-gallon jug again.
4. Carefully pour water into the 4-gallon jug until it is full (only 1 gallon will
be poured from the 3-gallon jug).
5. Now, 2 gallons remain in the 3-gallon jug.
Answer: Jug three now contains exactly 2 gallons.
---
1b(i). Determine the Big-O of an algorithm to calculate the sum of the n
elements in an Integer array arr[0,…,n–1].
Answer:
The algorithm iterates through all n elements once to calculate the sum.
Big-O = O(n)
---
1b(ii). List two external and two internal factors that determine the
performance of an algorithm.
External Factors:
1. Hardware capabilities (CPU speed, memory).
2. Compiler efficiency.
Internal Factors:
1. Algorithm design.
2. Data structure used.
---
2a. Using the AND/OR graph, where is Fred?
From the graph and the substitutions:
fred/X, sam/Y, museum/Z, we perform goal-driven search.
From: Goal: location(X, Z)
→ master(X,Y) AND location(Y,Z)
→ master(fred, sam) AND location(sam, museum)
Answer: Fred is at the museum.
---
2b(i). What advances do you think need to be made in order for the Turing
test to be passed?
Improved natural language understanding.
Better handling of emotions and context.
Real-time reasoning and adaptation.
Broader knowledge base and real-world grounding.
---
2b(ii). In a tabular form, describe Turing test agent types with Percepts,
Actions, Goal and Environment.
---
3a. What is problem space and formally describe a search problem.
Problem Space: The complete set of possible states and actions in a problem.
Search Problem (Formal Definition): A search problem is defined by:
Initial state
Set of actions
Transition model (result of actions)
Goal test
Path cost
SECTION B
4a. Describe the Turing test. If the Turing test is passed, does this show that
computers exhibit intelligence? State your reasons.
The Turing Test, proposed by Alan Turing, evaluates a machine’s ability to
exhibit intelligent behavior indistinguishable from that of a human. A
computer passes the test if a human evaluator cannot reliably tell whether
responses come from a human or a machine.
Does passing the Turing Test mean computers are intelligent?
Not necessarily. Passing the test shows that a machine can simulate
intelligent behavior, but it doesn’t confirm true understanding,
consciousness, or self-awareness. It may just mimic intelligence without
actual comprehension (e.g., via scripted responses).
4b. State two problems in the Turing test.
1. Subjectivity – Different judges may have varying opinions on what
qualifies as intelligent behavior.
2. Deception vs. Understanding – A machine can pass by tricking the
judge rather than understanding questions or reasoning intelligently.
5a. List four common characteristics of early expert systems.
1. Rule-based reasoning using IF-THEN rules.
2. Narrow domain of expertise.
3. Lack of learning capability (static knowledge base).
4. Dependence on human experts for knowledge input.
5b(i). Explain forward chaining and backward chaining.
Forward Chaining: Starts with known facts and applies inference rules to
derive new facts until a goal is reached. It’s data-driven.
Backward Chaining: Starts with the goal and works backward to determine if
known facts support it. It is goal-driven.
5b(ii). What is the difference between a shell and a tool?
Shell: A software environment or framework for building expert systems. It
contains an inference engine and user interface but no domain knowledge.
Tool: A more general-purpose software used to develop a variety of AI
applications, not limited to expert systems.
6a. Define in your own words:
(i) Intelligence – The capacity to learn, understand, and apply
knowledge to solve problems or adapt to new situations.
(ii) Artificial Intelligence – A field of computer science focused on
building machines capable of simulating human intelligence.
(iii) Logical Reasoning – The process of using structured, rule-based
logic to arrive at conclusions or make decisions.
6b(i). Are reflex actions (such as flinching from a hot stove) rational? Are
they intelligent?
Reflex actions are not rational or intelligent; they are automatic responses
from the nervous system without conscious thought. They serve protection
but lack reasoning or understanding.
6b(ii). What is the role of a knowledge engineer?
A knowledge engineer extracts expertise from domain experts and encodes
it into a knowledge base using appropriate rules and representations. They
also help maintain, validate, and update the system’s knowledge.
7a(i). Define an expert system and describe how expert systems perform
inference.
An expert system is a computer program that simulates the decision-making
ability of a human expert in a specific domain.
Inference in expert systems involves using an inference engine to apply
logical rules to the knowledge base to deduce new information or reach
conclusions (using forward or backward chaining).
7a(ii). State four benefits of expert systems.
1. Provide consistent answers for repetitive decisions.
2. Preserve expert knowledge for training and reuse.
3. Available 24/7 and faster than human experts.
4. Reduce errors in complex decision-making environments.
7b. With a schematic diagram, discuss the main players of expert system
development team.
Main Players:
1. Domain Expert – Provides domain-specific knowledge.
2. Knowledge Engineer – Encodes expert knowledge.
3. End User – Uses the expert system to solve real problems.
4. Software Engineer – Designs and implements the software.
5. Project Manager – Oversees the development process.
Schematic Diagram:
| Domain Expert |
| Knowledge Engineer |
| Inference Engine |
| + Knowledge Base |
/ \
V v
+----------------+ +-----------------+
| Software Dev | | End Users |
+----------------+ +-----------------+