-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslides.pug
305 lines (294 loc) · 14.5 KB
/
slides.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
section
h1(style="font-variant: small-caps") Hardness of Token Swapping on Trees
hr
h4 Oswin Aichholzer <span class="sep">•</span> <u>Erik Demaine</u> <span class="sep">•</span> Matias Korman <span class="sep">•</span> Jayson Lynch <span class="sep">•</span> Anna Lubiw <span class="sep">•</span> Zuzana Masárová <span class="sep">•</span> Mikhail Rudoy <span class="sep">•</span> Virginia Vassilevska Williams <span class="sep">•</span> <u>Nicole Wein</u>
svg(viewBox="-10 -10 870 170", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="25")
line(x1="150", y1="25", x2="200", y2="25")
line(x1="250", y1="25", x2="300", y2="25")
line(x1="350", y1="25", x2="400", y2="25")
line(x1="450", y1="25", x2="500", y2="25")
line(x1="550", y1="25", x2="600", y2="25")
line(x1="650", y1="25", x2="700", y2="25")
line(x1="750", y1="25", x2="800", y2="25")
line(x1="225", y1="50", x2="225", y2="100")
rect.t1(x="0", y="0", width="50", height="50")
rect.t2(x="100", y="0", width="50", height="50")
rect.t3(x="200", y="0", width="50", height="50")
rect.t4(x="300", y="0", width="50", height="50")
rect.t5(x="400", y="0", width="50", height="50")
rect.t6(x="500", y="0", width="50", height="50")
rect.t7(x="600", y="0", width="50", height="50")
rect.t8(x="700", y="0", width="50", height="50")
rect.t9(x="800", y="0", width="50", height="50")
rect.t10(x="200", y="100", width="50", height="50")
circle.t9(cx="25", cy="25", r="16")
circle.t8(cx="125", cy="25", r="16")
circle.t7(cx="225", cy="25", r="16")
circle.t6(cx="325", cy="25", r="16")
circle.t5(cx="425", cy="25", r="16")
circle.t4(cx="525", cy="25", r="16")
circle.t3(cx="625", cy="25", r="16")
circle.t2(cx="725", cy="25", r="16")
circle.t1(cx="825", cy="25", r="16")
circle.t10(cx="225", cy="125", r="16")
.tokenswap.fragment(data-swaps="10,7 10,8 10,9 9,8 9,6 9,5 9,4 9,3 9,2 9,1 8,6 8,5 8,4 8,3 8,2 8,1 7,5 7,4 7,3 7,2 7,1 6,4 6,3 6,2 6,1 5,3 5,2 5,1 4,2 4,1 1,2 1,10 2,10 3,10")
section
h2 Token Swapping Problem
ul
li Given a <b>graph</b>
ul
li.fragment(data-fragment-index="1") with one <b>token</b> per vertex
li.fragment(data-fragment-index="2") and a <b>destination</b> for each token
li.fragment How many <b>swaps</b> along edges do we need?
svg.r-stretch(viewBox="-10 -10 270 170", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="25")
line(x1="150", y1="25", x2="200", y2="25")
line(x1="25", y1="50", x2="25", y2="100")
line(x1="225", y1="50", x2="225", y2="100")
line(x1="200", y1="50", x2="150", y2="100")
line(x1="50", y1="125", x2="100", y2="125")
line(x1="150", y1="125", x2="200", y2="125")
rect(x="0", y="0", width="50", height="50")
rect(x="100", y="0", width="50", height="50")
rect(x="200", y="0", width="50", height="50")
rect(x="0", y="100", width="50", height="50")
rect(x="100", y="100", width="50", height="50")
rect(x="200", y="100", width="50", height="50")
rect.t1.fragment(data-fragment-index="2", x="0", y="0", width="50", height="50")
rect.t2.fragment(data-fragment-index="2", x="100", y="0", width="50", height="50")
rect.t3.fragment(data-fragment-index="2", x="200", y="0", width="50", height="50")
rect.t4.fragment(data-fragment-index="2", x="0", y="100", width="50", height="50")
rect.t5.fragment(data-fragment-index="2", x="100", y="100", width="50", height="50")
rect.t6.fragment(data-fragment-index="2", x="200", y="100", width="50", height="50")
circle.t4.fragment(data-fragment-index="1", cx="25", cy="25", r="16")
circle.t2.fragment(data-fragment-index="1", cx="125", cy="25", r="16")
circle.t6.fragment(data-fragment-index="1", cx="225", cy="25", r="16")
circle.t5.fragment(data-fragment-index="1", cx="25", cy="125", r="16")
circle.t1.fragment(data-fragment-index="1", cx="125", cy="125", r="16")
circle.t3.fragment(data-fragment-index="1", cx="225", cy="125", r="16")
//- .tokenswap.fragment(data-swaps="3,6 1,5 1,4")
.tokenswap.fragment(data-swaps="3,6")
.tokenswap.fragment(data-swaps="1,5")
.tokenswap.fragment(data-swaps="1,4")
section
h2 Cayley Graph View
table.side-by-side.compact
tr
td • Positions of tokens
td • Permutation in $S_n$
tr
td • Graph edge
td • Transposition (swap)
tr
td • Configuration space
td • Cayley graph
tr
td • Reconfiguration
td • Path in Cayley graph
tr.r-stretch
td
svg(viewBox="-10 -10 370 70")
line(x1="50", y1="25", x2="100", y2="25", style="stroke:#ffff00")
line(x1="150", y1="25", x2="200", y2="25", style="stroke:#ff48fa")
line(x1="250", y1="25", x2="300", y2="25", style="stroke:#23fefa")
rect(x="0", y="0", width="50", height="50")
rect(x="100", y="0", width="50", height="50")
rect(x="200", y="0", width="50", height="50")
rect(x="300", y="0", width="50", height="50")
circle(cx="25", cy="25", r="16")
circle(cx="125", cy="25", r="16")
circle(cx="225", cy="25", r="16")
circle(cx="325", cy="25", r="16")
td(style="text-align: center")
img(src="cayley4.png", style="height:400px; margin: 0; filter: invert(1)")
a.url(href="https://commons.wikimedia.org/wiki/File:Symmetric_group_4;_Cayley_graph_1,2,6_(1-based).png") https://commons.wikimedia.org/wiki/File:Symmetric_group_4;_Cayley_graph_1,2,6_(1-based).png
//-
ul
li Token positions form a <b>permutation</b> in symmetric group $S_n$
li Each edge defines <b>transposition</b> (1-swap) generator
li <b>Cayley graph</b> represents space of permutations
section
h2 Connection to Bubble Sort
table.side-by-side
tr
td Path graph
td Sorting by swapping <b>adjacent</b> elements
tr
td Min number of swaps
td Number of <b>inversions</b> / cost of <b>bubble sort</b>
svg.r-stretch(viewBox="-10 -10 370 70", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="25")
line(x1="150", y1="25", x2="200", y2="25")
line(x1="250", y1="25", x2="300", y2="25")
rect.t1(x="0", y="0", width="50", height="50")
rect.t2(x="100", y="0", width="50", height="50")
rect.t3(x="200", y="0", width="50", height="50")
rect.t4(x="300", y="0", width="50", height="50")
circle.t4(cx="25", cy="25", r="16")
circle.t3(cx="125", cy="25", r="16")
circle.t2(cx="225", cy="25", r="16")
circle.t1(cx="325", cy="25", r="16")
.tokenswap.fragment(data-fragment-index="1", data-swaps="4,3 4,2 4,1 3,2 3,1 2,1")
//- Clique
svg(viewBox="-10 -10 170 170", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="25")
line(x1="50", y1="125", x2="100", y2="125")
line(x1="25", y1="50", x2="25", y2="100")
line(x1="125", y1="50", x2="125", y2="100")
line(x1="50", y1="50", x2="100", y2="100")
line(x1="50", y1="100", x2="100", y2="50")
rect(x="0", y="0", width="50", height="50")
rect(x="100", y="0", width="50", height="50")
rect(x="0", y="100", width="50", height="50")
rect(x="100", y="100", width="50", height="50")
circle.t1(cx="25", cy="25", r="16")
circle.t3(cx="125", cy="25", r="16")
circle.t5(cx="25", cy="125", r="16")
circle.t7(cx="125", cy="125", r="16")
section
h2 History
ul
li Studied in discrete mathematics, theoretical computer science, network engineering, robot motion planning, game theory
li <cite>Cayley [1849]</cite> solved <b>clique</b> version
li <cite>Knuth [1968]</cite> solved <b>path</b> version
//- li <cite>Akers & Krishnamurthy [1989]</cite> introduced as "sorting with a transposition graph" for routing in proposed network topology
li Also solved for cycles, stars, brooms, bicliques <!--, complete split graphs-->
ul.fragment
li <b>NP-complete</b> <cite>[Amir & Porat 2015]</cite>
li <b>APX-complete</b> with <b>4-approximation</b> <br> <cite>[Miltzow et al. 2016]</cite>
li <b>W[1]-hard</b> with respect to number of swaps <cite>[Bonnet et al. 2018]</cite>
section
h2 Token Swapping in Trees
svg.r-stretch(viewBox="-10 -10 370 170", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="65")
line(x1="50", y1="125", x2="100", y2="85")
line(x1="150", y1="75", x2="200", y2="75")
line(x1="300", y1="25", x2="250", y2="65")
line(x1="300", y1="125", x2="250", y2="85")
rect.t1(x="0", y="0", width="50", height="50")
rect.t2(x="0", y="100", width="50", height="50")
rect.t3(x="100", y="50", width="50", height="50")
rect.t4(x="200", y="50", width="50", height="50")
rect.t5(x="300", y="0", width="50", height="50")
rect.t6(x="300", y="100", width="50", height="50")
circle.t5(cx="25", cy="25", r="16")
circle.t1(cx="25", cy="125", r="16")
circle.t6(cx="125", cy="75", r="16")
circle.t4(cx="225", cy="75", r="16")
circle.t2(cx="325", cy="25", r="16")
circle.t3(cx="325", cy="125", r="16")
//.tokenswap.fragment(data-swaps="2,4 2,6 2,1 1,5 3,6 3,5 4,5")
.tokenswap.fragment(data-swaps="2,4")
.tokenswap.fragment(data-swaps="2,6")
.tokenswap.fragment(data-swaps="2,1")
.tokenswap.fragment(data-swaps="1,5")
.tokenswap.fragment(data-swaps="3,6")
.tokenswap.fragment(data-swaps="3,5")
.tokenswap.fragment(data-swaps="4,5")
section
h2 History: Trees
ul
li <cite>Akers & Krishnamurthy [1989]</cite> first studied <b>tree</b> version as routing in proposed network topology
li Three <b>2-approximation</b> algorithms <br> <cite>[Akers & Krishnamurthy 1989; Vaughan 1991; Yamanaka et al. 2015]</cite>
li Family of algorithms (including past algorithms) cannot beat $4 \over 3$-approximation <cite>[Biniaz et al. 2019]</cite>
li <u>OPEN</u>: NP-hard?
li <u>OPEN</u>: Better approximation?
section
h2 Our Results
ul
li Token swapping is <b>NP-hard on trees</b>
ul
li Also for <b>parallel</b> token swapping, where we can swap a matching in each round
li Family of algorithms (including past algorithms) cannot beat 2-approximation
svg.r-stretch(viewBox="-10 -10 370 170", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="65")
line(x1="50", y1="125", x2="100", y2="85")
line(x1="150", y1="75", x2="200", y2="75")
line(x1="300", y1="25", x2="250", y2="65")
line(x1="300", y1="125", x2="250", y2="85")
rect.t1(x="0", y="0", width="50", height="50")
rect.t2(x="0", y="100", width="50", height="50")
rect.t3(x="100", y="50", width="50", height="50")
rect.t4(x="200", y="50", width="50", height="50")
rect.t5(x="300", y="0", width="50", height="50")
rect.t6(x="300", y="100", width="50", height="50")
circle.t5(cx="25", cy="25", r="16")
circle.t1(cx="25", cy="125", r="16")
circle.t6(cx="125", cy="75", r="16")
circle.t4(cx="225", cy="75", r="16")
circle.t2(cx="325", cy="25", r="16")
circle.t3(cx="325", cy="125", r="16")
//-.tokenswap.fragment(data-fragment-index="1", data-swaps="2,4 2,6 2,1 1,5 3,6 3,5 4,5")
section
h2 Happy Leaf Conjecture
ul
li <u>Conjecture</u>: <cite>[Vaughan 1991]</cite> Never need to swap a token that's already at destination leaf
li.fragment(data-fragment-index="1") <u>Counterexample</u>: <cite>[Biniaz et al. 2019]</cite> <br> (smallest possible)
svg.fragment(data-fragment-index="1", viewBox="-10 -10 870 170", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="25")
line(x1="150", y1="25", x2="200", y2="25")
line(x1="250", y1="25", x2="300", y2="25")
line(x1="350", y1="25", x2="400", y2="25")
line(x1="450", y1="25", x2="500", y2="25")
line(x1="550", y1="25", x2="600", y2="25")
line(x1="650", y1="25", x2="700", y2="25")
line(x1="750", y1="25", x2="800", y2="25")
line(x1="225", y1="50", x2="225", y2="100")
rect.t1(x="0", y="0", width="50", height="50")
rect.t2(x="100", y="0", width="50", height="50")
rect.t3(x="200", y="0", width="50", height="50")
rect.t4(x="300", y="0", width="50", height="50")
rect.t5(x="400", y="0", width="50", height="50")
rect.t6(x="500", y="0", width="50", height="50")
rect.t7(x="600", y="0", width="50", height="50")
rect.t8(x="700", y="0", width="50", height="50")
rect.t9(x="800", y="0", width="50", height="50")
rect.t10(x="200", y="100", width="50", height="50")
circle.t9(cx="25", cy="25", r="16")
circle.t8(cx="125", cy="25", r="16")
circle.t7(cx="225", cy="25", r="16")
circle.t6(cx="325", cy="25", r="16")
circle.t5(cx="425", cy="25", r="16")
circle.t4(cx="525", cy="25", r="16")
circle.t3(cx="625", cy="25", r="16")
circle.t2(cx="725", cy="25", r="16")
circle.t1(cx="825", cy="25", r="16")
circle.t10(cx="225", cy="125", r="16")
.tokenswap.fragment(data-swaps="10,7 10,8 10,9")
.tokenswap.fragment(data-swaps="9,8 9,6 9,5 9,4 9,3 9,2 9,1")
.tokenswap.fragment(data-swaps="8,6 8,5 8,4 8,3 8,2 8,1")
.tokenswap.fragment(data-swaps="7,5 7,4 7,3 7,2 7,1")
.tokenswap.fragment(data-swaps="6,4 6,3 6,2 6,1")
.tokenswap.fragment(data-swaps="5,3 5,2 5,1")
.tokenswap.fragment(data-swaps="4,2 4,1")
.tokenswap.fragment(data-swaps="1,2 1,10 2,10 3,10")
ul
li.fragment Any algorithm satisfying conjecture cannot beat $4 \over 3$-approximation <cite>[Biniaz et al. 2019]</cite>
section
h2 Our Results
ul
li
span.fragment.highlight-green Token swapping is <b>NP-hard on trees</b>
ul
li Also for <b>parallel</b> token swapping, where we can swap a matching in each round
li Algorithms that stay <b>within 1 of shortest path</b> cannot beat 2-approximation
svg.r-stretch(viewBox="-10 -10 370 170", style="padding-top:0.5rem")
line(x1="50", y1="25", x2="100", y2="65")
line(x1="50", y1="125", x2="100", y2="85")
line(x1="150", y1="75", x2="200", y2="75")
line(x1="300", y1="25", x2="250", y2="65")
line(x1="300", y1="125", x2="250", y2="85")
rect.t1(x="0", y="0", width="50", height="50")
rect.t2(x="0", y="100", width="50", height="50")
rect.t3(x="100", y="50", width="50", height="50")
rect.t4(x="200", y="50", width="50", height="50")
rect.t5(x="300", y="0", width="50", height="50")
rect.t6(x="300", y="100", width="50", height="50")
circle.t5(cx="25", cy="25", r="16")
circle.t1(cx="25", cy="125", r="16")
circle.t6(cx="125", cy="75", r="16")
circle.t4(cx="225", cy="75", r="16")
circle.t2(cx="325", cy="25", r="16")
circle.t3(cx="325", cy="125", r="16")
//.tokenswap.fragment(data-fragment-index="1", data-swaps="2,4 2,6 2,1 1,5 3,6 3,5 4,5")