0% found this document useful (0 votes)
109 views24 pages

Ai 3

Here are the steps to solve this problem in predicate logic: 1. Identify the predicates: - Likes(x,y) - x likes y - Eats(x,y) - x eats y 2. Translate the sentences into logical expressions: - Likes(John, food) - For all x, if x is food then Likes(John, x) - For all x, if x eats y then x eats z - Eats(John, peanuts) - Eats(Sue, pizza) 3. Combine the expressions with connectives as needed: - Likes(John, food) ∧ ∀x(Food

Uploaded by

Caption Star
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views24 pages

Ai 3

Here are the steps to solve this problem in predicate logic: 1. Identify the predicates: - Likes(x,y) - x likes y - Eats(x,y) - x eats y 2. Translate the sentences into logical expressions: - Likes(John, food) - For all x, if x is food then Likes(John, x) - For all x, if x eats y then x eats z - Eats(John, peanuts) - Eats(Sue, pizza) 3. Combine the expressions with connectives as needed: - Likes(John, food) ∧ ∀x(Food

Uploaded by

Caption Star
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

notation, uhoit Ln

dseowse
vajcble tet
o
abinc, a to 4y. bics Quey:AL
bocan
()
impication we
Quanijer
,us urivwaL In
man(a)’iunk
c0ffee). (, ! t
notauon, phosC Ln
coDA. UnivenALat
Man.
eowse
as cçs iveueo eted
in esHeJ be
coee dsint man EKample:A FoH
ing. istan
ce.
Due tang
u inthus atatimnt
Quantiu sþeeiies
inu aharUnivexsal
Eriatential Quantilieu
y
ateast one instenta oy nometh fng. I u denotd
$ymbal '
a vaiable,

fox ermþle : Soma boyá aub


Let
inteigunt

In whor notatiom,

inteign.
Difeuence hetween PopOsitlonal aagie and Pxedia
No Poposihonal ogie Pxedica Logue
Pediat oqis an
L09e at deas wtha
AOieeti on deloMati domain.It. conaibV4
tedment 'wi ha
Ph voue, ue or fale. |othjeti , nelaions and tuneiog
I th baic and met
|ulaey o Boolean ogic
knouuh |edieoyand quanijiotn.

A
J" A Poposihom hu
Vaue eih ue oT buedicne
depend1 sth value
om h
vlue. vasçabey
Sope anayin i1 no dome in PHedicot og' heps
propaihonam kogi. Bubject ove u prediasu.
Theie ae uo quanus
I Univeya Quant'tir (t)
a. Exiuia Quaner ()
Prspaihiona aue combined wth
intuo duuing quani'e to
su esibhing peoposiion.
moHe gan aised It more speead
epesentai on. Hepaesent aw on.
IH RON ot dec wth set o
erüties. eies wth th hep
quay'.
3-Wite the stops fan Cove) ing FoPL into CNF
The tcchhigue yan ncpn esehig a Complex schdehce into
Simple séntence sSo thot esalu lion Con be applied
Eliminalioh o
&epl- Eliminatioh then opeonotan
alep 2- Aion of the Scope o hçgation
Siep & Rename in the vanable wthinhe Scope
uantiiens,
Sitpt Movi quartiens in the nt o the cape
Cais lomial quonien as" skaleh
cxi slerdial quanti fie
Aeps The ne! expnession in tonjunctive roanma
ep- tig Ohe dause pen Sine.
d a om o Meoom
l·ForwoHd Chaintng: Fosuwad ehainingiomie
LUhieh ptosd1 Wt seLES n

knouedgo baae nd appies inrene ules in 1h oruwand dinetion


çu Heahed
HeHe, focta aee held n a uanng menoy and eondion

AND becini on L
(AND becini¡ng

SOR) Decai on

Hai Forwand haining


"1 ued on oppiaien aie pionnin8 momitoing, managunnt and
U4|3R629
Packusand
Backusasd Chaininqimethod ohaining,
d diung a patiatau goal
tuom a gin nouwedge bae and ser 4 ingoiene Hie.

backwaud 0 demine what


goal and uuoks ROn b u h n e

Eraunpl : 8= He ir(Goa)
A He u
eneusing

IAND Deeiion
Faer 2 H Deii¡n :3
AND

R Deciniom-2

Fart y
sek2
>bompeianlmancu)
tn:
Roman ¬ pempeian
Reman(n)
(nv
man
Roman
to (n)
(n)’
Vdoyalto
loyal
(,
to
Caesa) (M,lalie)

Vhak
ln, 1lbgal
tsln, ) V
halelr,
GiAca)
casan)
Ryo ¬
man
(mancus)

