Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.

Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

Apothe0sis
Doesn't look like anything to meRegistered User regular

It's that time of year again (Ok, so I made that part up) which means that it's time to play the "let's post amusing mathematical puzzles, oddities or anomalies game". Why? Because we can, and who doesn't love maths?

And to begin, here is the first mathematical puzzle of the thread.

---

There are three train stations, A, B and C, B sitting equidistant between A and C. Next to stations A and C there are Klimpy's chain restaurants. Given that stations A and C are in commercial districts of the city and B sits in the only nearby residential district the restaurants at A and C are almost entirely reliant upon business from people who have caught the train from B.

Customers, knowing that the distance between their station and the stations either side do not plan which Klimpy's they will eat at, instead they arrive at the train station and simply catch the next train, it's it's going to station A, they eat at that restaurant, if it goes to B, they eat at that restaurant.

However, Klimpy's central management discovers that the Klimpy's restaurant at station A does about three times as much business as the restaurant at station C.

Assume that the same number of trains travel to each station each day, that the gap between any particular two trains traveling to the same station is 20 minutes and that the times at which the customers show up to the train station is random/evenly distributed throughout the day.

Explain.

And to begin, here is the first mathematical puzzle of the thread.

---

There are three train stations, A, B and C, B sitting equidistant between A and C. Next to stations A and C there are Klimpy's chain restaurants. Given that stations A and C are in commercial districts of the city and B sits in the only nearby residential district the restaurants at A and C are almost entirely reliant upon business from people who have caught the train from B.

Customers, knowing that the distance between their station and the stations either side do not plan which Klimpy's they will eat at, instead they arrive at the train station and simply catch the next train, it's it's going to station A, they eat at that restaurant, if it goes to B, they eat at that restaurant.

However, Klimpy's central management discovers that the Klimpy's restaurant at station A does about three times as much business as the restaurant at station C.

Assume that the same number of trains travel to each station each day, that the gap between any particular two trains traveling to the same station is 20 minutes and that the times at which the customers show up to the train station is random/evenly distributed throughout the day.

Explain.

Tide goes in. Tide goes out.

Es-annon NEVA 4GET

Es-annon NEVA 4GET

0

## Posts

DoconCorrect.

And now I have no idea what the next puzzle should be.

Apothe0sisonEs-annon NEVA 4GET

How about as the winner of the previous puzzle, I get to post one? Others are free to post problems as well, but this way there's a (sort of) prize.

DoconA prison warden decides to play a game with the inmates. If they can win, they all go free. If they lose, they all get stuck in there for life. The prisoners can all talk to each other to come up with a strategy before the game starts, but not after. The game is as follows: a prisoner will be randomly selected daily. He will enter a room where he sees two switches. He must toggle exactly one of the two switches and then exit the room. To "win," a prisoner must go to the warden and say "All prisoners have visited the room." If he is correct, they win. If not, they lose.

Again, after the game starts, the prisoners cannot communicate with each other. What's a good strategy for them to come up with before the game starts?

DoconSounds like a plan.

Apothe0sisonEs-annon NEVA 4GET

Apothe0sisonEs-annon NEVA 4GET

Let's say 50.

DoconLindenonCan prisoners be selected more than once?

enlightenedbumonLet's say they start both down/off. The only people that mess with the switches are the prisoners, and the prisoners are free to count days passed. But a prisoner can be selected multiple times, possibly even twice in a row (as it's random every day).

DoconI've seen this puzzle before. For it to be solvable, the prisoners must be given enough information beforehand to be able to describe the different possible positions of the switches. That is, they must be able to make a list of instructions for themselves that refers to switches as either in position A or position B. On or Off, Left or Right, Up or Down - it doesn't matter what the two states are, but the prisoners must be able to walk into the room and know whether each switch is in position A or B. Example: what if the switches are not labeled, and do not turn anything "on" or "off" that the prisoners can see? What the first prisoner walks into the room on day one only to discover that switch 1 flips Left/Right while switch 2 flips Up/Down? What if the switches are buttons that get pressed and change colors from Red to Green with each push? etc.

This is a great puzzle though. Number of prisoners doesn't matter. Solution is easier if no prisoner can be called more than once, but it can be solved even if any prisoner can be called any random number of times. It's also easier if you know the initial state of the switches (both down/off, as Doc posted here) but it can even be done without knowing the initial state. All in all, rockin hard puzzle!

I'll leave the solution to somebody else and post one of my favorite tricky puzzles.

AbsurdistonRight, they are physical switches with an up and a down. This can be known ahead of time.

DoconI think I have a solution for this, although it may not be the fastest one.

CantideonTheLawinatoronCantideonNo, it's fine because if they have already switched the important switch they switch the other one and the control dude ignores it. Of course, the expected length of time for this whole method to work is some enormous times, surely longer than the shortest sentence any of the prisoners is serving, but I think it would work.

enlightenedbumonProtoontook out her barrettes and her hair spilled out like rootbeer

What is the next number in this sequence?

1, 4, 7, 12, 15, 18, 21, 24, 27, ?

Absurdistonreallylong time.CorlisonBut I don't mind, as long as there's a bed beneath the stars that shine,I'll be fine, just give me a minute, a man's got a limit, I can't get a life if my heart's not in it.

That's why I said it's probably not the fastest, although that's partly due to the relatively large example value of X. If we were talking about 10 prisoners, my method would probably take only a few months.

And if the prisoners don't have to flip any switches, there's an easy way to cut down the time:

EDIT: Actually, that doesn't work because it would require flipping two switches on the same visit. Never mind.

CantideonI love ambiguous sequences!

cyphronJeez, some people.

Ok, to clarify, what is the next number in this sequence that does not require the use of multiple rules or "if...then" statements. Since, you know, you can obviously define

anysequence via an infinite number of functions if you allow the use of compound functions.1, 4, 7, 12, 15, 18, 21, 24, 27, ?

AbsurdistoncyphronWhat's the next number in this sequence?

10, 0, 3, 20, 16, 51, 32, 67, 74, ?

Absurdiston1, 11, 21, 1211, 111221, 312211, 13112221, ?

cyphronTechnically that's not a solution, as technically the problem isn't solvableâ€” every prisoner is not necessarily going to be called into the room after any amount of time.

That is a "good strategy", though

AdrienonA classic! This sequence was the first of it's type that I had ever come across, and I never did get it. I had to ask for the answer. Since then, of course, I look for solutions of a similar type in any stumper puzzle.

AbsurdistonHe's got you there, Doc. You need to stipulate that the prisoners and the universe they live in are immortal.

hehe

AbsurdistonThat is a solution. It does take a really long time.

DoconI must know.Rufus_ShinraonIf every prisoner isn't called in at some point, it's unwinnable anyway.

jothkionAdrienonI've come up with a solution, but it seems a little slow (but not as slow as the previous one). This assumes that they HAVE to flick a switch every day.

A prisoner enters the room on day of the "month" Y. If the first switch is on, he notes that prisoner Y has been in the room at some point. Otherwise he notes nothing and always ignores the previous setting of the second switch. Then, if he is prisoner Y+1 (modulo X) or he has noted that prisoner Y+1 has been in the room, he toggles the switches so the first one is on and the second is whatever. Otherwise, he toggles the switches so the first one is off and the second is whatever.

For example, let's say there are 7 prisoners, assigning each one a day of the week and they start by marking off their day of the week. Some prisoner enters on a certain day of the week, say Monday. If he sees the switch on, he marks off Monday. Then if he has Tuesday marked off, he sets the first switch to on and leaves, otherwise he sets it to off. The first prisoner with all the days marked off goes to the warden.

This means that some prisoner will have to enter the room on all of the other assigned days at least once, and that every other prisoner will have to enter the room on his assigned day. That could take awhile.

Savantonhttp://www.segerman.org/prisoners.pdf

http://www.ocf.berkeley.edu/~wwu/papers/100prisonersLightBulb.pdf

Edit: Obviously, these links can be considered massive spoilers for the prisoner problem. You've been warned.Most methods can be extended to two lightbulbs (switches) in some respect; the first paper has a small section on two switches, as well as a bunch of other variants.

Interestingly, to my knowledge, no-one has been able to prove what the

bestsolution is.areaon10, 0, 3, 20, 16, 51, 32, 67, 74, ?

1, 4, 7, 12, 15, 18, 21, 24, 27, ?

Absurdistoncyphron2, 5, 877, 27644437, 35742549198872617291353508656626642567, 359334085968622831041960188598043661065388726959079837 ... ?

Apothe0sisonEs-annon NEVA 4GET

Usually when they jump right from small numbers into enormous numbers it means that the series is a list of numbers with an unusual property.

EDIT:

AbsurdistonREAL SPOILER

Apothe0sisonEs-annon NEVA 4GET

I'm just happy that I know what an Erdos number is.

Absurdiston