Algorithm 1.
Require: V ariables, NumEdges |
1: OrderedV ariables ⟵ RandSort(V ariables) |
2: for i ⟵ 1, |OrderedV ariables| — 1 do |
3: for j ⟵ i + 1, |OrderedV ariables| do |
4: EdgeSet.append((OrderedV ariables[i], OrderedV ariables[j])) |
5: end for |
6: end for |
7: Edges ⟵ RandomSelection(EdgeSet, NumEdges) |
8: return Edges |