How Many Sequences of n 1's and n 0's Avoid Equal Counts Before the End?

  • Thread starter Adeimantus
  • Start date
  • Tags
    Sequences
In summary, the conversation discusses sequences of length 2n with n 1's and n 0's, and a specific property where the number of 1's and 0's is never equal when reading the sequence from left to right. The number of sequences with this property can be calculated using a recurrence relation. The conversation also mentions a surprising pattern in the fraction of these sequences compared to the total number of sequences with the same number of 1's and 0's. The conversation then explores the application of this problem to a betting system in roulette, but it is ultimately determined that this strategy is not entirely successful.
  • #1
Adeimantus
113
1
I've been thinking about sequences of length 2n, with n 1's and n 0's. In particular, I'm interested in such sequences that also have the following property: reading the sequence from left to right, at no point before the end of the sequence is the number of 1's and 0's equal. For example, a sequence with n=4 satisfying this requirement is 00101011. A sequence with n=4 that does not satisfy the requirement would be something like 01100011, because there are equal numbers of 1's and 0's up to the second and fourth positions (reading from left to right). I wanted to figure out the number A_n of such sequences there are for a given n, and I was able to calculate the first few with this recurrence relation:

[tex]
A_n = _{2n}C_n - \sum_{k=1}^{n-1} _{2n-2k}C_{n-k}A_k
[/tex]

where [tex]_{r}C_s[/tex] is the binomial coefficient 'r choose s'.

Starting with A_1 = 2, the pattern of A_n's continued 2, 4, 10, 28, 84, 264, etc. I didn't see a pattern in the numbers themselves, but eventually I thought about looking at the fraction of the total number of sequences of length 2n with n 1's and n 0's, and was surprised to see that


[tex]f_1 = \frac{A_1} { _{2} C_1} = 1[/tex]

[tex]f_2 = \frac{A_2} { _{4} C_2} = 1/3[/tex]

[tex]f_3 = \frac{A_3} { _{6} C_3} = 1/5[/tex]

[tex]f_4 = \frac{A_4} { _{8} C_4} = 1/7[/tex]
...
[tex]f_n = \frac{A_n}{_{2n} C_n} = 1/(2n-1)
[/tex]

So my first question is...is this somehow obvious? With such a simple result, there must be some way to just 'see' the answer. If not, how might I go about showing that last formula to be generally true? What led me to consider the fraction rather than the absolute number of sequences was using the inclusion-exclusion formula for probabilities of disjunctions of events and considering all sequences with n 1's and n 0's to be equally likely. But that method took much more work than the recurrence relation method, which is already a lot to do by hand. I ran into this problem while trying to analyze what roulette players call the 'D'Alembert' betting system. I doubt the mathematician is responsible for it, but whatever...it sounds impressive. The idea is that, on even payout bets, you raise the bet one unit after each loss, and lower it one unit after each win. Hopefully *fingers crossed*, you will have a sequence of n wins and n losses before running out of money or encountering the min and max bets. If you succeed in this you will have gained n units. And then you start over. In the roulette manual I looked at, the author explained that this is a winning strategy, but only if you use 'good judgment'. That is, you have to know when your luck is about to run out. :smile:
 
Physics news on Phys.org
  • #2

Related to How Many Sequences of n 1's and n 0's Avoid Equal Counts Before the End?

1. What is a sequence of n 1's and n 0's?

A sequence of n 1's and n 0's is a string of numbers where there are n 1's and n 0's in total. For example, if n = 3, a possible sequence would be 101 or 011, as there are three 1's and three 0's in each sequence.

2. What is the significance of studying sequences of n 1's and n 0's?

Studying sequences of n 1's and n 0's can provide insights into various mathematical and scientific concepts, such as random number generation, coding and decoding, and pattern recognition. It can also have practical applications in fields like computer science, genetics, and cryptography.

3. How do you generate a sequence of n 1's and n 0's?

A sequence of n 1's and n 0's can be generated using various methods, such as using a random number generator, using a computer program, or manually creating the sequence. The specific method used may depend on the purpose of the sequence and the desired outcome.

4. Can sequences of n 1's and n 0's be used in real-world applications?

Yes, sequences of n 1's and n 0's have numerous real-world applications. They can be used in coding and decoding messages, generating secure passwords, analyzing genetic sequences, and understanding patterns in data. They can also be used in theoretical mathematics and computer science research.

5. How do you analyze and interpret a sequence of n 1's and n 0's?

Analyzing and interpreting a sequence of n 1's and n 0's involves looking for patterns and relationships between the numbers. This can be done through statistical analysis, mathematical modeling, or using visual representations like graphs or charts. The interpretation of the sequence will depend on the context and purpose of the analysis.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
499
  • Set Theory, Logic, Probability, Statistics
Replies
15
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
713
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
Replies
1
Views
852
  • Calculus and Beyond Homework Help
Replies
3
Views
697
Replies
1
Views
1K
Replies
2
Views
1K
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
869
Back
Top