Sei sulla pagina 1di 39

ARTIFICIAL INTELLIGENCE VISUE

SOLUTION (1)
ARTIFICIAL INTELLIGENCE VISUE

Q.1 Explain the term AI and give three important techniques for AI.
Ans. Artificial Intelligence:
 Artificial Intelligence is the study of how to make machine computers do things which t the moment
people do better. We can give the artificial intelligence technique as:
It is voluminous
It is hard to characterize accurately
It is constantly changing
It differs from data by being organized in a way that corresponds to the ways it will be used.
Organization of knowledge is situation dependent.
The three important AI Techniques:
Search: Provides a way of solving problems for which no more direct approach is available as well as a frame
work into which any direct techniques that are available can be embedded.
Use of knowledge: Provides a way of solving complex problems by exploiting the structures of the objects that
are involved.
Abstraction: Provides a way of separating important features and variations from unimportant ones that would
otherwise overwhelm any process.

Q.2 Explain the productive system for AI. Explain it in brief.


Ans. Production system is a mechanism that describes and performs the search process. It consists of
1. A set of rules.
2. One or more knowledge or database.
3. A control strategy that specifies the order of the rules to be applied.
4. A rule applied.
Requirements of a good control strategy:
1. The first requirement is that it can cause motion.
Consider the water jug problem. Suppose we implemented the simple control strategy of starting each time at
the top of the list of rules and choosing the first applicable one.
2. The second requirement is that it be systematic.
The requirement that a control strategy be systematic corresponds to the need for global motion as well as for
local motion.
Production System Characteristics:
We have argued that production systems are a good way to describe the operations that can be performed in
a search for a solution to a problem.
1. Can production systems, like problems, be described by a set of characteristics that shed some light on how
they can easily be implemented?
2. If so, what relationships are there between problem types and the types of production system best suited to
solving the problems?
There are different classes of the production system:
A monotonic production system: It is a production system in which the application of a rule never prevents the
later application of another rule that could also have been applied at the time first rule was selected.
A non-monotonic production system: A non-monotonic production system is one in which this is not true.
Partially commutative production system: A partially commutative production system is a production system
with the property that if the application of a particular sequence of rules transforms state x into state y then any
permutation of those rules that is allowable (i.e. each rules preconditions are satisfied when it is applied) also
transforms state x into state y. Partially commutative, monotonic production systems are useful for solving
ignorable problems.
A commutative production system: A commutative production system is a production system that is both
monotonic and partially commutative.

Q.3 What is intelligence and artificial intelligence.


Ans. An exact definition of intelligence has proven to be extremely elusive. Douglas Hofstadler
suggests the following characteristics in a list of essential abilities for intelligence.
1. To respond to situations very flexibility.
2. To make sense out of ambiguous or contradictory messages.
3. To recognize the relative importance of different elements of a situation.
4. To find similarities between situations despite differences, this may separate them.
5. To draw distinctions between situations despite similarities, this may link them.

SOLUTION (2)
ARTIFICIAL INTELLIGENCE VISUE
Artificial Intelligence: Artificial Intelligence is the study of how to make machine computers do things which t
the moment people do better. We can give the artificial intelligence technique as:
It is voluminous
It is hard to characterize accurately
It is constantly changing
It differs from data by being organized in a way that corresponds to the ways it will be used.
Organization of knowledge is situation dependent.

Q.4 Explain the term knowledge briefly.


Ans. Knowledge: It is one type of information but it is also differ from information. Knowledge is the
term which solves the complex problem by exploiting the structures of the objects.
There are several types of knowledge is given below:
 Inheritable knowledge
 Inferential knowledge
 Procedural knowledge
There are numerous points which are described and give the definition of the knowledge which are:
Large collection of symbols is called as data.
Large collection of data is called as information.
If you have lot of information it is knowledge.
If you have lot of knowledge then you are an intelligent.
If you are an intelligent then you have wisdom.
Knowledge is defined as the piece of information that helps in decision-making.
Intelligence can be defined as the ability to draw useful inferences from the available knowledge.
Wisdom is the maturity of the mind that directs its intelligence to achieve desired goals.
Knowledge Relation:

Q.5 Explain the tic-tac-toe and question answering problem.


Ans.
Question Answering: In this section we look at programs that read in English text and then answer questions
also stated in English about the text. This task differ from the last one in that it is more difficult now to state
formally and precisely what our problem is and what constitutes correct solution to it. For example, suppose that
the input text were just the single sentence.
―Russia massed troops on the Czech border‖.
Questions: Then either of the following question answer dialog might occur:
Q- Why did Russia do this?
Q- What should the United States do? Etc...
Algorithm:
To answer a question does the following:
1. Compare each element of question patterns against the question and use all those that match successfully
to generate set of text patterns.
2. Pass each of these patterns through a process that generates alternative forms of verbs so that for example
―go‖ in question might match ―went‖ in the text. This step generates a new, expanded set of text patterns.
3. Apply each of these text patterns Text, and collect all the resulting answer.

SOLUTION (3)
ARTIFICIAL INTELLIGENCE VISUE
4. Reply with the set of answers just collected.

Tic-Tac-Toe: The program of the tic-tac-toe in this increase in:


Their complexity
Their use of generalizations
The clarity of their knowledge
The extensibility of their approach
Here the nine element vector representing the board. An element containing 0 values, if squar e is blank, 1
if it is filled with an x or 2 if it is filled with a 0. So, 3 9 possibilities for this vector. This problem can be solved
by AL technique.

Q.6 Differentiate the Human Brain and Computer.


Ans.

Human Brain Computer


1. Living device 1. Non living device.

2. Self-build and creative. 2. Dependent and must be programmed.


3. Has continuo nature 3. Describe in nature.
4. Limited size. 4. Unlimited memory size.
5. Basic unit is nervous. 5. Basic unit is a ram cell.
6. Storage device are Electro chemicals in 6. Store devices are electronic & magnetic.
nature.
7. Number punching is slow. 7. Faster
8. Speed of transmission is of order of 50 to 8. Speed of transmission is equal to the speed
100 meters of sec. of electrons & speed of light.
9. Has inducted detective reasoning 9. No reasoning power.
capabilities.

Q.7 Explain the use of the AI in the real world.


Ans. 1) Expert System: An expert system is a computer program designed to act as an expert in a particular
domain also known as knowledge based system. An expert system is a set of programs that manipulate encoded
Knowledge to solve problems in a specialized domain that normally requires human expertise. The system
performs their inference through symbolic computations. Expert systems are currently designed to assist experts
not to replace them. They have proven to be useful in diverse are as such as medical diagnosis, chemical
analysis, and geological exploration and computer system configuration. Since the expert system field promises
a great deal of practical application and commercial potential in the near future .it has begun to attract on
enormous amount of attention.
 Natural language processing: The utility of computer is often limited by communication difficulties.
The effective use of a computer traditionally has involved the use of a programming language or set of
commands that you must use to communicate with the computer. The goal of natural language processing is to
enable people and computers to communicate in a natural (human) language such as English rather in a
computer language. The field of N.L.P is divided into 2 sub fields of : 1. Natural language understanding which
investigates methods of allowing the computer to comprehend instructions given in ordinary English so
computers can understand people more easily. Natural-language generations, which strives to have, computers
produce ordinary English language so that people can understand computers more easily.
 Speech recognition: The focus of N.L.P is to enable computers to communicate interactively with
English words and sentences that are typed on paper or displayed on a screen. The primary interactive method
of communication used by human is not reading and writing; it is speech. The goal of speech recognition
research is to allow computers to understand human speech so that they can hear our voice and recognize the
words. We are speaking speech recognition research seeks to advance the goal of natural language processing
by simplifying the process of interactive communication between people and computers.

SOLUTION (4)
ARTIFICIAL INTELLIGENCE VISUE
 Computer vision: It is a simple task to attach a camera to a computer so that the computer can receive
visual images .it has proven to be a far more difficult task. However to interpret those images so that the
computers can understand exactly what it is seeing. People generally use vision as their primary means of
sensing their environmental .we generally see more than we hear, feel, and smell of taste. The goal of computer
vision research is to give computers this same facility for understanding their surroundings.
 Robotics: A robot is an Electro mechanical device that can be programmed to perform manual tasks. The
robotic industries association formally defines a robot as ― a re programmable multi functional manipulator
designed to move material, parts, roots or specialized devices through variable programmed motions for the
performance of a variety of tasks‖. Not at all robotics is considered to be the part of AI .a robot that performs
only the actions it has been preprogrammed to perform is considered to be a ‗dumb‘ robot processing no more
intelligence. An intelligent robot includes some kind of sensory apparatus such as a camera that allows it to
respond to changes in its environment, rather than just to allow instructions ‗mindlessly‘.
 Intelligent computer assisted instruction (ICAI): CAI has been in use for many years bringing the
power of the computer to bear on the educational process. Now AI methods are being applied to the
development of intelligent computer –assisted instruction in an attempt to create computerized ―tutors‖ that
shape their teaching techniques to fit the learning patterns o individual students.
 Automatic programming: In simple terms programming is the process of telling the computer exactly
what you want it to do Developing a computer program frequently requires a great deal of time. A program
must be designed, written, tested, debugged and evaluated all as part of the program development process. The
goal of automatic programming is to create special programs that act as intelligent ―tool‖ to assist programmers
and expedite each phase of the programming process. The ultimate aim of automatic programming is computer
system that could develop programs by itself, in response to and in accordance with the specifications of a
program developer.
 Planning and decision support: When you have a goal, either you rely on luck and providence to
achieve that goal or you design and implement a plan .the realization of a complex goal may require the
construction of a formal and detailed plan. Intelligent planning programs are designed to provide active
assistance in the planning process and are expected to be particularly helpful to managers with decision-making
responsibilities. From the perspective of goals AI can be viewed as part of engineering and part of science.

The engineering goal of AI is to solve real world problems using AI as an armamentarium of ideas about
presenting knowledge; using knowledge and assembling system explain various sorts of intelligence.
Applications of AI should be judged according to whether there is well-defined task, an implemented
program and a set of identifiable principles. AI can help us to solve difficult real world problems, creating new
opportunities in business, engineering and many other application areas.

Q.8 Explain: problem decomposability and can steps be ignore or undo with example.
Ans. Problem Characteristics: Heuristic search is a very general method applicable to a large class of
problems. In order to choose the most appropriate methods for a particular problem it is necessary to analyze the
problem along several key dimensions.
1. Is the problem decomposable?
2. Can solution steps be ignored or undone?
3. Is the problems universe predicate?
4. Is a good solution to the problem obvious without comparison to all other possible solutions? (Is a good
solution absolute or relative?)
5. Is the solution a state or a path?
6. What is the role of knowledge?
7. Does the task require interaction with a person?

1. Is the problem decomposable?


The problem regarding the decomposing or the decomposable problem: Here we want to
evaluate the following one:
(X2+3x+sin2xcos2x) dx
We can also solve this by breaking down into smaller problem.

SOLUTION (5)
ARTIFICIAL INTELLIGENCE VISUE

A proposed solution: Decomposition produces two smaller problems


1. Is simple the start state. Simply put B and C.
2. Is not simple. We have to clear off A by removing C before we can pick up A and put it on B this can be done
easily.
1. We now try to combine the two sub-solutions into one solution we fail regardless of which one do first; we
will not be able to so the second. I.e. 1 and 2 are independent.

2. Can solution steps be ignored or undone?


1. Theorem Proving: Suppose we want to prove a mathematical theorem we proceed by first proving a lemma
that we think will be useful. Eventually, we realize that the lemma is not of help at all. Are we in trouble? No.
All we have lost is the effort that was spent.
2. The 8 puzzle: The 8-puzzle is a square in which is placed eight square tiles. The remaining 9 th square is
uncovered. Each tile has a number on it. A tile that is adjacent to the blank space can be slid into that space. A
game consists of a starting position and specified into the goal position by sliding the tiles around.
3. Chess: Suppose we made a wrong move and we realized it a couple of moves later. We cannot go back to
correct the move. The three problems are of three classes.
1. Ignorable: (Ex: Theorem proving) in which solution steps can be ignored.
2. Recoverable: (Ex: 8-puzzle) in which solution steps can be undone.
3. Irrecoverable: (Ex: Chess) in which solution steps cannot be undone.
Ignorable problems can be solved using a simple control structure that never back tracks. Recoverable problems
can be solved using a simple control structure that backtracks. A great deal of effort is needed to solve
irrecoverable problems.

SOLUTION (6)
ARTIFICIAL INTELLIGENCE VISUE

Q.9 Explain the problem representation in AI with examples.


Ans. Problems representation in AI:
Before a solution can be found, the prime condition is that the problem must be very precisely defined. To build
a system to solve a particular problem, we need to do four things.
1. Define the problem precisely: this definition must include precise specifications of what the initial
situations will be as well as what final situations constitute acceptable solutions to the problem.
2. Analyze the problem.
3. Isolate and represent the last knowledge that is necessary to solve the problem.
4. Choose the last problem solving techniques and apply it to the particular problem.
The most common methods of problem representation in AI are
1. State space representation
2. Problem reduction

State space representation:


A set of all possible states for a given problem is known as the state space of the problem. State space
representations are highly beneficial in AI because they provide all possible states, operations and goals. If the
entire state space representation for a problem is given, it is possible to trace the path from the initial state to the
Goal State and identify the sequence of operators necessary for doing it. The major deficiency of this method is
that it is not possible to visualize all states for a given problem. To overcome the deficiencies of this method,
problem reduction technique comes handy.
Example1:

Example2:
A Water Jug Problem: You are given two Jugs, a 4-gallon one and a 3-gallon one. Neither have any measuring
markers on it. There is a pump that can be used to fill the jugs with water. How can you get exactly 2 gallons of
water into the 4-gallon jug?
The state space for this problem can be described as the set of ordered pairs of integers (x, y) such that
x=0, 1, 2, 3, or 4 and y = 0, 1, 2, 0r 3; x represents the number of gallons of water in the 4-gallon jug, and y
represents the quality of water in the 3-gallon jug. The Start State is (0, 0). The goal state is (2, n) for any value
of n (since the problem does not specify how many gallons need to be in the 3-gallon jug).

SOLUTION (7)
ARTIFICIAL INTELLIGENCE VISUE

RULE DO Description
1. (X, Y) (4, Y) Fill the 4 – gallon jug.
If X<4
2. (X, Y) (X, 3) Fill the 3 – gallon jug.
If Y<3
3. (X, Y) (X-d, Y) Pour some water out of the 4 – gallon jug.
If X>0
4. (X, Y) (3, Y-d) Pour some water out of the 3 – gallon jug.
If Y>0
5. (X, Y) (0, Y) Empty the 4 gallon jug on the ground.
If X>0
6. (X, Y) (X, 0) Empty the 3 gallon jug on the ground.
If Y>0
7. (X, Y) (4, Y-(4-X)) Pour water from the 3 gallon jug in to 4 gallon jug until
If X+Y>=4 & Y>0 4 gallon jug is full.
8. (X, Y) (X-(3-Y), 3) Pour water from the 4 gallon jug in to 3 gallon jug until
If X+Y>=3 & X>0 3 gallon jug is full.
9. (X, Y) (X+Y, 0) Pour all water from 3 gallon jug to 4 gallon jug.
If X+Y<=4 & Y>0
10. (X, Y) (0, X+Y) Pour all water from 4 gallon jug to 3 gallon jug.
If X+Y<=3 & X>0
11. (0, 2) (2, 0) Pour the 2 gallon water from 3-gallon to 4 gallon jug.
12. (2, Y) (0, Y) Empty the 2 gallon water in the 4 gallon jug on the
ground.

Q.10 Explain AND OR graph with suitable example.


Ans. There should be a method for the problem reduction which can be explained by the following:
The method in which a complex problem is broken down or decomposed into a set of primitive sub
problems. Solutions for these primitive sub-problems are easily obtained. The solutions for all the sub-problems
collectively given the solution for the complex problem.
Between the complex problem and the sub-problem, there exist two kinds of relationships, i.e AND relation and
OR relation ship.
In AND relation ship, the solution for the problem is obtained by solving all the sub problems.( Remember
AND gate truth table condition). In OR relationship, the solution for the problem is obtained by solving any of
the sub-problems.(Remember AND gate truth table condition).
This is why the structure is called an AND-OR graph. The problem reduction is used on problems such as
theorem proving, symbolic integration and analysis of industrial schedules. To describe an algorithm for
searching an AND-OR graph, need to exploit a value, call futility. If the estimated coast of a solution becomes
greater than the value of futility, then give up the search. Futility should be chosen to corresponds to a threshold
such that any solution with a cost above it is too expensive to be practical, even if it could every be found.

SOLUTION (8)
ARTIFICIAL INTELLIGENCE VISUE

The problem reduction algorithm we just described is a simplification of an algorithm described in Martelli and
Montanari, Martelli and Montanari and Nilson. Nilsson calls it the AO* algorithm, the name we assume.
1. Place the start node s on open.
2. Using the search tree constructed thus far, compute the most promising solution tree T
3. Select a node n that is both on open and a part of T. Remove n from open and place it on closed.
4. If n is a terminal goal node, label n as solved. If the solution of n results in any of n‘s ancestors being
solved, label all the ancestors as solved. If the start node s is solved, exit with success where T is the solution
tree. Remove from open all nodes with a solved ancestor.
5. If n is not a solvable node (operators cannot be applied), label n as unsolvable. If the start node is labeled
as unsolvable, exit with failure. If any of n‘s ancestors become unsolvable because n is, label them unsolvable
as well. Remove from open all nodes with unsolvable ancestors.
6. Otherwise, expand node n generating all of its successors. For each such successor node that contains
more than one sub problem, generate their successors to give individual sub problems. Attach to each newly
generated node a back pointer to its predecessor. Compute the cost estimate h* for each newly generated node
and place all such nodes that do not yet have descendents on open. Next, recomputed the values of h* at n and
each ancestor of n.
7. Return to step 2.
8.
If can be shown that AO* will always find a minimum –cost solution tree if one exists, provided only that
h*(n) <_ h (n), and all are costs are positive. Like A*, the efficiency depends on how closely h* approximates h.

Q.11 Explain production system and its classification.


Ans.
Production system is a mechanism that describes and performs the search process. It consists of
1. A set of rules.
2. One or more knowledge or database.
3. A control strategy that specifies the order of the rules to be applied.
4. A rule applied.

There are different classes of the production system:


A monotonic production system: It is a production system in which the application of a rule never prevents the
later application of another rule that could also have been applied at the time first rule was selected.
A non-monotonic production system: A non-monotonic production system is one in which this is not true.
Partially commutative production system: A partially commutative production system is a production system
with the property that if the application of a particular sequence of rules transforms state x into state y then any
permutation of those rules that is allowable (i.e. each rules preconditions are satisfied when it i s applied) also
transforms state x into state y. Partially commutative, monotonic production systems are useful for solving
ignorable problems.
A commutative production system: A commutative production system is a production system that is both
monotonic and partially commutative.
The significance if these categories of production systems lie in the relationship between the categories
and appropriate implementation strategies.
Partially commutative, monotonic production systems are important from an implementation standpoint because
they can be implemented with out the ability to backtrack to previous states when it is discovered that an
incorrect path has been followed. Although it is often useful to implement such systems with backtracking in
order to guarantee a systematic search, the actual database representing the problem state need not be restored.

SOLUTION (9)
ARTIFICIAL INTELLIGENCE VISUE
Non-monotonic, partially commutative systems, on the other hand are useful for problems in which changes
occur but can be reversed and in which order of operations is not critical. Commutative production systems are
useful for many problems in which irreversible changes occur. These are likely to produce the same node many
times in the search process.

Q.12 Explain the following problem with its solution.


Ans.

SOLUTION (10)
ARTIFICIAL INTELLIGENCE VISUE

SOLUTION (11)
ARTIFICIAL INTELLIGENCE VISUE

Q.13 Explain Turing test.


Ans.
Turing Test: In 1950, Turing published an article in the Mind magazine, which triggered a controversial topic
―Can a machine think‖.
Turing proposed an ‗imitation game‘ which was later modified to Turing test. In the imitation game the
players are three humans- a male, a female and an interrogator. The interrogator who is shielded from the other
two, asks questions to both of them and based on their typewritten answers determines who is female. The aim
of the male is to imitate the female and deceive the interrogator and the role of female is to provide replies that
would inform the interrogator about her true sex.
Turing proposed that if the human interrogator in Room C is not able to identify who is in Room A or in
Room B, then the machine possesses intelligence. Turing considered this is a sufficient test for attributing
thinking capacity to a machine. As of today, Turing test is the ultimate test a machine must pass in order to be
called as intelligent test.

Importance of Turing test:


It gives a standard for determining intelligence. It also helps in eliminating any bias in favour of living
organism, because the interrogator focuses slowly on the content of the answers to the questions.

Q.14 Analyze the following problem with respect to all their characteristics and
also explain in which category they fall.
Ans. 8 Puzzle: The 8-puzzle, an instance of which is shown in Figure 3.4, consists of a 3x3 board with eight
numbered tiles and a blank space. A tile adjacent to the blank space can slide into the space. The object is to
reach the configuration shown on the right of the figure. One important trick is to notice that rather than use
operators such as "move the 3 tile into the blank space," it is more sensible to have operators such as "the blank
space changes places with the tile to its left." This is because there are fewer of the latter kind of operator. This
leads us to the following formulation:
 States: a state description specifies the location of each of the eight tiles in one of the nine squares. For
efficiency, it is useful to include the location of the blank.
 Operators: blank moves left, right, up, or down.
 Goal test: state matches the goal configuration shown in Figure.
Path cost: each step costs 1, so the path cost is just the length of the path. The 8-puzzle belongs to the family of
sliding-block puzzles. This general class is known to be NP-complete, so one does not expect to find methods

SOLUTION (12)
ARTIFICIAL INTELLIGENCE VISUE
significantly better than the search algorithms described in this chapter and the next. The 8-puzzle and its larger
cousin, the 15-puzzle, are the standard test problems for new search algorithms in Al.

The Missionaries and the Cannibals: The missionaries and cannibals problem is usually stated as follows.
Three missionaries and three cannibals are on one side of a river, along with a boat that can hold one or two
people. Find a way to get everyone to the other side, without ever leaving a group of missionaries in one place
outnumbered by the cannibals in that place.
To formalize the problem, the first step is to forget about the rain, the crocodiles, and all the other details
that have no bearing in the solution. The next step is to decide what the right operator set is. We know that the
operators will involve taking one or two people across the river in the boat, but we have to decide if we need a
state to represent the time when they are in the boat, or just when they get to the other side. Because the boat
holds only two people, no "outnumbering" can occur in it; hence, only the endpoints of the crossing are
important. Next, we need to abstract over the individuals. Surely, each of the six is a unique human being, but
for the purposes of the solution, when it comes time for a cannibal to get into the boat, it does not matter if it is
Alice, Bob, or Charles. Any permutation of the three missionaries or the three cannibals leads to the same
outcome. These considerations lead to the following formal definition of the problem:
 States: a state consists of an ordered sequence of three numbers representing the number of missionaries,
cannibals, and boats on the bank of the river from which they started. Thus, the start state is (3, 3, 1).
 Operators: from each state the possible operators are to take one missionary, one cannibal, two
missionaries, two cannibals, or one of each across in the boat. Thus, there! Are at most five operators, although
most states have fewer because it is necessary to avoid j illegal states? Note that if we had chosen to distinguish
between individual people then j there would be 27 operators instead of just 5.
 Goal test: reached state (0, 0, 0).
 Path cost: number of crossings.
Robot navigation: Robot navigation is a generalization of the route-finding problem described earlier. Rather
than a discrete set of routes, a robot can move in a continuous space with (in principle) an infinite set of possible
actions and states. For a simple, circular robot moving on a flat surface, the space is essentially two-
dimensional. When the robot has arms and legs that must also be controlled, the search space becomes many-
dimensional. Advanced techniques are required just to make the search space finite. We examine some of these
methods in Chapter 25. In addition to the complexity of the problem, real robots must also deal with errors in
their sensor readings and motor controls.
The traveling salesperson problem (TSP) is a famous touring problem in which each city must be visited
exactly once. The aim is to find the shortest tour. The problem is NP-hard (Karp, 1972), but an enormous
amount of effort has been expended to improve the capabilities of TSP algorithms. In addition to planning trips
for traveling salespersons, these algorithms have been used for tasks such as planning movements of automatic
circuit board drills.
Here we will consider the monkey-and-bananas problem, in which there is a monkey in a room with some
bananas hanging out of reach from the ceiling, but a box is available that will enable the monkey to reach the
bananas if he climbs on it. Initially, the monkey is at A, the bananas at B, and the box at C. The monkey and box
have height Low, but if the monkey climbs onto the box he will have height High, the same as the bananas. The
actions available to the monkey include Go from one place to another, Push an object from one place to another,
Climb onto an object, and Grasp an object. Grasping results in holding the object if the monkey and object are
in the same place at the same height.

SOLUTION (13)
ARTIFICIAL INTELLIGENCE VISUE
Tower of Hanoi: Somewhere near Hanoi, there is a monastery whose monks devote, their lives to a very
important task. In their courtyard there are three tail posts. On these posts is a set of sixty-four disks, each with a
hole in a center and each of a different radius. When the monastery was established, all of the disks where on
one of the posts, each disk is resting on one that just larger than it.
The monk‘s task is to move all of the disks to one of the other posts only one disk may be moved
at a time and cut the other disk must be on one of the posts. In addition, at no time during the process may a disk
be placed on the top of smaller disk. The third post can of course be used as a temporary resting place for the
disks what is the quickest way for the monks to accomplish their mission?
Tic-Tac-Toe: The program of tic-tac-toe in this increase in:
 . Their complexity
 Their use of generalizations
 The clarity of their knowledge
 The extensibility of their approach.
Here the nine element vector representing the board. An element contains the value, if squirt is blank.
As discuss all other problem regarding to their categories they are given as 8 puzzle problem satisfy two
problem characteristics:
1) ―Can solution steps be ignored or undone?‖
2) ―Is the universe predictable?‖
Travelling salesman problem satisfy this characteristics:
1) ―Is a good solution absolute or relative?‖
As we discuss the problem towards the water jug problem which satisfies this characteristic:
1) ―Is a good solution absolute or relative?‖
Theorem proving problem: The problem of theorem proving satisfy the following characteristics:
1) ―Can solution steps be ignored or undone?‖
2) ―Does the task require interaction with person?‖

Q.15 Explain the issue in design of search program.


Ans. There should be several issue arise for the design of search program that can be given in the following
points which are described below as:
 The duration in which to conduct the search we can search forward the state space from the start state to
a goal state or we can search backward from the goal state to the start state.
 How to select applicable rules. Production systems typically spend most of their time looking for rules to
apply. So it is critical to have efficient procedures for matching rules against states.
 How to represent each node of the search process for the problem like chess, a node can be fully
represented by a simple array. In more, complex problem solving however it is inefficient and/or impossible to
represent all of the facts in the world and to determine all of the side effects an action may have.

Q.16 Explain the state space.


Ans. State Space: We short problem ―play if chess‖. Although there are a lot of people to whom we could say
that and reasonably expect that they will do as we intended, as our requests now stands it is a very incomplete
statements of the problem we want solved.
To build the program that could ―play chess‖. We asked first have to specify the starting position of the
chess board. The rules that define a legal moves and the one side or the other. We must make a explicit the
previous implicit goal of not only playing a legal game of the chess but winning the game if possible.
If we write rules like one above we have to write a very large number of them. Since there has to be a
separate rules for each of the roughly 10 120 possible board positions.
We have just defined the problem of playing chess as a problem of moving around in a state space,
where each state corresponds to a legal position of a board. We can then play chess by starting at an initial state,
using a set of rules to move from one state to another, and attempting to end up in one of a set of final states.
Here we have a start state given as below and the goal state as:

2 8 3 1 2 3
1 6 4 8 4
7 5 7 6 5

In first step we have a simple move 6 downwards. In second one there should be a step in which 8
moves downwards which are given as below:

SOLUTION (14)
ARTIFICIAL INTELLIGENCE VISUE

2 8 3 2 ↓ 3 → 2 3
1 ↓ 4 1 8 4 1 8 4
7 6 5 7 6 5 7 6 5

Step 1(start state) Step 2 Step 3

1 2 3 1 2 3
↑ 8 4 8 4
7 6 5 7 6 5

Step 4 Step 5(goal state)


 The next step contains the moves that of 2 towards the right side in step 3.
 After that in next it should be move 1 to the upwards.
 In fifth step move 8 to the left side.
This is the state space representation of the 8 puzzle. It may possible that it continue another
solution which is different from this.

Q.17 Explain the role of knowledge.


Ans. Role of knowledge:
Chess: Knowledge required is very little (a set of rules for legal moves, a control mechanism that implements an
appropriate search procedure, knowledge of good tactics by a perfect program.
Newspaper: Now consider the problem of scanning daily newspaper to decide which are supporting the
democrats and which are supporting the republicans in some upcoming election. Again assuming unlimited
computing power, how much knowledge would be required by a computer trying to solve this problem? This
time the answer is a great deal.
 The names of the candidates in each party.
 The fact that if the major thing you want to see done is has taxes lowered, you are probably supporting
republicans.
 The fact that if the major thing you want to see done is improved education for minority students, you
are probably supporting the democrats.
 The fact that if you opposed to big government you are probably supporting the republican. And so on.
These two problems chess and newspaper story understanding, illustrate the difference between the problems
for which a lot of knowledge is important only to constrain the search for solution and those for which a lot of
knowledge is required even to be able to recognize a solution.

Q.18 Explain the term “heuristic search and heuristic function”.


Ans. Heuristic Search: A heuristic is a technique that improves efficiency of a search process, possibly by
sacrificing claims that, improves the completeness.
Heuristics are like for guides. They are good to the extent that they point in generally interesting
directions. They are bad to extent that they may miss point of interest to particular individuals. Some heuristics
help to guide a search process without sacrificing any claims to completeness that the process might previously
had.
Heuristic Function: ―A heuristic function is a function that maps from problem state descriptions to
measures of desirability usually represented as numbers.‖
Sometime very simple heuristic functions can provide a very good estimate of whether a path is any
good or not. Some times a very high value of a heuristic function indicates a relatively good position, while at
other times a few values indicate an advantageous situation.
The purpose of the heuristic function is to guide the search process, in the most profitable direction by
suggesting which path to follow first when more than one path is available. The more accurately the heuristic
function estimates the true merit of each node in the search tree. The more direct the solution process some
heuristic functions are chess, TCP, Tic-Tac-Toe etc.

SOLUTION (15)
ARTIFICIAL INTELLIGENCE VISUE

Q.19 Explain the term “heuristic technique”.


Ans. Heuristic Search Techniques: In informed or directed search some information about the problem
space is used to compute a preference among the children for exploration and expansion.
The process of searching can be drastically reduced by the use of heuristics. Heuristic is a technique that
improves the efficiency of search process. Heuristic are approximations used to minimize the searching process.
Generally two categories of problems are used in heuristics.
1. Problems for which know exact algorithms are known & one need to find an appropriate & satisfying the
solution for example computer vision. Speech recognition.
2. Problems for which exact solutions are known like rebuke cubes & chess. The following algorithms make use
of heuristic evolution
 Generate & test
 Hill climbing
 Best first search
 A* Algorithm
 AO* Algorithm
 Constraint satisfaction
 Means- ends analysis.

Q.20 Explain the BFS technique with its advantages.


Ans. One simple search strategy is a breadth-first search. In this strategy, the root node is expanded
first, and then all the nodes generated by the root node are expanded next, and then their successors, and so on.
In general, all the nodes at depth d in the search tree are expanded before the nodes at depth d + 1. Breadth-first
search can be implemented by calling the GENERAL-SEARCH algorithm with a queuing function that puts the
newly generated states at the end of the queue,
Breadth-first search is a very systematic strategy because it considers all the paths of length 1
first, then all those of length 2, and so on. Figure 3.11 shows the progress of the search on a simple binary tree.
If there is a solution, breadth-first search is guaranteed to find it, and if there are several solutions, breadth-first
search will always find the shallowest goal state first. In terms of the four criteria, breadth-first search is
complete, and it is optimal provided the path cost is a nondecreasing function of the depth of the node. (This
condition is usually satisfied only when all operators have the same cost. For the general case, see the next

section.)
Algorithm:
 Create a variable called NODE-LIST and set it to the initial state.
 Until a goal state s found or NODE is empty do:
o Remove the first element from NODE-LIST and call it E. If NODE-LIST was empty quit.
o For each way that each rule can match the state described in E do:
 Apply the rule to generate a new state
 If the new state is goal state, quit and return this state.
 Otherwise, add the new state to the end of the NODE-LIST.
OR (Second) Algorithm:
Step 1. Put the initial node on a list ―START‖
Step 2. If START is empty or goal terminate the search.
Step 3. Remove the first node from the Start and call this node ―a‖
Step 4. If a =‖GOAL‖ terminate search with success.
Step 5. Else if node ―a‖ has successors generate all of them and add them at the tail of ―START‖
Step 6. Go to step 2.
Advantages:

SOLUTION (16)
ARTIFICIAL INTELLIGENCE VISUE
1. BFS will not get trapped exploring a blind alley.
2. If there is a solution then BFS is guaranteed to find it.
3. The amount of time needed to generate all the nodes is considerable because of the time complexity.
4. Memory constraint is also a major problem because of the space complexity.
5. The searching process remembers all unwanted nodes, which are not practical use for the search process.
Q.21 Explain the DFS technique with its advantages.
Ans. Depth-first search always expands one of the nodes at the deepest level of the tree. Only when
the search hits a dead end (a nongoal node with no expansion) does the search go back and expand nodes at
shallower levels. This strategy can be implemented by GENERAL-SEARCH with a queuing function that
always puts the newly generated states at the front of the queue. Because the expanded node was the deepest, its
successors will be even deeper and are therefore now the deepest. The progress of the search is illustrated in the
given figure that will show this as it is given below.
Depth-first search has very modest memory requirements. As the figure shows, it needs to store only a single
path from the root to a leaf node, along with the remaining unexpanded sibling nodes for each node on the path.

This is a very simple type of brute force searching techniques. The search begins by expanding the initial node
i.e. by using an operator generate all successors of the initial node and test them. This procedure finds whether
the goal can be reached or not but the path it has to follow has not been mentioned. Diving downward into a tree
as quickly as possible performs DFS searches.
Algorithm:
 If the initial state is a goal state, quit and return success.
 Otherwise, do the following until success or failure is signaled:
o Generate a successor, E, of the initial state. If there are no more successors, signal failure.
o Call Depth-First-Search with E as the initial state.
o If success is returned, signal success otherwise continue in this loop.
Or (Second) Algorithm:

SOLUTION (17)
ARTIFICIAL INTELLIGENCE VISUE
Step1: Put the initial node on a list START.
Step2: If START is empty or START = GOAL terminates search.
Step3: Remove the first node from START. Call this node a.
Step4: If (a= GOAL) terminates search with success.
Step5: Else if node a has successors, generate all of them and add them at the beginning Of START.
Step6: Go to Step 2.

The major draw back of the DFS is the determination of the depth citric with the search has to proceed
this depth is called cut of depth. The value of cutoff depth is essential because the search will go on and on. If
the cutoff depth is smaller solution may not be found. And if cutoff depth is large time complexity will be more.

Advantages:
 DFS requires less memory since only the nodes on the current path are stored.
 By chance DFS may find a solution with out examining much of the search space at all.

Q.22 Explain the agenda driven algorithm.


Ans. Agenda-driven search is an improvement on the best-first search. In best-first search, only a
queue is used to record the states being evaluated or the path traversed. But in agenda-driven search the queue is
replaced by an agenda, which has a list of tasks that a system could perform. Each task in the agenda is
associated with two items: justification for the task (the reason why a task is proposed) and a rating representing
the usefulness of the task.
The tasks are generally stored in the agenda in the order of their ratings. The search process can create
new tasks or modify the rating of existing tasks. In such cases, as and when new tasks are created or ratings are
modified, they are inserted at proper places in the agenda. As AI programs become large and more complex
having a number of knowledge sources and requiring different reasoning strategies for different knowledge
sources, techniques such as agenda-driven search become very useful and handy.

Q.23 Explain the Means End Algorithm.


Ans. We have presented a collection of search strategies that can reason either forward of backward,
but for a given problem, one direction or the other must be chosen. Often, however, a mixture of the two
directions is appropriate. Such a mixed strategy would make it possible to solve the major parts of a problem
first and then go back and solve the small problems that arise in ―gluing‖ the big pieces together. A technique
known as means-ends analysis allows us to do that.
The means-ends analysis process centers on the detection of differences between the current state and
the Goal State. Once such a difference is isolated, an operator that can reduce the difference must be found. But
perhaps that operator cannot be applied to the current state. So we set up a sub problem of getting to a state in
which it can be applied. The kind of backward chaining in which operators are selected and then sub-goals are
set up to establish the preconditions of the operators is called operator sub-goaling.
Just like the other problem solving techniques we have discussed, means-end- analysis relies on a set of
rules that can transform one problem state into another. These rules are usually not represented as a left side that
describes the conditions that must be met for the rule to be applicable (these conditions are called the rule‘s
preconditions) and a right side that describes those aspects of the problem state that will be changed by the
application of the rule.

Algorithm:

 Compare CURRENT to GOAL. If there are no differences between them then return.
 Otherwise, select the most important difference and reduce it by doing the following until success or
failure is signaled.
o Select an as yet untried operator 0 that is applicable to the current difference. If there are no such
operators, they signal failure.
o Attempt to apply 0 to CURRENT. Generate descriptions of two states: 0-START, a state in
which 0‘s preconditions are satisfied and 0-RESULT, the state that would result if 0 was applied in 0-START.
o If (FIRST-PART  MEW (CURRENT, 0-START)) and
(LAST-PART  MEA (0-RESULT, GOAL)) are success and return the result of concatenating
FIRST PART, 0, and LAST-PART.

SOLUTION (18)
ARTIFICIAL INTELLIGENCE VISUE
Ex: Initial state: ((R & (~P  Q) &S)) Goal State: (((Q V P) & R) & ~ S)

Q.24 Explain Simulated Annealing.


Ans. Instead of starting again randomly when stuck on a local maximum, we could allow the search to
take some downhill steps to escape the local maximum. This is roughly the idea of simulated annealing (Figure).
The innermost loop of simulated annealing is quite similar to hill climbing. Instead of picking the best move,
however, it picks a random move. If the move actually improves the situation, it is always executed. Otherwise,
the algorithm makes the move with some probability less than 1. The probability decreases exponentially with
the "badness" of the move—the amount AE by which the evaluation is worsened.
A second parameter is also used to determine the probability. At higher values of T, "bad" moves are
more likely to be allowed. As T tends to zero, they become more and more unlikely, until the algorithm behaves
more or less like hill-climbing. The schedule input determines the value of T as a function of how many cycles
already have been completed.
The reader by now may have guessed that the name "simulated annealing" and the parameter names A£ and T
were chosen for a good reason. The algorithm was developed from an explicit analogy with annealing—the
process of gradually cooling a liquid until it freezes. The VALUE function corresponds to the total energy of the
atoms in the material, and T corresponds to the temperature. The schedule determines the rate at which the
temperature is lowered. Individual moves in the state space correspond to random fluctuations due to thermal
noise. One can prove that if the temperature is lowered sufficiently slowly, the material will attain a lowest-
energy (perfectly ordered) configuration. This corresponds to the statement that if schedule lowers T slowly
enough, the algorithm will, find a global optimum.
Simulated annealing was first used extensively to solve VLSI layout problems in the early 1980s. Since
then, it has been applied widely to factory scheduling and other large-scale optimization tasks.

SOLUTION (19)
ARTIFICIAL INTELLIGENCE VISUE

There is another representation of this algorithm which is given in the following points:
 Evaluate the initial state. If it is also a goal state, then return it and quit. Otherwise continue with the
initial state as the current state.
 Initialize BEST-SO-FAR to the current state.
 Initialize T according to the annealing schedule.
 Loop until a solution is found or until there are no new operators left to be applied to the current state.
o Select an operator that has not yet been applied to the current state and apply it to procedure new
state.
o Evaluate the new state. Compute
∆ E = (Value of current) – (Value of new state)
 If the new state is a goal state, then return it and quite.
 If it is not a goal state but is better then the current state, then make it the current state
with probability p‘ as defined above. This step is usually implemented by invoking a random number generator
to produce a numbers in the range [0, 1]. If that number is less than p‘, then the move is accepted otherwise do
nothing.
o Revise T as necessary according to the annealing schedule.
 Return BEST-SO-FAR as the answer.
The algorithm for the simulated annealing is only slightly different from the simple hill climbing
procedure. The three differences are given below:
 The annealing schedule must be maintained.
 Moves to worse states may be accepted.
It is a good idea to maintain, in addition to the current state, the best state found so far. Then, if the final
state is worse than that earlier state, the earlier state is still available.
Q.25 Discuss best path and any path problem.
Ans. Best path problems are harder than any path problem. Any path problems can often be solved in
a reasonable amount of time by using heuristics that suggest good paths to explore. If the heuristic are not
perfect, the search for a solution may not be as direct as possible. But that does not matter. For true best path
problems however no heuristic that could possibly miss the best solution can be used.

Q.26 Compare General Test and simple Hill Climbing algorithm.


Ans.

1. Generate and test: The Generate & test strategy is the simplest of all the approaches. The generate & test
algorithm is a depth first search procedure – since complete solutions must be generated before they can be
tested. In its most systematic form, it is simply an exhaustive search of the problem space, It is also known as
the British museum algorithm. A reference to a method for finding an object in British museums by wandering
randomly.

Algorithm
Step 1: Generate possible solutions. For some problems this means generating a particular point in the problem
space. For others it means generating a path from a start state.
Step 2: Test to see if these actually a solution by comparing the chosen point or the end point of the chosen path
of the set of acceptable good states.
Step 3: If a solution has been found, quit, otherwise, return to step 1.

2. Hill Climbing: It is a variant of generate a test in which feed back from the test in which feed back from the
test procedure is used to help the generator decide which direction to move in the search space. In a pure
generate & test procedure the test function response with only a yes or no. But if the tests function is augmented
with a heuristic function. That provides a estimate of how close given state is to a goal state. Hill climbing is
often used when a good heuristic function is available for evaluating states. But when no other useful
knowledge is available. This algorithm is also discrete optimization algorithm uses a simple heuristic function.
The amount of distance the node is from the goal node in fact there is a practically no difference between
hill climbing & DFS except that the children of the node that has been expanded are shorted by the remaining
distance nodes.

SOLUTION (20)
ARTIFICIAL INTELLIGENCE VISUE

Algorithm:
Step1: Put the initial node on a list START.
Step2: If (START is empty) or (START = GOAL) then terminate the search.
Step3: Remove the first node form the start; call this node ‗a‖.
Step4: If (a = GOAL) terminate search with success.
Step5: ELSE if n ode ―a‖ has successors generate all of them. Find out how form they are from the goal node.
Sort them by the remaining distance from the goal and add them to beginning of the start.
Step6: Go to step 2.

Q.27 Compare BFS and DFS.


Ans.
BFS DFS
1. Best First Search 1. Depth First Search

2. It explore level by level 1 st level completes It explore by depth of node. It takes last level’s
all possibilities then go to next level. last node first and then search.
3. We can expand the chosen node by using 3. We can not fence each node in DFS, until
rules to generate successor. If one of them is depth is not complete and process quits at last
solution then quit process. when solution found at any depth.
4. In each node we can apply the heuristic 4. We can not apply heuristic function at each
function. node.
5. With this first search we get the solution 5. Solution is at largest level.
at shortest level.
6. Require more memory and search space 6. Require less memory and search space.

Q.28 Explain the knowledge representation.


Ans. Knowledge is an intellectual acquaintance with, or perception of, fact or truth. A representation is
a way of describing certain fragments or information so that any reasoning system can easily adopt it for
interfacing purpose. Knowledge representation is a study of ways of how knowledge is actually picturised and
how effectively it resembles the representation of knowledge in human brain.
A knowledge representation system should provide ways of representing complex knowledge and should
possess the following characteristics.

SOLUTION (21)
ARTIFICIAL INTELLIGENCE VISUE
 The representation scheme should have a set of well-defined syntax and semantics. This help in
representing various kinds of knowledge.
 The knowledge representation scheme should have a good expression capacity. A good expressive
capability will catalyze the inference mechanism in its reasoning process.
 From the computer system point of view, the representation must be efficient. By this we mean that it
should use only limited resources with out compromising on the expressive power.

Q.29 Explain the resolution with an example.


Ans. Resolution: Robinson in 1965 introduced the resolution principle, which can be directly applied to any
set of clauses. The principle is " Given any two clauses A, B if there is a literal p1 in A which has a
complementing literal p2 in B, delete p1 ,p2 from A,B and strut a disjunction of the remaining clauses .the
clause so constructed is called the resolving of A,B .
Resolution in propositional logic:

The resolution procedure is a simple iterative process. At each step two clauses, called the parent clause
are compared (resolved) yielding a new clause that has been inferred from them. The new clause represents
ways that the 2 parent‘s clauses interact with each other.
Resolution work on the principle of identity complementary literals in 2 clauses and deleting them there
by forming a new literal. The process is simple and straight forward when one has identical literals . In other
words for clauses containing no variables resolution is easy. When there are variables the problem becomes
complicated and the necessities one to make proper substitutions.
There are 3 major types of substitutions
 Substitution of a variable by a constant.
 Substitution of a variable by another variable.
 Substitution of a variable by a function that does not contain the same variable.
Algorithm:
 Convert all the statements of F to clause form.
 Negate P and convert the result to clause form. Add it to the set of clauses obtained in 1.
 Repeat until a contradiction is found, no progress can be made, or a predetermined amount of effort has
been expended.
o Select 2 clauses. Call these the parent clauses.
o Resolve them together. The resolving will be the disjunction of all the literals of both parent
clauses with appropriate substitution performed & with the following exception. If there is 1 pair of literals T1,
T2 such that one of the parent clause contains T1 and the other contains T2 and if T1,T2 are unifiable then
neither T1,T2 should appear in the resolving. We call T1, T2 complementary literals. use the substitution
produced by the unification top create the resolving if there is more than 1 pair of complementary literals, only
pair should be omitted from the resolvent.
o If the resolvent is the empty clause, then a contradiction has been found. If it is not, then add it to
the set of clauses available to the procedure.

SOLUTION (22)
ARTIFICIAL INTELLIGENCE VISUE

Q.30 Explain the predicate logic by the example.


Ans. Predicate Logic: Predicates: predicate symbol denotes relations or functional mappings from the
elements of a domain D to the values true or false. Capital letters and capitalized words are used to represent the
predicates. Constants, variables and functions are referred to as terms and predicates are referred to as atomic
formulas or atoms. Symbols left and right parenthesis, square brackets braces and the periods are used for
punctuation in Symbolic expressions. Ex:1. All employees earning $1400 or more per year pay taxes. For all x
(E(x) & GE (i(x), 1400)) ->T(x)) 2.some employees are sick today. There exists (E(y) ->delta(y)).

Example in Predicate logic: Suppose we know that ―all Romans who know marcus either hate Caesar or think
that any one who hates any one is crazy‖.

Q.31 Explain the unification algorithm.


Ans. The job of the unification routine, UNIFY, is to take two atomic sentences p and q and return a
Substitution that would make p and q look the same. (If there is no such substitution, then UNIFY should return
fail.) Formally,
UNIFY (p, q) = 6 where SuBST(0,p) = SuBST(0,#)
0 is called the unifier of the two sentences.
Unification is a procedure that compares two literals & discovers whether there exists a set of substitutions that
makes them identified.

SOLUTION (23)
ARTIFICIAL INTELLIGENCE VISUE
Any substitution that makes 2 or more expressions equal is called a unifier for the expressions. Applying a
substitution to an expression E produces an instance E' of E where E'=E. given 2 expressions are unifiable, such
as expressions c1, c2 with a unifier B with C1B=C2, we say that B is most general unifier (mgu) if any other
unifier & is an existence of B. for ex: 2 unifiers for the literals p(u, b, v) and p(a, x y) are & ={a/u, b/x, c/y} and
B={a/u, b/x, c/v, c/y}.
Unification can sometimes be applied to literals with in the same single clause. When an mgu exists such that 2
or more literals with in a clause are unified, the clause remaining after deletion of all but one of the unified
literals is called a factor of the original clause. The basic idea of unification is very simple. to attempt to unify 2
literals, we first check if their initial predicate symbols are the same, if so we can proceed otherwise there is no
way they can be unified, regardless of their arguments.
Unification has deep mathematical roots and is a useful in many AI programs. for ex: theorem proving and
natural language parser.

Algorithm:
 If l1, l2 are both variables or constants then
1. If l1, l2 are identical then return NIL.
2. Else if l1 is a variable the if l1 occurs in l2 then return {fail} , else return (l2/l1}
3. Else if l2 is a variable then if l2 occurs in l1 then return {fail} ,else return (l1/l2}.
4. Else return {fail}.
 If the initial predicate symbols in l1, l2 are not identical then return {fail}.
 If l1 , l2 have a different no. of arguments then return {fail}
 Set subset to Nil (At the end of this procedure, subset will contain all the substitutions use to unify l1 , l2.
 For i<-1 to no. of arguments in l1.
a) Call unify with the I th argument of l1 and the I th argument of l2 putting result in s.
b) If s contains fail then return {fail}.
c) If s is not equal to nil then
 Apply s to the remainder of both l1, l2
 Subset = append (s, subset).
 Return subset.

