Explain backtracking in Prolog with suitable example.
Answers
Answered by
0
The answer. Backtracking is a process. When a subgoal fails, the Prolog system traces its steps backwards to the previous goal and tries to resatisfy it. This means that all variables that were bound to a value when that goal was satisfied are now made free again.
Similar questions
Math,
7 months ago
Biology,
7 months ago
Business Studies,
1 year ago
Biology,
1 year ago
Math,
1 year ago