Page 1 of 1

PIN puzzle

Posted: Wed Apr 21, 2010 4:48 pm
by Matt Morrison
This is probably not new to most of you, but anyway...

Jim Beam has a PIN for each of his credit cards. They're both 4 digits.
One is the reverse of the other (e.g. 1234 and 4321), and it is also quadruple the size of the other (e.g. 1234 and 4936).
What are the two numbers?

I'm quite aware that this must be ridiculously easy but I'm not mathsy enough to even be able to think about the patterns and it's pissing me off now.

EDIT to change double to quadruple to fix puzzle (hopefully)

Re: PIN puzzle

Posted: Wed Apr 21, 2010 4:54 pm
by Howard Somerset
0000 and 0000 works. But I'm sure that's not what you're thinking of.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 5:11 pm
by Matt Morrison
Howard Somerset wrote:0000 and 0000 works. But I'm sure that's not what you're thinking of.
Hehe, nope. As mentioned above, I don't know the answer. Haven't googled it either. But apparently there's just one solution. And it was 'on the radio' two days ago according to the friend who passed it on. That's all my info!

Re: PIN puzzle

Posted: Wed Apr 21, 2010 5:18 pm
by Innis Carson
Howard Somerset wrote:0000 and 0000 works. But I'm sure that's not what you're thinking of.
Think this might be the only one actually, unless I've gone wrong somewhere.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 5:23 pm
by Ryan Taylor
I'm interested how you go about working something like this out? The only method I would have is trial and error which would take ages.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 5:49 pm
by Matt Morrison
Innis Carson wrote:
Howard Somerset wrote:0000 and 0000 works. But I'm sure that's not what you're thinking of.
Think this might be the only one actually, unless I've gone wrong somewhere.
Bollocks. I hope not, otherwise I've wasted my time, my friend is rubbish, and this whole thread sucks.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 6:12 pm
by Howard Somerset
Well I don't see any other answer.

Suppose abcd is the smaller, and dcba is the larger.

a must be even, since it's the last digit of a number which is twice another.

a is also the first digit of the smaller number, so a must be 0, 2 or 4

Looking at the units digits of the multiplication by 2:

if a is 0, d must be 0 or 5
if a is 2, d must be 1 or 6
if a is 4, d must be 2 or 7

So we have six possibilities:

0bc0 x 2 = 0cb0
0bc5 x 2 = 5cb0
2bc1 x 2 = 1cb2
2bc6 x 2 = 6cb2
4bc2 x 2 = 2cb4
4bc7 x 2 = 7cb4

Looking at the thousands digits, only the first of these six is possible.

so a and d must = 0

By continuing in a similar fashion, it can also be shown that b and c must also be 0, so my first post, offering 0000 and 0000, gives, what I think, is the only solution.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 6:23 pm
by David O'Donnell
Howard Somerset wrote:Well I don't see any other answer.

Suppose abcd is the smaller, and dcba is the larger.

a must be even, since it's the last digit of a number which is twice another.

a is also the first digit of the smaller number, so a must be 0, 2 or 4

Looking at the units digits of the multiplication by 2:

if a is 0, d must be 0 or 5
if a is 2, d must be 1 or 6
if a is 4, d must be 2 or 7

So we have six possibilities:

0bc0 x 2 = 0cb0
0bc5 x 2 = 5cb0
2bc1 x 2 = 1cb2
2bc6 x 2 = 6cb2
4bc2 x 2 = 2cb4
4bc7 x 2 = 7cb4

Looking at the thousands digits, only the first of these six is possible.

so a and d must = 0

By continuing in a similar fashion, it can also be shown that b and c must also be 0, so my first post, offering 0000 and 0000, gives, what I think, is the only solution.
I was about to post exactly the same though not as sveltely!

Re: PIN puzzle

Posted: Wed Apr 21, 2010 6:44 pm
by Ryan Taylor
Howard Somerset wrote:Well I don't see any other answer.

Suppose abcd is the smaller, and dcba is the larger.

a must be even, since it's the last digit of a number which is twice another.

a is also the first digit of the smaller number, so a must be 0, 2 or 4

Looking at the units digits of the multiplication by 2:

if a is 0, d must be 0 or 5
if a is 2, d must be 1 or 6
if a is 4, d must be 2 or 7

So we have six possibilities:

0bc0 x 2 = 0cb0
0bc5 x 2 = 5cb0
2bc1 x 2 = 1cb2
2bc6 x 2 = 6cb2
4bc2 x 2 = 2cb4
4bc7 x 2 = 7cb4

Looking at the thousands digits, only the first of these six is possible.

so a and d must = 0

By continuing in a similar fashion, it can also be shown that b and c must also be 0, so my first post, offering 0000 and 0000, gives, what I think, is the only solution.
Ohhhhhhh.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 6:47 pm
by Matt Morrison
Thanks for the explanation Howard, that was great to read. Stupid puzzle, sorry I posted it without knowing anything about it. Certainly agree with your reasoning!

Re: PIN puzzle

Posted: Wed Apr 21, 2010 6:52 pm
by Howard Somerset
Matt Morrison wrote:Thanks for the explanation Howard, that was great to read. Stupid puzzle, sorry I posted it without knowing anything about it. Certainly agree with your reasoning!
No worries, Matt. I get just as much enjoyment in proving that a puzzle cannot be solved, than in finding a solution. :)

Indeed, I used to get paid for doing just that.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 7:20 pm
by Kirk Bevins
With a bit of logical reasoning I quickly came to the conclusion that it was impossible unless using 0s as the 1st and last digits. From the same argument, the 2nd and 3rd digits had to be 0s too.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 8:24 pm
by Matt Morrison
Had a brief word with aforementioned mate, he says it wasn't a trick so he must have misremembered it, he now thinks it's the larger one being FOUR times (not double) the smaller number and reversed.

Does that sound more reasonable? Not a trick answer, one solution apparently. Is the puzzle back on?

Re: PIN puzzle

Posted: Wed Apr 21, 2010 8:31 pm
by Kirk Bevins
Matt Morrison wrote:Had a brief word with aforementioned mate, he says it wasn't a trick so he must have misremembered it, he now thinks it's the larger one being FOUR times (not double) the smaller number and reversed.

Does that sound more reasonable? Not a trick answer, one solution apparently. Is the puzzle back on?
Sounds good. The first digit must be 2/8 and so must the last. Just working on the centre digits now.

Re: PIN puzzle

Posted: Wed Apr 21, 2010 9:33 pm
by Phil Makepeace
2178 & 8712

Re: PIN puzzle

Posted: Wed Apr 21, 2010 9:52 pm
by Kirk Bevins
Phil Makepeace wrote:2178 & 8712
Excellent. How did you work it out - trial and error?

Re: PIN puzzle

Posted: Wed Apr 21, 2010 11:07 pm
by Bob De Caux
Nice one Phil. Here's my stab at the logic.

For abcd and dcba, with dcba bigger:

- to prevent 4*abcd having 5 digits, a=1 or 2
- as 4*d must be even, a can't be 1, so a=2, d=8 (if a solution exists)
- to prevent 4*b being greater than 10 (thus carrying over a digit to the thousands column so 4*a no longer equals d), b=1 or 2
- As 4*d=32, we carry over 3 to the tens column
- the last (or only) digit of 4*c+3 is b, but 4*c+3 cannot be even
- therefore b=1 (if there is a solution)
- 4*c+3 has a last digit of 1 if c=2 or 7
- quick check shows 2128 doesn't work, but 2178 does

Sorry, not brilliantly explained

Re: PIN puzzle

Posted: Thu Apr 22, 2010 8:04 am
by David O'Donnell
Bob De Caux wrote:Nice one Phil. Here's my stab at the logic.
I used the same method so I think your explanation is fine!

Re: PIN puzzle

Posted: Thu Apr 22, 2010 8:45 am
by Howard Somerset
One of my unfortunate habits is trying to develop puzzles into an extended version.

So going back to the insoluble original, in which the pin number is doubled to create its reverse, how about that same problem, except that you can chose your number base.

It's not unreasonable that it might work. For example, if we restrict the pin number to just two digits, there are still no solutions using base 10, but I've found many solutions using other bases. Two of the many are:
25 x 2 = 52 (base 8)
5B x 2 = B5 (base 17)

Note, for bases greater than 10 (up to 35) use 0,1,2,3,4,5,6,7,8,9,A,B,C,D,...

Can anyone find a four digit pin, together with a suitable number base, which then doubles to give its reverse?

(If you need a number base greater than 35, then define your notation.)

I haven't found one yet, as I've only just started thinking about it.

Re: PIN puzzle

Posted: Thu Apr 22, 2010 10:30 am
by Bob De Caux
Howard Somerset wrote: Can anyone find a four digit pin, together with a suitable number base, which then doubles to give its reverse?
Nice puzzle, Howard. The four digit version is tricky, but I've managed to solve the 3 digit version. Think these are the only solutions.

011 and 110 base 2
143 and 341 base 5


EDIT: they're not the only solutions! For any a, if b=3a+1, c=2a+1 and base=3a+2, it will work

Re: PIN puzzle

Posted: Thu Apr 22, 2010 11:23 am
by Bob De Caux
Actually, think I may have cracked it. Here are two four digit combos that work:

1443 and 3441 base 5
2775 and 5772 base 8

Re: PIN puzzle

Posted: Thu Apr 22, 2010 11:26 am
by Matt Morrison
How quickly this has become a thread I simply don't belong in. Haha.

