Monday, February 23, 2009

Waiting at the Tennis Courts

To the busy bodies of IIT Kanpur the answer to the following problem will be quite useful.

So recently there is an increasing upsurge in the number of people playing Lawn Tennis since the advent of the new Synthetic Courts in the campus. The problem is that most of the times they seem to be occupied and many busy people are obviously turned off. The good news is that each court can be booked only for a period of 40 minutes. After that either the booking has to be renewed (when there is no one in the waiting queue) or the court is now handed over to the people next in the queue. There are 4 such courts and an obvious question to ask is how much time will the people have to wait. The maximum time is of course 40 minutes but it seems pretty unlikely that people will have to wait that long.
So the problem is this. We assume a uniform distribution of people coming to play. That is the probability that people come at any of the allowed times (allowed small intervals to be accurate) is equal. This is quite accurate at the busy times of the court for example at around 5 pm. The incoming junta would obviously book the court which is going to be freed the earliest.
Determine the expected amount of time spent waiting for a court to free by the enthusiastic people out here. (The answer will be a huge relief. It comes out to be 8 minutes. The junta from hall 9 spend at least 9 minutes when they walk from Hall 9 to Hall 2..so this duration is too small to piss off the busy people)

2 comments:

Pravesh said...

Ok..Here's the guide to a solution. The problem of course is very standard in its structure. We assume as a simplifying measure that no one is waiting in the queue. A little more work can give an answer to that problem too.

Say the people come at time t. Then all that matters is the duration of 40 minutes before this. People have equal chance of coming at any time in the past 40 minutes. Let t0 = t-40min. Now if
Xmin is such that the earliest team to come between t0 and t came at t0+Xmin then we want the expected value of Xmin since that is amount of time the people wait.

Prob[min reaching time out of 4 groups occupying 4 courts <= x] =
1 - Prob[min reaching time out of 4 groups >= x]
= 1 - (1 - x/40)^4
Therefore Prob[Xmin <= x] = 1 - (1 - x/40)^4

pdf of Xmin = f(x) = 1/10 * (1 - x/40 )^3

Using this to compute the integral xf(x) over 0 to 40 yields 8 minutes.

shadowfax said...

Very Good.
I havent verified your answer ... but a good statistical model indeed. However, we need to take into account the following information as well :
a) CPA waale aa jaate hain 6-8 pm
b) 4-5 pm coach apne profit ke liye campus bacchon ko sikhata hai
c)once sai starts playing, the 40 minute rule doesnt apply.