Comp 163 final exam formulas

Birthday formula: if N values are chosen from among M, the probability p of no duplicates is (M/M)*(M-1)/M*(M-2)/M*...*(M-N+1)/M. The probability of two values being the same is then 1-p.

Approximate birthday formula: if N values are chosen from among M, the probability of no duplicates ≃ 1 - N2/2M, for N randomly distributed choices each in the range 1..M. The approximation is good as long as N2/2M is small compared to 1. The probability of duplicates is then N2/2M; again, this is accurate if it is much less than 1.0.

Bayes formula

Poisson distribution: if the average rate is λ, the probability P of the exact number being k is P(X=k) = λke/k!.


Handshaking formula: sum of all vertex degrees is 2*edges

Euler formula: for any planar graph, vertices + faces - edges = 2