Ryser's formula for the permanent
ID: ryser-s-formula-for-the-permanent
For an matrix , Ryser's formula for the permanent isExpanding a product chooses one column for each row. The alternating subset sum cancels each choice that fails to use every column, by inclusion-exclusion; the surviving choices are exactly the permutations in the permanent.
For a two-by-two matrix, the formula becomes . Maintaining row sums while enumerating subsets in Gray-code order gives an arithmetic algorithm, much smaller than enumerating permutations, although still exponential in .
New to topics? Read the docs here!