## Paradox of uniform prob. distribution on Z+ vs cardinality, etc.

 Quote by Stephen Tashi I'm not claiming it. I'm merely trying to understand why it doesn't work. I'd be delighted to see a specific F if you have one.
Well you asked for it, here it is. It was a good deal harder to do than I expected. It took a few wrong turns producing invalid F's (that either weren't surjective, or weren't injective) before I found a solution. Reminder:

 Let M be the set of 1-to-1 mappings of the non-negative integers $Z^+$ onto themselves. Let F be a 1-to-1 mapping between the elements of M and the real numbers in the interval [0,1).
First let b be the infinite string of binary digits representing a real number r between 0 and 1 (including 0, but not including 1). For example if r = 0.1101101000011010111... then b = 1101101000011010111.... We adopt the convention that b does NOT end in an infinite series of 1s - because any real number that ends in an infinite series of 1s has an alternate representation that does NOT end in an infinite series of 1s. for example 0.0111111... = 0.100000000... Therefore, b contains an infinite number of 0s.

First, we map b to an infinite series of positive integers $a_i$. Let p_1 be the position in b of the (i-1)'th 0 in b (or p_1 = 0 if i = 1), and let p_2 be the position in b of the i'th 0 in b. Then define $a_i = p_2 - p_1$.

For example, if b = 10011000... (ending in an infinite series of 0s) then:
$a_1$ = 2 - 0 = 2
$a_2$ = 1
$a_3$ = 1
$a_4$ = 3
$a_5, a_6, a_7,$ etc. = 1

Now, to construct m from the $a_i$, we loop over the $a_i$ building m.

Define a sequence of partial functions $m_i$ (corresponding to our incremental construction of m). Each $m_i$ can be considered as a set of ordered pairs of integers. Define $D_i$ to be the support of $m_i$ (the set of values where it is defined), and $R_i$ to be the image of $D_i$ under $m_i$. $m_0$ is empty.

Given $a_0, a_1, ..., a_i, a_{i+1}$ and $m_0, m_1, ..., m_i$, we now construct $m_{i+1}$.

Define a function f(S, v) where S is a set of positive integers and v is a positive integer. f(S, v) gives the v'th smallest integer NOT an element of S.

Let $d_{i+1} = f(D_i, 1)$
Let $r_{i+1} = f(R_i, 1)$
CASE 1: If $d_{i+1} < r_{i+1}$, then $m_{i+1}$ is the same as $m_i$ except for the additional pair $(d_{i+1}, f(R_i, a_{i+1}))$
CASE 2: Else, If $d_{i+1} \geq r_{i+1}$, then $m_{i+1}$ is the same as $m_i$ except for the additional pair $(f(D_i, a_{i+1}), r_{i+1})$.

Define m as the function where m(a) = b if and only if there exists some i where $m_i$(a) = b.

Finally, following this process (starting with r, deriving b from it, deriving the a_i, and finally the $m_i$, and then m), we define F to be the function where F(r) = m.

To produce $F^{-1}(m)$, repeatedly pick the pair (v, w) from m that has not yet been chosen, that minimizes min(v, w). If there is a tie between two different pairs, choose the pair with the larger v and the smaller w. Then, produce the appropriate $a_i$ (based on the domain and range values already used) for the larger element of the pair. Then convert the $\{a_i\}$ back into a binary string b, and finally to the real number r.

Now, I first claim that every m generated by F is an element of M. For that to be true, two things must be true: First, if (v, w) is in m, we can't have either (y, w) or (v, z) also in m, where y $\neq$ v and z $\neq$ w. Second, for every v in $Z^+$, there must exist a (v, w) in m (for some w), and also there must exist an (x, v) in m (for some x).

The first thing is guaranteed because every time we added a new pair (v, w) to $m_{i+1}$, the values used were guaranteed not to have been used before in $m_i$, because v was of the form $f(D_i, *)$ and w was of the form $f(R_i, *)$.

