Searching for Shortest Path in A Large, Sparse Graph under Memory. Limitation: A Successive Mixed Bidirectional Search Method

Size: px
Start display at page:

Download "Searching for Shortest Path in A Large, Sparse Graph under Memory. Limitation: A Successive Mixed Bidirectional Search Method"

Transcription

1 Searching for Shortest Path in A Large, Sparse Graph under Memory Limitation: A Successive Mixed Bidirectional Search Method Xugang Ye 1, Anhua Lin 2, Shih-Ping Han 1 August 2007 Abstract The problem of finding a shortest path between two nodes in a directed, positively weighted graph lies at the core of network optimization. Although it has been well studied for decades, there are always new challenges arising from a variety of applications. Among those challenges, an important one is limitation on memory, which leads to the necessity of revising the existing algorithms or designing a new one. In this paper, we propose a successive mixed bidirectional search algorithm. The key idea is to apply, in a single pass of the bidirectional search, a forward Dijkstra s algorithm that stores the Closed list and a backward Dijkstra s algorithm that does not store the Closed list. Besides proving the correctness of our algorithm in terms of its completeness and optimality, we also explore possible improvement. Moreover, we compare the performance of our algorithms with that of the popular divide-and-conquer technique, either as bidirectional search or as unidirectional search, in terms of theoretical properties, memory saving, and computational efficiency. Keywords: shortest path; large, sparse graph; memory limitation; frontier search; mixed bidirectional search; successive 1 Department of Applied Mathematics and Statistics, the Johns Hopkins University, Baltimore, MD, Department of Mathematical Sciences, Middle Tennessee State University, Murfreesboro, TN, 37132

2 1. Introduction The shortest path problems lie at the core of network optimization. They have never stopped drawing the attentions from applied mathematicians, operations research practitioners, and computer scientists. Although they have been extensively studied for decades, there are always new challenges arising from a variety of applications. Among those challenges, an important one is limitation on memory. This challenge leads to the necessity of revising the existing algorithms or designing a new one. In the network flow literature (e.g., [1]), most shortest path algorithms are usually classified into two groups: label setting (e.g., Dijkstra s algorithm [1, 2, 3, 4]) and label correcting (e.g., Bellman-Ford algorithm [1, 2]). Both groups assign distance labels to nodes. The difference is in the way the distance labels are updated. A label correcting algorithm is more broadly applicable to a problem setting where negative arc weights are allowed. However, in each iteration, the labels of all nodes need to be checked and updated if necessary. This requires that all nodes reside in memory during the iterations. Obviously, this algorithm will fail when the network is too large to fit in the available memory. The advantage of a label setting algorithm is that, with proper data structure and implementation, it is not necessary to maintain the whole graph in memory. It is because a label setting algorithm can proceed with local node expansion. A popular implementation of a label setting algorithm maintains an Open list that consists of the temporarily labeled nodes and a Closed list that consists of the permanently labeled nodes. Such method is often called best-first search. When a node with the smallest distance label is selected from the Open list and enters the Closed list, all its neighbors that are not on the current Closed list are detected and examined. Those that have not been 1

3 labeled will enter the Open list with new distance labels and predecessors established, while the nodes that are on current Open list will get their distance labels and predecessors updated if necessary. The local node expansion also renders a label setting algorithm the capability of handling an implicit graph that is defined by a starting node and a successor/predecessor function. Besides the label setting methods and the label correcting methods, there is also a type of algorithms based on the auction mechanism (see [5]). Algorithmically, this type of algorithms resembles a label setting procedure. A systematic overview of Algorithm design and analysis can be found in [4, 6]. Although the correctness and efficiency in the case of a finite graph have been well established, there has been no report on any case of a large, or infinite graph. When a graph is very large or even infinite, the most fundamental problem of finding a shortest path between two nodes in a directed, positively weighted graph can be very challenging. The primary problem of a classical best-first search algorithm is its memory requirement. Although a depth-first search algorithm can provide a solution to the memory limitation problem, its applicability is only confined to the graphs with very few cycles. Another idea is to still apply a classical best-first search algorithm and complement the fast, random-access internal memory with the low-speed, external memory (e.g., disk) when storing the Closed list. A central drawback incurred by applying this idea is the low efficiency in duplicate detection (see [7, 8, 9]). Recently, two enlightening techniques were developed by Korf et al. (see [9, 10, 11, 12]). One is called Frontier Search (FS); the other is called Divide-and-Conquer Bidirectional Frontier Search (DCBFS). The two techniques are revolutionary in solving the node-to-node shortest path problem in a graph that is locally very sparse (see section 2.1 2

4 for its definition). A FS algorithm is a best-first search algorithm that only keeps its Open list in memory. One problem of only storing the Open list is that a node that was previously removed from the Open list may enter the Open list again. This problem can be solved by additionally storing some arc information. Another problem is that a single pass of a FS algorithm can only find the length of a shortest path, while the path itself cannot be recovered due to the lack of the Closed list. This problem can be solved by a DCBFS algorithm. Due to the complicated structure of a DCBFS algorithm and hence the difficulty in implementation, Korf et al. also developed a special technique called Divide-and-Conquer Unidirectional Frontier Search (DCUFS) (see [9, 11]), which is much simpler to implement and has even lower memory requirement and higher computational efficiency. Our work in this paper is based on the above results. The difference is that we aim to provide an alternative technique for the shortest path construction problem. Our idea is to successively apply mixed bidirectional search other than bidirectional FS. The mixed bidirectional search consists of a forward best-first search (e.g., Dijkstra s algorithm) that stores its Closed list and a backward FS. We also use a different termination condition for one pass of the mixed bidirectional search. In consideration of the memory limitation, we force the forward best-first search to stop when the size of its Closed list reaches a predetermined threshold. The rest of this paper is organized as follows. In section 2 and section 3, we review Dijkstra s algorithm and the idea of FS, respectively. Then we describe and analyze our successive mixed bidirectional search algorithm in section 4. Section 5 shows some preliminary numerical results. Finally we summarize the paper in section 6. 3

5 2. Problem Statement and Dijkstra s Algorithm 2.1 Problem Statement We consider a directed, positively weighted graph denoted as D = (s, t, V, A, W), where s is the starting node, t is the destination node, V is the set of other nodes, A is the set of arcs, and W: A a R + represents the weight function that satisfies δ < W (u, v) < + for any (u, v) A, where δ > 0 is a positive constant. An u-v directed path is a finite sequence of nodes in V {s, t}, denoted as P: v 1 (= u) ~ v 2 ~ ~ v k (= v), such that (v i, v i+1 ) A for any 1 i < k. The length of P, denoted as L(P), is the sum of the weights of all the arcs along P. In particular, when v = u, P is a trivial path with length defined as 0. Definition A directed, positively weighted graph D = (s, t, V, A, W) is called locally finite if for each node u V {s, t}, the set N u ={v (u, v) A or (v, u) A} is finite. Furthermore, D is called locally very sparse if there exists a small positive integer, say B, such that the size of N u, denoted as N u, is bounded above by B for every u V {s, t}. In the rest of this paper, we assume the graph D = (s, t, V, A, W, B) is locally very sparse and we only consider directed path. It is easy to see that if there is at least one s-t path, then there is at least one shortest s-t path. For any two nodes u, v, we also denote dist(u, v) as the distance from u to v. If there is no u-v path, we define dist(u, v) = + ; otherwise, we define dist(u, v) to be the length of a shortest u-v path. Definition An algorithm for finding a shortest s-t path in D is called complete if it can find an 4

6 s-t path as long as there exists one in D. Definition A complete algorithm for finding a shortest s-t path in D is called optimal if it can find a shortest s-t path as long as there exists an s-t path in D. The Dijkstra s algorithm is very well known and has been extensively studied. Here we are focused on its best-first search version that can be described as the following Algorithm 1, which is a special case of the A * algorithm (see [13, 14, 15, 16]). We also list some of its useful properties that will be used in Section Dijkstra s Algorithm Notations: O: Open list. E: Closed list. d(v): distance label of the node v. pred(v): predecessor of the node v. Algorithm 1 (Dijkstra s algorithm in best-first search version) Given D = (s, t, V, A, W, B). Step 1. Set O = {s}, d(s) = 0, and E = φ. Step 2. If O = φ and t E, then stop; otherwise, continue. 5

