In Phase II, lines 2-4 identify all unshielded triples \(X_i - X_k - X_j\)  in the skeleton. The logic is that if the unshielded triple is \(X_i \rightarrow X_k \rightarrow X_j\) , \(X_i \leftarrow X_k \leftarrow X_j\)  or \(X_i \leftarrow X_k \rightarrow X_j\) , the \(X_k\)  must appear in the entry \(S(i,j)\)  (or \(S(j,i)\) , notice that \(S\)  is a symmetric matrix). On the contrary, if \(X_k\)  does not exist in \(S(i,j)\) , the unshielded triple must form a \(v\) -structure, \(X_i \rightarrow X_k \leftarrow X_j\) . The four rules in lines 7-10 is to infer directions for as more edges as possible, referred to as orientation propagation [1]}. For example, the Rule 1 rules out the possibility of \(X_i \leftarrow X_j\) , because it will make \(X_k\)  a \(v\) -structure node which should already be found at line 3, Rule 2 would create a cyclic graph if it's \(X_i \leftarrow X_j\) ; etc.
