<s>
A	O
PQ	B-Data_Structure
tree	I-Data_Structure
is	O
a	O
tree-based	O
data	B-General_Concept
structure	I-General_Concept
that	O
represents	O
a	O
family	O
of	O
permutations	B-Algorithm
on	O
a	O
set	O
of	O
elements	O
,	O
discovered	O
and	O
named	O
by	O
Kellogg	O
S	O
.	O
Booth	O
and	O
George	O
S	O
.	O
Lueker	O
in	O
1976	O
.	O
</s>
<s>
It	O
is	O
a	O
rooted	O
,	O
labeled	O
tree	O
,	O
in	O
which	O
each	O
element	O
is	O
represented	O
by	O
one	O
of	O
the	O
leaf	B-Data_Structure
nodes	I-Data_Structure
,	O
and	O
each	O
non-leaf	O
node	O
is	O
labelled	O
P	O
or	O
Q	O
.	O
</s>
<s>
A	O
PQ	B-Data_Structure
tree	I-Data_Structure
represents	O
its	O
permutations	B-Algorithm
via	O
permissible	O
reorderings	O
of	O
the	O
children	O
of	O
its	O
nodes	O
.	O
</s>
<s>
A	O
PQ	B-Data_Structure
tree	I-Data_Structure
represents	O
all	O
leaf	B-Data_Structure
node	I-Data_Structure
orderings	O
that	O
can	O
be	O
achieved	O
by	O
any	O
sequence	O
of	O
these	O
two	O
operations	O
.	O
</s>
<s>
A	O
PQ	B-Data_Structure
tree	I-Data_Structure
with	O
many	O
P	O
and	O
Q	O
nodes	O
can	O
represent	O
complicated	O
subsets	O
of	O
the	O
set	O
of	O
all	O
possible	O
orderings	O
.	O
</s>
<s>
However	O
,	O
not	O
every	O
set	O
of	O
orderings	O
may	O
be	O
representable	O
in	O
this	O
way	O
;	O
for	O
instance	O
,	O
if	O
an	O
ordering	O
is	O
represented	O
by	O
a	O
PQ	B-Data_Structure
tree	I-Data_Structure
,	O
the	O
reverse	O
of	O
the	O
ordering	O
must	O
also	O
be	O
represented	O
by	O
the	O
same	O
tree	O
.	O
</s>
<s>
PQ	B-Data_Structure
trees	I-Data_Structure
are	O
used	O
to	O
solve	O
problems	O
where	O
the	O
goal	O
is	O
to	O
find	O
an	O
ordering	O
that	O
satisfies	O
various	O
constraints	O
.	O
</s>
<s>
In	O
these	O
problems	O
,	O
constraints	O
on	O
the	O
ordering	O
are	O
included	O
one	O
at	O
a	O
time	O
,	O
by	O
modifying	O
the	O
PQ	B-Data_Structure
tree	I-Data_Structure
structure	O
in	O
such	O
a	O
way	O
that	O
it	O
represents	O
only	O
orderings	O
satisfying	O
the	O
constraint	O
.	O
</s>
<s>
Applications	O
of	O
PQ	B-Data_Structure
trees	I-Data_Structure
include	O
creating	O
a	O
contig	B-Application
map	I-Application
from	O
DNA	O
fragments	O
,	O
testing	O
a	O
matrix	O
for	O
the	O
consecutive	O
ones	O
property	O
,	O
recognizing	O
interval	O
graphs	O
,	O
and	O
determining	O
whether	O
a	O
graph	O
is	O
planar	O
.	O
</s>
<s>
If	O
all	O
the	O
leaves	O
of	O
a	O
PQ	B-Data_Structure
tree	I-Data_Structure
are	O
connected	O
directly	O
to	O
a	O
root	O
P	O
node	O
then	O
all	O
possible	O
orderings	O
are	O
allowed	O
.	O
</s>
<s>
If	O
nodes	O
a	O
,	O
b	O
,	O
c	O
connect	O
to	O
a	O
P	O
node	O
,	O
which	O
connects	O
to	O
a	O
root	O
P	O
node	O
,	O
with	O
all	O
other	O
leaf	B-Data_Structure
nodes	I-Data_Structure
connected	O
directly	O
to	O
the	O
root	O
,	O
then	O
any	O
ordering	O
where	O
a	O
,	O
b	O
,	O
c	O
are	O
contiguous	O
is	O
allowed	O
.	O
</s>
<s>
Where	O
graphical	O
presentation	O
is	O
unavailable	O
PQ	B-Data_Structure
trees	I-Data_Structure
are	O
often	O
noted	O
using	O
nested	O
parenthesized	O
lists	O
.	O
</s>
<s>
This	O
PQ	B-Data_Structure
tree	I-Data_Structure
represents	O
the	O
following	O
twelve	O
permutations	B-Algorithm
on	O
the	O
set	O
{	O
1	O
,	O
2	O
,	O
3	O
,	O
4	O
,	O
5}	O
:	O
</s>
<s>
The	O
PC	O
tree	O
,	O
developed	O
by	O
Wei-Kuan	O
Shih	O
and	O
Wen-Lian	O
Hsu	O
,	O
is	O
a	O
more	O
recent	O
generalization	O
of	O
the	O
PQ	B-Data_Structure
tree	I-Data_Structure
.	O
</s>
<s>
Like	O
the	O
PQ	B-Data_Structure
tree	I-Data_Structure
,	O
it	O
represents	O
permutations	B-Algorithm
by	O
reorderings	O
of	O
nodes	O
in	O
a	O
tree	O
,	O
with	O
elements	O
represented	O
at	O
the	O
leaves	O
of	O
the	O
tree	O
.	O
</s>
<s>
Unlike	O
the	O
PQ	B-Data_Structure
tree	I-Data_Structure
,	O
the	O
PC	O
tree	O
is	O
unrooted	O
.	O
</s>
<s>
The	O
nodes	O
adjacent	O
to	O
any	O
non-leaf	O
node	O
labeled	O
P	O
may	O
be	O
reordered	O
arbitrarily	O
as	O
in	O
the	O
PQ	B-Data_Structure
tree	I-Data_Structure
,	O
while	O
the	O
nodes	O
adjacent	O
to	O
any	O
non-leaf	O
node	O
labeled	O
C	O
have	O
a	O
fixed	O
cyclic	O
order	O
and	O
may	O
only	O
be	O
reordered	O
by	O
reversing	O
this	O
order	O
.	O
</s>
<s>
Thus	O
,	O
a	O
PC	O
tree	O
can	O
only	O
represent	O
sets	O
of	O
orderings	O
in	O
which	O
any	O
circular	O
permutation	B-Algorithm
or	O
reversal	O
of	O
an	O
ordering	O
in	O
the	O
set	O
is	O
also	O
in	O
the	O
set	O
.	O
</s>
<s>
However	O
,	O
a	O
PQ	B-Data_Structure
tree	I-Data_Structure
on	O
n	O
elements	O
may	O
be	O
simulated	O
by	O
a	O
PC	O
tree	O
on	O
n	O
+	O
1	O
elements	O
,	O
where	O
the	O
extra	O
element	O
serves	O
to	O
root	O
the	O
PC	O
tree	O
.	O
</s>
<s>
The	O
data	B-General_Concept
structure	I-General_Concept
operations	O
required	O
to	O
perform	O
a	O
planarity	O
testing	O
algorithm	O
on	O
PC	O
trees	O
are	O
somewhat	O
simpler	O
than	O
the	O
corresponding	O
operations	O
on	O
PQ	B-Data_Structure
trees	I-Data_Structure
.	O
</s>
