Q.1
14 MarksAlso asked in Winter 2024 Q4b OR
A Perceptron is the simplest form of an Artificial Neural Network (ANN) used for linear binary classification, invented by Frank Rosenblatt in 1958. It consists of input features, associated synaptic weights, a summation function, and an activation (threshold) function.
Mathematical Formulation:
Where if , and otherwise.
Example (Logic AND Function):
- Inputs:
- Weights: , Threshold
- For
- For
Also asked in Summer 2025 Q5a OR
- Breadth First Search (BFS): An Uninformed (Blind) search algorithm that explores a graph level by level, visiting all neighbor nodes at the current depth before moving deeper, using a FIFO queue.
- Best First Search: An Informed (Heuristic) search algorithm that combines the advantages of BFS and DFS by exploring the most promising node next based on an evaluation heuristic function , using a Priority Queue.
| Feature | Breadth First Search (BFS) | Best First Search |
|---|---|---|
| Search Category | Uninformed / Blind Search | Informed / Heuristic Search |
| Data Structure | Standard FIFO Queue | Priority Queue (ordered by ) |
| Evaluation Function | None (guided strictly by tree depth) | Uses heuristic or () |
| Path Optimality | Guaranteed optimal for uniform step costs | Optimal only if heuristic is admissible and consistent |
| Completeness | Complete (guaranteed to find a solution if one exists) | Complete in finite spaces, can loop if heuristic is flawed |
| Time Complexity | Exponential | Depends on heuristic quality; best case , worst case |
| Memory Requirement | Extremely high (keeps all fringe nodes in memory) | Moderate to high (stores explored and frontier sets) |
What is the state space of a problem? Explain state space representation for water jug problem.
Also asked in Winter 2025 Q2b, Summer 2024 Q2c, Winter 2023 Q1c, Summer 2023 Q2c OR
In Artificial Intelligence, the State Space of a problem is the complete mathematical configuration of all possible states that can be reached from the initial state through any sequence of valid operations/actions. It is formally represented as a 4-tuple:
- Problem Statement: You have two jugs: a 4-gallon jug () and a 3-gallon jug (). Neither has any measuring markings. There is an endless pump tap of water.
- Goal: Measure exactly 2 gallons in the 4-gallon jug: state where .
- State Representation: An ordered pair , where:
- = current amount of water in the 4-gallon jug.
- = current amount of water in the 3-gallon jug.
- Initial State: (both jugs empty).
- Goal State: or for any .
- if (Fill 4-gal jug completely).
- if (Fill 3-gal jug completely).
- if (Empty 4-gal jug onto ground).
- if (Empty 3-gal jug onto ground).
- if and (Pour from 3-gal into 4-gal until 4-gal is full).
- if and (Pour from 4-gal into 3-gal until 3-gal is full).
- if and (Pour all water from 3-gal into 4-gal).
- if and (Pour all water from 4-gal into 3-gal).
[Goal Achieved!]