1
$\begingroup$

How can I reversibly combing two very large numbers, such as 9,828,485,546,536,174,656,640,115,183 and 43,044,700,185? I need them to be combined into a single number, and the order of the numbers must be remained intact, so being required to flip them would be unfavorable, but I could just add a 0 or 1 at the front or end to specify whether or not the numbers had been flipped if I had too.

1 Answers 1

1

See this prior question on pairing functions, e.g. the classical Cantor pairing or another "elegant" one useful for depth-first ordering.

  • 0
    Neither the elegant, nor the cantor pairing functions work for numbers this large.2018-08-14