CSE 421 Algorithms Warmup Dijkstra's Algorithm

Total Page:16

File Type:pdf, Size:1020Kb

CSE 421 Algorithms Warmup Dijkstra's Algorithm Single Source Shortest Path Problem • Given a graph and a start vertex s – Determine distance of every vertex from s CSE 421 – Identify shortest paths to each vertex Algorithms • Express concisely as a “shortest paths tree” • Each vertex has a pointer to a predecessor on Richard Anderson shortest path 1 u u Dijkstra’s algorithm 1 2 3 5 s x s x 3 4 3 v v Construct Shortest Path Tree Warmup from s • If P is a shortest path from s to v, and if t is 2 d d on the path P, the segment from s to t is a a 1 5 a 4 4 shortest path between s and t 4 e e -3 c s c v -2 s t 3 3 2 s 6 g g b b •WHY? 7 3 f f Assume all edges have non-negative cost Simulate Dijkstra’s algorithm Dijkstra’s Algorithm (strarting from s) on the graph S = {}; d[s] = 0; d[v] = infinity for v != s Round Vertex sabcd While S != V Added Choose v in V-S with minimum d[v] 1 a c 1 Add v to S 1 3 2 For each w in the neighborhood of v 2 s 4 1 d[w] = min(d[w], d[v] + c(v, w)) 4 6 3 4 1 3 y b d 4 1 3 1 u 0 1 1 4 5 s x 2 2 2 2 v 2 3 z 5 Dijkstra’s Algorithm as a greedy Correctness Proof algorithm • Elements committed to the solution by • Elements in S have the correct label order of minimum distance • Key to proof: when v is added to S, it has the correct distance label. y x s u v Proof Negative Cost Edges • Let v be a vertex in V-S with minimum d[v] • Draw a small example a negative cost • Let Pv be a path of length d[v], with an edge (u,v) edge and show that Dijkstra’s algorithm • Let P be some other path to v. Suppose P first fails on this example leaves S on the edge (x, y) y –P = Psx + c(x,y) + Pyv x –Len(Psx) + c(x,y) >= d[y] –Len(Pyv) >= 0 – Len(P) >= d[y] + 0 >= d[v] s u v Compute the bottleneck shortest Bottleneck Shortest Path paths • Define the bottleneck distance for a path to be the maximum cost edge along the 6 d d a 6 5 a path 4 4 4 e e -3 c c s -2 s 3 3 2 6 g g b b u 6 5 7 4 f f s 2 5 x 3 4 v How do you adapt Dijkstra’s algorithm to handle bottleneck distances Who was Dijkstra? • Does the correctness proof still apply? • What were his major contributions? http://www.cs.utexas.edu/users/EWD/ Shortest Paths • Edsger Wybe Dijkstra was one of the most • Negative Cost Edges influential members of computing science's founding generation. Among the domains in – Dijkstra’s algorithm assumes positive cost edges which his scientific contributions are – For some applications, negative cost edges make fundamental are sense – algorithm design – Shortest path not well defined if a graph has a – programming languages negative cost cycle – program design a 6 4 -4 – operating systems 4 e – distributed processing -3 c s -2 – formal specification and verification 3 3 – design of mathematical arguments 2 6 g b f 7 4 Dijkstra’s Algorithm Negative Cost Edge Preview Implementation and Runtime • Topological Sort can be used for solving S = {}; d[s] = 0; d[v] = infinity for v != s the shortest path problem in directed While S != V acyclic graphs Choose v in V-S with minimum d[v] Add v to S • Bellman-Ford algorithm finds shortest For each w in the neighborhood of v paths in a graph with negative cost edges d[w] = min(d[w], d[v] + c(v, w)) (or reports the existence of a negative cost y cycle). u a HEAP OPERATIONS s x n Extract Mins v m Heap Updates b z Edge costs are assumed to be non-negative Compute the bottleneck shortest Bottleneck Shortest Path paths • Define the bottleneck distance for a path to be the maximum cost edge along the 6 d d a 6 5 a path 4 4 4 e e -3 c c s -2 s 3 3 2 5 g g b b u 6 5 7 7 f f s 2 5 x 3 4 v Dijkstra’s Algorithm Minimum Spanning Tree for Bottleneck Shortest Paths S = {}; d[s] = negative infinity; d[v] = infinity for v != s • Introduce Problem While S != V • Demonstrate three different greedy Choose v in V-S with minimum d[v] algorithms Add v to S For each w in the neighborhood of v • Provide proofs that the algorithms work d[w] = min(d[w], max(d[v], c(v, w))) 3 4 y u a 1 3 2 4 s 1 x 1 2 v 5 3 b 4 z Greedy Algorithms for Minimum Minimum Spanning Tree Spanning Tree • Extend a tree by including the 15 t cheapest out going 4 a 6 b c 9 14 edge 3 4 e • Add the cheapest 20 10 13 c 5 11 s 11 20 edge that joins 8 5 a 17 2 7 disjoint components g d b 8 7 • Delete the most e 22 u f 22 1 12 expensive edge that 16 does not disconnect v the graph Greedy Algorithm 1 Greedy Algorithm 2 Prim’s Algorithm Kruskal’s Algorithm • Extend a tree by including the cheapest • Add the cheapest edge that joins disjoint out going edge components 15 15 t a 6 t a 6 14 14 3 9 4 e 3 9 4 e 10 13 c 10 13 c s 11 s 11 20 5 20 5 Construct the MST 17 17 2 7 2 7 with Prim’s g Construct the MST g b 8 b 8 algorithm starting u f 22 with Kruskal’s u f 22 from vertex a 1 12 algorithm 1 12 Label the edges in 16 Label the edges in 16 order of insertion v order of insertion v Greedy Algorithm 3 Why do the greedy algorithms Reverse-Delete Algorithm work? • Delete the most expensive edge that does • For simplicity, assume all edge costs are not disconnect the graph distinct 15 • Let S be a subset of V, and suppose e = t a 6 (u, v) is the minimum cost edge of E, with 14 3 9 4 e u in S and v in V-S 10 13 c s 11 20 5 • e is in every minimum spanning tree 17 2 7 Construct the MST g b 8 with the reverse- u f 22 delete algorithm 1 12 Label the edges in 16 order of removal v Proof Optimality Proofs • Suppose T is a spanning tree that does not • Prim’s Algorithm computes a MST contain e • Add e to T, this creates a cycle • The cycle must have some edge e1 = (u1, v1) with u1 in S and v1 in V-S • Kruskal’s Algorithm computes a MST •T1 = T – {e1} + {e} is a spanning tree with lower cost • Hence, T is not a minimum spanning tree Dealing with the assumption of no Reverse-Delete Algorithm equal weight edges • Lemma: The most expensive edge on a • Force the edge weights to be distinct cycle is never in a minimum spanning tree – Add small quantities to the weights – Give a tie breaking rule for equal weight edges Dijkstra’s Algorithm Minimum Spanning Tree for Minimum Spanning Trees Undirected Graph S = {}; d[s] = 0; d[v] = infinity for v != s G=(V,E) with edge While S != V 15 weights t Choose v in V-S with minimum d[v] a 6 9 14 Add v to S 3 4 e For each w in the neighborhood of v 10 13 c s 11 d[w] = min(d[w], c(v, w)) 20 5 17 2 7 y 3 g 4 b 8 u a f 22 1 3 2 4 u 1 12 s 1 x 1 16 2 v 5 v 3 b 4 z Greedy Algorithms for Minimum Why do the greedy algorithms Spanning Tree work? •[Prim]Extend a tree by • For simplicity, assume all edge costs are including the cheapest distinct out going edge 4 b c • [Kruskal] Add the cheapest edge that joins 20 disjoint components 5 11 8 • [ReverseDelete] Delete a d the most expensive edge 7 that does not disconnect e 22 the graph e is the minimum cost edge Edge inclusion lemma between S and V-S Proof • Let S be a subset of V, and suppose e = • Suppose T is a spanning tree that does not contain e • Add e to T, this creates a cycle (u, v) is the minimum cost edge of E, with • The cycle must have some edge e1 = (u1, v1) with u1 in S u in S and v in V-S and v1 in V-S • e is in every minimum spanning tree of G – Or equivalently, if e is not in T, then T is not a SV -S minimum spanning tree e •T1 = T – {e1} + {e} is a spanning tree with lower cost • Hence, T is not a minimum spanning tree e SV -S Optimality Proofs Prim’s Algorithm • Prim’s Algorithm computes a MST S = { }; T = { }; • Kruskal’s Algorithm computes a MST while S != V choose the minimum cost edge • Show that when an edge is added to the e = (u,v), with u in S, and v in V-S MST by Prim or Kruskal, the edge is the add e to T minimum cost edge between S and V-S add v to S for some set S.
Recommended publications
  • 1 Steiner Minimal Trees
    Steiner Minimal Trees¤ Bang Ye Wu Kun-Mao Chao 1 Steiner Minimal Trees While a spanning tree spans all vertices of a given graph, a Steiner tree spans a given subset of vertices. In the Steiner minimal tree problem, the vertices are divided into two parts: terminals and nonterminal vertices. The terminals are the given vertices which must be included in the solution. The cost of a Steiner tree is de¯ned as the total edge weight. A Steiner tree may contain some nonterminal vertices to reduce the cost. Let V be a set of vertices. In general, we are given a set L ½ V of terminals and a metric de¯ning the distance between any two vertices in V . The objective is to ¯nd a connected subgraph spanning all the terminals of minimal total cost. Since the distances are all nonnegative in a metric, the solution is a tree structure. Depending on the given metric, two versions of the Steiner tree problem have been studied. ² (Graph) Steiner minimal trees (SMT): In this version, the vertex set and metric is given by a ¯nite graph. ² Euclidean Steiner minimal trees (Euclidean SMT): In this version, V is the entire Euclidean space and thus in¯nite. Usually the metric is given by the Euclidean distance 2 (L -norm). That is, for two points with coordinates (x1; y2) and (x2; y2), the distance is p 2 2 (x1 ¡ x2) + (y1 ¡ y2) : In some applications such as VLSI routing, L1-norm, also known as rectilinear distance, is used, in which the distance is de¯ned as jx1 ¡ x2j + jy1 ¡ y2j: Figure 1 illustrates a Euclidean Steiner minimal tree and a graph Steiner minimal tree.
    [Show full text]
  • ‣ Dijkstra's Algorithm ‣ Minimum Spanning Trees ‣ Prim, Kruskal, Boruvka ‣ Single-Link Clustering ‣ Min-Cost Arborescences
    4. GREEDY ALGORITHMS II ‣ Dijkstra's algorithm ‣ minimum spanning trees ‣ Prim, Kruskal, Boruvka ‣ single-link clustering ‣ min-cost arborescences Lecture slides by Kevin Wayne Copyright © 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos Last updated on Feb 18, 2013 6:08 AM 4. GREEDY ALGORITHMS II ‣ Dijkstra's algorithm ‣ minimum spanning trees ‣ Prim, Kruskal, Boruvka ‣ single-link clustering ‣ min-cost arborescences SECTION 4.4 Shortest-paths problem Problem. Given a digraph G = (V, E), edge weights ℓe ≥ 0, source s ∈ V, and destination t ∈ V, find the shortest directed path from s to t. 1 15 3 5 4 12 source s 0 3 8 7 7 2 9 9 6 1 11 5 5 4 13 4 20 6 destination t length of path = 9 + 4 + 1 + 11 = 25 3 Car navigation 4 Shortest path applications ・PERT/CPM. ・Map routing. ・Seam carving. ・Robot navigation. ・Texture mapping. ・Typesetting in LaTeX. ・Urban traffic planning. ・Telemarketer operator scheduling. ・Routing of telecommunications messages. ・Network routing protocols (OSPF, BGP, RIP). ・Optimal truck routing through given traffic congestion pattern. Reference: Network Flows: Theory, Algorithms, and Applications, R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, Prentice Hall, 1993. 5 Dijkstra's algorithm Greedy approach. Maintain a set of explored nodes S for which algorithm has determined the shortest path distance d(u) from s to u. ・Initialize S = { s }, d(s) = 0. ・Repeatedly choose unexplored node v which minimizes shortest path to some node u in explored part, followed by a single edge (u, v) ℓe v d(u) u S s 6 Dijkstra's algorithm Greedy approach.
    [Show full text]
  • Converting MST to TSP Path by Branch Elimination
    applied sciences Article Converting MST to TSP Path by Branch Elimination Pasi Fränti 1,2,* , Teemu Nenonen 1 and Mingchuan Yuan 2 1 School of Computing, University of Eastern Finland, 80101 Joensuu, Finland; [email protected] 2 School of Big Data & Internet, Shenzhen Technology University, Shenzhen 518118, China; [email protected] * Correspondence: [email protected].fi Abstract: Travelling salesman problem (TSP) has been widely studied for the classical closed loop variant but less attention has been paid to the open loop variant. Open loop solution has property of being also a spanning tree, although not necessarily the minimum spanning tree (MST). In this paper, we present a simple branch elimination algorithm that removes the branches from MST by cutting one link and then reconnecting the resulting subtrees via selected leaf nodes. The number of iterations equals to the number of branches (b) in the MST. Typically, b << n where n is the number of nodes. With O-Mopsi and Dots datasets, the algorithm reaches gap of 1.69% and 0.61 %, respectively. The algorithm is suitable especially for educational purposes by showing the connection between MST and TSP, but it can also serve as a quick approximation for more complex metaheuristics whose efficiency relies on quality of the initial solution. Keywords: traveling salesman problem; minimum spanning tree; open-loop TSP; Christofides 1. Introduction The classical closed loop variant of travelling salesman problem (TSP) visits all the nodes and then returns to the start node by minimizing the length of the tour. Open loop TSP is slightly different variant, which skips the return to the start node.
    [Show full text]
  • Minimum Spanning Trees Announcements
    Lecture 15 Minimum Spanning Trees Announcements • HW5 due Friday • HW6 released Friday Last time • Greedy algorithms • Make a series of choices. • Choose this activity, then that one, .. • Never backtrack. • Show that, at each step, your choice does not rule out success. • At every step, there exists an optimal solution consistent with the choices we’ve made so far. • At the end of the day: • you’ve built only one solution, • never having ruled out success, • so your solution must be correct. Today • Greedy algorithms for Minimum Spanning Tree. • Agenda: 1. What is a Minimum Spanning Tree? 2. Short break to introduce some graph theory tools 3. Prim’s algorithm 4. Kruskal’s algorithm Minimum Spanning Tree Say we have an undirected weighted graph 8 7 B C D 4 9 2 11 4 A I 14 E 7 6 8 10 1 2 A tree is a H G F connected graph with no cycles! A spanning tree is a tree that connects all of the vertices. Minimum Spanning Tree Say we have an undirected weighted graph The cost of a This is a spanning tree is 8 7 spanning tree. the sum of the B C D weights on the edges. 4 9 2 11 4 A I 14 E 7 6 8 10 A tree is a This tree 1 2 H G F connected graph has cost 67 with no cycles! A spanning tree is a tree that connects all of the vertices. Minimum Spanning Tree Say we have an undirected weighted graph This is also a 8 7 spanning tree.
    [Show full text]
  • Minimum Perfect Bipartite Matchings and Spanning Trees Under Categorization
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Discrete Applied Mathematics 39 (1992) 147- 153 147 North-Holland Minimum perfect bipartite matchings and spanning trees under categorization Michael B. Richey Operations Research & Applied Statistics Department, George Mason University, Fairfax, VA 22030, USA Abraham P. Punnen Mathematics Department, Indian Institute of Technology. Kanpur-208 016, India Received 2 February 1989 Revised 1 May 1990 Abstract Richey, M.B. and A.P. Punnen, Minimum perfect bipartite mats-Yngs and spanning trees under catego- rization, Discrete Applied Mathematics 39 (1992) 147-153. Network optimization problems under categorization arise when the edge set is partitioned into several sets and the objective function is optimized over each set in one sense, then among the sets in some other sense. Here we find that unlike some other problems under categorization, the minimum perfect bipar- tite matching and minimum spanning tree problems (under categorization) are NP-complete, even on bipartite outerplanar graphs. However for one objective function both problems can be solved in polynomial time on arbitrary graphs if the number of sets is fixed. 1. Introduction In operations research and in graph-theoretic optimization, two types of objective functions have dominated the attention of researchers, namely optimization of the weighted sum of the variables and optimization of the most extreme value of the variables. Recently the following type of (minimization) objective function has appeared in the literature [1,6,7,14]: divide the variables into categories, find the Correspondence to: Professor M.B. Richey, Operations Research & Applied Statistics Department, George Mason University, Fairfax, VA 22030, USA.
    [Show full text]
  • NP-Hard Problems [Sp’15]
    Algorithms Lecture 30: NP-Hard Problems [Sp’15] [I]n his short and broken treatise he provides an eternal example—not of laws, or even of method, for there is no method except to be very intelligent, but of intelligence itself swiftly operating the analysis of sensation to the point of principle and definition. — T. S. Eliot on Aristotle, “The Perfect Critic”, The Sacred Wood (1921) The nice thing about standards is that you have so many to choose from; furthermore, if you do not like any of them, you can just wait for next year’s model. — Andrew S. Tannenbaum, Computer Networks (1981) Also attributed to Grace Murray Hopper and others If a problem has no solution, it may not be a problem, but a fact — not to be solved, but to be coped with over time. — Shimon Peres, as quoted by David Rumsfeld, Rumsfeld’s Rules (2001) 30 NP-Hard Problems 30.1 A Game You Can’t Win A salesman in a red suit who looks suspiciously like Tom Waits presents you with a black steel box with n binary switches on the front and a light bulb on the top. The salesman tells you that the state of the light bulb is controlled by a complex boolean circuit—a collection of And, Or, and Not gates connected by wires, with one input wire for each switch and a single output wire for the light bulb. He then asks you the following question: Is there a way to set the switches so that the light bulb turns on? If you can answer this question correctly, he will give you the box and a million billion trillion dollars; if you answer incorrectly, or if you die without answering at all, he will take your soul.
    [Show full text]
  • Lecture Notes on “Analysis of Algorithms”: Directed Minimum Spanning Trees
    Lecture notes on \Analysis of Algorithms": Directed Minimum Spanning Trees Lecturer: Uri Zwick ∗ April 22, 2013 Abstract We describe an efficient implementation of Edmonds' algorithm for finding minimum directed spanning trees in directed graphs. 1 Minimum Directed Spanning Trees Let G = (V; E; w) be a weighted directed graph, where w : E ! R is a cost (or weight) function defined on its edges. Let r 2 V . A directed spanning tree (DST) of G rooted at r, is a subgraph T of G such that the undirected version of T is a tree and T contains a directed path from r to any other vertex in V . The cost w(T ) of a directed spanning tree T is the sum of the costs of its edges, P i.e., w(T ) = e2T w(e). A minimum directed spanning tree (MDST) rooted at r is a directed spanning tree rooted at r of minimum cost. A directed graph contains a directed spanning tree rooted at r if and only if all vertices in G are reachable from r. This condition can be easily tested in linear time. The proof of the following lemma is trivial as is left as an exercise. Lemma 1.1 The following conditions are equivalent: (i) T is a directed spanning tree of G rooted at r. (ii) The indegree of r in T is 0, the indegree of every other vertex of G in T is 1, and T is acyclic, i.e., contains no directed cycles. (iii) The indegree of r in T is 0, the indegree of every other vertex of G in T is 1, and there are directed paths in T from r to all other vertices.
    [Show full text]
  • Lecture 8: the Traveling Salesman Problem
    TU Eindhoven Advanced Algorithms (2IL45) — Course Notes Lecture 8: The Traveling Salesman Problem Let G = (V, E) be an undirected graph. A Hamiltonian cycle of G is a cycle that visits every vertex v ∈ V exactly once. Instead of Hamiltonian cycle, we sometimes also use the term tour. Not every graph has a Hamiltonian cycle: if the graph is a single path, for example, then obviously it does not have a Hamiltonian cycle. The problem Hamiltonian Cycle is to decide for a given graph graph G whether it has a Hamiltonian cycle. Hamiltonian Cycle is NP-complete. Now suppose that G is a complete graph—that is, G has an edge between every pair of vertices—where each edge e ∈ E has a non-negative length. It is easy to see that because G is complete it must have a Hamiltonian cycle. Since the edges now have lengths, however, some Hamiltonian cycles may be shorter than others. This leads to the traveling salesman problem, or TSP for short: given a complete graph G = (V, E), where each edge e ∈ E has a length, find a minimum-length tour (Hamiltonian cycle) of G. (The length of a tour is defined as the sum of the lengths of the edges in the tour.) TSP is NP-hard. We are therefore interested in approximation algorithms. Unfortunately, even this is too much to ask. Theorem 8.1 There is no value c for which there exists a polynomial-time c-approximation algorithm for TSP, unless P=NP. Proof. As noted above, Hamiltonian Cycle is NP-complete, so there is no polynomial-time algorithm for the problem unless P=NP.
    [Show full text]
  • ‣ Dijkstra′S Algorithm ‣ Minimum Spanning Trees ‣ Prim, Kruskal, Boruvka ‣ Single-Link Clustering ‣ Min-Cost Arborescences
    4. GREEDY ALGORITHMS II ‣ Dijkstra′s algorithm ‣ minimum spanning trees ‣ Prim, Kruskal, Boruvka ‣ single-link clustering ‣ min-cost arborescences Lecture slides by Kevin Wayne Copyright © 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos Last updated on 2/25/20 4:16 PM 4. GREEDY ALGORITHMS II ‣ Dijkstra′s algorithm ‣ minimum spanning trees ‣ Prim, Kruskal, Boruvka ‣ single-link clustering ‣ min-cost arborescences SECTION 4.4 Single-pair shortest path problem Problem. Given a digraph G = (V, E), edge lengths ℓe ≥ 0, source s ∈ V, and destination t ∈ V, find a shortest directed path from s to t. 1 15 3 5 4 12 source s 0 3 8 7 7 2 9 9 6 1 11 5 5 4 13 4 20 6 destination t length of path = 9 + 4 + 1 + 11 = 25 3 Single-source shortest paths problem Problem. Given a digraph G = (V, E), edge lengths ℓe ≥ 0, source s ∈ V, find a shortest directed path from s to every node. 1 15 3 5 4 12 source s 0 3 8 7 7 2 9 9 6 1 11 5 5 4 13 4 20 6 shortest-paths tree 4 Shortest paths: quiz 1 Suppose that you change the length of every edge of G as follows. For which is every shortest path in G a shortest path in G′? A. Add 17. B. Multiply by 17. C. Either A or B. D. Neither A nor B. 24 —7 s —1 —2 3— t 18 19 20 5 Shortest paths: quiz 2 Which variant in car GPS? A.
    [Show full text]
  • Arxiv:1710.09672V1 [Math.CO] 26 Oct 2017 Minimum Spanning Tree (MST)
    1-SKELETONS OF THE SPANNING TREE PROBLEMS WITH ADDITIONAL CONSTRAINTS VLADIMIR BONDARENKO, ANDREI NIKOLAEV, DZHAMBOLET SHOVGENOV Abstract. We consider the polyhedral properties of two spanning tree problems with addi- tional constraints. In the first problem, it is required to find a tree with a minimum sum of edge weights among all spanning trees with the number of leaves less or equal a given value. In the second problem, an additional constraint is the assumption that the degree of all vertices of the spanning tree does not exceed a given value. The decision versions of both problems are NP-complete. We consider the polytopes of these problems and their 1-skeletons. We prove that in both cases it is a NP-complete problem to determine whether the vertices of 1-skeleton are adjacent. Although it is possible to obtain a superpolynomial lower bounds on the clique numbers of these graphs. These values characterize the time complexity in a broad class of algorithms based on linear comparisons. The results indicate a fundamental difference in combinatorial and geometric properties between the considered problems and the classical minimum spanning tree problem. 1. Introduction A significant number of works related to the computational complexity of combinatorial prob- lems is aimed at the study of geometric objects associated with problems. Usually such objects are the polytopes of the problems and their 1-skeletons. In particular, the clique number of the 1-skeleton (the size of the maximum clique) of the problem serves as a lower bound on compu- tational complexity in a broad class of algorithms based on linear comparisons.
    [Show full text]
  • Combinatorial Characterisations of Graphical Computational Search
    Combinatorial Characterisations of accessible Graphical Computational Search Problems: P= 6 NP. Kayibi Koko-Kalambay School of Mathematics. Department of Sciences University of Bristol Abstract Let G be a connected graph with edge-set E and vertex-set V . Given an input X, where X is the edge-set or the vertex-set of the graph G, a graphical computational search problem associated with a predicate γ con- sists of finding a solution Y , where Y ⊆ X, and Y satisfies the condition γ. We denote such a problem as Π(X; γ), and we let Π^ to denote the decision problem associated with Π(X; γ). A sub-solution of Π(X; γ) is a subset Y 0 that is a solution of the problem Π(X0; γ), where X0 ⊂ X, and X0 is the edge-set or the vertex-set of the contraction-minor G=A, where A ⊆ E. To each search problem Π(X; γ), we associate the set system (X; I), where I denotes the set of all the solutions and sub-solutions of Π(X; γ). The predicate γ is an accessible predicate if, given Y 6= ;, Y satisfies γ in X implies that there is an element y 2 Y such that Y n y satisfies γ in X0. If γ is an accessible property, we then show in Theorem 1 that a decision problem Π^ is in P if and only if, for all input X, the set system (X; I) satisfies Axioms M2', where M2', called the Augmentability Axiom, is an extension of both the Exchange Axiom and the Accessibility Axiom of a greedoid.
    [Show full text]
  • Minimum Spanning Trees
    Minimum Spanning Trees • G = (V; E) is an undirected graph with non-negative edge weights w : E ! Z+ • We assume wlog that edge weights are distinct • A spanning tree is a tree with V − 1 edges, i.e. a tree that connects all the vertices. P • The total cost (weight) of a spanning tree T is defined as e2T w(e) • A minimum spanning tree is a tree of minimum total weight. 6 4 5 9 14 10 2 3 15 8 Minimum Spanning Trees • G = (V; E) is an undirected graph with non-negative edge weights w : E ! Z+ • We assume wlog that edge weights are distinct • A spanning tree is a tree with V − 1 edges, i.e. a tree that connects all the vertices. P • The total cost (weight) of a spanning tree T is defined as e2T w(e) • A minimum spanning tree is a tree of minimum total weight. 6 4 5 9 14 10 2 3 15 8 Cuts • A cut in a graph is a partition of the vertices into two sets S and T . • An edge (u; v) with u 2 S and v 2 T is said to cross the cut. 6 4 5 9 14 10 2 3 15 8 Cuts • A cut in a graph is a partition of the vertices into two sets S and T . • An edge (u; v) with u 2 S and v 2 T is said to cross the cut. 6 4 5 9 14 10 2 3 15 8 Cuts • A cut in a graph is a partition of the vertices into two sets S and T .
    [Show full text]