0% found this document useful (0 votes)
116 views39 pages

Unit No 1 (Fundamental of AI)

The document discusses artificial intelligence including its definition, traits, applications across different industries like healthcare, gaming, finance, and disciplines involved. It defines AI as a branch of computer science that creates intelligent machines to behave and think like humans. The traits discussed are high accuracy, speed, reliability and ability to assist in risky environments. Applications mentioned are in astronomy, healthcare, gaming, finance, data security, social media, travel, automotive, robotics, entertainment, agriculture and e-commerce.

Uploaded by

Pankaj Haldikar
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)
116 views39 pages

Unit No 1 (Fundamental of AI)

The document discusses artificial intelligence including its definition, traits, applications across different industries like healthcare, gaming, finance, and disciplines involved. It defines AI as a branch of computer science that creates intelligent machines to behave and think like humans. The traits discussed are high accuracy, speed, reliability and ability to assist in risky environments. Applications mentioned are in astronomy, healthcare, gaming, finance, data security, social media, travel, automotive, robotics, entertainment, agriculture and e-commerce.

Uploaded by

Pankaj Haldikar
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/ 39

Artificial Intelligence

Unit No-:01
Foundations of AI

1) What is artificial intelligence? List and explain its traits.

In today's world, technology is growing very fast, and we are getting in touch with different
new technologies day by day.

Here, one of the booming technologies of computer science is Artificial Intelligence which is
ready to create a new revolution in the world by making intelligent machines.The Artificial
Intelligence is now all around us. It is currently working with a variety of subfields, ranging
from general to specific, such as self-driving cars, playing chess, proving theorems, playing
music, Painting, etc.

AI is one of the fascinating and universal fields of Computer science which has a great scope
in future. AI holds a tendency to cause a machine to work as a human.

Artificial Intelligence is composed of two words Artificial and Intelligence, where Artificial
defines "man-made," and intelligence defines "thinking power", hence AI means "a man-
made thinking power."

So, we can define AI as:

"It is a branch of computer science by which we can create intelligent machines which can
behave like a human, think like humans, and able to make decisions."

Artificial Intelligence exists when a machine can have human based skills such as learning,
reasoning, and solving problems

With Artificial Intelligence you do not need to preprogram a machine to do some work,
despite that you can create a machine with programmed algorithms which can work with
own intelligence, and that is the awesomeness of AI.

It is believed that AI is not a new technology, and some people says that as per Greek myth,
there were Mechanical men in early days which can work and behave like humans.
Why Artificial Intelligence?
Before Learning about Artificial Intelligence, we should know that what is the importance of
AI and why should we learn it. Following are some main reasons to learn about AI:

o With the help of AI, you can create such software or devices which can solve real-
world problems very easily and with accuracy such as health issues, marketing, traffic
issues, etc.
o With the help of AI, you can create your personal virtual Assistant, such as Cortana,
Google Assistant, Siri, etc.
o With the help of AI, you can build such Robots which can work in an environment
where survival of humans can be at risk.
o AI opens a path for other new technologies, new devices, and new Opportunities.

Traits of Artificial Intelligence


Following are some main traits of Artificial Intelligence:

o High Accuracy with less error: AI machines or systems are prone to less errors and
high accuracy as it takes decisions as per pre-experience or information.
o High-Speed: AI systems can be of very high-speed and fast-decision making, because
of that AI systems can beat a chess champion in the Chess game.
o High reliability: AI machines are highly reliable and can perform the same action
multiple times with high accuracy.
o Useful for risky areas: AI machines can be helpful in situations such as defusing a
bomb, exploring the ocean floor, where to employ a human can be risky.
o Digital Assistant: AI can be very useful to provide digital assistant to the users such
as AI technology is currently used by various E-commerce websites to show the
products as per customer requirement.
o Useful as a public utility: AI can be very useful for public utilities such as a self-
driving car which can make our journey safer and hassle-free, facial recognition for
security purpose, Natural language processing to communicate with the human in
human-language, etc.
2) Discuss applications of Artificial Intelligence.

Artificial Intelligence has various applications in today's society. It is becoming essential for
today's time because it can solve complex problems with an efficient way in multiple
industries, such as Healthcare, entertainment, finance, education, etc. AI is making our daily
life more comfortable and fast.

Following are some sectors which have the application of Artificial Intelligence:

AI in Astronomy
o Artificial Intelligence can be very useful to solve complex universe problems. AI
technology can be helpful for understanding the universe such as how it works, origin,
etc.

AI in Healthcare
o In the last, five to ten years, AI becoming more advantageous for the healthcare
industry and going to have a significant impact on this industry.
o Healthcare Industries are applying AI to make a better and faster diagnosis than
humans. AI can help doctors with diagnoses and can inform when patients are
worsening so that medical help can reach to the patient before hospitalization.

AI in Gaming
o AI can be used for gaming purpose. The AI machines can play strategic games like
chess, where the machine needs to think of a large number of possible places.

AI in Finance
o AI and finance industries are the best matches for each other. The finance industry is
implementing automation, chatbot, adaptive intelligence, algorithm trading, and
machine learning into financial processes.
AI in Data Security
o The security of data is crucial for every company and cyber-attacks are growing very
rapidly in the digital world. AI can be used to make your data more safe and secure.
Some examples such as AEG bot, AI2 Platform,are used to determine software bug
and cyber-attacks in a better way.

AI in Social Media
o Social Media sites such as Facebook, Twitter, and Snapchat contain billions of user
profiles, which need to be stored and managed in a very efficient way. AI can organize
and manage massive amounts of data. AI can analyze lots of data to identify the latest
trends, hashtag, and requirement of different users.

AI in Travel & Transport


o AI is becoming highly demanding for travel industries. AI is capable of doing various
travel related works such as from making travel arrangement to suggesting the hotels,
flights, and best routes to the customers. Travel industries are using AI-powered
chatbots which can make human-like interaction with customers for better and fast
response.

AI in Automotive Industry
o Some Automotive industries are using AI to provide virtual assistant to their user for
better performance. Such as Tesla has introduced TeslaBot, an intelligent virtual
assistant.
o Various Industries are currently working for developing self-driven cars which can
make your journey more safe and secure.

