In this post I’ll show you how to solve the vertex coloring problem to optimality using linear programming. Since the problem is NP-complete, there is no algorithm which can solve any problem instance in deterministic polynomial time. In a former post, I used constraint programming to find an optimal (minimal) vertex coloring. A popular greedy… Read more Vertex Coloring using ILP

## micro:bit plays Bach

I dedicate this post to one of my favorite composers, Johann Sebastian Bach. I was walking through Paris years ago when I approached a cathedral where someone had played this piece. It is the fugue of the Bach Toccata, BWV 565. At first, I thought that a virtuos organist must be at work here. Only… Read more micro:bit plays Bach

## The Tennis Court Problem (TCP)

I owe this task to Ruedi, a regular tennis player. The Tennis Court Problem (TCP) is about the following task. At the beginning of outdoor tennis, the court lines must always be cleaned first. The sweeping set is often placed in one of two typical locations, usually either on one side of the net or… Read more The Tennis Court Problem (TCP)

## Solving Happy Cubes® on A micro:bit

In this post I’ll demonstrate the results of my most recent fun project on the micro:bit: An app to solve Happy Cubes®, a set of puzzles created in 1986 by the Belgian toy inventor Dirk Laureyssens. My kids were playing with these cubes and I was wondering, if the micro:bit could solve these cubes in… Read more Solving Happy Cubes® on A micro:bit

## Map Coloring Problem

This is a similar post as the one on Graph Coloring. However, this in this post I show an application of the graph coloring problem, allowing us to answer practical questions using graph theory. In this post we’ll first tackle a map coloring problem manually, then we’ll use a MiniZinc constraint programming script to validate the solution found.

## Graph Coloring Problem

A node coloring is valid or admissible if any two adjacent nodes do not have the same color. If a graph is colorable, there is a smallest number such that the graph is node colorable. This number is called the chromatic number of the graph and is usually denoted by . The problem to identify… Read more Graph Coloring Problem

## Neopixels with micro:bit

In this post I will demonstrate a “Hello, World!” example for the micro:bit to light up some Neopixels. Neopixels are individually-addressable RGB LEDs and can come in various forms. The most common form is the chain having all units connected serially. It was invented by Adafruit, an open-source hardware company based in New York City. Why did I… Read more Neopixels with micro:bit

## Solving a TSP with Linear Programming and Google OR-Tools in Python

In this post I show you how to solve the TSP problem using integer linear programming and Google OR-Tools for mathmatical modelling in Python. If you’re not yet familiar to the TSP and want to dig deeper, find out more here. It is one of the oldest and best explored problems in the field of… Read more Solving a TSP with Linear Programming and Google OR-Tools in Python

## Happy Birthday Duino

In this post I’ll show you the simplest setup to generate synthetic sound using an Arduino Pro Mini. Of course you can also run it on a Leonardo or on an Arduino UNO R3. The project is inspired from a project from the official arduino project hub and you can get the sourcecode here. What… Read more Happy Birthday Duino

## TSP Miller-Tucker-Zemlin Subtour Elimination Constraint

In this post we want to try to provide a solution to solve the Traveling Salesman Problem (TSP) using linear programming. The post is based on this excellent video from Mr. Michel Bierlaire at the EPFL. A good written documentation of the Miller Tucker Zemlin Constraint can be found here. What is a TSP? The… Read more TSP Miller-Tucker-Zemlin Subtour Elimination Constraint