Lock phone screen, coding level ?
10 years ago | edited 10 years ago
2
Hi everybody ! :)
I have an android phone and I use a screen lock. For your information it’s a square with 9 points : http://www.htc.com/www/support/htc-desire/howto/801.html
I’m very curious and I was wondering : how many possibilities exist to lock my screen ?
Can I calculate it with maths ? I couldn’t figure it out because of “impossible ways” : for example we can’t link the first point to the third point without passing by the second point.
So I decided to make a little program to answer my question :)
Things we have to know :
- The user have to link at least 4 points. Edit : and 9 points maximum.
- Beware of “impossible ways” (see example above).
What do you think guys? It’s not very hard but can this problem become a coding level ?
sounds interesting, but you can’t just simply use a 3x3 square for the level, or else the solution is a google search away, this level would work if it randomly picks from a myriad of grids. I like the idea though
10 years ago
0
Yes you’re right, we can increase the number of points to avoid google search (even if I didn’t found the solution on google ^^). I was also thinking about prompting the source code like in the “google code jam contest” but I don’t know if it’s difficult to apply.
Yes its easy to find the number of possibilities of combinations using Maths (probability), go eveyone try and find the answer if not i’ll tell it. But I’m not sure how this is gonna be a level? Some spotlight here please! :p
- @IAmDevil
Its good to be back! :D
This is an interesting a related read:
http://playingwithmodels.wordpress.com/2010/04/14/andorid_unlock_patterns/
I apologize if sometimes I write in a mistaken english… I’m from Italy :)
Ahh nice link there flabby! Ok so the answer is 9! (9 factorial). Yes a simple programme will work for a factorial. ?
- @IAmDevil
Its good to be back! :D
10 years ago
1
The answer isn’t 9! because of “impossible ways” like I said before. But I’m reading flabby’s article to understand ;)
No there are finite number of possibities for the combinations. What made you think there are impossible ways? You tried Googleing it?
- @IAmDevil
Its good to be back! :D
10 years ago
1
Yes I agree that there are finite number of possibities for the combinations. No I didn’t use google to noticed that : you can’t link a corner to another corner without linking a side or the center. Read flabby’s article, it is said in first lines ;)
Ahh so its very much dependent on how many dots are linked in the chain! So i’ll have to do more solving for that. I’ll be back with the answer after getting time! :)
- @IAmDevil
Its good to be back! :D
10 years ago
2
Thank you @flabbyrabbit for your article but it seems that the man who write that, Alexander, missed something, like a man, Dylan, pointed out in his post in July 28, 2011:
http://playingwithmodels.wordpress.com/2010/04/14/andorid_unlock_patterns/
Here is the explanation :
We have a square with 9 dots :
1 2 3
4 5 6
7 8 9
We can link 4 then 1 then 7 but Alexander doesn’t took this into consideration.
I’m waiting for your answer @IAmDevil :)
10 years ago
0
Anyone else is interested in calculating the number of possibilities or should I close ?
- @IAmDevil
Its good to be back! :D
10 years ago
1
You can post it here, I think this problem will not become a coding level ^^
Ok so what I get is 60,480 for a three dot chain. I know it might seem very less but I think i’m quite right (may be wrong here too) ! :)
- @IAmDevil
Its good to be back! :D
@fkpuzat you are in M.P. , you’ve done 5/2 and you don’t know how to do that? you disappoint me ;D
/====================================================================\
and please, read this thread, we need your help ! [float=right] – – – > https://www.hackthis.co.uk/forum/general-information/off-topic/2456-foldinghome?page=7[/float]
\=====================================================================/
10 years ago
1
Lol I did, I have an answer but I don’t know if it’s correct. You should try to solve this problem and we will compare our results ^^
10 years ago
1
That’s it, thank you Memoria, 389112 possibilities :)
I close this thread now but for those who want to share their program feel free to send me a PM and I’ll send you mine ;)