In: Computer Science
The following submission rules apply:
· For those questions requiring programs, the solutions must be implemented using JavaScript or Java.
o Appropriate self-documenting comments in the source code are mandatory, consistent with good programming practices.
o Solutions must be provided in plain text so that formatting is not lost.
· All answers must be provided in this document.
· Sources must be given accurate and complete citations sufficient for the instructor to find and confirm them.
1 Reformulate the Backtrack procedure so that it halts when the first goal is reached.
here we have 3 goal states.
1.For those questions requiring programs, the solutions must be implemented using JavaScript or Java.
under this we have two subrules
2.All answers must be provided in this document.
3.Sources must be given accurate and complete citations sufficient for the instructor to find and confirm them.
The back tracking procedure must halt when the first goal is reached otherwise has to continue with other goals.
the procedure is like this
start
while(!submitted)
for each goal in submission procedure
check for subtasks or rules
if (any) for each subrule
check for the true value
return value
end for
else check the true value of the goal itself
if(value==true) halt and submitted=true
else continue(undo current move)
end for
end while
if submitted=false, none of the goals are met.