0% found this document useful (0 votes)
23 views12 pages

Unit 2 Question Bank Ese Updated

Uploaded by

Sadhana Ganesan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views12 pages

Unit 2 Question Bank Ese Updated

Uploaded by

Sadhana Ganesan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

MASTER OF COMPUTER APPLICATIONS

Subject Name : Artificial Intelligence Subject Code : MCC1854


Year / Sem : II / III Batch : 2023 – 2025

UNIT II – PROBLEM SOLVING METHODS


PART – A
1. How a problem is formally defined?
Problem formulation is the process of deciding what actions and states to
consider for a goal that has been developed in the first step of problem solving.
2. Why problem formulation must follow goal formulation?
Goal based agent is the one which solves the problem. Therefore while
formulating problem one need to only consider what is the goal to be achieved so that
problem formulation is done accordingly. Hence problem formulation must follow goal
formulation.
3. What are the four components to define a problem? Define them
The four components to define a problem are,
 Initial state – it is the state in which agent starts in.
 A description of possible actions – it is the description of possible actions which
are available to the agent.
 The goal test – it is the test that determines whether a given state is goal (final)
state.
 A path cost function – it is the function that assigns a numeric cost (value) to
each path. The problem-solving agent is expected to choose a cost function that
reflects its own performance measure
4. How will you measure the problem solving performance?
Problem solving performance is measured with 4 factors.
 Completeness - Does the algorithm (solving procedure) surely finds solution,
how if really the solution exists.
 Optimality - If multiple solutions exist then do the algorithm returns optimal
among them.
 Time requirement.
 Space requirement.
5. Write applications of BFS
It is simple search strategy, which is complete i.e. it surely gives solution if
solution exists. If the depth of search tree is small then BFS is the best choice. It is
useful in tree as well as in graph search.
6. State on which basis search algorithms are choosen.
Search algorithms are choosen depending on two components.
 How is the state space - That is, state space is tree structured or graph? Critical
factor for state space is what is branching factor and depth level of that tree or
graph.
Page 1 of 12
 What is the performance of the search strategy? A complete, optimal search
strategy with better time and space requirement is critical factor in performance
of search strategy.
7. Mention how the search strategies are evaluated?
Search strategies are evaluated on following four criterion,
 Completeness: does the search strategy always find a solution, if one exists?
 Time complexity: how much time the search strategy takes to compute.
 Space complexity: how much memory consumption search strategy has ?
 Optimality: does the search strategy find the highest-quality solution? Define
admissible and consistent heuristics.
8. Evaluate performance of problem solving method based on depth-first-search
algorithm.
DFS algorithm performance measurement is done with four ways
 Completeness - It is complete (gurantees solution).
 Optimality - It is not optimal.
 Time complexity - It's time complexity is O(b).
 Space complexity - It's space complexity is O(b d+1).
9. Mention the four components to define a problem? Define them
The four components to define a problem are,
1. Initial state - It is the state in which agent starts in.
2. A description of possible actions - It is the description of possible actions which are
available to the agent.
3. The goal test - It is the test that determines whether a given state is goal rup (final)
state.
4. A path cost function - It is the function that assigns a numeric cost (value) to each
path. The problem-solving agent is expected to choose a cost-function that reflects its
own performance measure.
10. Define Abstraction
Abstraction is the process by which data and programs are defined with a
representation similar in form to its meaning (semantics), while hiding away the
implementation details. Abstraction tries to reduce and factor out details so that the
programmer can focus on a few concepts at a time.
11. List some of the uniformed search techniques.
 Breadth-first search
 Depth-first search
 Depth Limited Search
 Uniform cost search
 Iterative deepening depth-first search
 Bidirectional Search
12. List some of the informed search strategies

 Greedy best first search


 A* Search
 Memory bounded heuristic search
 Recursive best first search

Page 2 of 12
 Simplified memory-bounded A*

13. Differentiate Uninformed Search and Informed Search (ESE – 2023)


