πŸ“š AI Mid-Sem Exam Prep β€” With Diagrams
Questions + Answers + Figures  |  Unit 3 & Unit 4  |  5 Marks Each
⭐ Tap any question to see full answer + diagram ✏️
Tap "Show Answer" on any Q!
⭐⭐ = Most Important 🀞
Diagrams = extra marks! 🎯
🧠
Unit 3
Game Playing Β· Expert Systems Β· NLP Β· Knowledge
✏️ Alpha-Beta Pruning · Expert System · FOL · Resolution · NLP Steps
Q1.
Explain Alpha-Beta Pruning with a game tree example. What is the significance of Ξ± and Ξ² values?
(5 marks)⭐⭐
✍️ Answer:

Alpha-Beta Pruning is an optimization of the Minimax algorithm that prunes branches which cannot affect the final decision, reducing computation from O(b^d) to O(b^(d/2)).

Ξ± (Alpha) = best value MAX can guarantee (initialized to βˆ’βˆž)
β (Beta) = best value MIN can guarantee (initialized to +∞)

Pruning conditions: At MIN node: prune if value ≀ Ξ±  |  At MAX node: prune if value β‰₯ Ξ²

MAX A MIN B MIN C MAX D MAX E MAX F PRUNED βœ‚οΈ G 3 5 6 9 1 2 Ξ±=3,Ξ²=+∞ Ξ±=-∞,Ξ²=3 Ξ±=3,Ξ²=+∞ βœ‚οΈ β≀α cut! MAX node MIN node Leaf
Fig 1: Alpha-Beta Pruning β€” pruned branch shown with dashed lines βœ‚οΈ

