Question and Answers Forum

All Questions      Topic List

Permutation and Combination Questions

Previous in All Question      Next in All Question      

Previous in Permutation and Combination      Next in Permutation and Combination      

Question Number 195672 by mr W last updated on 07/Aug/23

how many different words can be  formed from the letters in  aaacdefgbbbb  such that a “a” and a “b” are not  next to each other?    (see also Q#195606)

$${how}\:{many}\:{different}\:{words}\:{can}\:{be} \\ $$$${formed}\:{from}\:{the}\:{letters}\:{in} \\ $$$$\boldsymbol{{aaacdefgbbbb}} \\ $$$${such}\:{that}\:{a}\:``\boldsymbol{{a}}''\:{and}\:{a}\:``\boldsymbol{{b}}''\:{are}\:{not} \\ $$$${next}\:{to}\:{each}\:{other}? \\ $$$$ \\ $$$$\left({see}\:{also}\:{Q}#\mathrm{195606}\right) \\ $$

Answered by liuxinnan last updated on 10/Aug/23

Commented by mr W last updated on 10/Aug/23

“a” and “b” should not be next to  each other.  two or more “a” can be together.  two or more “b” can be together.  two or more other letters can be together.  aacadebbbfbg if e.g. valid.

$$``{a}''\:{and}\:``{b}''\:{should}\:{not}\:{be}\:{next}\:{to} \\ $$$${each}\:{other}. \\ $$$${two}\:{or}\:{more}\:``{a}''\:{can}\:{be}\:{together}. \\ $$$${two}\:{or}\:{more}\:``{b}''\:{can}\:{be}\:{together}. \\ $$$${two}\:{or}\:{more}\:{other}\:{letters}\:{can}\:{be}\:{together}. \\ $$$$\boldsymbol{{aacadebbbfbg}}\:{if}\:{e}.{g}.\:{valid}. \\ $$

Commented by liuxinnan last updated on 10/Aug/23

I misunderstood it

$${I}\:{misunderstood}\:{it} \\ $$

Commented by liuxinnan last updated on 10/Aug/23

Commented by mr W last updated on 11/Aug/23

thank you for trying!  in each ⊝ you can put nothing (empty)  or put one till n “a”  or put one till m “b”  in all ⊝ you should totally have n “a”  and m “b”.  you see, it is not so an easy question  as it looks like.

$${thank}\:{you}\:{for}\:{trying}! \\ $$$${in}\:{each}\:\circleddash\:{you}\:{can}\:{put}\:{nothing}\:\left({empty}\right) \\ $$$${or}\:{put}\:{one}\:{till}\:{n}\:``{a}'' \\ $$$${or}\:{put}\:{one}\:{till}\:{m}\:``{b}'' \\ $$$${in}\:{all}\:\circleddash\:{you}\:{should}\:{totally}\:{have}\:{n}\:``{a}'' \\ $$$${and}\:{m}\:``{b}''. \\ $$$${you}\:{see},\:{it}\:{is}\:{not}\:{so}\:{an}\:{easy}\:{question} \\ $$$${as}\:{it}\:{looks}\:{like}. \\ $$

Answered by mr W last updated on 11/Aug/23

we arrange at first the 5 other letters.  there are 5! ways to do this.  □c□d□e□f□g□  in each of the 6 boxes (□) we can put  nothing (empty) ⇔ we add 0 to it  or “a” ⇔ we add 1 to it  or “aa” ⇔ we add 2 to it  or “aaa” ⇔ we add 3 to it  or “aaaa” ⇔ we add 4 to it  or “b” ⇔ we add 100 to it  or “bb” ⇔ we add 200 to it  or “bbb” ⇔ we add 300 to it  totally we should put 4 “a” and 3 “b”  in the 6 boxes, that means the sum  of all 6 boxes should be 4+300=304.  so the number of ways to do this is  the coefficient of term x^(304)  in the  expansion of generating function  (1+x+x^2 +x^3 +x^4 +x^(100) +x^(200) +x^(300) )^6 ,  which is 1770.  hence the number of valid words we  can form is 1770×5!=212 400 ✓

$${we}\:{arrange}\:{at}\:{first}\:{the}\:\mathrm{5}\:{other}\:{letters}. \\ $$$${there}\:{are}\:\mathrm{5}!\:{ways}\:{to}\:{do}\:{this}. \\ $$$$\Box\boldsymbol{{c}}\Box\boldsymbol{{d}}\Box\boldsymbol{{e}}\Box\boldsymbol{{f}}\Box\boldsymbol{{g}}\Box \\ $$$${in}\:{each}\:{of}\:{the}\:\mathrm{6}\:{boxes}\:\left(\Box\right)\:{we}\:{can}\:{put} \\ $$$${nothing}\:\left({empty}\right)\:\Leftrightarrow\:{we}\:{add}\:\mathrm{0}\:{to}\:{it} \\ $$$${or}\:``{a}''\:\Leftrightarrow\:{we}\:{add}\:\mathrm{1}\:{to}\:{it} \\ $$$${or}\:``{aa}''\:\Leftrightarrow\:{we}\:{add}\:\mathrm{2}\:{to}\:{it} \\ $$$${or}\:``{aaa}''\:\Leftrightarrow\:{we}\:{add}\:\mathrm{3}\:{to}\:{it} \\ $$$${or}\:``{aaaa}''\:\Leftrightarrow\:{we}\:{add}\:\mathrm{4}\:{to}\:{it} \\ $$$${or}\:``{b}''\:\Leftrightarrow\:{we}\:{add}\:\mathrm{100}\:{to}\:{it} \\ $$$${or}\:``{bb}''\:\Leftrightarrow\:{we}\:{add}\:\mathrm{200}\:{to}\:{it} \\ $$$${or}\:``{bbb}''\:\Leftrightarrow\:{we}\:{add}\:\mathrm{300}\:{to}\:{it} \\ $$$${totally}\:{we}\:{should}\:{put}\:\mathrm{4}\:``{a}''\:{and}\:\mathrm{3}\:``{b}'' \\ $$$${in}\:{the}\:\mathrm{6}\:{boxes},\:{that}\:{means}\:{the}\:{sum} \\ $$$${of}\:{all}\:\mathrm{6}\:{boxes}\:{should}\:{be}\:\mathrm{4}+\mathrm{300}=\mathrm{304}. \\ $$$${so}\:{the}\:{number}\:{of}\:{ways}\:{to}\:{do}\:{this}\:{is} \\ $$$${the}\:{coefficient}\:{of}\:{term}\:{x}^{\mathrm{304}} \:{in}\:{the} \\ $$$${expansion}\:{of}\:{generating}\:{function} \\ $$$$\left(\mathrm{1}+{x}+{x}^{\mathrm{2}} +{x}^{\mathrm{3}} +{x}^{\mathrm{4}} +{x}^{\mathrm{100}} +{x}^{\mathrm{200}} +{x}^{\mathrm{300}} \right)^{\mathrm{6}} , \\ $$$${which}\:{is}\:\mathrm{1770}. \\ $$$${hence}\:{the}\:{number}\:{of}\:{valid}\:{words}\:{we} \\ $$$${can}\:{form}\:{is}\:\mathrm{1770}×\mathrm{5}!=\mathrm{212}\:\mathrm{400}\:\checkmark \\ $$

Commented by mr W last updated on 11/Aug/23

Terms of Service

Privacy Policy

Contact: info@tinkutara.com