Step 2 (revise C). Select the minimum uncovered element.
Subtract this from each uncovered element and it to each
twice-covered element (i.e., to those with both a horizontal and
vertical line intersecting). Return to step 1.
Example:
Job
_ 1 2 3 4 5 _
| |
| 1 2 3 4 7 | 1
| 7 4 2 6 5 | 2
C = | 2 4 3 1 4 | 3
| 2 3 1 2 3 | 4
| 5 4 3 2 4 | 5
|_ _|
After subtracting min row elements:
_ 1 2 3 4 5 _
| |
| 0 1 2 3 6 | 1
| 5 2 0 4 3 | 2
| 1 3 2 0 3 | 3
| 1 2 0 1 2 | 4
| 3 2 1 0 2 | 5
|_ _|
After subtracting min colulmn elements:
_ 1 2 3 4 5 _
| | | | |
|--0--0--2--3--5--| 1
| 5 1 0 4 1 | 2
| 1 2 2 0 1 | 3
| 1 1 0 1 0 | 4
| 3 1 1 0 0 | 5
|_ | | | _|
The min number of lines to cover all zeros is 4: horizontal line
thru row 1 and vertical lines through columns 3, 4 and 5.
The min uncovered element is 1. Subtract from each uncovered
element and add to each twice covered element (cells (1,3),
(1,4) and (1,5)):
_ 1 2 3 4 5 _
| |
| 0* 0 4 5 7 | 1
| 4 0* 0 4 1 | 2
| 0 2 2 0* 1 | 3
| 0 0 0* 1 0 | 4
| 2 0 1 0 0* | 5
|_ _|
The min cover is now 5, by drawing a line through each column.
A min assignment is indicated by *. For example, we assign
person 1 to job 1, person 2 to job 2, person 3 to job 4, person
4 to job 3, and person 5 to job 5. (There are alternative optimal
assignments.)
Hypergraph. A set of nodes (or vertices), say V,
plus a set of edges, say E, such that each member of E is a subset
of V. When each member of E has exactly 2 nodes, [V,E] is a
graph. The hypergraph is a convenient mathematical way to
describe relations that involve more than two objects (nodes). One
special case is an
IIS hypergraph: each node represents an inequality and each
edge represents an IIS.
Hyperplane. An
affine set of dimension (n-1): {x: a'x = b}, where a is a nonzero
vector, called the normal of the hyperplane.
Hypograph (abbr. hypo{f,X}). {(x, z): x in X, z <= f(x)}
= region on or below the
graph of f.