Answer:
Part (A) The required ways are 792.
Part (B) The required ways are 101376.
Step-by-step explanation:
Consider the provided information.
Part (A) The alphabet {a, b}
The length of strings is 12 that containing exactly five a's.
The number of ways are: ![\frac{12!}{5!7!}](https://tex.z-dn.net/?f=%5Cfrac%7B12%21%7D%7B5%217%21%7D)
After filling "a" we have now 7 places.
For 7 places we have "a" and "b" alphabet but we already select a's so now the remaining place have to fill by "b" only.
Thus, the required ways are: ![\frac{12!}{5!7!}\times 1=792](https://tex.z-dn.net/?f=%5Cfrac%7B12%21%7D%7B5%217%21%7D%5Ctimes%201%3D792)
Part (B) The alphabet {a, b, c}
We have selected five a's now we have now 7 places.
For 7 places we have "b" and "c".
Thus, there are 2 choices for each 7 place that is ![2^7](https://tex.z-dn.net/?f=2%5E7)
Therefore the total number of ways are: ![792\times 2^7=101376](https://tex.z-dn.net/?f=792%5Ctimes%202%5E7%3D101376)
Thus, the required ways are 101376.