0% found this document useful (0 votes)
98 views

AI Assignment 008

The document is an assignment on artificial intelligence submitted by a student to their professor Dr. Parul Goyal. It contains the student's responses to 7 questions about various topics in AI, including the characteristics of AI, applications of AI, problem solving and search strategies used in AI, depth-first search and breadth-first search, heuristic search techniques, hill climbing and branch and bound techniques, and best first search and the A* algorithm.

Uploaded by

Ideal Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

AI Assignment 008

The document is an assignment on artificial intelligence submitted by a student to their professor Dr. Parul Goyal. It contains the student's responses to 7 questions about various topics in AI, including the characteristics of AI, applications of AI, problem solving and search strategies used in AI, depth-first search and breadth-first search, heuristic search techniques, hill climbing and branch and bound techniques, and best first search and the A* algorithm.

Uploaded by

Ideal Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

SHRI GURU RAM RAI UNIVERSITY

(SCHOOL OF CA & IT)

Session 2020-2022
Assignment of AI

Submitted To:- Submitted By:-


Dr. Parul Goyal Your name
MCA 3rd Sem
Tutorial Number Four

Q1. What are the different Characteristics of Artificial Intelligence?


A1. 1. Deep Learning
Deep learning is a machine learning technique that teaches computers to do
what comes naturally to humans, to learn by example. Innumerable developers
are leveraging the latest deep learning innovative technologies to take their
business to the new high.
2. Facial Recognition
Artificial Intelligence has made it possible to recognize individual faces using
biometric mapping. This has lead to path breaking advancements in surveillance
technologies. It compares the knowledge with a database of known faces to seek
out a match.
3. Data Ingestion
With every passing day, the data that we are all producing is growing
exponentially, which is where AI steps in. Instead of manually feeding this
data, AI-enabled not just gathers this data but also analyses it with the help of
its previous experiences.
Data ingestion is that the transportation of knowledge from assorted sources to a
data-storage medium where it are often accessed, used, and analysed by a
corporation.AI, with the help of neural networks, analyses a large amount of
such data and helps in providing a logical inference out of it.
5. Chatbots
Chatbots are software to provide a window for solving customer problems’
through either audio or textual input. Earlier the bots used to respond only to
specific commands. If you say the wrong thing, it didn’t know what you meant.
The bot was only as smart as it was programmed to be. The real change came
when these chatbots were enabled by artificial intelligence. Now, you don’t
have to be ridiculously specific when you are talking to the chatbot. It
understands language, not just commands.

Q2. What are the different applications of Artificial Intelligence?


A2. Artificial Intelligence has various applications in today's society. It is
becoming essential for today's time because it can solve complex problems
with an efficient way in multiple industries, such as Healthcare, entertainment,
finance, education, etc. AI is making our daily life more comfortable and fast.
Following are some sectors which have the application of Artificial Intelligence:
1. AI in Astronomy
o Artificial Intelligence can be very useful to solve complex universe
problems. AI technology can be helpful for understanding the universe
such as how it works, origin, etc.
2. AI in Healthcare
o In the last, five to ten years, AI becoming more advantageous for the
healthcare industry and going to have a significant impact on this
industry.
o Healthcare Industries are applying AI to make a better and faster
diagnosis than humans. AI can help doctors with diagnoses and can
inform when patients are worsening so that medical help can reach to the
patient before hospitalization.
3. AI in Gaming
o AI can be used for gaming purpose. The AI machines can play strategic
games like chess, where the machine needs to think of a large number of
possible places.
4. AI in Finance
o AI and finance industries are the best matches for each other. The finance
industry is implementing automation, chatbot, adaptive intelligence,
algorithm trading, and machine learning into financial processes.
5. AI in Data Security
o The security of data is crucial for every company and cyber-attacks are
growing very rapidly in the digital world. AI can be used to make your
data more safe and secure. Some examples such as AEG bot,are used to
determine software bug and cyber-attacks in a better way.
Q3. Explain Problem Solving, Search and Control Strategies used in Artificial
Intelligence?
A3. Problem solving is an important aspect of Artificial Intelligence. A problem
can be considered to consist of a goal and a set of actions that can be taken to
lead to the goal. At any given time, we consider the state of the search space to
represent where we have reached as a result of the actions we have applied so
far.
For example, consider the problem of looking for a contact lens on a football
field. The initial state is how we start out, which is to say we know that the lens
is somewhere on the field, but we don’t know where. If we use the
representation where we examine the field in units of one square foot, then our
first action might be to examine the square in the top-left corner of the field. If
we do not find the lens there, we could consider the state now to be that we have
examined the top-left square and have not found the lens. After a number of
actions, the state might be that we have examined 500 squares, and we have
now just found the lens in the last square we examined. This is a goal state
because it satisfies the goal that we had of finding a contact lens.
Search is a method that can be used by computers to examine a problem space
like this in order to find a goal. Often, we want to find the goal as quickly as
possible or without using too many resources. A problem space can also be
considered to be a search space because in order to solve the problem, we will
search the space for a goal state. We will continue to use the term search space
to describe this concept.

Q4. Explain Depth first Search and Breadth first search with example?
A4.
S.No. BFS DFS

1. BFS stands for Breadth First Search. DFS stands for Depth First Search.
2. BFS(Breadth First Search) uses DFS(Depth First Search) uses Stack
Queue data structure for finding the data structure.
shortest path.

3. BFS can be used to find single In DFS, we might traverse through


source shortest path in an more edges to reach a destination
unweighted graph, because in BFS, vertex from a source.
we reach a vertex with minimum
number of edges from a source
vertex.

3. BFS is more suitable for searching DFS is more suitable when there are
vertices which are closer to the given solutions away from source.
source.

4. BFS considers all neighbours first DFS is more suitable for game or
and therefore not suitable for puzzle problems. We make a
decision making trees used in games decision, then explore all paths
or puzzles. through this decision. And if this
decision leads to win situation, we
stop.

5. The Time complexity of BFS is O(V The Time complexity of DFS is also
+ E) when Adjacency List is used O(V + E) when Adjacency List is
and O(V^2) when Adjacency Matrix used and O(V^2) when Adjacency
is used, where V stands for vertices Matrix is used, where V stands for
and E stands for edges. vertices and E stands for edges.

6. Here, siblings are visited before the Here, children are visited before the
children siblings

Q5. Explain the different Heuristic Search Techniques used in AI?


A5. Heuristic search is defined as a procedure of search that endeavors to
upgrade an issue by iteratively improving the arrangement dependent on a given
heuristic capacity or a cost measure.
This technique doesn’t generally ensure to locate an ideal or the best
arrangement, however, it may rather locate a decent or worthy arrangement
inside a sensible measure of time and memory space. This is a sort of an
alternate route as we regularly exchange one of optimality, culmination,
exactness, or accuracy for speed.
It may be a function which is employed in Informed Search, and it finds the
foremost promising path. It takes the present state of the agent as its input and
produces the estimation of how close agent is from the goal
A Heuristic (or a heuristic capacity) investigates search calculations. At each
stretching step, it assesses the accessible data and settles on a choice on which
branch to follow. It does as such by positioning other options. The Heuristic is
any gadget that is frequently successful yet won’t ensure work for each
situation.

Q6. What are Hill climbing & Branch and Bound technique?
A6. Hill-climbing searches work by starting off with an initial guess of a
solution, then iteratively making local changes to it until either the solution is
found or the heuristic gets stuck in a local maximum. There are many ways to
try to avoid getting stuck in local maxima, such as running many searches in
parallel, or probabilistically choosing the successor state, etc. In many cases,
hill-climbing algorithms will rapidly converge on the correct answer. However,
none of these approaches are guaranteed to find the optimal solution.
Branch-and-bound solutions work by cutting the search space into pieces,
exploring one piece, and then attempting to rule out other parts of the search
space based on the information gained during each search. They are guaranteed
to find the optimal answer eventually, though doing so might take a long time.
For many problems, branch-and-bound based algorithms work quite well, since
a small amount of information can rapidly shrink the search space.

