flexagon: (Default)
flexagon ([personal profile] flexagon) wrote2009-11-27 02:06 pm

As an example

I don't post terribly often about technical things here. Blogs are are so useful for venting emotion that I often use it that way, and anyway I think people probably like the acro pictures better. Rest easy, I'll post some of those next.

Still, I do think about math and logic and stuff, especially when I'm falling asleep and need to think about something to calm my mind down. (It's nice, though it also slows my thinking a lot, since I tend to fall asleep before getting anywhere). The last few nights it's been this puzzle, more or less:

You have n bits in a row. Each bit can be either 0 or 1, but you can't have two 0s in a row. What is the expression of how many patterns you can have in n bits, and why?

I knew the pattern all along because someone kind of gave it away, but it's pretty easy to work out like this:

One bit -- valid patterns are 0 and 1 -- two patterns.
Two bits -- valid patterns are 11, 01, 10 -- three patterns.
Three bits -- valid patterns are 111, 011, 101, 110, 010 -- five patterns.
Four bits -- 1111, 0111, 1011, 1101, 1110, 1010, 0101, 0110 -- eight patterns.

The sequence 2, 3, 5, 8 should probably be familiar if you inherited any math-dork genes, and it's not an accident; that pattern does continue. The next one is 13, then 21. Each number is the sum of the two numbers before it.

Now, can you prove or explain why the valid bit sequences in the puzzle would form a sequence like that?

1) Comments obviously might contain spoilers.
2) If you don't like bits, you can think about a staircase where you can step on (or bounce a ball on) every step or every other step as you traverse the stairs.

Post a comment in response:

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting