Some very useful algorithms, to be used only in case of emergency.