Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Challenge: Generate fixed size combination across groups without duplicates

by GrandFather (Saint)
on Nov 16, 2011 at 05:17 UTC ( [id://938315]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Challenge: Generate fixed size combination across groups without duplicates
in thread Challenge: Generate fixed size combination across groups without duplicates

The real trick is adding the "no-op" entry to each group.

True laziness is hard work
  • Comment on Re^3: Challenge: Generate fixed size combination across groups without duplicates

Replies are listed 'Best First'.
Re^4: Challenge: Generate fixed size combination across groups without duplicates
by Limbic~Region (Chancellor) on Nov 16, 2011 at 14:31 UTC
    GrandFather,
    No, I assure you that my brain does not think recursively. I have never encountered any other programmer or a math aficionado with this affliction. That makes it amazingly frustrating when people say - it is simple, just think of it as repeating a simple process until a termination condition is met. Of course I understand that and I don't usually having a problem understanding someone else's recursive solution. My problem is that my brain just doesn't think that way - I don't know how else to explain.

    On the bright side, as soon as I stopped thinking about the problem thanks to your solution, I discovered how to do it iteratively using a variation on Arbitrarily Nested Loops (odometer model). If I get a chance to code it up I will but the key was to have a set of empty slots representing the combination that you copied values from as you rotate wheels on the dial. It becomes a very simple process at that point.

    Cheers - L~R

      a la 'Enigma' but going it one better?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://938315]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-18 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found