Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Follow publication

Robocat and cat playing together. Image created with Dall·E by the author.

Member-only story

Finding Optimal Solutions with Branch and Bound

A powerful algorithm for solving discrete optimization problems

8 min readDec 5, 2023

--

Branch and bound is the core algorithm behind many mixed integer programming (MIP) solvers. It is a great addition to your mathematical optimization toolkit, particularly useful for smaller problems or when the problem has numerous constraints. Additionally, its straightforward nature makes it accessible, no hard math formulas needed.

In this hands-on article, we will delve into a mathematical optimization problem. We will tackle it with the branch and bound algorithm, a great technique for solving such problems. Our focus will be on a cat-themed problem — because let’s face it, who doesn’t love cats? However, if you’re more of a dog person, feel free to mentally substitute ‘dog’ every time you come across ‘cat’ in our discussion. The principles and methods apply just the same!

Problem Introduction

Imagine you are the owner of a cat shelter. Every day, pet owners can bring their cats and you take care of them. Many people adopted a cat during COVID, but now everyone needs to be back at the office. Because of this your company is doing great.

Actually, a bit too great. You are having difficulties with placing all the cats in the rooms of your…

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Hennie de Harder
Hennie de Harder

Written by Hennie de Harder

📈 Data Scientist & ML Engineer 💡 Simplifying complex topics ✨ Sharing fun side projects 💻 Working at IKEA and BigData Republic 🐈 Love math, cats, & running

Responses (2)