Algorithm design for offline handwritten devnagri numerals using neural network