In: Computer Science
Suppose that you have gloves of 4 colours in the drawer: black, brown, grey and white, 6 pairs of each colour. Every glove is either left or right and does not fit on the other hand.
If you are taking gloves out in the dark, without looking, what is the minimum number you need to take out to guarantee that you have a pair (that is, a left and a right of the same colour)?
What is the minimum number of gloves you need to take out to guarantee that you have three pairs of gloves? (Here, colours do not matter, as long as each pair consists of a left and a right of the same colour)
What is the minimum number of gloves you need to take out to guarantee that you have a pair of white gloves?
What is the minimum number of gloves you need to take out to guarantee that you have three pairs of three different colours?
What is the minimum number of gloves you need to take out to guarantee that you have a pair which is not white?
We have gloves of 4 colours black, brown, grey and white.
We have 6 pairs of each colour.
We need to find, minimum number of gloves we need to take out to guarantee that we have a pair. In this case, the worst probability is when we only get the same hand gloves all the time till it gets finished, and then we will be sure that the other hand glove will come, and hence it will pair up. Hence, total number of single-hand gloves + 1 = 6*4 + 1 = 25.
We need to find, minimum number of gloves we need to take out to guarantee that we have three pairs of gloves. In the worst-case scenario, before getting 3 pairs of gloves, we would have got all gloves of the same hand. So, the total number of single-hand gloves + 3(3 other handed gloves needed to pair up) = 6*4 + 3 = 27
We need to find pair of white gloves. In the worst-case scenario, all other gloves are taken out except the white gloves and then white gloves started coming. And also all same-handed gloves of white colour come first and after that other handed gloves of white colour start coming. So, number of non white gloves + no. of white gloves of same hand + 1 = 6*3*2 + 6 + 1 = 45.
We need to find 3 different coloured pairs of gloves. In the worst case, before finding 3 different coloured pairs of gloves, we would have found all same-handed gloves and all the gloves of 2 colours and then finally a glove of another hand from the third colour. So, 6*4 + 6*2 + 1 = 37
We need to find a non white pair of gloves. For this, in the worst case, before getting non-white gloves pair, we would have got all gloves of the same hand and all the white gloves and after that, the glove we would have got would have completed the pair of non white gloves. So, 6*4 + 6 + 1 = 31