• Home
  • About

Shores of the Dirac Sea

A blog about physics… mostly.

Feeds:
Posts
Comments
« Super giant
A public service announcement »

Puzzling output.

August 3, 2009 by dberenstein

As I told you previously, my project for the summer was to learn some Python language. I’ve been toying with it for a bit and with a few lines of code I was happily getting output. It’s great that I don’t have to declare types before using variables! And it took me a while before I realized that indentation substitutes for all the curly brackets. So far, I find it rather intuitive.

So in the end this is what my computer printed to a file:

0,1,1,1,0,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,0,0,1,1,0,1,1,0,1,0,
0,1,1,0,0,0,1,0,0,0,1,0,1,1,1,1,0,0,1,0,0,0,0,1,0,0,1,0,1,0,
1,1,0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,
1,0,1,0,1,0,1,0,0,0,1,1,1,1,0,1,0,1,0,1,0,1,1,0,1,1,0,0,0,1,
1,1,1,0,1,1,1,1,0,1,0,1,0,1,1,0,1,0,0,0,1,0,0,0,0,1,1,0,0,0,
1,0,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,0,1,0,
1,0,1,0,1,1,1,1,0,0,1,0,1,0,0,1,0,0,1,1,1,0,1,1,1,1,0,1,0,1,
0,0,0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,0,0,1,0,0,1,
0,1,0,0,1,0,1,0,0,0,1,1,0,0,1,0,1,1,1,0,0,1,0,1,0,0,0,1,1,0,
1,0,0,1,1,1,1,0,0,0,0,1,0,0,0,0,0,1,0,1,1,1,0,0,0,1,0,0,1,0,
1,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,1,0,1,1,0,1,0,1,1,1,1,1,0,0,
1,1,0,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,1,0,0,1,0,1,
1,1,0,1,0,1,0,1,0,1,1,0,0,1,1,1,0,0,1,0,1,0,1,0,1,0,1,1,0,0,
0,1,0,0,1,0,0,1,0,0,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,0,1,1,1,
0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,0,1,0,0,1,0,1,0,0,0,1,0,
1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,
1,0,1,0,0,1,1,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,1,0,1,1,0,1,0,1,
1,0,1,0,1,0,0,1,0,1,1,1,1,0,0,1,0,1,0,1,1,1,0,1,0,0,1,1,1,0,
0,1,0,0,0,1,1,1,1,0,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,1,0,0,
0,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,1,1,1,0,1,1,0,1,1,0,0,0,1,

Your job, if you decide to take it, is to tell me how that sequence of numbers was generated.

WARNING: To tell me how that thing was generated you need a lot of statistical analysis of the data.

And for those of you who have no clue what research is like, this ‘puzzle’ will really give you a hint of what it feels like to be clueless and trying all kinds of stuff.

Incidentally, I think this would be a great project for a class on data analysis.

About these ads

Rate this:

Like this:

Like Loading...

Posted in computers, Physics, puzzle, Statistics | 29 Comments

