What's the difference between backtracking and depth first search?
What's the difference between backtracking and depth first search?



Best Answer
Backtracking is a more general purpose algorithm. DepthFirst search is a specific form of backtracking related to searching tree structures. From Wikipedia:
It uses backtracking as part of its means of working with a tree, but is limited to a tree structure. Backtracking, though, can be used on any type of structure where portions of the domain can be eliminated  whether or not it is a logical tree. The Wiki example uses a chessboard and a specific problem  you can look at a specific move, and eliminate it, then backtrack to the next possible move, eliminate it, etc. 

comments:

Other Answer1
Usually, a depthfirstsearch is a way of iterating through an actual graph/tree structure looking for a value, whereas backtracking is iterating through a problem space looking for a solution. Backtracking is a more general algorithm that doesn't necessarily even relate to trees. 
Other Answer2
In a depthfirst search, you start at the root of the tree and then explore as far along each branch, then you backtrack to each subsequent parent node and traverse it's children Backtracking is a generalised term for starting at the end of a goal, and incrementally moving backwards, gradually building a solution. 
Other Answer3
Depth first is an algorithm for traversing or searching a tree. See here. Backtracking is a much more broad term that is used whereever a solution candidate is formed and later discarded by backtracking to a former state. See here. Depth first search uses backtracking to search a branch first (solution candidate) and if not successful search the other branch(es). 
Other Answer4
I think this answer to another related question offers more insights. For me, the difference between backtracking and DFS is that backtracking handles an implicit tree and DFS deals with an explicit one. This seems trivial, but it means a lot. When the search space of a problem is visited by backtracking, the implicit tree gets traversed and pruned in the middle of it. Yet for DFS, the tree/graph it deals with is explicitly constructed and unacceptable cases have already been thrown, i.e. pruned, away before any search is done. So, backtracking is DFS for implicit tree, while DFS is backtracking without pruning. 
Relate
 backtracking depth first search algorithm in pseudocode
 Knight's Tour Depth First Search Backtracking
 depthfirstsearch
 Depth or Breadth first search?
 Greedy Best First Search and Depth First Search
 DepthFirst Search vs. BreadthFirst Search
 depthfirstiterateddeepening search vs depthfirst search
 Graph Theory Depth first Search
 Depth first search recursion algorithm
 Depthfirst search use of stack
 Create a MST with depthfirst search?
 Uniform cost search vs depth first search
 Implement A*Search as BreadthFirstSearch / DepthFirstSearch
 Depth First Search Using Adjacency Matrix
 solve water jug with depthfirst search