#!/usr/bin/perl -w # Password use of the last 4 digits of your socail security number, so # there are 10,000 possibilities. # In a group of N people, what is the likelihood that the last four # digits of their social security number are the same? $p = 1; # probability $N=150; # population size for ($J=1; $J < $N; $J++) { $p =$p*(1 - $J/9999); $j = $J+1; if (($j % 10) == 0) {$P=1-$p; print " $j $P\n";} }