29 Responses

  1. on August 3, 2009 at 5:48 pm Luboš Motl

    The two-dimensional 30 x 20 Fourier transform is as ugly as hell:

    http://picasaweb.google.com/lubos.motl/TheReferenceFrame2#5365795426114877986

    I thought that the Fourier transform would at least write “Berenstein is smart” in Chinese. Because it didn’t, I guess that it will be your favorite number theory. :-)


  2. on August 3, 2009 at 6:08 pm Matt

    If you treat this as a Markov chain you get the following probability matrix:

    [ 111/600 194/600
    194/600 101/600 ]

    Where the first row (or first column, it’s symmetric…) represents transitions probabilities to 0 from 0 and 1, respectively, and the second row (or column) represents transitions to 1 from 0 and 1. So somewhat glibly, one way to generate this particular sequence is to use this matrix to generate a 600-element Markov chain, and wait for long enough :P


    • on August 3, 2009 at 8:41 pm dberenstein

      Hi Matt:

      I wouldn’t want to sound ignorant, but shouldn’t each of the columns add up to one?

      Otherwise I don’t understand what you are computing.

      Unless there is something else that is also a probability matrix in Markov Chain analysis that I am not aware of.


      • on August 3, 2009 at 9:54 pm Matt

        Oops, I goofed the normalization! In which case the coincidence of some of the numbers disappears…


  3. on August 3, 2009 at 6:24 pm Rhett

    If you squint, it looks like a butterfly.


  4. on August 3, 2009 at 6:45 pm Luboš Motl

    Matt: I did exactly your analysis, and thought to invent an Al Gore Rhythm that generates the chaotic numbers with 1/2 ones, 1/2 zeros, but only 1/3 of the preserved pairs (00, 10), instead of 1/2.

    Take the number so far (either forward or backward), interpret it as a binary number, and if it is equal to 0 (or 1 or 2) mod 3, keep the last binary digit, otherwise change it.

    If this were random, chances would be 1/3 to keep the same digit. However, all the algorithms above actually converge to a fixed point. After a line or so, it always generates zeros and is stuck. ;-)


  5. on August 3, 2009 at 6:58 pm Luboš Motl

    Of course, there are ways to produce sequences with the statistics with 1/6 of “00″, 1/3 of “01″, 1/3 of “10″, 1/6 of “11″. For example, write a transcendental number, sqrt(2) or pi^2009, in the base 6 system. It will contain randomish, uncorrelated digits 0,1,2,3,4,5. Map two of the digits to 00 and 11 and the remaining four digits, in a two-to-one fashion, to “01″ and “10″. The statistics will hold.

    Pretty likely, no additional excessively statistically significant statistics besides the misbalance of 00-11 vs 01-10 can be extracted from David’s 600 bits, so there are too many choices, and I am probably giving up, even though I am pretty sure that David hasn’t used any specific transcendent number to generate the noise.


  6. on August 3, 2009 at 10:01 pm rgb

    Binomial Distribution with n=1, p =0.5? Most of the lower moments seem appropriate.


  7. on August 3, 2009 at 10:46 pm carlbrannen

    After 10 minutes or so, I vote with rgb. Of course that’s the easy way out.


  8. on August 4, 2009 at 8:55 am PhilG

    Reading horizontally the longest sequences of consecutive 1′s or 0′ are 5 in a row, and there are few of those. In 600 digits they would be longer if random. The same is not true vertically so I would guess that this should be treated as a sequence of 600 rather than an array of 30×20. The comma at the end of the line also suggests this. In fact the text calls it a sequence.

    Analysing the frequency of all n bit sequences for small n and then their positioning might yield more clues.


    • on August 4, 2009 at 1:31 pm Haelfix

      Yea and theres no obvious reflection or permutation symmetries either, so I agree that it likely is a pure sequence.

      The next thing to do is decide whether it can be text or not and look for repeating strings.


    • on August 4, 2009 at 2:07 pm PhilG

      I wondered if it was something like one of those “self-replicating” programs that prints itself out, but in binary. However it does not look like ascii coding or anything similar.

      Apart from a reduced probability of repeated bits I can’t see any other patterns.


  9. on August 4, 2009 at 9:11 am Eugene

    “Map two of the digits to 00 and 11 and the remaining four digits, in a two-to-one fashion, to “01″ and “10″.”

    In that case, all combinations of bit pairs starting at odd positions would have roughly equal frequencies. But the stream exhibits the same 00-11/01-10 imbalance at even and odd positions.

    It looks like a Markov chain generated by another pseudo-random bitstream with 2/3 of ’0′s and 1/3 of ’1′s. You start with 0, if the underlying bitstream has 0, you copy the last digit, if it has 1, you flip.

    I’ve extracted the underlying bitstream, but there are no clearly visible patterns in it. Could be some form of arithmetic coding.


  10. on August 4, 2009 at 11:53 am SRT

    First I looked at some simple statistics, mean, standard deviation, etc. and nothing looked very interesting. Then I put the sequence of 0s and 1s into a Matlab vector, x and do the following to compute the cyclic autocorrelation of x:

    for i=1:length(x)
    corrvec(i)=dot(x,[x(i:end),x(1:i-1)]);
    end

    I pulled out the unique values in the autocorrelation with:

    corrvals = unique(sort(corrvec));

    This gave me:

    102 125 126 127 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 160 161 162 163 165 295

    Which looks pretty interesting when plotted since all but the first and last points lie on a line to very high accuracy.

    i.e. polyfit(2:(length(corrvals-1),corrvals(2:end-1),1) yields

    corrvals(2:end-1)
    ~ 1.0336*(2:length(corrvals-1))+123.3903

    As can be seen using:
    figure;plot(corrvals,’.-k’)
    hold on
    plot(2:(length(corrvals)-1),1.0336*(2:(length(corrvals)-1))+123.3903,’.-r’);

    I am not sure what this means but it is interesting, I suppose…


  11. on August 4, 2009 at 2:43 pm Luboš Motl

    If someone finds it helpful, the length of the groups of repeting binary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, 1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 1, 1, 3, 1, 1, 2, 3, 2, 1, 3, 4, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 2, 1, 4, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1}

    The histogram in this collection of numbers is:

    1: 255
    2: 78
    3: 34
    4: 18
    5: 3

    There are no sub-sequences of 6 or more equal digits in David’s sequence.


  12. on August 4, 2009 at 2:59 pm Luboš Motl

    If you clump the binary digits to pairs, the base-4 entries are:

    {2, 3, 0, 2, 2, 1, 1, 3, 2, 0, 0, 3, 2, 1, 1, 2, 1, 0, 1, 0, 1, 3, 3, 0, 1, 0, 2, 0, 1, 1, 3, 2, 0, 1, 2, 2, 0, 0, 1, 1, 2, 0, 1, 2, 0, 1, 1, 1, 1, 0, 3, 3, 2, 2, 2, 2, 1, 3, 0, 2, 3, 1, 3, 3, 2, 2, 2, 1, 1, 0, 1, 0, 2, 1, 0, 1, 2, 1, 1, 1, 3, 2, 2, 2, 2, 3, 2, 2, 0, 1, 1, 1, 3, 3, 0, 1, 1, 2, 0, 3, 1, 3, 3, 2, 2, 0, 2, 0, 1, 2, 2, 2, 2, 0, 1, 1, 1, 0, 1, 2, 2, 0, 1, 1, 0, 3, 0, 1, 3, 1, 2, 2, 0, 2, 1, 1, 2, 3, 1, 0, 2, 0, 0, 2, 2, 3, 0, 2, 0, 1, 3, 3, 1, 1, 0, 1, 2, 1, 1, 3, 2, 2, 3, 3, 0, 3, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 3, 1, 2, 2, 3, 2, 2, 2, 2, 1, 2, 3, 0, 1, 1, 1, 1, 3, 0, 2, 0, 1, 2, 0, 0, 1, 3, 0, 3, 2, 0, 2, 2, 3, 2, 2, 3, 1, 1, 2, 2, 2, 1, 2, 0, 1, 1, 0, 1, 3, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 2, 3, 2, 2, 0, 2, 2, 2, 0, 1, 3, 2, 2, 1, 1, 1, 2, 2, 3, 1, 2, 2, 2, 3, 2, 0, 3, 1, 2, 0, 2, 3, 1, 2, 2, 2, 1, 1, 1, 1, 3, 2, 0, 2, 1, 3, 2, 3, 1, 0, 1, 2, 3, 2, 1, 3, 0,
    2}

    The histogram of the figure with 300 quartic digits is: 0: 54, 1: 92, 2: 105, 3: 49

    The 3-bit clumping gives this octic sequence:

    {6, 1, 2, 3, 5, 5, 0, 6, 6, 2, 6, 0, 1, 2, 7, 1, 1, 4, 4, 2, 3, 1, 1, 5, 0, 2, 1, 1, 1, 1, 5, 2, 1, 6, 3, 5, 2, 3, 3, 4, 7, 6, 3, 5, 6, 2, 4, 0, 6, 0, 1, 3, 5, 6, 2, 5, 6, 5, 2, 2, 5, 6, 3, 2, 1, 1, 7, 6, 3, 5, 0, 1, 1, 5, 2, 1, 5, 2, 4, 4, 2, 2, 1, 6, 4, 6, 1, 5, 0, 3, 1, 7, 1, 4, 0, 4, 6, 1, 2, 2, 7, 3, 1, 2, 6, 2, 3, 5, 7, 1, 3, 3, 1, 5, 6, 2, 5, 6, 1, 5, 3, 5, 2, 3, 6, 1, 5, 2, 5, 1, 2, 2, 2, 0, 5, 1, 3, 1, 2, 7, 2, 7, 5, 4, 2, 3, 2, 2, 1, 2, 3, 5, 6, 2, 2, 5, 2, 5, 0, 2, 5, 4, 3, 5, 0, 5, 2, 2, 3, 5, 5, 2, 2, 7, 1, 5, 6, 5, 4, 3, 2, 4, 7, 4, 2, 3, 5, 2, 3, 1, 6, 6, 6, 3, 4, 4, 3, 3, 3, 4}

    The histogram from 0 to 7 is: 11,33,43,28,17,34,24,10. The octic digits with the most pairs inside – like 0,7 – are suppressed the most.

    The hexadecimal clumping (written decimally, sorry):

    {14, 8, 6, 13, 2, 12, 6, 9, 1, 1, 13, 3, 1, 2, 5, 11, 4, 10, 0, 5, 2, 9, 4, 5, 1, 15, 10, 10, 13, 8, 7, 15, 10, 6, 1, 1, 6, 4, 6, 5, 11, 10, 14, 10, 4, 5, 15, 4, 9, 12, 13, 11, 2, 2, 9, 10, 2, 5, 1, 9, 2, 5, 12, 4, 7, 10, 8, 5, 14, 1, 2, 8, 14, 8, 4, 15, 5, 4, 6, 13, 10, 15, 12, 6, 9, 10, 5, 5, 7, 10, 11, 10, 6, 14, 4, 5, 13, 8, 4, 2, 4, 3, 11, 8, 14, 10, 7, 9, 10, 9, 4, 1, 13, 10, 6, 9, 10, 10, 2, 4, 5, 14, 10, 8, 10, 4, 11, 6, 5, 10, 7, 10, 14, 2, 7, 2, 14, 9, 10, 5, 5, 11, 8, 13, 14, 1, 9, 11, 13, 8}

    The base-32:

    {14, 8, 6, 13, 2, 12, 6, 9, 1, 1, 13, 3, 1, 2, 5, 11, 4, 10, 0, 5, 2, 9, 4, 5, 1, 15, 10, 10, 13, 8, 7, 15, 10, 6, 1, 1, 6, 4, 6, 5, 11, 10, 14, 10, 4, 5, 15, 4, 9, 12, 13, 11, 2, 2, 9, 10, 2, 5, 1, 9, 2, 5, 12, 4, 7, 10, 8, 5, 14, 1, 2, 8, 14, 8, 4, 15, 5, 4, 6, 13, 10, 15, 12, 6, 9, 10, 5, 5, 7, 10, 11, 10, 6, 14, 4, 5, 13, 8, 4, 2, 4, 3, 11, 8, 14, 10, 7, 9, 10, 9, 4, 1, 13, 10, 6, 9, 10, 10, 2, 4, 5, 14, 10, 8, 10, 4, 11, 6, 5, 10, 7, 10, 14, 2, 7, 2, 14, 9, 10, 5, 5, 11, 8, 13, 14, 1, 9, 11, 13, 8}

    The base-64:

    {14, 26, 45, 48, 22, 6, 17, 15, 33, 20, 11, 41, 16, 9, 9, 21, 49, 43, 26, 35, 55, 43, 22, 4, 6, 25, 53, 42, 46, 18, 53, 19, 9, 55, 43, 8, 41, 10, 21, 36, 18, 49, 52, 41, 24, 57, 33, 32, 14, 18, 31, 17, 22, 43, 15, 27, 41, 22, 53, 41, 43, 26, 14, 21, 13, 18, 2, 13, 11, 58, 58, 37, 26, 18, 17, 43, 22, 42, 42, 16, 37, 43, 40, 18, 43, 21, 58, 41, 46, 28, 34, 39, 26, 21, 11, 54, 30, 36, 27, 35}

    The histograms become too chaotic.


  13. on August 4, 2009 at 5:25 pm re

    Beatty sequence mod 2?


    • on August 4, 2009 at 5:50 pm Luboš Motl

      I think this is easy to falsify. If you took some multiples of an irrational number mod 2, then the numbers of repetitions of “0″ (or “1″) at different places would have to differ at most by one.


  14. on August 5, 2009 at 3:42 pm victor

    Shut up, Lubos. Nobody cares what you think.


    • on August 5, 2009 at 5:04 pm dberenstein

      Tut tut:

      Victor, please don’t act like a troll. Nothing bad has been said in this post.


  15. on August 5, 2009 at 5:47 pm Eugene

    Here’s my hypothesis.

    David took a real world sequence, maybe a phrase or a transcendental number. Then he picked a “dictionary” that maps letters/numbers to bit sequences. E.g. 0 -> “”, 1 -> “1″, 2 -> “10″, 3 -> “11″, etc. (binary with truncated leading zeros) Or A -> “10″, B -> “011″, etc. (Morse code) He concatenated sequences to create a big intermediate bit stream. This underlying stream was used to generate a Markov chain: starting with zero, copying the digit when he sees “0″, flipping the digit when he sees “1″.

    Why? Markovianness explains why we see different frequencies of 00/11 and 01/10 pairs. Peculiarities of the dictionary could naturally give rise to the difference in these frequencies. In the example above, if we use truncated binary dictionary and numbers from 0 to 15, we naturally get around ~2/3 of ’1′ and 1/3 of ’0′. There are some other less obvious deviations from randomness that can be induced by the dictionary method. For example, the underlying bitstream has a statistically significant shortage of ’0000′s.

    Morse code was one of the first things I looked at, but it seems to be ruled out because it induces wrong deviations from randomness. (One reason being that ‘O’ is encoded as ‘dash-dash-dash’ = ’000′, and ‘O’ is a fairly common letter.)

    The biggest problem with this method is that the encoding is one-way – for any dictionary, multiple source phrases give rise to the same bit sequence, you have to guess which one was used. I had no luck with that, and I also couldn’t find a dictionary that reproduces all pattern frequencies perfectly.

    At this point, I’m giving up, maybe someone else will have better luck than I, or maybe someone will find a better approach.


  16. on August 5, 2009 at 11:56 pm dberenstein

    Ok. I think this is enough. Speculations are going overboard.

    Here is the code:

    import random
    s2= input(“Input bias: a number between 0 and 1″)
    digits1= input(“How many digits?”)
    s= random.random()
    if s<0.5:
    x=0
    else:
    x=1

    fout=open("data.txt", 'w')

    j=0
    while j<digits1:
    s= random.random()
    if s < s2:
    x+=1
    x%=2
    print x,
    fout.write((str(x)+','))
    if (j%30)==29:
    fout.write('\n')
    j+=1
    fout.close
    print "\n" "Exit complete"

    The input was 0.65, followed by 600. So there were various almost correct guesses. I wish someone would have produced a likelihood analysis on the parameters of the Markov Chain. Incidentally, this code also generates a typical configuration in a one D- Ising model at some temperature for either a Ferromagnet, or an Antiferromagnet (the phase I chose).

    You can play with the code if you want to.


    • on August 5, 2009 at 11:57 pm dberenstein

      Well, this website screwed the indentation. So I leave it to you to figure it out.


      • on August 6, 2009 at 5:52 am Rod Carvalho

        David,

        You can post highlighted sourcecode on WordPress. Check this out. For example, your little script would look like this:

        import random
        
        s2= input(”Input bias: a number between 0 and 1″)
        digits1= input(”How many digits?”)
        
        s= random.random()
        if s<0.5:
            x=0
        else:
            x=1
        
        fout=open("data.txt", 'w')
        
        j=0
        while j<digits1:
            s= random.random()
            if s < s2:
                x+=1
                x%=2
                print x,
                fout.write((str(x)+','))
            if (j%30)==29:
                fout.write('\n')
                j+=1
                fout.close
                
        print "\n" "Exit complete"
        

        Of course, since the indentation was messed up when you posted the code, and since Python does not use block delimiters, the code above may have the indentation wrong. In fact, I am sure it has.


  17. on August 6, 2009 at 4:42 am Luboš Motl

    Oh, so they were random.random data, after all. This is as disappointing a solution to your problem as to (hypothetically) learn that our Universe is a randomly chosen one amont googol^5 of universes. Fortunately, I’ve only wasted an hour to decode the precise sequence of yours. ;-)


  18. on August 6, 2009 at 8:31 am Luboš Motl

    In order to restore some self-confidence for us the monovacuists, here is a Mathematica code that generates a similar sequence, with equally represented binary digits 0,1, but with 0,1 and 1,0 being twice as frequent as 0,0 or 1,1.

    The code is much shorter and unique, unlike David’s. ;-)

    I took pi in the base-6 system (3.0503…), and made the maps that are obvious in the text below. I have even managed to agree with the first six digits of David, by making appropriate choices (“inverse” map).

    a = BaseForm[N[Pi/6, 250], 6];
    b = ToString[a];
    c = Characters[b][[3 ;; 302]]; {c[[;; 10]], " and so on"}
    d = c /. {"0" -> {1, 1}, "1" -> {1, 0}, "2" -> {1, 0}, "3" -> {0, 1}, 
        "4" -> {0, 1}, "5" -> {0, 0}};
    e = Flatten[d[[;; 300]]]
    
    Output:
    
    {{"3", "0", "5", "0", "3", "3", "0", "0", "5", "1"}, " and so on"}
    
    0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0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 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1
    

  19. on August 6, 2009 at 8:33 am Luboš Motl

    In order to restore some self-confidence for us the monovacuists, here is a Mathematica code that generates a similar sequence, with equally represented binary digits 0,1, but with 0,1 and 1,0 being twice as frequent as 0,0 or 1,1.

    The code is much shorter and unique, unlike David’s. ;-)

    I took pi in the base-6 system (3.0503…), and made the maps that are obvious in the text below. I have even managed to agree with the first six digits of David, by making appropriate choices (“inverse” map).

    a = BaseForm[N[Pi/6, 250], 6];
    b = ToString[a];
    c = Characters[b][[3 ;; 302]]; {c[[;; 10]], " and so on"}
    d = c /. {"0" -> {1, 1}, "1" -> {1, 0}, "2" -> {1, 0}, "3" -> {0, 1}, 
        "4" -> {0, 1}, "5" -> {0, 0}};
    e = Flatten[d[[;; 300]]]
    
    Output:
    
    {{"3", "0", "5", "0", "3", "3", "0", "0", "5", "1"}, " and so on"}
    
    0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0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 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1
    

    Hope that the formatting will now be OK. Please erase the previous strangely formatted version of this comment.


  20. on August 6, 2009 at 8:35 am Luboš Motl

    The command pre with python doesn’t work for me. Here’s the normal version of the comment. Please erase the two previous copies of the same comment, David.

    In order to restore some self-confidence for us the monovacuists, here is a Mathematica code that generates a similar sequence, with equally represented binary digits 0,1, but with 0,1 and 1,0 being twice as frequent as 0,0 or 1,1.

    The code is much shorter and unique, unlike David’s. ;-)

    I took pi in the base-6 system (3.0503…), and made the maps that are obvious in the text below. I have even managed to agree with the first six digits of David, by making appropriate choices (“inverse” map).

    a = BaseForm[N[Pi/6, 250], 6];
    b = ToString[a];
    c = Characters[b][[3 ;; 302]]; {c[[;; 10]], ” and so on”}
    d = c /. {“0″ -> {1, 1}, “1″ -> {1, 0}, “2″ -> {1, 0}, “3″ -> {0, 1},
    “4″ -> {0, 1}, “5″ -> {0, 0}};
    e = Flatten[d[[;; 300]]]

    Output:

    {{“3″, “0″, “5″, “0″, “3″, “3″, “0″, “0″, “5″, “1″}, ” and so on”}

    0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1,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1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1


