(6) is only 4 times (2*2) slower than the GTK in this case.
we can say that given the constraint that there is only one optional node in one rule, the time complexity of the GTK is also O(|N 1 | • |N 2 |) 5 , where N 1 and N 2 are the numbers of tree nodes, the same as the TK.