Ai (Module 2&3)
Ai (Module 2&3)
1. Consider a game tree with a branching factor of 3 and a depth of 4 levels. Apply the alpha-
beta pruning algorithm to this tree. At level 3, one branch has been evaluated with the
following values for the nodes:
Node A: 5 (Maximizer) Node B: 3 (Minimizer) Node C: 7 (Maximizer)
Given that the current alpha value for the parent node is 4 and the current beta value is 6,
determine whether any further evaluation is needed for the remaining branches at level 3
using alpha-beta pruning. Provide reasoning for your answer.
2. Let p be the statement "The sun is shining" and q be the statement "It's a clear day."
Suppose the truth values for p and q are as follows: p = 1 (True) q = 0 (False)
Given the logical expression: (p ∧ ¬q) ∨ (¬p ∧ q), evaluate the truth value of the expression
based on the truth values of p and q provided above.
3. Solve the following crypt arithmetic problem (any one):
WINTER + SUMMER = AUTUMN, EVER + SINCE = DARWIN
4. Verify the following theorem by Wang’s algorithm.
p→ (q→ r) ⇔ (p ∧ q) → r
5. Let's consider the following premises:
1. P→(Q∧R)
2. Q→S
3. R→T
Based on these premises, determine whether the following conclusion is valid:
P→ (S∧T)
Using the inference rules of propositional logic, show whether the conclusion can be
validly inferred from the given premises. Assign a value of 1 for "valid inference" and 0
for "invalid inference."
6. Consider a company with five different tasks (A, B, C, D, E) that need to be scheduled on a
single machine. The duration of each task and their dependencies are as follows:
I. Task A takes 3 hours to complete and can start at any time.
II. Task B takes 5 hours to complete and must start after Tas k A finishes.
III. Task C takes 4 hours to complete and must start after Task A finishes.
IV. Task D takes 6 hours to complete and must start after both Task B and Task C finish.
V. Task E takes 2 hours to complete and must start after Task D finishes.
Find the earliest possible time each task can start to satisfy all dependencies and
complete the entire job as soon as possible.
7. Apply backtracking in the context of 4 Queens Problem.
8. We have a pile of 5 stones and Alice and Bob are playing. Alice plays the first and Bob plays
the second in an alternate fashion such that Alice removes odd number of stones and Bob
removes even number of stones. Whoever makes the pile empty will win. Construct the
Game-Tree for the above
9. Premise: If it's raining (R), then John (J) carries an umbrella (U). Conclusion: John is
carrying an umbrella (U)
Given the premise: R -> JU (If it's raining, then John carries an umbrella), and the conclusion
that needs to be determined (JU), assign truth values (T/F) to R and J and evaluate whether
the conclusion holds true based on the premise.
Suppose R is true (It's raining) and J is true (John is carrying an umbrella). Does the
conclusion logically follow based on the premise? Assign truth values and determine the
validity of the conclusion JU
10. Verify that the proposition p ∨¬ (p ∧q) is a tautology.
11. Let us consider the premises: “Ram works hard”. “If Ram works hard then he is a dull boy”.
“If Ram is a dull boy, then he will not get the job”. Now make a conclusion that “Ram will not
get the job”.
12. To reduce the time and cost alpha-beta pruning method is used- justify the statements
13. Verify that the proposition p ∨¬ (p ∧q) is a tautology.
14. “The most-constrained variable heuristic provides a way to select the next variable to assign
in a backtracking search for solving a CSP” – Justify the statement.
15. “Modus ponens is also a special case of resolution statement for propositions.” Justify with
suitable example
16. Consider the following classroom scheduling problem: There are four classes, C1, C2, C3, C4,
and three class rooms, R1, R2, and R3. The following table shows the class schedule:
1. “First Order Logic(FOL) is more sophisticated and far better than propositional logic.”-
Justify the statement with relevant example
2. Convert each of the statements in FOL notation.
“Someone is liked by everyone”.
“Some boys in the class are taller than all the girls”.
“Nobody likes everyone”.
“Some prime number is even number”
3. Consider the following statements and derive the conclusion by resolution.
(i) Every child love anyone who gives the child any present.
(ii) Every child will be given some present by Santa if Santa can travel on Christmas eve.
(iii) It is foggy on Christmas eve.
(iv) Anytime it is foggy, anyone can travel if he has some source of light.
(v) Any reindeer with a red nose is a source of light.
(Conclusion) If Santa has some reindeer with a red nose, then every child loves
Santa.
4. Explain the terms forward chaining and backward chaining in Rule based system with
relevant example.
5. Convert each of the statements in FOL notation.
“Someone is liked by everyone”.
“Some boys in the class are taller than all the girls”.
“Nobody likes everyone”.
“Some prime number is even number”
6. Consider the following axioms and derive the conclusion by resolution refutation:
I. Every child loves every candy.
II. Anyone who loves some candy is not a nutrition fanatic.
III. Anyone who eats any pumpkin is a nutrition fanatic
IV. Anyone who buys any pumpkin either carves it or eats it.
V. John buys a pumpkin
VI. Lifesavers is a candy.
VII. (Conclusion) If John is a child, then John carves some pumpkin.
7. How does predicate resolution refutation enhance the efficiency and completeness of
automated theorem proving in comparison to other logical reasoning methods?
8. If F(x, y, t) represents that “Person x can fool person y at time t”. Then write the FOL
formula for the following statement.
“None can fool everyone all the time”.
9. Consider a knowledge base represented by the following Horn clauses:
I. If it is raining, then the streets will be wet: rain→wet.
II. If the streets are wet, then driving is difficult: wet→difficult.
III. If it is not raining, then the streets are dry: ¬rain→dry.
Given the following facts:
The streets are dry: dry
Can you infer whether driving is difficult or not based on these clauses and facts?
10. “Implication is good for all (∀) quantifier. It is not so good interpretation for there exists (∃)
Quantifier.” Prove with a relevant example.
11. Describe Horn Clause. By the Inference mechanism in Horn Clauses Prove that {A} is true
for the given clauses :{ C}, {D}, {B, ¬D}, {A, ¬B, ¬C}.
12. Name the different ways of representing knowledge in AI. Represent the following
information using a semantic network.
Animals can be divided into various categories such as mammals and birds. Mammals have
hair. They give milk too. Birds can fly and lay eggs. Animals, who eat meat, are known as
carnivore. These carnivore animals have pointed teeth, claws and forward eyes. Mammals
who have hoofs or chew cud are known as ungulate. Cheetah is a mammal as well as a
carnivore. It has tawny colour and dark spots. Giraffe is an ungulate. It has a long neck, long
legs and dark spots. Zebra is also an ungulate with black stripes. Although a penguin is a
bird, it cannot fly, but it can swim. It is coloured black and white.
13. Consider the following five statements:
(1) John likes all kind of food.
(2) Apple and vegetables are food
(3) Anything anyone eats and not killed is food.
(4) Anil eats peanuts and still alive.
(5) Harry eats everything that Anil eats.
Now prove by resolution that: “John likes peanuts”.
14. Explain the terms forward chaining and backward chaining in Rule based system with
relevant example.
15. You are given two jugs having capacity of 8 gallon and 6 gallon. Neither has any measuring
marker on it. You may fill the jugs with water. How can you get exactly 4 gallons of water
into the 8- gallon jug? Write down the production rule and solve by forward chaining
strategy.
16. Explain the Unification rule in FOL.
Describe the step by step methods for proving a conclusion by Resolution.
The following statements are given:
1. The cat likes fish.
2. Cat eats everything they like
3. Nanny is a Cat.
Prove by Resolution that “Nanny eats fish”.