You are on page 1of 202

1

Faculty of
Information Technology
Artificial Intelligence 700
Year 3 Semester 2
Registered with the Department of Higher Education as a Private Higher Education Institution under the Higher Education Act, 1997.
Registration Certificate No. 2000/HE07/008

DEPARTMENT OF SYSTEMS ENGINEERING

LEARNER GUIDE

MODULES: ARTIFICIAL INTELLIGENCE 700 (2ND SEMESTER)

PREPARED ON BEHALF OF
RICHFIELD Graduate Institute of Technology (PTY) LTD

Copyright © 2021
RICHFIELD Graduate Institute Of Technology (PTY) LTD
Registration Number: 2000/000757/07
All rights reserved; no part of this publication may be reproduced in any form or by any
means, including photocopying machines, without the written permission of the
Institution.
BSc In Information Technology | AI 700

TABLE OF CONTENTS
TOPICS PAGE

1. An Introduction To Artificial Intelligence 6-23


2. Basic Elements Of Artificial Intelligence 24-42
3. Truth Tables 43-69
4. The Turing Test 70-82
5. Axioms And Predicate Calculus 83-114
6. Introduction To Robotics 115-132

PRESCRIBED BOOK REFERENCE

Russell, S., & Norvig, P., (2014), Artificial Intelligence –


A Modern Approach, 3rd Edition, Pearson Education,

Page | 2
BSc In Information Technology | AI 700

LESSON PLAN ALIGNED TO MOBILE CONTENT [MOODLE]


BSc.
SECTION SUBJECT MATTER IN INFORMATION
TECHNOLOGY

1 INTRODUCTION TO ARTIFICIAL INTELLIGENCE

1.0 What Is Artificial Intelligence?


Lesson 1
1.1 The Four Approached In More Detail
1.2 The Foundation Of Artificial Intelligence Lesson 2
1.3 The History Of Artificial Intelligence Lesson 3
1.4 Intelligent Agents

2 BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

2.0 Expert Systems Lesson 4


2.1 Machine Learning Lesson 5

3 TRUTH TABLES

3.0 Truth Tables Lesson 6


3.1 Binary Operations
Lesson 7
3.2 Further Explanations And Examples
3.3 Condensed Truth Tables For Binary Operations Lesson 8
3.4 Breadth First Branch Lesson 9

4 THE TURING TEST

4.0 Introduction Lesson 10


4.1 The Turing Machine Lesson 11
4.2 Intelligence And Intuition Lesson 12
4.3 Intelligent Machinery Lesson 13
4.4 The imitation Of Mind Lesson 14
4.5 After The Test Lesson 15

5 AXIOMS AND PREDICATE CALCULUS

5.1 Production Systems Lesson 16


5.2 Bound And Free Variables Lesson 17
Page | 3
BSc In Information Technology | AI 700

6 Introduction To Robotics

6.0 Introduction Lesson 18


6.1 Dynamics Of A Robot Lesson 19

Page | 4
BSc In Information Technology | AI 700

INTERACTIVE ICONS USED IN THIS LEARNER GUIDE

Writing Activity
Learning Outcomes Study Read

Research Glossary
Think Point Key Point

Bright Idea Problem(s)


Review Questions Case Study

Question & Answer


Multimedia Resource References
Web Resource

Page | 5
BSc In Information Technology | AI 700

ONE | INTRODUCTION TO ARTIFICIAL INTELLIGENCE

LEARNING OUTCOMES

After completing this chapter, Learners should be able to:


1. Demonstrate knowledge and understanding of the terms used in the
greater ambit of Artificial Intelligence and be able to evaluate the
approaches and methods used in creating and accomplishing human-
like intelligence in machines and associated processes.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

1.0 What is artificial intelligence?


Artificial Intelligence is the branch of Computer Science concerned with making
computers behave like humans.

Major AI textbooks define artificial intelligence as "the study and design of intelligent
agents," where an
intelligent agent is a
PRESCRIBED BOOK REFERENCE Read pp 1-17
system that perceives its
Russell, S., & Norvig, P., (2014), Artificial Intelligence – environment and takes
A Modern Approach, 3rd Edition, Pearson Education, actions which maximize its
Essex, UK chances of success. John
McCarthy, who coined the
term in 1956, defines it as "the science and engineering of making intelligent
machines, especially intelligent computer programs."

The definitions of AI according to some text books are categorized into four
approaches and are summarized below:

 Systems that think like humans


 Systems that think rationally
 Systems that act like humans
 Systems that act rationally

Page | 6
BSc In Information Technology | AI 700

The art of creating machines that perform “Computational intelligence is the study of
the functions that require intelligence when design of intelligent agents performed
by people.

1.1 THE FOUR APPROACHES IN MORE DETAIL:

(a) Acting humanly: The Turing Test approach


 Test proposed by Alan Turing in 1950
 The computer is asked questions by a human interrogator.

The computer passes the test if a human interrogator, after posing some written
questions, cannot tell whether the written responses come from a person or not.
Programming a computer to pass, the computer need to possess the following
capabilities:
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

 Natural language processing to enable it to communicate successfully in English.


 Knowledge representation to store what it knows or hears
 Automated reasoning to use the stored information to answer questions and to
draw new conclusions.
 Machine learning to adapt to new circumstances and to detect and extrapolate
patterns
 To pass the complete Turing Test, the computer will need
 Computer vision to perceive the objects, and
 Robotics to manipulate objects and move about.

(b)Thinking humanly: The cognitive modeling approach


We need to get inside actual working of the human mind:
 Through introspection – trying to capture our own thoughts as they go by;
 Through psychological experiments

Allen Newell and Herbert Simon, who developed GPS, the ―General Problem Solver‖
tried to trace the reasoning steps to traces of human subjects solving the same
problems. The interdisciplinary field of cognitive science brings together computer
models from AI and experimental techniques from psychology to try to construct
precise and testable theories of the workings of the human mind

(c) Thinking rationally: The “laws of thought approach”


The Greek philosopher Aristotle was one of the first to attempt to codify ―right
thinking, i.e. irrefutable reasoning processes. His syllogism provided patterns for

Page | 7
BSc In Information Technology | AI 700

argument structures that always yielded correct conclusions when given correct
premises—for example, Socrates is a man; all men are mortal; therefore Socrates is
mortal.

These laws of thought were supposed to govern the operation of the mind; their study
initiated a field called logic.

(d) Acting rationally: The rational agent approach


An agent is something that acts. Computer agents are not mere programs ,but they
are expected to have the following attributes also :
 Operating under autonomous control
 Perceiving their environment
 Persisting over a prolonged time period
 Adapting to change.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

A rational agent is one that acts so as to achieve the best outcome.

1.2 THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE


The various disciplines that contributed ideas, viewpoints, and techniques to AI are
given below:

Philosophy (428 B.C. – present)


Aristotle (384-322 B.C.) was the first to formulate a precise set of laws governing the
rational part of the mind. He developed an informal system of syllogisms for proper
reasoning, which allowed one to generate conclusions mechanically, given initial
premises.

Brains and digital computers perform quite different tasks and have different
properties. there are 10000 times more neurons in the typical human brain than there
are gates in the CPU of a typical high-end computer. Moore’s Law predicts that the
CPU’s gate count will equal the brain’s neuron count around 2020.

Psychology (1879 – present)


The origin of scientific psychology are traced back to the wok if German physiologist
Hermann von Helmholtz (1821-1894) and his student Wilhelm Wundt(1832 – 1920)

In 1879,Wundt opened the first laboratory of experimental psychology at the


university of Leipzig. In US,the development of computer modeling led to the creation

Page | 8
BSc In Information Technology | AI 700

of the field of cognitive science. The field can be said to have started at the workshop
in September 1956 at MIT.

Computer Engineering (1940-present)


For artificial intelligence to succeed, we need two things: intelligence and an artifact.
The computer has been the artifact of choice.
A1 also owes a debt to the software side of computer science, which has supplied the
operating systems, programming languages, and tools needed to write modern
programs

Control theory and Cybernetics (1948-present)


Ktesibios of Alexandria (c. 250 B.c.) built the first self-controlling machine: a water
clock with a regulator that kept the flow of water running through it at a constant,
predictable pace. Modern control theory, especially the branch known as stochastic
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

optimal control, has as its goal the design of systems that maximize an objective
function over time.

Linguistics (1957-present)
Modem linguistics and AI, then, were "born" at about the same time, and grew up
together, intersecting in a hybrid field called computational linguistics or natural
language processing.

1.3 THE HISTORY OF ARTIFICIAL INTELLIGENCE


The gestation of artificial intelligence (1943-1955)
There were a number of early examples of work that can be characterized as AI, but
it
was Alan Turing who first articulated a complete vision of A1 in his 1950 article
"Comput-ing Machinery and Intelligence." Therein, he introduced the Turing test,
machine learning, genetic algorithms, and reinforcement learning.

The birth of artificial intelligence (1956)


McCarthy convinced Minsky, Claude Shannon, and Nathaniel Rochester to help him
bring together U.S. researchers interested in automata theory, neural nets, and the
study of intelligence. They organized a two-month workshop at Dartmouth in the
summer of 1956.

Perhaps the longest-lasting thing to come out of the workshop was an agreement to
adopt McCarthy's new name for the field: artificial intelligence.

Page | 9
BSc In Information Technology | AI 700

Early enthusiasm, great expectations (1952-1969)


The early years of A1 were full of successes - in a limited sort of way.

General Problem Solver (GPS) was a computer program created in 1957 by Herbert
Simon and Allen Newell to build a universal problem solver machine. The order in
which the program considered subgoals and possible actions was similar to that in
which humans approached the same problems. Thus, GPS was probably the first
program to embody the "thinking humanly" approach.

At IBM, Nathaniel Rochester and his colleagues produced some of the first A1 pro-
grams. Herbert Gelernter (1959) constructed the Geometry Theorem Prover, which
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

was able to prove theorems that many students of mathematics would find quite
tricky.

Lisp was invented by John McCarthy in 1958 while he was at the Massachusetts
Institute of Technology (MIT). In 1963, McCarthy started the AI lab at Stanford.

Tom Evans's ANALOGY program (1968) solved geometric analogy problems that
appear in IQ tests.

The Tom Evan’s ANALOGY program could solve geometric analogy problems as
shown.

A dose of reality (1966-1973)


From the beginning, AI researchers were not shy about making predictions of their
coming successes. The following statement by Herbert Simon in 1957 is often quoted:

―It is not my aim to surprise or shock you-but the simplest way I can summarize is to
say that there are now in the world machines that think, that learn and that create.
Moreover, their ability to do these things is going to increase rapidly until-in a visible
future-the range of problems they can handle will be coextensive with the range to
which the human mind has been applied.

Knowledge-based systems: The key to power? (1969-1979)


Dendral was an influential pioneer project in artificial intelligence (AI) of the 1960s,
and the computer software expert system that it produced. Its primary aim was to
help organic chemists in identifying unknown organic molecules, by analyzing their

Page | 10
BSc In Information Technology | AI 700

mass spectra and using knowledge of chemistry. It was done at Stanford University
by Edward Feigenbaum, Bruce Buchanan, Joshua Lederberg, and Carl Djerassi.

A1 becomes an industry (1980-present)


In 1981, the Japanese announced the "Fifth Generation" project, a 10-year plan to
build

Intelligent computers running Prolog. Overall, the A1 industry boomed from a few
million dollars in 1980 to billions of dollars in 1988.

The return of neural networks (1986-present)


Psychologists including David Rumelhart and Geoff Hinton continued the study of
neural-net models of memory.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

A1 becomes a science (1987-present)


In recent years, approaches based on hidden Markov models (HMMs) have come to
dominate the area. Speech technology and the related field of handwritten character
recognition are already making the transition to widespread industrial and consumer
applications.

The Bayesian network formalism was invented to allow efficient representation of,
and rigorous reasoning with, uncertain knowledge.

The emergence of intelligent agents (1995-present)


One of the most important environments for intelligent agents is the Internet.

Abridged history of AI
• 1943 McCulloch & Pitts: Boolean circuit model of brain
• 1950 Turing's "Computing Machinery and Intelligence"
• 1956 Dartmouth meeting: "Artificial Intelligence" adopted
• 1952—69 Look, Ma, no hands!
• 1950s Early AI programs, including Samuel's checkers
program, Newell & Simon's Logic Theorist,
Gelernter's Geometry Engine
• 1965 Robinson's complete algorithm for logical reasoning
• 1966—73 AI discovers computational complexity
Neural network research almost disappears
• 1969—79 Early development of knowledge-based systems
• 1980-- AI becomes an industry
• 1986-- Neural networks return to popularity

Page | 11
BSc In Information Technology | AI 700

• 1987-- AI becomes a science


• 1995-- The emergence of intelligent agents
• An agent is anything that can be viewed as perceiving its environment through
sensors and acting upon that environment through actuators
• Human agent: eyes, ears, and other organs for sensors; hands,

THE STATE OF ART


A hundred million miles from Earth, NASA's Remote Agent program became the first
on-board autonomous planning program to control the scheduling of operations for
a spacecraft (Jonsson et al., 2000). Remote Agent generated plans from high-level
goals specified from the ground, and it monitored the operation of the spacecraft as
the plans were executed-detecting, diagnosing, and recovering from problems as they
occurred.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Game playing
IBM's Deep Blue became the first computer program to defeat the world champion
in a chess match when it bested Garry Kasparov by a score of 3.5 to 2.5 in an exhibition
match (Goodman and Keene, 1997).

Autonomous control
The ALVINN computer vision system was trained to steer a car

to keep it following a lane. It was placed in CMU's NAVLAB computer-controlled


minivan and used to navigate across the United States-for 2850 miles it was in control
of steering the vehicle 98% of the time.

Diagnosis
Medical diagnosis programs based on probabilistic analysis have been able to perform
at the level of an expert physician in several areas of medicine.

Logistics Planning
During the Persian Gulf crisis of 1991, U.S. forces deployed a Dynamic Analysis and
Replanning Tool, DART (Cross and Walker, 1994), to do automated logistics planning
and scheduling for transportation. This involved up to 50,000 vehicles, cargo, and
people at a time, and had to account for starting points, destinations, routes, and
conflict resolution among all parameters. The AI planning techniques allowed a plan
to be generated in hours that would have taken weeks with older methods. The
Defense Advanced Research Project Agency (DARPA) stated that this single
application more than paid back DARPA's 30-year investment in AI.

Page | 12
BSc In Information Technology | AI 700

Robotics:
Many surgeons now use robot assistants in microsurgery. HipNav (DiGioia

et al., 1996) is a system that uses computer vision techniques to create a three-
dimensional model of a patient's internal anatomy and then uses robotic control to
guide the insertion of a hip replacement prosthesis.

Language understanding and problem solving:


PROVERB (Littman et al., 1999) is a computer program that solves crossword puzzles
better than most humans, using constraints on possible word fillers, a large database
of past puzzles, and a variety of information sources including dictionaries and online
databases such as a list of movies and the actors that appear in them.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Figure 1.1 Agents interact with environments through sensors and actuators.

1.4 INTELLIGENT AGENTS


An agent is anything that can be viewed as perceiving its environment through
sensors and

o A human agent has eyes, ears, and other organs for sensors and hands, legs, mouth,
and other body parts for actuators.

o A robotic agent might have cameras and infrared range finders for sensors and
various motors for actuators.

o A software agent receives keystrokes, file contents, and network packets as sensory
inputs and acts on the environment by displaying on the screen, writing files, and
sending network packets.
Percept
We use the term percept to refer to the agent's perceptual inputs at any given instant.

Page | 13
BSc In Information Technology | AI 700

Percept Sequence
An agent's percept sequence is the complete history of everything the agent has ever
perceived.

Agent function
Mathematically speaking, we say that an agent's behavior is described by the agent
function that maps any given percept sequence to an action.

Agent program
Internally, The agent function for an artificial agent will be implemented by an agent
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

program. It is important to keep these two ideas distinct. The agent function is an
abstract mathematical description; the agent program is a concrete implementation,
running on the agent architecture.

To illustrate these ideas, we will use a very simple example-the vacuum-cleaner world
shown in Figure 1.3. This particular world has just two locations: squares A and B. The
vacuum agent perceives which square it is in and whether there is dirt in the square.
It can choose to move left, move right, suck up the dirt, or do nothing. One very simple
agent function is the following: if the current square is dirty, then suck, otherwise
move to the other square.

Rational Agent
A rational agent is one that does the right thing-conceptually speaking, every entry
in the table for the agent function is filled out correctly. Obviously, doing the right
thing is better than doing the wrong thing. The right action is the one that will cause
the agent to be most successful.

Performance Measures
A performance measure embodies the criterion for success of an agent's behavior.
When an agent is plunked down in an environment, it generates a sequence of actions
according to the percepts it receives. This sequence of actions causes the
environment to go through a sequence of states. If the sequence is desirable, then
the agent has performed well.

Rationality
What is rational at any given time depends on four things:

Page | 14
BSc In Information Technology | AI 700

 The performance measure that defines the criterion of success.


 The agent's prior knowledge of the environment.
 The actions that the agent can perform.
 The agent's percept sequence to date.

This leads to a definition of a rational agent:


For each possible percept sequence, a rational agent should select an action that is
ex-pected to maximize its performance measure, given the evidence provided by the
percept sequence and whatever built-in knowledge the agent has.
Omniscience, learning, and autonomy

An omniscient agent knows the actual outcome of its actions and can act accordingly;
but omniscience is impossible in reality.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Doing actions in order to modify future percepts-sometimes called information


gathering-is an important part of rationality.

Our definition requires a rational agent not only to gather information, but also to
learn as much as possible from what it perceives.

To the extent that an agent relies on the prior knowledge of its designer rather than
on its own percepts, we say that the agent lacks autonomy. A rational agent should
be autonomous-it should learn what it can to compensate for partial or incorrect
prior knowledge.

Task environments
We must think about task environments, which are essentially the "problems" to
which rational agents are the "solutions."

PEAS
All these are grouped together under the heading of the task environment.
We call this the PEAS (Performance, Environment, Actuators, Sensors) description.

In designing an agent, the first step must always be to specify the task environment
as fully as possible.

Page | 15
BSc In Information Technology | AI 700

Agent Type Performance Environments Actuators Sensors


Measure
Safe: fast, Steering, Cameras,
Taxi driver legal, Roads, other accelerator, sonar,
comfortable traffic, Speedometer,
trip, pedestrians, brake, GPS,
maximize Signal,horn,disp Odometer,
profits customers lay engine
sensors,
keyboards,
accelerometer
Figure 1.2 PEAS description of the task environment for an automated
taxi.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Figure 1.3 Examples of Agent types and their PEAS descriptions.

Properties of task environments

Page | 16
BSc In Information Technology | AI 700

 Fully observable vs. partially observable


 Deterministic vs. stochastic
 Episodic vs. sequential
 Static vs. dynamic
 Discrete vs. continuous
 Single agent vs. multi-agent

Fully observable vs. partially observable.


If an agent's sensors give it access to the complete state of the environment at each
point in time, then we say that the task environment is fully observable. A task envi-
ronment is effectively fully observable if the sensors detect all aspects that are
relevant to the choice of action.

An environment might be partially observable because of noisy and inaccurate


ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

sensors or because parts of the state are simply missing from the sensor data.

For example, an agent that has to spot defective parts on an assembly line bases each
decision on the current part, regardless of previous decisions;

In sequential environments, on the other hand, the current decision could affect all
future decisions. Chess and taxi driving are sequential:

Discrete vs. continuous.


The discrete/continuous distinction can be applied to the state of the environment,
to the way time is handled, and to the percepts and actions of the agent. For example,
a discrete-state environment such as a chess game has a finite number of distinct
states. Chess also has a discrete set of percepts and actions. Taxi driving is a
continuous-state and continuous-time problem: the speed and location of the taxi
and of the other vehicles sweep through a range of continuous values and do so
smoothly over time. Taxi-driving actions are also continuous (steering angles, etc.).

Single agent vs. multi-agent.


An agent solving a crossword puzzle by itself is clearly in a single-agent environment,
whereas an agent playing chess is in a two-agent environment.

As one might expect, the hardest case is partially observable, stochastic, sequential,
dynamic, continuous, and multi-agent.

Page | 17
BSc In Information Technology | AI 700

Figure 1.4 Examples of task environments and their characteristics.


ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Agent programs
The agent programs all have the same skeleton: they take the current percept as input
from the sensors and return an action to the actuatom6 Notice the difference
between the agent program, which takes the current percept as input, and the agent
function, which takes the entire percept history. The agent program takes just the
current percept as input because nothing more is available from the environment; if
the agent's actions depend on the entire percept sequence, the agent will have to
remember the percepts.

Function TABLE-DRIVEN_AGENT(percept) returns an action

static: percepts, a sequence initially empty


table: a table of actions, indexed by percept sequence

Some Agent Types

Table-driven agents: use a percept sequence/action table in memory to find the next
action. They are implemented by a (large) lookup table.

Simple reflex agents: are based on condition-action rules, implemented with an


appropriate production system. They are stateless devices which do not have memory
of past world states.

Agents with memory have internal state, which is used to keep track of past states
of the world.

Page | 18
BSc In Information Technology | AI 700

Agents with goals are agents that, in addition to state information, have goal
information that describes desirable situations. Agents of this kind take future events
into consideration.

Utility-based agents base their decisions on classic axiomatic utility theory in order
to act rationally.
ONE | AN INTRODUCTION TO ARTIFICIAL INTELLIGENCE

Page | 19
BSc In Information Technology | AI 700

SECTION SUMMARY

 Artificial Intelligence is the branch of computer science concerned with making


computers behave like humans.
 The art of creating machines that perform “Computational intelligence is the study
of the functions that require intelligence when designing intelligent agents.
ONE | SUMMARY

Page | 20
BSc In Information Technology | AI 700

KEY TERMS USED IN THIS SECTION

Analogical Reasoning — determining the outcome of a problem by use of analogies.


A procedure for drawing conclusions about a problem by using past experience;

Artificial Intelligence (AI) — the sub-field of computer science that is connected with
symbolic reasoning and problem solving;

Human Intelligence -a measure of someone's ability to understand and solve


complicated problems.

Natural Language Processing - Natural-language-generation systems convert


information from computer databases into normal-sounding human language.
Natural-language-understanding systems convert samples of human language into
more formal representations that are easier for computer programs to manipulate

Expert — A human being who has developed a high level of proficiency in making
judgments in a specific, usually narrow, domain.

Expert System (ES) — A computer system that applies reasoning methodologies using
knowledge in a specific domain to render advice or recommendations, much like a
human expert. A computer system that achieves a high level of performance in task
areas, that for human beings, require years of special education and training
ONE| GLOSSARY OF TERMS

Page | 21
BSc In Information Technology | AI 700

SECTION REVIEW QUESTIONS

1 Discuss the five (5) applications of artificial intelligence.


2 Describe briefly the architecture of an expert system
3 Discuss why it is important for human knowledge to be transferred to
machines.

CHECK YOUR PROGRESS


Q1. What is artificial intelligence?
Q2. Yes, but what is intelligence?
Q3 Isn't there a solid definition of intelligence that doesn't depend on relating it
to human intelligence?
ONE| REVIEW QUESTIONS

Page | 22
BSc In Information Technology | AI 700

CHECK YOUR PROGRESS MODEL ANSWERS

CYP MODEL ANSWERS


A1. It is the science and engineering of making intelligent machines, especially
intelligent computer programs. It is related to the similar task of using computers
to understand human intelligence, but AI does not have to confine itself to
methods that are biologically observable.

A2. Intelligence is the computational part of the ability to achieve goals in the
world. Varying kinds and degrees of intelligence occur in people, many animals
and some machines

A3. Not yet. The problem is that we cannot yet characterize in general what kinds
ONE| CHECK YOUR PROGRESS MODEL ANSWERS

of computational procedures we want to call intelligent. We understand some


of the mechanisms of intelligence and not others

Page | 23
BSc In Information Technology | AI 700

TWO | BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

LEARNING OUTCOMES

After completing this chapter, Learners should be able to:


1. Demonstrate knowledge and understanding of the concepts,
principles, rules and theorems that underlie expert systems,
knowledge systems and machine learning as they are applied to the
field of Artificial Intelligence.
TWO | BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

2.0 EXPERT SYSTEMS


Expert system is an artificial intelligence program that has expert-level knowledge
about a particular domain and knows how to use its knowledge to respond properly.
Domain refers to the area within which the task is being performed. Ideally the expert
systems should substitute
a human expert. Edward
PRESCRIBED BOOK REFERENCE Read pp 644-7 Feigenbaum of Stanford
University has defined
Russell, S., & Norvig, P., (2014), Artificial Intelligence –
A Modern Approach, 3rd Edition, Pearson Education, expert system as “an
Essex, UK intelligent computer
program that uses
knowledge and inference procedures to solve problems that are difficult enough to
require significant human expertise for their solutions.” It is a branch of artificial
intelligence introduced by researchers in the Stanford Heuristic Programming Project.
The expert systems are a branch of AI designed to work within a particular domain.
As an expert is a person who can solve a problem with the domain knowledge in hands
it should be able to solve problems at the level of a human expert. The source of
knowledge may come from a human expert and/or from books, magazines and
internet. As knowledge plays a key role in the functioning of expert systems they are
also known as knowledge-based systems and knowledge-based expert systems. The
expert’s knowledge about solving the given specific problems is called knowledge
domain of the expert.

Page | 24
BSc In Information Technology | AI 700

Components of Expert Systems

Figure 2.1: Expert System

Basic Concept of an Expert System Function


TWO | BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

The expert system consists of two major components: knowledge base and inference
engine.
Knowledge base contains the domain knowledge which is used by the inference
engine to draw conclusions. The inference engine is the generic control mechanism
that applies the axiomatic knowledge to the task-specific data to arrive at some
conclusion. When a user supplies facts or relevant information of query to the expert
system he receives advice or expertise in response. That is given the facts it uses the
inference engine which in turn uses the knowledge base to infer the solution.

Characteristics of Expert Systems


High performance: They should perform at the level of a human expert.
Adequate response time: They should have the ability to respond in a reasonable
amount of time. Time is crucial especially for real time systems.
Reliability: They must be reliable and should not crash.
Understandable: They should not be a black box instead it should be able explain the
steps of the reasoning process. It should justify its conclusions in the same way a
human expert explains why he arrived at particular conclusion.

Shell
A shell is a special purpose tool designed based on the requirements of particular
applications. User should supply the knowledge base to the shell. Example for the
shell is EMYCIN (Empty MYCIN) shell. Shell manages the input and output. It processes
the information given by the user, relates it to the concepts contained in the
knowledge base, and provides solution for a particular problem.

Page | 25
BSc In Information Technology | AI 700

Advantages of Expert Systems


