Mathematics (JEE)HardCodeforces Div2 D
How many permutations p of {1, 2, ..., 6} satisfy |p(i) - i| != 1 and p(i) != i for every i from 1 to 6?
- A. 29
- B. 265
- C. 117
- D. 455
Correct answer: A. 29
Enumerating the 720 permutations and rejecting any with p(i) = i or |p(i) - i| = 1 for some i leaves 29.
Practise more Permutations, Combinations and Probability questionsPermutations, Combinations and Probability: notes and key points
More Permutations, Combinations and Probability questions
- How many strings of length 5 over the alphabet {0, 1, 2, 3} have no two equal adjacent symbols and do not begin with 0?
- How many distinct arrangements of the letters of CODEFORCES have no two identical letters in adjacent positions? (The letters C, O and E…
- How many subsets of {1, 2, ..., 12} (including the empty set) contain no two elements whose difference is 1 or 2?
- How many 4-element subsets of {1, 2, ..., 20} contain no two consecutive integers?
- How many integers from 1 to 1000 are divisible by none of 2, 3, 5 and 7?
- How many strings of length 6 over {a, b, c} use all three letters and have no two equal adjacent letters?