https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle
In combinatorics (combinatorial mathematics), the inclusion–exclusion principle is a counting technique which generalizes the familiar method of obtaining the number of elements in the union of two finite sets; symbolically expressed as
当n = 3时,公式为:
一般地:
也可以写成: