Zanaj Posted June 8, 2013 Share Posted June 8, 2013 (edited) Heya guys...I made this script that should go through every possibity combination. And its going to end up in a 26 digt, with lowercase a-z and 1-9. I want it to write these to a document. Its not much of a "useful" program but more to learn the syntax and how stuff work ... I did devolp a code that will write every combination of 3 digts with the numbers 1-3 which do what I want my final program to do. The code is messy but I tried with comments to explain whats going on. Its more a snippet of what the final program shall do.I feel like I've over complicated the code and if I kept this way the 26 digts...Will be rather a pain to code xD...Is there an easier way?<snip> Edited June 9, 2013 by Melba23 Code removed Link to comment Share on other sites More sharing options...
Zedna Posted June 8, 2013 Share Posted June 8, 2013 (edited) Look at StringRegExp, _ArrayToString, StringSplit Edited June 8, 2013 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zanaj Posted June 8, 2013 Author Share Posted June 8, 2013 (edited) StringRegExp Will deteminate if it do exist...But how will this help ?I need to to write likeAAAAAAABAAAC...AACAAACB...CCCBCCCCDONE How could I do this?An alternative is to use something like the code below, but how will I detaminate an end?<snip>All credits for that go to um Valutaner or how the name was spelt Edited June 9, 2013 by Melba23 Code removed Link to comment Share on other sites More sharing options...
DW1 Posted June 8, 2013 Share Posted June 8, 2013 (edited) StringRegExp Will deteminate if it do exist...But how will this help ?I need to to write likeAAAAAAABAAAC...AACAAACB...CCCBCCCCDONE How could I do this?An alternative is to use something like the code below, but how will I detaminate an end?<snip>All credits for that go to um Valutaner or how the name was speltThe amount of permutations that you will end up with will be an insane amount of data. I don't know what sort of storage you are going to use to contain this amount of data.Take a look at just _ArrayPermute() which will not use the same letter more than once, and you can see that at just a-h (8 letters) without ever repeating a letter twice, we are already at 40,320 results. Bump that up by just one more letter ("i") for 9 letters and we are at 362,880 results. You will see an even larger increase because you wish to be able to repeat characters in each result. The only way I can picture this working is to generate a single result, given its index. In fact, I think this has been discussed before at some length in another thread. Edited June 9, 2013 by Melba23 Code removed AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Zanaj Posted June 8, 2013 Author Share Posted June 8, 2013 (edited) I am well aware of the insanity of the reasualt, In fact I know how many resualt there is xD... But maybe its me searching wrong tags, but I couldn't find anything around this. So far, I asume the only way is to do this IF statement reapting owo? And in the big whole it can be as unsorted as you want xD ALL possibilities just have to be met... Edited June 8, 2013 by Zanaj Link to comment Share on other sites More sharing options...
DW1 Posted June 8, 2013 Share Posted June 8, 2013 (edited) I am well aware of the insanity of the reasualt, In fact I know how many resualt there is xD... But maybe its me searching wrong tags, but I couldn't find anything around this. So far, I asume the only way is to do this IF statement reapting owo? Sorry man, but there is no way to list all of this data like you are wanting. Currently, it's impossible, and I don't see that changing any time soon. Being able to pull up a single index of possible permutations (or combinations as you seem to want, which is much bigger) would even be fairly impractical. If you honestly know how many results this will produce in theory, then you know why it's impossible. First off, I don't know that there is enough storage in the world to hold this much data, and second, I don't know of a super computer capable of finishing the job before you die. Edit: I'm sure somebody good with math will pop by at some point and demonstrate what an astronomical numbers of results this would produce, but permutations alone, of 36 characters (meaning no result is allowed to have 2 of the same characters) would results in 36! items, which = 371,993,326,789,901,217,467,999,448,150,835,200,000,000 results. Edit2 ( because this is interesting ) : So the formula (I think) for determining the number of combinations would simply be n^r where n= number of characters to choose from, and r= combination length in digits. So we have 36 characters and you want 26 digit results, so that is 36^26 which = 29,098,125,988,731,506,183,153,025,616,435,306,561,536. Now that number is only the amount of results if you require all results are 26 digits, if you also wanted 25 digits, 24 digits, etc to be returned, we are again looking at increasing that number quite a bit. Now if somehow magically, we were able to cram the 26 digit results in to one byte each, we are looking at 29,098,125,988,731,506 Yottabytes (I'd break it down more, but I don't know any larger unit to measure storage in). Keep in mind 1 Yottabyte = 1 Trillion Terabytes, and you need 29 quadrillion of those. Edited June 9, 2013 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Zanaj Posted June 9, 2013 Author Share Posted June 9, 2013 Ah then nvm...Sorry I've been calcing something something wrong then :c Then this for to be closed. Thanks though Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 9, 2013 Moderators Share Posted June 9, 2013 (edited) Zanaj, every possibity combination. And its going to end up in a 26 digt, with lowercase a-z and 1-9. I want it to write these to a document. Its not much of a "useful" program but more to learn the syntax and how stuff work Who are you kidding? What you want to do is known as a "rainbow table" and we will not help you produce one - do NOT ask about such things again. Thread locked and any helpful code removed. To the responders, Guys, please engage your brains before replying in future. M23 Edited June 9, 2013 by Melba23 Typo Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts