Final Exam 361 Model Answer Solution Q1.a Depth limit: 0 2 Depth limit 1 4 2 2 1 4 1 2 1 3 4 1 2 3 1 1 3 1 4 2 3 4 3 1 3 3 4 1 3 2 2 2 1 3 Depth limit 2 4 4 4 2 1 4 2 4 3 2 4 2 3 2 1 1 3 4 4 2 3 1 4 3 1 2 4 3 1 1 2 3 4 1 3 Depth limit 3 4 4 1 4 1 2 2 3 2 1 4 3 4 1 3 2 3 2 2 2 3 4 1 3 1 4 3 2 1 1 4 2 3 4 3 1 2 3 4 Solution Q1.b • How to start: start with the initial solution (2, 4, 1, 3) • How to improve: improve using Local transformation (swap operator). Select the next state as the best solution in the neighborhood using Manhattan distance. • When to stop: Halt when the next solution is not better than current one. Solution Q2 Cutoff = 610, Use DFS Bremen 120 + 720 Hannover Dusseldorf 320 + 540 Cutoff = 665, Use DFS Bremen 120 + 720 Frankfurt 365 + 380 0 + 610 Hamburg Leipzig 155 + 720 255 + 410 Shweren 270 + 680 Hannover 0 + 610 Dusseldorf 320 + 540 Frankfurt 365 + 380 Berlin 255 + 185 + 590 Hamburg Leipzig 155 + 720 255 + 410 Dresden 255 + 140 + 400 Munchen Solution Q3. BT + FC 5 4 6 2 3 7 8 1 10 9 13 11 12 Solution Q3. BT + MCV 5 4 6 2 3 7 8 1 10 9 13 11 12 1, 8, 11, 3, 5, 10, 6, 2, 4, 7, 9, 12, 13 Solution Question 4.a • Prove 1: “there is no pit in (2,2)” This sentence can easily be deduced using inference rules • Equivalence rules (bi-conditional) • Modus Tollens • And-Elimination and the following sentences: – (B1,2 ⇔ (P1,1 P2,2 P1,3)) – ¬ B1,2 Solution Question 4.a Prove 2: “there is a wumpus in (1,3)” This sentence can easily be deduced using inference rules: • • • • Equivalence rules (bi-conditional) Modus Tollens, Modus Ponens And-Elimination Resolution and the following sentences: – (S1,2 ⇔ (W1,1 W2,2 W1,3)) – (S2,1 ⇔ (W1,1 W2,2 W3,1)) – ¬ W1,1, ¬ S2,1, S1,2 Solution Question 5.a • Working Memory: A, B, D, G, I, K, L Cycle 1: R7 B Cycle 2: R1, R7 D Cycle 3: R1, R4, R7 G Cycle 4: R1, R4, R6, R7 I Cycle 5: R1, R4, R6, R7, R8, R9 K Cycle 6: R1, R4, R6, R7, R8, R9 L Cycle 7: R1, R4, R6, R7, R8, R9 STOP no applicable rule Solution Question 5.b • Working Memory: A To prove K, we have to prove first G and I (rule 8) To prove G, prove B and D (rule 4) B can be proved using (rule 7) To prove D, prove first A and B (rule 1): as A is present in WM and B already proved, therefore D is true so G is true To prove I, prove G and not(H) first (rule 6): G already proved and as H is not present in WM then not(H) is true, so I is true. G and I are true, therefore K is true
© Copyright 2026 Paperzz