Result: Optimal value at root A = 3 (MIN of MAX(3,5)=5 and MAX(6,9)=9... wait: B=min(3,5)=3, C sees F=min(1,2)=1 but Ξ±=3 so C≀3 β†’ G pruned. Final answer = 3

Q2.
Describe the main parts of an Expert System and show how they interact. Draw the architecture diagram.
(5 marks)⭐⭐
✍️ Answer:

An Expert System is AI software that uses knowledge stored in a knowledge base to solve problems that would normally require a human expert.

πŸ‘€ Non-Expert User πŸ‘¨β€πŸ’Ό Domain Expert User Interface Input / Output Inference Engine Forward / Backward Knowledge Base Facts + IF-THEN Rules Development Engine Build / Update System Knowledge Engineering Query Advice Knowledge
Fig 2: Expert System Architecture β€” showing all 4 major components and interactions
  • User Interface: 2 parts β€” Input (natural language) & Output (advice/solution)
  • Knowledge Base: Facts + IF-THEN rules. Built by Knowledge Engineer.
  • Inference Engine: Brain of system. Uses Forward/Backward chaining to derive conclusions.
  • Development Engine: Builds the system via programming language or Expert System Shell.
Q3.
Explain Forward Chaining and Backward Chaining with examples. Give at least 5 differences.
(5 marks)⭐⭐
✍️ Answer:
Forward Chaining (Data-Driven) Known Facts Apply IF-THEN Rules Conclusion/Goal Facts β†’ Rules β†’ Goal βœ“ Backward Chaining (Goal-Driven) Goal (Hypothesis) Seek Supporting Facts Prove / Disprove Goal β†’ Rules β†’ Facts βœ“
Fig 3: Forward Chaining (data→goal) vs Backward Chaining (goal→data)
Forward ChainingBackward Chaining
Data-drivenGoal-driven
Bottom-up reasoningTop-down reasoning
Good for planning, designGood for diagnosis
Exhaustive / wider searchMore focused search
More output hypothesesMust query for data
Manages sub-goals manuallyAuto-manages sub-goals
Q4.
What is Resolution in FOL? Solve: Mohen likes easy courses, Science courses are hard, Humanities are easy, HS-301 is Humanities. What course does Mohen like?
(5 marks)⭐⭐
✍️ Answer:

Resolution is a rule of inference in FOL that proves theorems by combining clauses with complementary literals to derive new clauses until an empty clause (NIL) is reached.

Resolution Proof Tree (i) Β¬easy(x) ∨ likes(Mohen,x) Mohen likes easy courses (ii) Β¬science(x) ∨ Β¬easy(x) Science courses are hard (iii) Β¬hum(x) ∨ easy(x) Humanities are easy (iv) hum(HS-301) HS-301 is Humanities To Prove: likes(Mohen, x) easy(HS-301) ← resolvent Resolve (iii)+(iv): x=HS-301 likes(Mohen, HS-301) βœ“ Resolve (i)+easy(HS-301) NIL (Empty Clause)
Fig 4: Resolution Proof β€” Mohen likes HS-301 (Humanities course) βœ“
Q5.
Explain the Unification Algorithm. Find substitution for C1={Β¬P(z1,a), Β¬P(x,z1)}, C2={P(z2,F(z2)), P(z2,a)}, C3={P(F(z3),z3), P(z3,a)}
(5 marks)⭐
✍️ Answer:

Unification finds a substitution Οƒ that makes two logical expressions identical.

Unification Algorithm Flowchart E={t1=t2}, S={} E β‰  {} ? select x=y from E Return S βœ“ No (E={}) Yes x is variable? y β‰  x Replace x with y in E,S S ← {x/y} βˆͺ S Yes Return βŠ₯ No
Fig 5: Unification Algorithm Flowchart

Solution for given clauses: Substitute a for z1, a for x, a for z2, a for z3:

C1 = {Β¬P(a,a), Β¬P(a,a)}  |  C2 = {P(a,F(a)), P(a,a)}  |  C3 = {P(F(a),a), P(a,a)}
Set of substitution = {a/z1, a/x, a/z2, a/z3}

Q6.
What is NLP? Explain tasks for Natural Language Understanding (NLU). Give its applications.
(5 marks)⭐⭐
✍️ Answer:

NLP = method of communicating with intelligent systems using natural human language.

NLP Components & Information Flow NLU (Understanding) Words (Input) Parsing / Lexical Syntactic Structure β†’ Final Meaning Process NLG (Generation) Words (Response) Text / Sentence Plan Meaning of Response
Fig 6: NLP β€” NLU (Understanding) and NLG (Generation) flow

Types of Ambiguity: Lexical (word-level: "board"=noun/verb?), Syntactic (sentence structure), Referential (pronoun reference)

Applications: Data analysis, Reputation monitoring, Customer service, Automated trading, Market intelligence.

Q7.
Write a short note on Statistical Reasoning and Neural Networks (ANNs) in AI.
(5 marks)⭐
✍️ Answer:

Statistical Reasoning: Uses Bayesian statistics β€” P(H|E) = P(E|H)Γ—P(H) / P(E). Stresses conditional probability. Limitations: acquiring all probabilities is too large a task.

Artificial Neural Network (ANN) Structure Input Layer x₁ xβ‚‚ x₃ Hidden Layer 1 h₁ hβ‚‚ h₃ Hidden Layer 2 hβ‚„ hβ‚… Output Layer Ε· weights w Inputs Process Output
Fig 7: Artificial Neural Network β€” Input, Hidden, and Output layers with weighted connections

ANN Advantages: Adaptive learning, Self-organization, Real-time parallel operation, Fault tolerance via redundancy.
Disadvantage: Unpredictable; examples must be carefully selected.

Q8.
Convert to FOL and prove by resolution: Mary buys carrots, dog chases rabbit, John owns a dog. Conclusion: Mary will not date John.
(5 marks)⭐⭐
✍️ Answer:
Chain of Reasoning β€” Resolution Proof Mary buys carrots [Buy(Mary)] Mary owns a rabbit [owns(Mary,r)] John owns a dog Dog chases rabbit John's dog chases a rabbit Mary hates John's dog [hates(Mary,dog)] Β¬Date(Mary, John) βœ“ PROVED
Fig 8: Resolution chain β€” Mary will not date John
Q9.
What is MYCIN? Explain it as an expert system. What are the advantages and limitations of expert systems?
(5 marks)⭐
✍️ Answer:

MYCIN (1974) β€” one of the earliest expert systems, based on Backward Chaining. It identified bacteria causing severe infections and recommended drugs based on patient weight. It outperformed medical students in diagnosis.

Famous Expert Systems MYCIN Bacterial Infections DENDRAL Chemical Analysis RI/XCON Computer Systems PXDES Lung Cancer Cadet Early Cancer DXplain Disease Diagnosis βœ… Advantages Low cost Β· Fast response Β· Low error rate Explains reasoning Β· Permanent knowledge ❌ Limitations No emotions Β· Domain specific No common sense Β· Manual updates
Fig 9: Famous Expert Systems and their Advantages vs Limitations
Q10.
Explain the five steps of NLP: Lexical Analysis, Syntactic Analysis, Semantic Analysis, Discourse Integration, and Pragmatic Analysis.
(5 marks)⭐⭐
✍️ Answer:
5 Steps of NLP Processing Pipeline 1. Lexical Analysis Identify words, phrases. Divide text into tokens. "school" β†’ noun 2. Syntactic Analysis (Parsing) Grammar rules. Rejects "The school goes to boy". Subject-Verb order 3. Semantic Analysis Dictionary meaning. Rejects "hot ice-cream". Meaning mapping 4. Discourse Integration Meaning from context of prev/next sentence. Context linking 5. Pragmatic Analysis Real-world interpretation. Actual intent of speech. World knowledge Words/Tokens Parse Tree Logical Form Discourse Rep. Final Meaning
Fig 10: NLP 5-Step Processing Pipeline
πŸ’‘ Unit 3 Tip: Always draw the tree for Alpha-Beta with Ξ± & Ξ² at each node. Expert System: 4 components = must memorize. Resolution: convert to clausal form first. NLP 5 steps = pipeline in order β€” easy marks!
🌳
Unit 4
Learning Β· Decision Trees Β· Applications of AI
✏️ Inductive/Deductive · EBL · Decision Tree · CLT · PEAS · Applications
Q1.
Explain Inductive Learning. How is it different from Deductive Learning? Give comparison table with examples.
(5 marks)⭐⭐
✍️ Answer:
Inductive vs Deductive Learning πŸ“ˆ Inductive Learning Mango Banana Cherry sweet sweet sweet Fruits β†’ sweet (General Rule) Specific β†’ General πŸ“‰ Deductive Learning General Rule: Fruits are sweet Apple is a fruit ∴ Apple is sweet βœ“ General β†’ Specific
Fig 11: Inductive (Specific→General) vs Deductive (General→Specific)
InductiveDeductive
Specific β†’ GeneralGeneral β†’ Specific
Discovery learningRule-based learning
Conclusion may be falseConclusion always true if premises true
E.g.: All teachers are studiousE.g.: Shalini (65yr) is a grandmother
Q2.
What is a Decision Tree? Explain its components with a diagram. Describe Splitting and Pruning.
(5 marks)⭐⭐
✍️ Answer:

A Decision Tree is a flowchart-like tree structure used for classification and regression in supervised learning.

Decision Tree: "Is a Person Fit?" ROOT NODE Age < 30? Yes No DECISION NODE Eat lot of pizzas? DECISION NODE Exercises morning? Yes No Yes No UNFIT FIT FIT UNFIT TERMINAL TERMINAL TERMINAL TERMINAL Root Node Decision Node Terminal (Leaf)
Fig 12: Decision Tree β€” "Is a Person Fit?" with Root, Decision and Terminal nodes

Splitting: Partitioning dataset into subsets on a variable (e.g., split on Gender or Class).
Pruning: Reduce tree by turning branch nodes into leaf nodes. Avoids overfitting. Key factors: Entropy & Information Gain.

Q3.
What is Explanation Based Learning (EBL)? How does it differ from inductive learning? Give an example.
(5 marks)⭐⭐
✍️ Answer:

EBL uses a strong/flawless domain theory to generalise from training data. It can learn from just ONE training example.

Explanation Based Learning (EBL) Process Domain Theory (e.g., Rules of Chess) βœ“ Complete knowledge Training Example (Single instance) 1 example enough! EBL Explanation + Generalisation Generalised Rule (Applied to new situations) Best move in chess βœ“ EBL: 1 example + domain theory β†’ generalize Inductive: many examples β†’ discover pattern
Fig 13: EBL β€” Domain Theory + Training Example β†’ Generalised Rule
Q4.
Give applications of AI in different fields β€” Game Playing, Speech Recognition, Computer Vision, Medical Sciences, Expert Systems.
(5 marks)⭐⭐
✍️ Answer:
Applications of AI β€” Mind Map AI β™ŸοΈ Game Playing Chess, Deep Blue, 200M pos/sec πŸ₯ Medical MRI, X-Ray, Clinical support 🎀 Speech Recognition Airlines flight info, Siri, Alexa πŸ‘οΈ Computer Vision CT scans, face recognition, 3D πŸ€– Expert Systems MYCIN, DENDRAL, PXDES πŸ’¬ NLP β€” Natural Language
Fig 14: Applications of AI β€” Mind Map across 6 fields
Q5.
Explain Computational Learning Theory. What are its goals and main methods?
(5 marks)⭐
✍️ Answer:

CLT is a subfield of AI dealing with design and analysis of ML algorithms. Goal: understand computational properties of algorithms β€” ability to learn from data and generalise.

4 Main Methods of Computational Learning Theory Inductive Learning Training examples β†’ General rule Predict new o/p πŸ“Š Deductive Learning Given rules/model β†’ Output for new inputs πŸ“ Abductive Learning Given training data β†’ Generate best hypothesis πŸ” Reinforcement Learning Reward & punish β†’ Maximize reward, min. punish πŸ†
Fig 15: 4 Main Methods of Computational Learning Theory
Q6.
What is PEAS in AI? Define each component. Name the 5 types of environments.
(5 marks)⭐
✍️ Answer:
PEAS Framework β€” AI Agent AGENT P Performance Measures success E Environment Surrounding space A Actuator Delivers action/output S Sensor Takes in input
Fig 16: PEAS Framework β€” Performance, Environment, Actuator, Sensor

5 Types of Environments: Fully/Partially Observable Β· Episodic/Sequential Β· Static/Dynamic Β· Discrete/Continuous Β· Deterministic/Stochastic

Q7.
Explain how Decision Tree uses Entropy and Information Gain for Splitting. Describe with example.
(5 marks)⭐⭐
✍️ Answer:

Entropy H(S) = impurity/disorder in dataset = βˆ’Ξ£ p(i)Β·logβ‚‚(p(i))
Information Gain IG(S,A) = H(S) βˆ’ Ξ£(|Sv|/|S|)Β·H(Sv)
Best split = feature with highest Information Gain

Splitting: Students=30, Play Cricket=15 (50%) Total Students = 30 Play Cricket = 15 (50%) Split: Gender Split: Class πŸ‘© Female Students=10 Cricket=2 (20%) πŸ‘¨ Male Students=20 Cricket=13 (65%) πŸ“š Class IX Students=14 Cricket=6 (43%) πŸ“š Class X Students=16 Cricket=9 (56%) IG(Gender) = 0.12 bits IG(Class) = 0.02 bits β†’ Split on Gender (higher IG) βœ“
Fig 17: Splitting on Gender vs Class β€” choose higher Information Gain
Q8.
Describe the applications of AI in Medical Sciences and Environmental Science.
(5 marks)⭐
✍️ Answer:
AI in Medical & Environmental Sciences πŸ₯ Medical Sciences β€’ ML models search medical data β€’ Clinical decision support tools β€’ CT scans, X-Rays, MRI analysis β€’ AI virtual assistants for patients β€’ Customized real-time recommendations β€’ Support ongoing clinical research πŸ©ΊπŸ”¬ 🌍 Environmental Science β€’ Satellites detect phytoplankton in ocean β€’ ANN & SVM classify phytoplankton β€’ Remote sensing for land cover β€’ Identify vegetation types/dead trees β€’ Aerosol concentration tracking β€’ Climate pattern prediction πŸ›°οΈπŸŒΏ
Fig 18: AI applications in Medical Sciences vs Environmental Science
Q9.
What are the characteristics of an Expert System? List advantages, disadvantages and limitations.
(5 marks)⭐
✍️ Answer:
Expert System β€” Characteristics, Advantages & Disadvantages Characteristics β€’ Permanent (humans perishable) β€’ Distributes human expertise β€’ Contains multi-expert knowledge β€’ Shares knowledge easily β€’ Available 24/7 β€’ Consistent responses βœ… Advantages β€’ Low accessibility cost β€’ Fast response time β€’ Low error rate β€’ Explains how it reached solution β€’ Works in hazardous environments β€’ Multi-expert knowledge ❌ Disadvantages β€’ No emotions / common sense β€’ Domain-specific only β€’ Needs manual updates β€’ No human-like decision making β€’ Cannot produce result from less knowledge β€’ Requires excess training data
Fig 19: Expert System β€” Characteristics, Advantages, Disadvantages at a glance
Q10.
Explain the challenges faced by Computational Learning Theory β€” Lack of Data, Overfitting, and Computational Complexity.
(5 marks)⭐
✍️ Answer:
3 Key Challenges of Computational Learning Theory πŸ—‚οΈ 1. Lack of Data β€’ AI needs data to learn β€’ Sometimes not enough data β€’ Poor quality data also fails β€’ Solution: Data augmentation, web scraping, data collection Fix: Better data collection πŸ“ˆ 2. Overfitting β€’ Model learns too much from training data β€’ Cannot generalise to new data β€’ Poor performance on new tasks β€’ Like memorising, not learning Fix: Pruning, Cross-validation βš™οΈ 3. Comp. Complexity β€’ Some tasks too complex for current AI hardware β€’ Large resources needed β€’ Slow training times β€’ Hard to scale algorithms Fix: GPUs, TPUs, Cloud
Fig 20: 3 Challenges of CLT β€” with causes and solutions
πŸ’‘ Unit 4 Tip: For Decision Tree, draw the tree + show Splitting table. For EBL: "1 example + domain theory". For CLT challenges: explain cause + solution for each. Always draw diagrams β€” they get you extra marks!