PDF Search: the em algorithm and extensions