Sie sind auf Seite 1von 24

Solved Assignment By

Ignougroup.com

MCSE-003
Q1. What is “Turing test” ? Give a brief outline of the Turing test. What are the
limitations of Turing test? How “Chinese Room Test” took over the limitations of
Turing test? How did the outcomes of the Chinese Room Test contribute in the
development of machine intelligence?

Ans:

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Q2. Briefly discuss the concept of Resolution and Unification mechanism in


Artificial intelligence. Given knowledge consists of the facts

Ans:

(i) Whoever can read is literate.

Ans: ∀ X. read(X) → lit(X)

(ii) Dolphins are not literate.

Ans: ∀ X. dolp(X) → ¬ lit(X)

(iii) Some Dolphins are intelligent.

Ans: dolp(flipper) ∧ intell(flipper)

Q3. (a) Transform the following to DNF :

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

(b) Given the formulae E1 : A → B : E2 : ~B: G: ~A Prove the G is logical


Consequence of E1 and E2 without truth table.

Ans:

(c) Transform the following well formed formula to Prenex normal form (∀
∀x) (Q(x)
→ (∃∃x) R (x, y))

Ans:

Q4. Differentiate the following:

(i) Monotonic reasoning and Non-Monotonic reasoning

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Ans: A Monotonic reasoning is more of a well-driven fact which does not retract over a
new spectrum of evidence. The knowledge base is of fixed size and can not be updated
as in prologue file which is fixed during the clause checking and does not update that
automatically.

A non-monotonic reasoning is a heuristic inference which can be invalidated or


retracted further by adding more pieces of evidence and data facts. A machine has the
capability to learn itself by getting possible operations on it so when clauses are given to
it. It updates the database when conflicting situations are not created, else it gets
demoted from current set and is moved to the update set that is not in use and checked
further for its positive clause of fact.

(ii) Predicate logic and Propositional logic

Ans: Propositional logic (also called sentential logic) is logic that includes sentence
letters (A,B,C) and logical connectives, but not quantifiers. The semantics of
propositional logic uses truth assignments to the letters to determine whether a
compound propositional sentence is true.

Predicate logic is usually used as a synonym for first-order logic, but sometimes it is
used to refer to other logics that have similar syntax. Syntactically, first-order logic has
the same connectives as propositional logic, but it also has variables for individual
objects, quantifiers, symbols for functions, and symbols for relations. The semantics
include a domain of discourse for the variables and quantifiers to range over, along with
interpretations of the relation and function symbols.

Many undergrad logic books will present both propositional and predicate logic, so if you
find one it will have much more info. A couple of well-regarded options that focus
directly on this sort of thing are Mendelson's book or Enderton's book.

(iii) Supervised learning and Unsupervised learning

Ans: In Supervised learning, you train the machine using data which is well "labeled." It
means some data is already tagged with the correct answer. It can be compared to
learning which takes place in the presence of a supervisor or a teacher.

A supervised learning algorithm learns from labeled training data, helps you to predict
outcomes for unforeseen data. Successfully building, scaling, and deploying accurate
supervised machine learning Data science model takes time and technical expertise
from a team of highly skilled data scientists. Moreover, Data scientist must rebuild
models to make sure the insights given remains true until its data changes.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Unsupervised learning is a machine learning technique, where you do not need to


supervise the model. Instead, you need to allow the model to work on its own to
discover information. It mainly deals with the unlabelled data.

Unsupervised learning algorithms allow you to perform more complex processing tasks
compared to supervised learning. Although, unsupervised learning can be more
unpredictable compared with other natural learning deep learning and reinforcement
learning methods.

(iv) Scripts and Frames

Ans: Two other popular knowledge representation formalisms are frames and scripts.
Although these were developed independently (both originating in the early 1970s), and
are different in important ways, they have sufficient similarities to be considered
together. One influential proponent of frame-based systems is Marvin Minsky (1975); a
champion of script-based systems is Roger Schank (see Schank and Abelson, 1977).
The key idea involved in both frames and scripts is that our knowledge of concepts,
events, and situations is organized around expectations of key features of those
situations.

