# Going to the Movies!

I was looking at movie times today and was struck by the oddly-spaced showing times. For example, at the local Loew's Theater "Tron: Legacy 3D" (127 min.) is playing on two screens at the following interlaced times: 1:00 pm, 1:45 pm, 4:00 pm, 4:45 pm, 7:00 pm, 7:45 pm, 10:00 pm and 10:45 pm. Why not space the times equally? Is there an algorithm at work here? Other than optimizing food sales by cleverly keeping a pool of waiters, the strange times might have to do with overbooking and accommodating johnnys-come-lately.

Consider the following idealized scenario. Suppose only $1$ movie is a playing at a theater with $n$ screens, and free popcorn and refreshments is given upon sitting in the theater, so no other factors are relevant for spacing movie times but ticket sales. Suppose each showing can accommodate at most $N$ people. Suppose $N \pm M$ arrive at the kiosk reasonably before any particular showing time, where $0 < M < N$, and $0 < L < M$ people show up just a little too late for any particular show -- the same number of latecomers come by each time. If any person has to wait for more than some fraction $0 < R < 1$ of the time $t$ of the movie in question to watch the next movie in the cue, then he/she returns the ticket and goes home. Suppose the $\pm$ sign above is governed by tossing a fair coin, $+$ for heads, $-$ for tails.

Question: Given the above data, what is the optimal spacing of $X$ movie times, each movie of the same length $t$, on $n$ different screens that maximizes the total number of ticket purchases and (happy) moviegoers?

If this question is too easy, then generalize the above scenario to multiple movies showing at the same theater. If this question is too hard, then simplify it.

(Of course, feel free to edit and improve.)

(Added Thoughts) The constraints above are in place to try to model the scenario as closely as possible while keeping the mathematics simple.

I'd like to account for a little randomness, and the simplest truly non-trivial random event is the tossing of a fair coin. If $N - M$ or $N + M$ people come every time, then the problem is trivial or cumulatively impossible, respectively. What makes this problem tractable is that there are some occasions when some people are left out of a showing. These people are either at the end of a long cue or literally late; either way they must wait but few, if any, will wait longer than the length of the movie. I believe the answer of spacing depends heavily on the amount of wait time. That is, if $R = 0$, $L + M > 0$ people go home every time (not optimal). If $R = 1$, then any reasonable spacing should suffice to accommodate the extremely patient moviegoers. I think this possibility oversimplifies the problem, unless I'm missing something crucial or obvious.

I suppose also that the condition $L < M$ could be relaxed to $L < N$, but my reasoning is that latecomers seem to be rarer than overbookers. Are these constraints reasonable?

-
The times you wrote down suggest to me that there are two screens showing Tron, one of which is showing them every 3 hours starting at 1:00, and the other which is showing them every 3 hours starting at 1:45. The extra gap between movies on one screen is probably for cleaning. – Qiaochu Yuan Dec 18 '10 at 19:43
@QY: Yes, I mentioned that there are two screens with the times being interlaced, which implies the movies are spaced 3 hrs for each screen but one is shifted by 45 min. – user02138 Dec 18 '10 at 23:21
Kind of off-topic, but it is a fun exercise to try and "optimize" (minimize) the amount of time you can spend at the theater and see, say, 3 movies (paying each time of course:-). I used to do this a lot, and came to the conclusion that there are intervals of time where the theater has few patrons, and so few movies are showing during those intervals. – user641 Apr 13 '11 at 3:04
Another issue that may be at play is that if a movie is popular enough to show in more than one screen, then there is a non-trivial possibility that a particular showing will run out of room, thus necessitating "overflow", which suggests starting times that are closer together. Also, certain hours are more reasonable than others: both a 4 and 4:45 showings will end early enough to accommodate a not-too-late dinner in the US, and 7 and 7:45 are at a good time to follow an early dinner. But a 5:30 showing would interfere with both. – Arturo Magidin Apr 28 '11 at 13:42
I like this problem. I'm guessing that small independent theaters don't have any sort of algorithm for organizing showtimes to maximize revenue. It seems likely that the google-plexes like AMC do though. If they don't I see some consulting work coming your way soon. – Schmitty Jan 25 '12 at 17:03