#How many ways

29 messages · Page 1 of 1 (latest)

bronze stirrupBOT
tranquil oar
#

ok, lets start thinking about how many options he has when for the first candy

#

he has 28 diffrent ones so at the start, he has 28 diffrent candys to choose from

#

for the second candy he only has 27 options because he already chose one before

#

if you follow this scheme you will recognize that e.g. if he gives every visitior 2 candy, the amount of options he has is 28*27 = 756

glacial sigil
#

i see, but how do you take into account he doesn't give more then 2 of the same candy to one person ?

silent phoenix
tranquil oar
#

well think about how many options he would have if he gives one person 2 candy and they are both the same ones

tranquil oar
#

so combination instead of permutation

glacial sigil
#

I do think this is combination

tranquil oar
#

oh shit sorry

#

ur right

#

my bad

glacial sigil
#

all good, happy you are giving me a hand 🙂

#

damn math in Computer science haha

tranquil oar
#

yes so just n over k

glacial sigil
#

like nCk ?

#

surely not

silent phoenix
#

why not? i don't think this is some sort of trick question.

glacial sigil
#

Fair enough lol

#

and divide by 2 the entire thing no ?

tranquil oar
glacial sigil
#

Cool thanks man

tranquil oar
#

k is in this case r

#

but this one helps me alot

glacial sigil
#

yeah so then Q2 in this instance is Permutation

glacial sigil