a)

Since each flip has two possible outcome, {H,T}.

Then, using product rule, the total number of different sequences of heads and tails can be calculated as,

\(S=2^{n}\)

\(=2^{9}\)

\(=512\)

Hence, the number of different sequences of heads and tails is 512.

b) The number of different sequences of heads and tails having exactly five heads can be calculated as

\(C^n_r=\frac{n!}{(n-r)!r!}\)

Here, the value of r is number of exactly five heads

\(C^9_5=\frac{9!}{(9-5)!5!}\)

\(=\frac{9\times8\times7\times6\times5!}{4!5!}\)

\(=\frac{9\times8\times7\times6\times5}{4\times3\times2\times1\times5!}\)

\(=9\times2\times7\)

\(=126\) Hence, the number of different sequences of heads and tails have exactly five heads is 126

c)

The number of different sequences having at most 2 heads means the number of heads is not more than or equal to 1.

The value of r can be represented as, \(r\leq1\)

\(C^9_0+C^9_1=\frac{9!}{(9-0)!0!}+\frac{9!}{(9-1)!0!}+\frac{9!}{(9-1)!1!}\)

\(=\frac{9!}{9!}+\frac{9\times8!}{8!}\)

\(=1+9=10\)

Hence, the number of different sequences having at most 2 heads is 10