Sign up ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Let $\pi$ be a permutation of the integers $0$ through $2^n-1$ (the integers that can be represented in $n$ bits). For example, $\pi$ could be used as a substitution cipher in which each plaintext block is $n$ bits long. How many possible choices of permutation $\pi$ are there? Equivalently, how many permutations are there of the first $2^n$ non-negative integers?

share|improve this question

closed as off-topic by fgrieu, DrLecter, rath, figlesquidge, Maeher Jan 28 '14 at 10:35

  • This question does not appear to be about cryptography within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Please do some research before asking obvious questions, and doing that poorly: there is a typo (the first $2^n$ non-negative integers is obviously met). Also, π defined in the first sentence is not used in the second, which forms an independent question; so why include the definition of π? – fgrieu Jan 28 '14 at 7:14
@fgrieu: To be fair, I don't see a typo, the question shows $[0,2^n-1]$? Its still a low quality question, at best containing combinatorics taught in secondary school (UK). – figlesquidge Jan 28 '14 at 10:40
Typo in the question is fixed thanks to figlesquidge; typo in my comment remains (met should be meant). – fgrieu Jan 29 '14 at 14:28

1 Answer 1

There are $k!=k(k-1)\dots3\cdot 2\cdot 1$ possible permutations of $k$ elements.

This is very basic combinatorics.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.