Wikipedia:Reference desk/Archives/Mathematics/2011 February 12

Mathematics desk
< February 11 << Jan | February | Mar >> February 13 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 12

edit

Every possible combination of the numbers 1-8 assuming. . .

edit

I need to generate a list of every possible combination of the numbers 1-8 assuming that every resulting set contains 8 digits and assuming that no number is ever repeated within a set. How can I generate this data? Is there a free program that could do this for me? Or is it possible to do in Excel? Than you! --145.116.8.104 (talk) 22:12, 12 February 2011 (UTC)[reply]

What you're asking for are the permutations of the digits 1-8. There are 40320 of them, so I assume you don't want them in a printed list. Python has itertools.permutations, if you're looking to use them in a program.--203.97.79.114 (talk) 22:29, 12 February 2011 (UTC)[reply]
See article permutation. 71.141.88.54 (talk) 23:56, 12 February 2011 (UTC)[reply]
Perfect! Thank you both. --145.116.9.225 (talk) 23:38, 13 February 2011 (UTC)[reply]