Approaches in Dynamic Programming
There are two approaches to solving a dynamic programming problem.
Bottom-up Approach
The bottom-up approach simply means storing the results of certain calculations, which are then re-used later because the same calculations is a sub-problem in a larger calculation.
Top-down Approach
The top-down approach involves formulating a complex calculation as a recursive series of simpler calculations.
Backtracking Method
Backtracking can be described as an organized exhaustive which offers avoids searching for all possibilities. The technique is generally suitable for solving problems where a potentially large but finite number of solutions have to inspected.
Backtracking can be applied only for problems that admit the concept of a partial candidate solution and a relatively quick test of whether it can possibly be completed to a valid solution.
Backtracking is an important tool for solving constraint satisfaction problems, such as crossword, verbal arithmetic, and many other puzzles. It is often the most convenient (If not them most efficient) technique for parsing for the knapsack problem and other combinational optimization problems. It is so the basis of the so-called logic programming languages such as Icon, Planner a Prolog.
Backtracking Problems
In backtracking, the problem can be categorized into three categories.
Decision Problem
In the decision problem we find “whether there are any feasible solutions?”
Optimization Problem
In optimization problems, we find “whether there exist any best solutions?”
Enumeration Problem
In the enumerations problem, we find all the possible feasible solutions.
Branch and Bound Method-Branch and bound is a state-space search method in which all the children of a node are generated before expending any of its children.
Branch and Bound Terminology
Live Node
A node that has been generated and all of whose children have not yet been generated is called a live node. The live node whose children are currently being generated is called the E-node.
E-node
A live node whose children are currently being explored. In other words, an E-node is a node currently being expended.
Dead node
The dead node is a generated node that is not to be expended further or all of whose children have been generated.
Bounding functions
Bounding functions are used to kill live nodes without generating all their children. This is done carefully that at the conclusion of the process at least one answer node is always generated or all answer nodes are generated if the problem requires finding all solutions.