Ai Spectrum U-3
Ai Spectrum U-3
UNIT rt
e
thhLogo
ontheTi
lleCove
foor tBefore
Yo
Logicand Knowl
f u
edgeRepresentati
3
on SIAGROUP
SIA GROUP
Syllabus
First-Order Logic: Representati
on, Syntaxand Semanticsof
Engineering in First-Order Logic. First-Order Logic, Using Fir
st-Order Logic,Knowledge
Inference in First-Order
Logic: Propositionalvs. First-
BackwardChaining, Resolution. Order Inference, Unification an
d Lifting, ForwardChaini
ng,
Knowledge Representation:Ontolo
gical Engineering, Categories and
Objects, Reasoning Systemsfor Cat Objects, Events.Mental Events and
egories,Reasoning with Default Inf Mental
ormation.
LEARNING OB
JeCTIVES
✓ First
OrderLogicAlo ng with its Syntax andSemant
ics
Various Standard Quantifie
rs in First Order Logic
✓
Procedure of Knowledge Eng
ineering in First Order Logic
✓
Comparison ofPropositiona
l and First-Order Logic
✓
Lifted Version ofModus Ponens
i.e., Generalized Modus Pon
ens
Forward andBackwardChaini
ng inFirst Order Logic, Various Resoluti
on Strategies
Definition andBasicConceptsof
Ontology, ConceptofCategories
Event, Generalized and Fluent Calc
ulus
Relationshipsbetween Agents and Ment
al Objects, Semantic System asa
✓ Reasoning System
ClosedWorld Assumption and Unique
NamesAssumption, UsageofTrut
h Maintenance System
INTRODUCTION
First-orderlogicîsmadeofobjectsandrelations.Itiscapableof
expressing facts aboutfeworall
objects
that enable to present general rules.It iswidely used in
mathematics, philosophy andcomputerscience.
TheModelsforfirst-order logic consistsof objects which are somet
imes referred to as domain elements.
The domain of amodelis defined as the setofobjects presen
t inthemodel.Knowledge engineering is
aprocessofknowledge baseconstruction
in whichadomain is investigated and
of objects and relations of adomain a formalrepresentation
is created.
SPECTRUM ALL-IN-ONEJOURNALFORENGINEERINGSTUDENTS
84
ARTIFICIALINTELLIGENCE [JNTU-HYDERABAD
formed formula can be determined usingthetruth table (that specifies truth value for thesubexpression ofwff)because
eve
relation
literal in formula the
thebetween
ship followin
evaluates either trueorfalseundercertain interpretationfirst-orderinterpretationbasically specifiesthe
tog,
Answer:
Example
Syntactic Sugar
Syntactic sugarreferstoaconstruct defined inaprogramming languagesothattheexpressions canbe statedclearlyand
alsocanbereadeasily.Ingeneral, syntactic sugarrefers to aconcept usingwhichthesyntax canbecharacterized in suchaway
that theexpressions canbemade easier for the programmers.
solutions
end
return solutions
ModelPaper-1, Q1(f)
Acombinationoffour sequ ential steps occurs indynamicpro
grammingareasfollows,
1. Thestructure ofthe solutionis tobe
characterized.
2. Representing the optimal solutionwhe
rever needed in the subproblems
(defining recursively).
3. Theoptimal solutionhastobecons
tructed fromtheinformation.
4. Thefinal solution hasto beconstruc
ted from theinformation.
Semanticnetworks are theforms oflogic that notonly provides graphical support forvisualizing aknowledgebase but
alsofacilitates withefficient algorithms.This
helps theuser to understandthe characteristics ofan
membership.Theyare alsoconsidered to bethepart ofthesystemswhichare designed objectin terms ofcategory
particularly fororganizi
ngandreasoning
alongwithcategories. Inadditiontothis, itprovides aconvenientnotations forobjects,
relationandqualification, providedifthe
humaninterfacefactors aretakeninto consideration. But, ifthehumaninterfacefactors arenotconsideredthenthenotationfor
allobjects,relational andquantification etc.,wouldbeidentical.
ENTS
SPECTRUM ALL-IN-ONE JOURNALFORENGINEERING STUD
86
ARTIFICIAL INTELLIGENCE [JNTU-HYDERABĄD)
SO LUTIONS
PART-B ESSAYQUESTIONSWITH
3.1 FIRST-ORDERLOGIC
3.1.1 Representation
First-order Logic
representing commonknowledge.Thelanguag
Firstorder logicisawayof
eoffirst-order logiecomprisesofobjects and
It iswidely
relations. Firstorderlogic is capableofexpressing factsaboutfeworallobjects thatenabletopresentgeneral rules.
used in mathematics, philosophy andcomputer science.
Propositional logic assumesthat in theworld, there are facts thateitherholdordo not hold but every fact can eitherbe
true orfalse.
Programming Languages
Theprogramming languages likeC++,Java, LISPare referred toas formal languageswhichare mostlyused forwriting
programs. Thoughdata structures within theseprogramminglanguages are capable ofrepresentingfacts, they lack in deriving
factsfromotherfacts. Thisisbecauseanyupdation donetoadata structure isperformedbyinvokingdomainspecific procedures.
Thesearetheprocedureswhose implementation details are derivedbytheprogrammersbasedonhis/herownknowledgeregarding
thedomain.
These sort ofprogramming languages differ from propositional languages.This is because in propositional language,
knowledge and inference areconsidered asaseparateunitsandinferenceisnotdependent on domain(i.e.,it is domain-independent).
Compositionality
iscompositionalbecauseiftheexpressionwasnon-compositional
Consideranother expression"red hair".Thisexpression
interpretedasthe "color ofthe blood"
thenthe meaningofeveryconstituent maybeunderstood differentlyi.e., 'red'maybe
theactual meaning
hair.This signifiesameaningwhichdiffersfrom
thereby interpretingtheentire sentence ascoloroftheblood
(i.e., Hairdyedwithred).
ind guilty isLIABLE to face LEGAI
NIT-3 LogicandKnowledgeRepresentation
87
3.1.2 Syntaxand Semantics ofFirst-
Order
(iii) UnaryFunctions
Logic
Thereare certain relationships that aretobe
considered
Q10. Explain various models forfirst order logic as functions.Inthese functions,
givenobjectis related
. a
2. PredicateSymbols
Alice,John[becauseJohnistheenemyofAlic
e],which
is defined as "Enemy" relation It represents the association between objects that
andis represented as are
{<Alice, John>,<John,Alice>}. eitherconstants or variables andhave true or false as
theirtruth values.
Diamond, Racheal [because diamond is in thehand
of
Racheal], whichis defined as “inhand"relation Apredicate consists of,
and is
represented as {<Diamond, Rac
heal>}. (a) Predicate namewhichspecifiestypeofassociation
This “inhand"relation.consists of amongobjects.
only onetuple.
The "friend","Enemy"and "inhand"rela (b) Arguments that indicate the objects to be
tionsarecalled associated.
binary relationsbecausetheyrel
atedifferentobjectpairs.
(i) Considertwopredicates,
UnaryRelationsh
ips
Loves(Amjad,Football) (Amjadloves football)
Unaryrelationships orproperties
are defined on,
Reads(Atul, b) (Atul reads anything).
Alice,Rachealas "person"property[since itis true In the above example, loves and reads are predicate
forAlice, Racheal].
namesandAmjad, Atul,footballandbaretheassociated
Aliceas "Queen”property[since itistrueonlyfor objects.Eachoftheabovepredicatehas atruthvalue.For
Alice] instance, loves (Amjad, Football) canhavetruth value
false,ifAmjadhatesfootball.Also,theotherpredicatehas
Diamondas "Diamond"property[since it is true a valuetrue,ifAtulreadsanykindofbook.However, this
onlyforDiamond]. is possible onlywhenthequantifier suitablyqualifiesb.
ag JA
SPECTRUMALL-IN-ONEJOURNALFORENGINEERINGSTUDENTS
88
3. FunctionSymbols
ARTIFICIALINTELLIGENCE [JNTU-HYDERABAQL UN
Drives oper
indi
Q
spec
Exa
Car
1.
getlicense 2.
Driver 3.
4.
S.
License