Algorithm scheme