Graph Algorithms

Graph Algorithms

Graph Algorithms PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Wed, 29 Aug 2012 18:41:05 UTC Contents Articles Introduction 1 Graph theory 1 Glossary of graph theory 8 Undirected graphs 19 Directed graphs 26 Directed acyclic graphs 28 Computer representations of graphs 32 Adjacency list 35 Adjacency matrix 37 Implicit graph 40 Graph exploration and vertex ordering 44 Depth-first search 44 Breadth-first search 49 Lexicographic breadth-first search 52 Iterative deepening depth-first search 54 Topological sorting 57 Application: Dependency graphs 60 Connectivity of undirected graphs 62 Connected components 62 Edge connectivity 64 Vertex connectivity 65 Menger's theorems on edge and vertex connectivity 66 Ear decomposition 67 Algorithms for 2-edge-connected components 70 Algorithms for 2-vertex-connected components 72 Algorithms for 3-vertex-connected components 73 Karger's algorithm for general vertex connectivity 76 Connectivity of directed graphs 82 Strongly connected components 82 Tarjan's strongly connected components algorithm 83 Path-based strong component algorithm 86 Kosaraju's strongly connected components algorithm 87 Application: 2-satisfiability 88 Shortest paths 101 Shortest path problem 101 Dijkstra's algorithm for single-source shortest paths with positive edge lengths 106 Bellman–Ford algorithm for single-source shortest paths allowing negative edge lengths 112 Johnson's algorithm for all-pairs shortest paths in sparse graphs 115 Floyd–Warshall algorithm for all-pairs shortest paths in dense graphs 118 Suurballe's algorithm for two shortest disjoint paths 122 Bidirectional search 125 A* search algorithm 127 Longest path problem 134 Widest path problem 137 Canadian traveller problem 141 Application: Centrality analysis of social networks 144 Application: Schulze voting system 149 Minimum spanning trees 164 Minimum spanning tree 164 Borůvka's algorithm 170 Kruskal's algorithm 171 Prim's algorithm 174 Edmonds's algorithm for directed minimum spanning trees 177 Degree-constrained spanning tree 180 Maximum-leaf spanning tree 181 K-minimum spanning tree 182 Capacitated minimum spanning tree 184 Application: Single-linkage clustering 185 Application: Maze generation 187 Cliques, independent sets, and coloring 193 Clique problem 193 Bron–Kerbosch algorithm for listing all maximal cliques 206 Independent set problem 210 Maximal independent set 214 Graph coloring 218 Bipartite graph 232 Greedy coloring 237 Application: Register allocation 239 Covering and domination 242 Vertex cover 242 Dominating set 247 Feedback vertex set 251 Feedback arc set 254 Tours 256 Eulerian path 256 Hamiltonian path 260 Hamiltonian path problem 263 Travelling salesman problem 265 Bottleneck traveling salesman problem 278 Christofides' heuristic for the TSP 278 Route inspection problem 279 Matching 281 Matching 281 Hopcroft–Karp algorithm for maximum matching in bipartite graphs 285 Edmonds's algorithm for maximum matching in non-bipartite graphs 289 Assignment problem 296 Hungarian algorithm for the assignment problem 298 FKT algorithm for counting matchings in planar graphs 303 Stable marriage problem 306 Stable roommates problem 309 Permanent 311 Computing the permanent 314 Network flow 318 Maximum flow problem 318 Max-flow min-cut theorem 322 Ford–Fulkerson algorithm for maximum flows 325 Edmonds–Karp algorithm for maximum flows 330 Dinic's algorithm for maximum flows 333 Push-relabel maximum flow algorithm 335 Closure problem 342 Minimum cost flow problem 345 Graph drawing and planar graphs 347 Planar graph 347 Dual graph 353 Fáry's theorem 355 Steinitz's theorem 357 Planarity testing 360 Fraysseix–Rosenstiehl's planarity criterion 362 Graph drawing 363 Force-based graph drawing algorithms 368 Graph embedding 372 Application: Sociograms 374 Application: Concept maps 375 Special classes of graphs 378 Interval graph 378 Chordal graph 381 Perfect graph 384 Intersection graph 388 Unit disk graph 390 Line graph 392 Claw-free graph 397 Median graph 403 Graph isomorphism 414 Graph isomorphism 414 Graph isomorphism problem 416 Graph canonization 423 Subgraph isomorphism problem 424 Color-coding 426 Induced subgraph isomorphism problem 429 Maximum common subgraph isomorphism problem 430 Graph decomposition and graph minors 431 Graph partition 431 Kernighan–Lin algorithm 435 Tree decomposition 436 Branch-decomposition 441 Path decomposition 445 Planar separator theorem 457 Graph minors 469 Courcelle's theorem 474 Robertson–Seymour theorem 475 Bidimensionality 479 References Article Sources and Contributors 482 Image Sources, Licenses and Contributors 489 Article Licenses License 494 1 Introduction Graph theory Further information: Graph (mathematics) and Glossary of graph theory In mathematics and computer science, graph theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects from a certain collection. A "graph" in this context is a collection of "vertices" or "nodes" and a collection of edges that connect pairs of vertices. A graph may be undirected, meaning that there is no distinction between the two vertices associated with each edge, or its edges may be directed from one vertex to another; see graph (mathematics) for more detailed definitions and for other variations in the types of graph that are A drawing of a graph commonly considered. Graphs are one of the prime objects of study in discrete mathematics. The graphs studied in graph theory should not be confused with the graphs of functions or other kinds of graphs. Refer to the glossary of graph theory for basic definitions in graph theory. Applications Graphs are among the most ubiquitous models of both natural and human-made structures. They can be used to model many types of relations and process dynamics in physical, biological[1] and social systems. Many problems of practical interest can be represented by graphs. In computer science, graphs are used to represent networks of communication, data organization, computational devices, the flow of computation, etc. One practical example: The link structure of a website could be represented by a directed graph. The vertices are the web pages available at the website and a directed edge from page A to page B exists if and only if A contains a link to B. A similar approach can be taken to problems in travel, biology, computer chip design, and many other fields. The development of algorithms to handle graphs is therefore of major interest in computer science. There, the transformation of graphs is often formalized and represented by graph rewrite systems. They are either directly used or properties of the rewrite systems (e.g. confluence) are studied. Complementary to graph transformation systems focussing on rule-based in-memory manipulation of graphs are graph databases geared towards transaction-safe, persistent storing and querying of graph-structured data. Graph-theoretic methods, in various forms, have proven particularly useful in linguistics, since natural language often lends itself well to discrete structure. Traditionally, syntax and compositional semantics follow tree-based structures, whose expressive power lies in the Principle of Compositionality, modeled in a hierarchical graph. More contemporary approaches such as Head-driven phrase structure grammar (HPSG) model syntactic constructions via the unification of typed feature structures, which are directed acyclic graphs. Within lexical semantics, especially as applied to computers, modeling word meaning is easier when a given word is understood in terms of related words; semantic networks are therefore important in computational linguistics. Still other methods in phonology (e.g. Optimality Theory, which uses lattice graphs) and morphology (e.g. finite-state morphology, using finite-state Graph theory 2 transducers) are common in the analysis of language as a graph. Indeed, the usefulness of this area of mathematics to linguistics has borne organizations such as TextGraphs [2], as well as various 'Net' projects, such as WordNet, VerbNet, and others. Graph theory is also used to study molecules in chemistry and physics. In condensed matter physics, the three dimensional structure of complicated simulated atomic structures can be studied quantitatively by gathering statistics on graph-theoretic properties related to the topology of the atoms. For example, Franzblau's shortest-path (SP) rings. In chemistry a graph makes a natural model for a molecule, where vertices represent atoms and edges bonds. This approach is especially used in computer processing of molecular structures, ranging from chemical editors to database searching. In statistical physics, graphs can represent local connections between interacting parts of a system, as well as the dynamics of a physical process on such systems. Graph theory is also widely used in sociology as a way, for example, to measure actors' prestige or to explore diffusion mechanisms, notably through the use of social network analysis software. Likewise, graph theory is useful in biology and conservation efforts where a vertex can represent regions where certain species exist (or habitats) and the edges represent migration paths, or movement between the regions. This information is important when looking at breeding patterns or tracking the spread of disease, parasites or how changes to the movement can affect other species. In mathematics, graphs are useful in geometry and certain parts of topology, e.g. Knot

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    500 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us