An interesting permutation problem task
Assuming there are 2k positions available in a classroom, each
position can be filled with one
student or not, which means 0 or 1. Now you need to fill in k
number of 0 and the same number
of 1, and you need to satisfy that for any position p (1<= p
<= 2k), from position 1 to position p,
the numbers of 1 should be greater than or equal 0.
For example:
As k=2, 1010 is a permutation that satisfies the condition, but
0110 is not, it violates the number
of 0s (1) at position one is greater than the number of 1s
(0).
How many such arrangements are there in total? Prove your
guess.
Hints:
In the Abstraction, we discussed stack (LIFO).
The question is equivalent to a total of k elements being pushed
into the stack, so how many pop-
up orders are there.
If 1 is considered a push, and 0 is considered a pop, then there
are 2k movement sequences, and at
any time, the number of pushes is greater than the number of
pops.
More requirements for task 2:
• Please provide every step of this process with as much detail
and explanation as possible.
An interesting permutation problem task Assuming there are 2k positions available in a classroom, each position can be f
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
An interesting permutation problem task Assuming there are 2k positions available in a classroom, each position can be f
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!