Permutations/Rank of a permutation: Difference between revisions

m
added whitespace before the TOC (table of contents), added other whitespace to the task's preamble.
(Added Perl 6)
m (added whitespace before the TOC (table of contents), added other whitespace to the task's preamble.)
Line 36:
 
A [http://stackoverflow.com/questions/12884428/generate-sample-of-1-000-000-random-permutations question on the Stack Overflow site] asked how to generate one million random and indivudual permutations of 144 items.
 
;This task is to:
 
;Task:
# Create a function to generate a permutation from a rank.
# Create the inverse function that given the permutation generates its rank.
# Show that for <math>n=3</math> the two functions are indeed inverses of each other.
# Compute and show here 4 random, individual, samples of permutations of 12 objects.
 
 
;Stretch goal:
* State how reasonable it would be to use your program to address the limits of the Stack Overflow question.
 
 
;References:
Line 48 ⟶ 53:
# [http://www.davdata.nl/math/ranks.html Ranks] on the DevData site.
# [http://stackoverflow.com/a/1506337/10562 Another answer] on Stack Overflow to a different question that explains its algorithm in detail.
<br><br>
 
=={{header|C}}==