A¬Ruln

Kacmvl( y) Man
(manas)
rMax CoeAcn)

An
byaAa13inale

Cauan)
(Mortu
Normal Form (CNE):
Conjunctire said 20 be Lonjuetiww Nosmal form uy
A yOmula i

$tess inolwed in convodin eL(Propositonal Logie)


Sentenes into CNE (oniýe NOrMal form):
The uules to LOvet PL ihto CNF ue?
suule
using

imþa coatíon y the uue i

9. Move negau¡n inuondei


(vy)
v

4. Aþþy dçtu buiue ou ommuatie sas :


U) xALyvz) (2^y)vCAADinvi butiu laur
i) nvcyaz) (2vy)n (AZ)
) Comm utatie (Qu.
eiv)
11
D44321 WK O7 1

22 2

13 WEDNESDAY
FEBRUARY 2019

(ny
Tackouls a dog (uthuw P
a Pisd ) - donats " OutAS y
dor
ninal Lovee (a)) -
b. tn (Dog Cwncn( aninat tovu.
æS an
EveLy dog Owne
(Pusniy)A
Uo aninat oven Kus an
Aninal y))-
ani neal.

d Kus(,Tno)v (Cwroriky sTno -


Etheu Tat av Turio sitey kud th Cot.
who JS nanu tuno.

Nous s puowu by ucalution lhh


Cwniosity Kiuod thu Cat (eius (Cuiouy

2 Combins t gated goal ww the


Pnowdye bat Cabicyd)
d in Conyanron
nanial from NF)
If you can't explain it simply. you don't understand it well enough
wK O7045-320

12
MAR
2O19 THURSDAY
2019 FEBRUARY 14
eesalution to d u an en phy
clasd

10

.Kuon a: p(jd)- Jak ouuns a dog


(kills (9iyJn
Ainal Cy)))
4hy ond: kb G, Teno ) Vpius ( Curiosilg Tuno,

2
5 Asumm i kius ( Ceviesiy Tina) (ngad gatl)
6- hom | and a (uninsal Jnstantiaton).
3
Dog uunen (7J’ Arinalloveu (j)

A Arinal Cy))
5

6
9- hom andy CRasaluhonJ i y(kus CCavian

lb- Fu aM 2and 9(Resaltion J. Contey adicho


(emphy claue)

Life is 10% what happens to me and 90% of how I react to it. Charles Swindoll
AtR
hthe
ite
dneh
h

ike
ects
s

(n)
colcion: John ikes au kinds f 4ood.
He.
jood
jood
mhing anyone. eah and àn't kfued by ood
5. Buu eab peanuh
G. Sue ea
and
y tit, aiue
Sotion:
) sentnes is predicatu ferm- Logi.
1. Foud(x) ikes (John,)
d. Pood (Abpleg)
3 food (ohickun)

5. eatyBiL, Pean ty) n ai u (B)


6. ta eaty (Bil,1) eot (Sue, ).
we add. tuo neus predcaty :
a) t a'ue () ’
b) t -TRed(a) ’ aiu (a)
u) onve fom 0r NF.

1. ta Food () kes(John ,a)


Pood() Vikey (John,)
7food () v sikes (John,)
&. edgae Pood CAþies)
3. tood (we)
1(cati(7, 4) ^ T kied()) v fo od u
1ea1 (iy) vkiled () Vfood ly)

eats (yz) V kiled ) food (z) (standasdsed the


eai lBill, pedI
6 eat (Bu, Peanutt) A al mBiu aliu lBi)
eaty (Biu, x) ’ ea(Sue, x)
1eali (Biu,) v eay CSue, x)
ttw eat (Bu,o) V ean (s Le , o)
7eatil Giu, w)v eats (Sue,w)

a) t a'ue (x) Tkiud (a)


t aue(x) V Tiled (a)

T ai e (p) V KiUed )
b +LKiued (x) ’ a u2)
1(iued (a)) v awu (z)
Ued (9) vai e(a}

ii) teo ue that "Jshn w'rw pean uti Hesaut on


Jukus 3otn, peanut)
Sup1: negan the prouu NTaument
Tuu (John, peanu)
Tfooda) vaiusohn,z)
Ipeanu/t
Tfoodleans) Teati (y2)v kiued y) V
tooz)
Teaty l V
Kiled.(4) eay (B2peatt

Ksued. ca)

Taluletu) aiustot)

INIL]

