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

AI scheme-2024

The document outlines the syllabus for the VI Semester B.C.A. Examination in Artificial Intelligence & Applications, detailing the history and evolution of AI, types of agents, and various algorithms such as Depth First Search and A*. It also covers the Wumpus world problem, quantifiers in first-order logic, propositional logic, and backward chaining. The content is structured into questions and answers, providing a comprehensive overview of key concepts in AI.

Uploaded by

Harshitha P
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

AI scheme-2024

The document outlines the syllabus for the VI Semester B.C.A. Examination in Artificial Intelligence & Applications, detailing the history and evolution of AI, types of agents, and various algorithms such as Depth First Search and A*. It also covers the Wumpus world problem, quantifiers in first-order logic, propositional logic, and backward chaining. The content is structured into questions and answers, providing a comprehensive overview of key concepts in AI.

Uploaded by

Harshitha P
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

51951 M-198

VI Semester B.C.A. Examination June/July – 2024


(Scheme: NEP)
COMPUTER APPLICATIONS
Artificial Intelligence & Applications (DSC)
SCHEME

PART A
1.a) Write a short note on history and evolution of Artificial intelligence. 5 Marks
[Mention the years of AI birth]
Maturation of Artificial Intelligence (1943-1952)
o Year 1943: The first work which is now recognized as AI was done by Warren McCulloch
and Walter pits in 1943. They proposed a model of artificial neurons.
o Year 1949: Donald Hebb demonstrated an updating rule for modifying the connection
strength between neurons. His rule is now called Hebbian learning.
o Year 1950: The Alan Turing who was an English mathematician and pioneered Machine
learning in 1950.

The birth of Artificial Intelligence (1952-1956)


o Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial intelligence
program “Which was named as "Logic Theorist".
o Year 1956: The word "Artificial Intelligence" first adopted by American Computer scientist
John McCarthy at the Dartmouth Conference.

The golden years-Early enthusiasm (1956-1974)


o Year 1966: The researchers emphasized developing algorithms which can solve mathematical
problems. Joseph Weizenbaum created the first chatbot in 1966, which was named as ELIZA.
o Year 1972: The first intelligent humanoid robot was built in Japan which was named as
WABOT-1.

The first AI winter (1974-1980)


o The duration between years 1974 to 1980 was the first AI winter duration. AI winter refers
to the time period where computer scientist dealt with a severe shortage of funding from
government for AI researches.
o During AI winters, an interest of publicity on artificial intelligence was decreased.

A boom of AI (1980-1987)
o Year 1980: After AI winter duration, AI came back with "Expert System". Expert systems
were programmed that emulate the decision-making ability of a human expert.
o In the Year 1980, the first national conference of the American Association of Artificial
Intelligence was held at Stanford University.

The second AI winter (1987-1993)


o The duration between the years 1987 to 1993 was the second AI Winter duration.
o Again Investors and government stopped in funding for AI research as due to high cost but
not efficient result. The expert system such as XCON was very cost effective.

The emergence of intelligent agents (1993-2011)


o Year 1997: In the year 1997, IBM Deep Blue beats world chess champion, Gary Kasparov,
and became the first computer to beat a world chess champion.
o Year 2002: for the first time, AI entered the home in the form of Roomba, a vacuum cleaner.
o Year 2006: AI came in the Business world till the year 2006. Companies like Facebook,
Twitter, and Netflix also started using AI.

b) Explain any two types of agents with diagram.

Simple Reflex agent:


• o The Simple reflex agents are the simplest agents. These agents take decisions on the
basis of the current percept’s and ignore the rest of the percept history.
• o These agents only succeed in the fully observable environment.
• o The Simple reflex agent does not consider any part of percept’s history during their
decision and action process.
• o The Simple reflex agent works on Condition-action rule, which means it maps the
current state to action. Such as a Room Cleaner agent, it works only if there is dirt in the room.
o Problems for the simple reflex agent design approach: o They have very limited intelligence
o They do not have knowledge of non-perceptual parts of the current state
o Mostly too big to generate and to store.
o Not adaptive to changes in the environment.

Goal-based agents
• o The knowledge of the current state environment is not always sufficient to decide for
an agent to what to do.
• o The agent needs to know its goal which describes desirable situations.
• o Goal-based agents expand the capabilities of the model-based agent by having the
"goal" information.
• o They choose an action, so that they can achieve the goal.
• o These agents may have to consider a long sequence of possible actions before
deciding whether the goal is achieved or not. Such considerations of different scenario are
called searching and planning, which makes an agent proactive.
OR

