Movie theaters are difficult to manage. Lots of people need to move through limited space, all towards optimal view points, many many times a day! Striking a balance between customer convenience and sufficient revenue is most tricky. For example, right now I'm adding a new chamber to my complex, but I'm not sure how big to make it. The thing about dense seating is that, on the one hand, it generates the most revenue possible from the space I have, but on the other hand, it gets more and more inconvenient for the customers the larger it gets.
Rows in my theater are made of some number of seats, densely packed from the aisle to the wall, thus having only one exit. As such, when someone needs to get up and out, everyone between that person and the aisle is also forced to get up and out - this can get very frustrating for customers in long rows! So, I've done some analysis, and here's what I've come up with:
I can fit 25 rows in my new theater. I want to make the rows as long as possible. How many seats long can I make all these rows, and still meet the customer satisfaction requirements I just outlined? All the rows must be the same size, of course.
Assume the theater is always full, don't worry about empty seats.
You should round down when computing 10% of customers. For a theater with 5 seats per row, 10% of customers = 12, not 13.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This problem has no closed form solution that I have yet discovered - if someone else finds one, please do post!
There is no shortcut to the answer here. One might be tempted to reduce the problem to a single row and find the answer there, but it turns out this doesn't work, since the distribution of how many people get up in a single row is not uniform. For instance, if we change the problem to be for 1 5 rows, the answer becomes 2 2 instead of 2 1 , and if we go up to 5 0 rows, the answer shrinks down to 2 0 !
We need to figure out, for a given number of seats per row, the probability that more than 10% of customers will be required to stand up, given the parameters of the problem. Then, we need to find the maximum parameter for this function that yields a probability < 50%. The problem statement implies that this function is monotonically increasing, which makes our job easier, and we'll see this as we ferret out our solution. (Though, unfortunately, I don't have a proof for this... proofs welcome!)
We'll use dynamic programming to compute the probability for arbitrary c , the number of columns of seats, or seats per row, in the theatre. First, we observe that the number of people that get up in any one row is independent of all the other rows. Let p , the probability that an arbitrary individual is a 'given', be 1 0 0 1 , and let P ( x ) be the probability that, in an arbitrary row, exactly x people need to get up (that is, they are 'givens', or 'forced'). Thus:
P ( 0 ) = ( 1 − p ) c
P ( 1 ) = ( 1 − p ) c − 1 ∗ p
P ( 2 ) = ( 1 − p ) c − 2 ∗ p
. . .
P ( c − 2 ) = ( 1 − p ) 2 ∗ p
P ( c − 1 ) = ( 1 − p ) 1 ∗ p
P ( c ) = ( 1 − p ) 0 ∗ p
P ( c ) is thus trivially computable. Now, let's recurse: Define f ( r , c , m ) to be the probability that, in a theater of r rows and c columns, at most m customers are forced to stand at intermission. The following python-sketch-code computes f:
def f(r,c,m):
if r == 0:
# No rows left, nothing to compute
return 1
sum = 0
for n in [0, min(c,m)]:
# For each possible number (n) of people that
# got up in this row, take the probability of
# such an event, and multiply it by the
# probability that (m-n) people get up in
# subsequent rows. This covers all possible
# eventualities without double-counting.
sum += P(n) * f(r-1, c, m-n)
return sum
By using ( r , c , m ) as a unique key, we can cache the results of f ( r , c , m ) to turn this into a dynamic programming solution, which does O ( C ) computations for each of O ( m R ) dynamic states, where R is the number of rows, 2 5 in this case. For a given fixed c , and uninitialized cache, this yields O ( c ∗ m ∗ R ) computations, which is on the order of thousands, or tens of thousands, for c at 1 0 or 2 0 . Less efficient solutions will likely spawn far less tractible numbers.
The probability that more than 10% of customers will have to get up in a theater with c seats per row is thus 1 − f ( 2 5 , c , ⌊ 1 0 2 5 c ⌋ ) . It suffices to compute this function from c = 1 upwards, until we observe the probability cross the 50% threshold.
1 − f ( 2 5 , 2 1 , ⌊ 1 0 2 5 ∗ 2 1 ⌋ ) = 0 . 4 9 2 4 9 5 1
1 − f ( 2 5 , 2 2 , ⌊ 1 0 2 5 ∗ 2 2 ⌋ ) = 0 . 5 2 0 0 5 2 9
So, we answer 21 .
It seems somewhat unlikely that there is a closed form solution.
This is an interesting question, though I have some concerns about your approach:
1. The 10% rule should only apply to people who do not need to leave their seats. E.g. if everyone in a row wants to get up for something, then no one is inconvenience. Though, I think you are trying to avoid this through the first condition. Is that so?
Note that your probabilities do not sum to 1. Are you missing a ( k c ) term?
Even accounting for ( k c ) , P ( 1 ) should refer to the scenario where only the person in the 2nd left most seat needs to go, or the person in the 2nd right most seat needs to go.
Are you modeling for "people will stand up in the most optimal manner, so as to inconvenience the fewest people". E.g. In a row of 10 seats, if person 4 needs to get up, usually persons 1, 2, 3 will get up. However, if person 4 and 6 need to get up, and persons 7, 8, 9, 10 have already gotten up, then it is "more convenient" for just person 5 to get up. Of course, in this scenario, the "most convenient" is for persons 1, 2, 3, 5 to get up.
Log in to reply
Update: Reworded problem to make all this more explicit. Let me know if you encounter any other issues!
I'll see if I can reword the problem to address your concerns. It should be noted that this is a misunderstanding, though, and not mathematical error.
If I can get a better grasp on these nuances, I'll perhaps post a v2 of this problem that includes all the difficult parts this one glosses over. At the moment, I simply haven't solved the harder version, which I need to do first before I can post such a challenge!
UPDATE: I did! The v2 problem is here
"It seems somewhat unlikely that there is a closed form solution."
Just curious, do you know of any proven cases in which there is no closed form solution, and you have to do an exhaustive search or random sampling?
Log in to reply
Finding the roots of a quintic has no closed form solution. The proof is by abstract algebra. Exhaustive search / random sampling would likely be unable to prove if a closed form solution does not exist.
Having said that, there is a huge distinction between "finding a specific solution in this particular scenario" and "finding a closed form solution for all cases". For example, the quntic x 5 − 1 = 0 has specific solutions that we know of.
A really slow python program:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
Problem Loading...
Note Loading...
Set Loading...
Python 3.3: