AI Guess Paper
AI Guess Paper
SECTION-I (Compulsory)
Q. 1 CO1
(a) What is AI? Why do we implement AI in the robots? (2)
CO1
(b) What is game playing in AI?
(2)
CO1
(c) What is NLP, what are its applications and its components?
(2)
CO1
(d) What is the intelligent agent in AI, and where are they used?
(2)
CO2
(e) What is Knowledge Representation?
(2)
Q. 2 (a) CO1
How Artificial intelligence, Machine Learning, and Deep Learning differ from each other? (4)
(b) Give the steps for A* algorithm? CO1
(4)
Write Down FOL of the following Statements:
(c) 1. Some boys play cricket. CO1
2. Not all students like both Mathematics and Science. (4)
3. Only one student failed in Mathematics.
(d) Define Blind search algorithm and its types. CO1
(4)
(e) What is a Bayesian network, and why is it important in AI? CO1
(4)
What is market basket analysis and how can AI be used to perform it? CO1
(f)
(4)
Q. 3 Discuss the following search Technique with the help of an example. Also discuss the
(a)
benefits and shortcoming of each.
I. Breadth First Search. CO1
II. Depth First Search. (7)
(b) Define the water jug problem and its state representation- let’s assume we have A= 4 litre CO1
and B= 3 litre jug; and we want exactly 2 litre water into jug A, how we will do this (7)
through state representation.
Write Short Notes on:
I. SVM
(c) II. Decision Tree
III. Expert System CO1
IV. Neural Network (7)
Section A
Q.1
(A) What is AI? Why do we implement AI in the robots?
Ans. Artificial intelligence is computer science technology that emphasizes creating intelligent machine that
can mimic human behavior. Here Intelligent machines can be defined as the machine that can behave like a
human, think like a human, and also capable of decision making. It is made up of two words, "Artificial" and
"Intelligence," which means the "man-made thinking ability."
With artificial intelligence, we do not need to pre-program the machine to perform a task; instead, we can
create a machine with the programmed algorithms, and it can work on its own. AI includes:
o Speech recognition
o Learning
o Problem-solving
o Planning
Implementation of AI in the robots makes a robot intelligent which can perform a complex task, and it can
sense the environment and react accordingly.
Ans. Game Playing is an important domain of artificial intelligence. Games don’t require much knowledge; the
only knowledge we need to provide is the rules, legal moves and the conditions of winning or losing the game.
Both players try to win the game. So, both of them try to make the best move possible at each turn.
It is a mixture of reasoning and creativity. Game playing is often called as Adversarial Search. Game playing
is generally deemed to require intelligence.
(c) What is NLP, what are its applications and its components?
Ans. Natural Language Processing (NLP), a branch of data science and one of the principal areas of Artificial
Intelligence, processes for analyzing, understanding, and deriving information from the text data in a smart and
efficient manner.
Applications of NLP are: text classification, text summarization, automated chatbots, multilingual translation,
entity detection, machine translation, question answering, sentiment analysis, intent analysis, speech
recognition, and topic segmentation.
Natural Language Understanding includes:
• Mapping input to useful representations
• Analyzing different aspects of the language
Natural Language Generation includes:
• Text Planning
• Sentence Planning
• Text Realization
(d) What is the intelligent agent in AI, and where are they used?
Ans. The intelligent agent can be any autonomous entity that perceives its environment through the sensors and
act on it using the actuators for achieving its goal.
Knowledge Representation and Reasoning (KR, KRR) represents information from the real world for a
computer to understand and then utilize this knowledge to solve complex real-life problems like
communicating with human beings in natural language. Knowledge representation in AI is not just about
storing data in a database, it allows a machine to learn from that knowledge and behave intelligently like a
human being.
• Objects
• Events
• Performance
• Facts
• Meta-Knowledge
• Knowledge-base
Section II
Q.2
(A) How Artificial intelligence, Machine Learning, and Deep Learning differ from each other?
The difference between AI, ML, and Deep Learning is given in the below table:
The term Artificial intelligence The term ML was first The term DL was first coined in the year 2000
was first coined in the year 1956 coined in the year 1959 by Igor Aizenberg.
by John McCarthy. Arthur Samuel.
It is a technology that is used to It is a subset of AI that It is the subset of machine learning and AI
create intelligent machines that learns from past data and that is inspired by the human brain cells,
can mimic human behavior. experiences. called neurons, and imitates the working of
the human brain.
AI completely deals with ML deals with structured Deep learning deals with structured and
structured, semi-structured data. and semi-structured data. unstructured data.
It requires a huge amount of data It can work with less It requires a huge amount of the data
to work. amount of data compared compared to the ML.
to deep learning and AI.
The goal of AI is to enable the The goal of ML is to The goal of deep learning is to solve the
machine to think without any enable the machine to learn complex problems as the human brain does,
human intervention. from past experiences. using various algorithms.
A* algorithm is the popular form of the Best first search. It tries to find the shortest path using the heuristic
function with the cost function to reach the end node. The steps for A* algorithms are given below:
Step 2: Check if the OPEN list is empty or not; if the list is empty, then return failure and stops.
Step 3: Select the node from the OPEN list which has the smallest value of evaluation function (g+h), if node n
is goal node then return success and stop, otherwise
Step 4: Expand node n and generate all of its successors, and put n into the closed list. For each successor n',
check whether n' is already in the OPEN or CLOSED list; if not, then compute evaluation function for n' and
place into Open list.
Step 5: Else if node n' is already in OPEN and CLOSED list, then it should be attached to the back pointer,
which reflects the lowest g(n') value.
• Breadth-First
• Depth-First
• Depth-Limited
• Iterative Deepening
1. Parameters: The parameters comprise restrictive likelihood circulations related to every node.
2. Structure: The structure is a DAG (Directed Acyclic Graph) that communicates contingent dependencies and
independencies among arbitrary factors related to nodes.
Bayesian belief network is key machine innovation for managing probabilistic occasions and to take care of a
difficulty that has a vulnerability.
So how does the Bayesian-network formula really look? In its most basic structure, we are figuring the
conditional probability signified as P(C|D) – the probability of the occasion C happening given that D is valid.
Bayes’ is communicated with the accompanying formula:
P(C|D) = [P(D|C) * P(C)]/P(D)
(F) What is market basket analysis and how can AI be used to perform it?
Ans. Market Basket Analysis, also known as Affinity Analysis, is a modeling technique based on the theory
that if you buy a certain group of items, you’re more likely to purchase another group of items. For example,
someone purchasing peanut butter and bread is far more likely to also want to purchase jelly. However, not all
relationships are as immediately obvious. Foreknowledge of consumer behavior can increase sales and give the
retailer a significant edge against competitors. Strictly speaking, Market Basket Analysis is just one application
of association analysis techniques, although many online articles and tutorials may confuse the two. To put it in
perspective of other machine learning techniques I’ve written about before, Market Basket Analysis is an
unsupervised learning tool that requires little in the way of feature engineering and a limited amount of data
cleaning and preparation. In practice, insights gleaned from Market Basket Analysis can be further explored
with other AI or data science tools.
Section III
(A) Discuss the following search Technique with the help of an example. Also discuss the benefits and
shortcoming of each.
I. Breadth First Search.
II. Depth First Search.
Ans. I. Breadth First Search.
Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures.
It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’), and
explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth
level.
It is of the most common search strategies. It generally starts from the root node and examines the neighbor
nodes and then moves to the next level. It uses First-in First-out (FIFO) strategy as it gives the shortest path
to achieving the solution.
BFS is used where the given problem is very small and space complexity is not considered.
Example
The above image depicts the end-to-end process of Breadth-First Search Algorithm. Let me explain
this in more depth.
Assign ‘a’ as the root node and insert it into the Queue.
Extract node ‘a’ from the queue and insert the child nodes of ‘a’, i.e., ‘b’ and ‘c’.
Print node ‘a’.
The queue is not empty and has node ‘b’ and ‘c’. Since ‘b’ is the first node in the queue, let’s extract
it and insert the child nodes of ‘b’, i.e., node ‘d’ and ‘e’.
Repeat these steps until the queue gets empty. Note that the nodes that are already visited should not
be added to the queue again.
II. Depth First Search.
The depth-first search uses Last-in, First-out (LIFO) strategy and hence it can be implemented by
using stack. DFS uses backtracking. That is, it starts from the initial state and explores each path to
its greatest depth before it moves to the next path.
DFS algorithm
Set a variable NODE to the initial state, i.e., the root node.
Set a variable GOAL which contains the value of the goal state.
Loop each node by traversing deeply in one direction/path in search of the goal node.
While performing the looping, start removing the elements from the stack in LIFO order.
If the goal state is found, return goal state otherwise backtrack to expand nodes in other direction.
(B) What is the Relation between Knowledge & Intelligence? Explain the Techniques of Knowledge
Representation in AI
Ans. In the real world, knowledge plays a vital role in intelligence as well as creating artificial intelligence. It
demonstrates the intelligent behavior in AI agents or systems. It is possible for an agent or system to act
accurately on some input only when it has the knowledge or experience about the input.
Now that you know the relationship between knowledge and intelligence, let’s move on to the techniques of
Knowledge Representation in AI.
Logical Representation
Logical representation is a language with some definite rules which deal with propositions and has no
ambiguity in representation. It represents a conclusion based on various conditions and lays down some
important communication rules. Also, it consists of precisely defined syntax and semantics which supports the
sound inference. Each sentence can be translated into logics using syntax and semantics.
Syntax Semantics
• It decides how we can construct legal sentences
in logic. • Semantics are the rules by which we can
• It determines which symbol we can use in interpret the sentence in the logic.
knowledge representation. • It assigns a meaning to each sentence.
• Also, how to write those symbols.
Advantages:
Disadvantages:
• Logical representations have some restrictions and are challenging to work with.
• This technique may not be very natural, and inference may not be very efficient.
Semantic Network Representation
Semantic networks work as an alternative of predicate logic for knowledge representation. In Semantic
networks, you can represent your knowledge in the form of graphical networks. This network consists of nodes
representing objects and arcs which describe the relationship between those objects. Also, it categorizes the
object in different forms and links those objects.
Advantages:
Disadvantages:
Frame Representation
A frame is a record like structure that consists of a collection of attributes and values to describe an entity in
the world. These are the AI data structure that divides knowledge into substructures by representing stereotypes
situations. Basically, it consists of a collection of slots and slot values of any type and size. Slots have names
and values which are called facets.
Advantages:
Production Rules
In production rules, agent checks for the condition and if the condition exists then production rule fires and
corresponding action is carried out. The condition part of the rule determines which rule may be applied to a
problem. Whereas, the action part carries out the associated problem-solving steps. This complete process is
called a recognize-act cycle.
Advantages:
Disadvantages:
• It does not exhibit any learning capabilities and does not store the result of the problem for future uses.
• During the execution of the program, many rules may be active. Thus, rule-based production systems
are inefficient.
So, these were the important techniques for Knowledge Representation in AI. Now, let’s have a look at the
requirements for these representations.
Ans. Support Vector Machine or SVM is one of the most popular Supervised Learning algorithms, which is
used for Classification as well as Regression problems. However, primarily, it is used for Classification
problems in Machine Learning.
The goal of the SVM algorithm is to create the best line or decision boundary that can segregate n-dimensional
space into classes so that we can easily put the new data point in the correct category in the future. This best
decision boundary is called a hyperplane.
SVM chooses the extreme points/vectors that help in creating the hyperplane. These extreme cases are called as
support vectors, and hence algorithm is termed as Support Vector Machine. Consider the below diagram in
which there are two different categories that are classified using a decision boundary or hyperplane:
SVM can be of two types:
o Linear SVM: Linear SVM is used for linearly separable data, which means if a dataset can be classified
into two classes by using a single straight line, then such data is termed as linearly separable data, and
classifier is used called as Linear SVM classifier.
o Non-linear SVM: Non-Linear SVM is used for non-linearly separated data, which means if a dataset
cannot be classified by using a straight line, then such data is termed as non-linear data and classifier
used is called as Non-linear SVM classifier.
An example of a decision tree can be explained using above binary tree. Let’s say you want to predict whether
a person is fit given their information like age, eating habit, and physical activity, etc. The decision nodes here
are questions like ‘What’s the age?’, ‘Does he exercise?’, ‘Does he eat a lot of pizzas’? And the leaves, which
are outcomes like either ‘fit’, or ‘unfit’. In this case this was a binary classification problem (a yes no type
problem). There are two main types of Decision Trees:
1. Classification trees (Yes/No types)
What we’ve seen above is an example of classification tree, where the outcome was a variable like ‘fit’ or
‘unfit’. Here the decision variable is Categorical.
Here the decision or the outcome variable is Continuous, e.g. a number like 123. Working Now that we know
what a Decision Tree is, we’ll see how it works internally. There are many algorithms out there which construct
Decision Trees, but one of the best is called as ID3 Algorithm. ID3 Stands for Iterative Dichotomiser 3.
Before discussing the ID3 algorithm, we’ll go through few definitions.
• Entropy:
Entropy, also called as Shannon Entropy is denoted by H(S) for a finite set S, is the measure of the amount of
• Information Gain:
nformation gain is also called as Kullback-Leibler divergence denoted by IG(S,A) for a set S is the effective
change in entropy after deciding on a particular attribute A. It measures the relative change in entropy with
respect to the independent variables.
Ans. 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 compsex 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.
The performance of an expert system is based on the expert's knowledge stored in its knowledge base. The
more knowledge stored in the KB, the more that system improves its performance. One of the common
examples of an ES is a suggestion of spelling errors while typing in the Google search box.
Below is the block diagram that represents the working of an expert system:
Characteristics of Expert System
o High Performance: The expert system provides high performance for solving any type of complex
problem of a specific domain with high efficiency and accuracy.
o Understandable: It responds in a way that can be easily understandable by the user. It can take input in
human language and provides the output in the same way.
o Highly responsive: ES provides the result for any complex query within a very short period of time.
FeedBack ANN
Here, feedback loops are allowed. They are used in content addressable memories.
Working of ANNs
In the topology diagrams shown, each arrow represents a connection between two neurons and indicates the
pathway for the flow of information. Each connection has a weight, an integer number that controls the signal
between the two neurons.
If the network generates a “good or desired” output, there is no need to adjust the weights. However, if the
network generates a “poor or undesired” output or an error, then the system alters the weights in order to
improve subsequent results.