{"data":{"allMarkdownRemark":{"edges":[{"node":{"html":"<h1>The Branch and Bound Algorithm</h1>\n<p>SeeBnB is an Open Educational Resource designed to help users visualize (see!) the branch and bound (BnB) algorithm. </p>\n<p>Branch and bound is an exhaustive algorithm, which means that it always provides an optimal\nsolution. Although the branch and bound algorithm has been referred to as an algorithm in the sin-\ngular, it is actually composed of three parts which can be replaced with different options\nto customize and optimize it for the problem at hand.</p>\n<p>To explain the branch and bound algorithm, one can start with the name itself. One\nsubprocess of the algorithm is one in which the given problem and its solution space is\nmapped into a tree by iteratively branching the original problem into increasingly smaller\nsubproblems. These subproblems are defined by their smaller set of possible solutions,\nall of which are also valid for the parent problem. Via branching, the solution space\nis partitioned. Nodes in this tree created by branching represent the subproblems, and\nare then inspected when traversing the problem tree in the order denoted by a search\nstrategy, all the while comparing the solutions of the subproblems to determine if they\nfall under (over) an upper (lower) bound. Through this process of visiting nodes and\ncomparing them to upper and lower bounds, entire branch sections can be discarded,\nallowing for efficiency gains. The branch and bound algorithm therefore consists of three\ncustomizable parts: <strong>branching, bounding and searching</strong></p>\n<h1>Traveling Salesman Problem</h1>\n<p>In the context of this program, the branch and bound algorithm is being used to solve the Traveling Salesman Problem (TSP).</p>\n<p>The traveling salesman problem (TSP) asks the question, \"Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once before returning to the origin city?\".</p>\n<h1>This project</h1>\n<p>This web app was built to show how the branch and bound algorithm works, as well as how it can be customized. The areas of customization are as follows:</p>\n<h2>Initial Solution</h2>\n<p>The branch and bound algorithm can draw its initial incumbent solution from a more efficient heuristic\nalgorithm. This incumbent solution is then used as a global upper bound. </p>\n<p>The heuristic algorithms to choose from for the initial solution are: </p>\n<ul>\n<li>Shortest Path</li>\n<li>Arbitrary Insertion</li>\n<li>Furthest Insertion</li>\n<li>Nearest Insertion</li>\n<li>Convex Hull Insertion</li>\n<li>Simulated Annealing</li>\n</ul>\n<h2>Search Strategies</h2>\n<p>As the branch and bound algorithm runs, new nodes are added to be\nstored in a data structure and at each step, one node is chosen to be explored. Specifically,\nthe search strategy dictates how the next node is chosen to be explored at each step from\nthe nodes to be explored. SeeBnB provides three different search strategies to choose from:</p>\n<ul>\n<li>Depth-first search (DFS), also known as Last In, First Out (LIFO)</li>\n<li>Breadth-first search (BFS), also known as First In, First Out (FIFO)</li>\n<li>Minimum Lower Bound (MLB)</li>\n</ul>\n<h2>Bounding Strategies</h2>\n<p>The lower bound is a value associated with each node denoting the distance traveled to\nreach the node using the current solution. As each node is added to the group of nodes to\nvisit, the lower bound is calculated and stored for that node. Once the node is visited, the\nnode’s lower bound is compared to the current upper bound. If the distance to reach the\nnode is higher than the distance for the highest possible optimum solution, then paths\nstarting with the path used to reach this node will not result in the optimal solution, and\ntherefore this node will be pruned. The three methods used to calculate the lower bound in this\nprogram are: </p>\n<ul>\n<li>Current Cost</li>\n<li>Cheapest Edges</li>\n<li>1-Tree (Kruskal)</li>\n</ul>\n<h2>Dependencies</h2>\n<p>These are the main tools used to build this site:</p>\n<ul>\n<li><a href=\"https://www.gatsbyjs.org\">gatsbyjs</a></li>\n<li><a href=\"https://reactjs.org\">reactjs</a></li>\n<li><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API\">web workers</a></li>\n<li><a href=\"https://material-ui.com/\">material-ui</a></li>\n<li><a href=\"https://deck.gl/#/\">deck.gl</a></li>\n<li><a href=\"https://d3js.org/\">d3</a></li>\n<li><a href=\"https://www.mapbox.com/\">mapbox</a></li>\n</ul>\n<h1>Use</h1>\n<p>As this is meant to be an open educational resource, feel free to use this program to show others the inner workings of the branch and bound algorithm. You can also build off of this program to help others see other sides of BnB!</p>"}}]}}}