Alun Clewe (alun_clewe) wrote,
Alun Clewe

Clicker Conundrum

So. In the interests of getting back to more regular updates, I'm going to post something I've been meaning to post for months but never got around to. It's a bit of a logic puzzle—a fairly easy puzzle, actually, but interesting in that it actually arose from real-life circumstances.

Said circumstances being the following: When I moved to my current residence, I was given a clicker to open the gate and the garage door. The code for the gate in the clicker was set by eight switches, each of which could be either up or down (leading to 256 different possible combinations). Now, I decided to take note of the switch positions in case anything happened to the clicker and it had to be replaced. So I wrote down, in order, which switches were in the up position. But then it occurred to me that there was another way to record which switches were up and which were down: I could treat each switch as a digit in a binary number, 1=up and 0=down. To my surprise, though, the number they formed in this way was the same sequence of digits as I'd already recorded!

That description may be a little confusing, so let me give an example. Suppose that, of the eight switches, the first, fourth, and seventh were up (and the rest down). Then I'd record that, using the first method, as 147. Now, as a binary number, I'd put 1s in the first, fourth, and seventh positions, thus: 10010010. Which happens to be equal in decimal notation to 146.

Of course, 147 is close to 146, but it's not quite equal to it, so that wasn't the actual arrangement of the switches on the gate code. Can you figure out the real combination? The solution, as it happens, is unique.

(By the way, yes, I suppose it could be argued that it's unwise of me to publicly give away the gate code to the condo. However: (1) most people reading this don't know where I live, (2) the code would only open the gate to the parking area, not let anyone into the condo itself, and (3) I seriously doubt anyone would bother to get a clicker and set the code just for the privilege of getting into the condo parking area without permission. So... really, I'm not too worried about it.)
  • Post a new comment


    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.