I have a 4 indexes {1,2,3,4} and I want to associate a probability of co-occurrence for index 1 and index 2 as 0.8 and probability of co-occurrence of index 3 and 4 as 0.7 and probability of co-occurrence of index 1 and 3 as 0.1 and probability of co-occurrence of index 2 and 4 as 0.1.
How can I sample 100 instances such that I get tuples of indexes distributed according to the above density ?