Combinatorics, alphabet/bitstrings

  • Thread starter Thread starter Panphobia
  • Start date Start date
  • Tags Tags
    Combinatorics
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
11 replies · 3K views
Panphobia
Messages
435
Reaction score
13

Homework Statement


1)How many bitstring of length 11 contain three more 0's than 1's?

2)How many string of 5 lowercase letters from the Latin alphabet contain:
a) the letter c?
b) the letters c and d?
c) the letters c and d in consecutive positions with c preceding d and all letters distinct?
d) the letters c and d, when c is somewhere to the left of d in the string and all letters are distinct?

The Attempt at a Solution



For 1) I got 11C4

2a) I got 26^5 - 25^5
b) 26^5 - 24^5
c) 4C1*2!*24*23*22/2!... I am not sure at all about this one, my logic is that I take away c and d from the sample size, then divide by 2! to get the arrangement where c is infront of d.
d) 5C2*2*1*24*23*22/2! I am not sure about this one either, I am basically choosing two positions for c and d, subtracting 2 from 26, then multiplying 2*1 to choose from the c and d, then randomly choosing letters for the remaining spots, then dividing by 2! to get the arrangement where c is to the left of d.

Can you guys point out which ones are right and which ones are wrong? Thank you so much.
 
Last edited:
on Phys.org
For 2a and 2b what are you using or your formula?
I would normally look at 5c1*25^4+5c2*25^3+.,.
For 1 C, 2 C's and so on to 5 C's.
If you are using a streamlined formula I would be interested to know more.
 
RUber said:
If you are using a streamlined formula I would be interested to know more.
In 2a, Panphobia is simply subtracting those that do not contain c from all possible strings of 5 letters.
Panphobia, 2b is wrong. 24^5 is the number that contain neither c nor d, so subtracting from 26^5 yields the number containing ... what?
I agree with your answers to 2c and 2d, though you could have avoided the *2/2 by thinking about it slightly differently: having chosen the two spots for c and d, their individual positions are fixed by the ordering condition.
 
Then 2b could the answer be 5C2*2*24*23*22
 
Oh yea I was looking at a completely different problem sorry haha. Also why is 26^5 - 24^5 wrong? Wait is it because that will give strings of length 5 that have either c or d or both? (I am kind of guessing now) I am thinking it is 2*(26^5-25^5)-(26^5-24^5)
 
Last edited:
Is the answer 2*(26^5-25^5)-(26^5-24^5)
Since if AUB = A + B - A∩B so A∩B = A + B - AUB = (26^5-25^5) + (26^5-25^5) - (26^5 - 24^5)

Also is my answer to 1) correct?
 
Last edited:
Panphobia said:
Is the answer 2*(26^5-25^5)-(26^5-24^5)
Since if AUB = A + B - A∩B so A∩B = A + B - AUB = (26^5-25^5) + (26^5-25^5) - (26^5 - 24^5)
Yes, though using the inclusion/exclusion formula you can just write down 26^5 - 2*25^5 + 24^5. In words: those using 26 letters, minus thus not using c, minus those not using d, plus those using neither c nor d (because we've subtracted those twice).
 
My teacher says 2b is wrong he says it is 5C1*4C1*26^3 why is mine wrong?
 
Panphobia said:
My teacher says 2b is wrong he says it is 5C1*4C1*26^3 why is mine wrong?
I'm afraid your teacher is wrong. I can see what he is doing: pick one of five to be a C, pick one of the remaining four to be a D, then fill in the rest. But this counts some patterns more than once. E.g. CDCAA gets counted twice, first by picking the first position to place a C and later filling in CAA arbitrarily in the last 3 positions; and again picking the third position to be a C then filling in the 1st, 4th and 5th positions arbitrarily.
Stick with the answer you have.
If your teacher is unpersuaded, try it with a simpler set-up, a three letter alphabet and three positions. Sequences containing A and B:
AAB, ABA, BAA, ABB, BAB, BBA, plus the six permutations of ABC = 12 = 33-2.23+13, not 3C1.2C1.31 = 18.
 
haruspex said:
I'm afraid your teacher is wrong. I can see what he is doing: pick one of five to be a C, pick one of the remaining four to be a D, then fill in the rest. But this counts some patterns more than once. E.g. CDCAA gets counted twice, first by picking the first position to place a C and later filling in CAA arbitrarily in the last 3 positions; and again picking the third position to be a C then filling in the 1st, 4th and 5th positions arbitrarily.
Stick with the answer you have.
If your teacher is unpersuaded, try it with a simpler set-up, a three letter alphabet and three positions. Sequences containing A and B:
AAB, ABA, BAA, ABB, BAB, BBA, plus the six permutations of ABC = 12 = 33-2.23+13, not 3C1.2C1.31 = 18.
Yea same with the first one, he put 5C1*26^4 but that is wrong by your logic too, I tried going up to him in class but he didn't understand fully the way I did I so he told me to email him.