Re: PIN puzzle

Posted: Thu Apr 22, 2010 11:28 am
by Howard Somerset
Bob De Caux wrote:EDIT: they're not the only solutions! For any a, if b=3a+1, c=2a+1 and base=3a+2, it will work
Well done, Bob. I'd not got round to looking at 3 or 4 digits, as I've had something else on this morning.

I'd already found something very similar with two digits. If b=2a+1, and base is 3a+2, then ba always = 2 x ab, for any a.

Your rule for abc is so similar, it seems reasonably that there should be something along similar lines for 4 digits.

Re: PIN puzzle

Posted: Thu Apr 22, 2010 11:29 am
by Howard Somerset
Matt Morrison wrote:How quickly this has become a thread I simply don't belong in. Haha.
But you're a superb catalyst, Matt. :P

Re: PIN puzzle

Posted: Thu Apr 22, 2010 11:29 am
by Kirk Bevins
Matt Morrison wrote:How quickly this has become a thread I simply don't belong in. Haha.
Me too and I pretend I can do maths.

Re: PIN puzzle

Posted: Thu Apr 22, 2010 11:44 am
by Bob De Caux
:( Sorry guys, I get a bit carried away sometimes!

FWIW Howard, there is a formula for 4 digits:

For any a, if b=3a+1, c=3a+1, d=2a+1 and base=3a+2 then dcba=2*abcd

Re: PIN puzzle

Posted: Thu Apr 22, 2010 12:08 pm
by Howard Somerset
Bob De Caux wrote:FWIW Howard, there is a formula for 4 digits:

For any a, if b=3a+1, c=3a+1, d=2a+1 and base=3a+2 then dcba=2*abcd
Excellent!

Now. Does that give all of the possibilities? Or are there some others. In particular, are there any solutions for which a, b, c, and d are all different?

Re: PIN puzzle

Posted: Fri Jun 25, 2010 8:08 am
by Dmitry Goretsky
Bob De Caux wrote:Nice one Phil. Here's my stab at the logic.

For abcd and dcba, with dcba bigger:

- to prevent 4*abcd having 5 digits, a=1 or 2
- as 4*d must be even, a can't be 1, so a=2, d=8 (if a solution exists)
- to prevent 4*b being greater than 10 (thus carrying over a digit to the thousands column so 4*a no longer equals d), b=1 or 2
- As 4*d=32, we carry over 3 to the tens column
- the last (or only) digit of 4*c+3 is b, but 4*c+3 cannot be even
- therefore b=1 (if there is a solution)
- 4*c+3 has a last digit of 1 if c=2 or 7
- quick check shows 2128 doesn't work, but 2178 does

Sorry, not brilliantly explained
I thinked the same, so you're ABSOLUTELY RIGHT!!!

Re: PIN puzzle

Posted: Fri Jun 25, 2010 9:58 am
by Marc Meakin
Dmitry Goretsky wrote:
Bob De Caux wrote:Nice one Phil. Here's my stab at the logic.

For abcd and dcba, with dcba bigger:

- to prevent 4*abcd having 5 digits, a=1 or 2
- as 4*d must be even, a can't be 1, so a=2, d=8 (if a solution exists)
- to prevent 4*b being greater than 10 (thus carrying over a digit to the thousands column so 4*a no longer equals d), b=1 or 2
- As 4*d=32, we carry over 3 to the tens column
- the last (or only) digit of 4*c+3 is b, but 4*c+3 cannot be even
- therefore b=1 (if there is a solution)
- 4*c+3 has a last digit of 1 if c=2 or 7
- quick check shows 2128 doesn't work, but 2178 does

Sorry, not brilliantly explained
I thinked the same, so you're ABSOLUTELY RIGHT!!!
Thunk, surely.

Re: PIN puzzle

Posted: Fri Jun 25, 2010 2:19 pm
by Eoin Monaghan
Marc Meakin wrote:
Dmitry Goretsky wrote:
Bob De Caux wrote:Nice one Phil. Here's my stab at the logic.

For abcd and dcba, with dcba bigger:

- to prevent 4*abcd having 5 digits, a=1 or 2
- as 4*d must be even, a can't be 1, so a=2, d=8 (if a solution exists)
- to prevent 4*b being greater than 10 (thus carrying over a digit to the thousands column so 4*a no longer equals d), b=1 or 2
- As 4*d=32, we carry over 3 to the tens column
- the last (or only) digit of 4*c+3 is b, but 4*c+3 cannot be even
- therefore b=1 (if there is a solution)
- 4*c+3 has a last digit of 1 if c=2 or 7
- quick check shows 2128 doesn't work, but 2178 does

Sorry, not brilliantly explained
I thinked the same, so you're ABSOLUTELY RIGHT!!!
Thunk, surely.
I thunk thought was betterer.