Algorithms to solve handwritten digits recognition problem