# Continuity Problem

Assume a school gym allows entrance of students in blocks:

Block 1: 08:00 AM to 09:00 AM Block 2: 09:00 AM to 10:00 AM ...etc Until 10 PM which is closure.

Assume there's a maximum of users that can be in the gym at any given moment (15). So, to get in, people have to get in line in order to get considered for the next block. If someone arrives and he's number 16, he might as well go home.

Also, a person will stay exactly 1 hour in the gym. (In the future, I'd like to relax this restrain and allow a probability function for the time a person stays).

I want to prove that by allowing the continuous entrance of users (1 out - 1 in, at any given moment), mantaining the 15 users maximum, instead of separating the entrance into 1hr blocks of time, maximizes the average number of users in the gym at any given moment, and minimizes the quantity of people lining up at any given moment.

How can I do this? I've been trying to graph Number of Users (y), against Hour of the Day (x), and make the delta x tend to 0, but it's not working so far.

Can anyone show me the way on this?

Thanks

-

## 1 Answer

Unfortunately the answer to your question, in its current form, is that "it depends".

For instance, assume that everyone who comes in Block 1 stays all day long (until 10PM). Then it wouldn't matter if you let people in continuously or if you had them only allowed in on the hour because no one would be coming in or getting out. Then in this case the average number of people in the gym would be 15, which is the maximum possible, and the number of people lining up would (by your argument that the 16th person would go home) be, on average, 15 as well.

As an example of the opposite extreme, suppose that no one stayed in the gym for more than a second. Then, if you stayed with the block system, the average number of people in the gym would be close to 0 and the average number of people waiting would be 15. On the other hand, assuming there are an infinite number of people who want to get into the gym (for a second) then letting people in immediately after people left would yield an average number of people in the gym as close to 15 and an average number of people waiting as 0.

In short, the answer depends on other factors. How long will a person stay in the gym, on average? How long are people willing to wait to get into the gym? To an economist, these are questions about the utility function and diminishing returns of using the gym, as well as the indifference curve between desire to enter the gym and waiting. These questions are not, by nature, mathematical, and moreover the answers to such questions are usually figured out by economists through experimentation. If you are willing to make some reasonable assumptions about these values, then a mathematical analysis would yield more fruitful results.

-
Michael, thank you very much for your input. I see that I failed to include one assumption: Everyone stays in the gym exactly 1 hour. I'm going to change the question to reflect this. In the future, I'd like to relax this restrain and allow a probability function for the time a person stays. –  Alain Jacomet Forte May 16 '12 at 23:28
@AlainJacomet If everyone stays in the gym exactly 1 hour then it makes no difference if they allow people in only on the hour or allow one person to enter for every person who leaves. –  process91 May 16 '12 at 23:42