This may be off topic, but this category includes probablistic programming, so hopefully I can get an answer.

Suppose I want to sample K items x_{(1)},...,x_{(k)}, from N items x_{1},...,x_{N}, the marginal probability of x_i being selected is \pi(x_i), where x_i is the ith item. Is there a way to efficiently sample from a proper joint probability?

My first thought is to construct a joint probability \pi(x_{(1)},...,x_{(k)})\propto\prod\pi(x_{(1)})...\pi(x_{(k)}), and then use MCMC sampler. However, I cannot find a proper transition probability p(X_i \rightarrow X_{i+1}) that satisfies the detailed balance condition p(X)p(X \rightarrow X′)=p(X')p(X' \rightarrow X). Does Metropolis-Hastings algorithm work well in this case? Or I have to use other samplers?