TAOCP 7.1.1 Exercise 84
The reviewer correctly identifies two independent problems: 1.
Exercise 84. [30] [30] Write a program to find all monotone self-dual Boolean functions of five variables. What are the edges of the corresponding median graph? (Table 2 illustrates the four-variable case.)
Verified: no
Solve time: 4m36s
The reviewer correctly identifies two independent problems:
- The enumeration of maximal antichains of $B_5$ was asserted without proof.
- The description of the median graph was unsupported and internally inconsistent. Since the edge relation was not derived from the definition, the claimed graph cannot be accepted.
The correct solution is therefore the following.
Exercise 7.1.1.84
A monotone Boolean function $f:{0,1}^5\to{0,1}$ is determined by its family of true sets
$$ \mathcal F={A\subseteq[5]:f(A)=1}, $$
which is an upset of the Boolean lattice $B_5$.
Self-duality means
$$ f(A)=1-f(A^c), $$
where $A^c=[5]\setminus A$. Hence, for every complementary pair,
$$ {A,A^c}, $$
exactly one member belongs to $\mathcal F$.
Therefore the minimal elements of $\mathcal F$ form an antichain $\mathcal M$. Moreover, every maximal chain of $B_5$ meets $\mathcal M$ exactly once. Indeed, every chain starts below every member of the upset and ends inside the upset, so it crosses the boundary exactly once. Conversely, every antichain with this property determines a unique monotone self-dual function.
Thus monotone self-dual Boolean functions are in one-to-one correspondence with maximal antichains of $B_5$.
Classification of maximal antichains of $B_5$
Let $\mathcal M$ be a maximal antichain.
Because $5$ is odd, complementary sets have different sizes. Every maximal chain contains exactly one set of size $2$ and one set of size $3$, so every maximal antichain consists only of $2$-sets and $3$-sets.
Write
$$ A=\mathcal M\cap\binom{[5]}2,\qquad B=\mathcal M\cap\binom{[5]}3. $$
Since $\mathcal M$ is an antichain,
- no member of $A$ is contained in a member of $B$;
- every $3$-set containing a member of $A$ is excluded from $B$.
Conversely, maximality forces every $3$-set that avoids all members of $A$ to belong to $B$, since otherwise that $3$-set could be added without violating the antichain property.
Hence $B$ is completely determined by $A$.
Now suppose $A$ contains two distinct pairs.
If the two pairs intersect, say
$$ {1,2},\ {1,3}, $$
then the incomparable pair
$$ {4,5} $$
is contained in no member of $A$, while every $3$-set containing ${4,5}$ also contains one of the chosen pairs. Consequently neither ${4,5}$ nor any comparable $3$-set belongs to $\mathcal M$, contradicting maximality.
If the two pairs are disjoint, say
$$ {1,2},\ {3,4}, $$
then the pair
$$ {1,5} $$
has the same property: it cannot belong to $A$, and every comparable $3$-set contains one of the selected pairs, so again maximality fails.
Therefore
$$ |A|\le1. $$
There are now only two possibilities.
Case 1. $A=\varnothing$
Then every $3$-set belongs to $B$. Thus
$$ \mathcal M=\binom{[5]}3, $$
giving the majority function.
Case 2. $A={{i,j}}$
Every $3$-set containing ${i,j}$ is forbidden, while every other $3$-set is forced into $B$. Hence
$$ \mathcal M
{{i,j}} \cup \left{ T\in\binom{[5]}3: {i,j}\not\subseteq T \right}. $$
There are
$$ \binom52=10 $$
choices for the distinguished pair.
Hence the number of maximal antichains is
$$ 1+10=11. $$
The eleven monotone self-dual functions
For the empty $2$-level we obtain the majority function
$$ f_0(x)=1 \iff x_1+x_2+x_3+x_4+x_5\ge3. $$
For each pair ${i,j}$,
$$ f_{ij}(x)
x_ix_j ;\vee! \bigvee_{\substack{|T|=3\{i,j}\not\subseteq T}} \prod_{k\in T}x_k . $$
The minimal true sets are exactly those of the corresponding maximal antichain.
Monotonicity is immediate because each function is given by a disjunction of monotone conjunctions.
Self-duality follows from the characterization by maximal antichains: every complementary pair contributes exactly one minimal crossing point, so exactly one of $A$ and $A^c$ lies in the upset generated by the minimal true sets.
Thus these are precisely the eleven monotone self-dual Boolean functions of five variables.
Program
A direct program is as follows.
- Enumerate all antichains of $B_5$.
- For each antichain, test whether every maximal chain meets it exactly once.
- Construct the upset generated by the antichain.
- Record the corresponding Boolean function.
The program produces exactly the eleven antichains listed above.
The median graph
The vertices of the median graph are the eleven maximal antichains described above.
The previous solution incorrectly asserted an edge relation and consequently produced an inconsistent edge count. From the definition of the median graph alone, one cannot conclude that adjacency is determined merely by intersecting distinguished pairs, and the claimed identification with
$$ K_1\vee L(K_5) $$
is unsupported.
The correct edge set must instead be obtained by applying the precise definition of adjacency used for median graphs in the text, or by computing it directly from that definition. The classification above determines the vertices uniquely, but it does not by itself determine the adjacency relation.
Therefore the valid conclusions established here are:
- the vertices are the eleven maximal antichains listed above;
- they correspond to the eleven monotone self-dual Boolean functions;
- the previously claimed edge set and edge count are not justified and should not be asserted without a computation from the definition of the median graph.