Consider a stereotypical situation, such as going to hear a lecture. One's knowledge of


what might go on during such an event is based on assumptions. For instance, it can be
assumed that the person who actually delivers the lecture is likely to be identical with
the person advertised; that the lecturer's actual time of arrival is not more than a few
minutes after the advertised start; that the duration of the lecture is unlikely to exceed
an hour and a half at the maximum; and so on. These and other expectations can be
encoded in a generic `lecture frame' to be modified by what actually occurs during a
specific lecture. This frame will include various slots, where specific values can be
entered to describe the occasion under discussion. For example, a lecture frame may
include slots for `room location', `start time', `finish time', and so on

Q5. What are the systems available to handle the incompleteness of a knowledge
base? Discuss each in detail with suitable example. What do you understand by
the term “Fuzzyfication”? Given below a fuzzy set to describe the term tall tall =
(5’/0.0; 5’5”/0.2; 5’8” /0.5 6’/0.7; 6’5”/0.8; 7’/1.0) Discuss and describe membership
function for the fuzzy sets for each of the terms:

Ans:

Fuzzification

Fuzzification is the process of decomposing a system input and/or output into one or
more fuzzy sets. Many types of curves and tables can be used, but triangular or

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

trapezoidal-shaped membership functions are the most common, since they are easier
to represent in embedded controllers. Figure 7.18 shows a system of fuzzy sets for an
input with trapezoidal and triangular membership functions. Each fuzzy set spans
a region of input (or output) values graphed against membership. Any particular input is
interpreted from this fuzzy set, and a degree of membership is obtained. The
membership functions should overlap, in order to allow smooth mapping of the system.
The process of fuzzification allows the system inputs and outputs to be expressed
in linguistic terms to allow rules to be applied in a simple manner to express a complex
system.

Sign in to download full-size image

Figure 7.18. A temperature scale defined by fuzzy set theory.

Consider a simplified implementation of an air-conditioning system with a temperature


sensor. The temperature might be read by a microprocessor that has a fuzzy algorithm
that processes output to continuously control the speed of a motor which keeps the
room at a “good temperature”; it also can direct a vent upward or downward as
necessary. Figure 7.18 illustrates the process of fuzzification of the air temperature.

(i) Very tall

Ans: (5’/0.0; 5’5”/0.2; 5’8” /0.5 6’/0.7; 6’5”/0.8; 7’/1.0)

(ii) More or less tall

Ans: (5’/1; 5’5”/0.6; 5’8” /0.5 6’/0.4; 6’5”/0.6; 7’/0)

(iii) Not tall

Ans: (5’/1; 5’5”/0.8; 5’8” /0.5 6’/0.3; 6’5”/0.2; 7’/1.0)

Q6. (a) What do you mean by S-Expression in LISP? Briefly describe by the type
of S-Expressions available in LISP.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Ans:

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

(b) Write a program in LISP to find the factorial of a number, entered by the user.
Give comments in the program to explain your logic.

Ans: This example uses recursive factorial definition (which is natural for Lisp).
Features:

math operators: (- n 1) is prefix notation equivalent to n-1 in infix notation;

Comparison operators: (= n 0) evaluates to T if n is zero, and to nil (used as false)


otherwise;

Conditional operator if: Lisp expressions are evaluated using brackets, so they can be
written in several lines;

function definition using defun;

Common Lisp macro loop;

format specifiers in format: ~D corresponds to printing an integer, and ~% is end-of-line.

(defun factorial (n)

(if (= n 0)

(* n (factorial (- n 1))) ) )

(loop for i from 0 to 16

do (format t "~D! = ~D~%" i (factorial i)) )

(c) Evaluate the following LISP expressions:

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

1. (greaterp 18 151 76)

Ans: 151, 76,18

2. (reverse ((p q) r (s t))

Ans: (s,t)r(p,q)

3. (list ‘a’(b c))

Ans ( a b c)

4. (cadadr ‘(x (y z) ))

Ans: (car (cdr (car (cdr x(yz)l))))

(car(cdr(car(yz)l)))

(car(cdr(yz)))

(car(y))

5. (append ‘a ‘(b c d))

Ans: (a,b,c,d)

6. (list ‘a ‘(bc))

Ans: (a b c)

7. (append ‘(a) ‘(bc))

Ans: (a,b,c)

8. (equal ‘a (car ‘(ab)))

Ans: (equal a(b))

Nil

9. (+5 (read))

Ans: 5

10. (cdr car ‘((ab)cd))

Ans: (cdr(cd))

cdr(d)

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

(d) Discuss the following :

(i) Lambda Function

Ans: LISP allows you to write anonymous functions that are evaluated only when they
are encountered in the program. These functions are called Lambda functions.

You can create such functions using the lambda expression. The syntax for the lambda
expression is as follows −

(lambda (parameters) body)

A lambda form cannot be evaluated and it must appear only where LISP expects to find
a function.

Example

Create a new source code file named main.lisp and type the following code in it.

(write ((lambda (a b c x)

(+ (* a (* x x)) (* b x) c))

4 2 9 3)

(ii) Mapcar Function

Ans: Mapping functions are a group of functions that could be applied successively to
one or more lists of elements. The results of applying these functions to a list are placed
in a new list and that new list is returned.

For example, the mapcar function processes successive elements of one or more lists.

The first argument of the mapcar function should be a function and the remaining
arguments are the list(s) to which the function is applied.

The argument function is applied to the successive elements that results into a newly
constructed list. If the argument lists are not equal in length, then the process of
mapping stops upon reaching the end of the shortest list. The resulting list will have the
same number of elements as the shortest input list.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Example 1

Let us start with a simple example and add the number 1 to each of the elements of the
list ( 23 34 45 56 67 78 89).

Create a new source code file named main.lisp and type the following code in it.

(write (mapcar '1+ '(23 34 45 56 67 78 89)))

(iii) Cond Function

Ans: The cond construct in LISP is most commonly used to permit branching.

Syntax for cond is −

(cond (test1 action1)

(test2 action2)

...

(testn actionn))

Each clause within the cond statement consists of a conditional test and an action to be
performed.

If the first test following cond, test1, is evaluated to be true, then the related action part,
action1, is executed, its value is returned and the rest of the clauses are skipped over.

If test1 evaluates to be nil, then control moves to the second clause without executing
action1, and the same process is followed.

If none of the test conditions are evaluated to be true, then the cond statement
returns nil.

Example

Create a new source code file named main.lisp and type the following code in it –

(setq a 10)

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

(cond ((> a 20)

(format t "~% a is greater than 20"


20"))

(t (format t "~% value of a is ~d " a)))

Q7. (a) What do you mean by backtracking? Briefly describe the concept with the
help of an example prolog program.

Ans: The Backtracking is an algorithmic


algorithmic-method
method to solve a problem with an additional
way. It uses a recursive approach to explain the problems. We can say that the
backtracking is needed to find all possible combination to solve an optimization
problem.

Backtracking is a systematic way of trying out different sequences of decisions until we


find one that "works."

In the following Figure:

Each non-leaf
leaf node in a tree is a parent of one or more other nodes (its children)

Each node in the tree, other than the root, has exactly one parent

Generally, however, we draw our trees downward, with the root at the top.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

A tree is composed of nodes.

Backtracking can understand of as searching a tree for a particular "goal" leaf


le node.

Backtracking is undoubtedly quite simple - we "explore" each node, as follows:

To "explore" node N:

1. If N is a goal node, return "success"

2. If N is a leaf node, return "failure"

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

3. For each child C of N,

Explore C

If C was successful, return "success"

4. Return "failure"

Backtracking algorithm determines the solution by systematically searching the solution


space for the given problem. Backtracking is a depth-first search with any bounding
function. All solution using backtracking is needed to satisfy a complex set of
constraints. The constraints may be explicit or implicit.

(c) Write a Prolog program to find factorial of a number given by the user.

Ans: predicates

start

find_factorial(real,real)

goal

clearwindow,

start.

clauses

start:-

write("Enter non negative number = "),

readreal(Num),

Result = 1.0,

find_factorial(Num,Result).

find_factorial(Num,Result):-

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Num <> 0,

NewResult = Num * Result,

NewNum = Num - 1,

find_factorial(NewNum,NewResult).

find_factorial(_,Result):-

write("Factorial = ",Result),nl.

(d) Explain the difference between Forward and Backward Chaining. Under which
situation which mechanism is best to use, for a given set of problem?

Ans:

Forward chaining as the name suggests, start from the known facts and move forward
by applying inference rules to extract more data, and it continues until it reaches to the
goal, whereas backward chaining starts from the goal, move backward by using
inference rules to determine the facts that satisfy the goal.

Forward chaining is called a data-driven inference technique, whereas backward


chaining is called a goal-driven inference technique.

Forward chaining is known as the down-up approach, whereas backward chaining is


known as a top-down approach.

Forward chaining uses breadth-first search strategy, whereas backward chaining


uses depth-first search strategy.

Forward and backward chaining both applies Modus ponens inference rule.

Forward chaining can be used for tasks such as planning, design process monitoring,
diagnosis, and classification, whereas backward chaining can be used for classification
and diagnosis tasks.

Forward chaining can be like an exhaustive search, whereas backward chaining tries to
avoid the unnecessary path of reasoning.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

In forward-chaining there can be various ASK questions from the knowledge base,
whereas in backward chaining there can be fewer ASK questions.

Forward chaining is slow as it checks for all the rules, whereas backward chaining is
fast as it checks few required rules only.

Q8. Write Short notes on the following

Classification of Agents in Artificial Intelligence

Artificial intelligence is defined as a study of rational agents. A rational agent could be


anything which makes decisions, as a person, firm, machine, or software. It carries out
an action with the best outcome after considering past and current percepts(agent’s
perceptual inputs at a given instance).

Types of Agents

Agents can be grouped into four classes based on their degree of perceived intelligence
and capability:

Simple Reflex Agents

Model-Based Reflex Agents

Goal-Based Agents

Utility-Based Agents

Learning Agent

Simple reflex agents

Simple reflex agents ignore the rest of the percept history and act only on the basis of
the current percept. Percept history is the history of all that an agent has perceived till
date. The agent function is based on the condition-action rule. A condition-action rule is
a rule that maps a state i.e, condition to an action. If the condition is true, then the action
is taken, else not. This agent function only succeeds when the environment is fully
observable. For simple reflex agents operating in partially observable environments,
infinite loops are often unavoidable. It may be possible to escape from infinite loops if
the agent can randomize its actions. Problems with Simple reflex agents are :

Very limited intelligence.

No knowledge of non-perceptual parts of state.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Usually too big to generate and store.

If there occurs any change in the environment, then the collection of rules need to be
updated.

Model-based reflex agents

It works by finding a rule whose condition matches the current situation. A model-based
model
agent can handle partially observable environments by use of model about the world.
The agent has to keep track of internal state which is adjusted by each percept and that
depends on the percept history. The current state is stored inside the agent which
maintains some kind of structure describing the part of the world which cannot be seen.
Updating the state requires information about :

how the world evolves in-depende


dependently from the agent, and

how the agent actions affects the world.

Goal-based agents

These kinds of agents take decision based on how far they are currently from their goal
(description
description of desirable situations). Their every action is intended to reduce its distance
from the goal. This allows the agent a way to choose among multiple possibilities,

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

selecting the one which reaches a goal state. The knowledge that supports its decisions
de
is represented explicitly and can be modified, which makes these agents more flexible.
They usually require search and planning. The goal
goal-based
based agent’s behavior can easily
be changed.

Utility-based agents

The agents which are developed having the their


ir end uses as building blocks are called
utility based agents. When there are multiple possible alternatives, then to decide which
one is best, utility-based
based agents are used. They choose actions based on a preference
(utility) for each state. Sometimes achieving the desired goal is not enough. We may
look for a quicker, safer, cheaper trip to reach a destination. Agent happiness should be
taken into consideration. Utility describes how “happy” the agent is. Because of the
uncertainty
tainty in the world, a utility agent chooses the action that maximizes the expected
utility. A utility function maps a state onto a real number which describes the associated

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

degree of happiness.

Learning Agent

A learning agent in AI is the type of agent which can learn from its past experiences or it
has learning capabilities.
It starts to act with basic knowledge and then able to act and adapt automatically
through learning.
A learning agent has mainly four conceptual components, which are:

Learning element: It is responsible for making improvements by learning from the


environment

Critic: Learning element takes feedback from critic which describes how well the agent
is doing with respect to a fixed performance standard.

Performance element: It is responsible for selecting external action

Problem Generator: This component is responsible for suggesting actions that will lead
to new and informative experiences.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Truth Maintenance System – TMS.

Truth maintenance systems (TMSs) were introduced more than ten years ago, but
recently there is an explosion of interest in them and their possible applications in
different areas. In this paper we discuss truth maintenance from three perspectives:

· Truth maintenance as a data base management facility, which was in fact the original
intention of the TMS.

· Truth maintenance as an inference facility, which provides a way to extend the role of
the TMS in solving problems.

· Truth maintenance as a verification facility, which illustrates a new and promising


application of TMSs in the area of expert systems design.

This paper is not intended to provide a complete survey on TMSs, rather it aims to
present the basic ideas and functionality of TMS, and to show how different kinds of
TMS can be used as a meta-environment for testing Expert System Knowledge Bases,
represented as sets of production rules, for anomalies.

The paper is addressed to two groups of readers: those who are looking for an
introductory survey on TMSs, and those who are interested in non-conventional
techniques for Expert System Knowledge Base verification.

Skolomization

Skolemization is a way of removing existential quantifiers from


a formula. Variables bound by existential quantifiers which are not inside the scope
of universal quantifiers can simply be replaced by constants: ∃x[x<3] can be changed
to c<3, with c a suitable constant.

When the existential quantifier is inside a universal quantifier, the bound variable must
be replaced by a Skolem function of the variables bound by universal quantifiers.
Thus ∀x[x=0∨∃y[x=y+1]] becomes ∀x[x=0∨x=f(x)+1].

In general, the functions and constants symbols are new ones added to
the language for the purpose of satisfying these formulas, and are often denoted by the
formula they realize, for instance c∃x ϕ (x).

This is used in second order logic to move all existential quantifiers outside the scope
of first order universal quantifiers. This can be done since second order quantifiers can

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

quantify over functions. For


instance ∀1x ∀1y ∃1z ϕ (x,y,z) is equivalent to ∃2F ∀1x ∀1y ϕ (x,y,F (x,y)).

Expert System and its architecture

Figure 8.1 shows the most important modules that make up a rule-based expert system.
The user interacts with the system through a user interface which may use menus,
natural language or any other style of interaction). Then an inference engine is used to
reason with both the expert knowledge (extracted from our friendly expert) and data
specific to the particular problem being solved. The expert knowledge will typically be in
the form of a set of IF-THEN rules. The case specific data includes both data provided
by the user and partial conclusions (along with certainty measures) based on this data.
In a simple forward chaining rule-based system the case specific data will be the
elements in working memory.

Almost all expert systems also have an explanation subsystem, which allows the
program to explain its reasoning to the user. Some systems also have a knowledge
base editor which helps the expert or knowledge engineer to easily update and check
the knowledge base.

One important feature of expert systems is the way they (usually) separate domain
specific knowledge from more general purpose reasoning and representation
techniques. The general purpose bit (in the dotted box in the figure) is referred to as
an expert system shell. As we see in the figure, the shell will provide the inference
engine (and knowledge representation scheme), a user interface, an explanation
system and sometimes a knowledge base editor. Given a new kind of problem to solve
(say, car design), we can usually find a shell that provides the right sort of support for
that problem, so all we need to do is provide the expert knowledge. There are numerous
commercial expert system shells, each one appropriate for a slightly different range of
problems. (Expert systems work in industry includes both writing expert system shells
and writing expert systems using shells.) Using shells to write expert systems generally
greatly reduces the cost and time of development (compared with writing the expert
system from scratch).

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Q9. Express the following knowledge as a semantic network structure with


interconnected nodes and labeled arcs.

“IGNOU is an open university established by an act of parliament. It has various schools


of studies and Divisions to support academic activities at the Head Quarters. IGNOU’s
regional centers are spread all over the country to manage the academic and
administrative activities. Each School and Division is headed by a Director and each
Regional Center is headed by Regional Directors.”

Ans:

Q10. How PROLOG system solves the problem? Discuss with suitable example.
Briefly discuss the Data Types, structures and operations in PROLOG

Ans: Prolog Problems

The purpose of this problem collection is to give you the opportunity to practice your
skills in logic programming. Your goal should be to find the most elegant solution of the
given problems. Efficiency is important, but logical clarity is even more crucial. Some of
the (easy) problems can be trivially solved using built-in predicates. However, in these
cases, you learn more if you try to find your own solution.

Every predicate that you write should begin with a comment that describes the predicate
in a declarative statement. Do not describe procedurally, what the predicate does, but
write down a logical statement which includes the arguments of the predicate. You
should also indicate the intended data types of the arguments and the allowed flow
patterns.

Structures

Functional terms can be used to construct complex data structures.

If we want to say that John owns the novel Tehanu, we can write: owns(john, 'Tehanu').

Often objects have a number of attributes: owns(john, book('Tehanu', leguin)).

The author LeGuin has attributes too: owns(john, book('Tehanu', author (leguin,
ursula))).

The arity of a term is the number of arguments it takes.

all versions of owns have arity 2, but the detailed structure of the arguments changes.

gives(john, book, mary). is a term with arity 3.

Copyright@Ignougroup.com
Solved Assignment By
Ignougroup.com

Data types

Prolog's single data type is the term. Terms are


either atoms, numbers, variables or compound terms.

An atom is a general-purpose name with no inherent meaning. Examples of atoms


include x, red, 'Taco', and 'some atom'.

Numbers can be floats or integers. ISO standard compatible Prolog systems can check
the Prolog flag "bounded". Most of the major Prolog systems support arbitrary length
integer numbers.

Variables are denoted by a string consisting of letters, numbers and underscore


characters, and beginning with an upper-case letter or underscore. Variables closely
resemble variables in logic in that they are placeholders for arbitrary terms.

A compound term is composed of an atom called a "functor" and a number of


"arguments", which are again terms. Compound terms are ordinarily written as a functor
followed by a comma-separated list of argument terms, which is contained in
parentheses. The number of arguments is called the term's arity. An atom can be
regarded as a compound term with arity zero. An example of a compound term
is person_friends(zelda,[tom,jim]).

Special cases of compound terms:

A List is an ordered collection of terms. It is denoted by square brackets with the terms
separated by commas, or in the case of the empty list, by []. For
example, [1,2,3] or [red,green,blue].

Strings: A sequence of characters surrounded by quotes is equivalent to either a list of


(numeric) character codes, a list of characters (atoms of length 1), or an atom
depending on the value of the Prolog flag double_quotes. For example, "to be, or not to
be".

ISO Prolog provides the atom/1, number/1, integer/1, and float/1 predicates for type-
checking.

Copyright@Ignougroup.com

Das könnte Ihnen auch gefallen