Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to eyeball08,Wondergirly,bofh,johnstevens77,Bhoddhisatva, for Donating to support the site

Four digit palindrome

bungeejumper
Lemon Half
Posts: 8129
Joined: November 8th, 2016, 2:30 pm
Has thanked: 2876 times
Been thanked: 3976 times

Four digit palindrome

#76736

Postby bungeejumper » August 24th, 2017, 11:56 am

Be gentle with me, I am a certified failure at all things mathematical....

I read recently that it's a myth that you can persuade an ATM to swallow your credit card if you deliberately enter the PIN back to front. Just as well, really, since my usual card does have a palindromic PIN. :lol: But it set me wondering just what the chances are of a palindromic PIN occurring by chance?

Being a maths dunce (well, all right, a Grade 6 scrape pass at O level) , I spent quite a while trying to calculate the odds, digit by painful digit. And then, being a lateral thinker, I figured: "Surely the first two digits don't matter? All that needs to happen is that the last two digits are a palindrome of the first, whatever they happened to be?"

So if the first two digits were 63, there were only 10 x 10 possibilities for the second two to be. (Assuming that the PIN could include anything from a 0 to a 9 for each digit.) Which, according to me, means that there is a chance of exactly 1 in 100 that any four digit PIN could be palindromic.

Am I right, or do I need to expand my brain a little? Sincerely, all scholarly corrections very much welcomed!

BJ

UncleEbenezer
The full Lemon
Posts: 10775
Joined: November 4th, 2016, 8:17 pm
Has thanked: 1467 times
Been thanked: 2989 times

Re: Four digit palindrome

#76777

Postby UncleEbenezer » August 24th, 2017, 2:15 pm

bungeejumper wrote:I figured: "Surely the first two digits don't matter? All that needs to happen is that the last two digits are a palindrome of the first, whatever they happened to be?"

That's a perfectly valid way to think of it, subject to the basic assumptions you imply.

It's when you start adding constraints that you may get less intuitive outcomes. :ugeek: In the case of PINs, you perhaps can add constraints: a PIN of 1234 might be considered more insecure than 1342 for reasons that have nothing to do with the maths. But I've no idea how such constraints might work.

BTW, four-digit PINs are by no means universal. When I lived in Italy they were five-digit, and just as easy to memorise.

Lootman
The full Lemon
Posts: 18871
Joined: November 4th, 2016, 3:58 pm
Has thanked: 635 times
Been thanked: 6645 times

Re: Four digit palindrome

#76781

Postby Lootman » August 24th, 2017, 2:24 pm

UncleEbenezer wrote:BTW, four-digit PINs are by no means universal. When I lived in Italy they were five-digit, and just as easy to memorise.

Surely adding digits would make it less easy to memorise. Otherwise a 17-digit PIN would be as easy to recall as a 4-digit PIN, and that seems unlikely.

For me anyway, it's more a matter of the number having significance so I can remember it. So I might choose a year for a 4-digit PIN, an American zip code as a 5-digit PIN, a date as a 6-figure PIN, and so on. A 4-digit PIN with no significance is harder to remember than a longer PIN that has significance, therefore I always struggle more with PINs I can't change.

To the other, yes, for each 2-digit number between 00 and 99, there is just one 2-digit number that completes the palindrome. Hence one in 100. That seems so obvious to me that I suspect it might be wrong, however.

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Four digit palindrome

#76784

Postby Gengulphus » August 24th, 2017, 2:30 pm

bungeejumper wrote:Be gentle with me, I am a certified failure at all things mathematical....
...
Being a maths dunce (well, all right, a Grade 6 scrape pass at O level) , I spent quite a while trying to calculate the odds, digit by painful digit. And then, being a lateral thinker, I figured: "Surely the first two digits don't matter? All that needs to happen is that the last two digits are a palindrome of the first, whatever they happened to be?"

So if the first two digits were 63, there were only 10 x 10 possibilities for the second two to be. (Assuming that the PIN could include anything from a 0 to a 9 for each digit.) Which, according to me, means that there is a chance of exactly 1 in 100 that any four digit PIN could be palindromic.

You're almost entirely correct, on the assumption that all 10000 possible 4-digit PINs are equally likely. And the only reason that I say "almost" is that you've just proved the "certified failure" and "maths dunce" bits incorrect! ;-)

Gengulphus

Gengulphus
Lemon Quarter
Posts: 4255
Joined: November 4th, 2016, 1:17 am
Been thanked: 2628 times

Re: Four digit palindrome

#76812

Postby Gengulphus » August 24th, 2017, 3:58 pm

