Skip to main content
edited body
Source Link
RobPratt
  • 5.4k
  • 1
  • 15
  • 25

This doesn't answer the NP-hardness, but you can solve the problem via integer linear programming as follows. For $(i,j)\in E$, let binary decision variable $x_{i,j}$ represent the flow from $i$ to $j$. The problem is to minimize $z$ subject to: \begin{align} \sum_{(i,j)\in E} x_{i,j} - \sum_{(j,i)\in E} x_{j,i} &= \begin{cases} 1 &\text{if $i=s$}\\ -1 &\text{if $i=t$}\\ 1 &\text{otherwise}\end{cases} && \text{for $i\in V$}\\ x_{i,j} &\in \{0,1\} &&\text{for $(i,j)\in E$}\\ z &\ge \sum_{(i,j)\in E} c_{i,j}^r x_{i,j} &&\text{for $r\in\{1,\dots,k\}$} \end{align}\begin{align} \sum_{(i,j)\in E} x_{i,j} - \sum_{(j,i)\in E} x_{j,i} &= \begin{cases} 1 &\text{if $i=s$}\\ -1 &\text{if $i=t$}\\ 0 &\text{otherwise}\end{cases} && \text{for $i\in V$}\\ x_{i,j} &\in \{0,1\} &&\text{for $(i,j)\in E$}\\ z &\ge \sum_{(i,j)\in E} c_{i,j}^r x_{i,j} &&\text{for $r\in\{1,\dots,k\}$} \end{align}

This doesn't answer the NP-hardness, but you can solve the problem via integer linear programming as follows. For $(i,j)\in E$, let binary decision variable $x_{i,j}$ represent the flow from $i$ to $j$. The problem is to minimize $z$ subject to: \begin{align} \sum_{(i,j)\in E} x_{i,j} - \sum_{(j,i)\in E} x_{j,i} &= \begin{cases} 1 &\text{if $i=s$}\\ -1 &\text{if $i=t$}\\ 1 &\text{otherwise}\end{cases} && \text{for $i\in V$}\\ x_{i,j} &\in \{0,1\} &&\text{for $(i,j)\in E$}\\ z &\ge \sum_{(i,j)\in E} c_{i,j}^r x_{i,j} &&\text{for $r\in\{1,\dots,k\}$} \end{align}

This doesn't answer the NP-hardness, but you can solve the problem via integer linear programming as follows. For $(i,j)\in E$, let binary decision variable $x_{i,j}$ represent the flow from $i$ to $j$. The problem is to minimize $z$ subject to: \begin{align} \sum_{(i,j)\in E} x_{i,j} - \sum_{(j,i)\in E} x_{j,i} &= \begin{cases} 1 &\text{if $i=s$}\\ -1 &\text{if $i=t$}\\ 0 &\text{otherwise}\end{cases} && \text{for $i\in V$}\\ x_{i,j} &\in \{0,1\} &&\text{for $(i,j)\in E$}\\ z &\ge \sum_{(i,j)\in E} c_{i,j}^r x_{i,j} &&\text{for $r\in\{1,\dots,k\}$} \end{align}

Source Link
RobPratt
  • 5.4k
  • 1
  • 15
  • 25

This doesn't answer the NP-hardness, but you can solve the problem via integer linear programming as follows. For $(i,j)\in E$, let binary decision variable $x_{i,j}$ represent the flow from $i$ to $j$. The problem is to minimize $z$ subject to: \begin{align} \sum_{(i,j)\in E} x_{i,j} - \sum_{(j,i)\in E} x_{j,i} &= \begin{cases} 1 &\text{if $i=s$}\\ -1 &\text{if $i=t$}\\ 1 &\text{otherwise}\end{cases} && \text{for $i\in V$}\\ x_{i,j} &\in \{0,1\} &&\text{for $(i,j)\in E$}\\ z &\ge \sum_{(i,j)\in E} c_{i,j}^r x_{i,j} &&\text{for $r\in\{1,\dots,k\}$} \end{align}