As long as the graph Gj is connected for some j E {1, 2, 3,..., m} standard PQ-tree techniques similar to the ones used in the planarity test can be applied in order to determine the required set of permutations (see Di Battista and Nardelli (1988)).