Newer Comments »

Comments are closed.

  • Recent Posts

    • Woof Woof
    • Happy 3.1415926535… day
    • Unstable Universes
    • Bad science reporting versus good science reporting
    • If some of my students were writing problems
  • Archives

    • April 2013
    • March 2013
    • February 2013
    • January 2013
    • November 2012
    • September 2012
    • August 2012
    • July 2012
    • May 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • September 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
  • August 2009
    M T W T F S S
    « Jul   Sep »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
    31  
  • Recent Comments

    Plato on Woof Woof
    Pepe on Woof Woof
    dberenstein on Woof Woof
    Lubos Motl on Woof Woof
    Wyrd Smythe on Happy 3.1415926535……
  • Physics/Math/Science Blogs

    • Asymptotia (Clifford Johnson)
    • Backreaction
    • Coctail Party Physics
    • Cosmic Variance
    • Dmitry Podolsky
    • Jeffrey Epstein Science
    • John Baez
    • Michael Nielsen
    • Musings (Jacques Distler)
    • Not even wrong
    • Resonaances
    • Robert Helling
    • Shtetl Optimized
    • Sunclipse
    • Terry Tao
    • Tomasso Dorigo
    • Uncertain Principles
  • Science Resources

    • Physics (APS journal)
    • Scientific American
  • Some More Blogs

    • Evil Inc
    • Fafblog
    • phd Comics
    • Regator
    • Scenes from a multiverse
    • Site Meter
    • WordPress.com
    • WordPress.org
  • Pages

    • About
  • Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.com

Blog at WordPress.com.

Theme: MistyLook by WPThemes.


Follow

Get every new post delivered to your Inbox.

Join 33 other followers

Powered by WordPress.com
%d bloggers like this: