Descriptive ANSWER AI
Descriptive ANSWER AI
ADVANTAGES-
• High Accuracy with less errors: AI machines or systems are prone to less errors and high
accuracy as it takes decisions as per pre-experience or information.
• High-Speed: AI systems can be of very high-speed and fast-decision making, because of that AI
systems can beat a chess champion in the Chess game.
• High reliability: AI machines are highly reliable and can perform the same action multiple times
with high accuracy.
• Useful for risky areas: AI machines can be helpful in situations such as defusing a bomb,
exploring the ocean floor, where to employ a human can be risky.
• Digital Assistant: AI can be very useful to provide digital assistant to the users such as AI
technology is currently used by various E-commerce websites to show the products as per
customer requirement.
• Useful as a public utility: AI can be very useful for public utilities such as a self driving car which
can make our journey safer and hassle-free, facial recognition for security purpose, Natural
language processing to communicate with the human in human-language, etc.
DISADVANTAGES-
• High Cost: The hardware and software requirement of AI is very costly as it requires lots of
maintenance to meet current world requirements.
• Can't think out of the box: Even we are making smarter machines with AI, but still they cannot
work out of the box, as the robot will only do that work for which they are trained, or
programmed.
• No feelings and emotions: AI machines can be an outstanding performer, but still it does not
have the feeling so it cannot make any kind of emotional attachment with human, and may
sometime be harmful for users if the proper care is not taken.
• Increase dependency on machines: With the increment of technology, people are getting more
dependent on devices and hence they are losing their mental capabilities.
• No Original Creativity: As humans are so creative and can imagine some new ideas but still AI
machines cannot beat this power of human intelligence and cannot be creative and imaginative.
2. Describe any three applications of AI
AI in Social Media-Social Media sites such as Facebook, Twitter, and Snapchat contain
billions of user profiles, which need to be stored and managed in a very efficient way. AI can
organize and manage massive amounts of data. AI can analyze lots of data to identify the latest
trends, hashtag, and requirement of different users.
AI in Gaming-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.
AI in Healthcare- 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. Describe simple rational agent and Goal based agents.
• Discrete / Continuous − If there are a limited number of distinct, clearly defined, states
of the environment, the environment is discrete (For example, chess); otherwise it is
continuous (For example, driving).
• Observable / Partially Observable − If it is possible to determine the complete state of
the environment at each time point from the percepts it is observable; otherwise it is
only partially observable.
• Static / Dynamic − If the environment does not change while an agent is acting, then it is
static; otherwise it is dynamic.
• Single agent / Multiple agents − The environment may contain other agents which may
be of the same or different kind as that of the agent.
• Accessible / Inaccessible − If the agent’s sensory apparatus can have access to the
complete state of the environment, then the environment is accessible to that agent.
• Deterministic / Non-deterministic − If the next state of the environment is completely
determined by the current state and the actions of the agent, then the environment is
deterministic; otherwise it is non-deterministic.
• Episodic / Non-episodic − In an episodic environment, each episode consists of the agent
perceiving and then acting. The quality of its action depends just on the episode itself.
Subsequent episodes do not depend on the actions in the previous episodes. Episodic
environments are much simpler because the agent does not need to think ahead.
5. Describe types of search algorithm.
1. Breadth-first Search:
• Breadth-first search is the most common search strategy for traversing a tree or graph.
• BFS algorithm starts searching from the root node of the tree and expands all successor
node at the current level before moving to nodes of next level.
• it is implemented using FIFO queue data structure.
2. Depth-first Search
• Depth-first search is a recursive algorithm for traversing a tree or graph data structure.
• 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.
• Uniform-cost search is a searching algorithm used for traversing a weighted tree or graph. This
algorithm comes into play when a different cost is available for each edge.
• The primary goal of the uniform-cost search is to find a path to the goal node which has the
lowest cumulative cost.
• A uniform-cost search algorithm is implemented by the priority queue
• This search algorithm finds out the best depth limit and does it by gradually increasing the limit
until a goal is found.
• This Search algorithm combines the benefits of Breadth-first search's fast search and depth-first
search's memory efficiency.
6. Describe DFS and BFS algorithm with their advantages and disadvantages.
Breadth-first Search:
• Breadth-first search is the most common search strategy for traversing a tree or graph.
• BFS algorithm starts searching from the root node of the tree and expands all successor node at
the current level before moving to nodes of next level.
• Breadth-first search implemented using FIFO queue data structure.
Advantages:
• BFS will provide a solution if any solution exists.
• If there are more than one solutions for a given problem, then BFS will provide the minimal
solution which requires the least number of steps.
Disadvantages:
• It requires lots of memory since each level of the tree must be saved into memory to expand the
next level.
• BFS needs lots of time if the solution is far away from the root node.
Depth-first Search
• Depth-first search isa recursive algorithm for traversing a tree or graph data structure.
• 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.
Advantage:
• DFS requires very less memory as it only needs to store a stack of the nodes on the
path from root node to the current node.
• It takes less time to reach to the goal node than BFS algorithm (if it traverses in the
right path).
Disadvantage:
• There is the possibility that many states keep re-occurring, and there is no guarantee
of finding the solution.
• DFS algorithm goes for deep down searching and sometime it may go to the infinite
loop.
7. Describe uniformed cost search with advantages and disadvantages.
• Uniform-cost search is a searching algorithm used for traversing a weighted tree or graph.
• This algorithm comes into play when a different cost is available for each edge.
• The primary goal of the uniform-cost search is to find a path to the goal node which has the
lowest cumulative cost.
• A uniform-cost search algorithm is implemented by the priority queue.
Advantages:
• Uniform cost search is optimal because at every state the path with the least cost is chosen.
Disadvantages:
• It does not care about the number of steps involve in searching and only concerned about path
cost. Due to which this algorithm may be stuck in an infinite loop.
• Greedy best-first search algorithm always selects the path which appears best at that moment.
• It uses the heuristic function and search.
• With the help of best-first search, at each step, we can choose the most promising node.
• In the best first search algorithm, we expand the node which is closest to the goal node and the
closest cost is estimated by heuristic function, i.e. f(n)= g(n).
Simple hill climbing is the simplest way to implement a hill climbing algorithm. It only evaluates the
neighbour node state at a time and selects the first one which optimizes current cost and set it as a
current state. It only checks it's one successor state, and if it finds better than the current state, then
move else be in the same state.
Step 1: Compare CURRENT to GOAL, if there are no differences between both then
Step 2: Else, select the most significant difference and reduce it by doing the following
1. Select a new operator O which is applicable for the current difference, and if
ii) O-Result, the state that would result if O were applied In O-start.
3. If
(First-Part <------ MEA (CURRENT, O-START)
And
(LAST-Part <----- MEA (O-Result, GOAL), are successful, then signal Success
1. Evaluating the initial state: In the first step, we will evaluate the initial state and will compare the
initial and Goal state to find the differences between both states.
2. Applying Delete operator: As we can check the first difference is that in goal state there is no dot
symbol which is present in the initial state, so, first we will apply the Delete operator to remove this
dot.
3. Applying Move Operator: After applying the Delete operator, the new state occurs which we will
again compare with goal state. After comparing these states, there is another difference that is the
square is outside the circle, so, we will apply the Move Operator.
4. Applying Expand Operator: Now a new state is generated in the third step, and we will compare this
state with the goal state. After comparing the states there is still one difference which is the size of the
square, so, we will apply Expand operator, and finally, it will generate the goal state.
A Constraint Satisfaction Problem is a mathematical problem where the solution must meet a number
of constraints. In a CSP, the objective is to assign values to variables such that all the constraints are
satisfied. CSPs are used extensively in artificial intelligence for decision-making problems where
resources must be managed or arranged within strict guidelines.
• D is a set of domains {D1D1, D2D2, ..., DnDn}, where each DiDi is the set of possible values
for xixi.
• C is a set of constraints {C1C1, C2C2, ..., CmCm}, where each CiCi is a constraint that restricts
the values that can be assigned to a subset of the variables.
13. What are the disadvantages of Steepest Hill Climbing Search Procedure? Using a suitable
search tree, illustrate that these drawbacks are eliminated in Best First Search.
14. Briefly explain about semantic network with its advantages and disadvantages. Construct a
semantic net representation for the following. -Ram gives Lucy a gift -Every dog has bitten a mail
carrier.
Semantic networks are alternative of predicate logic for knowledge representation. In Semantic
networks, we can represent our knowledge in the form of graphical networks.
This network consists of nodes representing objects and arcs which describe the relationship
between those objects.
b. Kind-of-relation
1. Semantic networks take more computational time at runtime as we need to traverse the complete
network tree to answer some questions. It might be possible in the worst case scenario that after
traversing the entire tree, we find that the solution does not exist in this network.
2. Semantic networks try to model human-like memory (Which has 1015 neurons and links)to store
the information, but in practice, it is not possible to build such a vast semanticnetwork.
3. These types of representations are inadequate as they do not have any equivalentquantifier, e.g.,
for all, for some, none, etc.
4. Semantic networks do not have any standard definition for the link names.
5. These networks are not intelligent and depend on the creator of the system.
Advantages of Semantic network:
1. Semantic networks are a natural representation of knowledge.
2. Semantic networks convey meaning in a transparent manner.
3. These networks are simple and easily understandable.
15. Using a suitable example, illustrate the steps of A* search. Why is A* search better than Best-
First Search?
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.
Example done in q 9
It uses heuristic function h(n), and cost to reach the node n from the start state g(n). It has combined
features of UCS and greedy best-first search, by which it solve the problem efficiently. A* search
algorithm finds the shortest path through the search space using the heuristic function. This search
algorithm expands less search tree and provides optimal result faster.
16. Describe the Minimax algorithm for searching game tree. Explain the effect of the addition of
alpha-beta cutoffs to this search algorithm.
• There are two players one is called Maximizer and other is called Minimizer.
• Maximizer will try to get the Maximum possible score, and Minimizer will try to get the
minimum possible score.
• This algorithm applies DFS, so in this game-tree, we have to go all the way through the leaves
to reach the terminal nodes.
• At the terminal node, the terminal values are given so we will compare those value and
backtrack the tree until the initial state occurs
In the minimax search algorithm that the number of game states it has to examine are exponential in
depth of the tree. Since we cannot eliminate the exponent, but we can cut it to half. Hence there is a
technique by which without checking each node of the game tree we can compute the correct
minimax decision, and this technique is called pruning. This involves two threshold parameter Alpha
and beta for future expansion, so it is called alpha-beta pruning. It is also called as Alpha-Beta
Algorithm.
Natural Language Processing (NLP) is a subfield of Artificial Intelligence (AI) and Computational
Linguistics focused on the interaction between computers and human languages.
The goal of NLP is to enable machines to understand, interpret, generate, and respond to human
language in a way that is both meaningful and useful.
1. Text Processing: This includes tasks such as tokenization (breaking text into words or
sentences), part-of-speech tagging, and named entity recognition (NER). These tasks help
structure raw text into more manageable forms for further analysis.
2. Sentiment Analysis: The task of identifying the sentiment (positive, negative, or neutral)
expressed in text, often used in social media monitoring, customer feedback analysis, and
marketing.
3. Machine Translation: Converting text from one language to another. Modern methods often
use neural machine translation (NMT) powered by deep learning.
4. Text Generation: Generating coherent and contextually appropriate text, such as in dialogue
systems or automated content creation. Models like GPT (Generative Pre-trained
Transformers) are commonly used for text generation.
5. Speech Recognition and Synthesis: Converting spoken language into text (speech-to-text)
and vice versa (text-to-speech), which are vital for voice assistants like Siri, Alexa, and Google
Assistant.
Applications of NLP:
• Chatbots and Virtual Assistants: Automating customer service, answering questions, and
providing personalized recommendations.
• Search Engines: Improving search results by understanding user queries more effectively.
1. User Interface
With the help of a user interface, the expert system interacts with the user, takes queries as an
input in a readable format, and passes it to the inference engine. After getting the response from
the inference engine, it displays the output to the user. In other words, it is an interface that
helps a non-expert user to communicate with the expert system to find a solution.
o The inference engine is known as the brain of the expert system as it is the main processing
unit of the system. It applies inference rules to the knowledge base to derive a conclusion or
deduce new information. It helps in deriving an error-free solution of queries asked by the
user.
o With the help of an inference engine, the system extracts the knowledge from the
knowledge base.
3. Knowledge Base
o The knowledgebase is a type of storage that stores knowledge acquired from the different
experts of the particular domain. It is considered as big storage of knowledge. The more the
knowledge base, the more precise will be the Expert System.
o One can also view the knowledge base as collections of objects and their attributes.
19. What are the different types of grammar used in Natural Language Processing? Explain each
with examples.
20. Assume the following facts 1.Ram likes only easy courses. 2. Engg. Courses are hard. 3.All
courses in Arts are easy. 4. AR04 is an Arts course. Use Resolution to answer the question,
“What courses would Ram like?”
21. Explain Forward and Backward Reasoning with the help of examples.
• Knowledge acquisition is the process used to define the rules and ontologies required
for a knowledge-based system.
• The phrase was first used in conjunction with expert systems to describe the initial tasks
associated with developing an expert system, namely finding and interviewing domain
experts and capturing their knowledge via rules, objects, and frame-based ontologies.
• One approach to knowledge acquisition investigated was to use natural language parsing
and generation to facilitate knowledge acquisition.
• Natural language parsing could be performed on manuals and other expert documents and
an initial first pass at the rules and objects could be developed automatically. Text
generation was also extremely useful in generating explanations for system behavior. This
greatly facilitated the development and maintenance of expert systems.
• A more recent approach to knowledge acquisition is a re-use based approach. One example
domain where this approach has been successful is bioinformatics.
23. Explain the basic components of a heuristic systems
24. What are the different types of learning? Explain with suitable example.
26. "As per the law, it is a crime for an American to sell weapons to hostile nations. Country A,
an enemy of America, has some missiles, and all the missiles were sold to it by Robert, who is
an American citizen."
8. No frog is green.
• Goal Stack Planning is one of the earliest methods in artificial intelligence in which we work
backwards from the goal state to the initial state.
• We start at the goal state and we try fulfilling the preconditions required to achieve the initial
state. These preconditions in turn have their own set of preconditions, which are required to be
satisfied first.
• We keep solving these “goals” and “sub-goals” until we finally arrive at the Initial State.
• We make use of a stack to hold these goals that need to be fulfilled as well the actions that we
need to perform for the same.
• At the end of this algorithm we are left with an empty stack and a set of actions which helps us
navigate from the Initial State to the World State.
Ex-1. ON(A,B) : Block A is on B
2. ONTABLE(A) : A is on table
3. CLEAR(A) : Nothing is on top of A
4. HOLDING(A) : Arm is holding A.
5. ARMEMPTY : Arm is holding nothing
Using these predicates, we represent the Initial State and the Goal State in our example like
this:
Initial State — ON(B,A) ∧ ONTABLE(A) ∧ ONTABLE(C) ∧ ONTABLE(D) ∧ CLEAR(B) ∧ CLEAR(C) ∧
CLEAR(D) ∧ ARMEMPTY
SEND
MORE
=========
MONEY
we have to replace each letter by a distinct digit so that the resulting sum is correct.
1. transfer learning- it involves taking a pre defined model and fine tuning it on a specific task with a
smaller dataset
2. n gram models- it provides the next word in a sequence based on the previous n-1 words.
3. hidden Markov models- these are probabilistic models that assume there is an underlying hidden
state sequence which generate observed words
4.maximum likelihood estimation- it is used for estimating parameters of a statistical model that
maximise the likelihood of observed data.