
- DSA - Home
- DSA - Overview
- DSA - Environment Setup
- DSA - Algorithms Basics
- DSA - Asymptotic Analysis
- Data Structures
- DSA - Data Structure Basics
- DSA - Data Structures and Types
- DSA - Array Data Structure
- DSA - Skip List Data Structure
- Linked Lists
- DSA - Linked List Data Structure
- DSA - Doubly Linked List Data Structure
- DSA - Circular Linked List Data Structure
- Stack & Queue
- DSA - Stack Data Structure
- DSA - Expression Parsing
- DSA - Queue Data Structure
- DSA - Circular Queue Data Structure
- DSA - Priority Queue Data Structure
- DSA - Deque Data Structure
- Searching Algorithms
- DSA - Searching Algorithms
- DSA - Linear Search Algorithm
- DSA - Binary Search Algorithm
- DSA - Interpolation Search
- DSA - Jump Search Algorithm
- DSA - Exponential Search
- DSA - Fibonacci Search
- DSA - Sublist Search
- DSA - Hash Table
- Sorting Algorithms
- DSA - Sorting Algorithms
- DSA - Bubble Sort Algorithm
- DSA - Insertion Sort Algorithm
- DSA - Selection Sort Algorithm
- DSA - Merge Sort Algorithm
- DSA - Shell Sort Algorithm
- DSA - Heap Sort Algorithm
- DSA - Bucket Sort Algorithm
- DSA - Counting Sort Algorithm
- DSA - Radix Sort Algorithm
- DSA - Quick Sort Algorithm
- Matrices Data Structure
- DSA - Matrices Data Structure
- DSA - Lup Decomposition In Matrices
- DSA - Lu Decomposition In Matrices
- Graph Data Structure
- DSA - Graph Data Structure
- DSA - Depth First Traversal
- DSA - Breadth First Traversal
- DSA - Spanning Tree
- DSA - Topological Sorting
- DSA - Strongly Connected Components
- DSA - Biconnected Components
- DSA - Augmenting Path
- DSA - Network Flow Problems
- DSA - Flow Networks In Data Structures
- DSA - Edmonds Blossom Algorithm
- DSA - Maxflow Mincut Theorem
- Tree Data Structure
- DSA - Tree Data Structure
- DSA - Tree Traversal
- DSA - Binary Search Tree
- DSA - AVL Tree
- DSA - Red Black Trees
- DSA - B Trees
- DSA - B+ Trees
- DSA - Splay Trees
- DSA - Range Queries
- DSA - Segment Trees
- DSA - Fenwick Tree
- DSA - Fusion Tree
- DSA - Hashed Array Tree
- DSA - K-Ary Tree
- DSA - Kd Trees
- DSA - Priority Search Tree Data Structure
- Recursion
- DSA - Recursion Algorithms
- DSA - Tower of Hanoi Using Recursion
- DSA - Fibonacci Series Using Recursion
- Divide and Conquer
- DSA - Divide and Conquer
- DSA - Max-Min Problem
- DSA - Strassen's Matrix Multiplication
- DSA - Karatsuba Algorithm
- Greedy Algorithms
- DSA - Greedy Algorithms
- DSA - Travelling Salesman Problem (Greedy Approach)
- DSA - Prim's Minimal Spanning Tree
- DSA - Kruskal's Minimal Spanning Tree
- DSA - Dijkstra's Shortest Path Algorithm
- DSA - Map Colouring Algorithm
- DSA - Fractional Knapsack Problem
- DSA - Job Sequencing with Deadline
- DSA - Optimal Merge Pattern Algorithm
- Dynamic Programming
- DSA - Dynamic Programming
- DSA - Matrix Chain Multiplication
- DSA - Floyd Warshall Algorithm
- DSA - 0-1 Knapsack Problem
- DSA - Longest Common Sub-sequence Algorithm
- DSA - Travelling Salesman Problem (Dynamic Approach)
- Hashing
- DSA - Hashing Data Structure
- DSA - Collision In Hashing
- Disjoint Set
- DSA - Disjoint Set
- DSA - Path Compression And Union By Rank
- Heap
- DSA - Heap Data Structure
- DSA - Binary Heap
- DSA - Binomial Heap
- DSA - Fibonacci Heap
- Tries Data Structure
- DSA - Tries
- DSA - Standard Tries
- DSA - Compressed Tries
- DSA - Suffix Tries
- Treaps
- DSA - Treaps Data Structure
- Bit Mask
- DSA - Bit Mask In Data Structures
- Bloom Filter
- DSA - Bloom Filter Data Structure
- Approximation Algorithms
- DSA - Approximation Algorithms
- DSA - Vertex Cover Algorithm
- DSA - Set Cover Problem
- DSA - Travelling Salesman Problem (Approximation Approach)
- Randomized Algorithms
- DSA - Randomized Algorithms
- DSA - Randomized Quick Sort Algorithm
- DSA - Karger’s Minimum Cut Algorithm
- DSA - Fisher-Yates Shuffle Algorithm
- Miscellaneous
- DSA - Infix to Postfix
- DSA - Bellmon Ford Shortest Path
- DSA - Maximum Bipartite Matching
- DSA Useful Resources
- DSA - Questions and Answers
- DSA - Selection Sort Interview Questions
- DSA - Merge Sort Interview Questions
- DSA - Insertion Sort Interview Questions
- DSA - Heap Sort Interview Questions
- DSA - Bubble Sort Interview Questions
- DSA - Bucket Sort Interview Questions
- DSA - Radix Sort Interview Questions
- DSA - Cycle Sort Interview Questions
- DSA - Quick Guide
- DSA - Useful Resources
- DSA - Discussion
DSA - Branch and Bound Algorithm
The branch and bound algorithm is a technique used for solving combinatorial optimization problems. First, this algorithm breaks the given problem into multiple sub-problems and then using a bounding function, it eliminates only those solutions that cannot provide optimal solution.
Combinatorial optimization problems refer to those problems that involve finding the best solution from a finite set of possible solutions, such as the 0/1 knapsack problem, the travelling salesman problem and many more.
When Branch and Bound Algorithm is used?
The branch and bound algorithm can be used in the following scenario −
Whenever we encounter an optimization problem whose variables belong to a discrete set. These types of problems are known as discrete optimization problems.
As discussed earlier, this algorithm is also used to solve combinatorial optimization problem.
If the given problem is a mathematical optimization problem, then the branch and bound algorithm can also be applied.
How does Branch and Bound Algorithm work?
The branch and bound algorithm works by exploring the search space of the problem in a systematic way. It uses a tree structure (state space tree) to represent the solutions and their extensions. Each node in the tree is part of the partial solution, and each edge corresponds to an extension of this solution by adding or removing an element. The root node represents the empty solution.
The algorithm starts with the root node and moves towards its children nodes. At each level, it evaluates whether a child node satisfies the constraints of the problem to achieve a feasible solution. This process is repeated until a leaf node is reached, which represents a complete solution.

Searching techniques in Branch and Bound
There are different approaches to implementing the branch and bound algorithm. The implementation depends on how to generate the children nodes and how to search the next node to expand. Some of the common searching techniques are −
Breadth-first search − It maintains a queue of nodes to expand, which means this searching technique uses First in First out order to search next node.
Least cost search − This searching technique works by computing bound value of each node. The algorithm selects the node with the lowest bound value to expand next.
Depth-first search − It maintains a stack of nodes to expand, which means this searching technique uses Last in First out order to search the next node.
Types of Branch and Bound Solutions
The branch and bound algorithm can produce two types of solutions. They are as follows −
Variable size solution − This type of solution is represented by a subset which is the optimal solution to the given problem.
Fixed-size solution − This type of solution is represented by 0s and 1s.
Advantages of Branch and Bound Algorithm
The advantages of the branch and bound algorithm are as follows −
It can reduce the time complexity by avoiding unnecessary exploration of the state space tree.
It has different search techniques that can be used for different types of problems and preferences.
Disadvantages of Branch and Bound Algorithm
Some of the disadvantages of the branch and bound algorithm are as follows −
In the worst case scenario, it may search for all the combinations to produce solutions.
It can time consuming if the state space tree is too large.