AI in Robotics:
o Artificial Intelligence has a remarkable role in Robotics. Usually, general robots are
programmed such that they can perform some repetitive task, but with the help of AI,
we can create intelligent robots which can perform tasks with their own experiences
without pre-programmed.
o Humanoid Robots are best examples for AI in robotics, recently the intelligent
Humanoid robot named as Erica and Sophia has been developed which can talk and
behave like humans.

AI in Entertainment
o We are currently using some AI based applications in our daily life with some
entertainment services such as Netflix or Amazon. With the help of ML/AI
algorithms, these services show the recommendations for programs or shows.
AI in Agriculture
o Agriculture is an area which requires various resources, labor, money, and time for
best result. Now a day's agriculture is becoming digital, and AI is emerging in this
field. Agriculture is applying AI as agriculture robotics, solid and crop monitoring,
predictive analysis. AI in agriculture can be very helpful for farmers.

AI in E-commerce
o AI is providing a competitive edge to the e-commerce industry, and it is becoming
more demanding in the e-commerce business. AI is helping shoppers to discover
associated products with recommended size, color, or even brand.

AI in education:
o AI can automate grading so that the tutor can have more time to teach. AI chatbot
can communicate with students as a teaching assistant.
o AI in the future can be work as a personal virtual tutor for students, which will be
accessible easily at any time and any place.

3) List various disciplines in AI. Give examples.


Artificial Intelligence is simple a combination of many disciplines of science, Biology,
Neurology and other fields in engineering. In this tutorial we are going to explore all the
various disciplines used in Machine Learning.

There is no one technology in Artificial Intelligence and it requires developers to learn a lot
of things to become productive programmer. Artificial Intelligence requires deep knowledge
many things including good programming skills. If we talk about programming one must
have extensive experience in Java, Python, Scala, R, Spark and also the Big Data
technologies.

The aim of AI is to develop program for simulating learning of human being and its a
complex process which requires knowledge of various disciplines like Computer Science,
Biology, Psychology, Linguistics etc... Learning all these things are really complex task and
that's why in project team we have to hire resources from many fields.

Following are major disciplines used with Artificial Intelligence:

Philosophy
Philosophy is very important as it attempts to answer important questions like "Can a
machine act intelligently?", "Can it solve like human being?", "Are computer intelligence is
like Human one?" etc...
Mathematics
Mathematics is used to write the logic and algorithm for machine learning. Philosophy thinks
and defines particular intelligence and way it should work. But here comes the intelligence
of Mathematicians to come out with calculations and algorithms for learning. Good
knowledge of mathematics is a must skills to be able to develop model of AI.

Economics
Lots of Economics reasoning is used in developing programs for Artificial Intelligence.

Neuroscience
Study of Neuroscience providing information about how human brain works and how
neurons responds to a particular event. This enables AI scientists to develop programming
model to work like human brain.

Psychology
The Psychology is used to study and find the process of thinking of humans and animals.
This discipline enables data science to understand the Brain, Behaviour and Person which is
essential to make things like human brain.

Computer engineering
Computer engineer write the codes for making the neural network for artificial intelligence.
It then updates the values/properties of the neural network based on the data provided to the
system. This way Artificial Intelligence is achieved. Computer programmer should have very
high programming skills along with the knowledge of Mathematics and other disciplines
used with AI.

Control theory and cybernetics


This theory describes how things operate under their own control. It is scientific study of
working of humans, animals and machines control and communicate with each other.
Knowledge of this technology is also very important.

Linguistics
The modern Linguistics is called computational linguistics or natural language processing.
The natural language processing allows the intelligent system to communicate through
language such as English. To natural language processing experience is also a must for
developing Artificial Intelligence system for machines.

Big Data
Big Data is fuelling the growth of Artificial Intelligence as it provides a platform for saving
and querying huge data sets. AI requires to process a lot of data and its not possible to save
data in one computer and Big Data plays big role here. Big Data also provides distributed
computing environment which can be used for training the model on distributed system.
4) What is the Turing machine? How is it used for machine intelligence?
A Turing Machine is an accepting device which accepts the languages (recursively
enumerable set) generated by type 0 grammars. It was invented in 1936 by Alan Turing.

Definition

A Turing Machine (TM) is a mathematical model which consists of an infinite length tape
divided into cells on which input is given. It consists of a head which reads the input tape. A
state register stores the state of the Turing machine. After reading an input symbol, it is
replaced with another symbol, its internal state is changed, and it moves from one cell to the
right or left. If the TM reaches the final state, the input string is accepted, otherwise rejected.
A TM can be formally described as a 7-tuple (Q, X, ∑, δ, q0, B, F) where −
 Q is a finite set of states
 X is the tape alphabet
 ∑ is the input alphabet
 δ is a transition function; δ : Q × X → Q × X × {Left_shift, Right_shift}.
 q0 is the initial state
 B is the blank symbol
 F is the set of final states
Comparison with the previous automaton
The following table shows a comparison of how a Turing machine differs from Finite
Automaton and Pushdown Automaton.

Machine Stack Data Structure Deterministic?

Finite Automaton N.A Yes

Pushdown Automaton Last In First Out(LIFO) No

Turing Machine Infinite tape Yes

Example of Turing machine


Turing machine M = (Q, X, ∑, δ, q0, B, F) with
 Q = {q0, q1, q2, qf}
 X = {a, b}
 ∑ = {1}
 q0 = {q0}
 B = blank symbol
 F = {qf }
δ is given by −
Tape alphabet symbol Present State ‘q0’ Present State ‘q1’ Present State ‘q2’

a 1Rq1 1Lq0 1Lqf

b 1Lq2 1Rq1 1Rqf

Here the transition 1Rq1 implies that the write symbol is 1, the tape moves right, and the next
state is q1. Similarly, the transition 1Lq2 implies that the write symbol is 1, the tape moves
left, and the next state is q2.

Time and Space Complexity of a Turing Machine

For a Turing machine, the time complexity refers to the measure of the number of times the
tape moves when the machine is initialized for some input symbols and the space complexity
is the number of cells of the tape written.
Time complexity all reasonable functions −
T(n) = O(n log n)
TM's space complexity −
S(n) = O(n)

5) Discuss various knowledge representation techniques in AI.


Techniques of knowledge representation

There are mainly four ways of knowledge representation which are given as follows:

1. Logical Representation
2. Semantic Network Representation
3. Frame Representation
4. Production Rules
1. Logical Representation

Logical representation is a language with some concrete rules which deals with propositions
and has no ambiguity in representation. Logical representation means drawing a conclusion
based on various conditions. This representation lays down some important communication
rules. It consists of precisely defined syntax and semantics which supports the sound
inference. Each sentence can be translated into logics using syntax and semantics.

Syntax:
o Syntaxes are the rules which decide how we can construct legal sentences in the logic.
o It determines which symbol we can use in knowledge representation.
o How to write those symbols.

Semantics:
o Semantics are the rules by which we can interpret the sentence in the logic.
o Semantic also involves assigning a meaning to each sentence.

Logical representation can be categorised into mainly two logics:

a. Propositional Logics
b. Predicate logics

Advantages of logical representation:


1. Logical representation enables us to do logical reasoning.
2. Logical representation is the basis for the programming languages.

Disadvantages of logical Representation:


1. Logical representations have some restrictions and are challenging to work with.
2. Logical representation technique may not be very natural, and inference may not be so
efficient.

2. Semantic Network Representation

Semantic networks are alternative of predicate logic for knowledge representation. In


Semantic networks, we can represent our knowledge in the form of graphical networks. This
network consists of nodes representing objects and arcs which describe the relationship
between those objects. Semantic networks can categorize the object in different forms and
can also link those objects. Semantic networks are easy to understand and can be easily
extended.2Will Apple EVER Release A Foldable iPhone? Is It Too Late?

This representation consist of mainly two types of relations:

a. IS-A relation (Inheritance)


b. Kind-of-relation
Example: Following are some statements which we need to represent in the form of nodes
and arcs.

Statements:
a. Jerry is a cat.
b. Jerry is a mammal
c. Jerry is owned by Priya.
d. Jerry is brown colored.
e. All Mammals are animal.

In the above diagram, we have represented the different type of knowledge in the form of
nodes and arcs. Each object is connected with another object by some relation.

Drawbacks in Semantic representation:


1. Semantic networks take more computational time at runtime as we need to traverse the
complete network tree to answer some questions. It might be possible in the worst case
scenario that after traversing the entire tree, we find that the solution does not exist in
this network.
2. Semantic networks try to model human-like memory (Which has 1015 neurons and
links) to store the information, but in practice, it is not possible to build such a vast
semantic network.
3. These types of representations are inadequate as they do not have any equivalent
quantifier, e.g., for all, for some, none, etc.
4. Semantic networks do not have any standard definition for the link names.
5. These networks are not intelligent and depend on the creator of the system.

Advantages of Semantic network:


1. Semantic networks are a natural representation of knowledge.
2. Semantic networks convey meaning in a transparent manner.
3. These networks are simple and easily understandable.
3. Frame Representation

A frame is a record like structure which consists of a collection of attributes and its values to
describe an entity in the world. Frames are the AI data structure which divides knowledge
into substructures by representing stereotypes situations. It consists of a collection of slots
and slot values. These slots may be of any type and sizes. Slots have names and values which
are called facets.

Facets: The various aspects of a slot is known as Facets. Facets are features of frames which
enable us to put constraints on the frames. Example: IF-NEEDED facts are called when data
of any particular slot is needed. A frame may consist of any number of slots, and a slot may
include any number of facets and facets may have any number of values. A frame is also
known as slot-filter knowledge representation in artificial intelligence.

Frames are derived from semantic networks and later evolved into our modern-day classes
and objects. A single frame is not much useful. Frames system consist of a collection of
frames which are connected. In the frame, knowledge about an object or event can be stored
together in the knowledge base. The frame is a type of technology which is widely used in
various applications including Natural language processing and machine visions.

Example: 1

Let's take an example of a frame for a book

Slots Filters

Title Artificial Intelligence

Genre Computer Science

Author Peter Norvig

Edition Third Edition

Year 1996

Page 1152

Example 2:

Let's suppose we are taking an entity, Peter. Peter is an engineer as a profession, and his age
is 25, he lives in city London, and the country is England. So following is the frame
representation for this:
Slots Filter

Name Peter

Profession Doctor

Age 25

Marital status Single

Weight 78

Advantages of frame representation:


1. The frame knowledge representation makes the programming easier by grouping the
related data.
2. The frame representation is comparably flexible and used by many applications in AI.
3. It is very easy to add slots for new attribute and relations.
4. It is easy to include default data and to search for missing values.
5. Frame representation is easy to understand and visualize.

Disadvantages of frame representation:


1. In frame system inference mechanism is not be easily processed.
2. Inference mechanism cannot be smoothly proceeded by frame representation.
3. Frame representation has a much generalized approach.

4. Production Rules

Production rules system consist of (condition, action) pairs which mean, "If condition then
action". It has mainly three parts:

o The set of production rules


o Working Memory
o The recognize-act-cycle

In production rules agent checks for the condition and if the condition exists then production
rule fires and corresponding action is carried out. The condition part of the rule determines
which rule may be applied to a problem. And the action part carries out the associated
problem-solving steps. This complete process is called a recognize-act cycle.
The working memory contains the description of the current state of problems-solving and
rule can write knowledge to the working memory. This knowledge match and may fire other
rules.

If there is a new situation (state) generates, then multiple production rules will be fired
together, this is called conflict set. In this situation, the agent needs to select a rule from these
sets, and it is called a conflict resolution.

Example:
o IF (at bus stop AND bus arrives) THEN action (get into the bus)
o IF (on the bus AND paid AND empty seat) THEN action (sit down).
o IF (on bus AND unpaid) THEN action (pay charges).
o IF (bus arrives at destination) THEN action (get down from the bus).

Advantages of Production rule:


1. The production rules are expressed in natural language.
2. The production rules are highly modular, so we can easily remove, add or modify an
individual rule.

Disadvantages of Production rule:


1. Production rule system does not exhibit any learning capabilities, as it does not store
the result of the problem for the future uses.
2. During the execution of the program, many rules may be active hence rule-based
production systems are inefficient.

6) How symbolization is done in representing knowledge using propositional


logic? Illustrate.

Propositional logic (PL) is the simplest form of logic where all the statements are made by
propositions. A proposition is a declarative statement which is either true or false. It is a
technique of knowledge representation in logical and mathematical form.

Example:
a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.

Following are some basic facts about propositional logic:

o Propositional logic is also called Boolean logic as it works on 0 and 1.


o In propositional logic, we use symbolic variables to represent the logic, and we can
use any symbol for a representing a proposition, such A, B, C, P, Q, R, etc.
o Propositions can be either true or false, but it cannot be both.
o Propositional logic consists of an object, relations or function, and logical
connectives.
o These connectives are also called logical operators.
o The propositions and connectives are the basic elements of the propositional logic.
o Connectives can be said as a logical operator which connects two sentences.
o A proposition formula which is always true is called tautology, and it is also called a
valid sentence.
o A proposition formula which is always false is called Contradiction.
o A proposition formula which has both true and false values is called
o Statements which are questions, commands, or opinions are not propositions such as
"Where is Rohini", "How are you", "What is your name", are not propositions.

Syntax of propositional logic:

The syntax of propositional logic defines the allowable sentences for the knowledge
representation. There are two types of Propositions:

a. Atomic Propositions
b. Compound propositions

o Atomic Proposition: Atomic propositions are the simple propositions. It consists of a


single proposition symbol. These are the sentences which must be either true or false.

Example:

a) 2+2 is 4, it is an atomic proposition as it is a true fact.


b) "The Sun is cold" is also a proposition as it is a false fact.
o Compound proposition: Compound propositions are constructed by combining
simpler or atomic propositions, using parenthesis and logical connectives.

Example:

a) "It is raining today, and street is wet."


b) "Ankit is a doctor, and his clinic is in Mumbai."
Logical Connectives:

Logical connectives are used to connect two simpler propositions or representing a sentence
logically. We can create compound propositions with the help of logical connectives. There
are mainly five connectives, which are given as follows:

1. Negation: A sentence such as ¬ P is called negation of P. A literal can be either


Positive literal or negative literal.
2. Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a
conjunction.
Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
3. Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction,
where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.
4. Implication: A sentence such as P → Q, is called an implication. Implications are also
known as if-then rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
5. Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example If I
am breathing, then I am alive
P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.

Following is the summarized table for Propositional Logic Connectives:

Truth Table:

In propositional logic, we need to know the truth values of propositions in all possible
scenarios. We can combine all the possible combination with logical connectives, and the
representation of these combinations in a tabular format is called Truth table. Following are
the truth table for all logical connectives:
Truth table with three propositions:

We can build a proposition composing three propositions P, Q, and R. This truth table is
made-up of 8n Tuples as we have taken three proposition symbols.
Precedence of connectives:

Just like arithmetic operators, there is a precedence order for propositional connectors or
logical operators. This order should be followed while evaluating a propositional problem.
Following is the list of the precedence order for operators:

Precedence Operators

First Precedence Parenthesis

Second Precedence Negation

Third Precedence Conjunction(AND)

Fourth Precedence Disjunction(OR)

Fifth Precedence Implication

Six Precedence Biconditional

Logical equivalence:

Logical equivalence is one of the features of propositional logic. Two propositions are said
to be logically equivalent if and only if the columns in the truth table are identical to each
other.

Let's take two propositions A and B, so for logical equivalence, we can write it as A⇔B. In
below truth table we can see that column for ¬A∨ B and A→B, are identical hence A is
Equivalent to B
Properties of Operators:
o Commutatively:
o P∧ Q= Q ∧ P, or
o P ∨ Q = Q ∨ P.
o Associativity:
o (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
o (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
o Identity element:
o P ∧ True = P,
o P ∨ True= True.
o Distributive:
o P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
o P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
o DE Morgan's Law:
o ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
o ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
o Double-negation elimination:
o ¬ (¬P) = P.

Limitations of Propositional logic:


o We cannot represent relations like ALL, some, or none with propositional logic.
Example:
a. All the girls are intelligent.
b. Some apples are sweet.
o Propositional logic has limited expressive power.
o In propositional logic, we cannot describe statements in terms of their properties or
logical relationships.
7) Justify predicate calculus as knowledge representation. Give examples.

In the topic of Propositional logic, we have seen that how to represent statements using
propositional logic. But unfortunately, in propositional logic, we can only represent the facts,
which are either true or false. PL is not sufficient to represent the complex sentences or
natural language statements. The propositional logic has very limited expressive power.
Consider the following sentence, which we cannot represent using PL logic.

o "Some humans are intelligent", or


o "Sachin likes cricket."

To represent the above statements, PL logic is not sufficient, so we required some more
powerful logic, such as first-order logic.

First-Order logic:

o First-order logic is another way of knowledge representation in artificial intelligence.


It is an extension to propositional logic.
o FOL is sufficiently expressive to represent the natural language statements in a
concise way.
o First-order logic is also known as Predicate logic or First-order predicate logic.
First-order logic is a powerful language that develops information about the objects in
a more easy way and can also express the relationship between those objects.
o First-order logic (like natural language) does not only assume that the world contains
facts like propositional logic but also assumes the following things in the world:
o Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus,
......
o Relations: It can be unary relation such as: red, round, is adjacent, or n-any
relation such as: the sister of, brother of, has color, comes between
o Function: Father of, best friend, third inning of, end of, ......
o As a natural language, first-order logic also has two main parts:
a. Syntax
b. Semantics

Syntax of First-Order logic:

The syntax of FOL determines which collection of symbols is a logical expression in first-
order logic. The basic syntactic elements of first-order logic are symbols. We write
statements in short-hand notation in FOL.

Basic Elements of First-order logic:

Following are the basic elements of FOL syntax


Constant 1, 2, A, John, Mumbai, cat,....

Variables x, y, z, a, b,....

Predicates Brother, Father, >,....

Function sqrt, LeftLegOf, ....

Connectives ∧, ∨, ¬, ⇒, ⇔

Equality ==

Quantifier ∀, ∃

Atomic sentences:
o Atomic sentences are the most basic sentences of first-order logic. These sentences are
formed from a predicate symbol followed by a parenthesis with a sequence of terms.
o We can represent atomic sentences as Predicate (term1, term2, ......, term n).

Example: Ravi and Ajay are brothers: => Brothers(Ravi, Ajay).


Chinky is a cat: => cat (Chinky).

Complex Sentences:
o Complex sentences are made by combining atomic sentences using connectives.

First-order logic statements can be divided into two parts:

o Subject: Subject is the main part of the statement.


o Predicate: A predicate can be defined as a relation, which binds two atoms together in
a statement.

Consider the statement: "x is an integer.", it consists of two parts, the first part x is the
subject of the statement and second part "is an integer," is known as a predicate.
Quantifiers in First-order logic:

o A quantifier is a language element which generates quantification, and quantification


specifies the quantity of specimen in the universe of discourse.
o These are the symbols that permit to determine or identify the range and scope of the
variable in the logical expression. There are two types of quantifier:
a. Universal Quantifier, (for all, everyone, everything)
b. Existential quantifier, (for some, at least one).

Universal Quantifier:

Universal quantifier is a symbol of logical representation, which specifies that the statement
within its range is true for everything or every instance of a particular thing.

The Universal quantifier is represented by a symbol ∀, which resembles an inverted A.

If x is a variable, then ∀x is read as:

o For all x
o For each x
o For every x.

Example:

All man drink coffee.

Let a variable x which refers to a cat so all x can be represented in UOD as below:

∀x man(x) → drink (x, coffee).

It will be read as: There are all x where x is a man who drink coffee.
Existential Quantifier:

Existential quantifiers are the type of quantifiers, which express that the statement within its
scope is true for at least one instance of something.

It is denoted by the logical operator ∃, which resembles as inverted E. When it is used with a
predicate variable then it is called as an existential quantifier.

Note: In Existential quantifier we always use AND or Conjunction symbol (∧).

If x is a variable, then existential quantifier will be ∃x or ∃(x). And it will be read as:

o There exists a 'x.'


o For some 'x.'
o For at least one 'x.'

Example:

Some boys are intelligent.

∃x: boys(x) ∧ intelligent(x)

It will be read as: There are some x where x is a boy who is intelligent.

Points to remember:

o The main connective for universal quantifier ∀ is implication →.


o The main connective for existential quantifier ∃ is and ∧.

Properties of Quantifiers:

o In universal quantifier, ∀x∀y is similar to ∀y∀x.


o In Existential quantifier, ∃x∃y is similar to ∃y∃x.
o ∃x∀y is not similar to ∀y∃x.
Some Examples of FOL using quantifier:

1. All birds fly.


In this question the predicate is "fly(bird)."
And since there are all birds who fly so it will be represented as follows.
∀x bird(x) →fly(x).

2. Every man respects his parent.


In this question, the predicate is "respect(x, y)," where x=man, and y= parent.
Since there is every man so will use ∀, and it will be represented as follows:
∀x man(x) → respects (x, parent).

3. Some boys play cricket.


In this question, the predicate is "play(x, y)," where x= boys, and y= game. Since there are
some boys so we will use ∃, and it will be represented as:
∃x boys(x) → play(x, cricket).

4. Not all students like both Mathematics and Science.


In this question, the predicate is "like(x, y)," where x= student, and y= subject.
Since there are not all students, so we will use ∀ with negation, so following representation
for this:
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x, Science)].

5. Only one student failed in Mathematics.


In this question, the predicate is "failed(x, y)," where x= student, and y= subject.
Since there is only one student who failed in Mathematics, so we will use following
representation for this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y) [¬(x==y) ∧ student(y) →
¬failed (x, Mathematics)].

Free and Bound Variables:

The quantifiers interact with variables which appear in a suitable way. There are two types of
variables in First-order logic which are given below:

Free Variable: A variable is said to be a free variable in a formula if it occurs outside the
scope of the quantifier.

Example: ∀x ∃(y)[P (x, y, z)], where z is a free variable.

Bound Variable: A variable is said to be a bound variable in a formula if it occurs within


the scope of the quantifier.

Example: ∀x [A (x) B( y)], here x and y are the bound variables.


8) With example explain the following components of predicate calculus:
1) Variables
Consider a Predicate formula having a part in form of (∃ x) P(x) of (x)P(x), then such part is
called x-bound part of the formula. Any occurrence of x in x-bound part is termed as bound
occurrence and any occurrence of x which is not x-bound is termed as free occurrence. See
the examples below -
 (∃ x) (P(x) ∧ Q(x))
 (∃ x) P(x) ∧ Q(x)
In first example, scope of (∃ x) is (P(x) ∧ Q(x)) and all occurrences of x are bound
occurrences. Whereas in second example, scope of (∃ x) is P(x) and last occurrence of x in
Q(x) is a free occurrence.
2) Constants
3) Connectives
4) Quantifiers
The variable of predicates is quantified by quantifiers. There are two types of quantifier in
predicate logic − Universal Quantifier and Existential Quantifier.

Universal Quantifier

Universal quantifier states that the statements within its scope are true for every value of the
specific variable. It is denoted by the symbol ∀.
∀ x P(x) is read as for every value of x, P(x) is true.
Example − "Man is mortal" can be transformed into the propositional form ∀ x P(x) where
P(x) is the predicate which denotes x is mortal and ∀ x represents all men.

Existential Quantifier

Existential quantifier states that the statements within its scope are true for some values of
the specific variable. It is denoted by the symbol ∃.
∃ x P(x) is read as for some values of x, P(x) is true.
Example − "Some people are dishonest" can be transformed into the propositional form ∃ x
P(x) where P(x) is the predicate which denotes x is dishonest and ∃ x represents some
dishonest men.
5) Functions
Earlier we denoted "Ram" as x and "is a student" as predicate P then we have statement as
P(x). Here P(x) is a statement function where if we replace x with a Subject say Sunil then
we'll be having a statement "Sunil is a student."
Thus a statement function is an expression having Predicate Symbol and one or multiple
variables. This statement function gives a statement when we replaced the variables with
objects. This replacement is called substitution instance of statement function.
6) Predicates
A predicate is an expression of one or more variables defined on some specific domain. A
predicate with variables can be made a proposition by either assigning a value to the
variable or by quantifying the variable.
Consider the following statement.
Ram is a student.
Now consider the above statement in terms of Predicate calculus.
 Here "is a student" is a predicate and Ram is subject.
 Let's denote "Ram" as x and "is a student" as a predicate P then we can write the above
statement as P(x).
 Generally a statement expressed by Predicate must have at least one object associated
with Predicate. In our case, Ram is the required object with associated with predicate
P.

9) Convert the following sentences into FOPL