c) Explain any five uses of agents.

Autonomous Vehicles:

• AI agents are essential for self-driving cars, enabling them to navigate, detect obstacles,
make decisions, and interact with traffic systems. These agents use sensors and machine
learning algorithms to process data in real-time and ensure safe driving.

Virtual Assistants:

• Virtual assistants like Siri, Alexa, and Google Assistant use AI agents to understand
and respond to user queries, manage schedules, control smart home devices, and
provide recommendations. They leverage natural language processing (NLP) to
communicate effectively with users.

Robotics:

• AI agents are embedded in robots for various applications, such as manufacturing,


healthcare, and service industries. These agents help robots perform tasks like
assembly, surgery, cleaning, and customer service autonomously, adapting to different
environments and tasks.

Game AI:

• In video games, AI agents control non-player characters (NPCs) to create realistic and
challenging gameplay experiences. These agents can adapt their behavior based on the
player's actions, enhancing the overall gaming experience by providing dynamic and
engaging interactions.

Financial Services:

• AI agents are used in financial services for tasks like fraud detection, algorithmic
trading, and customer service. They analyze vast amounts of data to detect suspicious
activities, execute trades at optimal times, and assist customers with their financial
inquiries and transactions through chatbots and automated systems.
d) Differentiate between human intelligence and artificial intelligence.

Aspect Human Intelligence Artificial Intelligence


Nature and Origin Biological Technological
Developed through Created by humans
evolution
Learning and Adaptation General learning across Task-specific learning
various domains
Emotions and Emotional intelligence Lacks genuine emotions
Consciousness
Flexibility and Creativity Highly flexible in new Limited flexibility
situations
Processing and Parallel processing in the Sequential processing in
Computation brain computers

2.a) What is depth first search? Explain with suitable example.

• Depth-first search isa recursive algorithm for traversing a tree or graph data structure.
• It is called the depth-first search because it starts from the root node and follows each
path to its greatest depth node before moving to the next path.
• DFS uses a stack data structure for its implementation.
• The process of the DFS algorithm is similar to the BFS algorithm.
Note: Backtracking is an algorithm technique for finding all possible solutions using
recursion.

In the below search tree, we have shown the flow of depth-first search, and it will follow the
order as:
Root node--->Left node ----> right node.
TIFICIAL INTELLIGENCE & APPLICATIONS

It will start searching from root node S, and traverse A, then B, then D and E, after
traversing E, it will backtrack the tree as E has no other successor and still goal node is not
found. After backtracking it will traverse node C and then G, and here it will terminate as
it found goal node.
b) Explain A* algorithm with an example.
Algorithm of A* search:
Step1: Place the starting node in the OPEN list.
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, then it should be attached to the back
pointer which reflects the lowest g(n') value.
Step 6: Return to Step 2.
Advantages:
• o A* search algorithm is the best algorithm than other search algorithms.
• o A* search algorithm is optimal and complete.
• o This algorithm can solve very complex problems.

Disadvantages:
• o It does not always produce the shortest path as it mostly based on heuristics and
approximation.
• o A* search algorithm has some complexity issues.
• o The main drawback of A* is memory requirement as it keeps all generated nodes in
the memory, so it is not practical for various large-scale problems.

Example:
In this example, we will traverse the given graph using the A* algorithm. The heuristic value
of all states is given in the below table so we will calculate the f(n) of each state using the
formula f(n)= g(n) + h(n), where g(n) is the cost to reach any node from start state.
ARTIFICIAL INTELLIGENCE & APPLICATIONS

Here we will use OPEN and CLOSED list.


Initialization: {(S, 5)}
Iteration1: {(S--> A, 4), (S-->G, 10)}
Iteration2: {(S--> A-->C, 4), (S--> A-->B, 7), (S-->G, 10)}
Iteration3: {(S--> A-->C--->G, 6), (S--> A-->C--->D, 11), (S--> A-->B, 7), (S-->G, 10)}
Iteration 4 will give the final result, as S--->A--->C--->G,
it provides the optimal path with cost 6.

OR

c)Explain Depth-limited search algorithm with an example

A depth-limited search algorithm is similar to depth-first search with a predetermined limit.


