EECS 3401 — AI and Logic Prog. — Lecture 7
Adapted from slides of Prof. Yves Lesperance Vitaliy Batusov vbatusov@cse.yorku.ca
York University
October 5, 2020
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 1 / 32
EECS 3401 AI and Logic Prog. Lecture 7 Adapted from slides of - - PowerPoint PPT Presentation
EECS 3401 AI and Logic Prog. Lecture 7 Adapted from slides of Prof. Yves Lesperance Vitaliy Batusov vbatusov@cse.yorku.ca York University October 5, 2020 Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5,
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 1 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 2 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 3 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 4 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 5 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 6 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 7 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 8 / 32
1 Apply σ to each right-hand side of θ and then add all of the
2 Delete from S all identities of the form V = V 3 Delete all equations Yi = si where Yi is equal to one of the Xj in θ
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 9 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 10 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 11 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 12 / 32
1
2
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 13 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 14 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 15 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 16 / 32
1 k = 0; σ0 = {}, S0 = {φ, ψ} 2 If Sk contains an identical pair of formulas, then stop and return σk
3 Else, find the disagreement set Dk = {e1, e2} of Sk 4 If e1 is a variable V and e2 is a term t not containing V (or
5 Else: stop. Formulas φ and ψ cannot be unified. Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 17 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 18 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 19 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 20 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 21 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 22 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 23 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 24 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 25 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 26 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 27 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 28 / 32
1 father(art, jon) 2 father(bob, kim) 3 (¬father(Y , Z), parent(Y , Z)) 4 (¬parent(X, jon), answer(X))
5 R[4, 3b]{Y =X, Z =jon}(¬father(X, jon), answer(X)) 6 R[5, 1]{X =art}(answer(art))
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 29 / 32
1 (father(art, jon), father(bob, jon)) 2 father(bob, kim) 3 (¬father(Y , Z), parent(Y , Z)) 4 (¬parent(X, jon), answer(X))
5 R[4, 3b]{Y =X, Z =jon}(¬father(X, jon), answer(X)) 6 R[5, 1a]{X =art}(father(bob, jon), answer(art)) 7 R[6, 3b]{Y =bob, Z =jon}(parent(bob, jon), answer(art)) 8 R[7, 4]{X =bob}(answer(bob), answer(art))
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 30 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 31 / 32
Vitaliy Batusov vbatusov@cse.yorku.ca (YorkU) EECS 3401 Lecture 7 October 5, 2020 32 / 32