Lootman wrote:
UncleEbenezer wrote:BTW, four-digit PINs are by no means universal. When I lived in Italy they were five-digit, and just as easy to memorise.

For me anyway, it's more a matter of the number having significance so I can remember it. So I might choose a year for a 4-digit PIN, an American zip code as a 5-digit PIN, a date as a 6-figure PIN, and so on. A 4-digit PIN with no significance is harder to remember than a longer PIN that has significance, therefore I always struggle more with PINs I can't change.

That's actually not all that good an idea, because those trying to break PINs and other passwords are aware of it and concentrate their efforts on attempts that have obvious significance. For instance, if they try to break a 6-digit PIN with completely random attempts, they have a one-in-a-million chance of success on each attempt, but if they know (or strongly suspect) that it's a date, that drops to a one-in-36,525 chance. Still very unlikely, of course - but each attempt is nearly 30 times more likely to succeed...

And on passwords, there's a story I heard years ago about a company's IT manager who wanted to know how easily his users' passwords could be broken. So he got a list of women's first names and tested each one against the password database for each user (*), which broke a good fraction of the passwords (my recollection is about a third of them), and then he went out into the company car park and got all the car registration numbers and tried them, and that broke a further good fraction (my recollection is about a further 20%).

Basically, passwords and PINs that have significance to lots of people (like those names or the year 1066) and those that have significance only to you but are also easily associated with you (like those car registration numbers or your birthday) are not good ones to use. What you need for a good memorable password or PIN is something with significance for you, to enable you to remember it, but that is unlikely to be thought of as having general significance or to be associated with you. For example, I've used my family's telephone number from my childhood in some of my passwords - it happens to be a number that's engrained in my memory, and it would be very difficult for hackers to associate it with me. (And just in case that's not quite as difficult as I think - or any of my relatives happen to be reading this and aren't as nice as I think they are ;-) - I've also transformed it in a way I can remember and combined it with some other obscure information from my past!)

One other tip about good passwords and PINs: if you want to remember them, you need to get them into your long-term memory. It's relatively easy to get them into short-term memory, as long as they're no more than about 7 'items' long (e.g. a 7-digit telephone number, or a 7-word phrase), but equally it's relatively easy for them to drop out of it again... :-( They need to be persuaded to get into long-term memory before that happens, and the best way I've found of doing that is to make certain I use them repeatedly. So for instance, when I registered on TLF, I immediately logged out and in again a few times, and then I quite deliberately didn't use the "Remember me" facility for a couple of weeks, which meant I had to use my password to log in again any time I'd not used the site for an hour or so. Which was a bit tedious, but the password is now there in long-term memory and I have no trouble at all remembering it when I need to!

(*) I should possibly explain that good password systems do not store passwords in an easily-recoverable form in the password database, because that means that everybody's password is immediately compromised if anyone manages to steal a copy of the password database. Instead, they store the result of applying a 'one-way function' to the password - i.e. a function that can be reasonably easily calculated in one direction, but is very difficult to calculate in reverse - and when a user supplies their password, they recalculate that function of the password supplied by the user and see whether it matches what the database says the result should be. It's still possible to break a password by applying the function to each possible password in turn and seeing whether it matches, and if someone has managed to steal a copy of the password database, they'll be able to test millions of possible passwords per second. But if passwords are 'strong' enough, that is likely to take a very long time...

One implication of that is that if you see an account provider's "Forgotten password?" system offer to email you a reminder of what your password is, you know their password system is not a good one: it shouldn't be capable of doing that! Good password systems instead reset your password, typically to something pretty random, email you to let you know what it is so that you can log on, and then suggest that you change it to something of your choice. Or preferably insist that you do so, partly because 'strong' random passwords are so unmemorable, but mainly because of the danger of a hacker getting hold of a copy of the email telling you what it is...

Gengulphus

ReformedCharacter
Lemon Quarter
Posts: 3133
Joined: November 4th, 2016, 11:12 am
Has thanked: 3629 times
Been thanked: 1518 times

Re: Four digit palindrome

#76819

Postby ReformedCharacter » August 24th, 2017, 4:13 pm

Gengulphus wrote:Basically, passwords and PINs that have significance to lots of people (like those names or the year 1066) and those that have significance only to you but are also easily associated with you (like those car registration numbers or your birthday) are not good ones to use. Gengulphus

At one time the Bank Of Scotland thought it reasonable to provide pins to their customers comprising the year of birth, such as 1968, in reverse order. I still use mine. Presumably there may have been a few ending in 81 but all the rest must all have ended in 91!

RC


Return to “Games, Puzzles and Riddles”

Who is online

Users browsing this forum: No registered users and 19 guests