7 Step 3. Find u = continue. arg min v O d(v). Set O = O {u} and E = E {u}. If t E, then stop; otherwise, Step 4. For each node v V {t} such that (u, v) A and v E, if v O, then set d(v) = d(u) + W(u, v), pred(v) = u, and O = O {v}; otherwise, if d(v) > d(u) + W(u, v), then set d(v) = d(u) + W(u, v) and pred(v) = u. Go to Step 2. If the algorithm terminates at its Step 2, it can be shown (see [15]) that the destination node t is unreachable from the starting node s. On the other hand, if there exists an s-t path, it is well known (see [13, 14, 15]) that Dijkstra s algorithm will terminate after finite number of iterations at Step 3 with t E and then a shortest s-t path can be recovered via the pred information. Besides the completeness and the optimality of Algorithm 1, some other simple but useful properties are listed as the following theorems. Theorem Let P: v 1 (= s) ~ v 2 ~ ~ v k (= t) be a shortest s-t path. At any time when t E φ, there exists an index i such that 1 i < k, v h E for any 1 h i, and v i+1 O. Moreover, d(v h ) = dist(s, v h ) = L(P(s, v h )) for any 1 h i+1, where P(s, v h ) denotes the subpath of P from s to v h. 6

8 Theorem At any time when E φ and O φ, for any u E and v O, dist(s, u) = d(u) dist(s, v) d(v). 3. Frontier Search and Divide-and-Conquer Technique 3.1. Frontier Search Essentially, the idea of FS is to reduce the memory requirement by not storing the Closed list. In this section, we build a FS version of Algorithm 1 based on this idea and call this variant Algorithm 2. The basic notations O, d(v), and pred(v) have the same meanings as in Algorithm 1. Although the Closed list is not stored, we still use E to denote the Closed list for theoretical convenience. The new notations include: I t : indicator for finding the target t. I t = 0 no s-t path has been found so far; I t = 1 an s-t path is found. F(x, (y, x)): marker of the arc (y, x), where x O. F(x, (y, x)) = 0 (default value) (y, x) has not been used; F(x, (y, x)) = 1 (y, x) has been used. F(x, (x, y)): marker of the arc (x, y), where x O. F(x, (x, y)) = 0 (default value) (x, y) has not been used; F(x, (x, y)) = 1 (x, y) has been used. Algorithm 2 (An FS version of Algorithm 1) Given D = (s, t, V, A, W, B). Step 1. Set O = {s}, d(s) = 0 and I t = 0. Step 2. If {v v O and d(v) < + } = φ and I t = 0, then stop; otherwise, continue. 7

9 Step 3. Find u = arg min v O d(v). Set O = O {u}. If u = t, then stop; otherwise, continue. Step 4. For each node v V {s, t} such that (v, u) A and F(u, (v, u)) = 0, if v O, then set d(v) = + and O = O {v}. Step 5. For each node v V {s, t} such that (u, v) A and F(u, (u, v)) = 0, if v O, then set d(v) = d(u) + W(u, v), pred(v) = u, and O = O {v}; otherwise, if d(v) > d(u) + W(u, v), then set d(v) = d(u) + W(u, v) and pred(v) = u. If t O and d(t) <+, then set I t = 1. Step 6. For each node v O such that (u, v) A, set F(v, (u, v)) = 1. For each node v O such that (v, u) A, set F(v, (v, u)) = 1. Remove u from memory. Go to Step 2. Compared with Algorithm 1, in Algorithm 2, an indicator I t is created for searching the target t. In fact, the termination condition in Step 2 of Algorithm 2 is equivalent to that in Step 2 of Algorithm 1. This is due to the simple fact that t will never enter O if t is unreachable from s. The more important newly created notations are the F labels. The F labels act in this way: if a node has previously been 8

10 selected to leave O, then it will not return to O again, i.e. if a node has previously entered E, then it will remain to stay in E (note that E is a virtual set here in Algorithm 2). A natural question can be raised on the memory requirement for storing the F labels. The ingenious idea of Korf et al. is that once a node u is removed from the memory, so do all the labels in the forms of F(u, (v, u)) and F(u, (u, v)), where v O. Hence, the storage of the F labels is not monotonically increasing. This is essentially different from the storage of the Closed list E. According to the results of Korf et al. in [9], when the quantity B is pretty small, compared with the Closed list E, the Open list O is only a minor. Korf et al. proved two fundamental theorems of FS in [9]. The two theorems form the theoretical foundation for developing more advanced algorithms. Basically, the two theorems disclose some equivalence relation between a best-first search algorithm and its FS version. We state the two theorems as the following Theorem and Theorem Theorem If a node u is selected in Step 3 of Algorithm 2, after u enters E in Step 6, it will never return to O. That is: a FS algorithm never reopens a node that has been closed. Theorem With the same tie-breaking rule, suppose both Algorithm 1 and Algorithm 2 run on the same graph D = (s, t, V, A, W, B). Let E 1 represent the Closed list of Algorithm 1. Arbitrarily select a time when E 1 φ, suppose for k = 1, 2,, E 1, 1 u k leaves O with the d label d 1 1 ( ) and the u k predecessor pred 1 1 ( ) during the kth iteration of Algorithm 1. Let E 2 represent the Closed list of u k 9

11 Algorithm 2. Arbitrarily select a time when E 2 φ, suppose for k = 1, 2,, E 2, 2 u k leaves O with the d label d 2 2 ( ) and the predecessor pred 2 2 ( ) during the kth iteration of Algorithm 2. Suppose u k u k pred 1 (s) = pred (s) = s. Then =, d 1 1 ( ) = d 2 2 ( ), and pred 1 1 ( ) = pred 2 2 ( ) for any k = 1, u k u k u k u k u k u k 2,, min ( E 1, E 2 ). In short, during the same iteration, the two algorithms select the same node with the same d label and the same predecessor Divide-and-Conquer Technique The divide-and-conquer technique can be either bidirectional (e.g., DCBFS) or unidirectional (e.g., DCUFS). A DCBFS algorithm combines FS with bidirectional search. For some representative articles on bidirectional search, see [17, 18, 19, 20]. We here focus on the bidirectional searches that are based on the Dijkstra s algorithm since the Dijkstra s algorithm does not require a heuristic. The basic idea of DCBFS is to initially applies bidirectional FS to find intermediate targets. More concretely, the bidirectional FS can consist of a forward version of Algorithm 2 that starts from s and a backward version of Algorithm 2 that starts from t. In a typical DCBFS algorithm, the two fronts proceed alternately. Once the two fronts (i.e. the two Open lists) meet at a common node, say v( s, t), then an s-t path has been found. Suppose d s (v) represents the distance label of v in the forward search and d t (v) represents the counterpart in the backward one, then d s (v) + d t (v) equals the length of the s-t path found. Of course, this quantity is not necessarily the global minimum. The idea of Korf et al. is to let the two searches continue and record the quantity c as the length of the shortest s-t path found so far. The one pass termination condition for the bidirectional FS they used is c min d s ( x) + s x O 10

12 min d t t y O ( y), where O s denotes the Open list of the forward search and O t denotes the Open list of the backward one. When such condition is satisfied, the quantity c reaches the global minimum and the associated common node, say u, lies on a shortest s-t path. The node u divides the original problem into two smaller ones: finding the shortest path from s to u and from u to t upon which the DCBFS will be recursively applied. Note here that for the two subproblems, the efforts of the FS that starts from u in one problem can be shared by the other, hence, the unnecessary duplicate efforts can be avoided. The DCBFS algorithm can go on and on until the scale of any sub-problem allows running Algorithm 1. Korf et al. pointed out several drawbacks of their DCBFS algorithm in [9, 11]. Besides their remarks, we also have two comments. One is that for the bidirectional FS, the quantity c may reach the global minimum much earlier than this event is detected. The other is that there are considerably many nodes that are visited multiple times; to reduce the repeated node expansions implies to complicate the structure of the algorithm more. The DCUFS algorithm Korf et al. proposed in [9, 11] is structurally simpler and computationally more efficient. This algorithm relies on some midlines in the problem space. Those midlines play a similar role as that of the backward FS s. In general, however, to identify those midlines is still a difficult job. 4. Our Method 4.1. Mixed Bidirectional Search In this section, we introduce our mixed bidirectional search method described as Algorithm 3. It 11

13 combines Algorithm 1 and Algorithm 2. Given a starting node s and a destination node t, our goal is to find a nontrivial path P: v 1 (= s) ~ v 2 ~ ~ v k ( s) such that P is part of a shortest s-t path. More specifically, a forward version of Algorithm 1 starts from s and proceeds as long as the allocated memory allows; a backward version of Algorithm 2 starts from t and proceeds to meet the forward search. The termination condition for one pass mixed bidirectional search is that the backward search first selects a node that has been closed by the forward one. When that happens, it can be shown that part of a shortest s-t path will be found. We list Algorithm 3 below. Notations: O s : Open list of the forward search. E s : Closed list of the forward search. d s (v): distance label of the node v in the forward search. pred s (v): predecessor of the node v in the forward search. O t : Open list of the backward search. d t (v): distance label of the node v in the backward search. I s : indicator of the backward search for finding s. l E : the limit on the storage of the Closed list of the forward search. F t : the F label of the backward search. E t : Closed list of the backward search, this is a virtual set that we still keep for theoretical convenience and is not really stored in memory. pred t (s): predecessor of s in the backward FS when s is reached. 12