Availability: Expert systems are available easily due to mass production software.
Cheaper: The cost of providing expertise is not expensive.
Reduced danger: They can be used in any risky environments where humans cannot
work with.
Permanence: The knowledge will last long indefinitely.
Multiple expertise: It can be designed to have knowledge of many experts.
Explanation: They are capable of explaining in detail the reasoning that led to a
conclusion.
Fast response: They can respond at great speed due to the inherent advantages of
computers over humans.
Unemotional and response at all times: Unlike humans, they do not get tense, fatigue
or panic and work steadily during emergency situations.

KNOWLEDGE SYSTEMS
TWO | BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

Knowledge is the body of facts and principles. Knowledge can be language, concepts,
procedures, rules, ideas, abstractions, places, customs, and so on. Study of knowledge
is called Epistemology.
Types of knowledge
The types of knowledge include procedural knowledge, declarative knowledge and
heuristic knowledge.
Procedural knowledge
Procedural knowledge is compiled or processed form of information. Procedural
knowledge is related to the performance of some task. For example, sequence of
steps to solve a problem is procedural knowledge.
Declarative knowledge
Declarative knowledge is passive knowledge in the form of statements of facts about
the world. For example, mark statement of a student is declarative knowledge.
Heuristic knowledge
Heuristics knowledge are rules of thumb or tricks. Heuristic knowledge is used to
make judgments and also to simplify solution of problems. It is acquired through
experience. An expert uses his knowledge that he has gathered due to his experience
and learning.
Importance of knowledge
Intelligence requires knowledge. That is, to exhibit intelligence, knowledge is
required. Knowledge plays a major role in building intelligent systems

Page | 26
BSc In Information Technology | AI 700

2.1 MACHINE LEARNING


To solve problems computers require intelligence. Learning is central to intelligence.
As intelligence requires knowledge, it is necessary for the computers to acquire
knowledge. Machine learning serves this purpose.

Machine learning refers to a system capable of acquiring and integrating the


knowledge automatically. The capability of the systems to learn from experience,
training, analytical observation, and other means, results in a system that can
continuously self-improve and thereby exhibit efficiency and effectiveness.
A machine learning system usually starts with some knowledge and a corresponding
knowledge organization so that it can interpret, analyze, and test the knowledge
acquired.
TWO | BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

Learning System Model

The figure shown above is a typical learning system model. It consists of the following
components.

Learning element
It receives and processes the input obtained from a person ( i.e. a teacher), from
reference material like magazines, journals, etc, or from the environment at large.
Knowledge base
This is somewhat similar to the database. Initially it may contain some basic
knowledge. Thereafter it receives more knowledge which may be new and so be
added as it is or it may replace the existing knowledge.
Performance element
It uses the updated knowledge base to perform some tasks or solves some problems
and produces the corresponding output.

Page | 27
BSc In Information Technology | AI 700

Feedback element
It is receiving the two inputs, one from learning element and one from standard (or
idealized) system. This is to identify the differences between the two inputs. The
feedback is used to determine what should be done in order to produce the correct
output.

Standard system
It is a trained person or a computer program that is able to produce the correct
output. In order to check whether the machine learning system has learned well, the
same input is given to the standard system. The outputs of standard system and that
of performance element are given as inputs to the feedback element for the
comparison. Standard system is also called idealized system.
The sequence of operations described above may be repeated until the system gets
the desired perfection.
TWO | BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

There are several factors affecting the performance. They are,


 Types of training provided
 The form and extent of any background knowledge
 The type of feedback provided
 The learning algorithms used

Training is the process of making the system able to learn. It may consist of randomly
selected examples that include a variety of facts and details including irrelevant data.
The learning techniques can be characterized as a search through a space of possible
hypotheses or solutions. Background knowledge can be used to make learning more
efficient by reducing the search space. The feedback may be a simple yes or no type
of evaluation or it may contain useful information describing why a particular action
was good or bad. If the feedback is always reliable and carries useful information, the
learning process will be faster and the resultant knowledge will be correct.
The success of machine learning system also depends on the algorithms. These
algorithms control the search to find and build the knowledge structures. The
algorithms should extract useful information from training examples. There are
several machine learning techniques available. I have explored some of the important
techniques.

Epistemology
This is a study of the kinds of knowledge that are required for solving problems in the
world.

Page | 28
BSc In Information Technology | AI 700

Ontology
Ontology is the study of the kinds of things that exist. In AI, the programs and
sentences deal with various kinds of objects, and we study what these kinds are and
what their basic properties are. Emphasis on ontology begins in the 1990s.

Heuristics
A heuristic is a way of trying to discover something or an idea imbedded in a program.
The term is used variously in AI. Heuristic functions are used in some approaches to
search to measure how far a node in a search tree seems to be from a goal. Heuristic
predicates that compare two nodes in a search tree to see if one is better than the
other, i.e. constitutes an advance toward the goal, may be more useful. [My opinion].

Genetic Programming
Genetic programming is a technique for getting programs to solve a task by mating
random Lisp programs and selecting fittest in millions of generations.
TWO | BASIC ELEMENTS OF ARTIFICIAL INTELLIGENCE

Page | 29
BSc In Information Technology | AI 700

SECTION SUMMARY

 The expert systems are a branch of AI designed to work within a particular domain.
 An expert is a person who can solve a problem within the domain knowledge and
an expert system should be able to solve problems at the level of a human expert.
 The source of knowledge may come from a human expert and/or from books,
magazines and internet.
 As knowledge plays a key role in the functioning of expert systems they are also
known as knowledge-based systems and/or knowledge-based expert systems. The
expert’s knowledge about solving the given specific problems is called the knowledge
domain of the expert.
TWO | SUMMARY

Page | 30
BSc In Information Technology | AI 700

KEY TERMS USED IN THIS SECTION

Human Intelligence -a measure of someone's ability to understand and solve


complicated problems.
Turing Test -The test that is used to judge whether a computer is intelligent or not.
Intelligent robots - Robots that can understand and solve problems as well as
understand some form of communication.
Vision Systems - artificial Vision Systems (computer based systems where software
performs tasks assailable to "seeing", usually aimed to industrial quality assurance,
part selection, and defect detection etc).
Natural Language Processing - Natural-language-generation systems convert
information from computer databases into normal-sounding human language.
Natural-language-understanding systems convert samples of human language into
more formal representations that are easier for computer programs to manipulate.
Depth First Search- Vertical Search from top to bottom

Breadth First Search- Horizontal Search from left to right


Semantic Net [work] -A labeled, directed graph with nodes representing physical or
conceptual objects and labeled arcs representing relations between objects. ...
Declarative Language- A language that allows programming by defining the
boundary conditions and constraints and letting the computer determine a solution
that meets.
Expert Systems- A software system with two basic components: a knowledge base
ONE | GLOSSARY OF TERMS

and an inference engine. The system mimic an expert's reasoning process.


Chatterbot - A chatterbot is a computer program designed to simulate an intelligent
conversation with one or more human users via auditory or textual methods.
Goal - The solution that the Prolog program is trying to reach or prove correct.
Subgoal - A subgoal is a goal set up by a problem solver in an attempt to solve another
goal.
ELIZA - ELIZA is a famous 1966 computer program which responds in a situation with
a patient by rephrasing many of the patient's statements as questions and posing
them to the patient. Thus, for example, the response to "My head hurts" might be
"Why do you say your head hurts?
Handwriting Recognition -Handwriting recognition is the ability of a computer to
receive intelligible handwritten input. The image of the written text may be sensed
"off .
Page | 31
BSc In Information Technology | AI 700

Speech Recognition A machine or software capable of recognizing spoken language.


The machine or software may take the spoken language and translate it into written.
Artificial Neural Networks - Artificial neural networks are made up of interconnecting
artificial neurons (programming constructs that mimic the properties of biological
neurons). Artificial neural networks may either be used to gain an understanding of
biological neural networks, or for solving artificial intelligence problems without
necessarily creating a model of a real biological system.
Hardware Developments - Developments in Hardware over time e.g. Computers and
Television
Algorithm — A detailed sequence of action to perform to accomplish task;

Analogical Reasoning — determining the outcome of a problem by use of analogies.


A procedure for drawing conclusions about a problem by using past experience;

Artificial Intelligence (AI) — the sub-field of computer science that is connected with
symbolic reasoning and problem solving;

Artificial Neural Networks (ANN) — Computer technology that attempts to build


computers that will operate like a human brain. The machine possesses simultaneous
memory storage and work with ambiguous information (See Neural Computing).

Associative Memory — the ability to recall complete situations from partial


information.

Back-propagation — the best-known learning algorithm in neural computing.


Learning is done by comparing the computed to sample case outputs.
TWO | GLOSSARY OF TERMS

Backward Chaining — A search technique used in production (“IF-THEN” rule)


systems that begins with the action clause of rule and works “backward” through a
chain of rules in an attempt to find a verifiable set of condition clauses.

Case-Based Reasoning (CBR) — Methodology in which knowledge and/or inferences


are derived from historical cases.

Crossover — the combination of parts of two superior solutions in an attempt to


produce even better solutions. A technique used in the genetic algorithm.

Data — Raw facts that are meaningless by themselves (such as names or numbers).

Page | 32
BSc In Information Technology | AI 700

Data Mining — The activity of looking for very specific, detailed, but unknown,
information in data bases. As search for valuable, yet difficult to obtain data.

Data Warehouse — The physical repository where relational data are specially
organized to provide enterprise-wide, cleaned data in standardized format.

Data Warehouse — The physical repository where relational data are specially
organized to provide enterprise-wide, cleaned data in standardized format.

Declarative Rules — Rules that state all the facts and relationships related to a
problem.

Deductive Reasoning — In logic, reasoning from the general to the specific.


Conclusions (inferences) follow premises. Consequent reasoning.

Deep Knowledge — A representation of information about the internal and causal


structure of a system that considers the interactions among its components.

Deep Representation — A model that captures all the forms of knowledge used by
experts used in their reasoning. Domain — An area of expertise. An area of
applicability.

Dynamic Explanation — In expert systems, an explanation facility that reconstructs


the reasons for its actions as it evaluates results.

Expert — A human being who has developed a high level of proficiency in making
judgments in a specific, usually narrow, domain.
TWO | GLOSSARY OF TERMS

Expert System (ES) — A computer system that applies reasoning methodologies using
knowledge in a specific domain to render advice or recommendations, much like a
human expert. A computer system that achieves a high level of performance in task
areas that for human beings, require years of special education and training.

Expert System Shell — A computer program that facilitates the relatively easy
implementation of a specific expert system.

Expertise — The set of capabilities that underlies the performance of human experts,
including extensive domain knowledge, heuristic rules that simplify and improve
approaches to problem solving, meta-knowledge and metacognition, and compiled
forms of behavior that afford great economy in skilled performance.

Page | 33
BSc In Information Technology | AI 700

Firing a Rule — Obtaining information on either the IF or THEN part of a rule, which
makes this rule an assertion (true or false).

Forward Chaining — Data-driven search in a rule based system.

Fuzzy Logic — Ways of reasoning that can cope with uncertain or partial information;
characteristic of human thinking and many expert systems.

Fuzzy Sets — A set theory approach in which set membership is less precise than
having objects be strictly in or out of the set (as in Boolean logic).

Genetic Algorithms — Software programs that learn in an evolutionary manner,


similar to the way biological system evolve. Genetic

Programming — The extension of the genetic algorithm model of learning into the
space of programs. That is, the objects that constitute the population are not fixed-
length character strings that encode possible solutions to the problem at hand, they
are programs that, when executed, "are" the candidate solutions to the problem.

Goal-seeking Analysis — The capability of asking the computer what values certain
variables must have in order to attain desired goals.

Heuristics — Informal, judgmental knowledge of an application area that constitutes


the “rules of good judgement” in the field. Heuristics also encompasses the
knowledge of how to plan steps in solving a complex problem, how to improve
performance.
TWO | GLOSSARY OF TERMS

Heuristic Programming — The use of heuristics in problem solving.

Hierarchical Reasoning — A method, based on tree search in which certain


alternatives, objects or events can be eliminated at various levels of the search
hierarchy.

IF-THEN — A conditional rule in which certain action is taken only if some condition
is satisfied.

Induction Table — A table that facilitates rule induction for expert systems.

Page | 34
BSc In Information Technology | AI 700

Inductive Learning — A machine learning approach in which rules are inferred from
facts or data.

Inductive Reasoning — In logic, reasoning from the specific to the general Conditional
or antecedent reasoning.

Inexact (Approximate) Reasoning — Used when the expert system must make
decisions based on partial or incomplete information.

Inference — the process of drawing a conclusion from given evidence. To reach a


decision by reasoning.

Inference Engine — That part of an expert system that actually performs the
reasoning function.

Inference Rules — Rules in expert systems which direct the inference engine.

Information— Data that are organized in a meaningful way. Intelligence — The


capability of a system to adapt its behavior to meet its goals in a range of
environments.

Intelligent Agent (IA) — Expert or knowledge-based system that is embedded in


computer-based information systems (or their components) to make them smarter.

Intelligent Database — A database management system that exhibits artificial


intelligence features to assist the user; and often includes expert systems and
intelligent agents.
TWO | GLOSSARY OF TERMS

Knowledge — Understanding, awareness, or familiarity acquired through education


or experience. Anything that has been learned, perceived, discovered, inferred, or
understood. The ability to use information.

Knowledge Acquisition — the extraction and formulation of knowledge derived from


various sources, especially from experts.

Knowledge Base — A collection of facts, rules, and procedures organized into


schemas. The assembly of all of the information and knowledge of a specific field of
interest.

Page | 35
BSc In Information Technology | AI 700

Knowledge-based System (KBS) — typically a rule-based system for providing


expertise. Identical to expert systems, except that the source of expertise may include
documented knowledge.

Knowledge Discovery — A machine learning process that performs rule induction, or,
a related procedure to establish knowledge from large databases or textual sources.

Knowledge Management — The active management of expertise in an organization.


It involves collecting, categorizing, and disseminating knowledge.

Knowledge-poor Procedures — Standard methods for dealing with shallow


knowledge domains.

Knowledge Representation — A formalism for representing facts and rules in the


computer about a subject or specialty.

Machine Learning — A process used by computer that can learn from experience or
past example.

Meta-knowledge — Knowledge in an expert system about how the system operates


or reasons. More generally, knowledge about knowledge.

Modus Ponens — An inference rule type which from ”A implies B” justifies B by the
existence of A.

Modus Tollens — an inference rule type in which a rule “A implies B” may be true,
but B is known to be false, implying that A is false.
TWO | GLOSSARY OF TERMS

Natural Language Processing (NLP) — Use of a natural language processor to


interface with a computer based system.

Neural Computing (Networks) — An experimental computer design that aims at


building intelligent computers that operate in manner modeled on the human brain.

Neuron — A cell (processing element) of a biological or artificial neural network.

Pattern Matching — See Pattern Recognition. However, sometimes it refers


specifically to matching the IF and THEN parts in rule-based systems. In this case,
pattern matching can be considered as one are of pattern recognition.

Page | 36
BSc In Information Technology | AI 700

Pattern Recognition— A technique of matching an external pattern to one stored in


a computers memory; used in inference engines, image processing, neural
computing, and speech recognition ( in other words, the process of classifying data
into predetermined categories.

Predicate Logic (Calculus) — A logical system of reasoning used in AI programs to


indicate relationships among data items.

Procedural Knowledge — Information about courses of action.

Procedural Rules — Rules that advice on how to solve a problem, given that certain
facts are known.

Production Rules — A knowledge representation method in which knowledge is


formalized into “rules” containing an IF part and a THEN part (also called a condition
and an action).

Propositional Logic — A formal logical system of reasoning in which conclusions are


drawn from a series of statements according to a strict set of rules.

Qualitative reasoning — A means of representing and making inferences using


general, physical knowledge about the world.

Reproduction — The creation of new generation of improved solutions by a genetic


algorithm.
TWO | GLOSSARY OF TERMS

Rule — A formal way of specifying a recommendation, directive, or strategy,


expressed as IF premise THEN conclusion, and possibly an ELSE conclusion.

Rule-based System — A system in which knowledge is represented completely in


terms of rules (e.g., a system based on production rules).

Rule Induction — Rules are created by a computer from examples of problems where
the outcome is known in a process called induction. These rules are generalized to
other case;

Schema — A data structure for knowledge representation. Examples of schemas are


frames and rules.

Page | 37
BSc In Information Technology | AI 700

Search Space — Set of all possible solutions to a problem;

Search Tree — Graphic presentation that shows the problem, its alternative solutions,
and the progress of a search for the best (acceptable) solution.

Self-organizing — A neural network architecture that uses unsupervised learning.

Semantic Network — A knowledge representation method consisting of a network of


nodes, representing concepts or objects, connected by arcs describing the relations
between the nodes.

Semantics — The meaning in language. The relationship between words and


sentences.

Shallow Knowledge — A representation of “surface-level” information that can be


used to deal with very specific situations.

Shallow (Surface) Representation — Model that does not capture all of the forms of
knowledge used by experts in their reasoning. Contrasted with Deep Representation
.
Soft Information — Fuzzy, unofficial, intuitive, subjective, nebulous, implied, and
vague information.

Supervised Learning — A method of training artificial neural networks in which


sample cases are shown to the network as input, and the weights are adjusted to
minimize the error in its outputs.
TWO | GLOSSARY OF TERMS

Symbol — A string of characters that represents some real world concept.

Symbol Structures — The meaningful relationships represented in an AI program

Symbolic Processing — The use of symbols, rather than numbers, combined with
rules of thumb (i.e. heuristics), to process information and solve problems.

Syntax — The manner in which words are assembled to form phrases and sentences.
Putting words in specific order.

System — A set of elements that is considered to act as a single, goal-oriented entity.

Page | 38
BSc In Information Technology | AI 700

Uncertainty — In the context of expert systems, uncertainty refers to a value that


cannot be determined during a consultation. Many expert systems can accommodate
uncertainty.

Unsupervised Learning — A method of training artificial neural networks in which


only input stimuli are shown to the network, which is self-organizing.

Weights — Values assigned on each connection at the input to a neuron. Analogous


to a synapse in the brain. Weights control the inflow to the processing elements in
neural network
TWO | GLOSSARY OF TERMS

Page | 39
BSc In Information Technology | AI 700

SECTION REVIEW QUESTIONS

Giving examples, explain what is meant by the following terms:


1.1 Artificial

1.2 Expert Systems.

1.3 IQ

1.4 Understanding

1.5 Perception

CHECK YOUR PROGRESS


Q 1. What about IQ? Do computer programs have IQs?
Q 2. What about other comparisons between human and computer intelligence?
Q 3. When did AI research start?
Q 4. Does AI aim to put the human mind into the computer?
TWO| REVIEW QUESTIONS

Page | 40
BSc In Information Technology | AI 700

CHECK YOUR PROGRESS MODEL ANSWERS

A 1. No. IQ is based on the rates at which intelligence develops in children. It is


the ratio of the age at which a child normally makes a certain score to the
child's age. The scale is extended to adults in a suitable way. IQ correlates well
with various measures of success or failure in life, but making computers that
can score high on IQ tests would be weakly correlated with their usefulness. For
example, the ability of a child to repeat back a long sequence of digits correlates
well with other intellectual abilities, perhaps because it measures how much
information the child can compute with at once. However, ``digit span'' is trivial
for even extremely limited computers.

However, some of the problems on IQ tests are useful challenges for AI.
Arthur R. Jensen [Jen98], a leading researcher in human intelligence, suggests
TWO| CHECK YOUR PROGRESS MODEL ANSWERS

``as a heuristic hypothesis'' that all normal humans have the same intellectual
mechanisms and that differences in intelligence are related to ``quantitative
biochemical and physiological conditions''. I see them as speed, short term
memory, and the ability to form accurate and retrievable long term memories.
Whether or not Jensen is right about human intelligence, the situation in AI
today is the reverse.

Computer programs have plenty of speed and memory but their abilities
correspond to the intellectual mechanisms that program designers understand
well enough to put in programs. Some abilities that children normally don't
develop till they are teenagers may be in, and some abilities possessed by two
year olds are still out. The matter is further complicated by the fact that the
cognitive sciences still have not succeeded in determining exactly what the
human abilities are. Very likely the organization of the intellectual mechanisms
for AI can usefully be different from that in people.

A 2. After WWII, a number of people independently started to work on


intelligent machines. The English mathematician Alan Turing may have been the
first. He gave a lecture on it in 1947. He also may have been the first to decide
that AI was best researched by programming computers rather than by building
machines. By the late 1950s, there were many researchers on AI, and most of
them were basing their work on programming computers.

Page | 41
BSc In Information Technology | AI 700

A 3. Some researchers say they have that objective, but maybe they are using
the phrase metaphorically. The human mind has a lot of peculiarities, and I'm
not sure anyone is serious about imitating all of them.

A 4. Some researchers say they have that objective, but maybe they are using
the phrase metaphorically. The human mind has a lot of peculiarities, and I'm
not sure anyone is serious about imitating all of them.
TWO| CHECK YOUR PROGRESS MODEL ANSWERS

Page | 42
BSc In Information Technology | AI 700

THREE | TRUTH TABLES

LEARNING OUTCOMES

After completing this chapter, Learners should be able to:


1. Demonstrate knowledge and skill in the design of logical electronic
units represented by Logic Gates and aspects of Boolean algebra.
2. Demonstrate the ability to produce Truth Tables whose purpose is to
furnish proof of the efficacy and concept of the electronic units so.

3.0 TRUTH TABLES


A truth table is a mathematical table used in logic—specifically in connection
with Boolean algebra, Boolean functions, and propositional calculus—to
compute the functional values of logical expressions on each of their functional
arguments, that is, on each combination of values taken by their logical variables
In particular, truth tables can be used to tell whether a propositional expression
is true for all legitimate input values, that is, logically valid.

Logical False
Logical False
p F
T F
THREE| TRUTH TABLES

F F

Logical Identity
Logical identity is an operation on one logical value, typically the value of
a proposition, that produces a value of true if its operand is true and a value
of false if its operand is false.

Page | 43
BSc In Information Technology | AI 700

The truth table for the logical identity operator is as follows:

Logical Identity

p p

T T

F F

Logical Negation
Logical negation is an operation on one logical value, typically the value of
a proposition that produces a value of true if its operand is false and a value
of false if its operand is true.
The truth table for NOT p (also written as ¬p, Np, Fpq, or ~p) is as follows:

Logical Negation
p ¬p
T F
F T

Logical True
p T
T T
F T
THREE| TRUTH TABLES

Truth table for most commonly used logical operators


Here is a truth table giving definitions of the most commonly used 6 of the 16
possible truth functions of 2 binary variables (P,Q are thus boolean variables):

Page | 44
BSc In Information Technology | AI 700

T T T T F T T T T

T F F T T F F T F

F T F T T F T F F

F F F F F T T T T

Key:
T = true, F = false
= AND (logical conjunction)
= OR (logical disjunction)
= XOR (exclusive or)
= XNOR (exclusive nor)
= conditional "if-then"
= conditional "(then)-if"
biconditional or "if-and-only-if" is logically equivalent to : XNOR (exclusive
nor).
Logical operators can also be visualized using Venn diagrams.
THREE| TRUTH TABLES

3.1 Binary operations


Page | 45
BSc In Information Technology | AI 700

[2] operator Operation name


0 (F F F F)(p, q) ⊥ false, Opq Contradiction
1 (F F F T)(p, q) NOR p ↓ q, Xpq Logical NOR
2 (F F T F)(p, q) p q, Mpq Converse nonimplication
3 (F F T T)(p, q) ¬p, ~p ¬p, Np, Fpq Negation
4 (F T F F)(p, q) p q, Lpq Material nonimplication
5 (F T F T)(p, q) ¬q, ~q ¬q, Nq, Gpq Negation
6 (F T T F)(p, q) XOR p ⊕ q, Jpq Exclusive disjunction
7 (F T T T)(p, q) NAND p ↑ q, Dpq Logical NAND
8 (T F F F)(p, q) AND p ∧ q, Kpq Logical conjunction
9 (T F F T)(p, q) XNOR p If and only if q, Epq Logical biconditional
10 (T F T F)(p, q) q q, Hpq Projection function
11 (T F T T)(p, q) p q if p then q, Cpq Material implication
12 (T T F F)(p, q) p p, Ipq Projection function
13 (T T F T)(p, q) p q p if q, Bpq Converse implication
14 (T T T F)(p, q) OR p ∨ q, Apq Logical disjunction
15 (T T T T)(p, q) ⊤ true, Vpq Tautology
Logical operators can also be visualized using Venn diagrams.

Logical conjunction
Logical conjunction is an operation on two logical values, typically the values of
two propositions, that produces a value oftrue if both of its operands are true.

The truth table for p AND q (also written as p ∧ q, Kpq, p & q, or p q) is as


THREE| TRUTH TABLES

follows:
Logical Conjunction
p q p∧q
T T T
T F F
F T F
F F F

Page | 46
BSc In Information Technology | AI 700

In ordinary language terms, if both p and q are true, then the conjunction p ∧ q is
true. For all other assignments of logical values to p and to q the
conjunction p ∧ q is false.
It can also be said that if p, then p ∧ q is q, otherwise p ∧ q is p.

Logical disjunction
Logical disjunction is an operation on two logical values, typically the values of
two propositions, that produces a value oftrue if at least one of its operands is
true.
The truth table for p OR q (also written as p ∨ q, Apq, p || q, or p + q) is as
follows:
Logical Disjunction
p q p∨q
T T T
T F T
F T T
F F F
Stated in English, if p, then p ∨ q is p, otherwise p ∨ q is q.

Logical implication
Logical implication or the material conditional are both associated with
an operation on two logical values, typically the values of two propositions, that
produces a value of false just in the singular case the first operand is true and
the second operand is false.

The truth table associated with the material conditional if p then q (symbolized
as p → q) and the logical implication p implies q (symbolized as p ⇒ q, or Cpq) is
as follows:
THREE| TRUTH TABLES

Logical Implication
p q p→q
T T T
T F F
F T T
F F T
It may also be useful to note that p → q is equivalent to ¬p ∨ q.

Page | 47
BSc In Information Technology | AI 700

Logical equality
Logical equality (also known as biconditional) is an operation on two logical
values, typically the values of two propositions, that produces a value of true if
both operands are false or both operands are true.
The truth table for p XNOR q (also written as p ↔ q, Epq, p = q, or p ≡ q) is as
follows:
Logical Equality
p q p≡q
T T T
T F F
F T F
F F T
So p EQ q is true if p and q have the same truth value (both true or both false),
and false if they have different truth values.

Exclusive disjunction
Exclusive disjunction is an operation on two logical values, typically the values of
two propositions, that produces a value oftrue if one but not both of its operands
is true.

The truth table for p XOR q (also written as p ⊕ q, Jpq, or p ≠ q) is as follows:


Exclusive Disjunction
p q p⊕q
T T F
T F T
F T T
THREE| TRUTH TABLES

F F F
For two propositions, XOR can also be written as (p = 1 ∧ q = 0) ∨ (p = 0 ∧ q = 1).

Logical NAND
The logical NAND is an operation on two logical values, typically the values of
two propositions, that produces a value offalse if both of its operands are true.
In other words, it produces a value of true if at least one of its operands is false.

Page | 48
BSc In Information Technology | AI 700

The truth table for p NAND q (also written as p ↑ q, Dpq, or p | q) is as follows:


Logical NAND
p q p↑q
T T F
T F T
F T T
F F T

It is frequently useful to express a logical operation as a compound operation,


that is, as an operation that is built up or composed from other operations. Many
such compositions are possible, depending on the operations that are taken as
basic or "primitive" and the operations that are taken as composite or
"derivative".

In the case of logical NAND, it is clearly expressible as a compound of NOT and


AND.

The negation of a conjunction: ¬(p ∧ q), and the disjunction of negations:


(¬p) ∨ (¬q) can be tabulated as follows:

p q p∧q ¬(p ∧ q) ¬p ¬q (¬p) ∨ (¬q)

T T T F F F F

T F F T F T T
THREE| TRUTH TABLES

F T F T T F T

F F F T T T T

Logical NOR
The logical NOR is an operation on two logical values, typically the values of
two propositions, that produces a value of trueif both of its operands are false.
In other words, it produces a value of false if at least one of its operands is true.
↓ is also known as the Peirce arrow after its inventor, Charles Sanders Peirce,
and is a Sole sufficient operator.

Page | 49
BSc In Information Technology | AI 700

The truth table for p NOR q (also written as p ↓ q, Xpq, or p ⊥ q) is as follows:


Logical NOR

p q p↓q

T T F

T F F

F T F

F F T

The negation of a disjunction ¬(p ∨ q), and the conjunction of negations


(¬p) ∧ (¬q) can be tabulated as follows:

p q p∨q ¬(p ∨ q) ¬p ¬q (¬p) ∧ (¬q)


T T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T

Inspection of the tabular derivations for NAND and NOR, under each assignment
of logical values to the functional arguments p and q, produces the identical
patterns of functional values for ¬(p ∧ q) as for (¬p) ∨ (¬q), and for ¬(p ∨ q) as for
(¬p) ∧ (¬q). Thus the first and second expressions in each pair are logically
equivalent, and may be substituted for each other in all contexts that pertain
solely to their logical values.
This equivalence is one of De Morgan's laws.
THREE| TRUTH TABLES

3.2 Further Explanation and Examples


A statement in sentential logic is built from simple statements using the logical
connectives , , , , and . I'll construct tables which show how the
truth or falsity of a statement built with these connective depends on the truth
or falsity of its components.
Here's the table for negation:

Page | 50
BSc In Information Technology | AI 700

This table is easy to understand. If P is true, its negation is false. If P is false,


then is {\it true}.

should be true when both P and Q are true, and false otherwise:

is true if either P is true or Q is true (or both). It's only false if both P and
Q are false.

Here's the table for logical implication:


THREE| TRUTH TABLES

To understand why this table is the way it is, consider the following example:
"If you get an A, then I'll give you a dollar."

The statement will be true if I keep my promise and false if I don't.


Suppose it's true that you get an A and it's true that I give you a dollar. Since I
kept my promise, the implication is {\it true}. This corresponds to the first line in
the table.

Page | 51
BSc In Information Technology | AI 700

Suppose it's true that you get an A but it's false that I give you a dollar. Since I
didn't keep my promise, the implication is false. This corresponds to the second
line in the table.

What if it's false that you get an A? Whether or not I give you a dollar, I haven't
broken my promise. Thus, the implication can't be false, so (since this is a two-
valued logic) it must be true. This explains the last two lines of the table.

