User blog comment:LittlePeng9/ITTM galore/@comment-24509095-20140326102311/@comment-5529393-20140326120829

It's not really that complicated, it's just that people aren't thinking about encoding in the correct terms.

It's simple to encode a set S of natural numbers into a binary sequence:  just let the nth member of the binary sequence (counting from 0) be 1 of n is in S, and 0 if n is not in S. So {1, 2, 4, 8, 16, ...} -> 011010001000... .

A relation R is a set of pairs of natural numbers. So to turn it into a binary sequence, we need a bijection f from N^2 to N. This bijection induces a bijection from sets of pairs of natural numbers to sets of natural numbers, and then we can use the above mapping to turn it into a binary sequence. For example, if 3 R 5, i.e. (3,5) is in our relation R, then we set the f(3,5)th bit to 1. If (3,5) is not in our relation R, we set the  f(3,5)th bit to 0.

In our particular case, LittlePeng9 is using the bijection  = 2^a (2b+1) - 1, and the relation R = <; (a,b) is in < if a < b. So <3,5> = 2^3 (2*5+1) - 1  = 87 is set to 1 since 3 < 5, but <5,3> = 2^5 (2*3+1) - 1 = 223 is set to 0 since 5 is not less than 3. Pretty straightforward. As an exercise, verify whether or not Cloudy176's binary sequence is correct.

Now you may be asking, why does the relation a < b represent w? The reason is that a < b is in fact a well ordering, and the order is 0, 1, 2, 3, ... .  That is clearly of order type w, so we say that the relation a < b represents the ordinal w. Obviously, there are many orders of N that have order type w; 3,2,1,0,6,5,4,9,8,7... would also represent w, for example.