Discrete Math

How many bit strings contain exactly six 1's and ten 0's if every 1 is immediately followed by a 0?
Last edited on
treat that as 10
so you have 6 times the number 10
101010101010
which is also 6 zeros.
so now you may add 4 zeros anywhere. this is what you must count. some places are the same if you try to do it in code, eg adding 0 to the least and next to least digit of the above is the same result.
anyway, now you iterate (or find a math way to do it):
101010101010 0000
1010101010010 000
1010101001010 000
...
the problem probably wants leading zeros to be included in the result.
Last edited on
is 1010101010100000 the definitive answer to this problem then?
Last edited on
210
yes. 10 things (6 10's and 4 zeros), choose 4 (the zeros), the 'combination' computation.
Sigh. But trying to get him there... did not succeed.
Topic archived. No new replies allowed.