Medium | Discrete Maths |

An infection spreads among the squares of an nXn checkerboard in the following manner. If a square has two or more infected neighbors, it becomes infected itself. (Each square has 4 neighbors only!). Prove that you cannot infect the whole board if you begin with fewer than n infected squares.

Hint

Invariance

Solution

Perimeter of infected area can't increase. It stays constant or decreases. Initially maximum perimeter is 4*k if k blocks are infected. But to infect all blocks, the perimeter must increase to 4*n, k<n. This is not possible

Source: P. Winkler

Enable Like and Comment Medium | Probability |

A & B are alternately picking balls from a bag without replacement. The bag has k black balls and 1 red ball. Winner is the one who picks the red ball. Who is more likely to win, the on who starts first, or second?

Hint

Look at k=0,1,2,3... Write down probability of starter being a winner.

Answer

Begin!

Solution

A & B keep on picking the balls without looking at their color. After all balls have been picked, the one who starts the game will have more balls (if k=even, total balls=odd) and hence higher probability of winning.

Solution by Palak Bhushan:

(prob of A winning in first chance = 1/(k+1)) +

(prob of A winning in 3rd chance = (1-(1/k+1))*(1-1/k)*1/(k-1) = 1/(k+1)) + ... +

(prob of A winning in 2r+1-th chance = 1/(k+1)) + ... .

When k=2n+1, there are n+1 such terms, giving the prob as (n+1)*1/(k+1)=1/2.

When k=2n, there are n+1 such terms, giving prob as (n+1)*1/(k+1)=(n+1)/(2n+1)>1/2.

Hence, doesnt matter who starts first when k is odd.

The first player has higher chance of winning when k is even

Solution by Palak Bhushan:

(prob of A winning in first chance = 1/(k+1)) +

(prob of A winning in 3rd chance = (1-(1/k+1))*(1-1/k)*1/(k-1) = 1/(k+1)) + ... +

(prob of A winning in 2r+1-th chance = 1/(k+1)) + ... .

When k=2n+1, there are n+1 such terms, giving the prob as (n+1)*1/(k+1)=1/2.

When k=2n, there are n+1 such terms, giving prob as (n+1)*1/(k+1)=(n+1)/(2n+1)>1/2.

Hence, doesnt matter who starts first when k is odd.

The first player has higher chance of winning when k is even

Source: 40 Puzzles

Enable Like and Comment Medium | Probability |

A postman brought N letters to a house with two letter-boxes. Since the two boxes were empty, he puts 1 mail in each of the two mail boxes. Then he chooses one of boxes with probability proportional to number of letters present in that box, and puts the 3rd letter in it. He does this for all subsequent letters. What is the expected number of letters in the box with lower letters?

Hint

This can be made equivalent to randomly splitting a deck of n cards into two parts. (n>2)

Solution

Suppose I have a stack of 2 black cards and one red card. Initially I put red between 2 black cards. Now I add black cards randomly between any two cards (so, initially it is either above or below red). Note that the probability that I add the card above the red card, when x-1 is the number of cards above red and y-1 is the number of cards below red is x/(x+y). Let the problem be: if red card is dividing the black cards into two sets, what is the expected number of black cards in the smaller section. So, we see that the two problems are equivalent.

Now this way, we are getting all possible combinations in which one red and n black cards can be mixed, we see that the probability that the red card is at height h is independent of h. So, the probability that the smallest box contains n/2 letter or 1 letter (or any number of letters between 1 and n/2) are all same. So, expected number of letters in the smaller box is asymptotically n/4

Now this way, we are getting all possible combinations in which one red and n black cards can be mixed, we see that the probability that the red card is at height h is independent of h. So, the probability that the smallest box contains n/2 letter or 1 letter (or any number of letters between 1 and n/2) are all same. So, expected number of letters in the smaller box is asymptotically n/4

Source: P. Winkler

Enable Like and Comment Medium | Probability |

You have an opportunity to make one bid on an object, whose value to its owner is, as far as you know, uniformly random integer between $0 and $100. What you do know is that you are so much better at operating the widget than he is, that its value to you is 80% greater than its value to him. If you offer more than the widget is worth to the owner, he will sell it. But you get only one shot. How much should you bid? For example, if its actual value is $10, you bid & win at $11, and sell it for $18, making profit. But if you bid more than $18, you make lose! But since u don't know how much its actual price is, how do u bid in order to make some profit?

Hint

Consider the case he already won the bid at $x. What happens next?

Solution

CSEBLOG: We should bet only 0! (dont bet!) Suppose I bet $x and get the widget. So, the value of it for the owner would be $y, uniformly distributed between 0 and x. So, its value for me is $1.8y. Expected value for me is 1.8* Expected value of y = 1.8*x/2= 0.9x

So, if I get, expected value of the widget for me is 0.9x$ paying x$.

If x is less, i.e I am not getting it, I did not gain/lose anything.

So, overall I am losing. So, I should not bid.

So, if I get, expected value of the widget for me is 0.9x$ paying x$.

If x is less, i.e I am not getting it, I did not gain/lose anything.

So, overall I am losing. So, I should not bid.

Source: P. Winkler

Enable Like and Comment Medium | Probability |

On a given highway, trucks arrive at the station according to a Poisson process with Lambda = 0.1/minute. This means that after a truck is just passed, the time for the next truck to arrive is an exponential random number with average arrival time of 10 minutes. Your car just broke on this highway, and you are waiting for the next truck for hitchhiking, what is your expected waiting time? On average how many minutes ago the last truck left?

Hint

It's not 5 minutes. Exponential distribution has memoryless property.

Solution

Using memoryless property of exponential distribution, the expected waiting time is 10 minutes. This also holds backwards, hence the expected time last truck passed is also 10 minutes. But this does not violate the total inter-arrival time of 10 minutes, because if your car breaks at a random time, you are more likely to be in long interval than a short one. I don't have time today, remind me to post a more mathematical explanation.

Latest solved Puzzles

Color Switches Weird Sequences Intersecting Pillars Consecutive sums Scaling a Square Difficulty Level

© BRAINSTELLAR |