Depth-limited search can solve the drawback of the infinite path in the Depth-first search. In
this algorithm, the node at the depth limit will treat as it has no successor nodes further.
Depth-limited search can be terminated with two Conditions of failure:
• o Standard failure value: It indicates that problem does not have any solution.
• o Cutoff failure value: It defines no solution for the problem within a given depth limit.

Advantages:
• Depth-limited search is Memory efficient.
ARTIFICIAL INTELLIGENCE & APPLICATIONS

Disadvantages:
• o Depth-limited search also has a disadvantage of incompleteness.
• o It may not be optimal if the problem has more than one solution
• Completeness: DLS search algorithm is complete if the solution is above the depth-
limit.
• Time Complexity: Time complexity of DLS algorithm is O(bℓ).
• Space Complexity: Space complexity of DLS algorithm is O(b×ℓ).
• Optimal: Depth-limited search can be viewed as a special case of DFS, and it is also
not optimal even if ℓ>d.

3.a) Explain the wumpus world problem with a diagram.

Problem definition: The Wumpus world is a cave which has 4/4 rooms connected with
passageways. So there are total 16 rooms which are connected with each other. We have a
knowledge-based agent who will go forward in this world. The cave has a room with a beast
which is called Wumpus, who eats anyone who enters the room. The Wumpus can be shot by
the agent, but the agent has a single arrow. In the Wumpus world, there are some Pits rooms
which are bottomless, and if agent falls in Pits, then he will be stuck there forever. The exciting
thing with this cave is that in one room there is a possibility of finding a heap of gold. So the
agent goal is to find the gold and climb out the cave without fallen into Pits or eaten by
Wumpus. The agent will get a reward if he comes out with gold, and he will get a penalty if
eaten by Wumpus or falls in the pit.
PEAS description of Wumpus world:
Performance measure:
• +1000 reward points if the agent comes out of the cave with the gold.
• -1000 points penalty for being eaten by the Wumpus or falling into the pit.
• -1 for each action, and -10 for using an arrow.
• The game ends if either agent dies or came out of the cave.

Environment:
• A 4*4 grid of rooms.
• The agent initially in room square [1, 1], facing toward the right.

Actuators:
• Left turn,
• Right turn
• Move forward
• Grab
• Release
• Shoot.

Sensors:
• The agent will perceive the stench if he is in the room adjacent to the Wumpus. (Not
diagonally).
• The agent will perceive breeze if he is in the room directly adjacent to the Pit.
• The agent will perceive the glitter in the room where the gold is present.

b) What are quantifiers in first order logic? Explain.

Quantifiers in first-order logic (FOL) are symbols that specify the quantity of specimens in the
domain of discourse that satisfy a certain property. In the context of artificial intelligence (AI),
quantifiers are used to express logical statements about objects and their relationships in a
structured and formal way. There are two primary types of quantifiers:

1. Universal Quantifier ( ∀ )

• Symbol: ∀
• Meaning: "For all" or "For every"
• Usage: The universal quantifier asserts that a given predicate or property holds for all
elements in the domain of discourse.
• Example in FOL:
o ∀x (P(x)) means "For all x, P(x) is true."
o If P(x) represents "x is a human," then ∀x (P(x)) means "All x are humans."

2. Existential Quantifier ( ∃ )

• Symbol: ∃
• Meaning: "There exists" or "For some"
• Usage: The existential quantifier asserts that there is at least one element in the domain
of discourse for which the predicate or property holds.
• Example in FOL:
o ∃x (P(x)) means "There exists an x such that P(x) is true."
o If P(x) represents "x is a human," then ∃x (P(x)) means "There exists at least
one x that is a human."
OR

c) What is propositional logic? Explain the logical connection used to connect any two
propositions.

• Propositional logic (PL) is the simplest form of logic where all the statements are made
by propositions.
• A proposition is a declarative statement which is either true or false. It is a technique of
knowledge representation in logical and mathematical form.

Logical connectives are used to connect two simpler propositions or representing a


sentence logically. We can create compound propositions with the help of logical connectives.
There are mainly five connectives, which are given as follows:

• Negation: A sentence such as ¬ P is called negation of P. A literal can be either Positive


literal or negative literal.
• Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a conjunction.
Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
3) Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction,
where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.
4) Implication: A sentence such as P → Q, is called an implication. Implications are also
known as if-then rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
5) Biconditional: A sentence such as P⇔ Q is a Biconditional sentence,
Example: If I am breathing, then I am alive
P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.

d)What is backward chaining? Explain.

