Binary relations with no empty row or column (source code)

= Binary relations with no empty row or column
{title2=$\sum_{k=0}^n(-1)^k\binom nk(2^{n-k}-1)^n$}

Represent a <binary relation> on an $n$-element <finite set> by its zero-one incidence <matrix>. If no column may be empty, each column has $2^n-1$ choices. Apply the <inclusion-exclusion principle> to empty rows: fixing $k$ empty rows leaves $(2^{n-k}-1)^n$ allowed matrices. Summing over those row sets with alternating signs yields the displayed count.