GATE Computer ScienceHardGATE CS (PYQ pattern)
How many permutations π of {1, …, 7} with π(7) = 7 have exactly 2 descents (positions i with πᵢ > πᵢ₊₁)?
- A. 1191
- B. 302
- C. 66
- D. 604
Correct answer: B. 302
Putting the maximum 7 last creates no descent, so these correspond to permutations of {1,…,6} with exactly 2 descents: the Eulerian number A(6,2) = 3⁶ − 7·2⁶ + 21 = 729 − 448 + 21 = 302.
More Discrete Mathematics questions
- In how many ways can 6 non-attacking rooks be placed on a 6 × 6 board so that none stands on either main diagonal?
- In how many ways can a 2 × 6 board of unit squares be coloured with 3 colours so that squares sharing an edge get different colours?
- How many integer triples (x, y, z) with x, y, z all non-zero satisfy |x| + |y| + |z| = 10?
- Twenty seats are arranged around a round table, numbered 1 to 20. In how many ways can 6 seats be chosen so that no two chosen seats are…
- On the set {1, 2, 3, 4}, how many binary relations are reflexive and symmetric but NOT transitive?
- Let f be a function from {1, 2, 3, 4, 5, 6} to {a, b, c, d}. How many onto (surjective) functions satisfy f(1) = a?