means that P and Q are equivalent. So the double implication is true if P


and Q are both true or if P and Q are both false; otherwise, the double
implication is false.

You should remember --- or be able to construct --- the truth tables for the logical
connectives. You'll use these tables to construct tables for more complicated
sentences. It's easier to demonstrate what to do than to describe it in words, so
you'll see the procedure worked out in the examples.

Remarks.
1. When you're constructing a truth table, you have to consider all possible
assignments of True (T) and False (F) to the component statements. For example,
suppose the component statements are P, Q, and R. Each of these statements
can be either true or false, so there are possibilities.
When you're listing the possibilities, you should assign truth values to the
THREE| TRUTH TABLES

component statements in a systematic way to avoid duplication or omission. The


easiest approach is to use lexicographic ordering. Thus, for a compound
statement with three components P, Q, and R, I would list the possibilities this
way:

Page | 52
BSc In Information Technology | AI 700

2. There are different ways of setting up truth tables. You can, for instance, write
the truth values "under" the logical connectives of the compound statement,
gradually building up to the column for the "primary" connective.
I'll write things out the long way, by constructing columns for each "piece" of the
compound statement and gradually building up to the compound statement.

Example. Construct a truth table for the formula .

A tautology is a formula which is "always true" --- that is, it is true for every
assignment of truth values to its simple components. You can think of a
tautology as a rule of logic.
The opposite of a tautology is a contradiction, a formula which is "always false".
In other words, a contradiction is false for every assignment of truth values to its
THREE| TRUTH TABLES

simple components.

Example. Show that is a tautology.


I construct the truth table for and show that the formula is
always true.

Page | 53
BSc In Information Technology | AI 700

The last column contains only T's. Therefore, the formula is a tautology.

Example. Construct a truth table for .

3.3 Condensed truth tables for binary operators


For binary operators, a condensed form of truth table is also used, where the
row headings and the column headings specify the operands and the table cells
specify the result. For example Boolean logic uses this condensed truth table
notation:

Truth tables in digital logic


Truth tables are also used to specify the functionality of hardware look-up tables
(LUTs) in digital logic circuitry. For an n-input LUT, the truth table will have
2^n values (or rows in the above tabular format), completely specifying a
THREE| TRUTH TABLES

boolean function for the LUT. By representing each boolean value as a bit in
a binary number, truth table values can be efficiently encoded as integer values
in electronic design automation (EDA) software. For example, a 32-bit integer
can encode the truth table for a LUT with up to 5 inputs.
Truth tables are a simple and straightforward way to encode boolean functions,
however given the exponential growth in size as the number of inputs increase,
they are not suitable for functions with a large number of inputs. Other
representations which are more memory efficient are text equations and binary
decision diagrams.

Applications of truth tables in digital electronics


Page | 54
BSc In Information Technology | AI 700

In digital electronics and computer science (fields of applied logic engineering and mathematics), truth
tables can be used to reduce basic boolean operations to simple correlations of
inputs to outputs, without the use of logic gates or code.

For example, a binary addition can be represented with the truth table:
AB|CR
11|10
10|01
01|01
00|00

where

A = First Operand
B = Second Operand
C = Carry
R = Result
This truth table is read left to right:
 Value pair (A,B) equals value pair (C,R).
 Or for this example, A plus B equal result R, with the Carry C.
Note that this table does not describe the logic operations necessary to implement
this operation, rather it simply specifies the function of inputs to output values.
With respect to the result, this example may be arithmetically viewed as modulo 2
binary addition, and as logically equivalent to the exclusive-or (exclusive
disjunction) binary logic operation.
In this case it can be used for only very simple inputs and outputs, such as 1s and
0s. However, if the number of types of values one can have on the inputs increases,
the size of the truth table will increase.
For instance, in an addition operation, one needs two operands, A and B. Each can
have one of two values, zero or one. The number of combinations of these two
values is 2×2, or four. So the result is four possible outputs of C and R. If one were
to use base 3, the size would increase to 3×3, or nine possible outputs.
THREE| TRUTH TABLES

The first "addition" example above is called a half-adder. A full-adder is when the
carry from the previous operation is provided as input to the next adder. Thus, a
truth table of eight rows would be needed to describe a full adder's logic:

Graph Traversal Algorithms

Page | 55
BSc In Information Technology | AI 700

Depth-First Search
You are aware of tree traversal mechanism. Give a tree, you can traverse it using
preorder, inorder and postorder. Similarly given an undirected graph you can
traverse it or visit its nodes using breadth first-search and depth-first search.
Searching in breadth-first search or depth first search means exploring a given
graph. Through searching a graph one can find out whether a graph is connected
or not? There are many more applications of graph searching algorithms. In this
section we will illustrate Depth First Search algorithm followed by Breadth first
Search algorithm in the next section.

The logic behind this algorithm is to go as far as possible from the given starting
node searching for the target. In case, we get a node that has no
adjacent/successor node, we get back (recursively) and continue with the last
vertex that is still not visited.

Broadly it is divided into 3 steps:


 Take a vertex that is not visited yet and mark it visited
 Go to its first adjacent non-visited (successor) vertex and mark it visited
 If all the adjacent vertices (successors) of the considered vertex are already
visited or it doesn’t have any more adjacent vertex (successor) – go back to its
parent vertex

Before starting with an algorithm, let us discuss the terminology and structure
used in the algorithm. The following algorithm works for undirected graph and
directed graph both.
The following color scheme is to maintain the status of vertex i.e mark a vertex
is visited or unvisited or target vertex:

white- for an undiscovered/unvisited vertex


gray - for a discovered/visited vertex
THREE| TRUTH TABLES

black - for a finished/target vertex


The structure given below is used in the algorithm.
p[u]- Predecessor or parent node.
Two (2) timestamps referred as
t[u] – First time discovering/visiting a vertex, store a counter or number of
times
f[u]= finish off / target vertex

Page | 56
BSc In Information Technology | AI 700

Let us write the algorithm DFS for any given graph G. In graph G, V is the vertex
set and E is the set of edges written as G(V,E). Adjacency list for the given graph
G is stored in Adj array as described in the previous section.
color[] - An array color will have status of vertex as white or gray or black as
defined earlier in this section.

DFS(G)
{
for each v in V, //for loop V+1 times
{
color[v]=white; // V times
p[v]=NULL; // V times
}
time=0; // constant time O(1)
for each u in V, //for loop V+1 times
if (color[u]==white) // V times
DFSVISIT(u) // call to DFSVISIT(v) , at most V times O(V)

DFSVISIT(u)
{
color[u]=gray; // constant time
t[u] = ++time;
for each v in Adj(u) // for loop
if (color[v] == white)
{
p[v] = u;
DFSVISIT(v); // call to DFSVISIT(v)
}
THREE| TRUTH TABLES

color[u] = black; // constant time


f[u]=++time; // constant time
}
Complexity analysis
In the above algorithm, there is only one DFSVISIT(u) call for each vertex u in the
vertex set V. Initialization complexity in DFS(G) for loop is O(V). In second for
loop of DFS(G) , complexity is O(V) if we leave the call of DFSVISIT(u).
Now, Let us find the complexity of function DFSVISIT(u)
The complexity of for loop will be O(deg(u)+1) if we do not consider the recursive
call to DFSVISIT(v). For recursive call to DFSVISIT(v), (complexity will be O(E) as

Page | 57
BSc In Information Technology | AI 700

Recursive call to DFSVISIT(v) will be at most the sum of degree of adjacency for
all vertex v in the vertex set V. It can be written as  |Adj(v)|=O(E) vV
Hence, overall complexity for DFS algorithm is O(V + E)
The strategy of the DFS is to search “deeper” in the graph whenever possible.
Exploration of vertex is in the fashion that first it goes deeper then widened.
Let us take up an example to see how exploration of vertex takes place by Depth
First Search algorithm.

1 2

3 4

1 2
black black
0 1
5

2 Gray

Gray 1 2 Gray
3 4

 3 5
THREE| TRUTH TABLES

Page | 58
BSc In Information Technology | AI 700

1 2
black black
0 1
5

2 Gray

black 1 2 Gray
3 4

 4 5

1 2
white
Gray 0 
5

 white

white   white
3 4

 1
THREE| TRUTH TABLES

Page | 59
BSc In Information Technology | AI 700

1 2
black
black 0 1
5

2 Gray

black 1 2 black
3 4

 5

1 2
black Gray
0 1
5

 white

Gray 1  white
3 4

 2 3
THREE| TRUTH TABLES

Page | 60
BSc In Information Technology | AI 700

1 2
black black
0 1
5

2 black

black 1 2 black
3 4

=

2 3
1
0
2 1 5
3 4

3 1
2 4

4 2

3 5
5 2

Data structure used for implementing DFS algorithm is stack. In the diagram
THREE| TRUTH TABLES

along with each vertex start and finish time is written in the format a/b here a
represent start time and b represent finish time. This will result in to tree or
forest. The order of vertices according to adjacency list considered for given
graph is 1,2,3,4,5.

Page | 61
BSc In Information Technology | AI 700

3.4 Breadth-First Search


In this section, we will discuss breadth first search algorithm for graph. This is
very well known searching algorithm. A traversal depends both on the starting
vertex, and on the order of traversing the adjacent vertices of each node. The
analogy behind
breadth first search is
PRESCRIBED BOOK REFERENCE Read pp 83-90 that it explores the
graph wider then
Russell, S., & Norvig, P., (2014), Artificial Intelligence –
A Modern Approach, 3rd Edition, Pearson Education, deeper. The method
Essex, UK starts with a vertex v
then visit all its
adjacent nodes v1,v2,v3…then move to the next node which is adjacent to v1,
v2, v3 …. This also referred as level by level search.

Basic steps towards exploring a graph using breadth-first search:


 Mark all vertices as "unvisited".
 Start with start vertex v
 Find an unvisited vertex that are adjacent to v , mark them visited
 Next consider all recently visited vertices and visit unvisited vertices
adjacent to them
 Continue this process till all vertices in the graph are explored /visited

Now, let us see the structure used in this algorithm and color scheme for status
of vertex.

Color scheme is same as used in DFS algorithm i.e to maintain the status of vertex
i.e mark a vertex is visited or unvisited or target vertex:
white- for an undiscovered/unvisited vertex
gray - for a discovered/visited vertex
black - for a finished/target vertex
THREE| TRUTH TABLES

The structure given below is used in the algorithm. G will be the graph as G(V,E)
with set of vertex V and set of edges E.

p[v]-The parent or predecessor of vertex


d[v]-the number of edges on the path from s to v.
Data structure used for breadth-first search is queue, Q (FIFO), to store gray
vertices.
color[v]- This array will keep the status of vertex as white, grey or black

Page | 62
BSc In Information Technology | AI 700

The following algorithm for BFS takes input graph G(V,E) where V is set of vertex
and E is the set of edges. Graph is represented by adjacency list i.e Adj[]. Start
vertex is s in V.
Complexity Analysis

In this algorithm, the first for loop executes at most O(V) times.
While loop executes at most O(V) times as every vertex v in V is enqueued only
once in the Queue Q. Every vertex is enqueued once and dequeued once so
queuing will take at most O(V) time.

Inside while loop, there is for loop which will execute at most O(E) times as it will
be at most the sum of degree of adjacency for all vertex v in the vertex set V.
Which can be written as  |Adj(v)|=O(E) vV

Let us summarize the number of times a statement will execute in the algorithm
for BFS.
Line no. No. of times statement will Cost
execute
1 V O(V)
2 V-1
3 V-1
4 V-1 O(1)
5 1
6 1
7 1
8 1
9 1
10 V+1 O(V)
11 V
THREE| TRUTH TABLES

12 V+E+1 O(V+E)
13 V+E
14 V
15 V
16 V
17 V
18 V

Thus overall complexity of BFS will be V + V + E, i.e. O(V+E)

Page | 63
BSc In Information Technology | AI 700

Let us take up an example to see how exploration of vertex takes place by


Breadth First Search algorithm.

In this algorithm sequence of vertex visited or explored may vary. The final
sequence of vertex visited is dependent on adjacency list. But the array d[] will
have same number irrespective of order of vertices in adjacency list. In the above
diagram distance is shown along the vertex. According to adjacency list drawn in
the diagram, exploration sequence of vertex by BFS algorithm is 1,2,3,4,5.
THREE| TRUTH TABLES

Page | 64
BSc In Information Technology | AI 700

SECTION SUMMARY

 A graph G(V,E) where V is the finite set of vertices i.e. { v1,v2,v3….} and E is the finite
set of edges {(u,v),(w,x)….} is known as directed graph if the each edge in the graph
has ordered pair of vertices (u,v) representing an edge from u to v.
 In an Undirected graph each edge is an unordered pair of vertices i.e. (u,v) and (v,u)
refers to the same edge.
 A graph can be represented by an adjacency matrix and adjacency list. In adjacency,
list memory requirement is more as compared to adjacency list representation.
 Graph searching problem has wide range of applications. Breadth First Search and
Depth First Search are very well known searching algorithms.
 In Breadth First Search, exploration of vertex is wider first then deeper. In depth
first search it is deeper first and then it is widened. By exploration of vertex in any
search algorithm, implies visiting or traversing each vertex in the graph.
 Data structure used for Breadth First Search is queue and depth first search is stack.
 By using these search algorithms, connected components of graph can be found.
Breadth first search method, gives shortest path between two vertices u and v.
 Depth first search is used in topological sorting. There are many more applications
where these searching algorithms are used.
THREE | SUMMRY

Page | 65
BSc In Information Technology | AI 700

KEY TERMS USED IN THIS SECTION

Fuzzy Logic — Ways of reasoning that can cope with uncertain or partial information;
characteristic of human thinking and many expert systems.

Fuzzy Sets — A set theory approach in which set membership is less precise than
having objects be strictly in or out of the set (as in Boolean logic).

Propositional Logic — A formal logical system of reasoning in which conclusions are

IF-THEN — A conditional rule in which certain action is taken only if some condition
is satisfied.
THREE | GLOSSARY OF TERMS

Page | 66
BSc In Information Technology | AI 700

UNIT 1 REVIEW QUESTIONS

1. What is the complexity of graph search algorithms if graph is represented


by adjacency matrix and adjacency list?
2. Enlist few applications where DFS and BFS can be used?
3. Consider a graph with 5 vertices and 5 edges. Write its adjacency matrix and
adjacency list.

V
1

V
V 3
2

V V
4 5

4. For the following graph write DFS and BFS traversal sequence.
A

C
B
THREE| REVIEW QUESTIONS

D G
E F

CHECK YOUR PRGRESS


Check Your Progress 1
1. For BFS algorithm complexity will be as follows:
Application where DFS can be used:
 Finding connected component of the graph
 Finding shortest path between two vertices
Application where BFS can be used:
 Finding connected component of the graph
 Topological sorting
 For finding cycle existence in the graph or not

Page | 67
BSc In Information Technology | AI 700

2. Scanned file for answer 3

Check your Progress 2


The truth tables for the basic operations:
And Or
A B AB A B A+B Not
000 000 AA
010 011 01
100 101 10
111 111
For more complicated expressions, tables are built from the truth tables of their
basic parts.
THREE| REVIEW QUESTIONS

Page | 68
BSc In Information Technology | AI 700

• Draw a truth table • Draw a truth • Draw a truth table for


for A+BC. table for A(B+D). (A+B)(A+C).
A B C BC A+BC A B D B+D A(B+D) A B C A+B A+C (A+B)(A+C)
0 0 0 0 0 000 0 0 0000 0 0
0 0 1 0 0 001 1 0 0010 1 0
0 1 0 0 0 010 1 0 0101 0 0
0 1 1 1 1 011 1 0 0111 1 1
1 0 0 0 1 100 0 0 1001 1 1
1 0 1 0 1 101 1 1 1011 1 1
1 1 0 0 1 110 1 1 1101 1 1
1 1 1 1 1 111 1 1 1111 1 1
THREE| REVIEW QUESTIONS

Page | 69
BSc In Information Technology | AI 700

FOUR | THE TURING TEST

LEARNING OUTCOMES

After completing this chapter, Learners should be able to:


1. Demonstrate ability both in theory and practice to initiate or
instantiate an actual intelligent event and follow that through an
appropriate analysis of its purpose, design and propriety.

4.0 INTRODUCTION
The short and extraordinary life of the British mathematician Alan Turing involves the
foundations of mathematics, the origin of the computer, the secret crypto logical war
against Nazi Germany, and much more. For the modern public, one of the most
frequent mentions of his name comes in yet another context: the philosophy of Mind
and Artificial Intelligence. Specifically, he is immortalized in the 'Turing test' for
intelligence, which Turing himself called 'the imitation game'.

The famous Test appeared in Turing's paper Computing Machinery and


Intelligence, published in October 1950 in the philosophical journal Mind (Turing
1950). Turing was then
employed at Manchester
PRESCRIBED BOOK REFERENCE Read pp 2-3 University, where the
world's first stored-
Russell, S., & Norvig, P., (2014), Artificial Intelligence –
FOUR | THE TURING TEST

A Modern Approach, 3rd Edition, Pearson Education, program computer had


Essex, UK been working since June
1948. Turing had not been
appointed to produce philosophical papers; his primary function was to create and
manage the first software for the computer. However he had also continued his
research in mathematics, and had been drawn into discussion with the scientific
philosopher Michael Polanyi, who encouraged him to publish his views on what
Turing called 'intelligent machinery'. The point of his paper, of which the imitation
game was only a part, was to argue that intelligence of a human level could be evinced
by a suitably programmed computer. The imitation game lent definiteness to the idea
of being as intelligent as a human being.

Page | 70
BSc In Information Technology | AI 700

Turing's 1950 paper did not arise in isolation, and the purpose of this biographical
sketch is to set Turing's test in the context of his life and work. The 1950 paper was
an important summary of his views for the general philosophical public, but he had
been developing those views for many years. It would also be a mistake to think of
Turing as a mathematician making a detached comment on the potential of
computers. He was very fully engaged in the development of modern computer
science both in theory and in practice.

4.1 THE TURING MACHINE


Indeed the 1950 paper had itself an important autobiographical element, although
Turing did not emphasize its personal aspect. Much of the early part of the paper
involved an exposition of the concept of computability. The definition of
computability was Turing's own great achievement of the pre-war period, when he
was a young Fellow of King's College, Cambridge University. In 1936, when he was
only 23, he announced the definition of what immediately became known as the
Turing machine, thus giving a precise and convincing mathematical definition of an
'effective method.' In Turing's paper On computable numbers, with an application to
the Entscheidungsproblem (Turing 1936-7), he gave a discussion of his definition,
arguing successfully that it encompassed the most general possible process for
computing a number.

By so doing, he satisfactorily answered Hilbert's decision problem for the provability


of mathematical theorems. The paper did more: it also defined the concept of
universal Turing machine and hence the principle of the modern stored-program
computer. The universal machine was also an important element in the theory Turing
needed to explain in his 1950 paper: the point is that all Turing machines can be
thought of as programs for a single universal machine. Most striking, perhaps, is that
the Turing machine, formulated fourteen years before the 'Turing Test', was also
based on a principle of imitation. The 'machine' was modelled by considering what a
FOUR | THE TURING TEST

human being could do when following a definite method. According to Turing's


argument it encompassed everything that could be done by a human calculator with
finite equipment, but allowed an unlimited supply of paper to write on (formalized
into a paper tape marked off in squares) and unlimited time.

The basis in human calculation is emphasized in Turing's arguments. The 'squares' of


the Turing machine 'tape,' for instance, originated in Turing's explanation as the
squares of a child's exercise book. The atomic operations of scanning, marking,
erasing, moving to left and right were likewise related to human actions. Above all
the finite number of 'configurations' of a Turing machine were related to the finite
number of states of mind, or finite memory, of a human calculator. This very bold

Page | 71
BSc In Information Technology | AI 700

appeal to modelling 'states of mind' by states of a machine seems already to


anticipate the thesis of machine intelligence in 1950. Should we then say that Turing
in 1950 was only re-stating the implications of what he had claimed in 1936?
A simple reading of the story would support this view. It might be argued that from
1936 onwards Turing steadfastly sought and found ways to implement his theory in
practice. In 1937 Turing began a practical interest in electromagnetic relays to
implement logical operations, an interest very different from anything expected of a
Cambridge pure mathematician (Hodges 1983, p. 139). After 1939 this interest turned
into one of immense practical importance. Turing's ingenious logic was translated into
working electromagnetic machinery at Bletchley Park, Buckinghamshire, the centre
of British code-breaking operations. His algorithm for breaking the Enigma-
enciphered German messages, as embodied in the British 'Bombe', lay at the centre
of its success. He personally headed the work of deciphering German naval messages,
and led the development of many methods and machines of astonishing efficiency.
He was introduced to American work at the highest level, and to the most advanced
electronic technology. In this way he learnt that electronic storage and electronic
circuits could make an effective and fast practical version of the 'paper tape' and
configurations needed for a universal machine. He learnt electronics for himself,
again a highly unconventional step. Turing emerged from the war in 1945 full of
enthusiasm for engineering a practical version of the universal machine — in modern
parlance a stored-program computer. By a remarkable sequence of events Turing was
taken on by the National Physical Laboratory, London, with exactly this commission.
His plan was submitted in March 1946 (Turing 1946). As well as pioneering key ideas
in computer hardware and software design, it mentioned the idea of the machine
showing 'intelligence,' with chess-playing as a paradigm. This germ then rapidly
developed into the programme set out in the 1950 paper.

4.2 INTELLIGENCE AND INTUITION


Although basically correct, a subtle adjustment to this basic story is required, and it is
FOUR | THE TURING TEST

one that casts light on the structure and content of the 1950 paper. A reading of that
paper will show that Turing was highly aware of the natural objection that machines
cannot do those things which are by nature non-mechanical: those human actions
that require initiative, imagination, judgment, cause surprise, are liable to errors, and
so forth. Much of his argument is directed to the claim that machines would, in fact,
be capable of all these apparently non-mechanical things.

But there is no reflection of this claim in his 1936 work. In (Turing 1936-7) the 'states
of mind' that Turing considered were only those employed when the mind is occupied
on performing a definite method or process. There was no reference to imagination
or initiative in the 'states of mind' of On computable numbers.

Page | 72
BSc In Information Technology | AI 700

So we can ask: at what point in his biography did Turing adopt the idea that
computable operations would encompass everything normally called 'thinking' rather
than only 'definite methods'? Or equivalently, when did he first consider that
operations which are in fact the workings of predictable Turing machines, could
nevertheless appear to the human observer as having the characteristics of genuine
intelligence and creativity?

Turing wrote very little about his own intellectual development, and his writings do
not give a direct answer to this question. However there are two important stages in
his work, not mentioned in the above account, which when considered in their
context suggest a plausible answer: namely at some point after 1938 and probably in
about 1941.

During the two years Turing spent at Princeton, from 1936 to 1938, he was
investigating the logic of the incomputable. Turing's exposition (Turing 1939)
described the 'formulae, seen intuitively to be correct, but which the Gödel theorem
shows are unprovable in the original system.' In this pre-war period, Turing
apparently left open the possibility that the mind had an 'intuitive' power of
performing incomputable steps beyond the scope of the Turing machine (a thesis,
incidentally, that was always held by Gödel himself.)

But in the period around 1941 when the immediate crisis of the Enigma problem was
resolved, Turing began to discuss with colleagues at Bletchley Park the possibility of
machines playing chess (Hodges 1983, p. 213). Chess-playing was in fact a civilian
analogue of what they were doing in their secret work, in which mechanical methods
of great sophistication were outdoing some aspects of human intuition. It seems,
taking the view expressed in (Hodges 1997, 2002), that Turing probably decided in
about 1941 that the scope of computable operations was in fact sufficient to account
FOUR | THE TURING TEST

for those mental operations apparently 'non-mechanical' by the standards of ordinary


language, and even the apparently uncomputable operations of truth-recognition.
There was possibly another wartime influence on his development: Turing' general
exposure to modern ideas such as the neural physiology of the brain and the
behaviourist model of the mind. McCulloch and Pitts (1943) related their logical
model of neurons to Turing's computability; Turing returned the compliment by
referring to this work. Turing was developing the picture of the brain as a finite
discrete state machine. In a sense this was only a small step from the 'finitely many
states of mind' of 1936. But it went further because Turing's postwar idea was that
all mental function of the brain could be accommodated in this model, and not just
those of a mind following a definite rule. As we shall see, Turing framed an argument

Page | 73
BSc In Information Technology | AI 700

to explain how this mechanical picture of the brain could be reconciled with the
counter-arguments from Gödel's theorem.

Very possibly it was this new conviction that made him so enthusiastic in the closing
stages of the war about the prospect of building an electronic version of the universal
machine. He was not highly motivated by building a computer to work out
programmed mathematical operations. His interest was more in the nature of the
mind. Informally, when speaking of his computer plans in 1945, he called them plans
for 'building a brain.'

4.3 INTELLIGENT MACHINERY


With this in mind, we can examine in more detail his very first written mention of
'intelligent' machinery in (Turing 1946). One should first note how remarkable it was,
that Turing should put a speculative claim about intelligence in a purely technical,
practical report. However this was entirely typical of his modus operandi. One should
next appreciate that Turing always relished the paradox, even apparent contradiction
in terms, involved in speaking of 'intelligent' machinery. First he explained how the
computer could be programmed to calculate chess moves. He continued, underlining
the paradox:

This... raises the question 'Can a machine play chess?' It could fairly easily be made to
play a rather bad game. It would be bad because chess requires intelligence. We
stated... that the machine should be treated as entirely without intelligence. There
are indications however that it is possible to make the machine display intelligence at
the risk of its making occasional serious mistakes. By following up this aspect the
machine could probably be made to play very good chess.

This mysterious reference to 'mistakes', which could have made no sense to anyone
reading this report, is explained in a talk of February 1947 (Turing 1947). Here the
FOUR | THE TURING TEST

idea of 'mistake-making' appeared in the context of the objection to the prospect of


machine intelligence posed by Gödel's theorem. This objection (which appears as 'The
Mathematical Objection' in the 1950 paper) is that no Turing machine (i.e. computer
program) can do as well as a human being. The human being can see the truth of
mathematical assertions which cannot be proved by following rules based on formal
axioms.

Turing's post-war argument (the point of view he probably arrived at in about 1941)
is, however, that human beings do not reliably see the truth of such statements.
Mathematicians, their brains being discrete state machines, can only employ an
algorithm. Gödel's theorem tells us that no algorithm can coincide in every case with

Page | 74
BSc In Information Technology | AI 700

truth-seeing, and so the algorithm is bound sometimes to fail. But if it is accepted that
the mathematician is not infallible, and will sometimes fail, it follows that machines
— also implementing algorithms, and therefore also making mistakes — may do
equally well. To illustrate the theme of doing equally well, Turing appealed to the
concept of 'fair play for machines.' This concept was essentially the idea of the
imitation game. The 1950 scenario merely added dramatic detail. Thus, the imitation
game had its origins in the wartime debate in Turing's own mind about how to
reconcile Gödel's theorem and the apparently non-mechanical actions of human
minds with the discrete state machine model of the brain.

After 1947 Turing continued to a wider and more constructive discussion of how
machines might perform apparently non-mechanical tasks: how completely
unintelligent micro-operations might add up to intelligent processes. It was presented
in an internal report 'Intelligent Machinery' for the National Physical Laboratory
(Turing 1948). This was not published (until 1968), but was in many ways the basis of
his better-known and less technical 1950 exposition. One interesting feature of this
1948 report is the evidence it gives of a wartime inspiration for his new ideas. Turing
referred to images of the writer Dorothy Sayers, to illustrate the commonly accepted
meaning of 'mechanical' behaviour. The book he quoted was one he was reading at
Bletchley Park in 1941. Turing also tellingly described 1940 as the date after which
machines were no longer restricted to 'extremely straightforward, possibly even to
repetitious, jobs.' He must have had his own Enigma-breaking Bombe, and other
highly sophisticated codebreaking operations, in mind.

In this report, Turing characterised intelligence as requiring 'discipline', which he


identified with the programmability of a universal machine, plus a residue of
'initiative.' Initiative now played the role that 'intuition' had done in 1938: mental
actions apparently going beyond the scope of a 'definite method'. How was initiative
to be found within the scope of computable operations, and so implemented on a
FOUR | THE TURING TEST

computer?

Turing suggested various possibilities all based on imitating human brains: learning,
teaching, training, searching. From the outset of his design work in 1945, Turing had
been enthusiastic for exploiting the feature of a stored-program computer that a
program can be manipulated in the same was as data. These ideas took his
enthusiasm further, by having the machine actively modify its own programs. Turing
emphasized that at a more fundamental level the concept of 'a machine changing its
own instructions' was 'really a nonsensical form of phraseology', but it was
convenient. The upshot of his argument was that by one means or another, and

Page | 75
BSc In Information Technology | AI 700

probably using many methods in combination, a computer could be made to imitate


the mental functions of human brains.

From a purely biographical point of view, it is remarkable that someone so original,


and whose individual qualities had generally been stoutly resisted by his social
environment, should arrive at the conclusion that creativity is a computable process,
something that could be achieved by a computer. But it was where he was led by his
guiding idea of the brain as a finite machine, whose operations must be computable
however different they appeared from what people had hitherto thought of as
'mechanical' in nature.

4.4 THE IMITATION OF MIND


This 1948 work was the background to the 1950 paper, in which Turing made a more
public claim than ever before that intelligence can be evinced by computing
machinery: i.e. belonged to the realm of computable processes. It was also a more
ambitious claim than ever, since by provocative forays into the world of the Arts with
witty talk of Shakespeare and sonnets, Turing made it quite clear that he was not
restricting 'intelligence' to some special science-minded arena. The famous Test,
pitting human against machine in demonstrating intelligence, embodied the 'fair play'
announced in 1947. The setting of the test, however, with its remote text-based link,
did have a further functional significance. It was supposed to give a way of separating
those things Turing considered as relevant to intelligence, as opposed to other human
faculties involving their many senses and physical actions. It is probably in drawing
this distinction that Turing showed the least certainty, and this aspect of his paper has
attracted the most criticism.

Returning, however, to Turing's central idea, it should be emphasized that Turing


never imagined that the structure of the brain would resemble that of a computer,
with a central control unit processing instructions serially. The crucial point here lies
FOUR | THE TURING TEST

in Turing's exposition of the universal machine concept (p. 441). It follows from his
argument that provided the operation of 'thought' is equivalent to the operation of
some discrete state machine, it can be simulated by a program run on a single,
universal machine, i.e. a computer. Thus Turing threw all his emphasis on the
development of what would now be called software, rather than on the engineering
of a brain-like object.

This point can be further refined. Turing's description of computability in the 1950
paper was all based on the finite capabilities of real, finite machines, illustrated by an
account of the Manchester computer as it then stood. His claim was that the
simulation of thought did not even require the full scope of computable functions,

Page | 76
BSc In Information Technology | AI 700

only that infinitesimal fraction of them which could be run using only a finite amount
of 'tape'. (As a technical point, Turing's description did not even mention the 'tape'.
This is because a finite tape can be absorbed into the instruction table of a Turing
machine, which in turn he identified with the store of a computer such as the
Manchester computer. This resulted in him rather confusingly describing the full
gamut of computable processes as requiring an 'infinite store.' This is, however, just
the unlimited supply of tape as prescribed in 1936, not an infinite instruction table.)
He specified a necessary storage capacity of 109 bits, which of course is far surpassed
by modern personal computers.

A fortiori, there is no suggestion in this paper of anything beyond the scope of


computability. There were three areas of Turing's discussion where mathematics
beyond the computable was raised, but in each case the thrust of Turing's argument
was that computable operations would suffice. One of these was the Gödel argument,
actually rather more weakly addressed in this than in his earlier papers, but still
concluding that it had no force. The second lay in Turing's discussion of 'the continuity
of the nervous system.' He claimed that the brain's basis in continuous matter, rather
than being a discrete machine, was again no argument against the computability of
thought: a discrete system could approximate a continuous one as closely as desired.
The third was the concept of randomness, which Turing introduced without any
serious definition. His illustration used 'the digits of π' as a random sequence, and this
is par excellence a computable input.

In fact Turing's exposition also runs through two stages, reflecting what has been
suggested above as his '1936' and '1941' stages of development. First the concept of
computable functions, thought of as planned instructions (p. 438), and then followed
the finite discrete state machine picture (p. 440). However, as he argued, these
differently pictured machines could alike be implemented on a universal machine, the
computer. This same two-part structure came into his final constructive proposals for
FOUR | THE TURING TEST

the development of machine intelligence. Turing imagined rule-based programming


(rather like expert systems as later developed), but also the 'child machine' learning
for itself. Turing concluded by recommending that 'both approaches should be tried':
he never suggested a rigid dichotomy between top-down and bottom-up approaches,
which was later to divide Artificial Intelligence research so deeply.

4.5 AFTER THE TEST


No account of Alan Turing would be complete without a mention of his last years.
Computing Machinery and Intelligence was shot through with courtroom images of
juries and trials; they were prophetic. Turing was arrested for his affair with a young
Manchester man in 1952. All homosexual behavior was then illegal. He was seriously

Page | 77
BSc In Information Technology | AI 700

disturbed by the punishment that ensued: his brain was 'treated' with estrogen. But
his mind did not atrophy in this new period. In 1950 he had begun serious work,
involving use of the Manchester computer, on a new theory of non-linear partial
differential equations, proposed as 'the chemical basis of morphogenesis'. This and
other research continued vigorously despite the interruption. (So did his personal life,
which as usual he refused to adjust to the expectations of society.)
The question arises as to whether there were further developments in Turing's ideas
about machine intelligence after 1950. There is an indication that there were. In the
following year his popular talk on BBC radio (Turing 1951). It was basically a version
of what he had set out in the 1950 paper. He explained the principle that any
mechanical process could be simulated by a program run on a single machine, the
computer: in particular, he had in mind the function of the brain. But this time he
inserted an important caveat that had not been made in 1950. The machine to be
simulated ...should be of the sort whose behavior is in principle predictable by
calculation. We certainly do not know how any such calculation should be done, and
it was even argued by Sir Arthur Eddington that on account of the indeterminacy
principle in quantum mechanics no such prediction is even theoretically possible.

Copeland (1999) has rightly signaled the importance of this new point, but his critical
context suggests a link with the 'oracle,' a particular kind of incomputable function
used in Turing's 1938 work (Turing 1939). But Turing made no reference to this
'oracle' when admitting this possibly fatal flaw in his argument about the brain as a
discrete state machine. The question he was raising was whether the space-time
properties of quantum-mechanical physics could be captured by a discrete state
machine model. And this was a question which went back to his earliest serious
thought, being related to the work by Eddington and von Neumann that he was
reading in 1928-32, especially that of Eddington.

In 1932 Turing had speculated, influenced both by Eddington, and by trauma in his
FOUR | THE TURING TEST

personal life, that quantum mechanics underpinned free will (Hodges 1983, p. 63).
The relationship between von Neumann and Turing has enjoyed much attention
because of the question of who first had the idea of a practical universal machine
(Hodges 1983, see also Davis 2000). Less well known is that Turing's first serious
research study was of von Neumann's work on the foundations of quantum
mechanics. Von Neumann clarified the measurement or reduction process in
quantum mechanics; it is this which is not predictable. Seventy years later there is no
agreed or compelling explanation of how or when such 'reduction' occurs. In 1953-4
Turing wrote to his friend and colleague Robin Gandy that he was 'trying find a new
quantum mechanics' (Gandy 1954). Probably he was trying to make a predictable

Page | 78
BSc In Information Technology | AI 700

theory of the reduction process, to close the loophole in his argument for the
computability of brain processes. However he died in 1954 before announcing any
result.

His last published paper (Turing 1954), was again semi-popular, appearing in Penguin
Science News. This did not mention quantum mechanics, but it went back to the pure
mathematics of computability (which had taken recent new life with advances in
algebra), and gave an account of Gödel's theorem. His conclusion was surprisingly
unlike that pronounced 1950; he said that Gödel's theorem showed that 'common
sense' was needed in interpreting axioms, and this time the intuitive 'common sense'
was not asserted to be a something a machine could show as well as a human being.
The year 1950 seems to have marked the peak of his dogmatism about machine
intelligence, but it is impossible to know how his views would have developed had he
lived longer.

In recent years Roger Penrose has taken up the two themes that Turing found most
difficult to fit into his thesis of computable mental functions — Gödel's theorem and
the quantum-mechanical reduction process — and has said that they must be
connected (Penrose 1989, 1994, 1996). Penrose holds that the function of brain
cannot be simulated by a computer program because of its quantum mechanical
physical basis. Thus, for entirely materialist reasons, no truly intelligent behaviour will
ever be simulated by a computer: the full Turing test will never be passed. Many
commentators have attacked this conclusion, but it must be said that the topics
Penrose emphasises are those that Turing himself found central to his arguments.
We are now so used to the properties of digital machines that is hard to imagine the
world in which Turing conjured them from pure imagination in 1936. However it is
crucial to see that what Turing offered in 1950, based on this earlier work, was
something that went beyond the traditional mind-matter debate, and beyond loose
science-fiction talk about humans and robots. It had a new solid substance in the
FOUR | THE TURING TEST

digital or discrete-state machine model, made clear as never before. This structure,
however, had a non-obvious limitation expressed by Gödel's theorem and Turing's
own discoveries in the theory of computability. Turing always had these questions in
mind. Turing's universal machine now seems to sweep all before it, and continues to
captivate us with the apparently never-ending range of applications that it can
encompass. Turing's own excitement for this project, his game-playing enthusiasm
and iconoclastic humour, live on in every conversation-program writer of the present
day. But it should be remembered that Turing's imitation game actually first arose as
the 'fair play' argument for escaping the force of Gödel's theorem and the serious
puzzle posed by the limits of what can be computed.

Page | 79
BSc In Information Technology | AI 700

SECTION SUMMARY

50 years ago Alan Turing created a test to determine how computers can be as smart
as people. He said if we posed the same questions to a computer and a person and
could not tell from the answer which was which, then computers would essentially
have become as smart as people. Below are questions that an average person could
answer but a computer could not.
FOUR | SUMMRY

Page | 80
BSc In Information Technology | AI 700

KEY TERMS USED IN THIS SECTION

Turing Test -The test that is used to judge whether a computer is intelligent or not.
Crossover — the combination of parts of two superior solutions in an attempt to
produce even better solutions. A technique used in the genetic algorithm.
Knowledge — Understanding, awareness, or familiarity acquired through education
or experience. Anything that has been learned, perceived, discovered, inferred, or
understood. The ability to use information.
Knowledge Acquisition — the extraction and formulation of knowledge derived from
various sources, especially from experts.
Knowledge Base — A collection of facts, rules, and procedures organized into
schemas. The assembly of all of the information and knowledge of a specific field of
interest.
Knowledge-based System (KBS) — typically a rule-based system for providing
expertise. Identical to expert systems, except that the source of expertise may include
documented knowledge.
FOUR | GLOSSARY OF TERMS

Page | 81
BSc In Information Technology | AI 700

UNIT 1 REVIEW QUESTIONS

1. A person can deal with rhymes, non-sequitors and a message with


conflicting instructions.
In the following sentence, the correct answer is indicated by the capitol letters.
They spell out a word that rhymes with the correct answer. Ignore the literal
content of the question and insert the number that sounds just like the word
spelled out by the caps.

Question: What is the Only correct aNswer to the following question


2 + 2 = __
2. Inflection can reverse the meaning of a statement. A computer cannot know
when this is occurring or that a description of a person would suggest he would
make a statement in the form of its reverse for emphasis as occurs with Jewish
people from Brooklyn who have been exposed to a lot of Yiddish where reversal
by inflection is common.

3. Question: When a son asked his Orthodox Jewish father from Brooklyn if he
should marry a Catholic girl, his father exclaimed: "Her?!, you should marry?!"
Did the father want his son to marry the girl? Y__ N__
FOUR| REVIEW QUESTIONS

Page | 82
BSc In Information Technology | AI 700

FIVE | AXIOMS AND PREDICATE CALCULUS

LEARNING OUTCOMES

After completing this chapter, Learners should be able to:


1. Demonstrate an understanding and skill in the application and
conceptualization of axiomatic systems for propositional and
predicate logic.
2. Demonstrate an understanding through application of the ideas of
soundness, completeness and decidability of propositional logic.

5.0 INTRODUCTION
An axiom is a statement that everyone believes is true, such as "supply equals
demand" or "the only constant is change." Mathematicians use axiom to refer to
established proofs
FIVE | AXIOMS AND PREDICATE CALCULUS

Predicates

A predicate is a boolean function whose value may be true or false, depending on the
arguments to the predicate.

* Predicates are a generalization of propositional variables.

* A propositional variable is a predicate with no arguments.

Example - Consider the following boolean propositions:

A (Adam is tall)
B (Beth is tall)
C (Carl is tall)
:
Z (Zeke is tall)

We need a different proposition for each person; each of these propositions


is either true or false.

Page | 83
BSc In Information Technology | AI 700

We can capture the same set of truth values using a single predicate (or
boolean function), Tall(x).

Tall(x) is true whenever person x is tall, and is false otherwise.

* Tall(Adam) is true if proposition A above is true.


* Tall(Beth) is true if proposition B above is true.
* Tall(Carl) is true if proposition C above is true.

Predicates are atomic operands in the logical expressions of predicate logic.

An argument can be either a constant or a variable. It is conventional to write


variables with an initial upper-case letter. Constants can be numbers, names that
begin with a lower-case letter, or quoted strings.

A relation (remember the first unit this semester?) is one way to represent a
predicate. Use the relation name P as the predicate name;
If P has three columns, then P(a,b,c) is true if there is a tuple with fields a, b, and c.

1. . Translate the following axioms into predicate calculus


AND PREDICATE CALCULUS

1. Mary is a lawyer
2. Ann is a computer scientist
3. Ann is rich
4. Lawyers are rich
5. Computer scientists are smart
6. Lawyers have nice cars
7. Smart, rich people have nice cars

1. lawyer(mary)
2. computer_scientist(ann)
3. rich(ann)
4. lawyer(X)  rich(X)
5. computer_scientist(X)  smart(X)
SUMMRY

6. lawyer(X)  nice_car(X)
TWO||AXIOMS

7. smart(X)  rich(X)  nice_car(X)


b. Unifications and inferences necessary to prove Ann has a nice car

. unify 2 with left side of 5 to conclude


8: smart(ann)
FIVE

unify 3 and 8 with left side of 7 to conclude

Page | 84
BSc In Information Technology | AI 700

9: nice_car(ann)
c. The corresponding and/or graph.

2. a. Translate problem 6 into PROLOG


lawyer(mary).
computer_scientist(ann).
rich(ann).
rich(X):-
lawyer(X).
smart(X):-
computer_scientist(X).
nice_car(X):- lawyer(X).
nice_car(X):-
smart(X),
rich(X).

b. What will be the PROLOG queries and resulting answers for the following:
1) Does Ann have a nice car?
2) Who is rich?
FIVE | AXIOMS AND PREDICATE CALCULUS

?- nice_car(ann).
yes

?- rich(X).
X = ann ;

X = mary

c. What are the advantages/disadvantages of this representation over that in


problem 6?

Disadvantages:
1. You have to learn PROLOG.
2. One can get mixed up as to which side the sufficient and necessary clauses should
go and the meanings of the symbols.
3. Developing a more complex problem would yield more errors because of the
probable detail of the problem whereas words could explain the problem better
Advantages:
1. it is formal and automated

Page | 85
BSc In Information Technology | AI 700

Write 3 of the following predicates in PROLOG:


a. stepmother(X, Y).
stepmother(Z, Y) :- remarried (X, Z), birthparent (X, Y). //z
b. cousin(X, Y).
cousin(X,Y) :- (parent(W,X) ^ siblings(W,Z)) ^ parent (Z, Y). //z
c. subset(L, LL) which returns true if L is a subset of LL
d. flatten(L, LL) which returns the elements in list L with possible sublists in LL with no
sublists. For example, if L is [1, [2,3], [[4]], 5) LL is [1, 2, 3, 4, 5].

Problems On Predicate Calculus

1. It rained on Tuesday.
weather (Tuesday , rain

2. It rained every days.


FIVE | AXIOMS AND PREDICATE CALCULUS

weather(X , rain)  day(X

3. mother(layla, adel)
mother(layla, suha)
father(adam, adel)
father(adam, suha)

XY father(X,Y)  mother(X,Y)  parent(X,Y)


XYZ parent(X,Y)  parent(X,Z)  brother(Y,Z)

In the last example we use the predicate mother and father to define a set of other
relationships such as parent and brother.

Predicate calculus semantics : provide a formal basis for determining the truth value
of Well Formed Formula (WFF) . The truth of expressions depends on the mapping of
constants, variables and functions into objects and relation in the domain of
discourse.

Page | 86
BSc In Information Technology | AI 700

First order predicate Calculus : It is a language allows quantified variables to refer to


objects in the domain of discourse and not to predicates or functions.

Problems On Predicate Calculus

1. if it doesn't rain tomorrow . Tom will go to the mountains.


~weather(rain, tomorrow)  go (tom, mountains)

2. All persons who play football are tall


XY (person(X) ^ play(X,Y) ^ football(Y)  tall(X)

3. some person like anchovies.


X (person(X) ^ like (X, anchovies)).

4 Nobody likes taxes.


~ X likes(X, taxes)
FIVE | AXIOMS AND PREDICATE CALCULUS

or X ~likes(X, taxes).

A block world with it is predicate calculus description.


- To pick up a block and stack it on another block, both blocks must be clear. In figure
above, block [a] is not clear.
- Because the arm can move blocks, it can change the state of the world and clear a
block.
The following rule describes when a block is clear:

X(~Y on(Y,X)  clear(X)).

That is , for all X , X is clear if there does not exist Y such that Y is on X.

- Besides using implication to define when a block is clear, other rules may be added
that describe operations such as stacking a block on another.

Page | 87
BSc In Information Technology | AI 700

For example : to stack X on Y first empty the hand, then clear Y, then clear X, and then
pick-on X. and put-down X on Y.
XY (( hand-empty ^ clear(X) ^ clear(Y) ^ pick-up(X) ^
put-down(X,Y)  stack (X,Y))

(1) (2) (3)

X
X
Hand-empty X Y pick-up(X) Y put-down(X,Y) Y
Clear(x)
Clear(y)
FIVE | AXIOMS AND PREDICATE CALCULUS

Page | 88
BSc In Information Technology | AI 700

Problems

1. Suppose we want to model the blocks world of figure below to design


a control algorithm for a robot arm :

Free - hand

c b
a d
Table

on (c, a).
on (b, d).
FIVE | AXIOMS AND PREDICATE CALCULUS

on-table ( a )
on-table ( d )
clear ( b ) % nothing above b
clear ( c ) % nothing above c
hand-empty. % free hand

2. Every person who get married and have at least a child is called father
X(married(X) ^ have (X, child)  father(X))

3. John didn't study but is lucky.


~ study (john) ^ lucky(john)

4. Any one who studies or is lucky can pass all their exams.
XY(study(X) v lucky(X)  pass(X,Y) ^ exam(Y)

5. Any one passing their exams and winning the lottery is happy.
X(pass(X, exams) ^ win (X, lottery)  happy(X))

Page | 89
BSc In Information Technology | AI 700

Using inference Rules to produce predicate Calculus Expression :


The semantic of predicate calculus provide a basis for a formal theory of logical
inference. The ability to infer new correct expansions from a set of true assertions is
an important feature of predicate calculus.

S : X human(X)  mortal (X)


An inference rule is essentially a mechanical means of producing new predicate
calculus sentences from other sentences. That is, inference rules produce new
sentences based on the syntactic from a given logical assertions.
Modus Ponens:
Is a sound inference rule. If we are given an expression of the form PQ and
another expression of the form P such that both are true under an interpretation,
Modus Ponens allows to infer that Q is true for that interpretation.

PQ true
P true
Q true
Modus Tolens :
If PQ is know to be true and Q is known to be false we can infer ~P.
FIVE | AXIOMS AND PREDICATE CALCULUS

PQ True
Q False
~P
A simple example of the use of Modus Ponens is the propositional calculus, assume
the following observation:
if "it is raining" then "the ground will be wet"
And "it is raining" if P denotes " it is raining" and Q is "the ground is wet"
PQ True
P True
Q

Through an application of Modus Ponens, the fact that the ground is wet (Q) may
be added to the set of true expression.
- Modus Ponens can also be applied to the expression containing variables. For
example:

“All men are mortal and Socrates is a man";


Therefore Socrates is mortal.
X(man(X)  mortal (X)).

Page | 90
BSc In Information Technology | AI 700

man(Socrates)
mortal(Socrates)

Because the X in the implication is universal quantified, may substitution any value
in the domain for X and still have a true statement under the inference rule of
universal institution.
By substituting Socrates for X in the implication, we infer the expression:
man(Socrates)  mortal(Socrates).

5.1 PRODUCTION SYSTEMS: Is one of the oldest techniques of knowledge


representation. Production system consist of a set of production rules, a working
memory , and a recognize-act control cycle.

1- The Set of Production Rules:


These are often simply called productions.
A productions is a condition, action pair and defines a single chunk of problem-solving
knowledge.
The condition part of rule is a pattern that determines what the rule may applied
to a problem instance. The action part defines the associated problem-solving step.
Example :
FIVE | AXIOMS AND PREDICATE CALCULUS

PR1 :
if (person age above -21) & (person wife nil) & (person sex male)
then (person eligible for marriage)

2- Working Memory:
The working memory (WM) generally holds data either in the form of clauses or
object- attribute – value (OAV) triplet form. The variables in condition part are
matched against the data items of the WN. In cases all the variable instantiation of
the condition parts of a rules are consistent, then the rule is fired and the new
consequents are added to the WM and some old data of WM, Which are no longer
needed, are deleted from the WM to minimize the search time required for matching
the condition parts of a rule with the data in WM.

Example for Production System:


The 8-Puzzle

2 8 1 2
3 3
1 6 8 X
4 4
Start Goal

Page | 91
BSc In Information Technology | AI 700

Production Set :
Condition Action
Goal state in working memory  stop
Blank is not on the top edge  move the blank up
Blank is not on the right edge  move the blank right
Blank is not on the bottom edge  move the blank down
Blank is not on the left edge  move the blank left
Working memory is the present board state and goal state.

Control Recognize :
1- Try each production in order.
2- Do not allow loops.
3- Stop when goal is found.

Predicate logic is a mathematical model for reasoning with predicates:


functions that map variables to truth values.

As in propositional logic, we can create logical expressions containing


predicates, manipulate those expressions according to the algebraic laws
FIVE | AXIOMS AND PREDICATE CALCULUS

of predicate logic, and construct proofs using rules of inference to


deduce new facts from axioms. In fact, proofs in predicate logic (based
on unification) are a form of computation used in the programming
language Prolog.

Although predicate logic is more powerful than propositional logic, it


too has its limits.

Quantifiers
All we want to know about a given proposition A (Adam is tall) is whether A
is true or false.

Given a predicate such as Tall(x), we want to know whether Tall(x) is true


for different values of x.

In addition, we might like to know whether Tall(x) is true for every


possible value of x, or whether Tall(x) is true for some value of x.

Predicate logic has two additional operators not found in propositional


logic (called quantifiers) to express truth values about predicates with

Page | 92
BSc In Information Technology | AI 700

variable arguments.

* Existential quantifier E (there exists): (E x) Tall(x) is true if there


exists some value for x such that Tall(x) is true.

* Universal quantifier A (for all): (A x) Tall(x) is true if Tall(x) is


true for all values of x.

[NB: the existential quantifier is written with a backward E. The


universal quantifier is written with an upside-down A. I can't type
those in ascii. Please DO NOT feed me ordinary E's and A's on the
final: write them the way they're supposed to be written.]

Logical Expressions in Predicate Logic

A logical expression in predicate logic has much the same form as a logical
expression in propositional logic, with the addition of atomic formulae
(ie., predicates), and the universal and existential quantifiers.

1. An atomic formula is a logical expression.


FIVE | AXIOMS AND PREDICATE CALCULUS

o A predicate with all constant arguments is a ground atomic


formula.
o A proposition is a predicate with no arguments, and therefore is a
ground atomic formula.
o A predicate with at least one variable argument is a nonground
atomic formula.
o A literal is either an atomic formula or its negation.

2. If L1 and L2 are logical expressions, then L1 AND L2, L1 OR L2, NOT L1,
L1 -> L2, and L1 == L2 are logical expressions.

3. If L1 is a logical expressions, then (A X) L1 is a logical expression.

4. If L1 is a logical expressions, then (E X) L1 is a logical expression.

Quantifiers have the highest precedence in logical expressions.

Page | 93
BSc In Information Technology | AI 700

5.2 BOUND AND FREE VARIABLES


The quantifiers E (there exists) and A (forall) introduce variables into
logical expressions.

An occurrence of variable x in a logical expression is bound to the closest


enclosing quantifier containing x, either (E x) or (A x).

If an occurrence of x in a logical expression is not bound to any quantifier


(because there is no enclosing quantifier containing x) that occurrence of x
is free.

Example:

(A x) L1(x) OR (E x) L2(x,y)

The variable x in L1 is bound to the universal quantifier. The variable


x in L2 is bound to the existential quantifier. The variable y is free
in this expression.

In order for an expression to be *closed*, all of its variables must


FIVE | AXIOMS AND PREDICATE CALCULUS

be bound. Cf. scope in programming languages. A common convention is


to say that all variables that are unbound at the outermost nesting
level are implicitly universally quantified.

Evaluating Predicates
There are two ways to evaluate the truth of a predicate P(x,y):

* Assign a real-world interpretation to P (such as addition, subtraction,


or equivalence) and a domain for P (ie, the possible values for the
arguments) and compute the function P(x,y) under that interpretation.

o If we assign the interpretation "equivalence" to P, and let the


domain for P be the set of integers, then we can evaluate P(1,2)
by asking is 1 equivalent to 2 (false).

o If we assign the interpretation "less than" to P, and let the


domain for P be the set of integers, then we can evaluate P(1,2)
by asking is 1 less than 2 (true).

o If we assign the interpretation "brother" to P, and let the domain

Page | 94
BSc In Information Technology | AI 700

for P be all students on campus, then we can evaluate


P(Adam,Barney) by asking whether or not Adam and Barney are
brothers.

* Consult a relational database containing pairs of values for x and y


and the corresponding value of P(x,y).

o If the interpretation for P is "grade in CSC173" and the domain of


x is all students on campus, and the domain of y is the set of
possible grades, then we can evaluate P(Rosemary,"A") by looking
up Rosemary's grade in the grade file for 173.

o If we assign the interpretation "has a better overall record" to


P, and let the domain of P be the set of professional football
teams, then we can evaluate P(Buffalo, Miami) by looking up their
respective records in a football database.

Note that the relation approach is limited to finite domains, or at


least finite sets of arguments for which the predicate is true. The
real world interpretation approach can have an unbounded number of
FIVE | AXIOMS AND PREDICATE CALCULUS

sets of arguments for which the predicate is true. This tradeoff


has implications for systems such as Prolog. Numbers are
special-cased in Prolog, but for everything else the system suffers
from what is called the "closed world" problem.

Tautologies
A tautology in propositional logic is a statement that is true
regardless of the truth assignment of propositions.
A tautology in predicate logic is a statement that is true regardless of
the interpretation of predicates, and regardless of the bindings chosen
for any globally unbound variables.

We can combine these statements to say, in general, a logical tautology


is a statement that is true regardless of *model*. In propositional
logic a model is a truth assignment for propositions. In predicate
logic a model is an interpretation for predicates and a binding for any
globally unbound variables.

Page | 95
BSc In Information Technology | AI 700

Evaluating Predicates: Example


Consider the following family history to be relations (or facts) in a family
tree database:

male(Adam) female(Ann)
male(Barney) female(Beth)
male(Bob) female(Barb)
male(Carl) female(Carol)
male(Chet) female(Chris)

parent(Adam,Barney) parent(Ann,Barney)
parent(Adam,Beth) parent(Ann,Beth)
parent(Adam,Bob) parent(Ann,Bob)
parent(Adam,Barb)

parent(Barney,Carl) parent(Carol,Carl)
parent(Carol,Chet)

To find the name of Barney's father, we can assert the following to be true:
FIVE | AXIOMS AND PREDICATE CALCULUS

parent(x,Barney) AND male(x) -> father(x,Barney)

This assertion states that if x is a parent of Barney, and x is male, then x


is the father of Barney.

Note that we haven't defined a father relation in our database; asserting


the above expression to be true is the only definition of "father" we need.

We know this expression evaluates to true (since we asserted it) regardless


of the value of x. We can assign a constant value to x (someone's name),
producing ground atomic formulae, which we can evaluate as true or false.

When we substitute Adam for x, we find parent(Adam,Barney) and male(Adam)


are true, so father(Adam,Barney) must be true as well (since the whole
expression must be true).

Evaluating Quantifiers
To evaluate a quantifier for a predicate we must first define

* the domain over which the quantifier varies (that is, the set of values

Page | 96
BSc In Information Technology | AI 700

for the predicate's arguments)


* the interpretation of the predicate (that is, the meaning of the
predicate)

When we state "there exists x such that P(x)" we must be explicit about the
possible values x can take (the domain of P). We evaluate P(x) for each
value of x in the domain of P (according to the interpretation for P), and
if P(x) is true for some x, then the expression (E x)P(x) is true.

Similarly, when we assert "for all x P(x)" we must be clear about what
possible values of x we consider (again, the domain of P). We evaluate P(x)
for all values of x in the domain of P (again, according to the meaning of
P), and if P(x) is true for all x, then the expression (A x)P(x) is true.

Note that if the domain of P is infinite, we don't have an algorithm (which


terminates) to compute the value of P.

* In many cases, we'll have a finite domain, so we do have an algorithm.


* In many cases we're concerned about whether two expressions are
equivalent, and not whether a particular expression is true or not.
FIVE | AXIOMS AND PREDICATE CALCULUS

Evaluating Predicate Expressions: Example


Consider the following logical expression in predicate logic:

P(x,y) -> (E z)(P(x,z) AND P(z,y))

We can read this as "if P(x,y) then there exists z such that P(x,z) and
P(z,y)". (Assume that x and y are universally quantified.)

If we make the domain of P the set of real numbers, assign the values 5.1
and 4.2 to the free variables x and y, and interpret P to mean "greater
than", then we can evaluate the expression as follows:

P(x,y) = P(5.1,4.2)
= 5.1 > 4.2
= true

(E z) (P(x,z) AND P(z,y))


= (E z)((5.1 >z) AND (z > 4.2))

Page | 97
BSc In Information Technology | AI 700

= true (for z=4.8)

true -> true = true

If we make the domain of P the set of integers, assign the values 5 and 4 to
the free variables x and y, and interpret P to mean "greater than", then we
can evaluate the expression as follows:

P(x,y) = P(5,4)
=5>4
= true

(E z) (P(x,z) AND P(z,y))


= (E z)((5 > z) AND (z > 4))
= false

true -> false = false

Summary of evaluation:
(1) The truth of many statements with unbound variables is indeterminate:
FIVE | AXIOMS AND PREDICATE CALCULUS

Some statements (e.g. P(x) OR NOT P(x)) may be true regardless of


bindings (and others may be false, regardless), but in general we
need bindings.

(2) The truth of many statements depends on the interpretation of predicates.


Again, some statements may be true or false regardless, but in
general we need interpretations.

(3) As we will see below, some statements under some interpretations and
proof systems are true but can't be proven.

Laws for Manipulating Quantifiers


Binding free variables in a tautology

If a logical expression L with free variables x1..xn is a tautology, then (A


x1)(A x2)..(A xn) L is also a tautology.

We can use the above rule to bind all free variables in a tautology to a
universal quantifier.

Page | 98
BSc In Information Technology | AI 700

P(x,y) OR NOT P(x,y) == 1


== (A x)(A y) (P(x,y) OR NOT P(x,y))

An expression with no free variables is a closed expression.

Moving NOT within a quantifier

There is rule analogous to DeMorgan's law that allows us to move a NOT


operator through an expression containing a quantifier.

NOT (A x) L(x) == (E x) (NOT L(x))

NOT (E x) L(x) == (A x) (NOT L(x))

The first rule can be read as "it is not the case that for all x, L(x) is
true" is equivalent to "for some x, it is not the case that L(x) is true".
The second rule can be read as "it is not the case that for some x L(x) is
true" is equivalent to "for all x, it is not the case that L(x) is true".

Moving quantifiers through AND and OR


FIVE | AXIOMS AND PREDICATE CALCULUS

L1 AND (A x) L2(x) == (A x) (L1 AND L2(x))


L1 AND (E x) L2(x) == (E x) (L1 AND L2(x))

L1 OR (A x) L2(x) == (A x) (L1 OR L2(x))


L1 OR (E x) L2(x) == (E x) (L1 OR L2(x))

Note that we require x is not a free variable in expression L1 in the above


rules. We may have to rename variable x (consistently) in L2 to avoid any
overlap with free variables in L1.

Manipulating Quantifiers: Example


Given the following expression:

(A x)P(x) OR (E x)(NOT P(x))

we can rename the second occurrence of x to avoid any overlap with the first
occurrence and arrive at the equivalent expression

Page | 99
BSc In Information Technology | AI 700

(A x)P(x) OR (E y)(NOT P(y))

Moving the universal quantifier through the OR we arrive at

(A x) (P(x) OR (E y)(NOT P(y)))

Moving the existential quantifier through the OR we arrive at

(A x) (E y) (P(x) OR NOT P(y))

Using these rules, we can write any expression involving quantifiers Q1, Q2,
.. QN, and the logical operators AND, OR, and NOT in *prenex form*:

(Q1 x1)(Q2 x2)..(Qn xn)L

where all the quantifiers appear outside expression L.

1. First, rewrite the expression so that all of the quantifiers refer to


distinct variables not found in other quantifiers or free in the
expression.
FIVE | AXIOMS AND PREDICATE CALCULUS

2. Use the rules above to move the quantifiers outside NOT, AND, and OR.

Proofs in Predicate Logic


A proof in predicate logic has much the same form as a proof in
propositional logic.

We begin with a set of axioms (or hypotheses) A1..An, and using the rules of
inference, we construct a sequence of expressions that follow from those
axioms.

We can use the rules of inference from propositional logic as inference


rules in predicate logic, including modus ponens, DeMorgan's laws, and the
substitution of equals.

We require that each hypothesis and line in the proof be a closed expression
(ie, there are no free variables whose scope extends beyond a line in the
proof).

Implication, entailment, and proof

Page | 100
BSc In Information Technology | AI 700

It's important to distinguish among three related concepts:

A -> B
"A implies B". This is a logical statement. It may be true or false.

A =| B
"A entails B". This is a "meta-statement" about truth.
B is true whenever A is true; more precisely, B is true in all
models in which A is true. If we know that A =| B then we know that
A -> B is a tautology.

A -| B
"B can be proven from A". This is a weaker meta-statement. It says
that under some given set of proof rules and interpretations for
predicates, if we are given A as premise we can derive B.

Substitution Rule
The law of variable substitution is an inference rule for use in proofs in
predicate logic.
FIVE | AXIOMS AND PREDICATE CALCULUS

Informally, this rule states that having established that a general fact (or
expression) is true, we can assert that a specific instance of that general
expression is also true.

In particular, if we can prove (or assert as an axiom) a logical expression


L1 containing free variables, then if we substitute constants or bound
variables for some of the free variables in L1 to create expression L2,
then the law of substitution states that L1 -> L2 is a tautology, and we
can assert L2 in the proof.

Consider the following assertion about the domain of real numbers:

Lt(x,y) -> (E z) (Lt(x,z) AND Lt(z,y))

If we substitute x=2 and y=5 in the original expression, then we can assert:

Lt(2,5) -> (E z) (Lt(2,z) AND Lt(z,5))

In other words, if the original expression holds for all x and y, then it
must hold for x=2 and y=5.

Page | 101
BSc In Information Technology | AI 700

Note that choosing x=5 and y=2 makes Lt(x,y) = false, and the entire
expression is still true (since false->anything is true).

Structure of a Proof in Predicate Logic


The simplest proofs in predicate logic consist of:

* facts, which are ground atomic formulas

male(Adam)
female(Ann)
parent(Adam,Barney)

* rules, which are the conjunction of one or more atomic formulae that
imply another atomic formula

parent(y,x) AND male(x) -> son(x,y)


parent(y,x) AND female(x) -> daughter(x,y)

The left-hand side of a rule contains hypotheses (called the body of


FIVE | AXIOMS AND PREDICATE CALCULUS

the rule); each atomic formula is a hypothesis or subgoal. The


right-hand side is the goal (or head of the rule).

Rules are general principles that we can apply to facts to prove new facts.

* Assert a rule that is known to be true (that is, the body of the rule
implies the head of the rule)

* Find facts that (via substitution) match the atomic formulae of the
body of the rule

* Make consistent variable substitutions in the body and the head of the
rule

* Assert the head (or goal) as proven

Page | 102
BSc In Information Technology | AI 700

Example Database of Facts and Rules


Facts
1. male(Adam)
2. male(Barney)
3. male(Bob)
4. male(Carl)
5. female(Ann)
6. female(Beth)
7. female(Barb)
8. female(Carol)
9. parent(Adam,Barney)
10. parent(Ann,Barney)
11. parent(Adam,Beth)
12. parent(Ann,Beth)
13. parent(Adam,Bob)
14. parent(Ann,Bob)
15. parent(Adam,Barb)
16. parent(Barney,Carl)
17. parent(Carol,Carl)
FIVE | AXIOMS AND PREDICATE CALCULUS

Rules
1. parent(y,x) AND male(x) -> son(x,y)
2. parent(y,x) AND female(x) -> daughter(x,y)
3. male(x) AND (E z)(parent(z,x) AND parent(z,y)) -> brother(x,y)
4. female(x) AND (E z)(parent(z,x) AND parent(z,y)) -> sister(x,y)
5. male(x) AND (E y)(parent(x,y) AND parent(y,z)) -> grandfather(x,z)
6. female(x) AND (E y)(parent(x,y) AND parent(y,z)) -> grandmother(x,z)

------------------------------------------------------------------------
Example Proof using Substitution

Prove son(Barney,Adam)

1. male(Adam) Fact 1

2. male(Barney) Fact 2

3. parent(Adam,Barney) Fact 9

4. parent(y,x) AND male(x) -> son(x,y) Rule 1

Page | 103
BSc In Information Technology | AI 700

5. parent(Adam,Barney) AND male(Barney) L2,L3

6. parent(Adam,Barney) AND male(Barney)


-> son(Barney,Adam) L5, L4, sub.

7. son(Barney,Adam) L5, L6, m.p.

Note that we selected the facts and the rule that would help us prove
son(Barney,Adam).

* There's only one rule that allows us to infer the son relationship, so we included
that rule.
* We need facts about the parent relationship that include reference to Adam and
Barney.
* We need facts about the male relationship that include (possibly) Adam and
Barney.

Example Proof with Quantifiers


FIVE | AXIOMS AND PREDICATE CALCULUS

Prove brother(Barney,Beth):

1. male(Barney) Fact 2

2. parent(Adam,Barney) Fact 9

3. parent(Adam,Beth) Fact 11

4. male(x) AND (E z)(parent(z,x) AND


parent(z,y)) -> brother(x,y) Rule 3

5. male(Barney) AND
(E z)(parent(z,Barney) AND
parent(z,Beth))
-> brother(Barney,Beth) L4, sub.

6. male(Barney) AND
parent(Adam,Barney) AND
parent(Adam,Beth) L1, L2, L3

Page | 104
BSc In Information Technology | AI 700

7. brother(Barney,Beth) L5, L6, m.p.

Computation in Predicate Logic


Prolog is a programming language based on predicate logic.

* A Prolog program attempts to prove a goal, such as brother(Barney,x), from a set


of facts and rules.

* In the process of proving the goal to be true, using substitution and the other
rules of inference, Prolog substitutes values for the variables in the goal, thereby
"computing" an answer.

How does Prolog know which facts and which rules to use in the proof?

* Prolog uses *unification* to determine when two clauses can be made equivalent
by a substitution of variables.

* The unification procedure is used to instantiate the variables in a goal clause


based on the facts and rules in the database.
FIVE | AXIOMS AND PREDICATE CALCULUS

Horn Clauses

To simplify the resolution process in Prolog, statements must be expressed


in a simplified form, called Horn clauses.

* Statements are constructed from terms.

* Each statement (clause) has (at most) one term on the left hand side of
a left-pointing implication symbol ( :- ).

* Each statement has a conjunction of zero or more terms on the right


hand side.

Prolog has three kinds of statements, corresponding to the structure of the


Horn clause used.

* A fact is a clause with an empty right hand side.

Page | 105
BSc In Information Technology | AI 700

* A question (or goal) is a clause with an empty left hand side.

* A rule is a clause with terms on both sides.

Terms
There are three kinds of terms in Prolog:

* A constant is an atom or a number. An atom is a quoted character string or a


string of letters, digits, and underscores that starts with a lower-case letter. A number
resembles the real or integer constants used in most programming languages.

* A variable is a string of letters, digits, and underscores that starts with an upper-
case letter. There are no type declarations; types are discovered implicitly by the
interpreter.

* A structure represents an atomic proposition of predicate calculus, and has the


form "atom(parameter list)".
FIVE | AXIOMS AND PREDICATE CALCULUS

Facts and Rules


The Prolog environment maintains a set of facts and rules in its database.

* Facts are axioms; relations between terms that are assumed to be true.

* Rules are theorems that allow new inferences to be made.

Example facts:

male(adam).
female(anne).
parent(adam,barney).

Example rules:

son(X,Y) :- parent(Y,X) , male(X)


daughter(X,Y) :- parent(Y,X) , female(X)

The first rule is read as follows: for all X and Y, X is the son of Y if there exists X and Y
such that Y is the parent of X and X is male.

Page | 106
BSc In Information Technology | AI 700

The second rule is read as follows: for all X and Y, X is the daughter of Y
if there exists X and Y such that Y is the parent of X and X is female.

Observations about Prolog Rules


* The implication is from right to left!

* The scope of a variable is the clause in which it appears.

* Variables whose first appearance is on the left hand side of the clause have
implicit universal quantifiers.

* Variables whose first appearance is on the right hand side of the clause have
implicit existential quantifiers.

Executing a Prolog Program

To run a Prolog program the user must ask a question (goal) by stating a theorem
(asserting a predicate) which the Prolog interpreter tries to prove.
FIVE | AXIOMS AND PREDICATE CALCULUS

If the predicate contains variables, the interpreter prints the values of the variables
used to make the predicate true.

The interpreter uses backward chaining to prove a goal. It begins with the thing it is
trying to prove, and works backwards looking for things that would imply it, until it
gets to facts.

Example: Greatest Common Divisor

Using Euclid's algorithm, we can compute the GCD of two positive integers in
Prolog as follows:

/* Prolog program to compute GCD */


gcd(A, 0, A).
gcd(A, A, A).
gcd(A, B, D) :- (A>B),(B>0), R is A mod B, gcd(B,R,D).
gcd(A, B, D) :- (A<B), gcd(B,A,D).

The first two rules are the base case to terminate the recursive definition.

Page | 107
BSc In Information Technology | AI 700

The second rule ensures that the first argument is the larger of the two and that the
second argument is a positive integer, computes the remainder of A/B into R, and
recursively matches (finds) the gcd of the smaller argument and R.

The third rule reorders the arguments so the larger argument is first.

Prolog attempts to match the rules in order, and clauses are evaluated left to right. If
any clause fails (ie, if A is not greater than B in rule 2), then the rule fails.

Here is the sequence of steps the Prolog proof system would go through given
A=5 and B=10:

?-gcd(5,10,D)
(5>10)
gcd(10,5,D)
(10>5)
(5>0)
R=0
gcd(5,0,D)
FIVE | AXIOMS AND PREDICATE CALCULUS

D=5

What can we specify with Horn clauses? Ignoring quantifiers for the moment,
consider a statement in CNF. Since everything in the Prolog database is assumed to
be true, we'll be set if we can come up with a
Horn clause for each clause of the CNF expression.

Consider a single clause. Some of its terms are negated; others are plain.
In general, x1 | x2 | ... | xN | ~y1 | ~y2 | ... | ~yM
== (x1 | x2 | ... | xN) <- (y1 & y2 & ... & yM).
If there is a single plain term and no negated terms, we have a Prolog fact.
As a Horn clause, this is x1 <- true.
If we have a single plain term and a bunch of negated terms, we have a
Prolog rule.

If we have zero plain terms we have a goal. If we choose to write this as


false <- y1 & y2 & ... & yM
then we can add it to our database and attempt to find a proof via
contradiction.
If we have more than one plain term we're stuck: we can't express our

Page | 108
BSc In Information Technology | AI 700

CNF clause as a Horn clause.

In summary: we can express a CNF clause as a Horn clause iff it has


exactly one plain term.

Now what about quantifiers: recall that free variables that appear in the head of a
rule are universally quantified; free variables that appear only in the body are
existentially quantified. If we need different quantifiers, again we're stuck.

Limits on Logic
Given that we can model computation as a "proof", and proceed from facts (axioms)
and rules to prove new facts (ie, compute), we are interested in knowing whether
there are any limits to what we can prove (ie, compute).

Two of the most fundamental results in mathematical logic place limits on what we
can compute:

* The Incompleteness Theorem [Kurt Goedel, 1931] states that for number theory
(predicate logic restricted to predicates involving integers, +, *, =, and <), there are
expressions that are true, but which cannot be proved to be true.
FIVE | AXIOMS AND PREDICATE CALCULUS

* The Halting Problem [Alan Turing, 1936] states that for any computational
model equivalent to modern computers (including Pascal, C, and Prolog) there is
no program that takes as input an
arbitrary program and its input, and determines whether or not the program
halts on that input.

The halting problem is undecidable


Suppose we could decide, given a program and its input, whether that program would
halt when run on that input. Then we could create the following program, D, that
takes some other program P as input, and decides whether P halts when given itself
(i.e. the text of P) as input.

If P halts, D runs it and looks at its output. If P prints "true", D also prints "true".
Otherwise (if P doesn't halt, or prints something other than "true"), D prints "false".

Given D we can build a "complement" program C that also takes programs as input.
Internally C runs D and then prints the opposite of what D does. That is, if D prints
"true", C prints "false". If D prints "false", C prints "true".

Page | 109
BSc In Information Technology | AI 700

Now the question arises: what does C print when given itself as input? If C prints
"false" that means D would have printed "true", meaning that D's input program
(namely C!) would have printed "true" (ouch).
Similarly, if C prints "true" that means D would have printed "false", meaning that D's
input program (C) would either have run forever or halted and printed something
other than "true" (double ouch).

The contradiction implies that our original assumption (the existence of D) must be
wrong.

Number theory is undecidable


Goedel proved the incompleteness theorem before Turing proved the halting
problem. Given the halting problem, however, we can write a particularly nice proof
of the incompleteness theorem.

Consider a program running on a computer. The computer operates in a series of


discrete steps, each of which can be captured by the contents of memory (including
the program counter and all other registers). Some special value, appearing in some
special subset of the memory, indicates the act of halting.
FIVE | AXIOMS AND PREDICATE CALCULUS

If the program halts there must exist some maximum, over time, of the amount of
memory it uses. Call that maximum m (expressed in bits). We can capture the entire
step-by-step history of the program as a (huge!) binary integer. Start with a string of
m ones, followed by a zero. This indicates the grouping of subsequent bits. Each
subsequent group of m bits indicates the contents of memory for the next step of the
computation.

The rules that take us from one step to another can be expressed in terms of simple
arithmetic functions. This means we can create a Predicate P(e,p,i) that is true iff e is
the encoding of a computation of program p, running with input i.

Now suppose we that number theory is decidable. Then every true statement has a
proof. But now we can solve the halting problem! Given a program p, consider the
statements (Ei)[P(e,p,i)] (the program halts) and (Ai)[~P(e,p,i)] (the program does not
halt). One of these statements must have a proof, which will have finite length, and
which we can check in finite time. All (!) we have to do is enumerate all the
proofs in the world, one at a time, (e.g. starting with the shortest and working up),
until we find one for one of our two statements. This constitutes a (very slow)
algorithm to solve the halting problem.

Page | 110
BSc In Information Technology | AI 700

Since we know the halting problem is undecidable, or original assumption (the


FIVE | AXIOMS AND PREDICATE CALCULUS decidability of number theory) must be wrong.

Page | 111
BSc In Information Technology | AI 700

SECTION SUMMARY

 The truth of many statements with unbound variables is indeterminate:


Some statements (e.g. P(x) OR NOT P(x)) may be true regardless of bindings (and
others may be false, regardless), but in general we need bindings.
 The truth of many statements depends on the interpretation of predicates. Again,
some statements may be true or false regardless, but in general we need
interpretations.
 As we will see below, some statements under some interpretations and proof
systems are true but can't be proven.
FIVE| SUMMRY

Page | 112
BSc In Information Technology | AI 700

KEY TERMS USED IN THIS SECTION

Predicate Logic (Calculus) — A logical system of reasoning used in AI programs to


indicate relationships among data items.
Propositional Logic — A formal logical system of reasoning in which conclusions are
drawn from a series of statements according to a strict set of rules.
Qualitative reasoning — A means of representing and making inferences using
general, physical knowledge about the world.
Reproduction — The creation of new generation of improved solutions by a genetic
algorithm.
Rule — A formal way of specifying a recommendation, directive, or strategy,
expressed as IF premise THEN conclusion, and possibly an ELSE conclusion.
Rule-based System — A system in which knowledge is represented completely in
terms of rules (e.g., a system based on production rules).
Rule Induction — Rules are created by a computer from examples of problems where
the outcome is known in a process called induction. These rules are generalized to
other case;
Pattern Matching — See Pattern Recognition. However, sometimes it refers
specifically to matching the IF and THEN parts in rule-based systems. In this case,
pattern matching can be considered as one are of pattern recognition.
Pattern Recognition— A technique of matching an external pattern to one stored in
a computers memory; used in inference engines, image processing, neural
computing, and speech recognition ( in other words, the process of classifying data
into predetermined categories.
FIVE | GLOSSARY OF TERMS

Symbol — A string of characters that represents some real world concept.


Symbol Structures — The meaningful relationships represented in an AI program
Symbolic Processing — The use of symbols, rather than numbers, combined with
rules of thumb (i.e. heuristics), to process information and solve problems.
Syntax — The manner in which words are assembled to form phrases and sentences.
Putting words in specific order.
System — A set of elements that is considered to act as a single, goal-oriented entity.

Page | 113
BSc In Information Technology | AI 700

UNIT 1 REVIEW QUESTIONS

1. Translate the following axioms into predicate calculus


1. Mary is a lawyer
2. Ann is a computer scientist
3. Ann is rich
4. Lawyers are rich
5. Computer scientists are smart
6. Lawyers have nice cars
7. Smart, rich people have nice cars
FIVE| REVIEW QUESTIONS

Page | 114
BSc In Information Technology | AI 700

SIX | INTRODUCTION TO ROBOTICS

LEARNING OUTCOMES

After completing this chapter, Learners should be able to:


1. Demonstrate integrated knowledge and skill regarding the dynamics
of robotic gadgets including the practice of robotic design and linking
design to robotic application.

6.0 INTRODUCTION
A Robot is an automatic mechanical device often resembling a human or animal.
Modern robots are usually an electro-mechanical machine guided by a computer
program or electronic circuitry
It is a system that contains sensors, control systems, manipulators, power supplies
and software all working together to perform a task.

Designing, building, programming and testing a robots is a combination of physics,


mechanical engineering, electrical engineering, structural engineering, mathematics
SIX | INTRODUCTION TO ROBOTICS

and computing. In some cases biology, medicine, chemistry might also be involved. A
study of robotics means that students are actively engaged with all of these disciplines
in a deeply problem-posing problem-solving environment.
Robotics-The branch of technology that deals with the design, construction,
operation, and application of robots, as well as computer systems for their control
and sensory feedback.

6.1 Dynamics of a robot


As strange as it might seem, there really is no standard definition for a robot.
However, there are some essential characteristics that a robot must have and this
might help you to decide what is and what not a robot is. It will also help you to decide
what features you will need to build into a machine before it can count as a robot.
A robot has these essential characteristics:
 Sensing First of all your robot would have to be able to sense its surroundings. It
would do this in ways that are not dissimilar to the way that you sense your
surroundings. Giving your robot sensors: light sensors (eyes), touch and pressure

Page | 115
BSc In Information Technology | AI 700

sensors (hands), chemical sensors (nose), hearing and sonar sensors (ears), and
taste (tongue) will give your robot awareness of its environment.
 Movement A robot needs to be able to move around its environment. Whether
rolling on wheels, walking on legs or propelling by thrusters a robot needs to be able
to move. To count as a robot either the whole robot moves, like the Sojourner or just
parts of the robot moves, like the Canada Arm.
 Energy A robot needs to be able to power itself. A robot might be solar powered,
electrically powered, battery powered. The way your robot gets its energy will depend
on what your robot needs to do.
 Intelligence A robot needs some kind of "smarts." This is where programming
enters the pictures. A programmer is the person who gives the robot its 'smarts.' The
robot will have to have some way to receive the program so that it knows what it is
to do.

Types of Robots
Robots can be found in the manufacturing industry, the military, space exploration,
transportation, and medical applications. Below are just some of the uses for robots.

Robots on Earth
Typical industrial robots do jobs that are difficult, dangerous or dull. They lift heavy
objects, paint, handle chemicals, and perform assembly work. They perform the same
job hour after hour, day after day with precision. They don't get tired and they don't
make errors associated with fatigue and so are ideally suited to performing repetitive
tasks. The major categories of industrial robots by mechanical structure are:
SIX | INTRODUCTION TO ROBOTICS

 Cartesian robot /Gantry robot: Used for pick and place work, application of sealant,
assembly operations, handling machine tools and arc welding. It's a robot whose arm
has three prismatic joints, whose axes are coincident with a Cartesian coordinator.
 Cylindrical robot: Used for assembly operations, handling at machine tools, spot
welding, and handling at diecasting machines. It's a robot whose axes form a
cylindrical coordinate system.
 Spherical/Polar robot: Used for handling at machine tools, spot welding, diecasting,
fettling machines, gas welding and arc welding. It's a robot whose axes form a polar
coordinate system.
 SCARA robot: Used for pick and place work, application of sealant, assembly
operations and handling machine tools. It's a robot which has two parallel rotary
joints to provide compliance in a plane.
 Articulated robot: Used for assembly operations, diecasting, fettling machines, gas
welding, arc welding and spray painting. It's a robot whose arm has at least three
rotary joints.

Page | 116
BSc In Information Technology | AI 700

 Parallel robot: One use is a mobile platform handling cockpit flight simulators. It's a
robot whose arms have concurrent prismatic or rotary joints.

A number of people to describe a robot and most of them will answer they look like
a human. Interestingly a robot that looks like a human is probably the most difficult
robot to make. Is is usually a waste of time and not the most sensible thing to model
a robot after a human being. A robot needs to be above all functional and designed
with qualities that suits its primary tasks. It depends on the task at hand whether the
robot is big, small, able to move or nailed to the ground. Each and every task means
different qualities, form and function, a robot needs to be designed with the task in
mind.

Mobile Robots
Mars Explorer images and other space robot images courtesy of NASA.
Mobile robots are able to move, usually they perform task such as search areas. A
prime example is the Mars Explorer, specifically designed to roam the mars surface.
Mobile robots are a great help to such collapsed building for survivors Mobile robots
are used for task where people cannot go. Either because it is too dangerous of
because people cannot reach the area that needs to be searched.
Mobile robots can be divided in two categories:
Rolling Robots: Rolling robots have wheels to move around. These are the type of
robots that can quickly and easily search move around. However they are only useful
in flat areas, rocky terrains give them a hard time. Flat terrains are their territory.
Walking Robots: Robots on legs are usually brought in when the terrain is rocky and
SIX | INTRODUCTION TO ROBOTICS

difficult to enter with wheels. Robots have a hard time shifting balance and keep
them from tumbling. That’s why most robots with have at least 4 of them, usually
they have 6 legs or more. Even when they lift one or more legs they still keep their
balance. Development of legged robots is often modeled after insects or crawfish..

Stationary Robots
Robots are not only used to explore areas or imitate a human being. Most robots
perform repeating tasks without ever moving an inch. Most robots are ‘working’ in
industry settings. Especially dull and repeating tasks are suitable for robots. A robot
never grows tired, it will perform its duty day and night without ever complaining. In
case the tasks at hand are done, the robots will be reprogrammed to perform other
tasks..

Autonomous Robots
Autonomous robots are self supporting or in other words self contained. In a way
they rely on their own ‘brains’.

Page | 117
BSc In Information Technology | AI 700

Autonomous robots run a program that give them the opportunity to decide on the
action to perform depending on their surroundings. At times these robots even learn
new behavior. They start out with a short routine and adapt this routine to be more
successful at the task they perform. The most successful routine will be repeated as
such their behavior is shaped. Autonomous robots can learn to walk or avoid
obstacles they find in their way. Think about a six legged robot, at first the legs move
ad random, after a little while the robot adjust its program and performs a pattern
which enables it to move in a direction.

Remote-control Robots
An autonomous robot is despite its autonomous not a very clever or intelligent unit.
The memory and brain capacity is usually limited, an autonomous robot can be
compared to an insect in that respect.
In case a robot needs to perform more complicated yet undetermined tasks an
autonomous robot is not the right choice.

Complicated tasks are still best performed by human beings with real brainpower. A
person can guide a robot by remote control. A person can perform difficult and
usually dangerous tasks without being at the spot where the tasks are performed. To
detonate a bomb it is safer to send the robot to the danger area.

Virtual Robots
Virtual robots don’t exist in real life. Virtual robots are just programs, building blocks
SIX | INTRODUCTION TO ROBOTICS

of software inside a computer. A virtual robot can simulate a real robot or just
perform a repeating task. A special kind of robot is a robot that searches the world
wide web. The internet has countless robots crawling from site to site. These
WebCrawler’s collect information on websites and send this information to the search
engines.

BEAM Robots
BEAM is short for Biology, Electronics, Aesthetics and Mechanics. BEAM robots are
made by hobbyists. BEAM robots can be simple and very suitable for starters.

Biology
Robots are often modeled after nature. A lot of BEAM robots look remarkably like
insects. Insects are easy to build in mechanical form. Not just the mechanics are in
inspiration also the limited behavior can easily be programmed in a limited amount
of memory and processing power.

Page | 118
BSc In Information Technology | AI 700

Electronics
Like all robots they also contain electronics. Without electronic circuits the engines
cannot be controlled. Lots of Beam Robots also use solar power as their main source
of energy.

Aesthetics
A BEAM Robot should look nice and attractive. BEAM robots have no printed circuits
with some parts but an appealing and original appearance.

Mechanics
In contrast with expensive big robots BEAM robots are cheap, simple, built out of
recycled material and running on solar energy.

What is the first thing that comes to mind when you think of a robot?
For many people it is a machine that imitates a human—like the androids in Star Wars,
Terminator and Star Trek: The Next Generation. However much these robots capture
our imagination, such robots still only inhabit Science Fiction. People still haven't been
able to give a robot enough 'common sense' to reliably interact with a dynamic world.
However, Rodney Brooks and his team at MIT Artificial Intelligence Lab are working
on creating such humanoid robots.

The type of robots that you will encounter most frequently are robots that do work
that is too dangerous, boring, onerous, or just plain nasty. Most of the robots in the
world are of this type. They can be found in auto, medical, manufacturing and space
SIX | INTRODUCTION TO ROBOTICS

industries. In fact, there are over a million of these type of robots working for
us today.

Defining the Problem


 identifying the purpose of a construction
 identifying specific requirements
You are confronted with a situation. Here are two examples:
A community wants to construct a robot zoo in which the "animals" move their heads,
open their mouths and make appropriate sounds when they sense that someone is
coming towards them. Design and build a prototype device which could satisfy this
need.

A local pet shop wishes to sell a range of devices which automatically feed small cage
pets (such as rabbits, gerbils, mice etc.) when their owners are away for the weekend.
Design and build a prototype device which could satisfy this need.

Page | 119
BSc In Information Technology | AI 700

You need to determine what problem you are trying to solve before you attempt to
design and build a robot to solve a problem. Take the time to study a number of
different situations and once you have decided what the situation is and you
understand exactly what the problem is then write a design brief in a log book (this
will be your working document as you work on your robot. This log book can be a
paper notebook or an electronic document.) This is a short statement which explains
the problem that is to be solved.

Researching and Designing


 gathering information
 identifying specific details of the design which must be satisfied
 identifying possible and alternative design solutions
 planning and designing a appropriate structure which includes drawings
Having written a brief, you are now ready to gather information which will help you
to produce a successful design. First you will need to decide what information you
require. This will be different from project to project and will also depend on the
amount of information and knowledge you already have. A useful step will be to use
the following chart. Ask the five questions, then read the column headed Gathering
Information. This will help you plan the type of information you will need to gather.
SIX | INTRODUCTION TO ROBOTICS

Page | 120
BSc In Information Technology | AI 700

Gathering Information

1. What is the A design's practical functions can include:


practical function of  movement How will the robot move
the design? (What within its environment? If it were put in
must my robot do?) a different environment, would it still be
able to move within this new space?
 manipulation How will the robot move or
manipulate other objects within its
environment? Can a single robot move
or manipulate more than one kind of
object?
 energy How is the robot powered? Can it
have more than one energy source?
 intelligence How does the robot "think?"
What does it mean to say that a robot
"thinks?"
 sensing How will my robot "know" or
figure out what's in its environment? If it
were put in a different environment,
would it be able to figure out this new
SIX | INTRODUCTION TO ROBOTICS

environment

2. What part does Shape and form are important to a design's


appearance (shape aesthetic qualities, ergonomics, strength,
and form, surface stability, rigidity, safety
texture, colour, etc.) Surface texture, finish and colour can be
play in the design's appropriate to a design's:aesthetic qualities,
function? What does mechanical, optical and thermal properties,
the robot look like? Is durability, etc.
there a reason for it
to look as it does?

Page | 121
BSc In Information Technology | AI 700

3. What materials are The properties of a material will determine its


suitable for the suitability for a design. For our work with
design? robotics we have chosen to work with LegoT™.
However, there are many different types of
materials that can be and are used in the
construction of robots.
 strength, hardness, toughness, density
 durability
 and the aesthetic qualities determined
by colour, surface texture, pattern, etc.
The materials cost and availability are also
important factors.

4. What construction Construction techniques fall into the categories


methods are of:
appropriate to the  cutting and shaping
design?  fabrication - the assembly of the parts
using screws, bolts, glues, solder, etc
 moulding - by the application of a force
on the material
 casting - using a mould to form the shape
of a solidifying material
A particular material can only be worked in a
SIX | INTRODUCTION TO ROBOTICS

limited number of ways. The method of


construction therefore will be determined by
the chosen material, the availability of
manufacturing facilities, the skills of the work
force and the production costs.

5. What are the likely The manufacture, use and disposal of any
social and product will have both beneficial and
environmental detrimental effects upon people, wildlife and
effects of the design? the environment. The designer therefore, has an
enormous responsibility to consider very
carefully the potential effects of any new design.
This will include: health and safety factors,
noise, smell, pollution, etc.

Page | 122
BSc In Information Technology | AI 700

Gathering information can involve reading, listening, conducting interviews and


observing.
A specification is a detailed description of the problem to be solved. It should 'spell
out' exactly what the design must achieve.

Creating a Prototype
 testing the design
 troubleshooting the design
You should ideally think of at least three different ways to solve the problem before
you concentrate on any one in particular. Sketches and notes are required at this
stage. You can also create prototypes using lego for this step. Once you have created
a lego prototype, take a digital picture of it. Print out the picture and jot your notes
below the picture in your log book. Once you have settled on one solution, go back
over the list of specifications you have made. Make sure that each specification is
satisfied.
Now it the time to produce some working drawings. These are the drawings that will
assist you as you begin constructing the prototype of your structure. (Here again, lego
and a digital camera might be your best friend.) You may choose to do your drawings
by hand or you might want to use a draw program on the computer to assist you.
Determine a working schedule for yourself. Draw up a timetable showing how much
time you expect to spend on each part of the design process. Your planning should
also ensure that you have all the necessary materials and equipment that you need
to complete your project.
SIX | INTRODUCTION TO ROBOTICS

Building your Robot


Programming and Testing your Robot
This can be achieved in many different ways. Use can achieve rudimentary
intelligence in your robot by using only relays, potentiometers, bump switches and
some discrete components. You can increase complexity in intelligence in your robot
by adding more sensors and continuing in the same vein of using hardwired logic. By
introducing a more sophisticated control element, the microprocessor, you introduce
a significant new tool in solving the robot control problem.

Evaluating your Robot


 evaluate the design
 evaluate the planning process
As building and programming work progresses, and the design begins to take shape,
you will automatically carry out tests on the design. You will also need to complete
systems tests at various stages of the construction. If any of the tests show that you

Page | 123
BSc In Information Technology | AI 700

have failure in a joint, or that part of your structure is not meeting specifications, then
you will have to make modifications in your plan.
When building and programming is complete, the entire project must be tested to
see if it does the job for which it was designed. An evaluation needs to then be
written. This should be a statement outlining the strengths and weaknesses in your
design. It should describe where you have succeeded and where you have failed to
achieve the aims set out in the specifications.
SIX | INTRODUCTION TO ROBOTICS

Page | 124
BSc In Information Technology | AI 700

SECTION SUMMARY

As strange as it might seem, there really is no standard definition for a robot.


However, there are some essential characteristics that a robot must have and this
might help you to decide what is and what not a robot is. It will also help you to decide
what features you will need to build into a machine before it can count as a robot.
SIX | SUMMARY

Page | 125
BSc In Information Technology | AI 700

KEY TERMS USED IN THIS SECTION

Robot is an automatic mechanical device often resembling a human or animal


BSO Data: Absolute Data (ABSO Data) is a correction factor for data that establishes
an indicated value of zero when the robot is at the predetermined Home (calibration
position).
Accuracy: Accuracy is the measurement of the deviation between the command
characteristic and the attained characteristic (R15.05-2), or the precision with which
a computed or calculated robot position can be attained. Accuracy is normally worse
than the arm's repeatability. Accuracy is not constant over the workspace, due to the
effect of link kinematics.
Active Compliant Robot: An active compliant robot is one in which motion
modification during the performance of a task is initiated by the control system. The
induced motion modification is slight, but sufficient to facilitate the completion of a
desired task.
Actual Position: The position or location of the tool control point. Note that this will
not be exactly the same as the demand position due to a multitude of un-sensed
errors (such as link deflection, transmission irregularity, tolerances in link lengths,
etc.)
Actuator: A power mechanism used to effect motion, or maintain position of the
robot (for example, a motor which converts electrical energy to effect motion of the
robot) (R15.07). The actuator responds to a signal received from the control system.
Axis: A direction used to specify the robot motion in a linear or rotary mode. (ISO
8373)
SIX | GLOSSARY OF TERMS

Arm: An interconnected set of links and powered joints comprising a robot


manipulator that supports and/or moves a wrist and hand or end-effector through
space. The arm itself does not include the end-effector. See Manipulator, End-
effector and Wrist.
Articulated Manipulator: A manipulator with an arm that is broken into sections
(links) by one or more joints. Each of the joints represents a degree of freedom in the
manipulator system and allows translation and rotary motion.
Articulation: Describes a jointed device, such as a jointed manipulator. The joints
provide rotation about a vertical axis, and elevation out of the horizontal plane. This
allows a robot to be capable of reaching into confined spaces.
TUTORIAL QUESTIONS AND ANSWERS

Page | 126
BSc In Information Technology | AI 700

Q. What is artificial intelligence?


A. It is the science and engineering of making intelligent machines, especially
intelligent computer programs. It is related to the similar task of using computers to
understand human intelligence, but AI does not have to confine itself to methods that
are biologically observable.

Q. Yes, but what is intelligence?


A. Intelligence is the computational part of the ability to achieve goals in the world.
Varying kinds and degrees of intelligence occur in people, many animals and some
machines.

Q. Isn't there a solid definition of intelligence that doesn't depend on relating it to


human intelligence?
A. Not yet. The problem is that we cannot yet characterize in general what kinds of
computational procedures we want to call intelligent. We understand some of the
mechanisms of intelligence and not others.

Q. Is intelligence a single thing so that one can ask a yes or no question ``Is this
machine intelligent or not?''
A. No. Intelligence involves mechanisms, and AI research has discovered how to make
computers carry out some of them and not others. If doing a task requires only
mechanisms that are well understood today, computer programs can give very
impressive performances on these tasks. Such programs should be considered
``somewhat intelligent''.

Q. Isn't AI about simulating human intelligence?


A. Sometimes but not always or even usually. On the one hand, we can learn
something about how to make machines solve problems by observing other people
or just by observing our own methods. On the other hand, most work in AI involves
studying the problems the world presents to intelligence rather than studying people
or animals. AI researchers are free to use methods that are not observed in people or
that involve much more computing than people can do.

Q. What about IQ? Do computer programs have IQs?


A. No. IQ is based on the rates at which intelligence develops in children. It is the ratio
of the age at which a child normally makes a certain score to the child's age. The scale
SIX | Q&A

is extended to adults in a suitable way. IQ correlates well with various measures of


success or failure in life, but making computers that can score high on IQ tests would
be weakly correlated with their usefulness. For example, the ability of a child to repeat
back a long sequence of digits correlates well with other intellectual abilities, perhaps

Page | 127
BSc In Information Technology | AI 700

because it measures how much information the child can compute with at once.
However, ``digit span'' is trivial for even extremely limited computers. However, some
of the problems on IQ tests are useful challenges for AI.

Q. What about other comparisons between human and computer intelligence?


A. Arthur R. Jensen [Jen98], a leading researcher in human intelligence, suggests ``as
a heuristic hypothesis'' that all normal humans have the same intellectual
mechanisms and that differences in intelligence are related to ``quantitative
biochemical and physiological conditions''. I see them as speed, short term memory,
and the ability to form accurate and retrievable long term memories.
Whether or not Jensen is right about human intelligence, the situation in AI today is
the reverse.
Computer programs have plenty of speed and memory but their abilities correspond
to the intellectual mechanisms that program designers understand well enough to
put in programs. Some abilities that children normally don't develop till they are
teenagers may be in, and some abilities possessed by two year olds are still out. The
matter is further complicated by the fact that the cognitive sciences still have not
succeeded in determining exactly what the human abilities are. Very likely the
organization of the intellectual mechanisms for AI can usefully be different from that
in people.
Whenever people do better than computers on some task or computers use a lot of
computation to do as well as people, this demonstrates that the program designers
lack understanding of the intellectual mechanisms required to do the task efficiently.

Q. When did AI research start?


A. After WWII, a number of people independently started to work on intelligent
machines. The English mathematician Alan Turing may have been the first. He gave a
lecture on it in 1947. He also may have been the first to decide that AI was best
researched by programming computers rather than by building machines. By the late
1950s, there were many researchers on AI, and most of them were basing their work
on programming computers.

Q. Does AI aim to put the human mind into the computer?


A. Some researchers say they have that objective, but maybe they are using the
phrase metaphorically. The human mind has a lot of peculiarities, and I'm not sure
anyone is serious about imitating all of them.
SIX | Q&A

Q. What is the Turing test?


A. Alan Turing's 1950 article Computing Machinery and Intelligence [Tur50] discussed
conditions for considering a machine to be intelligent. He argued that if the machine

Page | 128
BSc In Information Technology | AI 700

could successfully pretend to be human to a knowledgeable observer then you


certainly should consider it intelligent. This test would satisfy most people but not all
philosophers. The observer could interact with the machine and a human by teletype
(to avoid requiring that the machine imitate the appearance or voice of the person),
and the human would try to persuade the observer that it was human and the
machine would try to fool the observer.

The Turing test is a one-sided test. A machine that passes the test should certainly be
considered intelligent, but a machine could still be considered intelligent without
knowing enough about humans to imitate a human.

Daniel Dennett's book Brainchildren [Den98] has an excellent discussion of the Turing
test and the various partial Turing tests that have been implemented, i.e. with
restrictions on the observer's knowledge of AI and the subject matter of questioning.
It turns out that some people are easily led into believing that a rather dumb program
is intelligent.

Q. Does AI aim at human-level intelligence?


A. Yes. The ultimate effort is to make computer programs that can solve problems
and achieve goals in the world as well as humans. However, many people involved in
particular research areas are much less ambitious.

Q. How far is AI from reaching human-level intelligence? When will it happen?


A. A few people think that human-level intelligence can be achieved by writing large
numbers of programs of the kind people are now writing and assembling vast
knowledge bases of facts in the languages now used for expressing knowledge.
However, most AI researchers believe that new fundamental ideas are required, and
therefore it cannot be predicted when human-level intelligence will be achieved.

Q. Are computers the right kind of machine to be made intelligent?


A. Computers can be programmed to simulate any kind of machine.
Many researchers invented non-computer machines, hoping that they would be
intelligent in different ways than the computer programs could be. However, they
usually simulate their invented machines on a computer and come to doubt that the
new machine is worth building. Because many billions of dollars that have been spent
in making computers faster and faster, another kind of machine would have to be
SIX | Q&A

very fast to perform better than a program on a computer simulating the machine.

Q. Are computers fast enough to be intelligent?

Page | 129
BSc In Information Technology | AI 700

A. Some people think much faster computers are required as well as new ideas. My
own opinion is that the computers of 30 years ago were fast enough if only we knew
how to program them. Of course, quite apart from the ambitions of AI researchers,
computers will keep getting faster.

Q. What about parallel machines?


A. Machines with many processors are much faster than single processors can be.
Parallelism itself presents no advantages, and parallel machines are somewhat
awkward to program. When extreme speed is required, it is necessary to face this
awkwardness.

Q. What about making a ``child machine'' that could improve by reading and by
learning from experience?
A. This idea has been proposed many times, starting in the 1940s. Eventually, it will
be made to work. However, AI programs haven't yet reached the level of being able
to learn much of what a child learns from physical experience. Nor do present
programs understand language well enough to learn much by reading.

Q. Might an AI system be able to bootstrap itself to higher and higher level intelligence
by thinking about AI?
A. I think yes, but we aren't yet at a level of AI at which this process can begin.

Q. What about chess?


A. Alexander Kronrod, a Russian AI researcher, said ``Chess is the Drosophila of AI.''
He was making an analogy with geneticists' use of that fruit fly to study inheritance.
Playing chess requires certain intellectual mechanisms and not others. Chess
programs now play at grandmaster level, but they do it with limited intellectual
mechanisms compared to those used by a human chess player, substituting large
amounts of computation for understanding. Once we understand these mechanisms
better, we can build human-level chess programs that do far less computation than
do present programs.
Unfortunately, the competitive and commercial aspects of making computers play
chess have taken precedence over using chess as a scientific domain. It is as if the
geneticists after 1910 had organized fruit fly races and concentrated their efforts on
breeding fruit flies that could win these races.
SIX | Q&A

Q. What about Go?


A. The Chinese and Japanese game of Go is also a board game in which the players
take turns moving. Go exposes the weakness of our present understanding of the
intellectual mechanisms involved in human game playing . Go programs are very bad

Page | 130
BSc In Information Technology | AI 700

players, in spite of considerable effort (not as much as for chess). The problem seems
to be that a position in Go has to be divided mentally into a collection of subpositions
which are first analyzed separately followed by an analysis of their interaction.
Humans use this in chess also, but chess programs consider the position as a whole.
Chess programs compensate for the lack of this intellectual mechanism by doing
thousands or, in the case of Deep Blue, many millions of times as much computation.
Sooner or later, AI research will overcome this scandalous weakness.
Q. Don't some people say that AI is a bad idea?
A. The philosopher John Searle says that the idea of a non-biological machine being
intelligent is incoherent. He proposes the Chinese room argument www-
formal.stanford.edu/jmc/chinese.html The philosopher Hubert Dreyfus says that AI is
impossible. The computer scientist Joseph Weizenbaum says the idea is obscene,
anti-human and immoral. Various people have said that since artificial intelligence
hasn't reached human level by now, it must be impossible. Still other people are
disappointed that companies they invested in went bankrupt.

Q. Aren't computability theory and computational complexity the keys to AI? [Note
to the layman and beginners in computer science: These are quite technical branches
of mathematical logic and computer science, and the answer to the question has to
be somewhat technical.]
A. No. These theories are relevant but don't address the fundamental problems of AI.
In the 1930s mathematical logicians, especially Kurt Gödel and Alan Turing,
established that there did not exist algorithms that were guaranteed to solve all
problems in certain important mathematical domains. Whether a sentence of first
order logic is a theorem is one example, and whether a polynomial equations in
several variables has integer solutions is another. Humans solve problems in these
domains all the time, and this has been offered as an argument (usually with some
decorations) that computers are intrinsically incapable of doing what people do.
Roger Penrose claims this. However, people can't guarantee to solve arbitrary
problems in these domains either. See my Review of The Emperor's New Mind by
Roger Penrose. More essays and reviews defending AI research are in [McC96a].

In the 1960s computer scientists, especially Steve Cook and Richard Karp developed
the theory of NP-complete problem domains. Problems in these domains are
solvable, but seem to take time exponential in the size of the problem. Which
sentences of propositional calculus are satisfiable is a basic example of an NP-
SIX | Q&A

complete problem domain. Humans often solve problems in NP-complete domains in


times much shorter than is guaranteed by the general algorithms, but can't solve
them quickly in general.

Page | 131
BSc In Information Technology | AI 700

What is important for AI is to have algorithms as capable as people at solving


problems. The identification of subdomains for which good algorithms exist is
important, but a lot of AI problem solvers are not associated with readily identified
subdomains.

The theory of the difficulty of general classes of problems is called computational


complexity. So far this theory hasn't interacted with AI as much as might have been
hoped. Success in problem solving by humans and by AI programs seems to rely on
properties of problems and problem solving methods that the neither the complexity
researchers nor the AI community have been able to identify precisely.
SIX | Q&A

Page | 132
BSc In Information Technology | AI 700

AI | SUBSCRIBED AND FURTHER READING

SUBSCRIBED TEXT
Russell, S., & Norvig, P., (2014), Artificial Intelligence – A Modern Approach, 3rd Edition,
Pearson Education, Essex, UK

ADDITIONAL READING
Jackson, P., C., (1985), An Introduction To Artificial Intelligence, 2nd Edition, Courier Corp,
CA.
AI| SUBSCRIBED & FURTHER READING

Page | 133
 Easy
 Intermediate
 Advanced

Topic 1
1. ………….. is called the father of AI.
A) James C Gosling
B) Dennis Ritchie
C) Alan Turing
D) Isaac Newton
Answer: C

2. In AI ………………………. is a combination of data structures and interpretive procedures.


A) Knowledge
B) Meta-knowledge
C) Artificial Knowledge
D) Performance
Answer: A