The second thing is guaranteed because at each step, either v or w was the smallest unused element of either the domain or the range. So after 2n steps, $m_{2n}$ is guaranteed to have pairs (v, w) and (x, v) for any v < n.

So, every m generated by F is an element of M. Next we need to show that F is one-to-one. Suppose we had different real numbers r1, r2 with binary expansions b1, b2, and f(r1) = m = f(r2). Because b1 != b2, the $a_i$ must also differ. So choose the smallest i where $a_{1,i} \neq a_{2,i}$ (denoting the difference between the $a_i$ for b1 vs the $a_i$ for b2 by 1 or 2 in the subscript). Since that was the smallest i, $m_{i-1}$ must be the same for both b1 and b2. So if CASE 1 from the calculation procedure for m_i is met, then it must be met for both, and m1 has $(d_{1,i+1}, f(R_{1,i}, a_{1,i+1}))$, whereas m2 has $(d_{2,i+1}, f(R_{2,i}, a_{2,i+1}))$. Since $d_{1, i+1} = d_{2, i+1}$, m1 and m2 have different values for the same element of their domain, so they are different functions. If instead CASE 2 is met, a similar argument shows that again, m1 $\neq$ m2. So, F is one-to-one.

Next, F is surjective because the method described earlier to construct $F^{-1}(m)$ will always produce a real number r where F(r) = m.

OKAY!

Well, it's certainly not "uniform." For example, there's at least a 1/2 chance that given a random real number r between 0 and 1, F(r)(1) = 1. Any binary string that begins with 0 will have that property, corresponding to a real number between 0.0 (zero) and 0.1 (one half). With a random r, m = F(r) is likely to map small numbers to other small numbers.
 Recognitions: Science Advisor In the recursion, I don't understand the initialization step. How are $D_1$ and $R_1$ defined? (i.e. I'm asking about the subscript that is the number 1, not the letter "i" ).
 D_i is the set of all numbers v where (v, w) is in m_i, and R_i is the set of all numbers w where (v, w) is in m_i. They don't really need a base case, but you could say that D_0 and R_0 = the empty set.
 Perhaps an example would help. $\pi - 3 = 0.14159... = 0.001001000011111101101010...$ in binary. Calculating $F(\pi - 3) = m$ we find: $a_1 = 1, d_1 = 1, r_1 = 1, m(1) = 1$ $a_2 = 1, d_2 = 2, r_2 = 2, m(2) = 2$ $a_3 = 2, d_3 = 3, r_3 = 3, m(4) = 3$ $a_4 = 1, d_4 = 3, r_4 = 4, m(3) = 4$ $a_5 = 2, d_5 = 5, r_5 = 5, m(6) = 5$ $a_6 = 1, d_6 = 5, r_6 = 6, m(5) = 6$ $a_7 = 1, d_7 = 7, r_7 = 7, m(7) = 7$ $a_8 = 1, d_8 = 8, r_8 = 8, m(8) = 8$ $a_9 = 7, d_9 = 9, r_9 = 9, m(15) = 9$ $a_{10} = 3, d_{10} = 9, r_{10} = 10, m(9) = 12$ $a_{11} = 2, d_{11} = 10, r_{11} = 10, m(12) = 10$ $a_{12} = 2, d_{11} = 10, r_{11} = 11, m(10) = 13$ and so on.
 Recognitions: Science Advisor mXSCNT, I see what you did. That is a very ingenious example. My intuitive interpretation of that example is an $F^-1$ that sends all maps with the same initial sequence of ordered pairs into the same set of intevals, then to further parcel out the maps defined by longer sequences, you must subdivide the first set of intervals. This gives more measure to the events defined earlier in the sequences than to events defined later. That would (intuitively) imply that an algorithm to get a 'uniform" $F^-1$ would have to assign sequences in a manner that didn't make decisions by processing the ordered pairs in a sequential manner. It would have to make decisions based on some overall property of the sequence. For example, mapping the sequence to a function and using the fourier series for it, or something like that. Of course, such attempts should fail. But how strong an impossibility result can be shown by an indirect proof of the form: It is possible to ..... because to do so would imply there was a translation invariant probability distribution on the nonzero integers (?) Putting things in a slightly postive way, can it be as general as the following: (?) Let M be a set of mappings of the nonzero integers into themselves (no requirement that these be 1-1 mappings or that they be subjective.) Let $(X,\mu,\sigma)$ be a measure space (no requirement that $X$ be [0,1] or that the measure $\mu$ be Lebesgue measure) Let $F$ be a mapping whose domain is $X$ and whose range is $M$. Let $S_{i,j}$ denote the subset of $X$ defined by $\{x: F(x)(i) = j\}$ Then at least one of the following must be true. 1) There exists nonzero integers i,j such that $S_{i,j}$ is not a $\mu$-measureable set. 2) There exists nonzero integers j,k such that $\sum_{i=0}^{\infty} \mu( S_{i,j}) \ne \sum_{i=0}^{\infty}\mu(S_{i,k})$

 Quote by Stephen Tashi Putting things in a slightly postive way, can it be as general as the following: (?) Let M be a set of mappings of the nonzero integers into themselves (no requirement that these be 1-1 mappings or that they be subjective.) Let $(X,\mu,\sigma)$ be a measure space (no requirement that $X$ be [0,1] or that the measure $\mu$ be Lebesgue measure) Let $F$ be a mapping whose domain is $X$ and whose range is $M$. Let $S_{i,j}$ denote the subset of $X$ defined by $\{x: F(x)(i) = j\}$ Then at least one of the following must be true. 1) There exists nonzero integers i,j such that $S_{i,j}$ is not a $\mu$-measureable set. 2) There exists nonzero integers j,k such that $\sum_{i=0}^{\infty} \mu( S_{i,j}) \ne \sum_{i=0}^{\infty}\mu(S_{i,k})$
