Cytoplasm...'s blog

By Cytoplasm..., history, 11 months ago, In English

Problem :

Suppose that n cards numbered 1,2,3,.....,n are arranged in a row. The task is to pick them up in numerically increasing order, working repeatedly from left to right.

For example ;

If numbers are [7,11,8,6,4,5,9,12,1,13,10,2,3].
In the first move pick : [1,2,3].
In the second move pick : [4,5].
In the third move pick : [6].
In the fourth move pick : [7,8,9,10].
In the fifth move pick : [11,12,13].

How many of the n! possible orderings of the cards will the n cards be picked up in exactly two moves ?

  • Vote: I like it
  • -1
  • Vote: I do not like it

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

NO one solve that why dislike.

»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

i think it may be a math problem (combination) im not a british so i dont speak English well so im actually sorry if you cant understand me (qwq~ first,if it solved in 1 move, then it will be one only possible way(1,2,3,4...n) for the two moves,we can literate i from 1 to n to be the "break point" it means,if now it is i,then the problem will be solved in next two moves:(1,2,3...i),(i+1,i+2,...n) and also, we force the i+1 to in the left of i because there might be repeated answer if you dont do that. we use combination math to solve it.(it can be done in o(n^2) time)

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    imagine there is k gaps and we need to insert n-i numbers in it.(k from 1 to i+1) and dont forget to multiply the coefficient before it (qwq)~