In: Computer Science
Felicia has three best friends named Bob, Cassandra, and Hubert. How many ways are there to line up the eight kids so that Felicia is next to at least one of her three best friends?
Total ways are there to line up the eight kids so that Felicia is next to at least one of her three best friends are
If Felicia at start or end position then there will be only two place where her one friend can stand
so select one place as 2C1
and select one friend from three as 3C1
so one place of Felicia from 2 place and one place for her friend fixed and remain 6 place can be fill as 6! type
so ways will be=2C1 * 3C1 * 6!=2*3*720=4320
If Felicia at any position(except start or end) then there will be two place (left or right)where her one friend can stand
so select one place for Felicia from remain six place as 6C1
and select one friend from three as 3C1
two place (left or right)where her one friend can stand as 2C1
so one place of Felicia from 6 place and one place for her friend fixed and remain 6 place can be fill as 6! type
so ways will be=6C1 * 2C1 * 3C1 * 6!=6*2*3*720=25920
So total ways are =4320+25920=30240