Linear programming mathematical model

50 Views Asked by At

The problem:

There are $N$ cities $(1, 2, \dots, N)$. There are roads connecting $M$ pairs of cities in $N$.

Stores need to be build in way that for each city $X$ store is in city $X$ or in neighboring city.

Find minimal amount of stores that need to be build.

What I need is mathematical model so it can be solved by dedicated solver. I'm pretty sure it will be in binary, I mean if store should be built it needs to be represented as $1$, if not as $0$.

1

There are 1 best solutions below

0
On BEST ANSWER

For each city $i$, let $N_i$ be the set of neighbors of $i$. Let binary decision variable $y_i$ indicate whether a store is built in city $i$. The problem is to minimize $\sum_i y_i$ subject to linear constraints $$y_i + \sum_{j\in N_i} y_j \ge 1 \quad \text{for all $i$}$$

This is called the minimum dominating set problem.