a complex set combination problem
gotta question for you guys that i can't seem to get a grapple on...
there is a 19 digit code that consists of 1's and 0's and starts with the number 1, (its first digit is 1)
how many combinations of this 19 digit code carry three or more repeating digits, or, 5 or more 0's or 1's than its counterpart? (5 or more 1's than 0's or 5 or more 0's than 1's), a +5 or more count on the other digit
remember it must start with a 1
examples of positive cases
1...000......
1.......111......
11011011011.....
i've been working on this problem all day any help is appreciated!
thanks
need to find when both 5+ and triples occur
i think i approximated the total number of 3 in a row cases...
if you make a table with number of entries on the left and number of positive cases on the right, you get a pattern of 1 3 8 19 42, this is just 2 times the preceeding number plus (n-3). when projecting to the 19th term you get 196596 positive cases
now all we need to do is find the number of cases that have 3 1's or 0's in a row and
a 5+ margin on the other digit, or, the overlapping circle case of the two criteria