Q.32 Give various rules for unifying literals in predicates.


Ans. The job of the unification routine, UNIFY, is to take two atomic sentences p and q and return a
substitution that would make p and q look the same. (If there is no such substitution, then UNIFY should return
fail.) Formally,
UNIFY (p, q) = 6 where SuBST(0,p) = SuBST(0,#)
0 is called the unifier of the two sentences. We will illustrate unification in the context of an example,
delaying discussion of detailed algorithms until Chapter 10. Suppose we have a rule
Knows (John,x) =>• Hates(John,x)
("John hates everyone he knows") and we want to use this with the Modus Ponens inference rule to find out
whom he hates. In other words, we need to find those sentences in the knowledge base that unify with Knows
(John, x), and then apply the unifier to Hates (John, x). Let our knowledge base contain the following sentences:
Knows (John, Jane)
Knows(y, Leonid)
Knows(y, Mother(y))
Knows(x, Elizabeth)
(Remember that x and y are implicitly universally quantified.) Unifying the antecedent of the rule against each
of the sentences in the knowledge base in turn gives us:
UNlFY(Knows(John,x), Knows( John, Jane)) - {x/Jane}
UNlFY(Knows(John, x), Knows(y, Leonid)) = {x/Leonid, ylJohn}
UNiFY(Knows(John,x), Know s(y,Mother (y))) = {ylJohn,xlMother(John)}
UNlFY(Knows(John,x), Know s(x, Elizabeth)) =fail
The last unification fails because x cannot take on the value John and the value Elizabeth at the same time. But
intuitively, from the facts that John hates everyone he knows and that everyone knows Elizabeth, we should be
able to infer that John hates Elizabeth. It should not matter if the sentence in the knowledge base is Knows(x,
Elizabeth) or Knows(y, Elizabeth). One way to handle this problem is to standardize apart the two sentences
being unified, which means renaming the variables of one (or both) to avoid name clashes. After standardizing
Apart, we would have
UNlFY(Knows(John,x\), Know s(x2, Elizabeth)) = {x\ I Elizabeth, x2l John}

SOLUTION (24)
ARTIFICIAL INTELLIGENCE VISUE
The renaming is valid because Vx Knows(x, Elizabeth) and Vx2 Knows(x2, Elizabeth) have the same
meaning.
There is one more complication: we said that UNIFY should return a substitution that makes the two
arguments look the same. But if there is one such substitution, then there are an infinite number:
UNlFY(Knows(John,x), Knows(y, z)) = {y/John,x/z}
or {ylJohn,xlz,wlFreda}
or {y/John,xlJohn, zlJohn]
or • • •
Thus, we insist that UNIFY returns the most general unifier (or MGU), which is the substitution that makes the
least commitment about the bindings of the variables. In this case it is {y/john, x/z}.

Q.33 Explain the proposition logic.


Ans. Propositional logic: This is the simplest form of logic. Here all statements made are called
propositions. A proposition in propositional logic takes only two values, i.e. either the proposition is True or it is
False.
Ex : Rubber is a good conductor of electricity. (False)
Diamond is a hard material. (True)
There are two kinds of propositions. They are atomic propositions (also called simple propositions) and
molecule propositions (also called compound propositions). Combining one or more atomic propositions using a
set of logical connective forms molecular propositions.
Ex: ―Baskar is a golfer‖ is an atomic proposition.
―Baskar is a golfer and Ravi is not a doctor‖ is a molecular proposition because it is formed from two atomic
propositions connected by the logical connectives AND and NOT. Molecular propositions are much more useful
than atomic propositions because real world problems involve more of molecular propositions. Syntax of
propositional logic:

Q.34 Limitation of logic as acknowledge representation scheme:.


Ans.
1. Logic and theorem proving techniques are monotonic in nature. The derived axioms hold good
under all circumstances. Real world is never monotonic for information obtained is seldom complete.
2. Logic does not provide facilities for handling uncertainty. Every information it deals has to
either correct or incorrect but never partially.
3. Codification of the problem in logic is a tough task and requires considerable effort on the part
of the user.
4. Even though various techniques do exist for speeding resolution, it takes considerable amount
of time to prove statements in logic.
5. One major constraint in logic is that unless you are sure that a solution exists, the search will
not terminate. We will be going on adding clause after but the solution will be still elusive.

Q.35 Explain the Forward v/s Backward Reasoning.


Ans. The object of a search procedure is to discover a path through a problem space from an initial
configuration to a goal state. There are actually two directions in which such a search could proceed.
Forward, from the start states
Backward, from the goal states.
The production system model of the search process provides an easy way of viewing forward and backward
reasoning as systematic processes.

SOLUTION (25)
ARTIFICIAL INTELLIGENCE VISUE
Forward reasoning from initial states:
1. Root: A tree of move sequences, that might be solutions, is built by starting with the initial configuration at
the root of the tree.
2. Generate of the next level: The next level of the tree is generated by building a tree by finding all the rules
whose left sides are matched against the current state (root node) and the right sides are to generate new nodes
by creating new configuration.
Generate next level by taking each node generated at the previous level and continue the above reasoning
forward till a configuration matches the goal state.
Back ward reasoning from the goal states:
1. Root: A tree of move sequences, that might be solutions, is built by starting with the goal configuration at the
root of the tree.
2. Generate the next level: The next level of the tree is generated by finding all the rules whose right sides match
the root node. The left sides are used to use to generate the new nodes, representing new goal states to achieve.
Generate the next level of the tree by taking each node at the previous level and continuing the above reasoning
until a node that matches the initial state is generated. It is often called goal-directed reasoning.
It does not make much difference whether we reason forward or backward, about the same number of
paths will be explored in either case. But this is not always true. Depending on the topology of the problem
space, if may be significantly more efficient to search in one direction rather than the other. Four factors
influence the question of whether it is better to reason forward or backward.
(1) Are there more possible start states or goal states?
Count the number of start states of goal states. Move from the smaller set of states to larger set of states.
(2) In which direction is the branching factor greater?
Find the direction in which the branching facto is low and proceed in that direction.
(3) Will the program be asked to justify its reasoning process to a user?
If the program is asked to justify its reasoning process then proceed in the direction that corresponds more
closely with the way the user think.
(4) If it is the arrival of a new fact, forward reasoning makes sense. If it is a Query to which a response is
desired, backward reasoning is more natural.
Example:
1. To solve the problem of symbolic integration, it is better to reason forward.
2. For the problem of proving theorems, is would be much better to reason backward.

Q.36 Explain the Forward and backward chaining rule system.


Ans.
Forward rules, which encode knowledge about how to respond to certain input configurations. Backward
rules, which encode knowledge about how to achieve particular goals. Forward and backward chaining rule
systems:
Forward-chaining rule system:
1. Instead of starting from the goal state, we start the search by incoming data.
2. In this, left sides of rules are matched against the state description.
3. If they match, we apply if and a new state generated will be represented at the right side. This process repeats
until the goal state is reached.
4. Matching is more complex than backward ones.
Backward-chaining rule system:
1. In this, we start the search from the goal state as an initial state and make a move to the state we want.
2. The number of state computed to generate are said to be chain of links.
3. If one state, in the path is removed the entire path will be collapsed.
PROLOG is an example of backward – chaining system.

We can also search both forward from the start state and backward from the goal simultaneously until
two paths meet some where in between. This strategy is called bidirectional search. It seems appealing if the
number of nodes at each step grows exponentially with the number of steps that have been taken. In fact, many
successful AI applications have been written using a combination of forward and backward reasoning and most
AI programming environments provide explicit support for such hybride reasoning.

SOLUTION (26)
ARTIFICIAL INTELLIGENCE VISUE

A monotonic reasoning system cannot work effectively in real life environments because Information available
is always incomplete. As process goes by situation change and so are the solutions. Default assumptions are
made in order to reduce the search time and for quick arrival of solutions. Basic concepts of non-monotonic
reasoning systems:
AI systems provide solutions for those problems whose facts and rules of inference are explicitly stored in the
database and knowledge base. But as mentioned above the data and knowledge are incomplete in nature and
generally default assumptions are made. Non-monotonic reasoning systems are more complex then monotonic
reasoning systems. Monotonic reasoning systems generally do not provide facilities for altering facts, deleting
rules it will have an adverse effect on the reasoning process. One of major systems that has been implemented
using non-monotonic reasoning system with dependency. Directed back tracking is the Truth maintenance
system of Doyle. Dependency -directed back tracking helps to great deal in nom monotonic reasoning systems.
A monotonic system evades contradictions .a contradiction occurs when the system finds that the new state
discovered is inconsistent with the existing ones.

Q.37 Explain the Fuzzy Logic.


Ans.
Fuzzy logic: fuzzy logic was introduced to generalize and extent the expressiveness of traditional logics. Fuzzy
logic is based on fuzzy set theory, which permits partial set membership. Lofti azadeh of university of
California, Berkeley first introduced fuzzy sets in 1965.his objectives were to generalize the notions of a set and
positions to accommodate the type of fuzziness or vagueness. Since its introduction in 1965, much research has
been conducted in fuzzy set theory and logic. As a possibility distributions fuzzy static‘s, fuzzy random
variables and fuzzy set functions. Fuzzy predicates such small, large, young, safe, and much large than seen.
Fuzzy quantifier such as most, means, few, several often usually. Fuzzy probabilities expressed as quite
possible. Almost impossible.
Fuzzy truth values such as very, quite, extremely, somewhat, and slightly. Fuzzy sets associated with the ability
to use linguistic variables. Linguistic variables provide a link between a natural quantification such as fuzzy
propositions. A linguistics variable is a variable that assumes a value consisting of words or sentences rather
than numbers.
A formula, more elegant def. Of linguistic variable is one, which is based on language theory concepts for this;
we define a linguistic variable as the quintuple. (x,T(x),U,G,M) Where as x is the name of variable (AGE) T(x)
is the terminal set of x (very young, young, not young, not old) U is the universe of the discourse (years of life)
G is a set of syntactic rules, the grammar that generates the values of x and M is semantic rule, which associates
each value of x with its meaning M (x), a fuzzy subset of U.

Q.38 Explain the Matching.


Ans. Matching is a basic function that is required in almost all A.I programs. It is an essential part of
more complex operations such as search and control. In many programs it is known that matching consumes a
large fraction of the processing time.
Matching is the process of comparing two or more structures to discover their likeness or differences. The
structures may represent a wide range of objects including physical entities, words or phrases in some language,
complete classes of things, general concepts, relations between complex entities and the like. The
representations will be given in one or more of the formalisms like FOPL, networks or some other scheme and
matching will involve comparing the component parts of such structures.
Matching is used in a variety of programs for different reasons. It may serve to control the sequence of
operations, to identify or classify objects, to determine the best of a number of different alternatives or to
retrieve items from a database. It is an essential operation in such diverse programs as speech recognition,

SOLUTION (27)
ARTIFICIAL INTELLIGENCE VISUE
natural language understanding, vision, learning, automated reasoning, planning, automatic programming and
expert system as well as many others.
Matching is just process of comparing two structures or patterns for equality. The match fails if the
patterns differ in any aspect.
Different types of matching are:
(1). Indexing
(2). Matching with variables.
(3). Complex and Approximate Matching
(4). Conflict resolution.

Q.39 Explain the Matching types.


Ans.
(i) Indexing: Incase of indexing we use the current state as an index into the rules in order to select the
matching ones. Consider chess. Here we assign a number to each board position. Then we use a hosting function
to treat the number as an index into the rules.
(ii) Matching with variables: In this case we try to match many rules against many elements in the state
description simultaneously. One efficient algorithm is RETE, which gains efficiency from 3 major sources these
sources are:
(b) The temporal natural of the date. Any rule should into make changes radically but must add one or
two elements, or delete one or two.
(c) Structural similarity in rules. There may be a situation where some rules may or two conditions other
conditions being the same.
For Example:
 Son (x, y) ^ son (y, z) -> grandparent (x, z)
 Son (Mary, Joe)
 Son (Bill, Bob)
Here the rules (ii) & (iii) can be matched but must satisfy the values of y.
(iii) Complex & Approximate Matching: An approximate matching is one, which is used when the
preconditions approximately match the current situation.
(iv) Conflict Resolution: Conflict Resolution is a strategy in which we incorporate the decision making into the
matching process. We have three basic approaches.

(a) Preference based on Rules.


(b) Preference based on Objects.
(c) Preference based on states.

(a) Preference Based on Rules: Here we consider the rules in the order they are given or we give some priority
to special case rules. There are two ways in which a matcher will try to decide how one rule is more general
than the others. This allows us in decreasing the search size by more general rules. The two ways are:
1. If one rule contains all the preconditions that another rule has and some additional then Second rule is more
general they the first.
2. If one rule contains preconditions with variables and the other contains the same. A precondition with
constants then the first rule is more general.

(b) Preference based on Object: Here we use keywords to match into the rules consider the example of ELIZA.
It takes specific keywords form the user‘s response and tries to match the keywords with the given rules. Like
previously it uses the ―remember‖ keyword to match the L.H.S. rule.

(c) Preference Based on States: In this case we fire all the rules that are waiting they lead us to some states.
Using a heuristic function we can decide which state is the best.

Q.40 Give intro the PROLOG.


Ans. The name PROLOG was taken from the phrase ―PROgramming in LOGic‖ .The language was
originally developed in 1972 by Alain Colmerouer and P.Roussel at the university of Marseilles in France.
Prolog is unique in its ability to infer facts and conclusions form other facts.
The main part of a prolog program consists of a collection of knowledge about a specific subject. This
collection is called a database and this database is expressed in facts and rules.
Turbo prolog permits you to describe facts as symbolic relationships.

SOLUTION (28)
ARTIFICIAL INTELLIGENCE VISUE
A turbo prolog program consists of 2 or more sections. The main body of the program, the clause section
contains the clause and consists of facts and rules. The relationships used in the clauses of the clause section are
defined in the predicate section. Each relation in each clause must have a corresponding predicate definition in
the predicates section predicate definition in the pre dicta section does not end with a period. The domains
section also is apart of most turbo prolog programs .If defines the type of each object. The domain section turbo
prolog controls the typing of object.
6 basic object types are available to the user.
 Character.
 Integer.
 Real.
 String.
 Symbol
 File.
Character – single character (enclosed between single quotation marks)
Integer - integer from -32768 to 32767
Real - floating point number (lE-307 to 1E-308)
String – character sequence (enclosed between double quotation marks)
Symbol- character sequences of letters numbers and under series with the first character a lower case letter
File - symbolic file name.
In a turbo prolog program the sections should always be in the following.
1. Domains. 2. Predicates 3. Clauses.
Q.41 Give Reasons: Prolog has been successful as an AI programming language.
Ans. Prolog has been successful as an AI programming language for the following reasons:
1. The syntax and semantics of prolog are very close to formal logic. By this time, it must be clear to you
that most AI program reason using logic.
2. Prolog language has in it a built in inference engine and automatic backtracking facility. This helps in
efficient implementation of various search strategies.
3. This language has high productivity and easy of program maintenance.
4. Prolog language is based on the universal formalism of Horn Clause.
5. Because of the inherent AND parallelism, prolog language can be implemented with ease on parallel
machines.
6. The clauses of prolog have a procedural and declarative meaning. Because of this understanding of the
language is easier.
7. In prolog, each clause can be executed separately as though it is a separate program. Hence modular
programming and testing is possible.
Horn clause consists of a set of statements joined by logical Ands

Q.42 Explain the concept of backtracking and variables in prolog.


Ans. A variable name must begin with a capital letter and may be from 1 to 250 characters long.
Except for the first character in the name you may use uppercase or lower case letters, digits the under line
character. Names should be meaningful.
Bound & free variables: If a variable has a value at a particular time it is said to be bound or instantiated .If a
variable does not have a value at a particular time is said to be free or uninstantiated.
Anonymous variables: The anonymous variable stands for all values while in a goal it is satisfied if at least one
value corresponds to it.
Backtracking: One of the most important principles of prolog execution is backtracking. The solution of the
compound goal proceeds from left to right. If any condition in the chain fails, prolog back tracking to the
previous condition tries to prove it again to see if the failed condition will succeed with the new binding. Prolog
moves relentlessly forward and backward through the conditions, trying every available binding in an attempt to
get the goal to succeed in as many as possible.

Q.43 Explain the input output operators.


Ans. Input & Output operators:
Turbo prolog has 3 output predicates.
Write.
Write device.
Write f.

SOLUTION (29)
ARTIFICIAL INTELLIGENCE VISUE

The write predicate:


Go:-hypothesis (patient, disease),write(patient, ‖probably has ―,‖disease‖,.‖),n1.
The write predicate displays the values of these variables in English like sentence.
Write device: Any O/P to the display can be directed instead to a printer or a file .to redirect O/P uses the write
device built-in predicate.
Write device (print)
Write (―this will on the printer‖)
Write device (screen)
Writef predicate:
Some times you may wish to format o/p for ex: you may want the decimal points in a table to be aligned with
turbo prolog, you can use the Writef built in predicate to force alignment of numbers a text.
Writef (format E1, E2…En)
The variable format is a control code of the type.
Turbo prolog provides several built in I/P predicates:
Readln string or symbol
Read char character
Read int integer.
Read real real
Inkey,
Key pressed
The readln predicate: The readln predicate permits a user to read any string symbol into a variable.
Ex: readln(replay)
Replay (‗‖yes‖)
Read predicate: The read car predicate permits a user to read any character in to variable.
Ex: readchar(replay)
Replay =‘y‘
The read int: predicate can be used to read an integer value to a variable.
Ex: read int (Age)
Read real: The read real predicate can be used to read floating point numbers into a variable.
Ex: read real (price)
Price=12.50
Inkey: The inkey predicate reads a single character from the I/p the predicate form is inkey (char) If there is no
i/p the predicate fails. Otherwise the character is returned bound to the char.
Key pressed: key pressed predicate to determine whether has been pressed with out a character being returned.

Q.44 Explain Fail Predicate and Cut Predicate OR


Q.44 Explain the controlling execution predicates.
Ans. Fail Predicate: In prolog, forcing a rule to fail under certain conditions is a type of control and is
essential to goal programming. Failure can be the forced In any rule by using the built in fail predicate. The fail
forces back tracking in an attempt to unify with another clauses. Whenever this predicate is invoked the goal
being proved immediately fails, and back tracking is initiated .the predicate has no arguments, so failing of the
fail predicate is not dependent on variable binding .the predicate always fails.
Ex: 1 go: -Test,
Write (―you will never get here‖)
Test: -
Fail.
Here goal: go
False
Here the write predicate will never be executed.
2. go:
Write (―you will get here‖)
Test
Test:-
Fail
Here goal: go
You will get here
False

SOLUTION (30)
ARTIFICIAL INTELLIGENCE VISUE
Cut Predicate: The cut is one of the most important and one of the most complex features of prolog. The
primary purpose of the cut is to prevent or block backtracking based on a specified condition. The cut predicate
is specified as an exclamation point. If has no argument the cut predicate succeeds and once it succeeds, it acts a
fence, effectively blocking any back tracking beyond the cut. If any premise beyond the cut fails, prolog cans
only back track as far as the cut to try another path.
The basic purpose of the cut is to eliminate certain search path is in the problem space, you can think of
the paths through the database as the limbs of a tree. If you get cut on one limb and discover failure, you
normally can move back towards the trunk, find another limb and start moving outward again the cut act like a
fence where it is placed in the program you cannot back beyond the cut.
The cut can be used for any or all of 3 purposes.
 To terminate the search for any further solutions to a goal. Once a particular rule has been tested.
 To terminate the search for any further solutions to a goal once a particular rule has been forced to fail
with the fail predicate.
 To eliminate paths in the database to speed up execution .the cut is not always the best solution.
Types of cuts: there are 2 types of cuts in prolog namely.
Green cut & red cut: the green cut is used to force binding to be retained, once the right abuse is reached green
cuts are used to express determination.
The red type of cut is used to omit explicit conditions. Cuts improve the clarity and efficiency of most programs
of the 2 types of cut, the green cut is the more acceptable type. You can often use the not predicate instead of the
red cut.
EX: state (tamlnadu)
State (kerala)
State (A.P)
State (U.P)
State (karnataka)
State (M.P)
State (S);
Write (―does u belong to‖)
Write (S)
Write (―&‖)
Readln (Reply)
Reply =‖yes‖!
Write (―so u belong to ―)
Write (S)
Output: Does u belong to tamilnadu?
No
Does u belong to kerala?
No
Does u belong to A.P?
No
Does u belong to U.P?
Yes
So u belong to U.P
Quality operator: =
Comparison operator: <, >, =, <=, >=, -, =, <>
Arithmetic operator: +, -, *, %, mod, div, + (positive),-(negative)

Q.45 Explain the Recursion.


Ans.
Recursion: Recursion is one of the prologs most important Execution control technique. If often is used with
the fail or cut predicate. Recursion is a technique in which some thing is defined in terms of itself. In prolog
recursion is the technique of using a clause to invoke copy of it-self.

Ex: If you specify the goal as count (1) you should see the following output -> 1 2 3 4 5 6 7 8 true
Contains a copy itself.
Count (~)
(Statements)
Count (NN)

SOLUTION (31)
ARTIFICIAL INTELLIGENCE VISUE
Program:
Predicates
Count (integer)
Clauses
Count (9).
Count (N): -
Write (― ―, N).
NN=N+1.
Count (NN).
Basic rules of recursion:
 A program must include some method of terminating the recursion loop.
 Variable binding in a rule of fact apply only to the current layer.
 In most applications the recursive procedure should do its work on the way down.
Recursion is not always the best programming choice. Recursion complex and the flow of execution is
not always easy to follow.

Q.46 Programs for Prolog.

SOLUTION (32)
ARTIFICIAL INTELLIGENCE VISUE

SOLUTION (33)
ARTIFICIAL INTELLIGENCE VISUE

Q.47 Explain the LISP.


Ans.

SOLUTION (34)
ARTIFICIAL INTELLIGENCE VISUE

Q.48 Explain the frame problem.


Ans. Frame problem is a problem of representing the facts that change as well as those that do not
change. For ex. consider a table with plant on it under a window. Suppose we move it to the center of the room.
Here we must infer that plant is now in the center, but the window is not. Frame axioms are used to describe all
the things that do not change when an operator is applied in state to go to another state say n+1.

This axiom says that an object x has a color y in state 1. moving x from state 1 to state 2 will not change the
color of the object x. Once a change of state occurs how we undo the changes if we need to back track the two
ways that are provided are
 Do not modify the initial state description. At each node, simply store an indication of the specific
change that should be made. In order to refer to the current state, we start from the initial state and look back all
the nodes on the path from start state to current state.
 Make the changes to the initial state as they occur but every node where a change takes place, gives
what to do to undo the move or change if we need to back track.

Q.49 Give the difference between database and knowledge base.


Ans.
Database Knowledge Base
1. Collection of data processing facts 1. Has information at higher level of
Abstraction.
2. Large volume of data and facts change 2. Significantly smaller than database and
over time. changes are gradual.
3. Operates on a single object 3. Operators on a class of objects rather than a
single object.
4. Updates are performed by clerical 4. Updates are performed by domain experts.
personnel.
5. Correctness of facts can be determined 5. Correctness in a sense is very elusive.
by comparing the data value with real world
observations.
6. All information needed to be explicitly 6. Has the power of inferencing.
stated.
7. Maintained for operational purpose. 7. Used for data analysis and planning.
8. Represented by relational or network 8. Knowledge representation is by logic or
hierarchical model rules or frames or semantic rules.
9. Predominant way of interaction is by 9. Has to have a consultation with the system
transaction programs and report and provide needed data to obtain the
generators. solution.

SOLUTION (35)
ARTIFICIAL INTELLIGENCE VISUE

Q.50 What is semantic Network? Give it at brief.


Ans. Network representations provide a means of structuring and exhibiting the structure in
knowledge. In a network, pieces of knowledge are clustered together into coherent semantic groups. Networks
also provide a more natural way to map to and from natural language than do other representation schemes.
Network representation gives a pictorial presentation of objects, their attributes and the relationships that exist
between them and other entities. These are also known as associative networks. Associative networks are
directed graph with label nodes and arcs or arrows. A semantic network or semantic net is a structure for
representing knowledge as a pattern of interconnected nodes and arcs. It is also defined as a graphical
representation of knowledge. The knowledge used in constructing a network is based on selected domain
primitives for objects and relations as well as some general primitives.
Reasoning using semantic networks: Reasoning using semantic networks is an easy task. All that has to be done
is to specify the start node. From the initial node, other nodes are pursued using the links until the final node is
reached. To answer the question ―What is the speed of the line printer? We have:
The reasoning mechanism first finds the node of line printer. It identifies the arc that has the
characteristics speed since it points to the value 300, the answer is 30.
The ‗is a‘ link structure can be easily represented using predicate logic. Road vehicle is a land vehicle.

Q.51 Construct the partitioned semantic net for the following:


Ans.
Partitioned Semantic net: Suppose we want to represent simple quantified expressions in semantic nets. One
way to do this is to partition the semantic net into a hierarchical set of spaces, each of which corresponds to the
scope of one or more variables.

SOLUTION (36)
ARTIFICIAL INTELLIGENCE VISUE

Q.52 Explain the Conceptual Graphs.


Ans.
Conceptual Graphs: A conceptual graph is a graphical portrayal of a mental perception, which consists of
basic of primitive concepts and relationships that exists between the concepts. A single conceptual graph is
roughly equivalent to a graphical diagram of a natural language sentence where the words are depicted as
concepts and relationships. Conceptual graphs may be regarded as formal building blocks for associative
networks which when linked together in a coherent way, from a more complex knowledge structure. A concept
may be individual or generic.

Conceptual graphs offer the means to represent natural language statements accurately and to perform many
forms of inference found in common sense reasoning.

Q.53 Explain the Frames.


Ans.
Frames were first introduced by Marvin Minsky (1975) and a data structure to represent a mental model
of a stereotypical situation such as driving a car, attending a meeting or eating in a restaurant. Frames are
general record like structures, which consist of a collection of slots and slot values. The slots may be of any size
and any type. Slots typically have names and any number of values. A frame can be defined as a data structure
that has slots for various objects and collection of frames consists of expectations for a given situation. A frame
structure provides facilities for describing objects, facts about situations, procedures on what to when a situation
is encountered because of these facilities a frame provides, frames are used to represent the two types of
knowledge. Declarative/factual and procedural.

SOLUTION (37)
ARTIFICIAL INTELLIGENCE VISUE

Declarative and Procedural frames: A frame that merely contains description about objects is called a
declarative type/factual/situational frame.

A part from the declarative part in a frame, it is also possible to attach slots, which explain how to
perform things. In other words it is possible to have procedural knowledge represented in a frame. Such frames
which have procedural knowledge embedded in it are called action procedure frames. The action frame has the
following slots.
1. Actor slot: which holds information about who is performing the activity?
2. Object slot: this frame information about the item to be operated on.
3. Source slot: source slot holds information from where the action has to begin.
4. Destination slot: holds information about the place where action has to end.
5. Task slot: This generates the necessary sub-frames required to perform the operation.

SOLUTION (38)
ARTIFICIAL INTELLIGENCE VISUE
The generic frame merely describes that, the expert in order to clean the nozzle of the scooter has to merely
perform, the following operations:
 Removing the carburetor from the scooter
 Opening it up to expose all parts
 Cleaning the nozzle
 Refitting it in the scooter.
 Here source and destination is scooter.

Reasoning using frames: The task of action frames is to provide facility for procedural attachment and help
transforming from initial to goal state. It also helps in breaking the entire problem in to sub-tasks, which can be
described as top-down methodology. It is possible for one to represent any tasks using these action frames.
Reasoning using frames is done by instantiation. Instantiation process begins when the given situation is batches
with frames that already exist. The reasoning process tries to match the frame with the situation and latter fills
up slots for which values must be assigned. The values assigned to the slot depict a particular situation and but
this reasoning process tries to move from one frame to another to match the current situation. This process
builds up a wide network of frames, there by facilitating one to build a knowledge base for representing
knowledge about common sense.
Frame-based representation language: Frame representations have become popular enough that special high
level frame-based representation languages have been developed. Most of languages use LISP as the host
language. They typically have functions to create access, modify updates and display frames.
Implementation of frame structures: One way to implement frames is with property lists. An atom is used as the
frame name and slots are given as properties. Facets and values with in slots become lists of lists for the slot
property. Another way to implement frames is with an association list (an-a-list), that is, a list of sub lists where
each sub list contains a key and one or more corresponding values. It is also possible to represent frame like
structures using Object oriented programming extensions to LISP languages such as Flavors.

SOLUTION (39)

Potrebbero piacerti anche