Dear Alex B.I sent you the above reply three times, but I think the second time got lost again. In the last attempt, I had [code]d the figures to get them correct. So it would be nice if you replace the above by it. I have registered myself in order to be able to attach files, which I tried, but it did not work. So I put it below, but now with all layout details, I hope.
Michiel
GREEDY PHASE:
| 1 | |
| 1 | |
| . | D |
| . | |
| 1 | |
|-----------|-------|
| | |
| C | B |
| | |
A
If block B is empty (0 by 0), then we are done, the family has a SDR. If B contains a 1, interchange rows through C and columns through D of A to put a 1 in the upper left corner of B. Next, replace B with the matrix obtained by using all but the first row and first column of B, replace C and D accordingly, and resume the greedy phase.
So we finally arrive at an empty B or a B with only zero entries.
B HAS ONLY ZEROS:
| 1 | |
| 1 | |
| . | D |
| . | |
| 1 | |
|-----------|-------|
| | |
| C | 0 |
| | |
A
If block C has only zeros, we are done; the family has no SDR because the sets associated with the columns through C together with a set associated with a column through D violate the marriage condition; that is, the union of these sets contains one fewer elements than the number of sets.
So assume that C has at least one 1. Let E be the columns of C that contain a 1. Interchange corresponding pairs of rows and columns of A to reach the following figure:
| 1 | | |
| . | | H |
| 1 | | |
|-------|-------|-------|
| | 1 | |
| | . | G |
| | 1 | |
|-------|-------|-------|
| | | |
| 0 | E | 0 |
| | | |
A
If aij = 1 in block E and ajk = 1 in block G, then interchange columns j and k of A and resume the greedy phase with B the lower right corner block which now contains a 1.
Otherwise, G has only zeros. If H has only zeros as well, then the set corresponding to any column through G violates the marriage condition.
LABELED PHASE:
| 1 | | |
| . | | H |
| 1 | | |
|-------|-------|-------|
| | 1 | |
| F | . | 0 |
| | 1 | |
|-------|-------|-------|
| | | |
| 0 | E | 0 |
| | | |
A
Having reached here, every column of E contains a 1 and H does not only contain zeros. If the block F contains only zeros, then we are done; the family has no SDR because the sets corresponding to the columns through F and one column through H violates the marriage condition.
If for every nonzero column of F, the corresponding row of H has only zeros, then let E1 be the nonzero columns of F and let G1 be the rows of H corresponding to the columns of E1. Interchange corresponding pairs of rows and columns to get
| 1 | | | |
| . | | | H1 |
| 1 | | | |
|-------|-------|-----------|-----------|
| | 1 | | |
| F1 | . | | G1 |
| | 1 | | |
|---------------|-----------|-----------|
| | | 1 | |
| | | 1 | |
| 0 | E1 | . | 0 |
| | | . | |
| | | 1 | |
|---------------|-----------|-----------|
| | | |
| | | |
| 0 | E | 0 |
| | | |
| | | |
A
If G1 has a 1, then we can interchange a column through G1 with a column through E1 to put a 1 in the zero block G just below G1, whence we can do another column interchange to put a 1 into the lower right block B of A and resume the GREEDY PHASE.
Otherwise, G1 has only zero entries. If F1 has only zeros, then, as with F, the sets corresponding to the columns of F1 and one set corresponding to a column of G1 violate the marriage condition. Otherwise, let E2 be the nonzero columns of F1. Interchange corresponding pairs of rows and columns to reach
| 1 | | | | H2 |
|---|---|-------|-----------|-----------|
| F2| 1 | | | G2 |
|-------|-------|-----------|-----------|
| | | 1 | | |
| 0 | E2| . | | 0 |
| | | 1 | | |
|---------------|-----------|-----------|
| | | 1 | |
| | | 1 | |
| 0 | E1 | . | 0 |
| | | . | |
| | | 1 | |
|---------------|-----------|-----------|
| | | |
| | | |
| 0 | E | 0 |
| | | |
| | | |
A
If G2 contains a 1, we can do a series of column swaps to put a 1 to the right of E and resume the GREEDY PHASE. Otherwise, if F2 contains only zero entries, then the sets corresponding to the columns through F2 and one set corresponding to a column through G2 violate the marriage condition.
Otherwise, we continue the construction of Ei's, Fi's, Gi's and Hi's until some Gi has a nonzero entry (in which case we do a series of swaps that puts a 1 to the right of E and resume the GREEDY PHASE) or some Fi has only zero's (in which case the marriage condition is violated). Since H has at least one 1, this process stops before we reach a Hi with zero rows.
[Example:
1 0 0 0 1
1 1 0 0 0
0 1 1 0 0
0 0 1 1 0
0 0 0 1 0
A series of 4 swaps needed to put a 1 in the lower right corner.]