View Full Version : 5-digit combonation list
BATTLESTEER
10-20-2009, 09:49 PM
I need a list of all the possible combinations for 5 digits.
1
12
21
123
213
321
312
1234
12345
ETC...
Numbers cannot repeat and I just need a list that has all of those possible combinations.
I know the whole permutation thing and I wish I could just do that because its a lot simpler but we have to write everything like that, but its not how many there are that I need, I need all of them physically. So if someone has a list it would be really awesome because I do not want to deal with my teacher tomorrow =D
Jitsu6500
10-20-2009, 09:56 PM
I had a quick google for you but couldn't find anything. Sorry.
Butcher
10-20-2009, 10:57 PM
lol sounds tedious, do it yourself you lazy bastard. I don't think anyone is going to have a list like that saved somewhere on their computer.
zuperxtreme
10-20-2009, 11:07 PM
Did it: http://zoklet.net/bbs/showthread.php?t=72390
BATTLESTEER
10-20-2009, 11:21 PM
Let me try and rephrase this.
Theres a 5 button combination lock vertically positioned like so...
1
2
3
4
5
Each button can only be pressed once, and not all 5 have to be pressed to unlock it. I need all the possible combinations.
An example of this would be like
3-1-4
or 2-4-3-1-5
or simply just 1 or 2 or 3 or 4 or 5.(It's not any of those)
I hope that better explains what I'm asking for.
Raziel
10-20-2009, 11:27 PM
Each button can only be pressed once, and not all 5 have to be pressed to unlock it. I need all the possible combinations.
Are you sure about this?
BATTLESTEER
10-20-2009, 11:46 PM
Are you sure about this?
yes 100% sure
calatron
10-21-2009, 01:13 AM
import string
a = range(0,55556)
for i in range(len(a)):
s = str(a[i])
q = string.find(s,"0")
w = string.find(s,"6")
e = string.find(s,"7")
r = string.find(s,"8")
t = string.find(s,"9")
l = s.count("1")
k = s.count("2")
j = s.count("3")
h = s.count("4")
g = s.count("5")
if q == -1 and w == -1 and e == -1 and r == -1 and t == -1 and l < 2 and k < 2 and j < 2 and h < 2 and g < 2:
print a[i]
It's done in python. I'm sure there is an easier way than this but I ain't no programmer.
I'll be a nice guy, here's a link to the list I generated: http://cal.freeshell.org/combo.txt
325 combinations.
Mantikore
10-21-2009, 01:33 AM
yep thats about right. this is something that you would only do with programming
The Cheshire Cat
10-21-2009, 01:35 AM
Zok demonstrated how do this with perl one time. I'm sure if you ask him nicely, he can post the source.
superspeedz
10-28-2009, 07:20 AM
I need a list of all the possible combinations for 5 digits.
1
12
21
123
213
321
312
1234
12345
ETC...
Numbers cannot repeat and I just need a list that has all of those possible combinations.
I know the whole permutation thing and I wish I could just do that because its a lot simpler but we have to write everything like that, but its not how many there are that I need, I need all of them physically. So if someone has a list it would be really awesome because I do not want to deal with my teacher tomorrow =D
bahaha
0-99999 = 10000
If you can't use the same digit twice its 10*9*8*7*6 (if you can start with a 0)
If you cannot its 9*9*8*7*6
Note the second as 10 (with 0) delete one gets you 9
Oh you can only use 1 to 5
This becomes trivial
vBulletin® v3.8.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.