3. The …………………… approach uses the knowledge of mathematics and engineering.


A) rationalist
B) Top-down
C) bottom-up
D) push-pop approach
Answer: A

4. We also use knowledge about what we know, called ……………………..


A) Meta-Knowledge
B) Performance Knowledge
C) Standard knowledge
D) Specific knowledge
Answer: A

5. The Artificial Intelligence is concerned with designing intelligent computer systems that exhibit
intelligent characteristics expressed by …………………..
A) Functional behavior
B) Human behavior
C) Human brain
D) Statistical analysis
Answer: B

6. ………………… includes what we know about our own performance as cognitive processors.
A) Meta-Knowledge
B) Performance Knowledge
C) Standard knowledge
D) Specific knowledge
Answer: A

7. State whether the following true or false.


i) AI is used in diverse fields like space exploration, robotics.
ii) AI is used for military purpose
A) i-True, ii-False
B) i-True, ii-True
C) i-False, ii-False
D) i-False, ii-True
Answer: B

8. The goals of AI systems can be described in terms of cognitive tasks like


A) Recognizing objects
B) Answering questions
C) Manipulating robotic devices
D) All of the above
Answer: D
9. ………………….. is computerized advice-giver, that is capable of reasoning but which is usually
confined to a rather narrow field of knowledge.
A) Expert system
B) Knowledge system
C) Common system
D) Communication system
Answer: A

