## generation of random multiset permutation with restrictions

Is there any known algorithm how to effectively generate any random multiset permutations with additional restrictions.

Example: I have a multiset of items, for example: {1,1,1,2,2,3,3,3}, and a restricting set of sets, for example {{3},{1,2},{1,2,3},{1,2,3},{1,2,3},{1,2,3},{2,3},{2,3}. I am looking for permutations of items, but the first element must be 3, and the second must be 1 or 2, etc.

One such permutation that fits restrictions is: {3,1,1,1,2,2,3,3}

-