<s>
Yen	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
computes	O
single-source	O
K-shortest	O
loopless	O
paths	O
for	O
a	O
graph	O
with	O
non-negative	O
edge	O
cost	O
.	O
</s>
<s>
The	O
algorithm	O
assumes	O
that	O
the	O
Dijkstra	B-Algorithm
algorithm	I-Algorithm
is	O
used	O
to	O
find	O
the	O
shortest	O
path	O
between	O
two	O
nodes	O
,	O
but	O
any	O
shortest	O
path	O
algorithm	O
can	O
be	O
used	O
in	O
its	O
place	O
.	O
</s>
<s>
Dijkstra	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
is	O
used	O
to	O
calculate	O
the	O
best	O
path	O
from	O
to	O
,	O
which	O
is	O
with	O
cost	O
5	O
.	O
</s>
<s>
Dijkstra	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
is	O
used	O
to	O
compute	O
the	O
spur	O
path	O
,	O
which	O
is	O
,	O
with	O
a	O
cost	O
of	O
8	O
.	O
is	O
added	O
to	O
container	O
as	O
a	O
potential	O
k-shortest	O
path	O
.	O
</s>
<s>
Dijkstra	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
is	O
used	O
to	O
compute	O
the	O
spur	O
path	O
,	O
which	O
is	O
,	O
with	O
a	O
cost	O
of	O
7	O
.	O
is	O
added	O
to	O
container	O
as	O
a	O
potential	O
k-shortest	O
path	O
.	O
</s>
<s>
Dijkstra	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
is	O
used	O
to	O
compute	O
the	O
spur	O
path	O
,	O
which	O
is	O
,	O
with	O
a	O
cost	O
of	O
8	O
.	O
is	O
added	O
to	O
container	O
as	O
a	O
potential	O
k-shortest	O
path	O
.	O
</s>
<s>
The	O
time	O
complexity	O
of	O
Yen	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
is	O
dependent	O
on	O
the	O
shortest	O
path	O
algorithm	O
used	O
in	O
the	O
computation	O
of	O
the	O
spur	O
paths	O
,	O
so	O
the	O
Dijkstra	B-Algorithm
algorithm	I-Algorithm
is	O
assumed	O
.	O
</s>
<s>
Dijkstra	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
has	O
a	O
worse	O
case	O
time	O
complexity	O
of	O
,	O
but	O
using	O
a	O
Fibonacci	O
heap	O
it	O
becomes	O
,	O
where	O
is	O
the	O
amount	O
of	O
edges	O
in	O
the	O
graph	O
.	O
</s>
<s>
Since	O
Yen	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
makes	O
calls	O
to	O
the	O
Dijkstra	O
in	O
computing	O
the	O
spur	O
paths	O
,	O
where	O
is	O
the	O
length	O
of	O
spur	O
paths	O
.	O
</s>
<s>
Yen	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
can	O
be	O
improved	O
by	O
using	O
a	O
heap	O
to	O
store	O
,	O
the	O
set	O
of	O
potential	O
k''-shortest	O
paths	O
.	O
</s>
<s>
Eugene	O
Lawler	O
proposed	O
a	O
modification	O
to	O
Yen	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
in	O
which	O
duplicates	O
path	O
are	O
not	O
calculated	O
as	O
opposed	O
to	O
the	O
original	O
algorithm	O
where	O
they	O
are	O
calculated	O
and	O
then	O
discarded	O
when	O
they	O
are	O
found	O
to	O
be	O
duplicates	O
.	O
</s>
