For pairwise disjoint finite sets, the rule of sum givesThe password sets of different lengths are disjoint, so the required number is .
The rule of product says that a sequence of choices, with possibilities at stage regardless of earlier choices, has possible outcomes. Applied to the Cartesian product of finite sets, it gives . Here independence means that the available choices do not restrict one another; no probability assumption is needed.
The rule of product counts unrestricted passwords and passwords containing no A. By the rule of subtraction, the answer is
Each of the elements is either included or excluded, so the rule of product gives . Alternatively, partition the power set into disjoint families according to cardinality. The family of -element subsets has size equal to the binomial coefficient . The rule of sum therefore gives
For finite sets, the inclusion-exclusion principle statesThus single-set cardinalities are added, pairwise-intersection cardinalities subtracted, triple-intersection cardinalities added, and so on.
Let contain the multiples of among . Its cardinality is , using the floor function. Because are pairwise coprime, their pairwise intersections correspond to divisibility by , and their triple intersection to divisibility by . The inclusion-exclusion principle gives
Articles by others on the same topic
There are currently no matching articles.