Q7. Explain with suitable example Best first search and A* algorithm.
A7. In BFS and DFS, when we are at a node, we can consider any of the
adjacent as next node. So both BFS and DFS blindly explore paths without
considering any cost function. The idea of Best First Search is to use an
evaluation function to decide which adjacent is most promising and then
explore. Best First Search falls under the category of Heuristic Search or
Informed Search. 
We use a priority queue to store costs of nodes. So the implementation is a
variation of BFS, we just need to change Queue to Priority Queue. 
A* Search algorithm is one of the best and popular technique used in path-
finding and graph traversals. Informally speaking, A* Search algorithms, unlike
other traversal techniques, it has “brains”. What it means is that it is really a
smart algorithm which separates it from the other conventional algorithms.
This fact is cleared in detail in below sections. 
And it is also worth mentioning that many games and web-based maps use this
algorithm to find the shortest path very efficiently (approximation). 
Explanation 
Consider a square grid having many obstacles and we are given a starting cell
and a target cell. We want to reach the target cell (if possible) from the starting
cell as quickly as possible. Here A* Search Algorithm comes to the rescue.
What A* Search Algorithm does is that at each step it picks the node according
to a value-‘f’ which is a parameter equal to the sum of two other parameters –
‘g’ and ‘h’. At each step it picks the node/cell having the lowest ‘f’, and process
that node/cell.
We define ‘g’ and ‘h’ as simply as possible below
g = the movement cost to move from the starting point to a given square on the
grid, following the path generated to get there. 
h = the estimated movement cost to move from that given square on the grid to
the final destination. This is often referred to as the heuristic, which is nothing
but a kind of smart guess. We really don’t know the actual distance until we
find the path, because all sorts of things can be in the way (walls, water, etc.).
There can be many ways to calculate this ‘h’ which are discussed in the later
sections.

Q8. What are AND/OR Graphs?


A8. The AND-OR GRAPH (or tree) is useful for representing the solution of
problems that can solved by decomposing them into a set of smaller problems,
all of which must then be solved. This decomposition, or reduction, generates
arcs that we call AND arcs. One AND arc may point to any number of
successor nodes, all of which must be solved in order for the arc to point to a
solution. Just as in an OR graph, several arcs may emerge from a single node,
indicating a variety of ways in which the original problem might be solved. This
is why the structure is called not simply an AND-graph but rather an AND-OR
graph (which also happens to be an AND-OR tree)
EXAMPLE FOR AND-OR GRAPH

Q9. Explain Knowledge Representation in Artificial Intelligence?


A9. Humans are best at understanding, reasoning, and interpreting knowledge.
Human knows things, which is knowledge and as per their knowledge they
perform various actions in the real world. But how machines do all these things
comes under knowledge representation and reasoning. Hence we can describe
Knowledge representation as following:
o Knowledge representation and reasoning (KR, KRR) is the part of
Artificial intelligence which concerned with AI agents thinking and how
thinking contributes to intelligent behaviour of agents.
o It is responsible for representing information about the real world so that
a computer can understand and can utilize this knowledge to solve the
complex real world problems such as diagnosis a medical condition or
communicating with humans in natural language.
o It is also a way which describes how we can represent knowledge in
artificial intelligence. Knowledge representation is not just storing data
into some database, but it also enables an intelligent machine to learn
from that knowledge and experiences so that it can behave intelligently
like a human.
Q10. What is First Order Predicate Calculus and skolemization?
A10. First-order logic—also known as first-order predicate calculus—is a
collection of formal systems used in mathematics, philosophy, linguistics,
and computer science. First-order logic uses quantified variables over non-
logical objects, and allows the use of sentences that contain variables, so that
rather than propositions such as "Socrates is a man", one can have expressions
in the form "there exists x such that x is Socrates and x is a man", where "there
exists" is a quantifier, while x is a variable. This distinguishes it
from propositional logic, which does not use quantifiers or relations in this
sense, propositional logic is the foundation of first-order logic.
A theory about a topic is usually a first-order logic together with a
specified domain of discourse (over which the quantified variables range),
finitely many functions from that domain to itself, finitely
many predicates defined on that domain, and a set of axioms believed to hold
about them. Sometimes, "theory" is understood in a more formal sense, which is
just a set of sentences in first-order logic.
Skolemization is a well known technique in refutational theorem proving to
eliminate existential quantifiers. It is sometimes called an extension method,
because it introduces new symbols in the signature of a formula. A very
important feature of skolemization is that it looses logical equivalence, but
preserves sat- or validity-equivalence.

