Ai QB Ans (GKJ)
Ai QB Ans (GKJ)
Short Questions:
1. What is AI?
General AI
Super AI
Based on Functionality:
Reactive Machines
Limited Memory
Theory of Mind
Self-Aware AI
Weak AI: Specialized to perform specific tasks (e.g., Siri, image recognition).
Strong AI: Hypothetical AI capable of performing any intellectual task like humans,
with self-awareness and consciousness.
AI QB ANS 1
Entities that perceive the environment through sensors and act upon it using
effectors.
6. What is rationality?
An agent that maximizes its performance based on percept sequence and prior
knowledge of the environment.
8. What is an environment?
Breadth-first search
Uniform-cost search
Depth-first search
Bidirectional search
Informed Search: Uses heuristics to guide the search process more efficiently.
A search algorithm that expands nodes based on the lowest cumulative cost, ensuring
an optimal path.
A function estimating the cost from the current state to the goal, guiding informed
searches.
AI QB ANS 2
Greedy approach without backtracking.
Local Maximum: A peak better than surrounding states but not the highest.
Agent Program: The implementation defining how an agent acts based on percepts.
17. What do you mean by local maxima with respect to search technique?
Local maxima refer to a state in the search space that is better than neighboring states
but is not the optimal solution (global maxima). Hill climbing can get stuck at local
maxima.
Astronomy, Healthcare, Gaming, Finance, Data Security, Social Media, Travel &
Transport, Automotive Industry, Robotics, Entertainment, Agriculture, E-commerce, and
Education.
Completeness Guaranteed for finite spaces Guaranteed only for finite spaces
A multiple-connected graph has multiple paths connecting the same pair of nodes.
Example: In a road network, multiple routes connect two cities.
AI QB ANS 3
Classical Planning, Conditional Planning, Contingent Planning, and Hierarchical Task
Network (HTN) Planning.
A systematic process for deriving logical conclusions from a knowledge base using
rules and facts.
A pruning technique that avoids exploring nodes unlikely to improve the current
decision, saving time in algorithms like alpha-beta pruning.
Heuristics guide search algorithms by estimating how close a state is to the goal,
reducing search space and improving efficiency.
29. What do you mean by local maxima with respect to search technique?
30. What are the differences and similarities between Problem Solving and Planning?
Differences:
Similarities:
AI QB ANS 4
31. ‘Minimax is not good for game playing when the opponent is not playing optimally.’
Justify using suitable example.
If the opponent makes random moves, minimax may overestimate the adversary's skill
and compute unnecessary scenarios, wasting computational resources.
Used when conclusions drawn may need to be retracted as new information becomes
available, suitable for dynamic and uncertain environments.
A planning language for specifying an initial state, goal state, and a set of actions with
preconditions and effects.
Descriptive Questions:
1. Advantages and Disadvantages of AI
Advantages:
High Accuracy: AI systems, like medical diagnostic tools, make fewer errors than
humans by using data-driven decision-making.
High Speed and Efficiency: AI processes vast amounts of data and performs complex
calculations faster than humans, such as in financial trading.
AI QB ANS 5
Digital Assistance: Virtual assistants like Siri and Alexa help in daily tasks, providing
information and managing schedules.
Disadvantages:
Lack of Creativity: AI can only work within predefined constraints and lacks human
imagination.
Ethical Concerns: AI raises issues like job displacement and potential misuse in
surveillance or warfare.
Social Media: Platforms like Facebook and Twitter use AI to organize user data, detect
trends, and personalize content recommendations.
Operates using predefined condition-action rules, e.g., turning on a light when it's
dark.
Goal-Based Agents:
AI QB ANS 6
Ideal for dynamic or complex environments where achieving a specific goal is
crucial, like navigation systems.
Discrete vs. Continuous: A discrete environment, like a chessboard, has distinct states,
while continuous environments, like a driving scenario, involve infinite possibilities.
Uninformed Search:
Operates without additional knowledge, relying only on the problem definition (e.g.,
Breadth-First Search (BFS), Depth-First Search (DFS), Uniform-cost Search).
Informed Search:
Local Search:
Focuses on optimizing the solution in a limited area, using techniques like Hill
Climbing or Simulated Annealing.
6. Describe DFS and BFS Algorithms with Their Advantages and Disadvantages
Advantages:
AI QB ANS 7
Disadvantages:
Advantages:
Disadvantages:
Uniform-Cost Search:
A search algorithm that expands nodes based on the lowest cumulative cost.
Advantages:
Disadvantages:
Greedy Search:
Expands the node that seems closest to the goal using a heuristic \(h(n)\).
Example: In route finding, it picks the city closest to the destination based on
straight-line distance.
Advantages:
AI QB ANS 8
Faster than uninformed searches.
Disadvantages:
A Search:
Example:
In a graph where nodes represent cities, A* uses road distance (\(g(n)\)) and straight-line
distance (\(h(n)\)) to plan the shortest route.
Advantages:
Disadvantages:
Hill Climbing:
A local search algorithm that moves toward better states by evaluating neighbors.
Example:
In the Traveling Salesman Problem, it improves the path by swapping cities to reduce travel
distance.
Advantages:
Disadvantages:
AI QB ANS 9
11. Describe Means-End Analysis Algorithm with Examples
Means-End Analysis:
A problem-solving strategy that reduces the difference between the current state
and goal state.
Involves breaking the problem into smaller sub-problems (sub-goals) and solving
each sequentially.
Steps:
Example:
Goal: Bake a cake.
Solution: Reduce differences (e.g., mix ingredients) step by step until the cake is ready.
CSP:
Solutions are found by assigning values to variables that meet all constraints.
Example:
Sudoku Puzzle:
Constraints: Each row, column, and sub-grid must contain numbers 1-9 without
repetition.
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.
Disadvantages of Steepest Hill Climbing Search Procedure
AI QB ANS 10
1. Local Maxima Problem: The algorithm can get stuck at a local maximum, which is a
peak higher than its neighbors but not the global maximum.
2. Plateau Problem: The algorithm can get stuck on a plateau, where all neighboring
states have the same value, preventing further progress.
3. Ridge Problem: The algorithm can get stuck on a ridge, where progress requires
multiple simultaneous changes to variables.
A: 10
B: 8
C: 6
D: 5
E: 7
F: 3
G: 2
14. Briefly explain about semantic network with its advantages and disadvantages.
Construct a
AI QB ANS 11
semantic net representation for the following. -Ram gives Lucy a gift -Every dog has
bitten a
mail carrier.
Drawbacks in Semantic representation:
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 semantic
network.
3. These types of representations are inadequate as they do not have any equivalent
quantifier, 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.
15. Using a suitable example, illustrate the steps of A* search. Why is A* search better
than Best First Search?
A* Search Algorithm (Brief Steps):
1. Initialize: Start with the start node (S) and set f(n) = g(n) + h(n) , where:
2. Expand nodes: Choose the node with the lowest f(n) value, and expand it to its
neighbors.
3. Update costs: For each neighbor, calculate f(n) = g(n) + h(n) and add it to the open list.
AI QB ANS 12
Example:
Start: (1, 1) , Goal: (4, 4)
Heuristic: Manhattan distance. Expand nodes based on the lowest f(n) until the goal is
found.
1. Optimality: A* guarantees the shortest path if the heuristic is admissible, while Best-
First Search may miss optimal paths.
2. Efficiency: A* considers both path cost ( g(n) ) and heuristic ( h(n) ), while Best-First
Search only considers the heuristic.
3. Example: A* accounts for detours, while Best-First Search might overlook them, leading
to suboptimal paths.
16. Describe the Minimax algorithm for searching game tree. Explain the effect of the
addition of alpha-beta cutoffs to this search algorithm.
Minimax Algorithm (Pointwise)
2. Game Tree: Constructs a tree where each node represents a game state.
3. Player Roles:
5. Minimax Procedure:
MAX Nodes: Select the move that leads to the child node with the highest value.
MIN Nodes: Select the move that leads to the child node with the lowest value.
7. Optimal Move: The best move for MAX is the one leading to the child node with the
highest value at the root node.
Alpha-Beta Pruning
AI QB ANS 13
1. Purpose: Optimization technique for Minimax to reduce search space and improve
efficiency.
2. Alpha Value: The best (highest) value found so far along MAX's search path.
3. Beta Value: The best (lowest) value found so far along MIN's search path.
4. Pruning Conditions:
Alpha Cutoff: If a MIN node's value is ≤ alpha, prune the subtree (as MIN will never
choose it).
Beta Cutoff: If a MAX node's value is ≥ beta, prune the subtree (as MAX will never
choose it).
5. Effect:
Reduced Search Space: Eliminates branches that cannot influence the final
decision.
Deeper Search: With fewer nodes, the algorithm can explore deeper levels for more
accurate decisions.
NLP:
Natural Language Processing (NLP) is a field of artificial intelligence that focuses on the
interaction between computers and human language. It enables machines to
understand, interpret, and generate human language in a meaningful way. NLP uses
techniques from computational linguistics, machine learning, and deep learning to
analyze and process text or voice data.
Key applications of NLP:
AI QB ANS 14
Chatbots and virtual assistants: Creating conversational agents that can interact
with humans.
1. Knowledge Base:
Includes:
2. Inference Engine:
Uses reasoning techniques (like forward chaining or backward chaining) to apply the
knowledge base to solve problems or make decisions.
3. Explanation System:
5. User Interface:
AI QB ANS 15
Can be customized with domain-specific knowledge.
7. User:
19. What are the different types of grammar used in Natural Language Processing?
Explain each
with examples.
1. Context-Free Grammar (CFG):
Purpose: Defines sentence structure using rules that form hierarchical structures
(parse trees).
Example:
"The cat chases the dog" → Noun Phrase ("The cat") + Verb Phrase ("chases the
dog")
2. Dependency Grammar:
Example:
AI QB ANS 16
"John eats an apple"
3. Transformational Grammar:
Example:
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?”
AI QB ANS 17
1. ¬Likes(Ram, X) ∨ Easy(X)
2. ¬Engg(X) ∨ Hard(X)
3. ¬Arts(X) ∨ Easy(X)
4. Arts(AR04)
Applying Resolution:
Since we've derived the same clause twice, we've reached a contradiction. This means our
assumption that ¬Likes(Ram, AR04) is false.
Therefore, we can conclude that Likes(Ram, AR04) is true.
Conclusion:
Ram would like AR04 because it's an easy course, as all Arts courses are easy.
21. Explain Forward and Backward Reasoning with the help of examples.
Starts with known facts and applies inference rules to derive new facts.
Example:
Known facts:
It's raining.
Inference rule:
If X, then Y.
Forward chaining:
Since it's raining (known fact), and "If it's raining, the streets are wet" (inference
rule), we can infer that the streets are wet.
AI QB ANS 18
Starts with a goal and works backward, identifying the conditions that must be true for
the goal to be achieved.
Continues until a set of initial conditions is reached that can be directly verified.
Example:
Backward chaining:
To prove guilt, we need to prove that the suspect committed the crime.
To prove the crime, we need to prove that the suspect had motive, opportunity, and
means.
Knowledge Engineering: Experts are interviewed and their knowledge is elicited and
formalized.
Machine Learning: Algorithms are used to extract knowledge from data, such as text,
images, or sensor readings.
User Interface: Allows users to interact with the system, providing input and receiving
output.
Explanation Facility: Can explain the reasoning process and the conclusions reached.
24. What are the different types of learning? Explain with suitable example.
Supervised Learning: The system is trained on labeled data, where the correct output
is provided for each input.
AI QB ANS 19
Example: Training a model to classify emails as spam or not spam, using a dataset
of labeled emails.
Unsupervised Learning: The system learns patterns from unlabeled data without
explicit guidance.
Reinforcement Learning: The system learns through trial and error, receiving rewards
or penalties for its actions.
Example: Training a robot to navigate a maze by rewarding it for reaching the goal
and penalizing it for hitting obstacles.
25. How facts are represented using prepositional logic? give an example.
Propositional logic uses propositions (declarative statements) to represent facts.
Propositions can be combined using logical operators like AND, OR, NOT, and IMPLIES to
form complex statements.
Example:
Propositional representation:
∀x (Bird(x) → CanFly(x))
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."
Prove that "Robert is a criminal."
Explain the solution with forward chaining techniques.
1. Initial facts:
American(Robert)
Enemy(CountryA, America)
HasMissiles(CountryA)
2. Rules:
AI QB ANS 20
3. Forward chaining:
Criminal(Robert)
Ans:
a. Everything is bitter or sweet:
∀x (Bitter(x) ∨ Sweet(x))
b. Either everything is bitter or everything is sweet:
( ∀x Bitter(x)) ∨ (∀x Sweet(x))
c. There is somebody who is loved by everyone:
∃x ∀y Loves(y, x)
d. Nobody is loved by no one:
∃ ∃
¬ x ¬ y Loves(y, x)
(which is equivalent to ∀x ∃y Loves(y, x))
e. If someone is noisy, everybody is annoyed:
∃ ∀
x Noisy(x) → y Annoyed(y)
AI QB ANS 21
(which is equivalent to ∃x (Frog(x) ∧ ¬Green(x)))
h. No frog is green:
∃
¬ x (Frog(x) ∧ Green(x))
5. If the goal is not directly achievable, decompose it further into smaller subgoals.
Example:
2. Decompose:
AI QB ANS 22
Goal 1: Boil water.
3. Push Goals onto Stack: [Boil water, Steep tea, Pour into a cup]
5. Decompose further: Boil water → Fill kettle with water, turn on kettle.
6. Complete all subgoals: Once water is boiled, move to steeping tea, then pouring
into a cup.
MONEY
we have to replace each letter by a distinct digit so that the resulting sum is correct.
AI QB ANS 23
Mode: Most frequent word/sentence length.
Measures of Dispersion:
2. Probability Distributions
Normal Distribution: Many linguistic features (e.g., sentence length) follow a normal
distribution.
4. Hypothesis Testing
T-Test & ANOVA: Compare means to identify statistically significant differences (e.g.,
sentiment analysis).
Various models like Logistic Regression, Naive Bayes, SVMs, and Neural Networks
(RNNs, LSTMs, Transformers) are used for tasks such as text classification and
language modeling.
6. Evaluation Metrics
7. Dimensionality Reduction
PCA & t-SNE: Techniques for reducing data dimensions, useful for visualizing high-
dimensional word embeddings and document clusters.
8. Clustering
K-Means & Hierarchical Clustering: Techniques for grouping similar texts, useful in
topic modeling.
9. Bayesian Inference
AI QB ANS 24
LDA (Latent Dirichlet Allocation): A probabilistic model for discovering hidden topics in
a corpus.
Markov Chains & Hidden Markov Models: Used for sequence modeling, useful in tasks
like speech recognition and part-of-speech tagging.
AI QB ANS 25