For your interview today, you will be required to solve a familiar programming and statistics puzzle.
Given a bag of N pairs of programming socks, what's the probability that after M tries, each time removing one sock from the bag, you will have at least one pair of socks?
well after the 2nd sock I'll have a pair and then no matter how many more socks I pull I'll still have that first pair, giving me "at least one pair" does that make sense?
Christian Smith
I think user meant a left and right sock as a pair
Ryan Walker
just continue to pick out socks because you cant have enough
William Jackson
It's a relatively complex formula to write here, with no latex formatting
Ryan Mitchell
It's an imageboard, you can just upload a picture of your formula.
Jeremiah Lee
p = 41%
You will never be a woman.
Jace Diaz
>a left and right sock wut
Nicholas Brooks
1 minus the product of 1 minus M over 2N-M+1 from 1 to M
Gabriel Robinson
when you do products over a range you generally need a variable, e.g. n! is the product of i from i = 1 to n, where is the variable here?
Ian Young
Cute feet!
Landon Powell
THERE IS NO SUCH THING AS A LEFT OR RIGHT SOCK
Jace Hall
you can have differently coloured pairs of socks, obviously all the pairs in the exercise have unique colour combos
Andrew Morales
replace M with x in the sum, for all x in 1...M
Oliver Powell
then the real solution is to fix your wardrobe so all your socks are the same and you don't have to waste time organizing them every time you do the laundry.
Brandon Cox
For the basic case of one pair (N = 1) and 2 tries (M = 2) this produces 1 - (1 - 1/(2 - 1 + 1)) * (1 - 2/(2 - 2 + 1)) which is 1.5 which isn't the correct answer of 1. Can you write it using some standard notation?
Adam Murphy
oops
Camden Barnes
>Can you write it using some standard notation? no, i do webdev.