Problem
Given n∈N∗, consider a family of subsets A1,A2,...,Ak of the set S={1,2,...,n}, where no two subsets contain each other. That is, for ∀ 1≤i<j≤k, both Ai⊈Aj and Ai⊉Aj hold.
- When n=5, find kmax.
- For n∈N∗, find f(n)=kmax.
Theorem
For ∀ set S with n elements, at most (⌊2n⌋n) of its subsets can be chosen such that no two of them contain each other.
Proof
Clearly, if we choose all (mn) subsets of size m, no containment relation can occur. Since the maximum value of (mn) is (⌊2n⌋n), we get kmax≥(⌊2n⌋n).
Next, we need to prove kmax≤(⌊2n⌋n).
For a subset A of S, define PA as the set of ∣A∣!×∣∁SA∣! permutations formed by pairing every permutation of A with every permutation of ∁SA. For example, for S={1,2,3,4,5} and A={2,3}, PA is:
2 3 | 1 4 5
3 2 | 1 4 5
2 3 | 1 5 4
3 2 | 1 5 4
2 3 | 4 1 5
3 2 | 4 1 5
2 3 | 4 5 1
3 2 | 4 5 1
2 3 | 5 1 4
3 2 | 5 1 4
2 3 | 5 4 1
3 2 | 5 4 1
∣PA∣=12.
We can show that for any two subsets A,B of S (A=B), A and B contain neither the other if and only if PA∩PB=∅.
Sufficiency
If A and B have a containment relation, assume without loss of generality that A⊂B. Let C=∁BA and D=∁SB; then we can construct the permutation A⊕C⊕D∈(PA∩PB). So when PA∩PB=∅, A and B contain neither the other.
Necessity
If PA∩PB=∅, assume without loss of generality that ∣A∣≤∣B∣. Let Q∈(PA∩PB) be a permutation. Either A=∅, in which case A⊂B; or A and B are both a prefix of Q, and since ∣A∣≤∣B∣, again A⊂B. So when A and B contain neither the other, PA∩PB=∅.
Therefore, the original problem is equivalent to choosing k subsets {A1,A2,...,Ak} such that for ∀ 1≤i<j≤k, PAi∩PAj=∅.
Note that the set of all permutations of S has size n!, so:
i=1∑k∣PAi∣≤n!
That is:
i=1∑k∣Ai∣!×(n−∣Ai∣)!≤n!
Dividing both sides by n! gives:
i=1∑k(∣Ai∣n)1≤1
Since (∣Ai∣n)≤(⌊2n⌋n), we have (∣Ai∣n)1≥(⌊2n⌋n)1, so k≤(⌊2n⌋n). This proves the original proposition.

Image source backup
References
Sperner’s theorem and its proof | www.cnblogs.com backup