Roundgod has a permutation of length

. She plans to sort the permutation in ascending order with an algorithm depends on luck. At any time, Roundgod could spend

money to choose a subset

of indices and then uniformly shuffle the values in corresponding positions, where

means the size of

. She wants to know the expected value of minimum cost to sort the permutation under the optimal decision.