Q11. Explain Resolution Principle and Unification?

A11. The resolution principle, due to Robinson (1965), is a method of theorem


proving that proceeds by constructing refutation proofs, i.e., proofs by
contradiction. This method has been exploited in many automatic theorem
provers. The resolution principle applies to first-order logic formulas
in Skolemized form. These formulas are basically sets of clauses each of which
is a disjunction of literals.

Unification is a key technique in proofs by resolution.

If two or more positive literals (or two or more negative literals) in clause   are
unifiable and   is their most general unifier, then   is called a factor of  . For
example,   is factored to  . In such a
factorization, duplicates are removed.

Let   and   be two clauses with no variables in common, let   contain a
positive literal  ,   contain a negative literal  , and let   be the most general
unifier of   and  . Then

is called a binary resolvent of   and  .

Q12. What are the different Inference Mechanisms used in Artificial


Intelligence?

A12. The inference process in an agent takes place according to some rules,


which are known as the inference rules or rule of inference. Following are the
major types of inference rules that are used:

1) Addition: This inference rule is stated as follows:

----------

∴P v Q

2) Simplification: This inference rule states that:

P^Q P^Q

---------- OR ----------

∴P ∴Q

3) Modus Ponens: This is the most widely used inference rule. It states:

P->Q

-----------

∴Q
4) Modus Tollens: This rule states that:

P->Q

~Q

-----------

∴~P

5) Forward Chaining: It is a type of deductive Inference rule. It states that:

P->Q

-----------

∴Q

6) Backward Chaining: This is also a type of deductive inference rule. This


rule states that:

P->Q

-----------

∴P

7) Resolution: In the reasoning by resolution, we are given the goal condition


and available facts and statements. Using these facts and statements, we have to
decide whether the goal condition is true or not, i.e. is it possible for the agent to
reach the goal state or not. We prove this by the method of contradiction. This
rule states that:

PvQ

~P^R

-----------

∴Q v R
8) Hypothetical Syllogism: This rule states the transitive relation between the
statements:

P->Q

Q->R

-----------

∴P->R

9) Disjunctive Syllogism: This rule is stated as follows:

PvQ

~P

-----------

∴Q

Q13. Explain Horn’s Clauses and Semantic Networks?

A13. A Horn clause is a clause with at most one positive, i.e. unnegated, literal.

Conversely, a disjunction of literals with at most one negated literal is called


a dual-Horn clause.

A Horn clause with exactly one positive literal is a definite clause or a strict
Horn clause;a definite clause with no negative literals is a unit clause, and a
unit clause without variables is a fact;. A Horn clause without a positive literal
is a goal clause. Note that the empty clause, consisting of no literals (which is
equivalent to false) is a goal clause. These three kinds of Horn clauses are
illustrated in the following propositional example:

Type of Disjunction
Implication form Read intuitively as
Horn clause form
assume that,
Definite ¬p ∨ ¬q ∨ ... ∨
u ← p ∧ q ∧ ... ∧ t if p and q and ... and t all
clause ¬t ∨ u
hold, then also u holds
assume that
Fact u u ← true
u holds
show that
¬p ∨ ¬q ∨ ... ∨ false ← p ∧ q ∧ ...
Goal clause p and q and ... and t all
¬t ∧ t
hold

All variables in a clause are implicitly universally quantified with the scope


