23 March
23 March
CSP472
B.TechCSE(IOT&Application)
4thyear 7thSemester
Session:2023-24
DEPARTMENTOFCOMPUTERSCIENCE&ENGINEERINGSHARDA UNIVERSITY,
GREATER NOIDA
LABFILE
SubmittedBy:
SystemID-2020541048
Roll No-200101286
Section-F
Group-G2
INDEX
S.No. Experiment Date Page Sign
1 ImplementationofWaterJugProblem
3 Advanceprogrammingin Lisplikefollowing:
i. Write a function that compute the factorial of a
number.(factorial of 0 is 1, and factorial of n is n*(n-
1)*...1.Factorial is defined only for integers greater than or
equal to 0.)
ii. Write a function that evaluates a fully parenthesized infix
arithmeticexpression.Forexamples,(infix(1+(2*3)))should
return 7.
iii. Write a function that performs a depth first traversal of a
binary tree. The function should return a list containing the
tree nodes in the order they were visited.
iv. WriteaLISPprogram forwaterjug problem.
v. Write a LISP program that determines whether an integer is
prime.
4 Referfollowingfigureasmapwithdistancedetails,Writeaprogram in
your preferred language to generate path from ARAD to
BUCHREST, analyze result obtained by
a)Depth First Search
b) BreadthFirstSearch
c) UniformCostSearch
5 Writeaprograminyourpreferredlanguagetogeneratestepstosolve Tower
of Hanoi problem.
6 Writeaprograminyourpreferredlanguagetosolvethe8puzzle
Problem-using A* algorithm.
7 WritePROLOGprogramtoProgramtocategorizeanimal characteristics.
8 WritePROLOGprogramtosolverfor thelinearequationA*X+ B
=0.Letthepredicatelinear(A,B,X)returntherootXofthe equation