design amp theory of algorithms 946