being the entire clause.

A semantic network, or frame network is a knowledge base that


represents semantic relations between concepts in a network. This is often used
as a form of knowledge representation. It is a directed or undirected
graph consisting of vertices, which represent concepts, and edges, which
represent semantic relations between concepts, mapping or connecting semantic
fields. A semantic network may be instantiated as, for example, a graph
database or a concept map. Typical standardized semantic networks are
expressed as semantic triples.

Semantic networks are used in natural language processing applications such


as semantic parsing and word-sense disambiguation. Semantic networks can
also be used as a method to analyze large texts and identify the main themes and
topics (e.g., of social media posts), to reveal biases (e.g., in news coverage), or
even to map an entire research field.

Q14. What are Frame Systems and Value Inheritance?

A14. Frame, in Artificial Intelligence (AI), is a data structure used to divide
knowledge into substructures by representing “stereotyped situations”. Frames
are the primary data structure used in Frame Language. Frames are also an
extensive part of knowledge representation and reasoning schemes.

We extend the base more by allowing inference mechanisms:

 Property inheritance

o elements inherit values from being members of a class.

o data must be organised into a hierarchy of classes

 Property Inheritance Hierarchy


 Boxed nodes -- objects and values of attributes of objects.

 Values can be objects with attributes and so on.

 Arrows -- point from object to its value.

 This structure is known as a slot and filler structure, semantic network or


a collection of frames.

Q15. Explain Natural Language Processing and Parsing Techniques?

A15. Natural Language Processing (NLP) is a field of Artificial Intelligence


(AI) that makes human language intelligible to machines. NLP combines the
power of linguistics and computer science to study the rules and structure of
language, and create intelligent systems (run on machine learning and NLP
algorithms) capable of understanding, analyzing, and extracting meaning from
text and speech.

NLP is used to understand the structure and meaning of human language by


analyzing different aspects like syntax, semantics, pragmatics, and morphology.
Then, computer science transforms this linguistic knowledge into rule-
based, machine learning algorithms that can solve specific problems and
perform desired tasks.

Parsing (also known as syntax analysis) can be defined as a process of


analyzing a text which contains a sequence of tokens, to determine its
grammatical structure with respect to a given grammar.

Depending upon how the parse tree is built, parsing techniques are classified
into three general categories, namely, universal parsing, top-down parsing,
and bottom-up parsing. The most commonly used parsing techniques are top-
down parsing and bottom-up parsing. Universal parsing is not used as it is not
an efficient technique.
Q16. What is Context Free Grammar, Recursive Transition Nets (RTN) and
Augmented Transition Nets (ATN)?

A16. Context free grammar is a formal grammar which is used to generate all
possible strings in a given formal language.

Context free grammar G can be defined by four tuples as:

G= (V, T, P, S)  

Where,

G describes the grammarHello Java Program for Beginners

T describes a finite set of terminal symbols.

V describes a finite set of non-terminal symbols

P describes a set of production rules

S is the start symbol

A recursive transition network ("RTN") is a graph theoretical schematic used


to represent the rules of a context-free grammar. RTNs have application
to programming languages, natural language and lexical analysis.
Any sentence that is constructed according to the rules of an RTN is said to be
"well-formed". The structural elements of a well-formed sentence may also be
well-formed sentences by themselves, or they may be simpler structures. This is
why RTNs are described as recursive.

An augmented transition network or ATN is a type of graph


theoretic structure used in the operational definition of formal languages, used
especially in parsing relatively complex natural languages, and having wide
application in artificial intelligence. An ATN can, theoretically, analyze
the structure of any sentence, however complicated. ATN are modified
transition networks and an extension of RTNs.

ATNs build on the idea of using finite state machines (Markov model) to parse


sentences. W. A. Woods in "Transition Network Grammars for Natural
Language Analysis" claims that by adding a recursive mechanism to a finite
state model, parsing can be achieved much more efficiently. Instead of building
an automaton for a particular sentence, a collection of transition graphs are
built. A grammatically correct sentence is parsed by reaching a final state in any
state graph.

