Lambda the Ultimate

inactiveTopic Generating all n-tuples
started 8/10/2001; 7:02:53 AM - last post 8/11/2001; 4:24:51 AM
Chris Rathman - Generating all n-tuples  blueArrow
8/10/2001; 7:02:53 AM (reads: 1523, responses: 1)
Generating all n-tuples
For those that can't wait until 2007 for Volume 4 of The Art of Computer Programming by Donald Knuth, here's a beta chapter involving combinatorials.

via /. story on Knuth's Volume IV Preview Available Online.
Posted to Misc-Books by Chris Rathman on 8/10/01; 7:03:33 AM

jon fernquest - Re: Generating all n-tuples  blueArrow
8/11/2001; 4:24:51 AM (reads: 788, responses: 0)
What about randomly selecting one from all possible n-tuples?

A language teacher asked if there was a program to mix up the words in a sentence to help automate the process of creating "unscramble the sentence" type exercises.

Seems to be the above problem with one caveat: the word ordering has to look random also, i.e. a word can't have any of the same neighbor words that it originally had.

Ideal shuffling of playing cards is like selecting one n-tuple from all possible n-tuples, but non-ideal shuffling is trivial. I used this idea to solve the problem. PLT scheme has some card shuffling code they use for their card game demos.