<s>
In	O
the	O
field	O
of	O
analysis	B-General_Concept
of	I-General_Concept
algorithms	I-General_Concept
in	O
computer	B-General_Concept
science	I-General_Concept
,	O
the	O
accounting	B-General_Concept
method	I-General_Concept
is	O
a	O
method	O
of	O
amortized	B-General_Concept
analysis	I-General_Concept
based	O
on	O
accounting	O
.	O
</s>
<s>
The	O
accounting	B-General_Concept
method	I-General_Concept
often	O
gives	O
a	O
more	O
intuitive	O
account	O
of	O
the	O
amortized	B-General_Concept
cost	O
of	O
an	O
operation	O
than	O
either	O
aggregate	B-General_Concept
analysis	I-General_Concept
or	O
the	O
potential	B-General_Concept
method	I-General_Concept
.	O
</s>
<s>
Note	O
,	O
however	O
,	O
that	O
this	O
does	O
not	O
guarantee	O
such	O
analysis	O
will	O
be	O
immediately	O
obvious	O
;	O
often	O
,	O
choosing	O
the	O
correct	O
parameters	O
for	O
the	O
accounting	B-General_Concept
method	I-General_Concept
requires	O
as	O
much	O
knowledge	O
of	O
the	O
problem	O
and	O
the	O
complexity	O
bounds	O
one	O
is	O
attempting	O
to	O
prove	O
as	O
the	O
other	O
two	O
methods	O
.	O
</s>
<s>
The	O
accounting	B-General_Concept
method	I-General_Concept
is	O
most	O
naturally	O
suited	O
for	O
proving	O
an	O
O(1 )	O
bound	O
on	O
time	O
.	O
</s>
<s>
The	O
difficulty	O
with	O
problems	O
that	O
require	O
amortized	B-General_Concept
analysis	I-General_Concept
is	O
that	O
,	O
in	O
general	O
,	O
some	O
of	O
the	O
operations	O
will	O
require	O
greater	O
than	O
constant	O
cost	O
.	O
</s>
<s>
A	O
few	O
examples	O
will	O
help	O
to	O
illustrate	O
the	O
use	O
of	O
the	O
accounting	B-General_Concept
method	I-General_Concept
.	O
</s>
<s>
Here	O
we	O
will	O
use	O
the	O
accounting	B-General_Concept
method	I-General_Concept
to	O
show	O
that	O
the	O
amortized	B-General_Concept
cost	O
of	O
an	O
insertion	O
operation	O
in	O
such	O
a	O
table	O
is	O
O(1 )	O
.	O
</s>
<s>
The	O
following	O
pseudocode	B-Language
illustrates	O
the	O
table	O
insertion	O
procedure	O
:	O
</s>
<s>
Without	O
amortized	B-General_Concept
analysis	I-General_Concept
,	O
the	O
best	O
bound	O
we	O
can	O
show	O
for	O
n	O
insert	O
operations	O
is	O
O(n )	O
this	O
is	O
due	O
to	O
the	O
loop	O
at	O
line	O
4	O
that	O
performs	O
num(T )	O
elementary	O
insertions	O
.	O
</s>
<s>
For	O
analysis	O
using	O
the	O
accounting	B-General_Concept
method	I-General_Concept
,	O
we	O
assign	O
a	O
payment	O
of	O
3	O
to	O
each	O
table	O
insertion	O
.	O
</s>
<s>
Not	O
really	O
;	O
it	O
turns	O
out	O
we	O
use	O
the	O
same	O
method	O
to	O
show	O
the	O
amortized	B-General_Concept
O(1 )	O
bounds	O
.	O
</s>
