| Algorithm 1 | |
| Begin | |
| Set a significance level ∇min and a minimal Umin | |
| For nodei, i ∈ [0, νmax − 1] and nodej, j ∈ [i + 1, νmax] | |
| (Note: νmax is the total number of nodes) | |
| For all empirical case samples N, compute a contingency table: | |
| For each relation type k out of the six cases find the solution: | |
| Max Up | |
| Subject to Max Up > Umin | |
| ∇p > ∇min | |
| ∇error cells > ∇non-error cells | |
| If the solution exists, then return a type k relation | |
| End |