Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.