<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
the	O
list-labeling	B-General_Concept
problem	I-General_Concept
involves	O
maintaining	O
a	O
totally	O
ordered	O
set	O
S	O
supporting	O
the	O
following	O
operations	O
:	O
</s>
<s>
In	O
this	O
setting	O
,	O
when	O
an	O
item	O
is	O
inserted	O
into	O
S	O
,	O
it	O
is	O
specified	O
to	O
be	O
the	O
successor	O
of	O
some	O
other	O
item	O
already	O
in	O
S	O
.	O
For	O
example	O
,	O
this	O
is	O
the	O
way	O
that	O
list	O
labeling	O
is	O
used	O
in	O
the	O
order-maintenance	B-General_Concept
problem	I-General_Concept
.	O
</s>
<s>
The	O
other	O
cases	O
of	O
list	O
labeling	O
can	O
be	O
solved	O
via	O
balanced	B-Data_Structure
binary	I-Data_Structure
search	I-Data_Structure
trees	I-Data_Structure
.	O
</s>
<s>
Consider	O
,	O
a	O
binary	B-Language
search	I-Language
tree	I-Language
on	O
S	O
of	O
height	O
.	O
</s>
<s>
A	O
weight-balanced	B-Data_Structure
tree	I-Data_Structure
BB[]	O
is	O
defined	O
as	O
follows	O
.	O
</s>
<s>
A	O
scapegoat	B-Data_Structure
tree	I-Data_Structure
is	O
a	O
weight-balanced	B-Data_Structure
tree	I-Data_Structure
where	O
whenever	O
a	O
node	O
no	O
longer	O
satisfies	O
the	O
weight-balance	O
condition	O
the	O
entire	O
subtree	O
rooted	O
at	O
that	O
node	O
is	O
rebuilt	O
.	O
</s>
<s>
The	O
best	O
known	O
applications	O
of	O
list	O
labeling	O
are	O
the	O
order-maintenance	B-General_Concept
problem	I-General_Concept
and	O
packed-memory	O
arrays	O
for	O
cache-oblivious	B-Application
data	I-Application
structures	I-Application
.	O
</s>
<s>
The	O
order-maintenance	B-General_Concept
problem	I-General_Concept
is	O
that	O
of	O
maintaining	O
a	O
data	O
structure	O
on	O
a	O
linked	O
list	O
to	O
answer	O
order	O
queries	O
:	O
given	O
two	O
items	O
in	O
the	O
linked	O
list	O
,	O
which	O
is	O
closer	O
to	O
the	O
front	O
of	O
the	O
list	O
?	O
</s>
<s>
Packed-memory	O
arrays	O
are	O
used	O
in	O
cache-oblivious	B-Application
data	I-Application
structures	I-Application
to	O
store	O
data	O
that	O
must	O
be	O
indexed	O
and	O
scanned	O
.	O
</s>
