Tuesday, July 14, 2009

Consider strings of length 7 formed from the letters a,b,c,d,e,f,g (wthout repetition)?

how many of these strings do not have the letters f and g appearing together?

Consider strings of length 7 formed from the letters a,b,c,d,e,f,g (wthout repetition)?
I'll assume that by "appearing together" you mean that f and g are adjacent. Thus, "bagfcde" would be called "appearing together," and "fcgeadb" would not.





It's easier to count the number of strings that have f, g adjacent. First we count the number of strings that begin with fg and are followed by any permutation of a,b,c,d,e. There are 5! = 120 of these.





Next, we allow "fg" to appear at any position in the string. We have 120 strings of the form "fg.....", 120 of the form ".fg....", etc., up to 120 of the form ".....fg". So we multiply 120 * 6 to get 720 strings so far.





Finally, for each string of the form "..fg...", there is a string of the form "..gf...". So we multiply 720 * 2 to get 1440 total strings with f,g adjacent.





So the number of strings without f,g adjacent is 7! - 1440 = 5040 - 1440 = 3600.
Reply:if you have 7 letters and 7 positions of non-repeatative numbers, then your answer must be zero because all strings of lenght 7 will contain the letters
Reply:The answer is 3600





Number of strings of length 7 = 7! = 7x6x5x4x3x2x1 = 5040





If we imagine there are 7 positions, then f and g can be next to each other in the 1st and 2nd positions or the 2nd and 3rd or........or the 6th and 7th. This makes 6. But since f and g can be in the order fg or gf, then the total is 12. Now for each of these 12 positions, the remaining 5 positions can be filled by the remaining 5 letters in 5! = 120 ways. So there are a total of 12 x 120 = 1440 strings with f and g next to each other. So the answer to your question is 5040 - 1440 = 3600.
Reply:With F as your first letter, there are 5 possible letters to be second (any except G) and 5! possibilities for letters in positions 3-7.


With F as your last letter, there are 5 possible letters to be sixth and 5! possibilities for letters in positions 1-5.


2 · 5 · 5! = 10(120) = 1200.





With F somewhere in the middle, there are 5 possible letters behind it (any except G), 4 possible letters after it (any except G and the letter before F), and 4! possibilities for the letters in the remaining positions. There are 5 possible placements for F in the middle.


5 · 5 · 4 · 4! = 100(24) = 2400.





There are [1200 + 2400 =] 3600 ways to arrange the letters A through G such that F and G don't appear next to one another.

lady palm

No comments:

Post a Comment