PUMaC 2008 · 组合(A 组) · 第 10 题
PUMaC 2008 — Combinatorics (Division A) — Problem 10
题目详情
(7分) Conway教授年轻时住在有2009头牛的农场。他想把牛从负x轴移到正x轴。牛最初按1,2,...,2009的顺序排在负x轴上。Conway可以给牛两种指令:PUSH(第一头牛跳到正x轴最右边的位置)和 POP(正x轴最左边的牛跳回负x轴最左边)。求将所有牛移到正x轴并按1,2,...,2009顺序排列所需的最少指令数。
英文原题
- (7 points) In his youth, Professor John Horton Conway lived on a farm with 2009 cows. Conway
wishes to move the cows from the negative x axis to the positive x axis. The cows are initially
lined up in order 1, 2,..., 2009 on the negative x axis. Conway can give two possible commands to
the cows. One is the PUSH command, upon which the first cow from the negative x axis moves to
the lowest position on the positive y axis. The other is the POP command, upon which the cow in
the lowest position on the y axis moves to the positive x axis. For example, if Conway says PUSH
POP 2009 times, then the resulting permutation of cows is the same, 1, 2,..., 2009. If Conway says
PUSH 2009 times followed by POP 2009 times, the resulting permutation of cows is 2009,..., 2, 1.
How many output permutations are possible after Conway finishes moving all the cows from the
negative x axis to the positive x axis?
2
解析
英文解析
{2009} Conway can call any sequence of 2009 PUSHs and 2009 POPs as long as at no
point in time does the number of POPs exceed the number of POPs. The number of such ( )
2 n
sequences is well known to be the 2009th Catalan number where = {n}. It is also
easy to see that different sequences of PUSH and POP lead to different output permutations. ( )
4018
Thus the answer is_{2010}^{1}_{2009} as claimed.