On a grid, the numbering is done as shown in the image below. Dotted lines go up and solid lines go down.
Find out the formula to describe number on grid given the standard $ (x, y) $ coordinate. Credit goes to my colleague Jignesh Parsana for the problem.
Update: I found that this is Cantor's Pairing Function as given at http://szudzik.com/ ElegantPairing.pdf
Find out the formula to describe number on grid given the standard $ (x, y) $ coordinate. Credit goes to my colleague Jignesh Parsana for the problem.
Update: I found that this is Cantor's Pairing Function as given at http://szudzik.com/
No comments:
Post a Comment