« Back to blog

Crack the Code: Bob's Dilemma

In case you need to flex your brain a little today, here's a puzzle that when solved, would let you open an excel file so you can add your name to the list. Here's the story:
Bob goes to work very early but he encountered a problem. He forgot the five digit access code to his high-tech workshop. However, he remembered the five clues to get the right five digit access code. Here are the clues:
  1. The fifth number plus the third number of the access code equals fourteen.
  2. The fourth number is one more than the second number.
  3. The first number is one less than twice the second number.
  4. The second plus the third number equals ten.
  5. The total of all the five numbers is thirty.
The answer is the password of the attached excel file! Crack the Code: Bob's Dilemma Once you have opened it, add your name and pass it on!
If you were able to crack the code and were able to open the excel file and you just see one name, don't assume that no one else has cracked the code but you and I. I removed the other entries as they left some information that would be useful for spammers. This is part of the unposted privacy policy that I enforce in this site. Happy Hunting!

by

| Viewed
times | Favorited 0 times
Filed under:        

51 Comments

Apr 02, 2008
Marco said...
It was a read only file. I couldn't add on to it. :-(
Apr 02, 2008
Will said...
@Marco: I just checked and it isn't. What was the exact error message?
Apr 03, 2008
Harry said...
How do I pass the file on?
Apr 03, 2008
Will said...
@Harry: You can either post it in your blog or send it to your friends through email. Thanks for dropping by. :)
Apr 03, 2008
joe said...
i solved it using a brute force MATLAB program.

the algebraic method is also quite simple, albeit slightly tedious. perhaps you should edit the challenge to discourage the use of programming. it took me longer to write out the algebra than to write the program and run it.

Apr 03, 2008
Will said...
@joe: I'd love to see the code you used. Anyway, this is just for fun and hopefully, you had some. Thanks for dropping by. :)
Apr 03, 2008
joe said...
the matlab code i used is this:

for a=1:9
for b=1:9
for c=1:9
for d=1:9
for e=1:9
if e+c==14 && d==b+1 && a==2*b-1 && b+c==10 && a+b+c+d+e==30
[a b c d e]
end
end
end
end
end
end

a one line python code i used is this:

print [(a,b,c,d,e) for a in range(1,10) for b in range(1,10) for c in range(1,10) for d in range(1,10) for e in range(1,10) if c+e is 14 and d is b+1 and a is 2*b-1 and b+c is 10 and a+b+c+d+e is 30]

neither is elegant or pretty, but they both work extremely fast given the computationally small number of possibilities (100,000 if you check for 0 and allow repeated digits, obviously). i am a math major, but my programming is amateur at best. i did have fun working it out the "honest way" though.

Apr 03, 2008
Dan said...
This is quite simple really. Just write out the 5 clues algebraicly and them plug them into a TI-89 or anything else that can solve simulanius equations. Takes about 2 minutes.
Apr 03, 2008
Will said...
@joe: Wow. Thanks for sharing your code. I'm sure someone somewhere will be trying it out. I would.

@Dan: I guess it would. Would you happen to know any open source software that solves simultaneous equations? By the way, thanks for dropping by.

Apr 03, 2008
Sadie said...
Wow..I used this thing called my
brain
to figure it out

..seeing as you all were using calculators and all

and it took me about five minutes...
you should try it, it was fun

Apr 03, 2008
Will said...
@Sadie: I did. It hurt. LOL.
Apr 03, 2008
Lawliet said...
Very simple. You all are cheaters..pff..just do it the old fashioned way.

SPOILER:
a+b+c+d+e=30
a+b+d=16
a+b+b+1=16
a+2b=15
2b-1+2b=15
b=4

Once that was done just plug that to find a, then both a and b to find d, then find c using b, then e using all of em.

Apr 03, 2008
Will said...
@Lawliet: LOL
Apr 03, 2008
Andrew said...
Good old algebra brought me through.
Apr 03, 2008
Will said...
@Andrew: Me, too. :)
Apr 03, 2008
Matt said...
I just guessed the first clue, and the rest fell in place.
Apr 03, 2008
Thomas said...
This was lots of fun! I haven't done algebra in almost eight years, and I did the whole thing longhand on paper.

(2b-1) + b + (10-b) + (b+1) + (14-[10-b])

Apr 03, 2008
Will said...
@Matt: That's one lucky guess you made. :D

@Thomas: That's what I did too. But in Notepad. :D

