English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am trying to make a word list that will combine numbers and letters ranging from 6-20 leters in all the possible combinations but it will takes years if i type it my self. For example aaaaa next would be aaaab and so on untill reaching 20 z's

2006-09-11 18:40:48 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

You could do this with nested loops. In pseudocode, a solution that handles only 6-letter words might look like:

for l1 = 'a' to 'z'
for l2 = 'a' to 'z'
for l3 = 'a' to 'z'
for l4 = 'a' to 'z'
for l5 = 'a' to 'z'
for l6 = 'a' to 'z'

print l1+l2+l3+l4+l5+l6
}
}
}
}
}
}

However, that will yield 26^6 = 308,915,776 separate words. Assuming a unix system with LF at the end of every word, this consumes 2,162,410,432 = 2GB. So, it can be done, but it's not a great idea. In particular, reading this list into memory will be problematic unless you have a lot of RAM, and searching it when stored on disk will be very, very, slow.

It just gets worse with longer words. I suggest you rethink your approach.

2006-09-15 11:37:43 · answer #1 · answered by arbeit 4 · 0 0

Ah, you do realize that you are going to end up with many, many millions (probably billions) of combinations dont you?

2006-09-12 09:14:23 · answer #2 · answered by justme 7 · 0 0

Here are some sources for word lists.
They are very common.

http://www.softdepia.com/advanced_wordlist_download_5427.html
http://www.sandroid.org/GutenMark/download.html
http://www.net-comber.com/wordurls.html
http://www.beiks.com/palm/showtitle.asp?TitleID=353
http://www.securiteam.com/tools/5ZP0N20GAW.html

2006-09-12 01:58:44 · answer #3 · answered by crazy_bklyn_freak 2 · 0 0

fedest.com, questions and answers