a) All employees earning 2Lakh or more pay taxes.
b) Some employees are sick today
c) No employee earns more than the president
Let
E(x) : for x is an employee
P(x) : for x is a President
i(x) : for the income of x (lower case – denotes function not predicate)
GE(u,v) for u is greater than or equal to v
S(x) for x is sick today
T(x) for x pays taxes
Then : Formulae in FOPL are :
1 : ∀x ((E(x) & GE(i(x), 200000)) -> T(x))
2 : ∃x(E(y) -> S(x))
3 : ∀x ∀y((E(x) & P(y)) -> ~GE(i(x), i(y)))
10) Convert the following facts into Predicate Logic.
a) All Pompeian’s were Romans
x: Pompeian(x)  Roman(x)

b) Everyone is loyal to Someone


x: y: loyalto(x, y) y: x: loyalto(x, y)

11) List and explain various inference techniques in propositional logic and
FOPL.

Propositional logic (PL) is the simplest form of logic where all the statements are made by
propositions. A proposition is a declarative statement which is either true or false. It is a
technique of knowledge representation in logical and mathematical form.

Example:
a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.

Following are some basic facts about propositional logic:

o Propositional logic is also called Boolean logic as it works on 0 and 1.


o In propositional logic, we use symbolic variables to represent the logic, and we can
use any symbol for a representing a proposition, such A, B, C, P, Q, R, etc.
o Propositions can be either true or false, but it cannot be both.
o Propositional logic consists of an object, relations or function, and logical
connectives.
o These connectives are also called logical operators.
o The propositions and connectives are the basic elements of the propositional logic.
o Connectives can be said as a logical operator which connects two sentences.
o A proposition formula which is always true is called tautology, and it is also called a
valid sentence.
o A proposition formula which is always false is called Contradiction.
o A proposition formula which has both true and false values is called
o Statements which are questions, commands, or opinions are not propositions such as
"Where is Rohini", "How are you", "What is your name", are not propositions.
Syntax of propositional logic:

The syntax of propositional logic defines the allowable sentences for the knowledge
representation. There are two types of Propositions:

c. Atomic Propositions
d. Compound propositions

o Atomic Proposition: Atomic propositions are the simple propositions. It consists of a


single proposition symbol. These are the sentences which must be either true or false.

Example:

a) 2+2 is 4, it is an atomic proposition as it is a true fact.


b) "The Sun is cold" is also a proposition as it is a false fact.
o Compound proposition: Compound propositions are constructed by combining
simpler or atomic propositions, using parenthesis and logical connectives.

Example:

a) "It is raining today, and street is wet."


b) "Ankit is a doctor, and his clinic is in Mumbai."

Logical Connectives:

Logical connectives are used to connect two simpler propositions or representing a sentence
logically. We can create compound propositions with the help of logical connectives. There
are mainly five connectives, which are given as follows:

6. Negation: A sentence such as ¬ P is called negation of P. A literal can be either


Positive literal or negative literal.
7. Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a
conjunction.
Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
8. Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction,
where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.
9. Implication: A sentence such as P → Q, is called an implication. Implications are also
known as if-then rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
10.Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example If I
am breathing, then I am alive
P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.

Following is the summarized table for Propositional Logic Connectives:

Truth Table:

In propositional logic, we need to know the truth values of propositions in all possible
scenarios. We can combine all the possible combination with logical connectives, and the
representation of these combinations in a tabular format is called Truth table. Following are
the truth table for all logical connectives:
Truth table with three propositions:

We can build a proposition composing three propositions P, Q, and R. This truth table is
made-up of 8n Tuples as we have taken three proposition symbols.
Precedence of connectives:

Just like arithmetic operators, there is a precedence order for propositional connectors or
logical operators. This order should be followed while evaluating a propositional problem.
Following is the list of the precedence order for operators:

Precedence Operators

First Precedence Parenthesis

Second Precedence Negation

Third Precedence Conjunction(AND)

Fourth Precedence Disjunction(OR)

Fifth Precedence Implication

Six Precedence Biconditional

Logical equivalence:

Logical equivalence is one of the features of propositional logic. Two propositions are said
to be logically equivalent if and only if the columns in the truth table are identical to each
other.

Let's take two propositions A and B, so for logical equivalence, we can write it as A⇔B. In
below truth table we can see that column for ¬A∨ B and A→B, are identical hence A is
Equivalent to B
Properties of Operators:
o Commutatively:
o P∧ Q= Q ∧ P, or
o P ∨ Q = Q ∨ P.
o Associativity:
o (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
o (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
o Identity element:
o P ∧ True = P,
o P ∨ True= True.
o Distributive:
o P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
o P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
o DE Morgan's Law:
o ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
o ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
o Double-negation elimination:
o ¬ (¬P) = P.

Limitations of Propositional logic:


o We cannot represent relations like ALL, some, or none with propositional logic.
Example:
a. All the girls are intelligent.
b. Some apples are sweet.
o Propositional logic has limited expressive power.
o In propositional logic, we cannot describe statements in terms of their properties or
logical relationships.
12) Differentiate between CNF and DNF with example.
13) Illustrate Frame as an AI knowledge representation technique.
 Frames are more structured form of packaging knowledge, - used for representing
objects, concepts etc.
 Frames are organized into hierarchies or network of frames.
 Lower level frames can inherit information from upper level frames in network.
 Nodes are connected using links viz.,
→ subc (links two class frames, one of which is subclass of other e.g., science_faculty class
is ako of faculty class),
→ is_a (connects a particular instance of a class frame e.g., Renuka is_a
science_faculty)
→ a_part_of (connects two class frames one of which is contained in other e.g.,
faculty class is_part_of department class).
→ Property link of semantic net is replaced by SLOT fields.
 A frame may have any number of slots needed for describing object. e.g.,
- faculty frame may have name, age, address, qualification etc as slot names.
 Each frame includes two basic element : slots and facets.
- Each slot may contain one or more facets (called fillers) which may take many forms such
as :
⇒value (value of the slot),
⇒default (default value of the slot),
⇒range (indicates the range of integer or enumerated values, a slot can have),
⇒demons (procedural attachments such as if_needed, if_deleted, if_added etc.)
and
⇒other (may contain rules, other frames, semantic net or any type of other
information).

14) How an inheritance is achieved in Frames. Give example.


