Find the no. of permutations of letters a , b , c , d, e , f , g taken all at a time if "beg" pattern cannot appear in any word.
A, B, C, D, E, F, G =7 letters gives 7! =5040 permutations. Out of the 5040 permutations, there are 52 permutations with the word "BEG" in them. If you exclude those 52 permutations, then you have:
5040 - 52 =4,988 permutations.