Q17. Write short notes on Bayes Theorem and Bayesian networks?

A17. A Bayesian network (also known as a Bayes network, Bayes net, belief


network, or decision network) is a probabilistic graphical model that
represents a set of variables and their conditional dependencies via a directed
acyclic graph(DAG). Bayesian networks are ideal for taking an event that
occurred and predicting the likelihood that any one of several possible known
causes was the contributing factor. For example, a Bayesian network could
represent the probabilistic relationships between diseases and symptoms.
Given symptoms, the network can be used to compute the probabilities of the
presence of various diseases.

Efficient algorithms can perform inference and learning in Bayesian networks.


Bayesian networks that model sequences of variables (e.g. speech
signals or protein sequences) are called dynamic Bayesian networks.
Generalizations of Bayesian networks that can represent and solve decision
problems under uncertainty are called influence diagrams.

Q18. Explain Component of Planning Systems, Goal Stack Planning & Linear
planning with suitable example?

A18. Basic Components of a Planning System

When a particular problem will be solved, at that time some specific rules
regarding to that problem are to be applied. Then apply the choosen rule to
compute the new problem state that arises from its application. Detect when a
solution has been found and calculate the active and inactive ends of that
problem. Various components of a planning system are described as follows.

(a) States: For a planning process, the planners decompose the world into some
environments. Then environments are defined by some logical conditions and
states. The problems can be viewed as the task of finding a path from a given
starting state to some desirable goal state. The state can be viewed as a
conjunction of positive literals. For example, Rich A famous might represent
the state of a best agent.
 

(b)Goal: A goal is a specified state. To find a solution to a problem using a


search procedure is to generate moves through the problem space until a goal
state is reached. In the context of game playing programs, a goal state is one in
which we win. Unfortunately, for interesting games like chess, it is not usually,
possible, even with a good plausible move generator, to search until a goal state
is found.

(c) Actions: An action is specified en terms of the pre-conditions that must hold


before it can be executed and then the effects that ensue when it is executed.

(d)Precondition: The precondition is a conjunction of function free positive


literals stating what must be true in a state before the action can be executed. 

(e) Effect: It is a conjunction of function free literals describing how the state


changes when the action is executed.

(f)  Finding a solution: A planning system has succeeded in finding a solution


to a problem when it has found a sequence of operators that transforms the
initial problem state into the goal state. The way it can be solved depends on the
way that state descriptions are represented.

Q19. What are Expert Systems? Explain Architecture of Expert Systems?

A19. An expert system is a computer program that is designed to solve complex


problems and to provide decision-making ability like a human expert. It
performs this by extracting knowledge from its knowledge base using the
reasoning and inference rules according to the user queries.

The expert system is a part of AI, and the first ES was developed in the year
1970, which was the first successful approach of artificial intelligence. It solves
the most complex issue as an expert by extracting the knowledge stored in its
knowledge base. The system helps in decision making for complex problems
using both facts and heuristics like a human expert. It is called so because it
contains the expert knowledge of a specific domain and can solve any complex
problem of that particular domain. These systems are designed for a specific
domain, such as medicine, science, etc.

Architecture:
Here, we will explain the working of an expert system by taking an example of
MYCIN ES. Below are some steps to build an MYCIN:

o Firstly, ES should be fed with expert knowledge. In the case of MYCIN,


human experts specialized in the medical field of bacterial infection,
provide information about the causes, symptoms, and other knowledge in
that domain.
o The KB of the MYCIN is updated successfully. In order to test it, the
doctor provides a new problem to it. The problem is to identify the
presence of the bacteria by inputting the details of a patient, including the
symptoms, current condition, and medical history.
o The ES will need a questionnaire to be filled by the patient to know the
general information about the patient, such as gender, age, etc.
o Now the system has collected all the information, so it will find the
solution for the problem by applying if-then rules using the inference
engine and using the facts stored within the KB.
o In the end, it will provide a response to the patient by using the user
interface.

=========================================================

You might also like