Backward Chaining
A backward chaining algorithm is a form of reasoning, which starts with the goal and works
backward, chaining through rules to find known facts that support the goal.
Properties of backward chaining:
• It is known as a top-down approach.
• Backward-chaining is based on modus ponens inference rule.
• In backward chaining, the goal is broken into sub-goal or sub-goals to prove the facts
true.
• It is called a goal-driven approach, as a list of goals decides which rules are selected
and used.

• In Backward chaining from the goal we need to reach the given facts. Here the goal is
he is all rounder.
• First we need to check whether goal is present in given facts, if not the statements in
IF, AND condition should be treated as subgoals. In the given example IF student is excellent
in academics and AND he is good in sports are the subgoals.
• Next check the subgoals in IF statement, student is excellent in academics is present
in Rule 2 inferred part, so from that we got two given facts i.e student gets marks > 80 and
he is good in genera knowledge.
• Next remaining subgoal (i.e he is good in sports) is checked in inferred part; it is
present in Rule 3. From this we got one more fact i.e, student is making centuries.
• Finally we got all the given facts from the inferred statements.

4.a) What is supervised learning?Explain the types of supervised learning.

• In supervised learning, sample labelled data are provided to the machine learning
system for training, and the system then predicts the output based on the training data.
• The system uses labelled data to build a model that understands the datasets and learns
about each one. After the training and processing are done, we test the model with sample data
to see if it can accurately predict the output.
• The mapping of the input data to the output data is the objective of supervised learning.
• Spam filtering is an example of supervised learning.
Supervised learning can be grouped further in two categories of algorithms:
• Classification: A classification problem is when the output variable is a
category, such as “Red” or “blue” , “disease” or “no disease”.
• Regression: A regression problem is when the output variable is a real value,
such as “dollars” or “weight”.
Regression
Regression is a type of supervised learning that is used to predict continuous values, such as
house prices, stock prices, or customer churn. Regression algorithms learn a function that maps
from the input features to the output value.
Some common regression algorithms include:
• Linear Regression
• Polynomial Regression

Classification
Classification is a type of supervised learning that is used to predict categorical values, such as
whether a customer will churn or not, whether an email is spam or not, or whether a medical
image shows a tumour or not. Classification algorithms learn a function that maps from the
input features to a probability distribution over the output classes.
Some classification algorithms includes:
KNN, Logistic regression, Decision trees

b) Explain Linear regression in detail with suitable example. 5 Marks

• Linear regression is one of the easiest and most popular Machine Learning algorithms.
• It is a statistical method that is used for predictive analysis. Linear regression makes
predictions for continuous/real or numeric variables such as sales, salary, age, product price,
etc.
• Linear regression algorithm shows a linear relationship between a dependent (y) and
one or more independent (y) variables, hence called as linear regression.
• Since linear regression shows the linear relationship, which means it finds how the
value of the dependent variable is changing according to the value of the independent variable.

• The linear regression model provides a sloped straight line representing the relationship
between the variables

OR
c) Write a short note on Artificial neural networks. 5 Marks

• The term "Artificial Neural Network" is derived from Biological neural networks
that develop the structure of a human brain.
• Similar to the human brain that has neurons interconnected to one another, artificial
neural networks also have neurons that are interconnected to one another in various layers of
the networks. These neurons are known as nodes.
• An Artificial Neural Network in the field of Artificial intelligence where it attempts to
mimic the network of neurons makes up a human brain so that computers will have an option
to understand things and make decisions in a human-like manner.
• The artificial neural network is designed by programming computers to behave simply
like interconnected brain cells.
• Dendrites from Biological Neural Network represent inputs in Artificial Neural
Networks, cell nucleus represents Nodes, synapse represents Weights, and Axon represents
Output

d) Explain how SVM can be used for classification with example. 5 Marks

• 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/support 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:

Hyperplane: There can be multiple lines/decision boundaries to segregate the classes in n-


dimensional space, but we need to find out the best decision boundary that helps to classify the
data points. This best boundary is known as the hyperplane of SVM.
Example: Suppose we see a strange cat that also has some features of dogs, so if we want a
model that can accurately identify whether it is a cat or dog, so such a model can be created by
using the SVM algorithm. We will first train our model with lots of images of cats and dogs so
that it can learn about different features of cats and dogs, and then we test it with this strange
creature. So as support vector creates a decision boundary between these two data (cat and dog)
and choose extreme cases (support vectors), it will see the extreme case of cat and dog. On the
basis of the support vectors, it will classify it as a cat.