Where are you getting these statements from? Using my example of F, both of those statements are false. (1) is false because $S_{i,j}$ is a countable union of intervals within [0, 1) so it is measurable. (2) is false because $\sum_{i=0}^{\infty} \mu(S_{i,j}) = 1$ for all j, because $\bigcup_{i=0}^{\infty} S_{i,j}$ is the set of all real numbers r where if m = F(r) then $m(i) = j$ for some $i$, which is just $[0, 1)$ because m is always a bijection.

Recognitions:
 Quote by mXSCNT Where are you getting these statements from? Using my example of F, both of those statements are false. (1) is false because $S_{i,j}$ is a countable union of intervals within [0, 1) so it is measurable.
 (2) is false because $\sum_{i=0}^{\infty} \mu(S_{i,j}) = 1$ for all j, because $\bigcup_{i=0}^{\infty} S_{i,j}$ is the set of all real numbers r where if m = F(r) then $m(i) = j$ for some $i$, which is just $[0, 1)$ because m is always a bijection.
I agree. I was trying to express the probability that $j$ is the final outcome of the random sampling. The correct way to to do that is simply to say
2) There exists nonzero integers i,j,k such that $\mu(S_{i,j}) \ne \mu(S_{i,k})$
This takes the view that we can sample the integers by fixing an arbitrary $i$ and then let the randomly selected $r$ define a m = F(r) that maps it to another integer.
In my original scenario, I was selecting $i$ at random from a distribution and also selecting $r$ at random. So comparing the probability of getting $j$ to the probability of getting $k$ would compare sums taken over $i$ but they would involve products of the $\mu(S_{i,j})$ and the density $g(i)$.
 I think you do want to restrict X to be [0, 1). Because if X were all the real numbers, even if you could define a map where $\mu(S_{i, j})$ is the same for any i, j, that wouldn't help you since you can't uniformly sample from all the real numbers. Anyway you've basically just stated an impossibility result. You know it's impossible to have a uniform distribution over the integers.