Skip to main content

Posts

Showing posts with the label Permutations and Combinations

How many substrings of different lengths (non-zero) can be found formed from a character string of length $n$?

How many substrings of different lengths (non-zero) can be found formed from a character string of length $n$? (A) $n$,  (B) $n^2$,  (C) $\frac{n(n - 1)}{2}$,  (D) $\frac{n(n + 1)}{2}$.  (GATE 1994)  Answer: (D) $\frac{n(n + 1)}{2}$.   Explanation:  The given string has length $n$.  No. of substrings of length $n = 1$  No. of substrings of length $n - 1 = 2$  $\cdots \cdots \cdots \cdots \cdots \cdots$  $\cdots \cdots \cdots \cdots \cdots \cdots$  No. of substrings of length $1 = n$  Therefore, the total number of substrings  $= 1 + 2 + \cdots + n$  $= \frac{n(n + 1)}{2}$. 

We need to choose a team of 11 from a pool of 15 players and also select a captain. Find the number of different ways this can be done.

We need to choose a team of 11 from a pool of 15 players and also select a captain. Find the number of different ways this can be done.  (A) $\binom{15}{11}$,  (B) $11 \times \binom{15}{11}$,  (C) $15 \times 14 \times \cdots \times 5$,  (D) $(15 \times 14 \times \cdots \times 5) \times 11$.  Answer: (B) $11 \times \binom{15}{11}$  Explanation:  Number of ways of selecting a captain from 15 players  = $\binom{15}{1}$.  Remaining players in the pool $= 15 - 1  = 14$, and the remaining number of players to be chosen $= 11 - 1 = 10$.  Number of ways of selecting 10 players from a pool of 14 players = $\binom{14}{10}$.  Therefore, the total number of different ways of selecting 11 players from a pool of 15 players and also select a captain is  $= \binom{15}{1} \times \binom{14}{10}$  $= 15 \times \frac{14 \times 13 \times 12 \times 11 \times 10!}{4! \times 10!}$  $= \frac{15 \times 14 \times 13 \times 12 \times 11!}{4...