Lock phone screen, coding level ?

[deleted user]
6 years ago | edited 6 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 ?

21replies
9voices
15views
Hackay
6 years ago | edited 6 years ago

0

Very interesting !
How many points can you link maximum ?

EDIT : Thank you for the number :)

Wibben
6 years ago | edited 6 years ago

0

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

[deleted user]
6 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.

Ðëṽíl [IAmDevil]
6 years ago

0

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


0

Mmh… In my opinion this could be easily done with excel, it’s not a real “coding” level…


0

maybe you can do that with a simple programme.

Ðëṽíl [IAmDevil]
6 years ago

0

Ahh nice link there flabby! Ok so the answer is 9! (9 factorial). Yes a simple programme will work for a factorial. 😊

[deleted user]
6 years ago

0

The answer isn’t 9! because of “impossible ways” like I said before. But I’m reading flabby’s article to understand ;)

Ðëṽíl [IAmDevil]
6 years ago

0

No there are finite number of possibities for the combinations. What made you think there are impossible ways? You tried Googleing it?

[deleted user]
6 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 ;)

Ðëṽíl [IAmDevil]
6 years ago

0

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! :)

[deleted user]
6 years ago

1

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 :)

[deleted user]
6 years ago

0

Anyone else is interested in calculating the number of possibilities or should I close ?

Ðëṽíl [IAmDevil]
6 years ago

0

Ahh so should I post it here or PM ya?

[deleted user]
6 years ago

1

You can post it here, I think this problem will not become a coding level ^^

Ðëṽíl [IAmDevil]
6 years ago

0

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) ! :)

lucki58300
6 years ago

0

@fkpuzat you are in M.P. , you’ve done 5/2 and you don’t know how to do that? you disappoint me ;D

[deleted user]
6 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 ^^

[deleted user]
6 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 ;)

Discussion thread has been locked. You can no longer add new posts. Unlock
1 of 22

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss