Mathematics (JEE)HardCodeforces Div2 C
How many permutations p of {1, 2, 3, 4, 5} satisfy p(i) not in {i, i+1} for every i from 1 to 4, and also p(5) is not 5?
- A. 16
- B. 19
- C. 44
- D. 32
Correct answer: A. 16
Enumerating all 120 permutations and rejecting any with p(i) equal to i or i+1 for i = 1..4, or with p(5) = 5, leaves 16 valid permutations.
Practise more Permutations, Combinations and Probability questionsPermutations, Combinations and Probability: notes and key points
More Permutations, Combinations and Probability questions
- How many permutations of {1, 2, ..., 8} have no two adjacent entries whose values differ by exactly 1 (that is, |p(i) - p(i+1)| != 1 for…
- How many functions from a 6-element set onto a 4-element set are surjective, that is, use every one of the 4 target values at least once?
- How many functions f from {1, 2, 3, 4, 5, 6} to {1, 2, 3, 4} are onto (every value 1..4 is attained) and satisfy f(1) = f(2)?
- How many integers n with 1 <= n <= 10000 are divisible by exactly one of 3 and 7?
- How many 4-digit numbers have four distinct digits, none of them 0, and an even digit sum?
- How many nonempty subsets of {1, 2, ..., 10} have an element sum that is divisible by 5?