Untitled Document
Untitled Document
**Definition of AI:**
Artificial Intelligence un techniques aur algorithms ka set hai jinka use machines ko human-like
intelligence perform karne ke liye kiya jata hai. Iska matlab hai ki machines aise tasks kar sakti
hain jo pehle sirf humans kar paate the, jaise ki learning, reasoning, problem-solving, aur
decision-making.
**Stored Knowledge:**
AI systems mein knowledge ko store karna ek critical aspect hai. Knowledge ko aise structure
mein store kiya jata hai jisse uska access aur retrieval efficient ho. Knowledge base systems
jaise databases ya expert systems iska example hain.
**Semantic Nets:**
Semantic nets ek graphical representation hote hain jisme nodes aur edges ka use karke
knowledge ko represent kiya jata hai. Nodes entities ko represent karte hain aur edges unke
beech ke relationships ko. Semantic nets se information ko logically aur easily retrieve karna
possible hota hai.
**Elementary Knowledge:**
Elementary knowledge basic facts aur rules ka set hota hai jo kisi system ke fundamental
operations ko define karta hai. Yeh wo basic building blocks hain jo complex knowledge
structures aur reasoning ko enable karte hain.
**Computational Logic:**
Computational logic ka use AI mein reasoning aur decision making ke liye hota hai. Ismein
logical statements ka analysis aur unka manipulation shamil hota hai.
**Predicate Logic:**
Predicate logic ek formalism hai jo objects aur unke relationships ko describe karta hai. Ismein
quantifiers jaise "forall" aur "exists" ka use kiya jata hai. Predicate logic se complex statements
ko formal aur structured way mein represent kiya jata hai.
**Knowledge Acquisition:**
Knowledge acquisition ka process involves gathering, organizing, aur structuring information.
Yeh process manual bhi ho sakta hai (expert se input lena) aur automatic bhi (machine learning
algorithms ke zariye).
Yeh topics AI ke fundamental concepts ko cover karte hain jo kisi bhi AI system ke development
aur implementation ke liye crucial hote hain.
Unit 2
**Answer:**
LISP (LISt Processing) ek high-level programming language hai jo 1958 mein John McCarthy
ne develop ki thi. Yeh AI development ke liye specially design ki gayi hai.
**Importance in AI:**
1. **Symbolic Processing:** LISP symbolic data processing ke liye highly efficient hai, jo AI ke
tasks jaise natural language processing aur symbolic reasoning mein kaam aata hai.
2. **Recursion and List Manipulation:** LISP recursion aur list manipulation ko efficiently handle
karta hai, jo AI algorithms mein common hote hain.
3. **Dynamic Typing:** LISP dynamic typing aur garbage collection support karta hai, jo AI
applications ke liye useful hota hai.
---
**Answer:**
**Basic Syntax:**
1. **Atoms and Lists:** LISP mein basic data types atoms aur lists hote hain.
- Atom: Simple value jaise number ya symbol (`5`, `x`).
- List: Ordered collection of elements (`(1 2 3)`).
2. **Function Calls:** LISP mein functions ko parentheses mein likha jata hai, jisme pehla
element function ka naam hota hai aur baaki arguments hote hain (`(+ 2 3)`).
**Numerical Functions:**
1. **Addition:** `(+ 2 3)` → `5`
2. **Subtraction:** `(- 5 3)` → `2`
3. **Multiplication:** `(* 4 3)` → `12`
4. **Division:** `(/ 10 2)` → `5`
---
**Answer:**
**LISP:**
1. **Paradigm:** Functional programming language.
2. **Data Structures:** Primarily list-based.
3. **Syntax:** Uses prefix notation.
4. **Usage:** Symbolic reasoning, AI applications like expert systems, natural language
processing.
**PROLOG:**
1. **Paradigm:** Logic programming language.
2. **Data Structures:** Relies on facts and rules.
3. **Syntax:** Uses declarative statements (facts and rules).
4. **Usage:** Logical reasoning, problem-solving, AI applications like theorem proving, expert
systems.
---
### 4. **Input, Output, and Local Variables in LISP (10 Marks Question)**
**Question:** How are input, output, and local variables handled in LISP?
**Answer:**
**Input and Output:**
1. **Input:** `read` function ka use karke input lete hain (`(setq x (read))`).
2. **Output:** `print` aur `format` functions ka use karke output display karte hain (`(print x)`).
**Local Variables:**
1. **`let` Binding:** Local variables ko `let` form ka use karke define kiya jata hai.
```lisp
(let ((x 10) (y 20))
(+ x y)) ; Output: 30
```
---
**Answer:**
**Interaction:**
LISP mein functions ke beech interaction hoti hai jahan ek function doosre function ko call kar
sakta hai.
**Recursion:**
Recursion ka matlab hai ek function ka khud ko call karna until a base condition is met.
**Example:** Factorial function in LISP:
```lisp
(defun factorial (n)
(if (<= n 1)
1
(* n (factorial (- n 1)))))
(factorial 5) ; Output: 120
```
---
**Answer:**
**Property Lists:**
Property lists ek data structure hai jisme key-value pairs store hote hain.
**Example:**
```lisp
(setq mylist '(name "Alice" age 30))
(getf mylist 'name) ; Output: "Alice"
```
**Arrays:**
Arrays fixed-size collections hain jo homogeneous data elements ko store karte hain.
**Example:**
```lisp
(setq myarray (make-array 5 :initial-element 0))
(aref myarray 2) ; Access element at index 2
```
---
**Answer:**
1. **Python:**
- High-level, versatile language widely used for AI and machine learning due to libraries like
TensorFlow, PyTorch, and scikit-learn.
2. **Java:**
- Object-oriented language with robust libraries for AI applications, especially in enterprise
solutions.
3. **R:**
- Primarily used for statistical computing and graphics, popular in data analysis and AI
research.
4. **Scala:**
- Functional programming language used in big data processing and AI applications due to its
scalability.
---
**Answer:**
Formalized symbolic logics structured frameworks hain jo symbols aur operators ka use karke
logical statements ko represent karte hain.
**Importance in AI:**
1. **Reasoning:** Systems logical deductions aur inferences draw karte hain.
2. **Knowledge Representation:** Complex relationships aur rules ko formally represent karte
hain.
3. **Automation:** Logical proofs aur problem-solving tasks ko automate karte hain.
---
**Answer:**
Non-deductive inference methods aise reasoning techniques hain jo guaranteed conclusions
nahi dete, but probabilistic ya heuristic outcomes provide karte hain.
**Types:**
1. **Inductive Reasoning:** Specific observations se general conclusions draw kiye jate hain.
2. **Abductive Reasoning:** Best possible explanation find ki jati hai based on given evidence.
3. **Heuristic Methods:** Rules of thumb ya experience-based techniques jo quick but
approximate solutions provide karte hain.
---
### 10. **Truth Maintenance Systems and Default Reasoning (10 Marks Question)**
**Question:** What are Truth Maintenance Systems and how do they relate to default
reasoning?
**Answer:**
**Truth Maintenance Systems (TMS):**
TMS aise systems hain jo beliefs aur their justifications ko track karte hain, ensuring that AI
systems ka knowledge base consistent aur updated rahe.
**Default Reasoning:**
Default reasoning ek type of reasoning hai jisme assumptions liye jate hain jab tak unhe false
prove nahi kiya jata.
**Relation:**
TMS default assumptions ko manage karta hai, aur jab nayi information contradict karte hai, toh
system automatically beliefs update kar leta hai.
---
**Answer:**
Closed World Assumption (CWA) ka matlab hai ki agar kisi information ka explicitly mention nahi
hai, toh wo false maana jayega.
**Role in AI:**
1. **Simplification:** CWA se AI systems reasoning ko simplify karte hain by assuming that
unknown facts are false.
2. **Consistency:** Knowledge base ko consistent banane mein help karta hai, kyunki system
automatically missing information ko handle kar leta hai.
---
**Answer:**
**Model Logic:**
Model logic complex systems aur scenarios ke behavior ko simulate karne ke liye use hoti hai.
**Temporary Logic:**
Temporary logic time-based reasoning ko handle karti hai, jisme events aur actions ke
time-specific aspects consider kiye jate hain.
**Example:**
- Temporal Logic se AI systems future events ka prediction kar sakte hain ya past events ka
analysis kar sakte hain.
---
These questions and answers cover key aspects of programming and logic in AI, providing a
comprehensive understanding of these concepts.
Unit 3
**Answer:**
**Fuzzy Logic Concepts:**
1. **Imprecise Reasoning:** Fuzzy logic aise reasoning ko handle karta hai jo exact nahi hoti.
2. **Membership Functions:** Har element ka ek degree of membership hota hai jo 0 se 1 ke
beech hota hai.
3. **Linguistic Variables:** Variables ko fuzzy sets ke through describe kiya jata hai jaise "high,"
"low," "medium."
---
### 2. **Introduction to Fuzzy Logic with Examples (10 Marks Question)**
**Question:** Fuzzy Logic ko ek example ke saath explain kariye.
**Answer:**
Fuzzy logic approximate reasoning ko allow karta hai.
**Example:**
Ek temperature control system:
- Crisp logic mein temperature ya to "hot" hoga ya "cold."
- Fuzzy logic temperature ko "slightly hot" ya "moderately cold" jaise levels mein define karta
hai.
Agar temperature 25°C hai, to ye "60% hot" aur "40% cold" ho sakta hai, jo zyada flexible
decision-making allow karta hai.
---
**Answer:**
**Probabilistic Reasoning:**
Ye aisi inference hoti hai jo probabilities ke basis par ki jati hai, certainty ke nahi. Jab outcomes
uncertain hote hain tab iska use hota hai.
---
**Answer:**
Bayesian inference Bayes' Theorem ka use karke hypothesis ke probability ko update karta hai
based on new evidence.
**Example:**
Agar ek patient ke symptoms (evidence) kisi disease ko indicate karte hain, to Bayesian
inference us disease (hypothesis) ke hone ki likelihood ko update karta hai.
\[ P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)} \]
---
### 5. **Dempster-Shafer Theory (10 Marks Question)**
**Question:** Dempster-Shafer theory kya hai aur ye Bayesian inference se kaise alag hai?
**Answer:**
**Dempster-Shafer Theory:**
Ye ek mathematical theory of evidence hai jo different sources se evidence combine karke kisi
event ke probability calculate karta hai.
---
**Answer:**
**Possible World Representation:**
Ye ek model hai jo different scenarios ya "worlds" ko represent karta hai jo various conditions ya
actions ke basis par exist kar sakte hain.
---
**Answer:**
**Ad Hoc Methods:**
Ye custom, problem-specific solutions hote hain jo formal framework ke bina develop kiye jate
hain.
**Answer:**
**Graphs:**
Graphs knowledge ko nodes (entities) aur edges (relationships) ke roop mein represent karte
hain.
**Example:** Semantic networks concepts aur unke relationships represent karte hain.
**Frames:**
Frames ek data structure hai jo objects, unke attributes aur relationships ke information ko hold
karta hai.
**Example:** "Car" ka frame jisme "make," "model," aur "year" ke slots hote hain.
---
**Answer:**
**Object-Oriented Representation:**
Isme data aur behavior ko objects aur classes mein encapsulate kiya jata hai.
**Example:**
Ek class `Animal` jisme methods `speak()` aur `move()` hain, jo `Dog` aur `Cat` classes inherit
karte hain aur apna `speak()` differently implement karte hain.
---
**Answer:**
**Search Strategies:**
Search methods problem spaces ko explore karte hain solutions find karne ke liye.
1. **Uninformed Search:** Koi prior knowledge nahi hota (e.g., BFS, DFS).
2. **Informed Search:** Heuristics ka use karta hai search ko guide karne ke liye (e.g., A*
algorithm).
**Control Strategies:**
Ye determine karta hai ki nodes ya states ko kaise explore kiya jaye.
**Example:**
Maze-solving AI mein DFS ek path ko end tak explore karta hai phir backtrack karta hai, jabki
BFS har level par paths ko explore karta hai.
---
**Answer:**
**Uninformed Search:**
Search methods jisme problem ke alawa koi additional information nahi hoti.
**Example:** Breadth-First Search (BFS) aur Depth-First Search (DFS).
**Differences:**
1. **Heuristics:** Informed search heuristics ka use karta hai best path estimate karne ke liye.
2. **Efficiency:** Informed search zyada efficient hota hai kyunki problem-specific knowledge
use karta hai.
---
**Answer:**
**AND-OR Graphs:**
AND-OR graphs aise problems represent karte hain jahan solutions sub-problems (AND) ya
alternative paths (OR) se compose hote hain.
**Usage:**
1. **AND Nodes:** Sabhi children ko solve karna hota hai parent ko solve karne ke liye.
2. **OR Nodes:** Koi ek child solve hone par parent solve ho jata hai.
**Example:**
Decision-making problems mein AND-OR graph har possible decision aur unke outcomes
visualize karne mein madad karta hai.
---
**Answer:**
**Matching ki Zarurat:**
Expert systems mein jab ek query input hoti hai, system ko apne knowledge base ke saath
match karna hota hai taaki sahi solution ya recommendation di ja sake.
1. **Rule-Based Systems:** System ke rules ko input ke saath match karna hota hai.
2. **Efficiency:** Efficient matching techniques se faster inference possible hoti hai.
3. **Accuracy:** Accurate matching se relevant solutions milte hain.
---
**Answer:**
**Matching Problem:**
Matching problem tab hota hai jab ek input ko knowledge base mein existing patterns ke saath
match karna hota hai.
1. **Complexity:** Large datasets mein matching problem zyada complex ho jata hai.
2. **Solution:** Efficient algorithms jaise RETE algorithm use kiye jate hain jo large rule sets ke
saath efficiently deal karte hain.
---
**Answer:**
**Partial Matching:**
Jab input ka ek hissa knowledge base ke ek part ke saath match hota hai, tab partial matching
hota hai.
- Useful in cases jahan exact match available nahi hota.
**Fuzzy Matching:**
Ye approximate matching hota hai jahan input aur knowledge base ke beech thodi mismatches
allowed hoti hain.
- **Example:** Spelling mistakes ke saath search queries ka match karna.
---
### 4. **RETE Matching Algorithm (10 Marks Question)**
**Question:** RETE matching algorithm kya hota hai aur iska use kaha hota hai?
**Answer:**
**RETE Algorithm:**
RETE ek efficient pattern matching algorithm hai jo large rule sets ke saath fast matching ke liye
design kiya gaya hai.
1. **Memory Usage:** RETE algorithm previous match results ko store karta hai taaki repeated
computations avoid ho.
2. **Usage:** Rule-based expert systems mein jahan multiple rules aur conditions hoti hain.
---
**Answer:**
**Indexing Techniques:**
Indexing se knowledge base mein information ko organize kiya jata hai taaki fast retrieval ho
sake.
- **Example:** Hash tables, inverted indexes.
**Retrieval Techniques:**
Retrieval techniques ka use stored information ko quickly access karne ke liye hota hai.
- **Example:** SQL queries, search algorithms.
---
**Answer:**
**Knowledge Integration:**
Different sources se information ko ek centralized system mein integrate kiya jata hai taaki
system efficiently information access aur process kar sake.
- **Example:** Expert systems mein multiple databases se knowledge ko combine karna aur
relevant information ko retrieve karna.
---
**Communication:**
System aur user ke beech effective communication zaruri hai taaki user queries ko system
correctly samajh sake aur relevant responses de sake.
- **Example:** Natural Language Processing (NLP) systems.
---
**Answer:**
**Linguistics in AI:**
Linguistics AI systems ko natural language samajhne aur generate karne mein madad karta hai.
1. **Syntax Analysis:** Sentences ke grammatical structure ko analyze karta hai.
2. **Semantic Analysis:** Sentences ka meaning extract karta hai.
3. **Pragmatics:** Contextual meaning ko samajhta hai.
---
**Answer:**
**Parsing Techniques:**
Parsing ka matlab hota hai natural language ko analyze karke uska structure extract karna.
1. **Top-Down Parsing:** Sentences ko high-level structure se start karke parse karta hai.
2. **Bottom-Up Parsing:** Sentences ko individual words se start karke parse karta hai.
**Use in AI:**
1. **Natural Language Processing (NLP):** Parsing se sentences ke structure aur meaning ko
understand karne mein madad milti hai.
---
### 10. **Semantic Analysis and Representation Structures (10 Marks Question)**
**Question:** Semantic analysis aur representation structures ko explain kariye.
**Answer:**
**Semantic Analysis:**
Semantic analysis sentences ka meaning extract karta hai.
- **Example:** "The cat sat on the mat" sentence mein subject, verb, aur object ka meaning
extract karna.
**Representation Structures:**
Knowledge ko structured form mein store karne ke liye representation structures use hote hain,
jaise semantic nets, frames, aur ontologies.
---
**Answer:**
**Natural Language Generation (NLG):**
NLG AI systems ko structured data se human-readable text generate karne mein madad karta
hai.
1. **Role in AI:**
- **Chatbots:** User ke queries ke basis par natural language responses generate karna.
- **Report Generation:** Data se automated reports create karna.
---
**Answer:**
**Expert Systems:**
Expert systems AI-based systems hote hain jo human experts ki tarah decision-making karte
hain.
1. **Components:**
- **Knowledge Base:** Expert knowledge stored hota hai.
- **Inference Engine:** Knowledge base ke rules ko apply karke reasoning karta hai.
- **User Interface:** System aur user ke beech interaction ke liye interface.
**Usage:**
- Medical diagnosis, technical support systems, and financial forecasting mein use hote hain.
---
In sabhi questions aur answers ke zariye humne expert systems mein knowledge organization
aur communication ke important concepts ko cover kiya hai, jo exams ke liye helpful ho sakte
hain.