SlideShare a Scribd company logo
1 of 45
AI in logic perspective






AI is the study of mental faculties through the
use of computational models.
It is on the premise that what brain does may
be thought of as a kind of computation.
Though what brain does easily takes enormous
efforts to be done by a machine. Eg: vision.

12/23/13

1
Internal representation










In order to act intelligently, a computer must
have the knowledge about the domain of
interest.
Knowledge is the body of facts and principles
gathered or the act, fact, or state of knowing.
This knowledge needs to be presented in a
form, which is understood by the machine.
This
unique
format
is
called
internal
representation.
Thus plain English sentences could be translated
into an internal representation and they could
be used to answer based on the given
sentences.

12/23/13

2
Properties of internal representation








Internal representation must remove all referential
ambiguity.
Referential ambiguity is the ambiguity about what
the sentence refers to.
Eg: ‘ Raj said that Ram was not well. He must be
lying.’
Who does ‘he ‘ refers to…?.

12/23/13

3
Properties of internal representation..









Internal representation should avoid word-sense
ambiguity.
Word-sense ambiguity arise because of multiple
meaning of words.
Eg:
‘Raj caught a pen.
Raj caught a train.
Raj caught fever.’

12/23/13

4
Properties of internal representation..







Internal representation must explicitly mention
functional structure
Functional structure is the word order used in the
language to express an idea.
Eg: ‘Ram killed Ravan. Ravan was killed by Ram.’
Thus internal representation may not use the
order of the original sentence.

12/23/13

5
Properties of internal representation..


Internal representation should be able handle
complex sentence without losing meaning
attached with it.

12/23/13

6
Predicate Calculus








Predicate Calculus is an internal representation
methodology which help us in deducing more
results from the given propositions (statements).
Predicate calculus accesses individual
components of a proposition and represent the
proposition.
For example, the sentence ‘ Raj came late on
Sunday’ can be represented in predicate calculus
as
(came-late Raj Sunday)
Here ‘came-late’ is a predicate that describes the
relation between a person and a day.

12/23/13

7
‘ Raj came late on a rainy Sunday’ can be
represented as

(came-late Raj Sunday)
(inst Sunday rainy)
Predicate permits us to break a statement down
into component parts namely, objects, a
characteristic of the object, or some assertion
about the object.


12/23/13

8
Syntax of Predicate calculus
1. Predicate and Arguments
In predicate calculus, a proposition is divided
into two parts:

        Arguments (or objects)
               Predicate (or assertion)
The arguments are the individual or objects an
assertion is made about. The predicate is the
assertion made about them.


12/23/13

9












In an English language sentence, objects are
nouns that serve as subject and object of the
sentence and predicate would be the verb or part
of the verb.
For example the proposition:
‘Vinod likes apple’
would be stated as:
(likes Vinod apple)
Where ‘likes’ is the predicate and Vinod and
apple are the arguments.
In some cases, the proposition may not have
any predicates. For example:
Anita is a woman.
12/23/13 i.e. (inst Anita woman).
10
2. Constants
 Constants are fixed value terms that belong to
a given domain.
 They are denoted by numbers and words. Eg:
123,abc.

12/23/13

11









3.Variables
In predicate calculus, letters may be substituted for
the arguments.
The symbols x or y could be used to designate some
object or individual.
The example “Vinod likes apple “ could be expressed
in variable form if x = Vinod and y = apple. Then the
proposition becomes:
(likes x,y)
If variables are used, then the stated proposition
must be true for any names substituted for the
variables.

12/23/13

12






Instantiation
Instantiation is the process of assigning the
name of a specific individual or object to a
variable.
That object or individual becomes an
“
instance“ of that variable.
In the previous example, supplying Vinod and
apple for x and y is a case of instantiation.

12/23/13

13
4. Connectives







There are four connectives used in predicate
calculus.
The are ‘not’, ‘and’, ‘or’ and ‘if’.
If p and q are formulas then
(and p, q),
(or p, q), (not p) and
(if p, q) are also
formulas.
They can be expressed in truth tables.

12/23/13

14
(not p)




12/23/13

p
T
F

(not p)
F
T

15
(and p, q)

p

T

T

F

F

12/23/13

q
T
F
T
F

(and p, q)
T
F
T
F

16







(or p, q)
p
T
T
F
F

12/23/13

q
T
F
T
F

