How many 3 letter words can be formed using the letters of the word “TESTBOOK”? I'm clueless to solve this question using generating function, can anyone please help me or at least provide some hint.
Generating function for counting problem.
1
$\begingroup$
combinatorics
discrete-mathematics
generating-functions
-
1Well, as there are only three letters you can have at most one double (there are no available triples). So split into two types: those with a double and those without. – 2017-01-14
-
0Thanks for reply. Can you show me how to use generating functions here? – 2017-01-14
-
0And using your approach, getting 138. Answer given is 150 – 2017-01-14
-
2By my method: with double, pattern is $XXY$ ...two choices for $X$, then five for $Y$ so $10$, then three places to put the $Y$ so $30$. without double is $\binom 63\times 3! =20\times 6=120$. – 2017-01-14
-
1Generating functions seem like a bad way to approach this...they do better when order isn't important. Not immediately seeing a way which is easier than writing out all the cases. – 2017-01-14
-
0Yeah, got the answer. But I wanted some generating function ways. Anyway thanks. Thanks for help. :) – 2017-01-14
1 Answers
3
The generating function is $f(z)=\left(1+z+\frac{z^2}{2!}\right)^2\cdot (1+z)^4$
The first two factors represent $t$ and $o$. The other four factors represent $e,x,b,k$
If you expand it you get:
$f(z)=1+\frac{6}{1!}z+\frac{32}{2!}z^2+\frac{150}{3!}z^3+\frac{606}{4!}z^4+...$
There can be formed $6$ words with $1$ letter. $32$ words with $2$ letters. And $150$ words with $3$ letters.
-
0Wonderful. Can you please tell me how 150? Shouldn't it be 150/3! ? – 2017-01-14
-
1No, you use the exponential generating function: $f(z)=\sum_{i=0}^{\infty} a_i\cdot \frac{z^i}{i!}=a_0+a_1\cdot \frac{z}{1!}+a_2\cdot \frac{z^2}{2!}+a_3\cdot \frac{z^3}{3!}+\ldots$. The coefficient $a_3=150$. – 2017-01-14