1
$\begingroup$

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.

  • 1
    Well, 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
  • 0
    Thanks for reply. Can you show me how to use generating functions here?2017-01-14
  • 0
    And using your approach, getting 138. Answer given is 1502017-01-14
  • 2
    By 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
  • 1
    Generating 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
  • 0
    Yeah, got the answer. But I wanted some generating function ways. Anyway thanks. Thanks for help. :)2017-01-14

1 Answers 1

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.

  • 0
    Wonderful. Can you please tell me how 150? Shouldn't it be 150/3! ?2017-01-14
  • 1
    No, 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