14 Algorithm 3 ( Mixed bidirectional search). Given D = (s, t, V, A, W, B). Step 1. Set E s = φ, O s = {s} and d s (s) = 0. Step 2. Set O t = {t}, d t (t) = 0, I s = 0, (and virtually set E t = φ). Step 3. If O s = φ and t E s, then return an empty path and stop; otherwise, go to Step 5. Step 4. If {v v O t and d t (v) < + } = φ and I s = 0, then return an empty path and stop; otherwise, continue. Step 5. If E s = φ, choose forward search and go to Step 7; otherwise use any heuristic to choose either forward search (go to Step 6) or backward search (go to Step 9). Step 6. Check the size of E s. If E s > l E, then go to Step 9; otherwise, continue. Step 7. Find u = arg min d s (v). Set O s = O s {u} and E s = E s {u}. If t E s, then use E s to recover a s v O shortest s-t path and return it as P, stop; otherwise, continue. Step 8. For each node v V {t} such that (u, v) A and v E s, if v O s, then set d s (v) = d s (u) + W(u, v), pred s (v) = u, and O s = O s {v}; otherwise, if d s (v) > d s (u) + W(u, v), then set d s (v) = d s (u) + W(u, v) and pred s (v) = u. Go to Step 3. Step 9. Find u = arg min d t (v). If u E s, then go to Step 13; otherwise, set O t = O t {u}, (and t v O 13

15 virtually set E t = E t {u}), continue. Step 10. For each node v V {s, t} such that (u, v) A and F t (u, (u, v)) = 0, if v O t, then set d t (v) = + and O t = O t {v}. Step 11. For each node v V {s, t} such that (v, u) A and F t (u, (v, u)) = 0, if v O t, then set d t (v) = d t (u) + W(v, u) and O t = O t {v}; if v = s, then set pred t (s) = u; otherwise, if d t (v) > d t (u) + W(v, u), then set d t (v) = d t (u) + W(v, u), if v = s, then pred t (s) = u. if s O t and d t (s) <+, then set I s = 1. Step 12. For each node v O t such that (v, u) A, set F t (v, (v, u)) = 1. For each node v O t such that (u, v) A, set F t (v, (u, v)) = 1. Remove u from memory. Go to Step 4. Step 13. Find u * = arg min (d s (v) + d t (v)), if u * = s is the unique minimizer, return s ~ pred t (s) as P, s t v E O stop; otherwise, pick u * s and use E s to recover a shortest s-u * path and return it as P, stop. 14

16 Now we show that Algorithm 3 is able to find at least a partial shortest s-t path. Theorem If there exists an s-t path in D, then Algorithm 3 must be able to terminate within finite steps. Upon termination, it will return a path P, which is a part of a shortest s-t path and L(P) >δ. Proof. Since Algorithm 1 is both complete and optimal, it will eventually close t if the inequality of E s > l E is never met. Similarly, because Algorithm 2 is essentially a backward version of Algorithm 1 according to Theorem and Theorem 3.1.2, it is also both complete and optimal, hence it will eventually close s E s if the algorithm does not terminate. Therefore within finite steps, Algorithm 3 either terminates with t E s at Step 7 and returns a shortest s-t path P, or it will find u = arg min d t (v) t v O E s at Step 9 and then jumps to Step 13. In the first scenario, it s done. Now we consider the second scenario. Because u E s O t, we have that u * = arg min (d s (v) + d t (v)) exists but it may not be unique. s t v E O First we show that if u * is any minimizer, then d s (u * ) + d t (u * ) = dist(s, t) and u * lies on a shortest s-t path. Let Q: v 1 (= s) ~ v 2 ~ ~ v k (= t) be any shortest s-t path. By Theorem 2.2.1, there exists an index i such that 1 i < k, v h E s for any 1 h i, v i+1 O s, and d s (v h ) = dist(s, v h ) = L(Q(s, v h )) for any 1 h i+1, where Q(s, v h ) denotes the subpath of Q from s to v h. Similarly, there exists an index j such that 1 < j k, v h E t for any j h k, v j-1 O t, and d t (v h ) = dist(v h, t) = L(Q(v h, t)) for any j 1 h k, where Q(v h, t) denotes the subpath of Q from v h to t. If j 1 i, then v j-1 E s O t, hence d s (u * ) + d t (u * ) d s (v j-1 ) + d t (v j-1 ) = L(Q) = dist(s, t). Now suppose i+1 j 1. Since u E s and v i+1 O s, by Theorem 2.2.2, we have d s (u) d s (v i+1 ). Likewise, because v j-1 O t and u is selected from O t in Step 9, we have d t (u) d t (v j-1 ). Hence d s (u * ) + d t (u * ) d s (u) + d t (u) d s (v i+1 ) + d t (v j-1 ) L(Q) = dist(s, t). Note 15

17 that d s (u * ) represents the length of an s-u * path and d t (u * ) represents the length of an u * -t path. Denote P 1 and P 2 as the two paths respectively. Then by dist(s, t) L(P 1 ) + L(P 2 ) = d s (u * ) + d t (u * ) dist(s, t), we have L(P 1 ) + L(P 2 ) = dist(s, t), hence the concatenation of P 1 and P 2, denoted as P 1 P 2, yields a shortest s-t path that passes u *. Finally we show that the path P returned by Algorithm 3 is a part of a shortest s-t path and L(P) >δ. In fact, if u * s, then P = P 1 and obviously L(P 1 ) >δ. If u * = s is the unique minimizer, then P = s ~ pred t (s). Note that W(s, pred t (s)) + d t (pred t (s)) = dist(s, t), hence P = s ~ pred t (s) is part of a shortest s-t path and clearly L(P) = W(s, pred t (s)) >δ Successive Mixed Bidirectional Search Theorem guarantees that Algorithm 3 can produce at least a partial shortest s-t path. To find an entire shortest s-t path, a very natural idea is to run Algorithm 3 successively with the same destination node and new stating node in each new pass. Based on this idea, a successive mixed bidirectional search algorithm can be proposed as following Algorithm 4. There is no new notation. The corresponding analysis shows that it is both complete and optimal. Algorithm 4. (A successive mixed bidirectional search algorithm) Given D = (s, t, V, A, W, B) and l E >> 1. Step 1. Set k =1, s k = s, and P = φ. Step 2. Run Algorithm 3 with s k as the starting node and t as the destination node. In Step 5 of Algorithm 3, always take the forward search as the priority. Let P k be the path returned by 16

