(Part A)
(Part A)
Line 3: Line 3:
 
I'm a little confused about part a. I tried it in two different ways that both seemed right to me and got very different answers. I figured to count all 6-letter strings containing ''a'', you could count all possible 6-letter strings and subtract the ones that do NOT contain ''a''. This should be <math>26^6-25^6=64,775,151</math>.
 
I'm a little confused about part a. I tried it in two different ways that both seemed right to me and got very different answers. I figured to count all 6-letter strings containing ''a'', you could count all possible 6-letter strings and subtract the ones that do NOT contain ''a''. This should be <math>26^6-25^6=64,775,151</math>.
 
Then, I thought to try it this way: suppose I first pick any 5 letters (in <math>26^5</math> ways). Then, to guarantee the string contains an ''a'', I can insert an ''a'' into this string at any of 6 places. So with this method, my answer is <math>(26^5)*6=71,288,256</math>. What am I doing wrong here?
 
Then, I thought to try it this way: suppose I first pick any 5 letters (in <math>26^5</math> ways). Then, to guarantee the string contains an ''a'', I can insert an ''a'' into this string at any of 6 places. So with this method, my answer is <math>(26^5)*6=71,288,256</math>. What am I doing wrong here?
 +
 +
UPDATE: I figured out that the second method is definitely wrong because it overcounts. For example, I could guarantee an ''a'' as the first character and have an ''a'' randomly as the second character. I could also guarantee the ''a'' in the second position and have one appear randomly in the first position. These two strings would be indistinguishable but counted multiple times. I think the first one is right (<math>26^6-25^6=64,775,151</math>).

Revision as of 12:43, 14 September 2008

Part A

I'm a little confused about part a. I tried it in two different ways that both seemed right to me and got very different answers. I figured to count all 6-letter strings containing a, you could count all possible 6-letter strings and subtract the ones that do NOT contain a. This should be $ 26^6-25^6=64,775,151 $. Then, I thought to try it this way: suppose I first pick any 5 letters (in $ 26^5 $ ways). Then, to guarantee the string contains an a, I can insert an a into this string at any of 6 places. So with this method, my answer is $ (26^5)*6=71,288,256 $. What am I doing wrong here?

UPDATE: I figured out that the second method is definitely wrong because it overcounts. For example, I could guarantee an a as the first character and have an a randomly as the second character. I could also guarantee the a in the second position and have one appear randomly in the first position. These two strings would be indistinguishable but counted multiple times. I think the first one is right ($ 26^6-25^6=64,775,151 $).

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang