Professional Documents
Culture Documents
Tushar's Lab
Tushar's Lab
ROLL NO - 52212215
SEMESTER - 4th
1) To implement Depth First Search Algorithm Problems:
a)https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/
practiceproblems/algorithm/minimum-nodes-e023e51e/
b)https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/
practiceproblems/algorithm/minimize-the-magic-05a3986c/
2) To implement Breadth First Search Algorithm Problems:
a)https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/
practiceproblems/algorithm/cloudy-days-82a872ec/
b)https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/
practiceproblems/algorithm/dhoom-4/
3) To implement A* Search Algorithm Problems: https://leetcode.com/problems/shortest-path-in-
a-grid-with-obstacles-elimination/description/
4) To implement Best First Search Algorithm Problems:
A) https://leetcode.com/problems/cheapest-flights-within-k-stops/description/
B) https://leetcode.com/problems/possible-bipartition/description/
5) To implement Min-Max Problems:
https://www.hackerearth.com/practice/basic-programming/implementation/basics-
ofimplementation/practice-problems/algorithm/min-max-3/
https://www.hackerearth.com/problem/algorithm/sherlock-and-minimax/
6) To implement Alpha-Beta Pruning Algorithm Problems: https://leetcode.com/problems/stone-
game/description/ https://leetcode.com/problems/predict-the-winner/description/
7) To implement Travelling Salesperson Problem Problems:
https://www.hackerearth.com/problem/algorithm/a-travelling-salesman-problem/
https://leetcode.com/problems/find-the-shortest-superstring/description/
8) To implement LISP Iterative Functions (If construct, Do times loop, for loop, do list)
If Construct
(if (> x 0)
Do Times Loop
((>= i n))
For Loop
(defun print-list-elements (lst)
Do List
((null l))
Factorial Function
(if (= n 0)
(* n (factorial (- n 1)))))
Fibonacci Sequence
(cond ((= n 0) 0)
((= n 1) 1)
(t (+ (fibonacci (- n 1))
(fibonacci (- n 2))))))
Creating an Array
Accessing an Element
Setting an Element
(length array))
In the context of expert systems and artificial intelligence, backward chaining (backward
reasoning) and forward chaining (forward reasoning) are two common inference methods used
in rule-based systems. These methods are used to determine the sequence of steps needed to
reach a conclusion based on a set of rules and facts.
Forward chaining starts with the available data (facts) and uses a set of rules to derive new
information until a goal or conclusion is reached.
Backward Chaining (Backward Reasoning)
Backward chaining starts with a goal and works backward through the rules to find a sequence
of rules and facts that support the goal.
Facts are used to define relationships between entities. For example, father(john, sarah)
indicates that John is the father of Sarah.
Rules are defined using predicates to derive new relationships or facts from existing ones. For
example, grandparent(X, Z) :- parent(X, Y), parent(Y, Z). defines a rule to infer the relationship
between X (grandparent) and Z (grandchild) through an intermediate parent Y.
Queries are used to infer or ask about relationships between entities based on the defined facts
and rules. For example, ?- father(X, sarah). is a query that asks Prolog to find the value of X
(father) when Y is Sarah.