Last active
December 25, 2015 02:49
-
-
Save ssirowy/6904953 to your computer and use it in GitHub Desktop.
Hump Day ROTW: 10/9/2013
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You have to answer both to win today. Both parts are closely related, in fact starting B first may help | |
A) Think of binary numbers: sequences of 0's and 1's. How many n-digit binary numbers are | |
there that don't have two adjacent 1 bits? For example, for three-digit numbers, | |
five of the possible eight combinations meet the criteria: | |
000, 001, 010, 011, 100, 101, 110, 111. | |
What is the number for sequences of length 4, 5, 10, n? | |
B) Prove it with output from a little script/program you write in your favorite language | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment