1 votes 1 votes Given 3 characters a, b, c. Find the number of strings of length n that can be formed from these 3 characters. Given that : we can use ‘a’ as many times as we want, ‘b’ maximum once, and ‘c’ maximum twice. debanjan sarkar asked Aug 7, 2017 debanjan sarkar 519 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply joshi_nitish commented Aug 7, 2017 reply Follow Share $\frac{n^{3}+3n+2}{2}$ ?? 0 votes 0 votes dkvg1892 commented Aug 13, 2017 reply Follow Share I think answer should be case 1: no b's and c's then its 1 case 2: only one b's and rest all a's then its n!/(n-1)! case 3: only one c's and rest all a's then its n!/(n-1)! case 4: only one b's and c's and rest all a's then its n!/(n-2)! case 5: only two c's and rest all a's then its n!/((n-2)!*2!) case 6: only two c's and one b's and rest all are a's then its n!/((n-3)!*2!) so total number of string will be sum of all the above cases. i.e. 1+n!/(n-1)! + n!/(n-1)! + n!/(n-2)! + n!/((n-2)!*2!) + n!/((n-3)!*2!) 0 votes 0 votes Please log in or register to add a comment.