Suppose we want to know nationality or phone of an instance-frame13.
These information are not given in this frame.
Search will start from frame13 in upward direction till we get our answer or have reached
root frame.
The frame can be easily represented in prolog by choosing predicate name as frame with
two arguments.
First argument is the name of the frame and second argument is a list of slot - facet pair.
15) Design script for attending the interview
Why conduct user interviews in the discovery phase of a project?
When you‘re launching a new product or feature, exploratory user research is a critical first
step to understand and validate your target user‘s needs and pain points. That way, you can be
sure that whatever product or feature you‘re developing will be solving real problems for
users. User interviews are one of the fundamental tools that you‘ll be using most often to
conduct exploratory research.
However, an important point to note according to Nielsen Norman Group — ―a discovery
phase does not involve testing a hypothesis or evaluating a potential solution‖.
While it may be tempting to go into an exploratory user interview with some product
concepts to test, by creating concepts to test even before you‘ve completed any user research,
you‘ll risk fixating on solutions that aren‘t based on problems that have been validated with
users.
Testing concepts would be more appropriate in a subsequent phase, after you‘ve consolidated
the insights from the interviews in the discovery phase.

Setting research objectives


All user interviews need some specific objectives, to ensure that the interview can actually
achieve some actionable insights.
Context-setting:
 To-do list apps aim to help users manage and recall their tasks
 To-do list apps are only one way of managing tasks, other ways include other apps (e.g.,
calendar apps) or physical products (e.g., post-its, handwritten lists)
Assumptions on user needs and pain points:
Before going into a user interview, you would often have some idea about their key needs and
pain points. This could come from secondary research, or even from the experience of the
team members‘ themselves (this would be true in this case, because most people would have
used a to-do list at some point in their life). An example of an assumption is below:
 Assumption: Users have too many items on their to-do list, leading to them feeling
overwhelmed and not being able to complete their most important tasks
Objectives
Based on the above context and assumptions, we can set the following objectives for this
piece of research:
1. To understand how users currently manage and recall their tasks
2. To understand users‘ key pain points in managing and recalling their tasks
3. To understand users‘ key pain points when using to-do list apps
4. To validate our assumption that users have too many tasks on their to-do list, leading to
an inability to complete their tasks

Recruitment:
Since many of the questions would require us to understand how users use other to-do list
apps, the main screening criteria would be that the participant must have some experience
using to-do lists in the past (they need not be currently using them, since someone who used
to-do list apps before but eventually stopped might be able to share interesting insights
about why they stopped).
A minimum of 5 participants would be required for these interviews (more is possible, but
since you‘ll be having a separate set of sessions for usability testing, it might make sense to
stick to 5, to manage the time spent on this project). Check out this useful article from Nielsen
Norman Group on why interviewing 5 users is sufficient.

Example Interview Script


Preamble:
1. Thank the participant for their time
2. Engage in some light opening conversation to help build rapport and put the participant
at ease
3. Clarify the objectives of the session — but try not to use the word ‘interview’ e.g., ‘Today
is just a casual chat for us to find out more about how you manage your tasks and use to-
do list apps’
4. If appropriate, clarify that all findings from this interview will be kept anonymous, and
that any insights shared from this session will not mention specific individuals
5. Ask for permission to record the session

General questions about how the user achieves a particular objective (in this case,
managing and recalling tasks):
1. How do you currently manage your tasks?
2. Walk us through the last time you had to manage your task list.
3. What’s the hardest part about managing your task list?
4. How do you currently recall tasks that need to be done?
5. Tell us about the last time you had to recall a task?
6. What’s the hardest part about recalling tasks that need to be done?
7. How do you work around [issue mentioned by user]?
Note: We ask these questions separately from the app-specific questions because users may
have their own ways of achieving an objective that may not involve applications (e.g., in the
case of task management, they may be putting post-its on the fridge, or keeping a handwritten
task list on their desk).
We also wouldn‘t ask about their usage of apps immediately because the user might fixate on
software issues and not raise more fundamental issues.
App-specific questions
1. What to-do list apps are you currently using/did you use in the past to help you keep track
of your tasks?
2. How did you find out about this to-do list app?
3. Is this a paid or free app?
4. What platform do you use this app on (mobile/desktop/both)?
5. Walk us through the most recent occasion when you used the app.
6. What did you like most about managing your tasks through the app?
7. What was the biggest problem or the hardest part about managing your tasks through the
app?
8. How did you work around [issue mentioned by user]?
Remember to probe deeper when users raise issues. For example, the user might mention an
issue in passing while describing how they used the app, at which point you should ask
additional probing questions such as:
 Could you tell me more about that issue you just mentioned?
 How did that affect your process of completing your task?
 Tell me more about why you felt that way?

Testing specific assumptions:


Assumption: Users have too many tasks on their to-do list apps, leading to them feeling
overwhelmed and not being able to complete their most important tasks on time
1. Tell me about how you would go about completing tasks on a day-to-day basis.
2. What is the hardest part about completing tasks on your to-do list?
3. How many tasks do you typically have on the to-do list app?
When reviewing the data, we can then see if users with a relatively high number of to-do list
items compared to others in the participant group face more issues with completing their
tasks.
Note that the question on ‗how many tasks do you typically have on your to-do list‘ is asked
at the end, so as not to lead the users into referencing that point.

General tips:
 Always prepare a script.
 Have someone join as a note taker, or at the very least take a recording of the session.
 Make sure to let users finish their thoughts — this entails being a bit comfortable with
silence. If you move on too quickly as soon as the user has paused, you may lose out on
key insights.
 Don‘t share your own experiences, even if it seems like a good way to build rapport —
 this will distract from the key purpose of the interview which is to find out more about
the user.
 It‘s important to remain neutral and not affirm users‘ ideas or statements one way or
another — this could lead the user to try and say what they think you want to hear.
 Where possible, ask users to recall a specific time when they performed a task, rather than
asking them how they generally go about performing it. This will guide them to share
specific insights rather than more general impressions.
 Remember to probe deeper. The ‗five whys‘ technique is an established technique to
determine the root cause of a problem by repeating the question ‗Why?‘. You generally
won‘t need to ask it 5 times, but you get the point!
 Stay under 20 questions — this gives you more time to probe the participants‘ responses
further.
 Make sure not to ask leading questions — keep your questions short and don‘t include any
