algorithmic patterns