|
101 | 101 | "SubsetSum": [Subset Sum], |
102 | 102 | "MinimumFeedbackArcSet": [Minimum Feedback Arc Set], |
103 | 103 | "MinimumFeedbackVertexSet": [Minimum Feedback Vertex Set], |
| 104 | + "MultipleChoiceBranching": [Multiple Choice Branching], |
104 | 105 | "ShortestCommonSupersequence": [Shortest Common Supersequence], |
105 | 106 | "MinimumSumMulticenter": [Minimum Sum Multicenter], |
106 | 107 | "SteinerTree": [Steiner Tree], |
@@ -1945,6 +1946,46 @@ NP-completeness was established by Garey, Johnson, and Stockmeyer @gareyJohnsonS |
1945 | 1946 | *Example.* Consider $G$ with $V = {0, 1, 2, 3, 4, 5}$ and arcs $(0 arrow 1), (1 arrow 2), (2 arrow 0), (1 arrow 3), (3 arrow 4), (4 arrow 1), (2 arrow 5), (5 arrow 3), (3 arrow 0)$. This graph contains four directed cycles: $0 arrow 1 arrow 2 arrow 0$, $1 arrow 3 arrow 4 arrow 1$, $0 arrow 1 arrow 3 arrow 0$, and $2 arrow 5 arrow 3 arrow 0 arrow 1 arrow 2$. Removing $A' = {(0 arrow 1), (3 arrow 4)}$ breaks all four cycles (vertex 0 becomes a sink in the residual graph), giving a minimum FAS of size 2. |
1946 | 1947 | ] |
1947 | 1948 |
|
| 1949 | +#{ |
| 1950 | + let x = load-model-example("MultipleChoiceBranching") |
| 1951 | + let nv = graph-num-vertices(x.instance) |
| 1952 | + let arcs = x.instance.graph.inner.edges.map(e => (e.at(0), e.at(1))) |
| 1953 | + let sol = x.samples.at(0) |
| 1954 | + let chosen = sol.config.enumerate().filter(((i, v)) => v == 1).map(((i, _)) => i) |
| 1955 | + [ |
| 1956 | + #problem-def("MultipleChoiceBranching")[ |
| 1957 | + Given a directed graph $G = (V, A)$, arc weights $w: A -> ZZ^+$, a partition $A_1, A_2, dots, A_m$ of $A$, and a threshold $K in ZZ^+$, determine whether there exists a subset $A' subset.eq A$ with $sum_(a in A') w(a) >= K$ such that every vertex has in-degree at most one in $(V, A')$, the selected subgraph $(V, A')$ is acyclic, and $|A' inter A_i| <= 1$ for every partition group. |
| 1958 | + ][ |
| 1959 | + Multiple Choice Branching is the directed-graph problem ND11 in Garey & Johnson @garey1979. The partition constraint turns the polynomial-time maximum branching setting into an NP-complete decision problem: Garey and Johnson note that the problem remains NP-complete even when the digraph is strongly connected and all weights are equal, while the special case in which every partition group has size 1 reduces to ordinary maximum branching and becomes polynomial-time solvable @garey1979. |
| 1960 | + |
| 1961 | + A conservative exact algorithm enumerates all $2^{|A|}$ arc subsets and checks the partition, in-degree, acyclicity, and threshold constraints in polynomial time. This is the brute-force search space used by the implementation.#footnote[We use the registry complexity bound $O^*(2^{|A|})$ for the full partitioned problem.] |
| 1962 | + |
| 1963 | + *Example.* Consider the digraph on $n = #nv$ vertices with arcs $(0 arrow 1), (0 arrow 2), (1 arrow 3), (2 arrow 3), (1 arrow 4), (3 arrow 5), (4 arrow 5), (2 arrow 4)$, partition groups $A_1 = {(0 arrow 1), (0 arrow 2)}$, $A_2 = {(1 arrow 3), (2 arrow 3)}$, $A_3 = {(1 arrow 4), (2 arrow 4)}$, $A_4 = {(3 arrow 5), (4 arrow 5)}$, and threshold $K = 10$. The highlighted selection $A' = {(0 arrow 1), (1 arrow 3), (2 arrow 4), (3 arrow 5)}$ has total weight $3 + 4 + 3 + 3 = 13 >= 10$, uses exactly one arc from each partition group, and gives in-degrees 1 at vertices $1, 3, 4,$ and $5$. Because every selected arc points strictly left-to-right in the drawing, the selected subgraph is acyclic. The canonical fixture contains #x.optimal.len() satisfying selections for this instance; the figure highlights one of them. |
| 1964 | + |
| 1965 | + #figure({ |
| 1966 | + let verts = ((0, 1.6), (1.3, 2.3), (1.3, 0.9), (3.0, 2.3), (3.0, 0.9), (4.6, 1.6)) |
| 1967 | + canvas(length: 1cm, { |
| 1968 | + for (idx, arc) in arcs.enumerate() { |
| 1969 | + let (u, v) = arc |
| 1970 | + let selected = chosen.contains(idx) |
| 1971 | + draw.line( |
| 1972 | + verts.at(u), |
| 1973 | + verts.at(v), |
| 1974 | + stroke: if selected { 2pt + graph-colors.at(0) } else { 0.9pt + luma(180) }, |
| 1975 | + mark: (end: "straight", scale: if selected { 0.5 } else { 0.4 }), |
| 1976 | + ) |
| 1977 | + } |
| 1978 | + for (k, pos) in verts.enumerate() { |
| 1979 | + g-node(pos, name: "v" + str(k), label: [$v_#k$]) |
| 1980 | + } |
| 1981 | + }) |
| 1982 | + }, |
| 1983 | + caption: [Directed graph for Multiple Choice Branching. Blue arcs show the satisfying branching $(0 arrow 1), (1 arrow 3), (2 arrow 4), (3 arrow 5)$ of total weight 13; gray arcs are available but unselected.], |
| 1984 | + ) <fig:mcb-example> |
| 1985 | + ] |
| 1986 | + ] |
| 1987 | +} |
| 1988 | + |
1948 | 1989 | #problem-def("FlowShopScheduling")[ |
1949 | 1990 | Given $m$ processors and a set $J$ of $n$ jobs, where each job $j in J$ consists of $m$ tasks $t_1 [j], t_2 [j], dots, t_m [j]$ with lengths $ell(t_i [j]) in ZZ^+_0$, and a deadline $D in ZZ^+$, determine whether there exists a permutation schedule $pi$ of the jobs such that all jobs complete by time $D$. Each job must be processed on machines $1, 2, dots, m$ in order, and job $j$ cannot start on machine $i+1$ until its task on machine $i$ is completed. |
1950 | 1991 | ][ |
|
0 commit comments