The Gateway to Computer Science Excellence
0 votes
How many 5 letter word possible having atleast 2 a's ?
in Combinatory by | 272 views

1 Answer

+4 votes
Best answer
You can approach this way

Total possible $5$ letter words  $-$ words containing $0$ '$a$' $-$ words containing exactly $1$ '$a$'

$(26)^5 - (25)^5 -$  $^{5}C_{1}$$ * (25)^4$

(Assuming $26$ distinct letters from $a$ to $z$ are available and repetition is allowed)
selected by


out of 5 places we choose any two for $a$.

then remaining 3 places filled in 26*26*26 ways..

So total words possible  $=^5C_2 *26*26*26$

(I assume only lowercase 26 letters and repetition is allowed)



@Verma Ashish it will lead to overcounting.

Consider string aaaaa

If you do 5C2 (first and the last position is selected and a is placed) and rest have 26 options then aaaaa is counted. Similarly, if we select any other 2 places and keep a and rest any other element, your aaaaa string is counted many times.

Thanks Tushar...
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,315 questions
60,427 answers
95,235 users