18 Algorithm 3. If P k = φ, then return an empty path and stop; If P k is a nontrivial path from s k to another node, say u * s, then set P = P P k ; If u * = t, then return P, stop. Remove E s, O s, and O t from memory. Step 3. Set k = k +1. s k = u *. Go to Step2. Theorem Algorithm 4 is both complete and optimal, i.e. if there exists an s-t path in D, then Algorithm 4 will return a shortest s-t path after finite number of iterations. Proof. Since there is an s-t path, we have dist(s, t) < +. Let P k be the path returned by the k-th iteration of Algorithm 4 with starting node s k and ending node s k+1. Note that L(P k ) >δ. Note also that L(P k ) = dist(s k, t) dist(s k+1, t). Hence we have kδ < i = L 1 k k ( Pi ) = = dist( s i i, t) dist( si+ t 1 1, )) ( = dist(s, t) dist(s k+1, t) dist(s, t). This implies that k is bounded from above by dist(s, t)/δ. Therefore, Algorithm 4 must terminate after finite number of iterations, i.e. there exists a finite integer K such that s K+1 = t. The path P returned by Algorithm 4 equals P 1 P K. Obviously, P is an s-t path and K i = 1 L(P) = L( P ) = dist(s, t) dist(sk+1, t) = dist(s, t), i.e. P is actually a shortest s-t path. i 4.3. Acceleration Just like the DCBFS algorithm mentioned in section 3.2, Algorithm 4 also has the problem of repeated node expansions. Both the forward searches and the backward searches contain repeated node expansions. If the size of the graph D is very large and the destination node t is far away from 17

19 the starting node s, then the search scale of the backward ones will be overwhelming. Fortunately, the structure of Algorithm 4 facilitates the adjustments that lead to essential reduction of the efforts of the backward searches. Suppose there exists an s-t path in D. We now explore a way of improving the computational efficiency of Algorithm 4. The idea is to initially apply a full backward FS as stated as Algorithm 2, which, by its completeness, must be able to terminate with s selected at its Step 3. During the lifetime of the full backward FS, we can strategically save some intermediate fronts into the external storage device (e.g., hard drive). After the full backward FS completes, we begin a forward search as stated as Algorithm 1 and load into memory the second last front left by the initial full backward FS in the external storage device. The first forward search proceeds until its Open list shares the first common node with the loaded front. If the allocated memory for storing the Closed list of the forward search is used up before this happens, we then apply the same backward FS to move the loaded front forward. That is: to start the backward FS from the loaded front other than the destination node t. Obviously, the forward front must be able to meet the backward front. Upon this happening, we continue the backward search until it first selects a node that has been closed by the forward search. This is exactly the one pass termination condition of Algorithm 3. At this moment, we identify the special node, say u *, that resides on a shortest s-t path and fetch the partial solution path from s to u *. Once this is done, we can store the first partial solution path and remove the current Closed list and the Open list of the forward search as well as the current backward front from memory. The immediately following job is to start the second forward search from u * and load into memory the third last front the initial full backward FS left in the external storage device. Then the like procedure follows. 18

20 By remembering some intermediate stages of the initial full backward FS, the method we proposed above certainly reduces many repeated node expansions. But the question is how to record these intermediate fronts. Different heuristics may be applied here. For example, one heuristic is to monitor the smallest distance label min t v O d t ( v) of the current backward front O t and record O t if min t v O d t ( v) has increased certain quantity. The increment can be determined through varied ways. If the increment is small, then the number of the backward fronts to be saved will be large; otherwise there are much fewer backward fronts to be saved, but there exists the risk that two consecutive fronts may be too far away. If there is a rough estimate of the distance between s and t, then more reasonable increment can be derived. Note that the use of the external storage only reduces the repeated node expansions in the backward searches of Algorithm 4. It does not bring essential changes to the structure of Algorithm 4. In this sense, we can call the method the accelerated Algorithm 4. Another remark is that the use of the external storage does not incur the issue of duplicate detection since the purpose of the usage is not to complement the limited memory with the much larger external storage for running standard best-first search. 5. Numerical Experiments In this section, we report the results of some preliminary numerical tests. In order to have a good visualization effect, we use a two dimensional square grid to generate the test graph. The test graph is generated by applying the diamond square algorithm (see [21]). It can be called a fractally generated 19

21 random terrain. Figure 5.1 gives a local view and a global view of the test graph. The local view shows that a node v ij can have up to eight neighbors v i-1, j-1, v i-1, j, v i-1, j+1, v i, j-1, v i, j+1, v i+1, j-1, v i+1, j, and v i+1, j+1. Note that this undirected graph can be treated as a directed graph since each edge can be treated as two arcs with same ending nodes and opposite directions. If a node is forbidden, then any edge incident to it will not exist. In the global view, the black area represents the forbidden nodes; the gray area represents the unforbidden nodes. The problem is to find a shortest path from the lower-left hand corner to the upper-right hand corner. For convenience, the scale of the grid map we use is , and the size of each square unit is δ = 1.0. δ v i+1, j-1 v i+1, j v i+1, j+1 v i, j-1 v ij v i, j+1 v i-1, j-1 v i-1, j v i-1, j+1 Figure 5.1. The test graph in local view (left) and global view (right) Our aim is to compare the performance of Algorithm 4, the accelerated Algorithm 4, a typical DCBFS algorithm introduced in section 3.2, and a DCUFS algorithm Korf et al. proposed in [9, 11]. We mainly consider two aspects of performance: the requirement for memory and the computational efficiency, which will be measured by the maximum number of nodes stored and the CPU time, 20

22 60 Sequence of runing time Time (Sec.) Iteration Figure 5.2. Visualization of a test on Algorithm 4 (left above: the first partial solution path; right above: the third partial solution path; left below: the entire solution path; right below: the CPU time for finding each partial solution path) respectively. To simulate the memory limitation, we simply specify a quantity T as the limit on the number of nodes to be stored. We also specify the quantity l E as appeared in Algorithm 3. The reason that we simulate the memory limitation other than dealing with the real memory limit of a computer is to facilitate the acquisition of the numerical results. It usually takes a long time to solve a problem that 21

23 60 Sequence of runing time Time (Sec.) Iteration Figure 5.3. Visualization of a test on the accelerated Algorithm 4 (left: the effective backward fronts and the entire solution path; right: the CPU time for the intitial full backward FS and for finding each partial solution path) is beyond a common capacity of memory, e.g., one gigabyte or two gigabytes. Also, to simulate the memory limitation does not change the essence of the comparison. In all the tests, we let l E = 3000 and T = All the four algorithms are coded with Matlab 7.1 and the programs are executed in a PC with Intel dual core CPU T2050 at 1.60 GHz and 1.0 G RAM. We visualize some testing results of Algorithm 4 and its accelerated version by Figures 5.2 and 5.3. The two upper subfigures of Figure 5.2 capture two moments of rendezvous. Each subfigure vividly demonstrates that a left downward white frontline (in white) contacts an area (also in white) centered at a starting position. The white dots in the lower left subfigure of Figure 5.2 represent the intermediate targets. The white curve that passes all the white dots represents a solution path determined by Algorithm 4. The lower right subfigure of Figure 5.2 displays the CPU time of each mixed bidirectional search. It demonstrates well that the closer the final destination, the smaller the scale of the subproblem. The left subfigure of Figure

24 displays all the effective backward fronts (in white) and the solution path determined by the accelerated Algorithm 4. An effective backward front is the one that finally meets its forward counterpart upon the satisfaction of the one pass termination condition of the mixed bidirectional search stated as Algorithm 3. From the right subfigure of Figure 5.3, we can see that except for the initial full backward FS, which takes long time, all the other searches that build the partial solution paths take much less time. We summarize the memory requirement, the computational efficiency, and the computational effectiveness (measured by the length of the solution path) in the tests of four algorithms in the following Table 5.4. We also list the performance of Algorithm 1 as a reference. Table 5.4. Performance summary of five algorithms Max. num. of nodes stored Algorithm 1 Algorithm 4 Accelerated Algorithm 4 DCBFS DCUFS 39,481 3,617 3,628 3,385 3,368 CPU time (sec.) Length of solution path From the Table 5.4, we can see that the memory requirement of Algorithm 1 is more than ten times of all the other algorithms. However, it is faster than other methods because it can store everything in memory thus does not involve repeated node expansion. All the other four algorithms appear to have same order of the requirement for memory. The divide-and-conquer techniques seem to be more advantageous in memory saving. From the Table 5.4, we see that the CPU time of Algorithm 4 is greater than that of the two divide-and-conquer algorithms. However, after acceleration, the CPU 23

25 time drops and the algorithm is faster than the two divide-and-conquer algorithms. This tells us that the use of the external storage for reducing the repeated node expansions is effective. 6. Summary In this paper, we presented a successive mixed bidirectional search method for finding a shortest path between two nodes in a directed, positively weighted graph that is large or infinite, but locally very sparse. The development of the method is based on some recent results of Korf et al. [9, 10, 11]. As the central subroutine, the mixed bidirectional search consists of a forward Dijkstra s search that stores its Closed list and a backward FS that only stores the current Open list. We proved its correctness and explored how to successively apply it to the problem of path construction. Algorithm 4 is a basic version of the successive mixed bidirectional search. Its accelerated version relies on heuristic and external storage. We tested our method on a fractally generated random terrain. We also compared the performance of our algorithms with that of two typical divide-and-conquer algorithms. Some conclusions can be drawn. Firstly, our method is an alternative to the divide-and-conquer technique. If we emphasize more on the issue of memory saving and want to attack extremely large problems, then the divide-and-conquer technique is probably a better option. On the other hand, if we have considerably large memory and are more focused on the computational efficiency, then our method is more advantageous. Secondly, our algorithm has a simpler structure than a divide-and-conquer algorithm. 24

26 Note that, in this paper, all the unidirectional searches we focused on are based on the Dijkstra s algorithm in its best-first search version. It is very natural to consider extending our study to the A * algorithm since the frontier version of A * has also been established (see [9]). Thus as future research we will investigate the possibility of designing a mixed bidirectional A * algorithm and then consider how to successively apply it. Acknowledgements The authors of this paper thank the Charles Counselman Fellowship and the Donald Fink Fund as the partial support of this work. The authors also thank Professors Donniell E. Fishkind, Edward R. Scheinerman, and Daniel Q. Naiman for their comments, suggestions, and helps. References [1] R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, Network Flows: Theory, Algorithms, and Applications, Prentice Hall, Englewood Cliffs, NJ, [2] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to Algorithms, Second Edition, MIT Press and McGraw-Hill, [3] M. H. Xua, Y. Q. Liua, Q. L. Huanga, Y. X. Zhanga and G.. F. Luan, An improved Dijkstra's shortest path algorithm for sparse network, Applied Mathematics and Computation, 185, , [4] D. P. Bertsekas, Linear Network Optimization: Algorithms and Codes, MIT Press, Cambridge, MA, [5] A. E. Roth (Author) and M. A. Sotomayor, Two-Sided Matching: A Study in Game-Theoretic Modeling and Analysis, Cambridge University Press, Reprint edition, Cambridge,

27 [6] D. P. Bertsekas, Auction Algorithms for Network Flow Problems: A Tutorial Introduction, Computational Optimization and Applications, 1, 7-66, [7] R. E. Korf, Delayed duplicate detection: Extended abstract. In Proceedings of the 18th International Joint Conference on Artificial Intelligence (IJCAI-03) (Acapulco, Mexico) [8] R. E. Korf, Best-first frontier search with delayed duplicate detection. In Proceedings of the 19th National Conference on Artificial Intelligence (AAAI-2004) (San Jose, CA) , [9] R. E. Korf and W. Zhang, Frontier Search, Journal of the Association for Computing Machinery, 52 (5), , [10] R. E. Korf, Divide-and-Conquer Bidirectional Search: First Results, In Proceedings of the 16th International Joint Conference on Artificial Intelligence (IJCAI-99) (Stockholm, Sweden), , [11] R. E. Korf and W. Zhang, Divide-and-Conquer Frontier Search Applied to Optimal Sequence Alignment, In Proceedings of the 17th National Conference on Artificial Intelligence (AAAI-00) (Austin, TX), , [12] L. Mandow, J. L. Perez de la Cruz, A Multiobjective Frontier Search Algorithm, In Proceedings of 2007 International Joint Conference on Artificial Intelligence, [13] P. E. Hart, N. J. Nilsson, and B. Rapheal. A formal basis for the heuristic determination of minimum cost paths, IEEE Transactions of System Sciences and Cybernetics. SSC-4, 2 (July), , [14] N. J. Nilsson, Principles of Artificial Intelligence, Morgan Kaufmann, San Mateo, California [15] J. Pearl, Heuristics: Intelligent Search Strategies for Computer Problem Solving, Addison-Wesley, [16] S. J. Russell and P. Norvig, Artificial Intelligence: A Modern Approach, Prentice Hall, Englewood Cliffs, NJ, [17] I. Pohl, Bidirectional Search, in Machine Intelligence, vol. 6, Eds. Meltzer and Michie, Edinburgh University 26

28 Press, , [18] D. E. Champeaux and L. Sint, An improved Bidirectional Heuristic Search Algorithm. Journal of the Association for Computing Machinery, 24 (2), , [19] D. E. Champeaux, Bidirectional Heuristic Search Again. Journal of the Association for Computing Machinery, 30 (1), 22-32, [20] H. Kaindl and G. Kainz, Bidirectional Heuristic Search Reconsidered. Journal of Artificial Intelligent Research, 7, , [21] Miller and S. P. Gavin, The Definition and Rendering of Terrain Maps, Computer Graphics, 20 (4), 9-48,

29 Authors Biographies Mr. Xugang Ye is a Ph.D Candidate in Department of Applied Mathematics and Statistics, the Johns Hopkins University. His Research interests include the theories and practices of optimization algorithms. His current focus is on Network Optimization and Stochastic Optimization. Dr. Anhua Lin is an assistant professor in Department of Mathematical Sciences, the Middle Tennessee State University. He received his Ph.D degree in Mathematical Sciences from the Johns Hopkins University. His research interests include Linear Programming and Nonlinear Programming. Dr. Shih-Ping Han is a professor in Department of Applied Mathematics and Statistics, the Johns Hopkins University. He received his Ph.D degree in Computer Sciences from the University of Wisconsin at Madison. He had been an assistant professor of computer sciences in Cornell University, a visiting scholar in Cambridge University, and a professor of mathematics in the University of Illinois at Urban Champaign. His research interests include Continuous Nonlinear Programming.

Searching for Shortest Path in A Large, Sparse Graph under Memory Limitation: A Successive Mixed Bidirectional Search Method

Searching for Shortest Path in A Large, Sparse Graph under Memory Limitation: A Successive Mixed Bidirectional Search Method Searching for Shortest Path in A Large, Sparse Graph under Memory Limitation: A Successive Mixed Bidirectional Search Method Xugang Ye Department of Applied Mathematics and Statistics, The Johns Hopkins

More information

Shortest Path Algorithm

Shortest Path Algorithm Shortest Path Algorithm Shivani Sanan* 1, Leena jain 2, Bharti Kappor 3 *1 Assistant Professor, Faculty of Mathematics, Department of Applied Sciences 2 Associate Professor & Head- MCA 3 Assistant Professor,

More information

Distributed minimum spanning tree problem

Distributed minimum spanning tree problem Distributed minimum spanning tree problem Juho-Kustaa Kangas 24th November 2012 Abstract Given a connected weighted undirected graph, the minimum spanning tree problem asks for a spanning subtree with

More information

1 Dijkstra s Algorithm

1 Dijkstra s Algorithm Lecture 11 Dijkstra s Algorithm Scribes: Himanshu Bhandoh (2015), Virginia Williams, and Date: November 1, 2017 Anthony Kim (2016), G. Valiant (2017), M. Wootters (2017) (Adapted from Virginia Williams

More information

Bidirectional search and Goal-directed Dijkstra

Bidirectional search and Goal-directed Dijkstra Computing the shortest path Bidirectional search and Goal-directed Dijkstra Alexander Kozyntsev October 18, 2010 Abstract We study the problem of finding a shortest path between two vertices in a directed

More information

Network Routing Protocol using Genetic Algorithms

Network Routing Protocol using Genetic Algorithms International Journal of Electrical & Computer Sciences IJECS-IJENS Vol:0 No:02 40 Network Routing Protocol using Genetic Algorithms Gihan Nagib and Wahied G. Ali Abstract This paper aims to develop a

More information

Single Source Shortest Path

Single Source Shortest Path Single Source Shortest Path A directed graph G = (V, E) and a pair of nodes s, d is given. The edges have a real-valued weight W i. This time we are looking for the weight and the shortest path from s

More information

Common Misconceptions Concerning Heuristic Search

Common Misconceptions Concerning Heuristic Search Common Misconceptions Concerning Heuristic Search Robert C. Holte Computing Science Department, University of Alberta Edmonton, Canada T6G 2E8 (holte@cs.ualberta.ca Abstract This paper examines the following

More information

A Comparative study on Algorithms for Shortest-Route Problem and Some Extensions

A Comparative study on Algorithms for Shortest-Route Problem and Some Extensions International Journal of Basic & Applied Sciences IJBAS-IJENS Vol: No: 0 A Comparative study on Algorithms for Shortest-Route Problem and Some Extensions Sohana Jahan, Md. Sazib Hasan Abstract-- The shortest-route

More information

Basics of Graph Theory

Basics of Graph Theory Basics of Graph Theory 1 Basic notions A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Simple graphs have their

More information

The Cheapest Way to Obtain Solution by Graph-Search Algorithms

The Cheapest Way to Obtain Solution by Graph-Search Algorithms Acta Polytechnica Hungarica Vol. 14, No. 6, 2017 The Cheapest Way to Obtain Solution by Graph-Search Algorithms Benedek Nagy Eastern Mediterranean University, Faculty of Arts and Sciences, Department Mathematics,

More information

Algorithms for Data Science

Algorithms for Data Science Algorithms for Data Science CSOR W4246 Eleni Drinea Computer Science Department Columbia University Thursday, October 1, 2015 Outline 1 Recap 2 Shortest paths in graphs with non-negative edge weights (Dijkstra

More information

Application of Bounded Variable Simplex Algorithm in Solving Maximal Flow Model

Application of Bounded Variable Simplex Algorithm in Solving Maximal Flow Model Dhaka Univ. J. Sci. (): 9-, 3 (January) Application of Bounded Variable Simplex Algorithm in Solving Maximal Flow Model Sohana Jahan, Marzia Yesmin and Fatima Tuj Jahra Department of Mathematics,University

More information

Description of The Algorithm

Description of The Algorithm Description of The Algorithm Dijkstra s algorithm works by solving the sub-problem k, which computes the shortest path from the source to vertices among the k closest vertices to the source. For the dijkstra

More information

An Improved Upper Bound for the Sum-free Subset Constant

An Improved Upper Bound for the Sum-free Subset Constant 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 13 (2010), Article 10.8.3 An Improved Upper Bound for the Sum-free Subset Constant Mark Lewko Department of Mathematics University of Texas at Austin

More information

1 More on the Bellman-Ford Algorithm

1 More on the Bellman-Ford Algorithm CS161 Lecture 12 Shortest Path and Dynamic Programming Algorithms Scribe by: Eric Huang (2015), Anthony Kim (2016), M. Wootters (2017) Date: May 15, 2017 1 More on the Bellman-Ford Algorithm We didn t

More information

On the Computational Behavior of a Dual Network Exterior Point Simplex Algorithm for the Minimum Cost Network Flow Problem

On the Computational Behavior of a Dual Network Exterior Point Simplex Algorithm for the Minimum Cost Network Flow Problem On the Computational Behavior of a Dual Network Exterior Point Simplex Algorithm for the Minimum Cost Network Flow Problem George Geranis, Konstantinos Paparrizos, Angelo Sifaleras Department of Applied

More information

A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY

A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY KARL L. STRATOS Abstract. The conventional method of describing a graph as a pair (V, E), where V and E repectively denote the sets of vertices and edges,

More information

EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling

EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM EXERCISES Prepared by Natashia Boland 1 and Irina Dumitrescu 2 1 Applications and Modelling 1.1

More information

From: AAAI Technical Report SS Compilation copyright 1999, AAAI (www.aaai.org). All rights reserved.

From: AAAI Technical Report SS Compilation copyright 1999, AAAI (www.aaai.org). All rights reserved. From: AAAI Technical Report SS-99-07. Compilation copyright 1999, AAAI (www.aaai.org). All rights reserved. Divide-and-Conquer Bidirectional Search Richard E. Korf Computer Science Department University

More information

Conflict-free Real-time AGV Routing

Conflict-free Real-time AGV Routing Conflict-free Real-time AGV Routing Rolf H. Möhring, Ekkehard Köhler, Ewgenij Gawrilow, and Björn Stenzel Technische Universität Berlin, Institut für Mathematik, MA 6-1, Straße des 17. Juni 136, 1623 Berlin,

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

CS 341: Algorithms. Douglas R. Stinson. David R. Cheriton School of Computer Science University of Waterloo. February 26, 2019

CS 341: Algorithms. Douglas R. Stinson. David R. Cheriton School of Computer Science University of Waterloo. February 26, 2019 CS 341: Algorithms Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo February 26, 2019 D.R. Stinson (SCS) CS 341 February 26, 2019 1 / 296 1 Course Information 2 Introduction

More information

Homework Assignment #3 Graph

Homework Assignment #3 Graph CISC 4080 Computer Algorithms Spring, 2019 Homework Assignment #3 Graph Some of the problems are adapted from problems in the book Introduction to Algorithms by Cormen, Leiserson and Rivest, and some are

More information

TIE Graph algorithms

TIE Graph algorithms TIE-20106 1 1 Graph algorithms This chapter discusses the data structure that is a collection of points (called nodes or vertices) and connections between them (called edges or arcs) a graph. The common

More information

Algorithms for Integer Programming

Algorithms for Integer Programming Algorithms for Integer Programming Laura Galli November 9, 2016 Unlike linear programming problems, integer programming problems are very difficult to solve. In fact, no efficient general algorithm is

More information

A COMPUTATIONAL STUDY OF THE CONSTRAINED MAXIMUM FLOW PROBLEM

A COMPUTATIONAL STUDY OF THE CONSTRAINED MAXIMUM FLOW PROBLEM COMPUTTIONL STUDY OF THE CONSTRINED MXIMUM FLOW PROBLEM Cenk Çalışkan, Woodbury School of Business, Utah Valley University, 800 W. University Pkwy, Orem, UT 84058, (801) 863-6487, cenk.caliskan@uvu.edu

More information

ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES. Nikolay Kosovskiy

ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES. Nikolay Kosovskiy International Journal Information Theories and Applications, Vol. 20, Number 2, 2013 131 ALGORITHMIC DECIDABILITY OF COMPUTER PROGRAM-FUNCTIONS LANGUAGE PROPERTIES Nikolay Kosovskiy Abstract: A mathematical

More information

x ji = s i, i N, (1.1)

x ji = s i, i N, (1.1) Dual Ascent Methods. DUAL ASCENT In this chapter we focus on the minimum cost flow problem minimize subject to (i,j) A {j (i,j) A} a ij x ij x ij {j (j,i) A} (MCF) x ji = s i, i N, (.) b ij x ij c ij,

More information

3 SOLVING PROBLEMS BY SEARCHING

3 SOLVING PROBLEMS BY SEARCHING 48 3 SOLVING PROBLEMS BY SEARCHING A goal-based agent aims at solving problems by performing actions that lead to desirable states Let us first consider the uninformed situation in which the agent is not

More information

Vertex Magic Total Labelings of Complete Graphs 1

Vertex Magic Total Labelings of Complete Graphs 1 Vertex Magic Total Labelings of Complete Graphs 1 Krishnappa. H. K. and Kishore Kothapalli and V. Ch. Venkaiah Centre for Security, Theory, and Algorithmic Research International Institute of Information

More information

Real-Time Adaptive A*

Real-Time Adaptive A* Real-Time Adaptive A* Sven Koenig Computer Science Department University of Southern California Los Angeles, CA - skoenig@usc.edu Maxim Likhachev Computer Science Department Carnegie Mellon University

More information

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Greedy Algorithms (continued) The best known application where the greedy algorithm is optimal is surely

More information

arxiv: v1 [math.ho] 7 Nov 2017

arxiv: v1 [math.ho] 7 Nov 2017 An Introduction to the Discharging Method HAOZE WU Davidson College 1 Introduction arxiv:1711.03004v1 [math.ho] 7 Nov 017 The discharging method is an important proof technique in structural graph theory.

More information

3 No-Wait Job Shops with Variable Processing Times

3 No-Wait Job Shops with Variable Processing Times 3 No-Wait Job Shops with Variable Processing Times In this chapter we assume that, on top of the classical no-wait job shop setting, we are given a set of processing times for each operation. We may select

More information

Instituto Nacional de Pesquisas Espaciais - INPE/LAC Av. dos Astronautas, 1758 Jd. da Granja. CEP São José dos Campos S.P.

Instituto Nacional de Pesquisas Espaciais - INPE/LAC Av. dos Astronautas, 1758 Jd. da Granja. CEP São José dos Campos S.P. XXXIV THE MINIMIZATION OF TOOL SWITCHES PROBLEM AS A NETWORK FLOW PROBLEM WITH SIDE CONSTRAINTS Horacio Hideki Yanasse Instituto Nacional de Pesquisas Espaciais - INPE/LAC Av. dos Astronautas, 1758 Jd.

More information

Dijkstra s Shortest Path Algorithm

Dijkstra s Shortest Path Algorithm Dijkstra s Shortest Path Algorithm DPV 4.4, CLRS 24.3 Revised, October 23, 2014 Outline of this Lecture Recalling the BFS solution of the shortest path problem for unweighted (di)graphs. The shortest path

More information

Finding a -regular Supergraph of Minimum Order

Finding a -regular Supergraph of Minimum Order Finding a -regular Supergraph of Minimum Order Hans L. Bodlaender a, Richard B. Tan a,b and Jan van Leeuwen a a Department of Computer Science Utrecht University Padualaan 14, 3584 CH Utrecht The Netherlands

More information

Highway Dimension and Provably Efficient Shortest Paths Algorithms

Highway Dimension and Provably Efficient Shortest Paths Algorithms Highway Dimension and Provably Efficient Shortest Paths Algorithms Andrew V. Goldberg Microsoft Research Silicon Valley www.research.microsoft.com/ goldberg/ Joint with Ittai Abraham, Amos Fiat, and Renato

More information

Improving the Efficiency of Depth-First Search by Cycle Elimination

Improving the Efficiency of Depth-First Search by Cycle Elimination Improving the Efficiency of Depth-First Search by Cycle Elimination John F. Dillenburg and Peter C. Nelson * Department of Electrical Engineering and Computer Science (M/C 154) University of Illinois Chicago,

More information

2015, IJARCSSE All Rights Reserved Page 31

2015, IJARCSSE All Rights Reserved Page 31 Volume 5, Issue 7, July 2015 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Procedural Cognitive

More information

Project and Production Management Prof. Arun Kanda Department of Mechanical Engineering Indian Institute of Technology, Delhi

Project and Production Management Prof. Arun Kanda Department of Mechanical Engineering Indian Institute of Technology, Delhi Project and Production Management Prof. Arun Kanda Department of Mechanical Engineering Indian Institute of Technology, Delhi Lecture - 8 Consistency and Redundancy in Project networks In today s lecture

More information

Programs with infinite loops: from primitive recursive predicates to the arithmetic hierarchy

Programs with infinite loops: from primitive recursive predicates to the arithmetic hierarchy Programs with infinite loops: from primitive recursive predicates to the arithmetic hierarchy ((quite) preliminary) Armando B. Matos September 11, 2014 Abstract Infinite time Turing machines have been

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

Discrete Optimization. Lecture Notes 2

Discrete Optimization. Lecture Notes 2 Discrete Optimization. Lecture Notes 2 Disjunctive Constraints Defining variables and formulating linear constraints can be straightforward or more sophisticated, depending on the problem structure. The

More information

Diversity Coloring for Distributed Storage in Mobile Networks

Diversity Coloring for Distributed Storage in Mobile Networks Diversity Coloring for Distributed Storage in Mobile Networks Anxiao (Andrew) Jiang and Jehoshua Bruck California Institute of Technology Abstract: Storing multiple copies of files is crucial for ensuring

More information

arxiv: v3 [cs.dm] 12 Jun 2014

arxiv: v3 [cs.dm] 12 Jun 2014 On Maximum Differential Coloring of Planar Graphs M. A. Bekos 1, M. Kaufmann 1, S. Kobourov, S. Veeramoni 1 Wilhelm-Schickard-Institut für Informatik - Universität Tübingen, Germany Department of Computer

More information

Shortest-path calculation of first arrival traveltimes by expanding wavefronts

Shortest-path calculation of first arrival traveltimes by expanding wavefronts Stanford Exploration Project, Report 82, May 11, 2001, pages 1 144 Shortest-path calculation of first arrival traveltimes by expanding wavefronts Hector Urdaneta and Biondo Biondi 1 ABSTRACT A new approach

More information

arxiv: v3 [cs.ds] 18 Apr 2011

arxiv: v3 [cs.ds] 18 Apr 2011 A tight bound on the worst-case number of comparisons for Floyd s heap construction algorithm Ioannis K. Paparrizos School of Computer and Communication Sciences Ècole Polytechnique Fèdèrale de Lausanne

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the Heap-on-Top Priority Queues Boris V. Cherkassky Central Economics and Mathematics Institute Krasikova St. 32 117418, Moscow, Russia cher@cemi.msk.su Andrew V. Goldberg NEC Research Institute 4 Independence

More information

Parallel Combinatorial Search on Computer Cluster: Sam Loyd s Puzzle

Parallel Combinatorial Search on Computer Cluster: Sam Loyd s Puzzle Parallel Combinatorial Search on Computer Cluster: Sam Loyd s Puzzle Plamenka Borovska Abstract: The paper investigates the efficiency of parallel branch-and-bound search on multicomputer cluster for the

More information

Detecting negative cycles with Tarjan s breadth-first scanning algorithm

Detecting negative cycles with Tarjan s breadth-first scanning algorithm Detecting negative cycles with Tarjan s breadth-first scanning algorithm Tibor Ásványi asvanyi@inf.elte.hu ELTE Eötvös Loránd University Faculty of Informatics Budapest, Hungary Abstract The Bellman-Ford

More information

Chapter S:V. V. Formal Properties of A*

Chapter S:V. V. Formal Properties of A* Chapter S:V V. Formal Properties of A* Properties of Search Space Graphs Auxiliary Concepts Roadmap Completeness of A* Admissibility of A* Efficiency of A* Monotone Heuristic Functions S:V-1 Formal Properties

More information

A Reduction of Conway s Thrackle Conjecture

A Reduction of Conway s Thrackle Conjecture A Reduction of Conway s Thrackle Conjecture Wei Li, Karen Daniels, and Konstantin Rybnikov Department of Computer Science and Department of Mathematical Sciences University of Massachusetts, Lowell 01854

More information

Lecture 20 : Trees DRAFT

Lecture 20 : Trees DRAFT CS/Math 240: Introduction to Discrete Mathematics 4/12/2011 Lecture 20 : Trees Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we discussed graphs. Today we continue this discussion,

More information

Bidirectional A*: Comparing balanced and symmetric heuristic methods

Bidirectional A*: Comparing balanced and symmetric heuristic methods Bidirectional A*: Comparing balanced and symmetric heuristic methods Wim Pijls and Henk Post Econometric Institute Report EI 2006-41 Abstract A widely known algorithm for finding the shortest path in a

More information

6. Lecture notes on matroid intersection

6. Lecture notes on matroid intersection Massachusetts Institute of Technology 18.453: Combinatorial Optimization Michel X. Goemans May 2, 2017 6. Lecture notes on matroid intersection One nice feature about matroids is that a simple greedy algorithm

More information

Monotone Paths in Geometric Triangulations

Monotone Paths in Geometric Triangulations Monotone Paths in Geometric Triangulations Adrian Dumitrescu Ritankar Mandal Csaba D. Tóth November 19, 2017 Abstract (I) We prove that the (maximum) number of monotone paths in a geometric triangulation

More information

From Static to Dynamic Routing: Efficient Transformations of Store-and-Forward Protocols

From Static to Dynamic Routing: Efficient Transformations of Store-and-Forward Protocols SIAM Journal on Computing to appear From Static to Dynamic Routing: Efficient Transformations of StoreandForward Protocols Christian Scheideler Berthold Vöcking Abstract We investigate how static storeandforward

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Shortest Path Problem G. Guérard Department of Nouvelles Energies Ecole Supérieur d Ingénieurs Léonard de Vinci Lecture 3 GG A.I. 1/42 Outline 1 The Shortest Path Problem Introduction

More information

Reach for A : an Efficient Point-to-Point Shortest Path Algorithm

Reach for A : an Efficient Point-to-Point Shortest Path Algorithm Reach for A : an Efficient Point-to-Point Shortest Path Algorithm Andrew V. Goldberg Microsoft Research Silicon Valley www.research.microsoft.com/ goldberg/ Joint with Haim Kaplan and Renato Werneck Einstein

More information

LECTURE NOTES OF ALGORITHMS: DESIGN TECHNIQUES AND ANALYSIS

LECTURE NOTES OF ALGORITHMS: DESIGN TECHNIQUES AND ANALYSIS Department of Computer Science University of Babylon LECTURE NOTES OF ALGORITHMS: DESIGN TECHNIQUES AND ANALYSIS By Faculty of Science for Women( SCIW), University of Babylon, Iraq Samaher@uobabylon.edu.iq

More information

Analysis and Algorithms for Partial Protection in Mesh Networks

Analysis and Algorithms for Partial Protection in Mesh Networks Analysis and Algorithms for Partial Protection in Mesh Networks Greg uperman MIT LIDS Cambridge, MA 02139 gregk@mit.edu Eytan Modiano MIT LIDS Cambridge, MA 02139 modiano@mit.edu Aradhana Narula-Tam MIT

More information

A CSP Search Algorithm with Reduced Branching Factor

A CSP Search Algorithm with Reduced Branching Factor A CSP Search Algorithm with Reduced Branching Factor Igor Razgon and Amnon Meisels Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105, Israel {irazgon,am}@cs.bgu.ac.il

More information

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube Kavish Gandhi April 4, 2015 Abstract A geodesic in the hypercube is the shortest possible path between two vertices. Leader and Long

More information

A Fast Algorithm for Optimal Alignment between Similar Ordered Trees

A Fast Algorithm for Optimal Alignment between Similar Ordered Trees Fundamenta Informaticae 56 (2003) 105 120 105 IOS Press A Fast Algorithm for Optimal Alignment between Similar Ordered Trees Jesper Jansson Department of Computer Science Lund University, Box 118 SE-221

More information

Two-Levels-Greedy: a generalization of Dijkstra s shortest path algorithm

Two-Levels-Greedy: a generalization of Dijkstra s shortest path algorithm Electronic Notes in Discrete Mathematics 17 (2004) 81 86 www.elsevier.com/locate/endm Two-Levels-Greedy: a generalization of Dijkstra s shortest path algorithm Domenico Cantone 1 Simone Faro 2 Department

More information

An Eternal Domination Problem in Grids

An Eternal Domination Problem in Grids Theory and Applications of Graphs Volume Issue 1 Article 2 2017 An Eternal Domination Problem in Grids William Klostermeyer University of North Florida, klostermeyer@hotmail.com Margaret-Ellen Messinger

More information

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial. 2301-670 Graph theory 1.1 What is a graph? 1 st semester 2550 1 1.1. What is a graph? 1.1.2. Definition. A graph G is a triple (V(G), E(G), ψ G ) consisting of V(G) of vertices, a set E(G), disjoint from

More information

IMPROVEMENT OF SHORTEST-PATH ALGORITHMS USING SUBGRAPHS' HEURISTICS

IMPROVEMENT OF SHORTEST-PATH ALGORITHMS USING SUBGRAPHS' HEURISTICS IMPROVEMENT OF SHORTEST-PATH ALGORITHMS USING SUBGRAPHS' HEURISTICS 1 FAISAL KHAMAYSEH, 2 NABIL ARMAN 1 Asstt Prof., Department of Information Technology, Palestine Polytechnic University 2 Prof., Department

More information

Lecture #7. 1 Introduction. 2 Dijkstra s Correctness. COMPSCI 330: Design and Analysis of Algorithms 9/16/2014

Lecture #7. 1 Introduction. 2 Dijkstra s Correctness. COMPSCI 330: Design and Analysis of Algorithms 9/16/2014 COMPSCI 330: Design and Analysis of Algorithms 9/16/2014 Lecturer: Debmalya Panigrahi Lecture #7 Scribe: Nat Kell 1 Introduction In this lecture, we will further examine shortest path algorithms. We will

More information

CS 5540 Spring 2013 Assignment 3, v1.0 Due: Apr. 24th 11:59PM

CS 5540 Spring 2013 Assignment 3, v1.0 Due: Apr. 24th 11:59PM 1 Introduction In this programming project, we are going to do a simple image segmentation task. Given a grayscale image with a bright object against a dark background and we are going to do a binary decision

More information

TAGUCHI TECHNIQUES FOR 2 k FRACTIONAL FACTORIAL EXPERIMENTS

TAGUCHI TECHNIQUES FOR 2 k FRACTIONAL FACTORIAL EXPERIMENTS Hacettepe Journal of Mathematics and Statistics Volume 4 (200), 8 9 TAGUCHI TECHNIQUES FOR 2 k FRACTIONAL FACTORIAL EXPERIMENTS Nazan Danacıoğlu and F.Zehra Muluk Received 0: 0: 200 : Accepted 14: 06:

More information

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Henry Lin Division of Computer Science University of California, Berkeley Berkeley, CA 94720 Email: henrylin@eecs.berkeley.edu Abstract

More information

11.1 Facility Location

11.1 Facility Location CS787: Advanced Algorithms Scribe: Amanda Burton, Leah Kluegel Lecturer: Shuchi Chawla Topic: Facility Location ctd., Linear Programming Date: October 8, 2007 Today we conclude the discussion of local

More information

Minimum-Link Watchman Tours

Minimum-Link Watchman Tours Minimum-Link Watchman Tours Esther M. Arkin Joseph S. B. Mitchell Christine D. Piatko Abstract We consider the problem of computing a watchman route in a polygon with holes. We show that the problem of

More information

CS 3410 Ch 14 Graphs and Paths

CS 3410 Ch 14 Graphs and Paths CS 3410 Ch 14 Graphs and Paths Sections 14.1-14.3 Pages 527-552 Exercises 1,2,5,7-9 14.1 Definitions 1. A vertex (node) and an edge are the basic building blocks of a graph. Two vertices, (, ) may be connected

More information

The p-sized partitioning algorithm for fast computation of factorials of numbers

The p-sized partitioning algorithm for fast computation of factorials of numbers J Supercomput (2006) 38:73 82 DOI 10.1007/s11227-006-7285-5 The p-sized partitioning algorithm for fast computation of factorials of numbers Ahmet Ugur Henry Thompson C Science + Business Media, LLC 2006

More information

Paths, Flowers and Vertex Cover

Paths, Flowers and Vertex Cover Paths, Flowers and Vertex Cover Venkatesh Raman M. S. Ramanujan Saket Saurabh Abstract It is well known that in a bipartite (and more generally in a König) graph, the size of the minimum vertex cover is

More information

Winning Positions in Simplicial Nim

Winning Positions in Simplicial Nim Winning Positions in Simplicial Nim David Horrocks Department of Mathematics and Statistics University of Prince Edward Island Charlottetown, Prince Edward Island, Canada, C1A 4P3 dhorrocks@upei.ca Submitted:

More information

Simplified clustering algorithms for RFID networks

Simplified clustering algorithms for RFID networks Simplified clustering algorithms for FID networks Vinay Deolalikar, Malena Mesarina, John ecker, Salil Pradhan HP Laboratories Palo Alto HPL-2005-163 September 16, 2005* clustering, FID, sensors The problem

More information

Vertex Magic Total Labelings of Complete Graphs

Vertex Magic Total Labelings of Complete Graphs AKCE J. Graphs. Combin., 6, No. 1 (2009), pp. 143-154 Vertex Magic Total Labelings of Complete Graphs H. K. Krishnappa, Kishore Kothapalli and V. Ch. Venkaiah Center for Security, Theory, and Algorithmic

More information

A NEW SIMPLEX TYPE ALGORITHM FOR THE MINIMUM COST NETWORK FLOW PROBLEM

A NEW SIMPLEX TYPE ALGORITHM FOR THE MINIMUM COST NETWORK FLOW PROBLEM A NEW SIMPLEX TYPE ALGORITHM FOR THE MINIMUM COST NETWORK FLOW PROBLEM KARAGIANNIS PANAGIOTIS PAPARRIZOS KONSTANTINOS SAMARAS NIKOLAOS SIFALERAS ANGELO * Department of Applied Informatics, University of

More information

The 4/5 Upper Bound on the Game Total Domination Number

The 4/5 Upper Bound on the Game Total Domination Number The 4/ Upper Bound on the Game Total Domination Number Michael A. Henning a Sandi Klavžar b,c,d Douglas F. Rall e a Department of Mathematics, University of Johannesburg, South Africa mahenning@uj.ac.za

More information

Theorem 2.9: nearest addition algorithm

Theorem 2.9: nearest addition algorithm There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used

More information

Advanced Algorithms and Data Structures

Advanced Algorithms and Data Structures Advanced Algorithms and Data Structures Prof. Tapio Elomaa tapio.elomaa@tut.fi Course Prerequisites A seven credit unit course Replaced OHJ-2156 Analysis of Algorithms We take things a bit further than

More information

Representation of Finite Games as Network Congestion Games

Representation of Finite Games as Network Congestion Games Representation of Finite Games as Network Congestion Games Igal Milchtaich To cite this version: Igal Milchtaich. Representation of Finite Games as Network Congestion Games. Roberto Cominetti and Sylvain

More information

The minimum spanning tree and duality in graphs

The minimum spanning tree and duality in graphs The minimum spanning tree and duality in graphs Wim Pijls Econometric Institute Report EI 2013-14 April 19, 2013 Abstract Several algorithms for the minimum spanning tree are known. The Blue-red algorithm

More information

Interval Algorithms for Coin Flipping

Interval Algorithms for Coin Flipping IJCSNS International Journal of Computer Science and Network Security, VOL.10 No.2, February 2010 55 Interval Algorithms for Coin Flipping Sung-il Pae, Hongik University, Seoul, Korea Summary We discuss

More information

Bijective Proofs of Two Broken Circuit Theorems

Bijective Proofs of Two Broken Circuit Theorems Bijective Proofs of Two Broken Circuit Theorems Andreas Blass PENNSYLVANIA STATE UNIVERSITY UNIVERSITY PARK, PENNSYLVANIA 16802 Bruce Eli Sagan THE UNIVERSITY OF PENNSYLVANIA PHILADELPHIA, PENNSYLVANIA

More information

Automated Route Finding on Digital Terrains

Automated Route Finding on Digital Terrains Automated Route Finding on Digital Terrains D. R. Wichmann and B. C. Wünsche Graphics Group, Dept. of Computer Science, University of Auckland, Private Bag 92019, Auckland, New Zealand. daniel.wichmann@gmail.com,

More information

Table : IEEE Single Format ± a a 2 a 3 :::a 8 b b 2 b 3 :::b 23 If exponent bitstring a :::a 8 is Then numerical value represented is ( ) 2 = (

Table : IEEE Single Format ± a a 2 a 3 :::a 8 b b 2 b 3 :::b 23 If exponent bitstring a :::a 8 is Then numerical value represented is ( ) 2 = ( Floating Point Numbers in Java by Michael L. Overton Virtually all modern computers follow the IEEE 2 floating point standard in their representation of floating point numbers. The Java programming language

More information

Complexity Results on Graphs with Few Cliques

Complexity Results on Graphs with Few Cliques Discrete Mathematics and Theoretical Computer Science DMTCS vol. 9, 2007, 127 136 Complexity Results on Graphs with Few Cliques Bill Rosgen 1 and Lorna Stewart 2 1 Institute for Quantum Computing and School

More information

Notes for Lecture 24

Notes for Lecture 24 U.C. Berkeley CS170: Intro to CS Theory Handout N24 Professor Luca Trevisan December 4, 2001 Notes for Lecture 24 1 Some NP-complete Numerical Problems 1.1 Subset Sum The Subset Sum problem is defined

More information

Lecture 5: The Halting Problem. Michael Beeson

Lecture 5: The Halting Problem. Michael Beeson Lecture 5: The Halting Problem Michael Beeson Historical situation in 1930 The diagonal method appears to offer a way to extend just about any definition of computable. It appeared in the 1920s that it

More information

An Evolutionary Algorithm for the Multi-objective Shortest Path Problem

An Evolutionary Algorithm for the Multi-objective Shortest Path Problem An Evolutionary Algorithm for the Multi-objective Shortest Path Problem Fangguo He Huan Qi Qiong Fan Institute of Systems Engineering, Huazhong University of Science & Technology, Wuhan 430074, P. R. China

More information

Which n-venn diagrams can be drawn with convex k-gons?

Which n-venn diagrams can be drawn with convex k-gons? Which n-venn diagrams can be drawn with convex k-gons? Jeremy Carroll Frank Ruskey Mark Weston Abstract We establish a new lower bound for the number of sides required for the component curves of simple

More information

Shortest Path Problem

Shortest Path Problem Shortest Path Problem CLRS Chapters 24.1 3, 24.5, 25.2 Shortest path problem Shortest path problem (and variants) Properties of shortest paths Algorithmic framework Bellman-Ford algorithm Shortest paths

More information

Formal Model. Figure 1: The target concept T is a subset of the concept S = [0, 1]. The search agent needs to search S for a point in T.

Formal Model. Figure 1: The target concept T is a subset of the concept S = [0, 1]. The search agent needs to search S for a point in T. Although this paper analyzes shaping with respect to its benefits on search problems, the reader should recognize that shaping is often intimately related to reinforcement learning. The objective in reinforcement

More information