5.a) What do you understand by Natural language processing? 5 Marks

The following are a few of the NLP steps:


• Text preprocessing: Text preprocessing entails cleaning up the text and getting it ready
for additional processing. This could entail actions like eliminating stop words, stemming
words, and punctuation.
• Tokenization: Tokenization is the process of dividing a text into separate words or
phrases.
• Part-of-speech tagging: Tagging each word in the text with its part of speech, such as
a noun, verb, adjective, or adverb, is known as part-of-speech tagging.
• Named entity recognition: Named entity recognition entails locating and categorizing
named objects in the text, including persons, places, businesses, and items.
• Semantic analysis: This means understanding the text's meaning. This could entail
activities like figuring out how words and phrases relate to one another and figuring out the
tone of the text.
• Text generation: Text creation is the process of creating new text, such as summaries,
translations, or chatbot responses.

b) What is the use of computer vision in image processing? 5 Marks


• Object Detection and Tracking: Locating & tracking objects in movies for
surveillance & autonomous vehicles is known as object detection and tracking.
• • Image segmentation: Breaking up images into smaller pieces in order to recognize
objects and regions.
• • Pose Estimation: Pose estimation is the process of figuring out where and how people
or objects are positioned.
• • Image generation: the process of producing or changing images utilizing methods
like style transfer.
• • Scene Understanding: Understanding a scene's context and significance is known as
scene understanding.
• • Video analysis: The process of tracking objects and identifying actions in videos.

OR

c) List any two real world application of robotics and explain their usage in
everyday life. 5 Marks

Healthcare Robotics

• Usage: Surgical robots, like the da Vinci Surgical System, are used to perform
minimally invasive surgeries with high precision. These robots are controlled by
surgeons and provide greater accuracy, flexibility, and control than traditional surgical
techniques.
• Everyday Life Impact: Patients benefit from shorter recovery times, reduced pain, and
smaller incisions, leading to quicker returns to daily activities and less time spent in
hospitals.
Household Robotics

• Usage: Robots like Roomba and Neato are designed to autonomously clean floors. They
use sensors and mapping technology to navigate around obstacles and efficiently
vacuum different types of flooring.
• Everyday Life Impact: Homeowners save time and effort on daily cleaning tasks,
allowing them to focus on other activities. These robots help maintain a cleaner living
environment with minimal manual intervention.

d) What is text classification? What are the applications of NLP?

[2 marks & 3 applications]

Text classification is a fundamental task in natural language processing (NLP) and artificial
intelligence (AI) that involves categorizing or labeling text into predefined classes or
categories. The goal is to automatically assign one or more categories to a text document,
making it easier to organize, search, and analyze large volumes of textual data.

• Machine Translation
• Information Retrieval
• Question Answering
• Speech Recognition
• Named Entity Recognition

PART B

ANSWER ANY FIVE QUESTIONS.EACH QUESTIONS CARRIES 2 MARKS:

6)What is Artificial intelligence?


It is a branch of computer science by which we can create intelligent machines which
can behave like a human, think like humans, and able to make decisions.

7) Define agent with an example.


An agent refers to a program or system that is capable of independently perceiving its
environment and taking actions to achieve specific goals.
Ex: self-driving cars

8)What is heuristic function?


A heuristic function, often simply called a heuristic, is a function used in artificial
intelligence and computer science to guide algorithms in making decisions or solving problems
more efficiently. It provides an estimated cost or value that helps algorithms prioritize their
choices.

9)Mention the drawback of DFS?


Completeness
Non optimality

10)Difference between syntax and semantics.

Syntax Semantics
Structure and rules that define how code Meaning and interpretation of code
Enforced during parsing and compilation Enforced during parsing and compilation

11)What are the types of Machine learning?


Supervised Learning
Unsupervised Learning
Semi-supervised Learning
Reinforcement Learning

12)What is a traing set?


A training set, in the context of machine learning and data science, refers to a subset of
data used to train a machine learning model. It is a crucial component of the machine learning
workflow where the model learns patterns and relationships from the input data in order to
make predictions or classifications on new, unseen data.

13)What is computer vision?


Computer vision is a field of artificial intelligence (AI) and computer science that focuses on
enabling computers to interpret and understand visual information from the world. It involves
developing algorithms and techniques that allow machines to perceive, analyze, and make
decisions based on images or videos

You might also like