diff --git a/sheets/04_mip/dbst_mip/README.md b/sheets/04_mip/dbst_mip/README.md index b458862fba70d1ffd0aad873684d3588c918b5c4..117ce6cf3cc93f875397aa08906af85f7dbb6ba7 100644 --- a/sheets/04_mip/dbst_mip/README.md +++ b/sheets/04_mip/dbst_mip/README.md @@ -25,20 +25,16 @@ $$\forall v\in V: \quad \sum\limits_{e \in \delta(\{v\})}x_e \leq d$$ Here, $\delta(S)$ defines for a set of vertices $S\subset V$ the edges with one end in $S$ and one end in $V\setminus S$, thus, the edges leaving $S$. Next let us enforce that every vertex has at least one neighbor (assuming that $|V|\geq 2$) -```equation -\sum\limits_{e \in \delta(\{v\})}x_e \geq 1 -``` +$$\sum\limits_{e \in \delta(\{v\})}x_e \geq 1$$ + As we want a tree, we additionally state -```equation -\sum\limits_{e \in E}x_e = n-1 -``` +$$\sum\limits_{e \in E}x_e = n-1$$ The last, and most complicated constraint, is again enforcing the connectivity. This can be done by the following set of constraints. -```equation -\forall S\subsetneq V, S\not=\emptyset: \quad \sum\limits_{e \in \delta(S)} x_e \geq 1 -``` +$$\forall S\subsetneq V, S\not=\emptyset: \quad \sum\limits_{e \in \delta(S)} x_e \geq 1$$ + As these are exponentially many, we add them via lazy constraints. For this, we need to write a function that checks a solution if any of these constraints is violated. We can do this efficiently by just looking at the connected components in the provided solution and add the constraint for every component (if there are more than one). @@ -49,14 +45,10 @@ Note that while the set of constraints is exponential, we can derive the missing For finding the minimum bottleneck, we introduce an additional variable $\ell \in \mathbb{R}^+_0$, that represent the length of the longest edge. The objective function can be expressed easily as -```equation -\min \ell -``` +$$\min \ell$$ To prohibit all edges larger than $\ell$, we add for every edge the constraint -```equation -\forall e\in E: \ell \leq c_e \cdot x_e -``` +$$\forall e\in E: \ell \leq c_e \cdot x_e$$ where $c_e$ represents the length of the edge $e$. ## Finding the minimum weight spanning tree @@ -65,8 +57,6 @@ After we have determined $\ell$, we look for the spanning tree with the lowest w We can do so with nearly the same model, just delete $\ell$ and all $x_e$ with $c_e > \ell$. Let $E'$ represent the remaining edges. As objective function, we can use -```equation -\min \sum_{e\ in E'} c_e \cdot x_e -``` +$$\min \sum_{e\ in E'} c_e \cdot x_e$$ which is simply the sum of the weight of the used edges.