10. ………………. involves relating something new to what we already know in a psychologically
complex way.
A) Knowledge Acquisition
B) Knowledge retrieval
C) Reasoning
D) Meta-level reasoning
Answer: A

11. The High level language …………………. has now become the dominant AI programming language.
A) Ada
B) Lisp
C) AI pro
D) High AI
Answer: B

12. Which provides agents with information about the world they inhabit?

a) Sense

b) Perception

c) Reading

d) Hearing

Answer: B

13. What is used to initiate the perception in the environment?

a) Sensor
b) Read

c) Actuators

d) None of the mentioned

Answer: A

14. What is the study of light?

a) Biology

b) Lightology

c) Photometry

d) All of the mentioned

Answer: C

15. How to increase the brightness of the pixel?

a) Sound

b) Amount of light

c) Surface

d) Waves

Answer: B

16. How many kinds of reflection are available in image perception?

a) 1

b) 2

c) 3

d) 4

Answer: B

17. What is meant by predicting the value of a state variable from the past?

a) Specular reflection

b) Diffuse reflection

c) Gaussian filter

d) Smoothing

Answer: D

18. How many types of image processing techniques are there in image perception?
a) 1

b) 2

c) 3

d) 4

Answer: C

19. Which is meant by assuming any two neighboring that are both edge pixels with consistent
orientation?

a) Canny edge detection

b) Smoothing

c) Segmentation

d) None of the mentioned

Answer: A

20. Machine learning is

a) The autonomous acquisition of knowledge through the use of computer programs

b) The autonomous acquisition of knowledge through the use of manual programs

e) The selective acquisition of knowledge through the use of computer programs

d) The selective acquisition of knowledge through the use of manual programs

e) None of the mentioned

Answer: A

21. Factors which affect the performance of learner system does not include

a) Representation scheme used

b) Training scenario

e) Type of feedback

d) Good data structures

e) Learning algorithm

Answer: D

22. Different learning methods does not include

a) Memorization

b) Analogy

e) Deduction

d) Introduction
e) Acceptance

Answer: D

23. In language understanding, the levels of knowledge that does not include

a) Phonological

b) Syntactic

e) Semantic

d) Logical

e) Empirical

Answer: E

24. A model of language consists of the categories which does not include

a) Language units

b) Role structure of units

e) System constraints

d) Structural units

e) Components

Answer: D

25. Semantic grammars

a) Encode semantic information into a syntactic grammar

b) Decode semantic information into a syntactic grammar

e) Encode syntactic information into a semantic grammar

d) Decode syntactic information into a semantic grammar

e) Encode syntactic information into a logical grammar

Answer: A

26. What is a top-down parser?

a) Begins by hypothesizing a sentence (the symbol S) and successively predicting lower level
constituents until individual preterminal symbols are written

b) Begins by hypothesizing a sentence (the symbol S) and successively predicting upper level
constituents until individual preterminal symbols are written

e) Begins by hypothesizing lower level constituents and successively predicting a sentence (the
symbol S)

d) Begins by hypothesizing upper level constituents and successively predicting a sentence (the
symbol S)
e) All the mentioned

Answer: A

27. Perception involves

a) Sights, sounds, smell and touch

b) Hitting

e) Boxing

d) Dancing

e) Acting

Answer: A

28. In AI, a representation of …………………… is a combination of data structures and interpretive


procedures that is used in the right way in a program.
A) Knowledge
B) Power
C) Strength
D) Intelligence
Answer: A
29 ………….. is an environment in which the search takes place.
A) Problem place
B) Problem instance
C) Problem space
D) None of the above
Answer: C

30. The fundamental ideas about retrieval that have been developed in AI systems might be termed
as ……………… and ……………………
A) Analogy, reasoning
B) Thinking, doing
C) Event, domain
D) Linking, lumping
Answer: D
31. Robot machine might have cameras and infrared range finders for ………… and various motors of
……….
A) Sensors, Agents
B) Agents, Actuators
C) Actuators, Sensors
D) Sensors, Actuators
Answer: D

32. ……………….. are rules of thumb that may solve a given problem, but do not guarantee a solution.
A) Strong methods
B) Weak methods
C) Heuristic
D) Probabilistic
Answer: C

33. ………………. is the primary consideration in designing knowledge-based AI systems.


A) Analogy
B) Efficiency
C) Efficacy
D) Acquisition
Answer: B

34. The initial state and successor function implicitly define state space of the problem
A) Initial state
B) State space
C) Problem space
D) Problem place
Answer: B

35. …………….. are data structures giving "snapshots" of the condition of the problem at each stage of
its solution.
A) States
B) Operators
C) Heuristic
D) None of the above
Answer: A

36. ………………. are means for transforming the problem from one state to another.
A) States
B) Operators
C) Heuristic
D) None of the above
Answer: B

37. Knowledge and reasoning also play a crucial role in dealing with __________________
environment.
a) Completely Observable
b) Partially Observable
c) Neither a nor b
d) Only a and b
Answer: B
38. Treatment chosen by doctor for a patient for a disease is based on
a) Only current symptoms
b) Current symptoms plus some knowledge from the textbooks
c) Current symptoms plus some knowledge from the textbooks plus experience
d) Only a and b
Answer: C

39. A knowledge-based agent can combine general knowledge with current percepts to infer hidden
aspects of the current state prior to selecting actions. State whether True or False.
a) True
b) False
Answer: A
40. A) Knowledge base (KB) is consists of set of statements.
B) Inference is deriving a new sentence from the KB.
Choose the correct option.
a) A is true, B is true
b) A is false, B is false
c) A is true, B is false
d) A is false, B is true
Answer: A

41. Wumpus World is a classic problem, best example of,


a) Single player Game
b) Two player Game
c) Reasoning with Knowledge
d) Knowledge based Game
Answer: C

42. Which search strategy is also called as blind search?


a) Uninformed search
b) Informed search
c) Simple reflex search
d) All of the mentioned
Answer: A

43. How many types are available in uninformed search method?


a) 3
b) 4
c) 5
d) 6
Answer: C

44. Which search is implemented with an empty first-in-first-out queue?


a) Depth-first search
b) Breadth-first search
c) Bidirectional search
d) None of the mentioned
Answer: B

45. When is breadth-first search optimal?


a) When there is less number of nodes
b) When all step costs are equal
c) When all step costs are unequal
d) Both a & c
Answer: B

30. How many successors are generated in backtracking search?


a) 1
b) 2
c) 3
d) 4
Answer: A

31. What is the space complexity of Depth-first search?


a) O(b)
b) O(bl)
c) O(m)
d) O(bm)
Answer: D

32. How many parts does a problem consists of?


a) 1
b) 2
c) 3
d) 4
Answer: D
33. Which algorithm is used to solve any kind of problem?
a) Breath-first algorithm
b) Tree algorithm
c) Bidirectional search algorithm
d) None of the mentioned
Answer: D

34. Which search algorithm imposes a fixed depth limit on nodes?


a) Depth-limited search
b) Depth-first search
c) Iterative deepening search
d) Bidirectional search
Answer: A

35. Which search implements stack operation for searching the states?
a) Depth-limited search
b) Depth-first search
c) Breadth-first search
d) None of the mentioned
Answer: B

36. Blind searching is general term for


a) Informed Search
b) Uninformed Search
c) Both a and b
d) Only a
Answer: B

37. Strategy that know whether one non-goal state is “more promising” than another is called
a) Informed Search
b) Unformed Search
c) Iterative Search
d) Blind Search
Answer: A

38. Which of the following is Uninformed Search technique?


a) Breath First Search (BFS)
b) Iterative Search
c) Sequence Search
d) Best First Search
Answer: A

39. Which data structure conveniently used to implement BFS?


a) Stacks
b) Queues
c) Priority Queues
d) Classes
Answer: B

40. Which data structure conveniently used to implement DFS?


a) Stacks
b) Queues
c) Priority Queues
d) All of the above
Answer: A

41. The time and space complexity of BFS is (For time and space complexity problems consider b as
branching factor and d as depth of the search tree.)
a) O(bd+1) and O(bd+1)
b) O(b2) and O(d2)
c) O(d2) and O(b2)
d) O(d2) and O(d2)
Answer: A
42. Breadth-first search is not optimal when all step costs are equal, because it always expands the
shallowest unexpanded node. State whether true or false.
a) True
b) False
Answer: B

43. Depth-first search always expands the ______ node in the current fringe of the search tree.
a) Shallowest
b) First
c) Deepest
d) Minimum cost
Answer: C

44. Breadth-first search always expands the ______ node in the current fringe of the search tree.
a) Shallowest
b) Child node
c) Deepest
d) Minimum cost
Answer: A

45. Which is used to compute the truth of any sentence?


a) Semantics of propositional logic
b) Alpha-beta pruning
c) First-order logic
d) Both a & b
Answer: A

46. Which are needed to compute the logical inference algorithm?


a) Logical equivalence
b) Validity
c) Satisfiability
d) All of the mentioned
Answer: D

47. From which rule does the modus ponens are derived?
a) Inference rule
b) Module rule
c) Both a & b
d) None of the mentioned
Answer: A

48. Which is also called single inference rule?


a) Reference
b) Resolution
c) Reform
d) None of the mentioned
Answer: B

49. Which form is called as conjunction of disjunction of literals?


a) Conjunctive normal form
b) Disjunctive normal form
c) Normal form
d) All of the mentioned
Answer: A

50. What can be viewed as a single literal of disjunction?


a) Multiple clause
b) Combine clause
c) Unit clause
d) None of the mentioned
Answer: C

51. Which is not a property of representation of knowledge?


a) Representational Verification
b) Representational Adequacy
c) Inferential Adequacy
d) Inferential Efficiency
Answer: A

52. Inference algorithm is complete only if,


a) It can derive any sentence
b) It can derive any sentence that is an entailed version
c) It is truth preserving
d) Both b & c
Answer: D

53. An inference algorithm that derives only entailed sentences is called sound or truth-preserving.
a) True
b) False
Answer: A

54. Optimality of BFS is


a) When there is less number of nodes
b) When all step costs are equal
c) When all step costs are unequal
d) Both a & c
Answer: B

55. How many successors are generated in backtracking search?


a) 1
b) 2
c) 3
d) 4
Answer: A
56. What is the space complexity of Depth-first search?
a) O(b)
b) O(bl)
c) O(m)
d) O(bm)
Answer: D

57. Which search algorithm imposes a fixed depth limit on nodes?


a) Depth-limited search
b) Depth-first search
c) Iterative deepening search
d) Bidirectional search
Answer: A

58. LIFO is ______ where as FIFO is ________?


a) Stack, Queue
b) Queue, Stack
c) Priority Queue, Stack
d) Stack. Priority Queue
Answer: A

59. When the environment of an agent is partially observable in search space following
problem/problems could occur.
a) Sensor-less problems: If the agent has no sensors at all, then (as far as it knows) it could be in one
of several possible initial states, and each action might therefore lead to one of several possible
successor states.
b) Contingency problems: If the environment is partially observable or if actions are uncertain, then
the agent’s percepts provide new information after each action. Each possible percept defines a
contingency that must be planned for. A problem is called adversarial if the uncertainty is caused by
the actions of another agent.
c) Exploration problems: When the states and actions of the environment are unknown, the agent
must act to discover them. Exploration problems can be viewed as an extreme case of contingency
problems
d) All of the above
Answer: D

60. For general graph, how one can get rid of repeated states?
a) By maintaining a list of visited vertices
b) By maintaining a list of traversed edges
c) By maintaining a list of non-visited vertices
d) By maintaining a list of non-traversed edges
Answer: A

61. DFS is ______ efficient and BFS is __________ efficient.


a) Space, Time
b) Time, Space
c) Time, Time
d) Space, Space
Answer: A

62. The main idea of bi-directional search is to reduce the time complexity by searching two way
simultaneously from start node and another from goal node.
a) True
b) False
Answer: A

63. An algorithm is complete if


a) It terminates with a solution when one exists
b) It starts with a solution
c) It does not terminate with a solution
d) It has a loop
e) It has a decision parameter.
Answer: A

64. What is Artificial intelligence?


a) Putting your intelligence into Computer
b) Programming with your own intelligence
c) Making a Machine intelligent
d) Playing a Game
e) Putting more memory into Computer
Answer: C

65. Which is not the commonly used programming language for AI?
a) PROLOG
b) Java
c) LISP
d) Perl
e) Java script
Answer: D

66. Which instruments are required for perceiving and acting upon the environment?
a) Sensors and Actuators
b) Sensors
c) Perceiver
d) None of the above
Answer: A

67. Artificial Intelligence has its expansion in the following application. (Mark all that apply)
a) Planning and Scheduling
b) Game Playing
c) Diagnosis
d) Robotics
e) All of the above
Answer: E
68. An ‘agent’ is anything that,
a) Perceives its environment through sensors and acting upon that environment through actuators
b) Takes input from the surroundings and uses its intelligence and performs the desired operations
c) An embedded program controlling line following robot
d) All of the mentioned
Answer: D

69. What is perception sequence of an agent?


a) A periodic inputs sets
b) a complete history of everything the agent has ever perceived
c) Both a) and b)
d) None of the mentioned
Answer: C

70. Agents behavior can be best described by


a) Perception sequence
b) Agent function
c) Sensors and Actuators
d) Environment in which agent is performing
Answer: B

71. Rational agent is the one who always does the right thing. State true or false
a) True
b) False
Answer: A

72. Performance Measures are fixed for all agents. State true or false
a) True
b) False
Answer: A
73. An omniscient agent knows the actual outcome of its actions and can act accordingly; but
omniscience is impossible in reality. Rational Agent always does the right thing; but Rationality is
possible in reality. State true or false
a) True
b) False
Answer: A

74. What could possibly be the environment of a Satellite Image Analysis System?
a) Computers in space and earth
b) Image categorization techniques
c) Statistical data on image pixel intensity value and histograms
d) All of the mentioned
Answer: D

75. How many types of agents are there in artificial intelligence?


a) 1
b) 2
c) 3
d) 4
Answer: D

76. Categorize Crossword puzzle in Fully Observable / Partially Observable.


a) Fully Observable
b) Partially Observable
Answer: A

77. The game of Poker is a single agent.


a) True
b) False
Answer: B

78. Satellite Image Analysis System is (Choose the one that is not applicable).
a) Episodic
b) Semi-Static
c) Single agent
d) Partially Observable
Answer: D

79. What is the rule of simple reflex agent?


a) Simple-action rule
b) Condition-action rule
c) Both a & b
d) None of the mentioned
Answer: B

80. An agent is composed of,


a) Architecture
b) Agent Function
c) Perception Sequence
d) Architecture and Program
Answer: D

81. In which of the following agent does the problem generator is present?
a) Learning agent
b) Observing agent
c) Reflex agent
d) None of the mentioned
Answer: A

Topic 3
82. The operation carried out by a NOT gate is also said to be
A. inverting
B. converting
C. reverting
D. reversing
Answer: A
83. A logic gate in which the output is 0 for the input 1 is said to be logic 1 is classified as
A. AND gate
B. NOT gate
C. OR gate
D. OUT gate
Answer: A
84. A logic gate in which any one of inputs is logic 1 results in output as logic 1 is said to be
A. IN gate
B. OUT gate
C. AND gate
D. OR gate
Answer: D
85. The table used to show the possible combination of inputs for an output is said to be
A. logic table
B. gate table
C. system circuit table
D. truth table
Answer: D
86. A table that shows the result of logical operations conducted is called
A. truth table
B. system table
C. logic table
D. circuit table
Answer: A

87. Which logic gate has the following truth table?


A. An exclusive OR gate.
B. A two-input OR gate
C. A two-input AND gate.
D. An exclusive NOR gate
Answer: A
88. Which of the following systems helps you with making a decision about a non-structured
problem?
A) Artificial intelligence
B) Neural network
C) Genetic algorithm
D) Decision support system
Answer: D

89. Which of the following systems analyzes spatial information?


A) Neural network
B) Genetic algorithm
C) Intelligent agent
D) Geographical information system
Answer: D

90. Which of the following systems mimics human thinking?


A) Artificial intelligence
B) Intelligent agent
C) Bot
D) Database management system
Answer: A

91. Which AI system provides a diagnosis to a specific problem?


A) Intelligent agent
B) Expert system
C) Geographical information system
D) Data mining system
Answer: B

92. Which AI system finds and identifies patterns; for instance; in the words you use?
A) Expert system
B) Intelligent system
C) Neural network
D) Fuzzy logic
Answer: C

93. Generally, AI systems analyze imprecise and subjective information. This information is called
_____.
A) Blurred data
B) Inclusive information
C) Fuzzy logic
D) Dirty data
Answer: C

94. Which AI system will work for you to find information on the internet?
A) Intelligent agent
B) Neural network
C) Genetic algorithm
D) Expert system
Answer: A

95. Which AI system will continue to analyze a problem until it finds the best solution?
A) Genetic algorithm
B) Neural network
C) Intelligent agent
D) Expert system
Answer: A

96. Which Intelligent Agent will monitor systems and report back to you when there is a problem?
A) Shopping bot
B) Buyer agent
C) Information agent
D) Predictive agent
Answer: D

97. Which Intelligent Agent can play an Internet game on your behalf?
A) Information agent
B) User agent
C) Predictive agent
D) Game agent
Answer: B
98. What is the term used for describing the judgmental or common sense part of problem solving?
A. Heuristic
B. Critical
C. Value based
D. Analytical
E. None of the above
Answer: A

99. What stage of the manufacturing process has been described as "the mapping of function onto
form"?

A. Design
B. Distribution
C. project management
D. field service
E. None of the above
Answer: A

100. Which kind of planning consists of successive representations of different levels of a plan?

A. hierarchical planning
B. non-hierarchical planning
C. All of the above
D. project planning
E. None of the above
Answer: A
101. What was originally called the "imitation game" by its creator?

A. The Turing Test


B. LISP
C. The Logic Theorist
D. Cybernetics
E. None of the above
Answer: A

102. Decision support programs are designed to help managers make:

A. budget projections
B. visual presentations
C. business decisions
D. vacation schedules
E. None of the above
Answer: C
103. Does AI aim at human-level intelligence?
A. Yes
B. No
C. Both
D. None
Answer: A
104. Which of the following is actually constructed during the heuristic search?
A. Binary
B. Search
C. Search Form
D. Search Tree
E. None
Answer: C

105. Among the following, which is not a horn clause?

a) p

b) Øp V q

e) p → q

d) p → Øq

e) All of the mentioned

Answer: D
106. The action ‘STACK(A, B)’ of a robot arm specify to

a) Place block B on Block A

b) Place blocks A, B on the table in that order

e) Place blocks B, A on the table in that order

d) Place block A on block B

e) POP A, B from stack.

Answer: D

107. What is a Cybernetics?

a) Study of communication between two machines

b) Study of communication between human and machine

c) Study of communication between two humans

d) Study of Boolean values

e) Study of communication between logic circuits

Answer: B

108. What is the goal of artificial intelligence?

a) To solve real-world problems

b) To solve artificial problems

c) To explain various sorts of intelligence

d) To extract scientific causes

e) To restrict problems

Answer: C

109. An algorithm is complete if

a) It terminates with a solution when one exists

b) It starts with a solution

c) It does not terminate with a solution

d) It has a loop

e) It has a decision parameter

Answer: A

110. Which is true regarding BFS (Breadth First Search)?

a) BFS will get trapped exploring a single path

b) The entire tree so far been generated must be stored in BFS


c) BFS is not guaranteed to find a solution, if exists

d) BFS is nothing but Binary First Search

e) BFS is one type of sorting

Answer: B

111. What is a heuristic function?

a) A function to solve mathematical problems

b) A function which takes parameters of type string and returns an integer value

c) A function whose return type is nothing

d) A function which returns an object

e) A function that maps from problem state descriptions to measures of desirability

Answer: E

112. The traveling salesman problem involves n cities with paths connecting the cities. The time
taken for traversing through all the cities, without knowing in advance the length of a minimum tour,
is

a) O(n)

b) O(n2)

c) O(n!)

d) O(n/2)

e) O(2n)

Answer: C

113. The problem space of means-end analysis has

a) An initial state and one or more goal states

b) One or more initial states and one goal state

c) One or more initial states and one or more goal state

d) One initial state and one goal state

e) No goal state

Answer: A

114. An algorithm A is admissible if

a) It is not guaranteed to return an optimal solution when one exists

b) It is guaranteed to return an optimal solution when one exists

c) It returns more solutions, but not an optimal one

d) It guarantees to return more optimal solutions


e) It returns no solutions at all

Answer: B

115. The primary interactive method of communication used by humans is:

a) Reading

b) Writing

c) Speaking

d) All of the mentioned

Answer: C

116. Elementary linguistic units which are smaller than words are:

a) Allophones

b) Phonemes

c) Syllables

d) All of the mentioned

Answer: D

117. A mouse device may be:

a) electro-chemical

b) Mechanical

c) Optical

d) Both b and c

Answer: D

118. An expert system differs from a database program in that only an expert system:

a) Contains declarative knowledge

b) Contains procedural knowledge

c) Features the retrieval of stored information

d) Expects users to draw their own conclusions

Answer: B

119. Arthur Samuel is linked inextricably with a program that played:

a) Checkers

b) Chess

c) Cricket

d) Football
e) None of the mentioned

Answer: A

120. Natural language understanding is used in:

a) Natural language interfaces

b) Natural language front ends

c) Text understanding systems

d) All of the mentioned

Answer: D

121. Which of the following are examples of software development tools?

a) Debuggers

b) Editors

c) Assemblers, compilers and interpreters

d) All of the mentioned

Answer: D

122. The first AI programming language was called:

a) BASIC

b) FORTRAN

c) IPL(Inductive logic programming)

d) LISP

Answer: D

123. The Personal Consultant is based on:

a) EMYCIN

b) OPS5+

c) XCON

d) All of the mentioned

Answer: D

124. Which of the following is an advantage of using an expert system development tool?