(or p, q)
T
T
T
F

17
(if p, q)






12/23/13

p
T
T
F
F

q
T
F
T
F

(if p, q)
T
F
T
T

18







5. Quantifiers
A quantifier is a symbol that permits us to state
the range or scope of the variables in a
predicate logic expression.
Two quantifiers are used in logic:
The universal quantifier –’for all’.
i.e (forall (x) f) for a formula f.
The existential quantifier – ‘exists’.
i.e. (exists (x) f) for a formula f.

12/23/13

19





6. Function applications
It consists of a function which takes zero or
more arguments.
Eg: friend-of(x).

12/23/13

20






“All Maharastrians are Indian citizens” could be
expressed as:
(forall (x) (if Maharastrian(x) Indiancitizen(x)).
“ Every car has a wheel” could be expressed as:
(forall (x) (if (Car x) (exists (y) wheel-of (x y))).

12/23/13

21
The predicate calculus consists of:









A set of constant terms.
A set of variables.
A set of predicates, each with a specified
number of arguments.
A set of functions, each with a specified
number of arguments.
The connectives- ‘if’, ‘and’, ‘or’ and ‘not’.
The quantifiers- ‘exists’ and ‘forall’.

12/23/13

22


The terms used in predicate calculus are:
 Constant terms.
 Variables.
 Functions applied to the correct number of
terms.

12/23/13

23


The formulas used in predicate calculus are:
 A predicate applied to the correct number of
terms.
 If p and q are formulas then (if p, q), (and
p, q), or(p, q) and (not p).
 If x is a variable, and p is a formula, then
(exists(x) p), and (forall(x) p).

12/23/13

24






In predicate calculus, the initial facts from
which we can derive more facts are called
axioms.
The facts we deduce from the axioms are called
theorems.
The set of axioms are not stable and in fact
change over time as new information (axioms)
come.

12/23/13

25
Inference Rules









From a given set of axioms, we can deduce more
facts using inference rules. The important
inference rules are:
Modus ponens: From p and (if p q ) infer q.
Chain rule: From (if p q ) and (if q r )
infer (if p r ).
Substitution: if p is a valid axiom, then a
statement derived using consistent substitution of
propositions is also valid.
Simplification: From (and p q) infer p.

12/23/13

26









Conjunction: From p and q infer (and p q).
Transposition: From (if p q ) infer (if (not q )
(not p))
Universal instantiation: if something is true
of everything, then it is true for any particular
thing.
Abduction: From q and (if p q ) infer p.
(Abduction can lead to wrong conclusions. Still,
it is very important as it gives lot explanation.
For example: medical diagnosis.)
Induction: From (P a), (P, b),…. infer (forall
(x) (P x)).( Induction leads to learning.)

12/23/13

27
Express the following in predicate calculus:



Roses are red.
(if (inst x rose) (color x red)).
Violets are blue.
(if (inst x violet) (color x blue)).
Every chicken hatched from an egg.



(forall (x) (if (chicken x) (exists (y) hatched-from(x y))).



Some language is spoken by everyone in this class.



(forall (x) (if (belong-to-class x) (exists (y) speaklanguage(x y))).



If you push anything hard enough, it will fall over.



(forall (x) (if (push-hard x) (fall-over x)).



Everybody loves somebody sometime.



(forall (x) ((exists (y) loves-sometime(x y))).



Anyone with two or more spouses is a bigamist.








(forall (x) ((inst x have-more-spouse) (inst x bigamist(x)))

12/23/13

28








Arun likes all kinds of food.
Apples are food.
Chicken is a food.
Anything anyone eats and is not killed
by is food.
Varun eats peanuts and is still alive.
Kavita eats everything Varun eats.

12/23/13

29








The members of The Club are Anil,
Sangita, Ajit and Vanita.
Anil is married to Sangita.
Ajit is Vanita’s brother.
The spouse of every married person
in the club is also in the club.
The last meeting of the club was at
Anil’s house.

12/23/13

30
Alternative notations

12/23/13

31




Knowledge, which is represented in the internal
representation technique predicate calculus,
could be represented in a number of alternative
notations.
The important representations are:




Semantic networks
Slot assertion notation.
Frame notation

12/23/13

32
Semantic network ( Associative networks)




One of the oldest and easiest to understand
knowledge representation schemes is the
semantic network.
They are basically graphical depictions of
knowledge that show hierarchical relationships
between objects.

12/23/13

33



For example ‘Sachin is a cricketer’
ie. ( inst Sachin cricketer), can be represented
in associative network as
Cricketer

inst
Sachin
12/23/13

34












A semantic network is made up of a number of
ovals or circles called nodes.
Nodes represent objects and descriptive
information about those objects.
Objects can be any physical item, concept,
event or an action.
The nodes are interconnected by links called
arcs.
These arcs show the relationships between the
various objects and descriptive factors.
The arrows on the lines point from an object to
its value along the corresponding arc.

12/23/13

35






From the viewpoint of predicate calculus,
associative networks replace terms with nodes
and relation with labeled directed arcs.
The semantic network is a very flexible
method of knowledge representation.
There are no hard rules about knowledge in
this form.

12/23/13

36




Semantic networks can show inheritances in the sense
that it can explain how elements of specific classes
inherit attributes and values from more general classes
in which they are included.
The isa relation is a subset relation. The cricketers is a
subset of the set of sportsman.
Cricketer

inst

isa

Sportsman

Sachin
12/23/13

37









Eg: (isa cricketer sportsman).
The instance relation corresponds to the
relation element-of.
Sachin is an element of the set of cricketers.
Thus he is an element of all the supersets of
Indian international cricketers.
The ‘isa’ relation corresponds to the relation
‘subset of’.
Cricketers is a subset of sportsmen and hence
cricketers
inherit
al the
properties of
sportsmen.

12/23/13

38
Example..
Is a

Boy

has a

Ravi

Child

Goes to

School

Is a
Anitha

owns

Maruti

White

is a

Anil

is a

S.E

a

Human

Is a
works for

plays

Is a

Color

Woman Is
Man

married to
Car

12/23/13

Is a

Belongs to
TATA

Cricket

made in
is a
India

Sport

TCS

39




The predicate calculus lacks a backward pointer
resulting a long search for retrieving information.
Thus the predicate calculus along with an
indexing (pointing) scheme is a much better
internal representation scheme than semantic
networks as it has connectives and quantifiers.

12/23/13

40
Slot assertion notation.












In a slot assertion notation various arguments ,
called slots, of predicate are expressed as
separate assertions.
Slot assertion notation is a special type of
predicate calculus representation.
For example (catch-object sachin ball) can be
expressed as
(inst catch1 catch-object)…. // catch1 is a one
type of catching.
(catcher catch1 sachin)….// sachin did the
catching.
(caught catch1 ball)…..// he caught the ball.

12/23/13

41
Frame ( Slot and Filler)notation.








Frame notation combines the different slots of
the slot assertion notation.
Thus we have,
(catch-object catch1
(catcher sachin)
(caught ball)).
Here we have constructed a single structure
called a frame that includes all the
information.

12/23/13

42
Convert the following to first-order predicate logic
using the predicates indicated:









swimming_pool(X)
steamy(X)
large(X)
unpleasant(X)
noisy(X)
place(X)
All large swimming pools are noisy and steamy
places.
All noisy and steamy places are unpleasant.
All noisy and steamy places except swimming
pools are unpleasant.
The swimming pool is small and quiet.

12/23/13

43













All large swimming pools are noisy and steamy places.
(forall (x) (if (and large(X) swimming_pool(X))
(and noisy(X) (and (steamy(X) place(X)))).
All noisy and steamy places are unpleasant.
(forall (x)(and noisy(X) (and (steamy(X) place(X))
unpleasant(X))).
All noisy and steamy places except swimming pools are
unpleasant.
(forall (x)((not swimming_pool(x)) and noisy(X) (and
(steamy(X) place(X)) unpleasant(X)))).
The swimming pool is small and quiet.
(and swimming_pool(x) and (not large(X)) (not noisy(X)))
12/23/13

44
Represent in predicate calculus and then in
semantic network
Circus elements are elephants.
Elephants have heads and trunks.
Heads have mouths.
Elephants are animals.
Animals have hearts.
Circus elephants are performers.
Performers have costumes.
Costumes are clothes.

12/23/13

45

More Related Content

What's hot

Propositional logic
Propositional logicPropositional logic
Propositional logic
Rushdi Shams
 

What's hot (20)

Informed search
Informed searchInformed search
Informed search
 
Chap4
Chap4Chap4
Chap4
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Optimization Techniques.pdf
Optimization Techniques.pdfOptimization Techniques.pdf
Optimization Techniques.pdf
 
Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized Algorithms
 
Ch3: Operating System Structure
Ch3: Operating System StructureCh3: Operating System Structure
Ch3: Operating System Structure
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
Introduction To Autumata Theory
 Introduction To Autumata Theory Introduction To Autumata Theory
Introduction To Autumata Theory
 
Information retrieval dynamic indexing
Information retrieval dynamic indexingInformation retrieval dynamic indexing
Information retrieval dynamic indexing
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4Artificial Intelligence Notes Unit 4
Artificial Intelligence Notes Unit 4
 
Ch02 fuzzyrelation
Ch02 fuzzyrelationCh02 fuzzyrelation
Ch02 fuzzyrelation
 
DAA 18CS42 VTU CSE
DAA 18CS42 VTU CSEDAA 18CS42 VTU CSE
DAA 18CS42 VTU CSE
 
Artificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real WorldArtificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real World
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
fuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzificationfuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzification
 

Viewers also liked

Artificial intelligence priti sajja spuniversity
Artificial intelligence priti sajja spuniversityArtificial intelligence priti sajja spuniversity
Artificial intelligence priti sajja spuniversity
Priti Srinivas Sajja
 
Adhoc frames conceptual graphs
Adhoc frames conceptual graphsAdhoc frames conceptual graphs
Adhoc frames conceptual graphs
Ayaz Shariff
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based system
Tianlu Wang
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
Sourabh Sharma
 

Viewers also liked (20)

Artificial intelligence priti sajja spuniversity
Artificial intelligence priti sajja spuniversityArtificial intelligence priti sajja spuniversity
Artificial intelligence priti sajja spuniversity
 
Artificial intelligence quiz ai and fuzzy logic priti sajja
Artificial intelligence quiz ai and fuzzy logic priti sajjaArtificial intelligence quiz ai and fuzzy logic priti sajja
Artificial intelligence quiz ai and fuzzy logic priti sajja
 
15 predicate
15 predicate15 predicate
15 predicate
 
Requirements engineering
Requirements engineeringRequirements engineering
Requirements engineering
 
Adhoc frames conceptual graphs
Adhoc frames conceptual graphsAdhoc frames conceptual graphs
Adhoc frames conceptual graphs
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculus
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
 
Intelligent machines
Intelligent machinesIntelligent machines
Intelligent machines
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based system
 
Artificial Intelligence
Artificial Intelligence Artificial Intelligence
Artificial Intelligence
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Frames
FramesFrames
Frames
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}Introduction to Expert Systems {Artificial Intelligence}
Introduction to Expert Systems {Artificial Intelligence}
 
Consumer Behavior chapter 03 Learning and Memory theories Moghimi
Consumer Behavior chapter 03 Learning and Memory theories MoghimiConsumer Behavior chapter 03 Learning and Memory theories Moghimi
Consumer Behavior chapter 03 Learning and Memory theories Moghimi
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
ARTIFICIAL INTELLIGENCE Presentation
ARTIFICIAL INTELLIGENCE PresentationARTIFICIAL INTELLIGENCE Presentation
ARTIFICIAL INTELLIGENCE Presentation
 
All about Pasta
All about PastaAll about Pasta
All about Pasta
 
What is artificial intelligence
What is artificial intelligenceWhat is artificial intelligence
What is artificial intelligence
 

Similar to Ai 02

Similar to Ai 02 (20)

Binary relations
Binary relationsBinary relations
Binary relations
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Dscrete structure
Dscrete  structureDscrete  structure
Dscrete structure
 
Artificial Intelligence 06.3 Bayesian Networks - Belief Propagation - Junctio...
Artificial Intelligence 06.3 Bayesian Networks - Belief Propagation - Junctio...Artificial Intelligence 06.3 Bayesian Networks - Belief Propagation - Junctio...
Artificial Intelligence 06.3 Bayesian Networks - Belief Propagation - Junctio...
 
Rough sets and fuzzy rough sets in Decision Making
Rough sets and  fuzzy rough sets in Decision MakingRough sets and  fuzzy rough sets in Decision Making
Rough sets and fuzzy rough sets in Decision Making
 
Prpositional2
Prpositional2Prpositional2
Prpositional2
 
Discrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsDiscrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete Mathematics
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Computational logic First Order Logic_part2
Computational logic First Order Logic_part2Computational logic First Order Logic_part2
Computational logic First Order Logic_part2
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]
 
01bkb04p.ppt
01bkb04p.ppt01bkb04p.ppt
01bkb04p.ppt
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Arguments.pptx
Arguments.pptxArguments.pptx
Arguments.pptx
 
DISMATH_Part1
DISMATH_Part1DISMATH_Part1
DISMATH_Part1
 
Chapter1p2.pptx
Chapter1p2.pptxChapter1p2.pptx
Chapter1p2.pptx
 
Chapter1p2.pptx
Chapter1p2.pptxChapter1p2.pptx
Chapter1p2.pptx
 
Dependent Types and Dynamics of Natural Language
Dependent Types and Dynamics of Natural LanguageDependent Types and Dynamics of Natural Language
Dependent Types and Dynamics of Natural Language
 
Logic 2
Logic 2Logic 2
Logic 2
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 

Ai 02

  • 1. AI in logic perspective    AI is the study of mental faculties through the use of computational models. It is on the premise that what brain does may be thought of as a kind of computation. Though what brain does easily takes enormous efforts to be done by a machine. Eg: vision. 12/23/13 1
  • 2. Internal representation      In order to act intelligently, a computer must have the knowledge about the domain of interest. Knowledge is the body of facts and principles gathered or the act, fact, or state of knowing. This knowledge needs to be presented in a form, which is understood by the machine. This unique format is called internal representation. Thus plain English sentences could be translated into an internal representation and they could be used to answer based on the given sentences. 12/23/13 2
  • 3. Properties of internal representation     Internal representation must remove all referential ambiguity. Referential ambiguity is the ambiguity about what the sentence refers to. Eg: ‘ Raj said that Ram was not well. He must be lying.’ Who does ‘he ‘ refers to…?. 12/23/13 3
  • 4. Properties of internal representation..       Internal representation should avoid word-sense ambiguity. Word-sense ambiguity arise because of multiple meaning of words. Eg: ‘Raj caught a pen. Raj caught a train. Raj caught fever.’ 12/23/13 4
  • 5. Properties of internal representation..     Internal representation must explicitly mention functional structure Functional structure is the word order used in the language to express an idea. Eg: ‘Ram killed Ravan. Ravan was killed by Ram.’ Thus internal representation may not use the order of the original sentence. 12/23/13 5
  • 6. Properties of internal representation..  Internal representation should be able handle complex sentence without losing meaning attached with it. 12/23/13 6
  • 7. Predicate Calculus     Predicate Calculus is an internal representation methodology which help us in deducing more results from the given propositions (statements). Predicate calculus accesses individual components of a proposition and represent the proposition. For example, the sentence ‘ Raj came late on Sunday’ can be represented in predicate calculus as (came-late Raj Sunday) Here ‘came-late’ is a predicate that describes the relation between a person and a day. 12/23/13 7
  • 8. ‘ Raj came late on a rainy Sunday’ can be represented as  (came-late Raj Sunday) (inst Sunday rainy) Predicate permits us to break a statement down into component parts namely, objects, a characteristic of the object, or some assertion about the object.  12/23/13 8
  • 9. Syntax of Predicate calculus 1. Predicate and Arguments In predicate calculus, a proposition is divided into two parts:          Arguments (or objects)                Predicate (or assertion) The arguments are the individual or objects an assertion is made about. The predicate is the assertion made about them.  12/23/13 9
  • 10.        In an English language sentence, objects are nouns that serve as subject and object of the sentence and predicate would be the verb or part of the verb. For example the proposition: ‘Vinod likes apple’ would be stated as: (likes Vinod apple) Where ‘likes’ is the predicate and Vinod and apple are the arguments. In some cases, the proposition may not have any predicates. For example: Anita is a woman. 12/23/13 i.e. (inst Anita woman). 10
  • 11. 2. Constants  Constants are fixed value terms that belong to a given domain.  They are denoted by numbers and words. Eg: 123,abc. 12/23/13 11
  • 12.      3.Variables In predicate calculus, letters may be substituted for the arguments. The symbols x or y could be used to designate some object or individual. The example “Vinod likes apple “ could be expressed in variable form if x = Vinod and y = apple. Then the proposition becomes: (likes x,y) If variables are used, then the stated proposition must be true for any names substituted for the variables. 12/23/13 12
  • 13.    Instantiation Instantiation is the process of assigning the name of a specific individual or object to a variable. That object or individual becomes an “ instance“ of that variable. In the previous example, supplying Vinod and apple for x and y is a case of instantiation. 12/23/13 13
  • 14. 4. Connectives     There are four connectives used in predicate calculus. The are ‘not’, ‘and’, ‘or’ and ‘if’. If p and q are formulas then (and p, q), (or p, q), (not p) and (if p, q) are also formulas. They can be expressed in truth tables. 12/23/13 14
  • 19.     5. Quantifiers A quantifier is a symbol that permits us to state the range or scope of the variables in a predicate logic expression. Two quantifiers are used in logic: The universal quantifier –’for all’. i.e (forall (x) f) for a formula f. The existential quantifier – ‘exists’. i.e. (exists (x) f) for a formula f. 12/23/13 19
  • 20.    6. Function applications It consists of a function which takes zero or more arguments. Eg: friend-of(x). 12/23/13 20
  • 21.     “All Maharastrians are Indian citizens” could be expressed as: (forall (x) (if Maharastrian(x) Indiancitizen(x)). “ Every car has a wheel” could be expressed as: (forall (x) (if (Car x) (exists (y) wheel-of (x y))). 12/23/13 21
  • 22. The predicate calculus consists of:       A set of constant terms. A set of variables. A set of predicates, each with a specified number of arguments. A set of functions, each with a specified number of arguments. The connectives- ‘if’, ‘and’, ‘or’ and ‘not’. The quantifiers- ‘exists’ and ‘forall’. 12/23/13 22
  • 23.  The terms used in predicate calculus are:  Constant terms.  Variables.  Functions applied to the correct number of terms. 12/23/13 23
  • 24.  The formulas used in predicate calculus are:  A predicate applied to the correct number of terms.  If p and q are formulas then (if p, q), (and p, q), or(p, q) and (not p).  If x is a variable, and p is a formula, then (exists(x) p), and (forall(x) p). 12/23/13 24
  • 25.    In predicate calculus, the initial facts from which we can derive more facts are called axioms. The facts we deduce from the axioms are called theorems. The set of axioms are not stable and in fact change over time as new information (axioms) come. 12/23/13 25
  • 26. Inference Rules      From a given set of axioms, we can deduce more facts using inference rules. The important inference rules are: Modus ponens: From p and (if p q ) infer q. Chain rule: From (if p q ) and (if q r ) infer (if p r ). Substitution: if p is a valid axiom, then a statement derived using consistent substitution of propositions is also valid. Simplification: From (and p q) infer p. 12/23/13 26
  • 27.      Conjunction: From p and q infer (and p q). Transposition: From (if p q ) infer (if (not q ) (not p)) Universal instantiation: if something is true of everything, then it is true for any particular thing. Abduction: From q and (if p q ) infer p. (Abduction can lead to wrong conclusions. Still, it is very important as it gives lot explanation. For example: medical diagnosis.) Induction: From (P a), (P, b),…. infer (forall (x) (P x)).( Induction leads to learning.) 12/23/13 27
  • 28. Express the following in predicate calculus:  Roses are red. (if (inst x rose) (color x red)). Violets are blue. (if (inst x violet) (color x blue)). Every chicken hatched from an egg.  (forall (x) (if (chicken x) (exists (y) hatched-from(x y))).  Some language is spoken by everyone in this class.  (forall (x) (if (belong-to-class x) (exists (y) speaklanguage(x y))).  If you push anything hard enough, it will fall over.  (forall (x) (if (push-hard x) (fall-over x)).  Everybody loves somebody sometime.  (forall (x) ((exists (y) loves-sometime(x y))).  Anyone with two or more spouses is a bigamist.      (forall (x) ((inst x have-more-spouse) (inst x bigamist(x))) 12/23/13 28
  • 29.       Arun likes all kinds of food. Apples are food. Chicken is a food. Anything anyone eats and is not killed by is food. Varun eats peanuts and is still alive. Kavita eats everything Varun eats. 12/23/13 29
  • 30.      The members of The Club are Anil, Sangita, Ajit and Vanita. Anil is married to Sangita. Ajit is Vanita’s brother. The spouse of every married person in the club is also in the club. The last meeting of the club was at Anil’s house. 12/23/13 30
  • 32.   Knowledge, which is represented in the internal representation technique predicate calculus, could be represented in a number of alternative notations. The important representations are:    Semantic networks Slot assertion notation. Frame notation 12/23/13 32
  • 33. Semantic network ( Associative networks)   One of the oldest and easiest to understand knowledge representation schemes is the semantic network. They are basically graphical depictions of knowledge that show hierarchical relationships between objects. 12/23/13 33
  • 34.   For example ‘Sachin is a cricketer’ ie. ( inst Sachin cricketer), can be represented in associative network as Cricketer inst Sachin 12/23/13 34
  • 35.       A semantic network is made up of a number of ovals or circles called nodes. Nodes represent objects and descriptive information about those objects. Objects can be any physical item, concept, event or an action. The nodes are interconnected by links called arcs. These arcs show the relationships between the various objects and descriptive factors. The arrows on the lines point from an object to its value along the corresponding arc. 12/23/13 35
  • 36.    From the viewpoint of predicate calculus, associative networks replace terms with nodes and relation with labeled directed arcs. The semantic network is a very flexible method of knowledge representation. There are no hard rules about knowledge in this form. 12/23/13 36
  • 37.   Semantic networks can show inheritances in the sense that it can explain how elements of specific classes inherit attributes and values from more general classes in which they are included. The isa relation is a subset relation. The cricketers is a subset of the set of sportsman. Cricketer inst isa Sportsman Sachin 12/23/13 37
  • 38.      Eg: (isa cricketer sportsman). The instance relation corresponds to the relation element-of. Sachin is an element of the set of cricketers. Thus he is an element of all the supersets of Indian international cricketers. The ‘isa’ relation corresponds to the relation ‘subset of’. Cricketers is a subset of sportsmen and hence cricketers inherit al the properties of sportsmen. 12/23/13 38
  • 39. Example.. Is a Boy has a Ravi Child Goes to School Is a Anitha owns Maruti White is a Anil is a S.E a Human Is a works for plays Is a Color Woman Is Man married to Car 12/23/13 Is a Belongs to TATA Cricket made in is a India Sport TCS 39
  • 40.   The predicate calculus lacks a backward pointer resulting a long search for retrieving information. Thus the predicate calculus along with an indexing (pointing) scheme is a much better internal representation scheme than semantic networks as it has connectives and quantifiers. 12/23/13 40
  • 41. Slot assertion notation.       In a slot assertion notation various arguments , called slots, of predicate are expressed as separate assertions. Slot assertion notation is a special type of predicate calculus representation. For example (catch-object sachin ball) can be expressed as (inst catch1 catch-object)…. // catch1 is a one type of catching. (catcher catch1 sachin)….// sachin did the catching. (caught catch1 ball)…..// he caught the ball. 12/23/13 41
  • 42. Frame ( Slot and Filler)notation.       Frame notation combines the different slots of the slot assertion notation. Thus we have, (catch-object catch1 (catcher sachin) (caught ball)). Here we have constructed a single structure called a frame that includes all the information. 12/23/13 42
  • 43. Convert the following to first-order predicate logic using the predicates indicated:      swimming_pool(X) steamy(X) large(X) unpleasant(X) noisy(X) place(X) All large swimming pools are noisy and steamy places. All noisy and steamy places are unpleasant. All noisy and steamy places except swimming pools are unpleasant. The swimming pool is small and quiet. 12/23/13 43
  • 44.         All large swimming pools are noisy and steamy places. (forall (x) (if (and large(X) swimming_pool(X)) (and noisy(X) (and (steamy(X) place(X)))). All noisy and steamy places are unpleasant. (forall (x)(and noisy(X) (and (steamy(X) place(X)) unpleasant(X))). All noisy and steamy places except swimming pools are unpleasant. (forall (x)((not swimming_pool(x)) and noisy(X) (and (steamy(X) place(X)) unpleasant(X)))). The swimming pool is small and quiet. (and swimming_pool(x) and (not large(X)) (not noisy(X))) 12/23/13 44
  • 45. Represent in predicate calculus and then in semantic network Circus elements are elephants. Elephants have heads and trunks. Heads have mouths. Elephants are animals. Animals have hearts. Circus elephants are performers. Performers have costumes. Costumes are clothes. 12/23/13 45