Parameters Informed Search Uninformed Search
Knowledge It applies knowledge during the It does not use any knowledge
Utilization search process. during the search process.
Speed It finds solutions faster. It finds solutions at a slower pace.
Completion It can be both complete and It is always complete.
incomplete.
Time Consumption It consumes less time due to faster It takes more time due to slower
searches. searches.
Cost Incurred It incurs lower costs. It incurs higher costs.
Guidance The AI receives suggestions on The AI does not receive any
how and where to find solutions. suggestions on finding solutions. It
relies on the information provided.
Efficiency It is more efficient due to lower It is less efficient due to higher
costs and faster results. costs and slower results.
Implementation It has a shorter implementation It has a lengthier implementation
Length period. period.
Examples Examples include A* Search and Examples include Uniform-Cost
Best-First Search. Search and Iterative Deepening
Search.

14. Will Breadth-First Search always find the minimal solution. Why?
Yes. If there is more than one solution then BFS can find the minimal one that
requires less number of steps
15. State the advantage of breadth first search
 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.

16. State the disadvantages of breadth first search


 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.

17. Define Evaluation function, f(n)


A node with the lowest evaluation is selected for expansion, because evaluation
measures distance to the goal.
18. Define Heuristic function, h (n)
h (n) is defined as the estimated cost of the cheapest path from node n to a goal
node.
19. Define admissible and consistent heuristics
Admissible heuristics: a heuristic is admissible if the estimated cost is never more than
actual cost from the current node to the goal node.

Page 3 of 12
Consistent heuristics:
A heuristic is consistent if the cost from the current node to a successor node plus the
estimated cost from the successor node to the goal is less than or equal to estimated cost
from the current node to the goal.
20. Why does one go for heuristics search?/ What is the power of heuristic search?
 Heuristic search uses problem specific knowledge while searching in state
space.
 This helps to improve average search performance.
 They use evaluation functions which denote relative desirability (goodness) of a
expanding node set. This makes the search more efficient and faster.
 One should go for heuristic search because it has power to solve large, hard
problems in affordable times
21. List the advantages of heuristic function
 Heuristics function ranks alternative paths in various search algorithms, at each
branching step, based on the available information, so that a better path is
chosen.
 The main advantage of heuristic function is that it guides for which state to
explore now, while searching.
 It makes use of problem specific knowledge like constraints to check the
goodness of a state to be explained. This drastically reduces the required
searching time.
22. State the advantages of depth first search
 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).
23. State the drawbacks of depth first search
 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.

24. Define depth limited search


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.

25. Define iterative deepening search


Iterative deepening is a strategy that sidesteps the issue of choosing the best
depth limit by trying all possible depth limits: first depth 0, then depth 1,then depth 2&
so on.
26. Define the bi-directed search.

Page 4 of 12
As the name suggests bi-directional that is two directional searches are made in
this searching technique. One is the forward search which starts from initial state and
the other is the backward search which starts from goal state. The two searches stop
when both the searches meet in the middle.
27. State the two types of memory bounded heuristic algorithms
 Recursive Best First Search(RBFS)
 Memory bounded A*(MA*)
28. Define RBFS
It keeps track of the f-value of the best alternative path available from any
ancestor of the current node. RBFS remembers the f-value of the best leaf in the
forgotten sub tree and therefore decide whether its worth re expanding the sub tree
sometimes later.
29. Define A* Search
A* search evaluates nodes by combining g(n), the cost to reach the node and
h(n), the cost to get from the node to the goal.
f(n) = g(n) + h(n)
30. Write the two ways of search to use all available memory
 Memory bounded A*(MA*)
 Simplified Memory bounded A*(SMA*)
31. Define SMA*
SMA* expands the best leaf until memory is full and it drops the oldest worst
leaf node and expands the newest best leaf node
32. Define Branching factor b*.
Uniform tree of depth d would have to be in order to contain N+1 nodes is
called branching factor.
33. Define local search
It operates using a single current state rather than multiple paths and generally
moves only to neighbors of that state
34. Define Optimization Problems
The aim of this problem is to find the best state according to an objective
function
35. Define Hill Climbing search.
It is a loop that continually moves in a increasing value direction (i.e.) up hill
and terminates when it reaches a “peak” where no neighbor has a higher value
36. List some drawbacks of hill climbing process
 Local maxima: A local maxima as opposed to a goal maximum is a peak that is
