What 5tuple corresponds to the number 256 under this type of
What 5-tuple corresponds to the number 256 under this type of encoding?
The Notation <x, y> . We define <x, y > = 2x( 2y+ 1) -1 . Recall from an earlier example that this function is one-to-one from the set of ordered pairs of natural numbers onto the set of natural numbers. The notation <x,y > is suggestive of an ordered pair, but remember, it\'s a natural number.You can think of this number as \"encoding\" the ordered pair (x, y).
It is easy to see that the function <x, <y, z > >, which we write more simply as <x, y, z > is a one-to-one function from the set of ordered triples of natural numbers onto the set of natural numbers. It can be used to encoded ordered-triples. Similar devices could be used to encode 4-tuples, 5-tuples, etc.
Example 4. What ordered triple corresponds to the number 43.
We are to find a, b, and c such that 43 = <a, <b, c > > .
Using d to denote the number <b, c > , we have 43 = <a, d>.
We first calculate a and d , then later we extract b, c from d.
43 = 44 - 1 = 25 + 23 + 22 - 1 = 22(23+ 21 + 20) -1 = 22(2 ×5+ 1) - 1 = 2a(2×d +1) -1 .
From this we see that a = 2 and d = 5
Now we extract b, c from d.
d = 5 = 6 - 1 = 22 + 21 - 1 = 21(21 + 20) -1 = 21( 2 ×1 + 1) -1 = 2b( 2 ×c + 1) -1
From this we see b = 1 and c = 1 so
43 = <2, <1, 1 > > .
So the answer is the ordered triple (2, (1, 1)).
Solution
Using d to denote the number <b, c > , we have 43 = <a, d>.
We first calculate a and d , then later we extract b, c from d.
43 = 44 - 1 = 25 + 23 + 22 - 1 = 22(23+ 21 + 20) -1 = 22(2 ×5+ 1) - 1 = 2a(2×d +1) -1 .
From this we see that a = 2 and d = 5
Now we extract b, c from d.
d = 5 = 6 - 1 = 22 + 21 - 1 = 21(21 + 20) -1 = 21( 2 ×1 + 1) -1 = 2b( 2 ×c + 1) -1
From this we see b = 1 and c = 1 so
43 = <2, <1, 1 > >
