The Merkel Algorithm