suggestion of an answer or response in the question.
 Users might make mistakes in an interview (e.g., while describing how they used a
particular app). Don‘t correct them during the interview, as this might spoil the flow of
the interview and make them feel guarded. Just note them down and inform them at the
end of the interview if it‘s helpful.

Outcome of the interviews:


After the interviews are completed, the notes should be grouped into various insights about
the user (this is where sticky notes come in handy).
At the end of this synthesis process, you should have insights on some specific problems that
users need to solve (which may or may not include the assumptions you originally had at the
start of the process) that can form the basis for ideating what your product will look like.

16) How property of inheritance is achieved in Semantic Network.


A semantic net (or semantic network) is a knowledge representation technique used for
propositional information. So it is also called a propositional net. Semantic nets convey
meaning. They are two dimensional representations of knowledge. Mathematically a semantic
net can be defined as a labeled directed graph.
The main idea behind semantic nets is that the meaning of a concept comes from the ways in
which it is connected to other concepts. In semantic net, information is represented as a set of
nodes connected to each other by set of labeled arcs, which represent relationships among the
nodes.

INHERITANCE REASONING
Semantic net allows us to perform inheritance reasoning as all members of a class will inherit
all the properties of superclass .We could use inheritance to derive the additional relation.
Semantic nets allow multiple inheritance. So an object can belong to more than one category
and a category can be a subset of more than one another category.

INVERSE LINKS

It allows a common form of inference known as inverse links. For example we can have a
HasMother link which is the inverse of MotherOf link. The inverse links make the job of
inference algorithms much easier to answer queries such as who the mother of John is. On
discovering that HasMother is the inverse of MotherOf the inference algorithm can follow
that link HasMother from John to Gavy and answer the query.
ADVANTAGES
Semantic nets have the ability to represent default values for categories. In the above figure
John has one leg while he is a person and all persons have two legs. So persons have two legs
has only default status which can be overridden by a specific value.

They convey some meaning in a transparent manner.

They nets are simple and easy to understand.

They are easy to translate into PROLOG.

DISADVANTAGES

One of the drawbacks of semantic network is that the links between the objects represent only
binary relations. For example, the sentence Run(RajdhaniExpress,
Chandigarh,delhi,Tomorrow) cannot be asserted directly.

There is no standard definition of link names.

17) Explain conceptual dependency as a knowledge representation


technique.

Conceptual Dependency originally developed to represent knowledge acquired from natural


language input.

The goals of this theory are:

 To help in the drawing of inference from sentences.


 To be independent of the words used in the original input.
 That is to say: For any 2 (or more) sentences that are identical in meaning there
should be only one representation of that meaning.

It has been used by many programs that portend to understand English (MARGIE, SAM,
PAM). CD developed by Schank et al. as were the previous examples.

CD provides:

 a structure into which nodes representing information can be placed


 a specific set of primitives
 at a given level of granularity.

Sentences are represented as a series of diagrams depicting actions using both abstract and
real physical situations.
 The agent and the objects are represented
 The actions are built up from a set of primitive acts which can be modified by tense.

Examples of Primitive Acts are:

ATRANS
-- Transfer of an abstract relationship. e.g. give.
PTRANS
-- Transfer of the physical location of an object. e.g. go.
PROPEL
-- Application of a physical force to an object. e.g. push.
MTRANS
-- Transfer of mental information. e.g. tell.
MBUILD
-- Construct new information from old. e.g. decide.
SPEAK
-- Utter a sound. e.g. say.
ATTEND
-- Focus a sense on a stimulus. e.g. listen, watch.
MOVE
-- Movement of a body part by owner. e.g. punch, kick.
GRASP
-- Actor grasping an object. e.g. clutch.
INGEST
-- Actor ingesting an object. e.g. eat.
EXPEL
-- Actor getting rid of an object from body. e.g. ????.

Six primitive conceptual categories provide building blocks which are the set of allowable
dependencies in the concepts in a sentence:

PP
-- Real world objects.
ACT
-- Real world actions.
PA
-- Attributes of objects.
AA
-- Attributes of actions.
T
-- Times.
LOC
-- Locations.
18) Give example for the conceptual graph.
A cat is on a mat.
In the display form (DF), concepts are represented by rectangles: the concept [Cat]
represents a instance of a cat, and [Mat] represents an instance of a mat. Conceptual relations
are represented by circles or ovals: the conceptual relation (On) relates a cat to a mat. The
arcs that link the relations to the concepts are represented by arrows: the first arc has an
arrow pointing toward the relation, and the second arc has an arrow pointing away from the
relation. If a relation has more than two arcs, the arcs are numbered.

In the linear form (LF), concepts are represented by square brackets instead of boxes, and the
conceptual relations are represented by parentheses instead of circles:

[Cat]®(On)®[Mat].

Both DF and LF are designed for communication with humans or between humans and
machines. For communication between machines, the conceptual graph interchange form
(CGIF) has a syntax that uses coreference labels to represent the arcs:
[Cat: *x] [Mat: *y] (On ?x ?y)

The symbols *x and *y are called defining labels. The matching symbols ?x and ?y are
the bound labels that indicate references to the same instance of a cat x or a mat y. To reduce
the number of coreference labels, CGIF also permits concepts to be nested inside the relation
nodes:
(On [Cat] [Mat])

The display form in Figure 1 represents the abstract CG most directly. All the variations of
LF and CGIF represent stylistically different, but logically equivalent ways of linearizing the
same abstract graph. All these variations are accommodated by the LF grammar and the
CGIF grammar, which are defined in the CG standard.

CGIF is intended for transfer between computer systems that use CGs as their internal
representation. For communication with systems that use other internal representations,
CGIF can be translated to another logic-based formalism called the Knowledge Interchange
Format (KIF):
(exists ((?x Cat) (?y Mat)) (On ?x ?y))

Although DF, LF, CGIF, and KIF look very different, their semantics is defined by the same
logical foundations. They can all be translated to a statement of the following form in typed
predicate calculus:

($x:Cat)($y:Mat)on(x,y).
Any statement expressed in any one of these notations can be automatically translated to a
logically equivalent statement in any of the others. Formatting and stylistic information,
however, may be lost in translations between DF, LF, CGIF, KIF, and predicate calculus.

You might also like