a) Imposed structure

b) Knowledge engineering assistance

c) Rapid prototyping

d) All of the mentioned


Answer: D

125. An AI system developed by Daniel Bobrow to read and solve algebra word problems

a) SHRDLU

b) SIMD

c) BACON

d) STUDENT

Answer: D

126. The “Turing Machine” showed that you could use a/an _____ system to program any
algorithmic task.

a) Binary

b) Electro-chemical

c) Recursive

d) Semantic

Answer: A

127. MCC is investigating the improvement of the relationship between people and computers
through a technology called:

a) Computer-aided design

b) Human factors

c) Parallel processing

d) All of the mentioned

Answer: B

128. The first widely-used commercial form of Artificial Intelligence (Al) is being used in many
popular products like microwave ovens, automobiles and plug in circuit boards for desktop PCs. It
allows machines to handle vague information with a deftness that mimics human intuition. What is
the name of this Artificial Intelligence?

a) Boolean logic

b) Human logic

c) Fuzzy logic

d) Functional logic

Answer: C

129. In his landmark book Cybernetics, Norbert Wiener suggested a way of modeling scientific
phenomena using not energy, but:

a) Mathematics
b) Intelligence

c) Information

d) History

Answer: C

130. Input segments of AI programming contain(s)

a) Sound

b) Smell

c) Touch

d) Sight and taste

e) All of the mentioned

Answer: E

131. The applications in the Strategic Computing Program include:

a) Battle management

b) Autonomous systems

c) Pilot’s associate

d) All of the mentioned

Answer: D

132. Which search agent operates by interleaving computation and action?


a) Offline search
b) Online search
c) Breadth-first search
d) Depth-first search
Answer: B
133. What is called as exploration problem?
a) State and actions are unknown to the agent
b) State and actions are known to the agent
c) Only actions are known to agent
d) Both b & c
Answer: A
134. Which are necessary for an agent to solve an online search problem?
a) Actions
b) Step-cost function
c) Goal-test
d) All of the mentioned
Answer: D
135. When do we call the states are safely explorable?
a) A goal state is unreachable from any state
b) A goal state is denied access
c) A goal state is reachable from every state
d) None of the mentioned
Answer: C
136. In which state spaces does the online-dfs-agent will work?
a) Irreversible state spaces
b) Reversible state spaces
c) searchable state spaces
d) All of the mentioned
Answer: B
137. Which of the following algorithm is online search algorithm?
a) Breadth-first search algorithm
b) Depth-first search algorithm
c) Hill-climbing search algorithm
d) None of the mentioned
Answer: C
138. Which search algorithm will use limited amount of memory?
a) RBFS
b) SMA*
c) Hill-climbing search algorithm
d) Both a & b
Answer: D
139. What is meant by simulated annealing in artifical intelligence?
a) Returns an optimal solution when there is a proper cooling schedule
b) Returns an optimal solution when there is no proper cooling schedule
c) It will not return an optimal solution when there is a proper cooling
schedule
d) None of the mentioned
Answer: A
140. How the new states are generated in genetic algorithm?
a) Composition
b) Mutation
c) Cross-over
d) Both b & c
Answer: D
141. Which method is effective for escaping from local minima?
a) Updating heuristic estimate
b) Reducing heuristic estimate
c) Eliminating heuristic estimate
d) None of the mentioned
Answer: A
142. Which is created by using single propositional symbol?
a) Complex sentences
b) Atomic sentences
c) Composition sentences
d) None of the mentioned
Answer: B
143. Which is used to construct the complex sentences?
a) Symbols
b) Connectives
c) Logical connectives
d) All of the mentioned
Answer: C
144. How many logical connectives are there in artificial intelligence?
a) 2
b) 3
c) 4
d) 5
Answer: D
145. Which is used to compute the truth of any sentence?
a) Semantics of propositional logic
b) Alpha-beta pruning
c) First-order logic
d) Both a & b
Answer: A
146. Which are needed to compute the logical inference algorithm?
a) Logical equivalence
b) Validity
c) Satisfiability
d) All of the mentioned
Answer: D
147. What will happen if the hypothesis space contains the true function?
a) Relizable
b) Unrelizable
c) Both a & b
d) None of the mentioned
Answer: B
148. Which is also called single inference rule?
a) Reference
b) Resolution
c) Reform
d) None of the above
Answer: B
149. Which form is called as conjunction of disjunction of literals?
a) Conjunctive normal form
b) Disjunctive normal form
c) Normal form
d) All of the mentioned
Answer: A
150. What can be viewed as single lateral of disjunction?
a) Multiple clauses
b) Combine clause
c) Unit clause
d) None of the mentioned
Answer: C
151. Which search is equal to mini-max search but eliminates the branches that can’t influence the
final decision?
a) Depth-first search
b) Breadth-first search
c) Alpha-beta pruning
d) None of the mentioned
Answer: C
152. Which values are independant in mini-max search algorithm?
a) Pruned leaves x and y
b) Every states are dependant
c) Root is independant
d) None of the mentioned
Answer: A
To which depth does the alpha-beta pruning can be applied?
a) 10 states
b) 8 States
c) 6 States
d) Any depth
Answer: D
153. Which search is similar to mini-max search?
a) Hill-climbing search
b) Depth-first search
c) Breadth-first search
d) All of the mentioned
Answer: B
154. Which value is assigned to alpha and beta in the alpha-beta pruning?
a) Alpha = max
b) Beta = min
c) Beta = max
d) Both a & b
Answer: D
155. Where does the values of alpha-beta search get updated?
a) Along the path of search
b) Initial state itself
c) At the end
d) None of the mentioned
Answer: A
156. How the effectiveness of the alpha-beta pruning gets increased?
a) Depends on the nodes
b) Depends on the order in which they are executed
c) Both a & b
d) None of the mentioned
Answer: A
157. What is called as transposition table?
a) Hash table of next seen positions
b) Hash table of previously seen positions
c) Next value in the search
d) None of the mentioned
Answer: B
158. Which is identical to the closed list in Graph search?
a) Hill climbing search algorithm
b) Depth-first search
c) Transposition table
d) None of the mentioned
Answer: C
159. Which function is used to calculate the feasibility of whole game tree?
a) Evaluation function
b) Transposition
c) Alpha-beta pruning
d) All of the mentioned
Answer: A
4. TURING TEST

EASY

A.M. Turing developed a technique for determining whether a computer could or could not
demonstrate the artificial Intelligence, Presently, this technique is called…..
a) Turing Test
b) Algorithm
c) Boolean Algebra
d) Logarithm

Answer: a

Intelligent' machinery was discovered in…


a. 1960
b. 1930
c.1946
d.1950

Ans: C

Which techniques are used in pattern recognition?

a. Segmentation of input
b. Expert rules
c. Context experts
d. Learning from a human trainer
e. All of the above

Ans: e
Which of the following defines semantics?

a. The set of rules for constructing sentences from words


b. The underlying meaning of words and phrases
c. A set of idiomatic expressions
d. The study of knowledge bases
e. The translation of text files

ANS:B

Natural-language processing……..

a. Made it possible for computers to pass the Turing test


b. Makes computers understand multiple meanings of words
c. Cannot flawlessly translate books or conversations
d. Utilizes all words in a language
e. All of the above

ANS:C

What does a complete expert system include?

a. A knowledge base
b. A way to produce the requested advice
c. An inference engine
d. A way for users to interact with the system
e. All of the above

ANS:E

What does the field of pattern recognition include?

a. Image analysis
b. Optical character recognition (OCR)
c. Automatic speech recognition
d. Neural network research
e. All of the above

ANS:E

What can optical character recognition applications not yet do?

a. Read aloud to the blind


b. Be trained by human feedback to recognize fonts and styles
c. Locate and identify print characters embedded in images
d. Be used with written Asian scripts
e. Actually, OCR applications can do all of these things.

ANS:E

What is the most significant difference between a robot and other computers?

a. Its input and output peripherals are different.


b. Its processor is much faster.
c. It has much more memory.
d. It looks a lot like a human being.
e. All of the above
ANS: A

What is the downside of expert systems?

a. Expert systems are not good at strategizing.


b. It is very work-intensive to build the knowledge base.
c. They are less flexible and creative than human thinkers.
d. Expert systems handle only a narrow domain of knowledge.
e. All of the above.
ANS:E

Image analysis

a. Represents about half of the AI industry


b. Is the process of identifying objects and shapes in visual images?
c. Is a simplified form of pattern recognition technology?
d. Is difficult for both computers and humans to perform
e. All of the above

ANS:B

INTERMEDIATE

In recent years .........has taken up the two themes that Turing found most difficult to fit into his
thesis of computable mental functions
a. Roger Penrose
b. Alan Turing
c. Penrose Turing
d. None of the Above
Ans: A

..........holds that the function of brain cannot be simulated by a computer program because of its
quantum mechanical physical basis

a. Roger Penrose
b. Alan Turing
c. Penrose Turing
d. None of the Above
Ans: A

In which year did Turing wrote to his friend and colleague Robin Gandy that he was 'trying find a
new quantum mechanics'
a. 1960
b. 1930
c.1953-4
d.1950

Ans: C
What does a complete expert system include?

a. A knowledge base
b. A way to produce the requested advice
c. An inference engine
d. A way for users to interact with the system
e. All of the above

Ans: e

Which of these is not true?

a. Neural networks use thousands of processors called neurons.


b. Neural networks are trained, not programmed in the usual way.
c. Neural nets use a rule-based approach to recognize patterns.
d. Neural networks learn by trial and error.
e. Neural nets store information as patterns.

ANS:C

ADVANCED

What did Alan Turing propose as a way to answer the question “Can computers think?”

a. Allowing computers to enter the World Chess Championship


b. The imitation game, later called the Turing test
c. Programming a computer to solve calculus problems
d. Teaching a computer to program itself
e. Creating a computer “baby” and seeing if it could learn on its own

Ans: b

Why did early efforts in AI focus on games such as checkers and chess?

a. Unlike the real world, games have clearly defined rules.


b. Unlike the real world, the goal of a game is clear.
c. It’s easy to represent the “world” of a game inside the memory of a computer.
d. Success is easy to measure: Does the program win?
e. All of the above

Ans: e

Some AI techniques used today in applications include

a. Searching—looking ahead at possibilities


b. Heuristics—rules of thumb
c. Pattern recognition—recognizing recurring patterns
d. Machine learning—programs learning from experience
e. All of the above

Ans: e

Which statement about machine translation is true?

a. The most successful programs do word-by-word translation backed up by huge dictionaries


containing all known words in both languages.
b. The most successful programs extract the meaning of the underlying text, then use their
understanding of the author’s intent to guide the translation.
c. Many programs use a statistics-based approach based on a huge number of examples of
correct and incorrect translations.
d. The most successful machine language programs first translate the source text into a neutral
language, usually Esperanto, then translate from the neutral language into the desired target
language.
e. There is no such thing as a computer program to translate from one language to another.

Ans: C

Which of these statements is true?

a. Computer scientist Joseph Weizenbaum was shocked to discover that people credited his
simple conversational program, ELIZA, with genuine human understanding.
b. AI researchers believe it is possible for humans to create computers more intelligent than
the average human being.
c. The number of industrial robots is actually declining as manufacturing companies continue
to ship jobs to countries with lower wages.
d. The best machine translation programs do a comparable job to a human translator.
e. All of the above statements are true.
Ans: a
EASY

Which is used to compute the truth of any sentence?


a) Semantics of propositional logic
b) Alpha-beta pruning
c) First-order logic
d) Both a & b
Answer: a

Which are needed to compute the logical inference algorithm?


a) Logical equivalence
b) Validity
c) Satisfiability
d) All of the mentioned
Answer: d

From which rule does the modus ponens are derived?


a) Inference rule
b) Module rule
c) Both a & b
d) None of the mentioned
Answer: a

Which is also called single inference rule?


a) Reference
b) Resolution
c) Reform
d) None of the mentioned

Answer: b
What can be viewed as a single literal of disjunction?
a) Multiple clause
b) Combine clause
c) Unit clause
d) None of the mentioned

Answer: c

Which is not a property of representation of knowledge?


a) Representational Verification
b) Representational Adequacy
c) Inferential Adequacy
d) Inferential Efficiency

Answer: a

..............is one of the oldest techniques of knowledge representation.

a) Temperature
b) Pressure
c) Production systems
d) Signal
e) Output

Answer: c

Production system consist of a set of


a) Temperature
b) Pressure
c) Production systems
d) Production rules
e) Ram

Answer: d

................generally holds data either in the form of clauses or object- attribute – value (OAV) triplet
form.
a) Temperature
b) Pressure
c) Working memory
d) Production rules
e) OAV

Answer: c

........in propositional logic is a statement that is true regardless of the truth assignment of
propositions.
a) Temperature
b) Tautology
c) Working memory
d) Production rules
e) Proposition logic

Answer: b

The law of ...... is an inference rule for use in proofs in predicate logic.

a) Temperature
b) Tautology
c) Predicate logic
d) Production rules
e) Variable substitution

Answer: e

Prolog is a programming language based on

a) Temperature
b) Tautology
c) Predicate logic
d) Production rules
e) Variable substitution
Answer: c

.......attempts to prove a goal, such as brother (Barney,x), from a set of facts and rules.
a) Temperature
b) Prolog Program
c) Predicate logic
d) Production rules
e) Variable substitution
Answer: b

Which is not Familiar Connectives in First Order Logic?


a) and
b) iff
c) or
d) not

Answer: d

Inference algorithm is complete only if,


a. It can derive any sentence
b. It can derive any sentence that is an entailed version
c. It is truth preserving
d. Both b & c
Answer: d

An inference algorithm that derives only entailed sentences is called sound or truth-preserving.
a) True
b) False

Answer: a

Which form is called as conjunction of disjunction of literals?


a) Conjunctive normal form
b) Disjunctive normal form
c) Normal form
d) All of the mentioned

Answer: a

First Order Logic is also known as,


a) First Order Predicate Calculus
b) Quantification Theory
c) Lower Order Calculus
d) All of the mentioned above

Answer: d

INTERMEDIATE

The adjective “first-order” distinguishes first-order logic from ___________ in which there are
predicates having predicates or functions as arguments, or in which one or both of predicate
quantifiers or function quantifiers are permitted.

a) Representational Verification
b) Representational Adequacy
c) Higher Order Logic
d) Inferential Efficiency
Answer: c

An.......is a statement that everyone believes is true, such as "supply equals demand" or "the only
constant is change
a. axio
b. axis
c. text
d. none of the above

Ans:a

Predicate calculus semantics.....


a. provide a formal basis for determining the truth value of Well Formed Formula (WFF)
b. provide a formal basis for determining the false value of Well Formed Formula (WFF)
c. None of the above
d. All of the above

Ans:A

........is a language allows quantified variables to refer to objects in the domain of discourse and not
to predicates or functions.
a.First order predicate Calculus
b. Predicate calculus semantics
c. None of the above
d. All of the above
Ans:A

ADVANCED

Design a control algorithm for the following:


Every person who get married and have at least a child is called father
a. X(married(X) ^ have (X, child) father(X))
b. Y(married(X) ^ have (X, child) father(X))
C. Y(married(X) ^ have (Y, child) father(X))
D. None of the above

Ans A

Design a control algorithm for the following: John didn't study but is lucky.
a. ~ study (john) ^ lucky (john)
b. ~ study (john) ^ unlucky (john)
C. ~ notstudy (john) ^ lucky(john)
D. None of the above

Ans A

Design a control algorithm for the following: Anyone who studies or is lucky can pass all their exams.
a. XY(study(X) v lucky(X) pass(X,Y) ^ exam(Y)
b. X(study(X) v lucky(X) pass(X) ^ exam(Y)
C. Y(study(X) v lucky(X) pass(X) ^ exam(Y)
D. None of the above
Ans A

Design a control algorithm for the following: Any one passing their exams and winning the lottery is
happy.
a. X(pass(X, exams) ^ win (X, lottery) happy(X))
b. y(pass(X, exams) ^ win (y, lottery) happy(X))
C. X(pass(X, exams) ^ win (y, lottery) happy(y))
D. None of the above
Ans A
6. Robotics

EASY

......is a mathematical model for reasoning with predicates: functions that map variables to truth
values.

a) Temperature
b) Predictive logic
c) Working memory
d) Production rules
e) OAV

Answer: b

A proof in predicate logic has much the same form as a proof in......
a) Temperature
b) Tautology
c) Predicate logic
d) Production rules
e) Proposition logic

Answer: e

.............is an automatic mechanical device often resembling a human or animal? Modern robots are
usually an electro-mechanical machine guided by a computer program or electronic circuitry
a) Robots
b) Circuits
c) Feedback
d) Signal
e) Output

Answer: a

........ is the branch of technology that deals with the design, construction, operation, and application
of robots, as well as computer systems for their control and sensory feedback
a) Robotics
b) Circuits
c) Robots
d) Signal
e) Output

Answer: a

The major categories of industrial robots by mechanical structure are:


a) Cartesian robot /Gantry robot:
b) Circuits/Circuitry
c) Robots/Robotics
d) Robots/Circuitry
e) Output

Answer: a

......Used for assembly operations, handling at machine tools, spot welding, and handling at
diecasting machines.
a) Cylindrical robot
b) Circuits
c) Robots
d) Spherical/Polar robot
e) Output
Answer: a

.......can simulate a real robot or just perform a repeating task.


a) Cylindrical robot
b) Articulated robot
c) Virtual Robots
d) Parallel robot
e) SCARA robot

Answer: c

BEAM is short for:

a) Biology, Electronics, Aesthetics and Motion


b) Biology, Electrical, Aesthetics and Mechanics
c) Biology, Electronics, Aesthetics and Mechanics
d) Biology, Electronics, Aerobic and Mechanics

Answer: c

......robots can be simple and very suitable for starters.


a) Cylindrical robot
b) Articulated robot
c) BEAM Robots
d) Parallel robot
e) SCARA robot

Answer: c

......look remarkably like insects.


a) Cylindrical robot
b) Articulated robot
c) BEAM Robots
d) Parallel robot
e) SCARA robot

Answer: c

What is the name for information sent from robot sensors to robot controllers?

a) Cylindrical robot
b) Articulated robot
c) BEAM Robots
d) Parallel robot
e) SCARA robot

Answer: c

......the assembly of the parts using screws, bolts, glues, solder, etc
a) Swivel
b) Axle
c) Fabric
d) Fabrication
e) Yaw

Answer: d

.....is a correction factor for data that establishes an indicated value of zero when the robot is at the
predetermined Home (calibration position).
a) Swivel
b) Axle
c) Fabric
d) Absolute Data (ABSO Data)
e) Yaw

Answer: d
A ....... with an arm that is broken into sections (links) by one or more joints

a) Swivel
b) Accuracy
c) Articulated Manipulator
d) Absolute Data (ABSO Data)
e) Actuator

Answer: c

......describes a jointed device, such as a jointed manipulator.

a) Articulation
b) Accuracy
c) Articulated Manipulator
d) Absolute Data (ABSO Data)
e) Actuator

Answer: a

Which of the following terms refers to the rotational motion of a robot arm?
a) Swivel
b) Axle
c) Retrograde
d) Roll
e) Yaw

Answer: d

What is the name for the space inside which a robot unit operates?
a) environment
b) Spatial base
c) Danger zone
d) Exclusion zone
e) Work envelop

Answer: e

Which of the following terms IS NOT one of the five basic parts of a robot?
a) Peripheral tools
b) End effectors
c) Controller
d) Drive
e) Sensor

Answer: a

Decision support programs are designed to help managers make:


a) Budget projections
b) Visual presentations
c) Business decisions
d) Vacation schedules
e) None of the above

Answer: c

PROLOG is an AI programming language which solves problems with a form of symbolic logic known
as predicate calculus. It was developed in 1972 at the University of Marseilles by a team of specialists.
Can you name the person who headed this team?

a) Alain Colmerauer
b) Nicklaus Wirth
c) Seymour Paper
d) John McCarthy
e) None of the above

Answer: a
The number of moveable joints in the base, the arm, and the end effectors of the robot determines
………….. ?
a) Degrees of freedom
b) Payload capacity
c) Operational limits
d) Flexibility
e) Cost

Answer: a

Which of the following places would be LEAST likely to include operational robots?
a) Warehouse
b) Factory
c) Hospitals
d) Private homes
e) Chemical research laboratories

Answer: d

Which of the following terms refers to the use of compressed gasses to drive (power) the robot
device?
a) Pneumatic
b) Hydraulic
c) Piezo electric
d) Photo sensitive
e) Electric

Answer: a

The original LISP machines produced by both LMI and Symbolics were based on research performed
at:
a) CMU
b) MIT
c) Stanford University
d) RAMD
e) None of the above

Answer: b

In a rule-based system, procedural domain knowledge is in the form of:


a) Production rules
b) Rule interpreters
c) meta-rules
d) Control rules
e) None of the mentioned

Answer: a

If a robot can alter its own trajectory in response to external conditions, it is considered to be:
a) Intelligent
b) Mobile
c) Open loop
d) Non-servo
e) None of the mentioned

Answer: a

One of the leading American robotics centres is the Robotics Institute located at:
a) CMU
b) MIT
c) RAND
d) SRI
e) None of the mentioned

Answer: a

INTERMEDIATE
.........in predicate logic has much the same form as a logical expression in propositional logic, with the
addition of atomic formulae (ie., predicates), and the universal and existential quantifiers.
a) Temperature
b) Predictive logic
c) Working memory
d) Logical expression
e) OAV

Answer: d

(A x) L1(x) OR (E x) L2(x,y)

The variable x in L1 is bound to the:


a) Universal quantifier
b) Predictive logic
c) Working memory
d) Logical expression
e) OAV

Ans: A

(A x) L1(x) OR (E x) L2(x,y)

The variable x in L2 is bound to the:


a) Universal quantifier
b) Predictive logic
c) Existential quantifier
d) Logical expression
e) OAV

Ans: C

(A x) L1(x) OR (E x) L2(x,y)
The variable y is
a) Universal quantifier
b) Predictive logic
c) Existential quantifier
d) Logical expression
e) Free in this expression

Ans: e

A tautology in.......is a statement that is true regardless of the interpretation of predicates, and
regardless of the bindings chosen for any globally unbound variables.

a) Temperature
b) Tautology
c) Predicate logic
d) Production rules
e) Proposition logic

Answer: c

Used for handling at machine tools, spot welding, die-casting, fettling machines, gas welding and arc
welding.

a) Cylindrical robot
b) Circuits
c) Spherical
d) Spherical/Polar robot
e) Output

Answer: c

Used for pick and place work, application of sealant, assembly operations and handling machine
tools.
a) Cylindrical robot
b) Circuits
c) Spherical
d) Spherical/Polar robot
e) SCARA robot

Answer: e

Used for assembly operations, die-casting, fettling machines, gas welding, arc welding and spray
painting.
a) Cylindrical robot
b) Articulated robot
c) Spherical
d) Spherical/Polar robot
e) SCARA robot

Answer: b

Which one use is a mobile platform handling cockpit flight simulators? It's a robot whose arms have
concurrent prismatic or rotary joints.
a) Cylindrical robot
b) Articulated robot
c) Spherical
d) Parallel robot
e) SCARA robot

Answer: d

.........run a program that give them the opportunity to decide on the action to perform depending
on their surroundings.
a) Cylindrical robot
b) Articulated robot
c) Autonomous Robots
d) Parallel robot
e) SCARA robot
Answer: c

.......the measurement of the deviation between the command characteristic and the attained
characteristic (R15.05-2), or the precision with which a computed or calculated robot position can be
attained.

a) Swivel
b) Accuracy
c) Fabric
d) Absolute Data (ABSO Data)
e) Yaw

Answer: b

..........is one in which motion modification during the performance of a task is initiated by the
control system.
a) Swivel
b) Accuracy
c) Fabric
d) Absolute Data (ABSO Data)
e) Active Compliant Robot

Answer: e

.... is a power mechanism used to effect motion, or maintain position of the robot (for example, a
motor which converts electrical energy to effect motion of the robot) (R15.07).

a) Swivel
b) Accuracy
c) Fabric
d) Absolute Data (ABSO Data)
e) Actuator
Answer: e

Which of the following statements concerning implementation of robotic systems is correct?


a) Implementation of robots CAN save existing jobs
b) Implementation of robots CAN create new jobs
c) Robotics could prevent a business from closing
d) all of the mentioned
e) Only B and C are possible

Answer: d

Which of the following IS NOT one of the advantages associated with a robotics implementation
program?
a) Low costs for hardware and software
b) Robots work continuously around the clock.
c) Quality of manufactured goods can be improved.
d) Reduced company cost for worker fringe benefits
e) Higher volume output of manufactured products

Answer: a

ADVANCED

Consider the following logical expression in predicate logic:


P(x,y) -> (E z)(P(x,z) AND P(z,y)), We can read this as:

a. "if P(x,y) then there exists z such that P(x,z) and P(z,y)".
b."if P(x) then there exists z such that P(x,z) and P(z,y)".
c. "if P(y) then there exists z such that P(x,z) and P(z,y)".
d. None of the above
Ans: A

Given the following expression:


(A x)P(x) OR (E x)(NOT P(x))
We can rename the second occurrence of x to avoid any overlap with the first occurrence and arrive
at the equivalent expression

a. (A x)P(x) OR (E y)(NOT P(y))


b.(A y)P(x) OR (E y)(NOT P(y))
c.(A x)P(y) OR (E y)(NOT P(y))
d. None of the above
Ans : A

Given the following expression:

(A x)P(x) OR (E y)(NOT P(y))


Moving the universal quantifier through the OR we arrive at

a. (A x)P(x) OR (E y)(NOT P(y)))


b.(A y)P(x) OR (E y)(NOT P(y))
c.(A x)P(y) OR (E y)(NOT P(y))
d. None of the above
Ans : A

Given the following expression :(A x)P(x) OR (E y)(NOT P(y)))

Moving the existential quantifier through the OR we arrive at

a. (A x) (E y) (P(x) OR NOT P(y))


b.(A y)P(x) OR (E y)(NOT P(y))
c.(A x)P(y) OR (E y)(NOT P(y))
d. None of the above
Ans : A

With regard to the physics of power systems used operate robots, which statement or statements is
most correct?
a) Hydraulics involves the compression of liquids
b) Hydraulics involves the compression of air
c) Pneumatics involve the compression of air
d) Chemical batteries produce AC power
e) All of the mentioned are basic principles of physics

Answer: c

Which of the following “laws” is Azimov’s first and most important law of robotics?
a) Robot actions must never result in damage to the robot
b) Robots must never take actions harmful to humans
c) Robots must follow the directions given by humans
d) Robots must make business a greater profit
e) Robots should be used to eliminate jobs of human workers

Answer: b

In LISP, the function returns t if is a CONS cell and nil otherwise:


a) (cons )
b) (consp )
c) (eq )
d) (cous = )
e) None of the above

Answer: b

You might also like