Online Graph Exploration with Advice
Transcription
Online Graph Exploration with Advice
online graph exploration lower bound advice optimality Online Graph Exploration with Advice Stefan Dobrev1 and Rastislav Královič2 and Euripides Markou3 Slovak Academy of Sciences, Bratislava. Stefan.Dobrev@savba.sk Comenius University, Bratislava. kralovic@dcs.fmph.uniba.sk University of Central Greece, Lamia. emarkou@ucg.gr ACAC 2012, Athens algorithm online graph exploration Graph exploration lower bound advice optimality algorithm online graph exploration lower bound advice Graph exploration general statement Given a ... graph, find a ... closed walk that visits all ... . optimality algorithm online graph exploration lower bound advice Graph exploration our case Given a weighted undirected graph, find a shortest closed walk that visits all vertices. optimality algorithm online graph exploration lower bound advice problem statement Given a weighted undirected graph, find a shortest closed walk that visits all vertices. optimality algorithm online graph exploration lower bound advice problem statement Given a weighted undirected graph, find a shortest closed walk that visits all vertices. optimality algorithm online graph exploration lower bound advice optimality algorithm problem statement Given a weighted undirected graph, find a shortest closed walk that visits all vertices. equivalent to TSP in the metric closure (vertices may repeat) online graph exploration lower bound advice optimality algorithm problem statement Given a weighted undirected graph, find a shortest closed walk that visits all vertices. equivalent to TSP in the metric closure (vertices may repeat) 2·MST is 2-approximation online graph exploration online setting: agent lower bound advice optimality algorithm online graph exploration lower bound online setting: agent can move advice optimality algorithm online graph exploration lower bound online setting: agent can not write can move advice optimality algorithm online graph exploration lower bound online setting: agent has (polynomial) memory can not write can move advice optimality algorithm online graph exploration lower bound advice optimality online setting: agent has (polynomial) memory can see can not write can move agent in vertex v sees algorithm online graph exploration lower bound advice optimality online setting: agent has (polynomial) memory can see can not write can move agent in vertex v sees unique ID algorithm online graph exploration lower bound advice optimality online setting: agent has (polynomial) memory can see can not write can move agent in vertex v sees unique ID weights algorithm online graph exploration lower bound advice optimality online setting: agent has (polynomial) memory can see can not write can move agent in vertex v sees unique ID weights neighbors’ IDs algorithm online graph exploration lower bound advice optimality algorithm online graph exploration traversed 10 lower bound advice optimality algorithm online graph exploration traversed 20 lower bound advice optimality algorithm online graph exploration traversed 45 lower bound advice optimality algorithm online graph exploration traversed 55 lower bound advice optimality algorithm online graph exploration traversed 60 lower bound advice optimality algorithm online graph exploration traversed 61 lower bound advice optimality algorithm online graph exploration traversed 62 lower bound advice optimality algorithm online graph exploration traversed 67 lower bound advice optimality algorithm online graph exploration traversed 97 lower bound advice optimality algorithm online graph exploration traversed 107 lower bound advice optimality algorithm online graph exploration lower bound advice optimality main question What is the (worst case) length of the agent’s traversal compared to (offline) optimum? Is there a constant competitive algorithm? algorithm online graph exploration lower bound advice optimality algorithm main question What is the (worst case) length of the agent’s traversal compared to (offline) optimum? Is there a constant competitive algorithm? what has been known about competitive ratio [Rosenkranz et al., 1977] NN: Θ(log n) even on unweighted planar [Myazaki et al., 2009] cycles: √ 1+ 3 2 ≈ 1.366, unweighted graphs: 2 [Kalyanasundaram et al., 1994] planar: 16-competitive (general?) [Megow et al., 2011] K+ algorithm is not constant competitive genus g : 16(1 + 2g )-competitive k distinct weights: 2k-competitive online graph exploration lower bound advice optimality first task Improve the 2 − ε lower bound from [Myazaki et al., 2009] algorithm online graph exploration lower bound advice optimality first task Improve the 2 − ε lower bound from [Myazaki et al., 2009] we got Any algorithm A is at least 5 2 − ε competitive on some graph. algorithm online graph exploration lower bound advice optimality we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea algorithm online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) ratio with x blocks: online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) ratio with x blocks: 5 (x−1) 2 online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) ratio with x blocks: (x−2) 52 (x−1) online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) ratio with x blocks: (x−2) 52 (x−1)+2(x−1) online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) ratio with x blocks: (x−2) 52 (x−1)+2(x−1)+x(x−2) online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) ratio with x blocks: (x−2) 52 (x−1)+2(x−1)+x(x−2) x(x−1)+x(x−2) online graph exploration lower bound advice optimality algorithm we got Any algorithm A is at least 5 2 − ε competitive on some graph. rough idea fixed movement block of size x orientation additional edges must traverse 5 2 (x − 1) ratio with x blocks: (x−2) 52 (x−1)+2(x−1)+x(x−2) x(x−1)+x(x−2) ≈ 7 4 online graph exploration lower bound advice refinement: hierarchical construction r1 t1 o1 e1 ẽ1 = = = ≥ ≥ 1 (x − 1) 2 x −2 x −1 5 (x − 1) 2 x −1 ratio x blocks, k levels: (x−5)ek +5ẽk +xtk xok +xtk optimality algorithm online graph exploration lower bound advice optimality algorithm refinement: hierarchical construction r1 t1 o1 e1 ẽ1 = = = ≥ ≥ 1 (x − 1) 2 x −2 x −1 5 (x − 1) 2 x −1 ratio x blocks, k levels: ri+1 ti+1 oi+1 ei+1 ẽi+1 = = = = ≥ 1 (x + 1)ri + 12 (x − 1)ti 2 (x − 1)ti + xri xoi + (x − 1)ti (x − 4)ei + 4ẽi + 52 (x − 1)ti + (x − 5)ei + 5ẽi + (x − 1)ti (x−5)ek +5ẽk +xtk xok +xtk ≈ 5 2 √ − 2−O( log n) 3x−1 ri 2 online graph exploration lower bound advice complexity online setting: agent has (polynomial) memory can see can not write can move advice optimality algorithm online graph exploration lower bound advice optimality algorithm advice complexity online setting: agent advice given to the agent at start function of input graph advice 01100101 s-bit binary string ”relevant” topology information has (polynomial) memory can see can not write can move online graph exploration lower bound advice optimality algorithm advice complexity online setting: agent advice given to the agent at start function of input graph advice 01100101 s-bit binary string ”relevant” topology information has (polynomial) memory can see can not write can move advice size vs. solution quality online graph exploration lower bound advice optimality algorithm lower bound on advice for optimality Any optimal algorithm requires Ω(n log n) bits in the worst case. w (vi , vj ) = 4 − min{i, j} online graph exploration lower bound advice optimality algorithm lower bound on advice for optimality Any optimal algorithm requires Ω(n log n) bits in the worst case. w (vi , vj ) = 4 − min{i, j} unique optimal solution online graph exploration lower bound advice optimality algorithm lower bound on advice for optimality Any optimal algorithm requires Ω(n log n) bits in the worst case. w (vi , vj ) = 4 − min{i, j} unique optimal solution agent needs log n advice online graph exploration lower bound advice optimality algorithm lower bound on advice for optimality Any optimal algorithm requires Ω(n log n) bits in the worst case. w (vi , vj ) = 4 − min{i, j} unique optimal solution agent needs log n advice cannot distinguish next problem: reversal online graph exploration lower bound advice optimality algorithm lower bound on advice for optimality Any optimal algorithm requires Ω(n log n) bits in the worst case. v5 3 v60 v6 4 2 v4 5 v7 1 v70 8 3 v50 2 4 v40 8 5 v00 v30 1 v3 v0 6 8 v2 7 v1 8 6 v10 7 v20 online graph exploration lower bound advice optimality algorithm There is a constant-competitive algorithm with linear advice. rough idea traverse some tree algorithm online graph exploration lower bound advice optimality algorithm There is a constant-competitive algorithm with linear advice. rough idea traverse some tree DFS has a problem algorithm online graph exploration lower bound advice optimality algorithm There is a constant-competitive algorithm with linear advice. rough idea traverse some tree DFS has a problem MST of weight M cheap edge ≤ M n it is always safe to explore a cheap edge algorithm online graph exploration lower bound advice optimality algorithm algorithm There is a constant-competitive algorithm with linear advice. rough idea traverse some tree DFS has a problem MST of weight M cheap edge ≤ M n it is always safe to explore a cheap edge advice tells the value dlog( M n )e (M is unbounded, but can be done using O(log n) bits and traversing O(M) total cost.) online graph exploration lower bound advice optimality algorithm Advice tells the value dlog( Mn )e by encoding: (n, n0 , p, l 0 ) Search for the first encountered edge e with w (e) ∈ [ nM2 , M] keep traversing the cheapest outgoing edge until n0 −th vertex is encountered, consider the p−th incident edge e and let w (e) be its weight, dlog(M)e = dlog(w (e))e + l 0 (n0 , p, l 0 ) are chosen in such way that e has the right property. O(log n) bits are sufficient to encode n, n0 , p, l 0 ; Cost: O(M) Such an edge e must exist (otherwise the MST weight < M). l 0 ≤ dlog(M)e − dlog( nM2 )e ≤ 2 log n at most n cheapest ( nM2 ) outgoing edges; the cost to reach each one is at most O( M n ). online graph exploration lower bound advice optimality cheap edges always explored by DFS cheap clusters connected with expensive edges algorithm online graph exploration lower bound advice optimality cheap edges always explored by DFS cheap clusters connected with expensive edges some expensive edges are tree edges (i.e. from MST) advice must tell which ones in an efficient way algorithm online graph exploration lower bound cluster edges level 0: cheap level i: w (e) ≤ 2i M n ≤ n 2i level-i edges in MST advice optimality algorithm online graph exploration lower bound cluster edges level 0: cheap level i: w (e) ≤ 2i M n ≤ n 2i level-i edges in MST advice optimality identify tree edges levels in parallel separate advice for levels O(log i) bits per i-edge algorithm online graph exploration lower bound cluster edges level 0: cheap level i: w (e) ≤ 2i M n ≤ n 2i level-i edges in MST all i-edges out: OUT advice optimality identify tree edges levels in parallel separate advice for levels O(log i) bits per i-edge algorithm online graph exploration lower bound cluster edges level 0: cheap level i: w (e) ≤ 2i M n ≤ n 2i level-i edges in MST all i-edges out: OUT in edges: WAIT advice optimality identify tree edges levels in parallel separate advice for levels O(log i) bits per i-edge algorithm online graph exploration lower bound cluster edges level 0: cheap level i: w (e) ≤ 2i M n ≤ n 2i level-i edges in MST all i-edges out: OUT in edges: WAIT later TRIGGER advice optimality identify tree edges levels in parallel separate advice for levels O(log i) bits per i-edge algorithm online graph exploration lower bound cluster edges level 0: cheap level i: w (e) ≤ 2i M n ≤ n 2i level-i edges in MST all i-edges out: OUT in edges: WAIT later TRIGGER managing multiple triggers is the core of the algorithm advice optimality identify tree edges levels in parallel separate advice for levels O(log i) bits per i-edge algorithm online graph exploration lower bound advice optimality open problems so is there a constant competitive algorithm or not? improve the lower bound 5 2 −ε any general algorithm better than O(log n)? what can be done with polylogarithmic advice? or o(n)? lower bounds on advice / trade-off algorithm online graph exploration lower bound advice optimality open problems so is there a constant competitive algorithm or not? improve the lower bound 5 2 −ε any general algorithm better than O(log n)? what can be done with polylogarithmic advice? or o(n)? lower bounds on advice / trade-off The End algorithm