|
If you are looking in programing way, post #3 have the solution. Or else if you are looking on mathematical way, post #4 is the solution.
I don't know what you mean by normal math question. There are no single pattern in maths. In different applications it takes in different ways. Quite similar thing is done in image processing, when converting an image into black and white, and many more usages are there.
|