QUESTION ONE (20 MARKS) 1.1 Consider the state space graph shown below. P is the start state and V is the goal state. The costs for each edge are shown on the graph. Each edge can be traversed in both directions. 1.1.1 Use Breadth-First Search to generate the shortest path from P to V. (10) 1.1.2 Apply the Depth First Search method to find a path from P to V. (10)
QUESTION ONE (20 MARKS)
1.1 Consider the state space graph shown below. P is the start state and V is the goal state. The costs for each edge are shown on the graph. Each edge can be traversed in both directions.
1.1.1 Use Breadth-First Search to generate the shortest path from P to V. (10)
1.1.2 Apply the Depth First Search method to find a path from P to V. (10)
QUESTION TWO (20 MARKS)
2.1 Compute the truth table for the following expressions and their subexpressions.
2.1.1 (p → q) ≡ (NOT p OR q) (5)
2.1.2 p → (q → (r OR NOT p)) (5)
2.1.3 (p OR q) → (p AND q) (5)
2.1.4 (p AND q) → (p OR r) (5)
QUESTION THREE (10 MARKS)
3.1 The binary exclusive-or function, ⊕, is defined to have value TRUE if and only if exactly one of its arguments are TRUE.
3.3.1 Draw the truth table for ⊕. (5)
3.3.2 Is ⊕ commutative? Is it associative? (5)
P
Q
R
S
T
V
U
QUESTION FOUR (20 MARKS)
4.1 Translate the following sentences into a Prolog program (10)
Everyone who teaches
Craig teaches the programming module.
Craig’s brother teaches the mathematics module.
The programing module is interesting.
Craig’s sister teaches all modules.
4.2 Fill this table with the right Prolog statement for each question in the
system (10)
English question
Prolog statement
Prolog response
Is Artificial Intelligence module hard?
No
Does Peter go to school every Tuesday?
Yes
Who is the CEO of Richrand?
Nolwazi
Is Suzan the mother of Peter?
Yes
What car does Peter drive?
Mercedes
QUESTION FIVE (20 MARKS)
5.1 Read the article “Artificial Intelligence and its Role in Near Future” by Shabbir, J and Anwer, T (2015) and based on the article:
5.1.1 Write in your own words about the role of Artificial Intelligence in shaping the future. (10)
5.1.2 Give your perspective on the destructive effects of Artificial Intelligence. (10)
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images