lower that the highest peak in the state space. Once a local maxima is reached
the algorithm will halt even though the solution may be far from satisfactory.
 Plateaux: A plateaux is an area of the state space where the evaluation fn is
essentially flat. The search will conduct a random walk.
37. Define local maxima
A local maximum is a peak that is higher than each of its neighboring states, but
lower than the global maximum.
38. Define ridge and specify how can you overcome in the searching process
Any point on a ridge can look like a peak because movement in all possible
directions is downward. Hence the algorithm stops when it reaches this state. To

Page 5 of 12
overcome Ridge, use two or more rules before testing. It implies moving in several
directions at once
39. Define plateu
On the plateau, all neighbors have the same value. Hence, it is not possible to
select the best direction
40. How can we avoid ridge and plateau in hill climbing?
Ridge and plateau in hill climbing can be avoided using methods like
backtracking, making big jumps. Backtracking and making big jumps help to avoid
plateau
41. State the variants of hill climbing search algorithm
 Stochastic hill Climbing
 Steepest-Ascent hill-climbing
 First Choice Hill Climbing
 Random Restart Hill Climbing

42. Define annealing


Annealing is the process used to harden metals (or) glass by heating them to a
high temperature and then gradually cooling them, thus allowing the material to
coalesce into a low energy crystalline state.
43. Define simulated annealing
Simulated annealing is a probabilistic algorithm which tests points across a
solution space to find the lowest minima. The algorithm is termed “simulated
annealing” because it mirrors physical annealing, a process in which a material is
repeatedly heated and cooled to elicit desired structural properties. This algorithm,
instead of picking the best move, it picks a random move. If the move improves the
situation, it is always accepted
44. Show the reason for simulated annealing algorithm preferred over the hill
climbing algorithm (ESE – 2023)
Simulated annealing seeks the global optimum in a given search space by
accepting poorer answers with a predetermined probability. This allows it to bypass
local optimum conditions. In order to iteratively move towards the best answer at each
stage, Hill Climbing employs a greedy method
45. Differentiate Hill Climbing and Simulated Annealing algorithm
Parameters Hill Climbing Simulated Annealing
Introduction Hill Climbing is a heuristic Simulated Annealing is a
optimization process that iteratively probabilistic optimization
advances towards a better solution algorithm that simulates the
at each step in order to find the best metallurgical annealing process
solution in a given search space in order to discover the best
solution in a given search area
by accepting less-than-ideal
solutions with a predetermined
probability.
Objective By iteratively progressing towards Simulated annealing seeks the
a better solution at each stage, Hill global optimum in a given
Climbing seeks to locate the ideal search space by accepting

Page 6 of 12
solution within a predetermined poorer answers with a
search space. predetermined probability. This
allows it to bypass local
optimum conditions.
Strategy In order to iteratively move towards Simulated annealing explores
the best answer at each stage, Hill the search space and avoids
Climbing employs a greedy local optimum by employing a
method. It only accepts solutions probabilistic method to accept a
that are superior to the ones already worse solution with a given
in place. probability. As the algorithm
advances, the likelihood of
accepting an inferior answer
diminishes.
Local vs. Hill Climbing may not locate the Simulated annealing has a
Global Optima global optimum because it is chance of escaping the local
susceptible to becoming caught in optimum and locating the
local optima. global optimum.
Stopping Hill Climbing comes to an end after When the temperature hits a
Criteria a certain number of iterations or predetermined level or the
when it achieves a local optimum. maximum number of
repetitions, simulated annealing
comes to an end.
Performance Hill climbing is quick and easy, but Simulated annealing is more
it has the potential to become efficient at locating the global
locked in local optima and miss the optimum than Hill Climbing,
overall best solution. particularly for complicated
situations with numerous local
optima. Simulated annealing is
slower than Hill Climbing.
Tuning Hill Climbing has no tuning The beginning temperature,
Parameters parameters. cooling schedule, and
acceptance probability function
are only a few of the tuning
factors for Simulated
Annealing.
Applications Many different applications, Several fields, including
including image processing, logistics, scheduling, and circuit
machine learning, and gaming, use design, use simulated annealing.
hill climbing.