peanu" i
nd
th folowing sentence into predicate logie
"AlvcuR in Dead" uaing
resolutiati
(1) Ma)
(2)Marcus # eso I'peian.
(3) Marus ws bnn n 10
(4) Al men AD,
(5) AI weortal.
Pompeian'a
erupted in 1979.
dead when the voleano
(6) No mortal lives
(7) It is now J991, more than 150 years.
(8) Alive meuns not
dead. (2016-16)
Man (Marcus)
Pompean (Marçus)
Born (Marcus, 4)
VX: Men (X)’ Mortal (X)
Eruptei
2, 79)) (vocano, 79) A VX: (Pompeian (X) ’ Died
: V:: V2: Mortal ()A
’ dend (X, 2) Born (X, ti)a gtty - ti, l50)
Now J991
VX: VI: (alive (X, ) ’ dead (X,
alive (X, )) )]A ded(Y, t)
LENEE

Nowthat fact's are represented.


ted for reasoning,
Now we have to prove that Natrs
be represented in
in
Marcus, now) or predieatenew}iogie
alive (Marcus, t
alive (Marcus, now)
I(9,substitution)
Dead (Marcus, now)
I(10, substitution)
Pompeian (Marcus) ^ gt (now,t)
|(5, substitution)
Pompeian (Marcus) ^ gt (now, 79)
I(2)
gt (now, 79)
1(8, substitute Equals)
gt (1991, 79)
True
12:16 9

ChatGPT 3.5

Backward chainingis akin tothe


depth-first search (DFS) algorithm. In
backward chaining, you start from the
goal and work backward to find the
path that leads to the given query or
goal. Similarly, DFS explores as far as
possible along each branch before
backtracking. Here's a basic
representation of the DFS algorithm:

Plaintext O Copy code

DFS (G , V):
mark V as Visited
for all edges from v to w in
G.adjacentEdges (v) do
if w is not visited then
DFS (G, w)

In backward chaining, the process


works backward from the goal or
conclusion by recursively exploring
rules until it finds the necessary
premises or facts to satisfy the query.
This is similar to howDFS traverses
through a graph or tree, exploring until
it reaches a conclusion.

Message
Explain concept and nse of clause form
conersion algorithm. (2022-23)
Discuss algorithm of conversion to clause
form. Convert the following to clause formn
using algorithm (2017-18)
tr( Brick(x) ’ (3y{On(r,y)n-Pyramid(y))
n-3ylOn(r,y) oOn(y.r)}
nBrick(y) -’ -Bqual(r, y)}))
Algorithm of Conversion to Clause Form
(1) Eliminate ’, using the fact that a ’ b is equivalent
to ~a v.
Vx-[Roman (x) a knows(x, Marcus))
v[Hate(x, Caesar) v(y3 hate, )
vthinkerazy(x, y)]
(2) Reduce the scope of ~
Using the fact that~(~p) =p;
deMorgan's Laws
aab) = ~a Vb and ~ay b) =~an~b
The correspondence between quantifiers
~txP)= BrrP)
~3x P(r)=P()
Applying these to the wff from step 1yields :
4xf~Roman(:) v~knows(*, Marcus)]
v [hate(r, Caesar) v(ytz ~hate(y, 2)z)
thinkorazy(x, )))
(3) Standardise variables so that each quantifier binds a
unique variable.
x Pa) vrQ0) is converted to xP(r) v t Q)
Done in preparation for step 4.
(4) Move all quantiflers to the left of the formula
without changing the relative order. Done on the wff
gives :
[C.6]
Vayz<-tonantx) knows (x, Marcusil
V|hate(x, Caesarj) vehatey, 3) vthinkernzy:
Thus becalled prenex nornal forn. Itens)sts
prefix of quantifiers followed by a mntrix whir
quantifier fyee
NumericalSolutlon
VNIbrick(X) »(AY [on(.X,Y)A-pyramid(Y )
3Y (on(X,Y)Aon(Y,Xj,
VY(brick(Y ) equal(X,Yj
(1) Eliminate using A B Ay B.
VX-brick (X) v(3Y [on(X,Y )A-pyramid Y)|
¬9Y (on(X,Y)A on(Y Xjj:
VY-brick(Y ) v equal(X,Y))
(2) Put into negation normal fornm : negation only occurs
immediately before propositions
VXbrick (X) v (3Y [on(X,Y )A¬pyramid (Y ))A
VY(-on(x,Y)v ¬on(Y, X)/
Y [brick(Y)v ¬equal(.X,Y)D)
(3) Replace using Skolem functors (abstract names for
objects, functor has to be new)
VX[-brickX)v (on(X,sup(X) A-pyramidsuplX)A
VY[¬on(X,Y ) v¬on(Y,X)]A
VY[brick(Y)v¬equal(X,Y)D)
(4) Standardize all variables apart such that each
quantifier hasits own unique variable
VX[-brickX)v ((on(X,sup(X) A-pyramidsupX)))A
VY[-on(X,Y)v ¬on(Y,X)] ^
vz[brick(Z)v -equal(X,Z)D)
(5) Move V to the front
XVYVZ -¬brick(X) v(lon(.X ,sup(X ))
A¬pyramid(sup(X DJA
[on(X,Y)v ¬on(Y,X)]A
|brick(2)v ¬equal(X,Z)D)
conjunctive normal form using
(onvet to
(6)
Av(BAC)=(Av B)a(A vC)
V.VY(-brick(X)v(on(X,sup(.X ) A
"Pyramid(sup(X)J]A
L INTELL [G.7]

(¬brick(.X)v[¬on(X,Y)v -on(Y,X )) r
(brick(X) v[brick(2)v ¬equal(X,Z)Dl
vITNZ(¬brick(X)von(X ,sup(X) A
(¬brick(X) v -pyramid(sup(X ))A
(-brick(X) v[¬on(X,Y) v¬-on(Y ,X )) A
(Sbrick(X)v [brick(Z)v¬equal(X,Z))))
FIYZI-brick(X)v on(X,sup(X ))] ^
Abrick(X) v ¬pyramid(sup(X,]A
[-brick(X)v ¬on(X,Y)v ¬on(Y ,X)]A
(-brick(X)vbrick(Z)v¬equal(X,Z)]]
conjuncts in clauses (a disjunction of
(7) Split the
literals)
¬brick(X)von(X,sup (X))
-brick(X)v¬pyramid(sup(X)
VAAbrick(X) v¬on(X,Y )v ¬on(Y ,X)
VAIbrick(X )v brick(Z)v -equal(X ,Z)
clausal syntax (negative literals to body,
(8) Convert to
positive ones to head)
on(X,sup(X )):-brick(X).
:-brick (X), pyramid (sup(X )).
:-brick (X), on(X,Y), on(Y,X).
brick (X) :-brick(Z), equal(X,Z).
13-GaNent
S
Shoc)33hiBe S-
4- 9-Chile-
Thlack
hlack'shi 1-
hitecsal 1Shoc)
cohite V
hiteviWeokA
TYellooAlned
black 7
black he
V allocing
ht Coal V]
v V ohite
clank dank
ello 3e
A
Ihto
Studeut
(sohan)
nd)specs
tnMaried

hyem,Gecta)
(sh
yem
Mini)
Quantihs
FOL aryerene Rule fo
The bauia ingene
b Univesa qenealizdon
. UniveaL Ins tantiaWon
8. Exipentia, Instaniatiom
4. Exioentiat Intoduin
The wnivusel genOaialio
Universa Genualization. vaud inenea
we (an haue
dig LOwe
txp(x). It kan be HeþHUented
P)
P()
hy ule is uyed uts want do aho tha ewcy
hau a winila popeity
Here oe) muut not pþan as ee vauable . foy Grambe
Let Ptc "A buw contain, a d hig "
fon alf:tP(x) =" AG bytes rontains a &bits ".
UniveHsal Inutantiation t i auo talled Univeual tum
1t can be
do add nes
pence We tas
appicd muttipie Am
substituting a quound tom & keonutant uth bennce P) by
a domais ) on

au
14 can be nepuesetedd
P(c)
ie-uean".
fox erample, "Evey. peuon iky
nlwhat John iku ue seam', pte)
who aue gendy Que BuL
" Au
inge

king [3ohn] nGreedy loohn) Euil( Jotr).


kings (FaheNLAmir)a Çieecty. (rasherCAmi)) ’ Euis ( Fasyen (Amit))
Exiatentcl Inatatiation t 2+ da auo eaLred Exintuntian
aiinatiom. I con be þwed
omy Omee 0 HepAoce Thu exintertial senkne.
Thiu ule aafes nt ome ca PC) om wHomalg
Rymb oue,
æu Hule m t be au nur tum o whas PC)

P)
Pon Ekampe Let ceoun() A onhead (,John).

HounLK)n omheasl (H, Jehn).

Rese, k does not appe00 iy uRnoutedgu baue.


Existental ntOcucion 4 auo knoum aJ eriaentBat
qenesaizati on whih ù a valid
ighene sule in FoL.
niueye 4 duoue which has puopecty tnun u oun ingn
ee eipt omthing in he wivese whih hau þroþy P.
PCC)

You might also like