Quantcast
Viewing all articles
Browse latest Browse all 118

Combination Picker

Hello
Lively member Passel advised me this side of the vbforums. So here I am. He already gave me some stuff to think about. I wonder if I could get some other input over here.
Can you help me in about the subject of combinations. I'm searching for an algorithm that establishes which digits (natural number) correspond to a specific position (index) in a given combination. To be more specific. I have a (randomly picked) combination (no permutations) environment of 3 digits between 1 and 20. Index #1 will is {1,2,3}, Index #2 is {1,2,4},... and Index #1140 is {18,19,20}. Other combination environments will result in other combinations. To do away with the (time consuming) running through nested loops I was wondering I some could think of a system that allows me to build a function with three parameters, in this case (3,20,77) that would return a set of digits index #77={1,5,6}. Other parameter sets could be (5,50,index), (8,60,index), (2,10,index),...
My current coded version of the thing is a eight bit, three legged turtle (if you get my drift). I'm still figuring out some of the code improvements passel suggested.
Anyone interested? Thanks.
- Initial thread is situated in VBFORUMS/GENERAL/CODE IT BETTER/COMBINATION PICKER (?751835-Combination-Picker&p=4601751#post4601751)

Viewing all articles
Browse latest Browse all 118

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>