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
Science,
6 months ago
Business Studies,
6 months ago
Social Sciences,
6 months ago
Business Studies,
11 months ago
Biology,
1 year ago
Math,
1 year ago