Input: and . Note: and are required. |
Output: where and |
(1) Let ; |
(2) Randomly divide into disjoint subsets such that , and for any ; |
(3) Randomly divide into disjoint subsets such that , and for any ; |
(4) Initialize to 0 for all and ; |
(5) For to do // inject an irredundant covering to avoid . |
(6) For each do |
(7) Randomly select from , and set ; |
(8) End of for each |
(9) End of for |
(10) Let ; |
(11) While do |
(12) Randomly select and from and , respectively; |
(13) If , for some , and then |
(14) let and ; |
(15) End of while |
(16) Return ; |