Thus, to test for conflict serializability, we need to construct the precedence
graph and to invoke a cycle-detection algorithm. Cycle-detection algorithms can
be found in standard textbooks on algorithms. Cycle-detection algorithms, such
as those based on depth-first search, require on the order of n2 operations, where
n is the number of vertices in the graph (that is, the number of transactions).