46. Differentiate Greedy best first search and Hill Climbing Algorithm
Properties Greedy Best First Search Hill Climbing Algorithm

Definition A search algorithm that does not An approach to searching that


take into account the full search skips the full search space and
space but instead employs instead chooses the best path to

Page 7 of 12
heuristics to choose the best route a goal node using heuristics.
to a goal node.
Goal To always choose the path with the to discover the highest point in
lowest heuristic cost in order to the search space, even if it is not
reach the objective node as rapidly the global maximum, in order to
as feasible. optimize a solution.
Type informed search algorithm. Informed search algorithm.

Heuristics It estimates the cost of getting to It evaluates nearby solutions


the target node using heuristics. using heuristics.
Memory It doesn‟t have to keep track of Only keeps track of the most
prior nodes. recent and effective solutions.
Completeness Not guaranteed to find a solution. Not always possible to locate the
global maximum.
Efficiency With a suitable heuristic, it is It can be effective in locating a
possible to locate a solution local maximum, but it can
quickly in a wide search space. become trapped in a local
optimum.
Search space It uses a breadth-first approach to It uses a depth-first approach to
investigating the search space. investigate the search space.
Backtracking Does not require backtracking. It can backtrack steps if a better
answer cannot be found.
Examples It is used in situations involving It used in scheduling and
path finding and graph traversal. logistics optimization problems

47. Differentiate Best first search and A* search


Parameters Best-First Search A* Search
Evaluation The evaluation function for best- The evaluation function for A*
Function first search is f(n) = h(n). search is f(n) = h(n) + g(n).
Past Knowledge This search algorithm does not This search algorithm involves
involve past knowledge. past knowledge.
Completeness Best-first search is not complete. A* search is complete.
Optimal Best-first search is not optimal as A* search is optimal as the path
the path found may not be found is always optimal.
optimal.
Time and Space Its time complexity is O(b m) and Its time complexity is O(b m) and
Complexity space complexity can be space complexity is also O(bm).
polynomial. where b is the branching and m is
where b is the branching and m is the maximum depth of the search
the maximum depth of the search tree
tree
Memory It requires less memory. It requires more memory.
Type of nodes kept It keeps all the fringe or border It keeps all the nodes in the
nodes in the memory while memory while searching.

Page 8 of 12
searching.

48. Differentiate Breadth first search, Depth first search, Depth Limited Search
Aspect Depth First Breadth First Search Depth Limit Search (DLS)
Search (DFS) (BFS)
Exploration Depth-first Breadth-first exploration Depth-limited exploration
Strategy exploration
Data Stack Queue Stack
Structure
Completene Not guaranteed Guaranteed Complete if depth limit >=
ss depth of the shallowest goal
Optimal Not guaranteed Guaranteed Not guaranteed especially with
Solution a low depth limit
Memory Less memory More memory required For the shallow depth limit, it
Usage required will be memory-efficient
Time O(b^m) O(b^d) O(b^m)
Complexity (b: branching (d: depth of solution)
factor, m:
maximum
depth)
Space O(bd) O(b^d) O(bd)
Complexity (d: depth of solution)
Number of 𝑁𝐷𝐹𝑆≈𝑏𝑑2ND 𝑁𝐵𝐹𝑆≈𝑏𝑑(𝑏+1)2(𝑏−1)NB 𝑁𝐷𝐿𝑆≈𝑏𝑙𝑖𝑚𝑖𝑡𝑑(𝑏+1)2(𝑏+1)N
nodes FS≈2bd FS≈2(b−1)bd(b+1) DLS≈2(b+1)blimitd(b+1)
inspected
Terminatio Can Continue Continues until goal state Terminate when reaching the
ns infinitely in is found or all nodes have depth limit
graphs with been explored
infinite paths
Suitable For Suitable for Optimal pathfinding, web Optimal pathfinding, web
solutions deep crawling crawling
in search space
Backtrackin Utilizes Doesn‟t backtrack Utilizes backtracking within
g backtracking depth limit

49. Differentiate A* and AO* Algorithm


Parameters A* Algorithm AO* Algorithm
Adaptability to Not designed for handling Specifically designed to adapt to
Changing changes in the environment. changes without initiating a new
Environments search.
OR-AND Primarily uses the AND Uses both OR and AND operations
Operation operation considering one exploring multiple paths
Combination path at a time. simultaneously.
Resource Generally more resource- May explore more nodes due to
Utilization efficient, explores fewer adaptability, potentially requiring

Page 9 of 12
nodes. more computational resources.
Planning for Less suited for high Excels in situations with uncertainty,
Uncertainty uncertainty or frequent quickly adjusting plans in response
environmental changes. to new information.
Search Restart Requires a complete restart of Eliminates the need for a full restart,
Requirement the search after an saving time and computational
environmental change. resources when changes occur.
Scenario Well-suited for static Particularly beneficial in dynamic
Suitability environments with consistent environments where conditions or
node costs. costs may change over time.
Robustness to May struggle in environments Handles changes seamlessly,
Changes subject to frequent alterations. ensuring that plans remain effective
even as the environment evolves.
Real-time Excels in situations with Can be employed in real-time
Applications uncertainty, quickly adjusting applications, particularly beneficial
plans in response to new in scenarios with dynamic, changing
information. elements.
Memory Usage It uses less memory due to May use more memory due to
exploring fewer nodes. adaptability, potentially needing to
remember additional information
about explored paths.
Consistency of Requires a consistent heuristic Does not strictly require a consistent
Heuristic for optimality guarantees. heuristic, allowing for more
flexibility in heuristic choice.

50. Define genetic algorithm


Genetic Algorithm is a variant of stochastic beam search in which successor
states are generated by combining two parent states, rather than by modifying a single
state.
51. Define Constraint Satisfaction Problem
CSP are problems whose state and goal test conform to a standard structure and
very simple representation. CSPs are defined using set of variables and a set of
constraints on those variables. The variables have some allowed values from specified
domain.
For example – Graph coloring problem
52. List out the classification of CSP with respect to constraints.
 Variables - a finite number.
 Domain - finite or infinite domain.
 Constraints - Restricting what values variables can simultaneously take.
Example: 8 - Queens„s problem Variables: The eight queens„ positions.
Domain: The Chessboard squares. Constraints: No queen attacks the other.
Goal: To find an ―Assignment‖ of Variables satisfying all the constraints.
53. Write the importance of Optimal Solution
The term optimal solution refers to the best solution for a company to solve a
problem or achieve its aims. The term is common in business. However, we can also

Page 10 of 12
use it in economics, for military options, mathematics, and in other situations. It is an
alternative approach that provides the best outcome for a situation.

PART – B
1. Discuss any 2 uninformed search methods with examples
2. Explain following uninformed search strategies. 1) IDDFS 2) Bidirectional search
3. Describe a state space in which iterative deepening search performs much worse than
depth-first search
4. Prove that the breadth first search is a special case of uniform cost search.
5. What are the five uninformed search strategies? Explain any two in detail with
example.
6. Explain the components of problem definition with an example.
7. Briefly explain the search strategies in uninformed search.
8. What is depth limited search? Give the recursive implementation of depth limited
search.
9. Discuss recursive best first search algorithm
10. Analyze the uniformed search algorithms with respect to different criteria. Explain
heuristics for constraint satisfaction problems.
11. Suppose we want to use the A* algorithm on the graph below to find the shortest path
from node S to node G. Each node is labelled by the name of the node represented in
capital letter and the value of a heuristic function. Each edge is labelled by the cost to
traverse that edge. (ESE – 2023)

For this problem,


a) Perform the A* algorithm on this graph
b) Show the path found by the A* algorithm on the graph above
c) Write down A* search properties
12. Perform BFS and DFS for the given tree below where start node – A and Goal Node –
1. Also perform BFS and DFS after a node K is added and two edges F to K and D to K
are added to the given graph. For this modified search assume the F is the Goal state.
(ESE – 2023)

Page 11 of 12
Reference Books :
1) Stuart J.Russel Peter Norvig, Artificial Intelligence A Modern Approach, Fourth
Edition, Pearson Education,2020

Page 12 of 12

You might also like