Is there a mathematical function that converts two numbers into one so that the two numbers can always be extracted again?
Sure. For example, supposing by "number", you mean "natural number", you can interweave the digits (taking the least significant digit of the second number to be the least significant digit of the result, say): 26 and 53 would become 2563. 902 and 8 (i.e, 008) would become 900028. And so on.
This method is so simple a child could understand it, is quite efficient space-wise (the size of the output, measured in number of digits, is about twice as large as the larger of the two inputs, so that it is as efficient as possible for inputs of about the same size), is bijective (every natural number represents a unique pair of natural numbers and vice versa), and generalizes readily to any fixed number of inputs. Not too shabby.
Get link
Facebook
Twitter
Pinterest
Email
Other Apps
Comments
Popular posts from this blog
What number should replace the question mark? 78214 : 292 38421 : 459 69517 : ? 586:answer 69 + 517 = 586;
A man has 53 socks in his drawer: 21 identical blue, 15 identical black and 17 identical red. The lights are fused and he is completely in the dark. How many socks must he take out to make 100 per cent certain he has a pair of black socks? 40 socks. If he takes out 38 socks, although it is very unlikely, it is possible they could all be blue and red. To make 100 per cent certain that he also has a pair of black socks he must take out a further two socks;
aplomb, dodge, graph, jerk, ? What comes next? laugh, maroon, link, nickel, midnigh maroon: the letters start and finish with the alphabetic sequence: ABcDEfGHiJKlmN;
Comments
Post a Comment