So we can conclude that backtracking at every step eliminates those choices that cannot give us the solution and proceeds to those choices that have the potential of taking us to the solution. This is because the process of finding the solution from the various option available is repeated recursively until we don’t find the solution or we reach the final state. We can also say that backtracking is a form of recursion. There also might be a case where none of the options will give you the solution and hence we understand that backtracking won’t give any solution to that particular problem. Initially, we start the backtracking from one possible option and if the problem is solved with that selected option then we return the solution else we backtrack and select another option from the remaining available options. So basically, the idea behind the backtracking technique is that it searches for a solution to a problem among all the available options. Backtracking can also be said as an improvement to the brute force approach. ISRO CS Syllabus for Scientist/Engineer Examīacktracking is an algorithmic technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail to satisfy the constraints of the problem at any point in time (by time, here, is referred to the time elapsed till reaching any level of the search tree).ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |