I got stuck in a revolving door today… and then did it again!

“Suppose we have a revolving door with 4 compartments, each taking up 90 degrees, like in the picture below. There are sensors both inside and outside the building. If a sensor detects a person approaching, the door starts turning. It will turn exactly 180 degrees, and then stop. Is this door safe to use?”

Source: Wikipedia

This exercise comes from a course on concurrency and distributed systems that I used to teach at Oxford. Students would build a model and then check for deadlocks with a model checker. But of course it is way more fun to check this in real life. So when I realised that the revolving doors at ITU were programmed in this exact way, I proceeded to test if I could get myself stuck, and I succeeded. Of course, I had to test if it was not just a fluke. So I tried it again, and succeeded once more. I must have looked like a lunatic walking around in a revolving door, but I was doing it for science! Can you figure out how I got myself stuck?

Source: XKCD

One thought on “I got stuck in a revolving door today… and then did it again!

  1. My take: you first lure the door into beginning to move, but then you wait until you can go into the next quarter. You are now in the revolving door, but it only completes one more quarter of turn, and you are stuck 😀

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: