Ask your own question, for FREE!
Mathematics 15 Online
OpenStudy (anonymous):

How can I design and algorithm to generate the list of permutations like P(5,2) from the set {0,1,2,3,4}?

OpenStudy (anonymous):

I mean: the list: {0,1}, {0,2},{0,3},{0,4}, etc.

OpenStudy (mathmate):

Here's a pseudocode. Use whatever language that suits you. A:={0,1,2,3,4}; for i=0 to 4 for j=0 to 4 if (i!=j) print A(i), A(j) next next There should be 20 lines of output (permutations)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!