NTNU Norwegian University of Science and Technology Faculty of Information Technology and Electrical Engineering Department of Computer Science
Master ’s thesis
Halvard Hummel
Evaluation of the Iwata–Yokoi Algorithm
Master’s thesis in Computer Science
Supervisor: Magnus Lie Hetland
June 2020
Halvard Hummel
Evaluation of the Iwata–Yokoi Algorithm
Master’s thesis in Computer Science Supervisor: Magnus Lie Hetland June 2020
Norwegian University of Science and Technology
Faculty of Information Technology and Electrical Engineering
Department of Computer Science
G=(V,E) T µV
T T
T
T
T
G=(V,E) TµV
T T
T T
T
T
T
T
T T
T Pj
T
T
Pj
T
G=(V,E) T µV
T T
T T
T T
T
T
T
T
O°V E2¢
+
T
O(E!) ! 2.373
T
T
T
T
T
T
G=(V,E)
v0,e1,v1,...,en,vn ei vi°1 vi
v0 vn
ei vi°1
vi
a,b,...,z,1,2,3,...
a°1°3°2°c
abcbcb
T
P
T Pj j T
P Pj T
P T Pj
T
T
T T
T T
T
O(E) E V
T
Q Pj T
T
G=(V,E) T µV
T G T
T P T T
G=(V,E)
TµV T
T T
T T
T
G=(V,E)
T µV T G T
∏(T;G)
∏(T;G)=min
X
1 2
"
X
t2T
d(Xt)° (G\X)
#
X |T| Xt µV Xt
t2T d(S)
SµV G\S odd(G\X) Ci
G\X d(Ci)
T
|T| T
T
T T
T
T
n T
n+1 T n
T
T
T G
T P
s t T
s t
T
T T W
∞(W)
v0 vn
v0 vn
T T Q
T
T
T T
T
B1
s u
2|V|
T
T T
T T
T P
P
T
T P
Pj j
T P
P P
P µ(Q) P
T s t
P s t
T T
s t Pj
Pj T
Pj
T P
Pj Pj T
T
T
Pj T
Pj
Pj
T
Pj Pj
Pj
Pj
t
Pj Pj
Pj t
Pj
pst pt s x x Pj
Pj
s t
pst
pt s T s t
Pj
T s t pst p§st
pt s p§st
Pj
st t s T
T st
t s
Pj p§t s Pj
p§t s pst
P T
Pj
T Pj
T
T P
P
P
T
T T
T Pj
Pj
Pj T
Pj
P
u r
T
Pj
Pj
Pj
Pj
Pj
T
T
P T
P
P P
P
T T
P
P
T
|E|
O(V E)
O(E)
P P
O(V) O(V)
O(V E) O°V E2¢
O°V2E+E2¢
O(V) O(E)
O°V2+E¢
O(V) O(E)
O(V) O°V2¢
P P
T
T
P
str tr uvr
uv r
sr tuvr
sr tr
P
T r t tr u s
ustuv t str sr s
Pj T
s t
t vutr sr s
T u v
t vusr s
T
(Q)
∞ ∞(Q)
p ∞
pn
Q0
e Q.
e.
pn
e.sr c6=e.d st p==∞pn
e Q0 e.
p=e.
Q0
Q0 Q Q0
Q0 Q0
Q0
Q Q0
Q Q Q0
Q0 e
e Q
Q0 e
Q Q0
Q Á
Q e
Q e
e
e p e ∞[pn]
e
Q
e e
e e p
e ∞[pn]
Á O(Q) O(Q)
O(Q)
O(Q) O(Q) Á
(Q)
Q Q
Q
Q Q0
µ(Q)°µ(Q0)+2
P
P µP(Q)°µP(Q0)+1
T
2
P P
P
P P
P P
P
P P
P
P
P Á
O(E) P
P
O(Q) Q O(E)
Á
O(V) O(V)
O(V)
O(E)
Pj
T
T s°6°r t°5°8°r r°7°5°4°9°t P1 P2 P3
s°7°5°4°9°6°6°4°5°8°t 7°5°4°9
P3 6°6 P1 4°5 P3
5°8 P2
T
sr tr tr t sr tr tr t
P P3 7°5°4°9
P3 4°5
P3
7°5°4°9°6°6°4°5 P3
7 5 7°5
s°7°5°8°t t
sr t tr t
pst pt s
pst(7°5)=pst(5°4)=pst(4°9)=1 pt s(5°4)=2 pst pt s
Pj
(1)=1 (1)=1 (2)6=1 (2)6=1
e P3 r t
5°4 p§t s pst=1<2=pt s§ (1)=1
p§t s
e p§t s pst(e) (pst(e))=1 pst(e)<pt s§ c°7
7°5 5°4 4°9 9°b
4°9 pst=1<2=p§t s (1)=1
P3
Pj
pt s pst P3
t°9°4°5°7°r T
Pj
Pj T
Pj Pj
Pj
T Pj
P2 t°8°r t°5°4°6°6°9°4°5°7°s
B1
B1 P1
B2
B2 4°6
B1,9,4,5,7
B2
B2(5)°8
tr t sr tr tr tr s P3
5°4 4°9
p§st
P1 6
B1 4°6
B2
5°8
B1 B2
7°5 8°5
4 6 9
p§st p§t s
p§t s p§st)
st t s
Pj
p§st p§t s
Pj Pj
T
enter(x) leave(x) x Pj
f i r st(x) l ast(x) x Pj
Pj
T
Pj Pj
Pj f i r st l ast
p§st l ast(pt s(e0))=e0
e0 pt s(e0)>p§st leave(pt s(e0))=1 l ast(pt s(e0))=e0
Pj Pj
Pj Pj
p§st e f i r st(pst(e))=e
Pj
s t
Pj
Pj
Pj
Pj t
Pj pst
pt s Pj
pt s(e0)>p§st Pj
pt s p§st
leave(pt s(e0)) 1
Pj t
Pj
Pj Pj
Pj
Pj
Pj Pj
T
Pj Pj
Pj
p§st Pj e0
pt s(e0)>p§st Pj
e0 e0
Pj Pj
Pj
Pj
p§st Pj
Pj pt s(e0)>p§st Pj
Pj leave(pt s(e0))=1 l ast(pt s(e0))=e0 Pj
Á
p§st p§t s
f i r st(pst(e0))=e0 pst(e0)<p§t s enter(pst(e0)=1 f i r st(pst(e0))=e0 leave(pt s(e))=e
p§st
s t
Pj
Pj
Pj
Pj
Pj t
Pj pst pt s
Pj pst(e0)<p§t s
enter(pst(e0))=1
Pj Pj
Pj
Pj
Pj Pj
e0 Pj
Pj e0
f i r st(pst(e0))=e0 Pj
Pj
Pj
Pj
Pj e0 Pj
e0 Pj
s e0 pt s§ Pj
e0 pst(e0)<p§t s
enter(pst(e0))=1 e0
f i r st(pst(e0))=e0 e0
Á
P
P T P
T
T T
T T
T T
T T
T
T
T T
T
T
T
T
T T
O(E)
T T
T
T
T T
T
T
T
T
Pj
T
Á
T T
T
(Q,Pj) l
e Q.
e2Pj e.sr c==e.d st l==
l e l e l
T T
T
T T
Pj
T T T
T
Pj
T
Pj
Pj
T
T
T
T
T T T
T T
T
T
T T
T
T
T
T
T
Pj Pj
Pj
T
t stuvuvuv t str vuvuv
T
t vuvuvutr vuvuv
T P
Pj
Pj T
T T
Á
O(Q) O(E)
Á
T
T O(V)
T
|V|
T |V|
T T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j P§
Pj
Q P
T T
T T
T Pj
T
n T
n+1T
n+1 T
T
T Á
T
T
T T
T
Pj O(V)
O°V+Pj¢
T P§
T |V|
T O°V2¢
T T
|E| T
O°V2+E¢
V Pj E
O°V2+E¢
T O(V E) O(V E)
Á
T
T T
T T
T
Pj T
T
T Pj
T T
T
T
Á T
O(V) T O(V)
T
T
X T
T
2X+1
T
T
T
X 2X T
2X+1 Á
X T
2X+1
T Pj
T X+1
2X+1 Á
2X+1 X O(V)
X
T
(Q,P) P§
µP(Q)>0 Q
Q
T P§
Q
Q Q
Pj P§ Pj
Q P
n T
n+1 T
Pj n+1T
T
Á
O°V2¢
T O(V)
Pj
O(V)
O(V) T O(V)
O°V2¢
W O(V+W) T
O(V) O(V)
Pj O(V)
O°V2¢
O°V2¢ Á
O°V2¢
T
Pj
T T
Pj
T
T
T T
T
T T
T
+
T
T
NTNU Norwegian University of Science and Technology Faculty of Information Technology and Electrical Engineering Department of Computer Science