| Input: A set of n Test Cases, Ti, an ordered set of Clustered, CK |
| Output: Clusters of Test Cases, C, Comparison Coverage Matrix Generator, M’ |
| let Ti ε T be the ith test cases |
| Form n clusters, each with one test case Ti |
| C ← {} |
| Add clusters to C |
| Identify clusters CK with minimum distances from parent node to child node |
| For i = 1 to i ≤ n |
| M [i, i] = 1 (1 ≤ i ≤ n) |
| M [j, j] = 1 (1 ≤ j ≤ n) |
| M’ (i, j) = (M (i, j)/Σi ≤ k ≤ nM (i, k))*PS |