Apr 04, 2008
Branden said...
i have it figured out but it says its wrong. Is there more than one number that matches the criteria
Apr 04, 2008
MMichele said...
That was fun. I feel kind of silly for not using the algebra, but I drew it all out and then came to the answer using a process of elimination. At least it checked out!
Apr 04, 2008
Ben said...
I solved this in my head as I read the puzzle, the hardest part was remembering the numbers so I could check them. :P
Apr 04, 2008
Alex said...
Nice puzzle, kept me occupied for about 2 mins. Good old algebra indeed.
Apr 04, 2008
Paige said...
I also tried to do this long hand with matrix row reduction but 1) wrote down one of the initial numbers wrong and 2) probably made some mistakes as I was on the phone during the calculation. So in the end I got an online program to row reduce for me and got the *right* answer. :) This wasn't quite as novel for me though since I taught a class involving matrices last semester, but it's always nice to waste a little time. Thanks!
Apr 04, 2008
Tom Holloway said...
:D That was easy! You should post more of these problems to solve.
Apr 04, 2008
Matt said...
I just entered the formulae into excel and tested for values of b.
Apr 04, 2008
Fatima said...
LOL I used my brain too but I didn't use algebra..my math skills are kinda rusty...
but I just used possibilities
I made a table and started if C is 5 then E is 9 based on the first clue (plus common sense: it can't be 4 because then E would be 10 and that would make the code 6 digits)...at the end I got 5 possible codes so I just summed them up based on the last clue n the 4th one turned out to be the right one :)
Apr 04, 2008
Jory said...
I have no idea how to do algebra, its 3 in the morning where I am and I figured it out in 5 minutes.
Apr 04, 2008
Ashley said...
i couldnt add to it either :-( but at least i got the code right.
Apr 04, 2008
Will said...
The saying "There's more than one way to skin a cat" (if there ever was a saying like that) certainly holds true for this situation. Thank you everyone for trying out this puzzle. I hope you all had fun. And a big thanks for dropping by. :D
Apr 04, 2008
Dave Cooper said...
I just used the same method I use to solve Kakuro puzzles, took about three minutes and a bit of elimination.
Apr 04, 2008
Will said...
@Dave Cooper: Now I'm intrigued to try out Kakuro puzzles. Any free Kakuro sites you recommend? :)
Apr 04, 2008
Melissa said...
I used row reduction as well, but I screwed up somewhere. :)

Revert to algebra.

Apr 04, 2008
Will said...
@Melissa: As long as you got it, that's all that matters. :D
Apr 04, 2008
guitarzan said...
I used a matrix and some simple algebra; 5 rows(R) and 5 columns with each column labeled a,b,c,d,and e, corresponding to the 5 numbers of the code, respectively.
- I filled in the 5 possibilities for c & e from clue #1 (c+e=14):
(R1)c=5 & e=9; (R2)c=6 & e=8; (R3)c=7 & e=7; (R4)c=8 & e=6; (R5)c=9 & e=5.
- Since clue #4 included c in it's equation (b+c=10), I filled in the corresponding
possibilities for b in each row: (R1)b=5, (R2)b=4, (R3)b=3, (R4)b=2, (R5)b=1.
- From clue #2 (d=b+1), I filled in the corresponding possibilities for d:
(R1)d=6; (R2)d=5; (R3)d=4; (R4)d=3; (R5)d=2.
- Now all that's missing is column a and using clue #5 (a+b+c+d+e=30), we have:
(R1)a=5; (R2)a=7; (R3)a=9; (R4) X ; (R5) X .
- Since R4 and R5 contain no possibilities for a, reviewing (R1), (R2), and (R3)
reveals that only 1 of them fits clue #3.
That was fun!
Apr 05, 2008
Hans said...
I tried to solve this manually and somehow got that b was 8. I then brute forced it with c and e since they can only be 5-9. Fun equations though. I haven't done anything beyond 2 unknowns with algebra in sometime. Thanks.
Apr 07, 2008
Will said...
Glad everyone's having fun. :D
Apr 07, 2008
wingo said...
Well Done
That was Fun!
Apr 07, 2008
Amelia said...
This was fun. I like some on here...have rusty mathematical skills, so I used good old fashioned pen and paper. Are there more of these you can post?
Apr 07, 2008
Zukie said...
this was really easy, just make 5 equations using a through e, then some simple math and you're done
Apr 07, 2008
Dan M said...
What's with all the damn fancy methods, I just used a pen and sticky notes, jeez. Easy as pie, or was it a cakewalk? Which is easier?
Apr 08, 2008
Amatoc.com said...
I found it very simple to do.

As you can see, once you derive your first equation from the clues, it all falls into place.

Apr 08, 2008
Laurie K said...
Coolness...figured it out in about 2 minutes but it was fun! Thanks for the brain teaser :)
Apr 08, 2008
Nabeel said...
Well, I guess I am a math genius, coz i just used brains, no algebra, no calcculators, or PCs or no programming

I assumed that the third and the fifth number are 6 and 8

the rest was easy

did not solve the puzzle in the order it is wriiten here

Apr 08, 2008
Will said...
[quote comment="1198"]Coolness...figured it out in about 2 minutes but it was fun! Thanks for the brain teaser :)[/quote]

You're welcome.

Apr 08, 2008
adam said...
since the first number has to be odd for it to equal to one less than twice the second you can skip alot of the choices i got it on my second guess using notepad. i did have to use my fingers to count because im getting really bad at math
Apr 08, 2008
Chance said...
You program users are cheaters.

I am a chump, however, as I failed to see the easy algebra solution that lawliet and amatoc explain.

I got it down to e - b = 4 and then plugged in values to see if they fulfilled all the other criteria. The second one I tried did.

Apr 08, 2008
Dave B (Calculatorless Genius?) said...
Took about 2 min or so. Wrote all the clues out onto notepad and went to work. People who used calculators and programs should be ashamed.

Good puzzle though. Thanks.

Apr 08, 2008
Pat G said...
Seeing as I figured all you needed was B, I used a process of elimination, knowing that B wasn't too large of a number since the whole thing had to equal only thirty... It took like two minutes.
Apr 08, 2008
Ron said...
Excel always helps!
Apr 09, 2008
villal said...
i liked this its not that hard if you can organize your self good luck
May 07, 2008
An Inconvenient Truth. Of sorts. » will.ph said...
[...] few weeks ago, I posted a puzzle that had about more than 10,000 views spread in a few days. This made me realize how much people [...]

Leave a comment...