Given: 3 boys and 2 girls stand in a queue
5 people in total
To find: P(#boys ahead≥#girls ahead+1, ∀ girls)
(1) 21(2) 31(3) 32(4) 43
1. total gender-patterns=(25)
2. score=(#boys so far)−(#girls so far)
3. condition→score path, count favourable
Only the gender pattern matters (all B alike, all G alike)
n(S)=(25)=10
n(S)=5!,n(F)=5×3!×2!
5!5⋅3!⋅2!=105=21
Read left to right: boy→+1,girl→−1
score starts at 0
For each girl: (#B−#G)ahead≥1
⇒score before each girl≥1⇒path never negative
1st person must be a boy (else 0≥1 fails for her)
B fixed first: remaining 4 slots hold 2B,2G
(24)=6 patterns
BGGBB: before 2nd girl, #B=1, #G=1⇒score=0<1 fail
n(favourable)=6−1=5
BGBGB,BGBBG,BBGGB,BBGBG,BBBGG
P=n(S)n(F)=105=21
Answer: (1)21