Permutations and combinations on letters I have given a few problems and i have been using the permutation and combination to solve the problems. However, i am suck at counting. but i do my best though. So, im here to ask a question.
how many permutations of the letters abcdef contain at least one of the patterns aeb or bef?? 
I have my own computation but it seems wrong. 
I would like to know how you guys solve it. step by step. i have written down a formula and solved it. but my number came out really high which it seems wrong. 
Thank you
 A: In principle we list and count. The key fact is contained in the answer by Calvin Lin that the patterns aeb and bef cannot occur in the same word. So all we need to do is to count the words that have the pattern aeb, count the words that have the pattern bef, and add. 
Life is made simpler by the fact that by symmetry there are just as many words with aeb as there are with bef. So we count the words with aeb and multiply by $2$.
We have $6$ "slots" $- - - - - -$ into which to put our letters. If our word is to contain aeb, the a can be put in any one of $4$ places. Then the locations of e and b are determined. For each of these $4$ choices, we are left with $3$ empty slots. The first empty slot can be filled in $3$ ways using letters chosen from c, d, f. For each of these ways, the second empty slot can be filled in $2$ ways, and now our word is determined. So there is a total of $(4)(3)(2)$ words that contain the pattern aeb. 
Then double to get our final answer.
Another way: Think of "aeb" as a superletter, which we call S. Then the words that contain the string aeb are just the $4$-letter words made up of the "letters" c, d, f, and S. There are $4$ such "letters," so $4!$ such words. Now double like we did before. 
A: Hint: Any permutation can contain at most 1 of the patterns, due to the placement of b and e.
Use the rule of sum.
A: How many permutations contain $aeb$?  Well.  First notice that there are 4 possible ways for $aeb$ to occur.  $aebxxx, xaebxx, xxaebx, xxxaeb$, where the $x$ represent one of the other three letters.  
Fix one of these four possibilities - how many ways can you arrange the remaining three letters?  Call that number $y$.  Then there are $4y$ possible permutations containing $aeb$.
The exact same reasoning gives you another $4y$ possible permutations containing $bef$.
As Calvin Lin pointed out, occurances of $aeb$ and $bef$ are mutually exclusive.  So add them up and you get...?
