Connectivity Information Graphs Graphs Graph (Example)

Total Page:16

File Type:pdf, Size:1020Kb

Connectivity Information Graphs Graphs Graph (Example) Connectivity information Graphs Connectivity information is present, e.g., in city maps, where the objects are roads, and Graph is a set of objects, called vertices, also in the routing tables for the Internet, together with a collection of pair-wise when the objects are computers. connections, called edges, between them Connectivity information is also present in Graphs have applications in a number of the parent child relationships defined by a different domains, including mapping (in binary tree, where the objects are tree geographic information systems), nodes. transportation (in road and flight networks), electrical engineering (in Connectivity information can be defined by circuits), and computer networking (in the all kinds of relationships that exist between connections of the Internet) pairs of objects. week 6 Complexity of Algorithms 1 week 6 Complexity of Algorithms 2 Graphs Graph (example) Formally graph G=(V,E) is a set V of Graph of co-authorship vertices and a collection E of pairs of vertices from V, called edges. Edges in graph are either directed or undirected An edge (u,v) is said to be directed from u to v if the pair (u,v) is directed An edge (u,v) is said to be undirected if the pair (u,v) is not ordered week 6 Complexity of Algorithms 3 week 6 Complexity of Algorithms 4 1 Graphs Graph (example) Two vertices are said to be adjacent if they are end-points of the same edge. An edge is said to be incident on a vertex if the vertex is one of the edge end-points An outgoing edge of a vertex is a directed edge whose origin is in that vertex An incoming edge of a vertex is a directed edge whose destination is that vertex The degree of a vertex v, denoted by deg(v), is the number edges on v The in-degree (out-degree) of a vertex v is the number of incoming (outgoing) of v, and it is denoted by in-deg(v) (out-deg(v)) week 6 Complexity of Algorithms 5 week 6 Complexity of Algorithms 6 Graphs Graphs Thm: If G is a graph with m edges, Thm: Let G be a simple graph with n then vertices and m edges. If G is undirected, then m £ n(n-1)/2, and If G is directed, then m £ n(n-1) A path in a graph is a sequence of Thm: If G is a directed graph with m alternating vertices and edges that starts edges, then at a vertex and ends at a vertex. A cycle is a path with the same start and end vertices week 6 Complexity of Algorithms 7 week 6 Complexity of Algorithms 8 2 Graphs Graphs We say that the path is simple if each A sub-graph of a graph G is a graph H vertex in the path is distinct whose vertices and edges are sub-sets of the vertices and edges of G We also say that the cycle is simple if each vertex in the cycle is distinct, except for A spanning sub-graph of G is a sub-graph of G that contains all the vertices of graph G the first and the last one A graph is connected if, for any two A directed path (directed cycle) is a path vertices, there is a path between them (cycle), s.t., all the edges are directed and If a graph is not connected, its maximal are traversed along their direction connected sub-graphs are called the connected components of G week 6 Complexity of Algorithms 9 week 6 Complexity of Algorithms 10 Graphs Graphs A forest is a graph without cycles Let G be an undirected graph with n A tree is a connected forest, i.e., vertices and m edges. Then we have connected graph without cycles the following: A tree with a distinguished node (a root) is If G is connected, then m ³ n-1 called a rooted tree, otherwise it is If G is a tree, then m = n-1 referred as a free tree If G is a forest, then m £ n-1 A spanning tree of a graph is a spanning sub-graph that is a (free) tree week 6 Complexity of Algorithms 11 week 6 Complexity of Algorithms 12 3 Adjacency List Adjacency Matrix week 6 Complexity of Algorithms 13 week 6 Complexity of Algorithms 14 Depth-First Search (DFS) DFS (pseudo-code) A B C D F E G H I J DFS tree edges week 6 Complexity of Algorithms 15 week 6 Complexity of Algorithms 16 4 DFS (applications) Biconnected Graph Let G be a connected graph A separation edge of G is an edge whose removal disconnects G A separation vertex of G is a vertex whose removal disconnects G A connected graph G is biconnected if, for any two vertices u and v of G, there are two disjoint paths (composed of different edges) between u and v week 6 Complexity of Algorithms 17 week 6 Complexity of Algorithms 18 Biconnected Graph Biconnected Components Let G be a connected graph. The following are equivalent: G is biconnected For any two vertices of G, there is a simple cycle containing them G does not have separation vertices or separation edges week 6 Complexity of Algorithms 19 week 6 Complexity of Algorithms 20 5 Finding Biconnected Components Finding Biconnected Components We are looking for unions Thm: Given a connected graph G with of edge intersecting cycles m edges. We can compute G’s biconnected components, separation vertices, and separation edges in O(m) time. week 6 Complexity of Algorithms 21 week 6 Complexity of Algorithms 22 Breadth-First Search (BFS) BFS (pseudo-code) A B C D F E G H I J week 6 Complexity of Algorithms 23 week 6 Complexity of Algorithms 24 6 BFS (applications) DFS/BFS Comparison DFS traversal: is better for answering complex connectivity questions, Produces a spanning tree, s.t., all non-tree edges are back edges BFS traversal: Is better in finding shortest paths in a graph, Produces a spanning tree, s.t., all non-tree edges are cross edges week 6 Complexity of Algorithms 25 week 6 Complexity of Algorithms 26 Digraphs Digraphs A digraph is a graph whose edges are all A digraph G is strongly connected if, directed for any two vertices u and v of G, u A fundamental issue with directed graphs is reaches v and v reaches u the notion of reachability, which deals with A directed cycle of G is a cycle where determining where we can get to in a all the edges are traversed according directed graph. to their respective directions Given two vertices u and v of a digraph G, A digraph is acyclic if it has no we say that u reaches v (v is reachable directed cycles from u) if G has a directed path from u to v week 6 Complexity of Algorithms 27 week 6 Complexity of Algorithms 28 7 Testing for Strong Connectivity Testing for Strong Connectivity v v Build a directed DFS tree T(v) in G G rooted in arbitrary vertex v Gr Construct graph Gr by changing directions of all edges in G Build a directed DFS tree Tr(v) in Gr If trees T(v) and Tr(v) are spanning trees then G is strongly connected. Complexity: O(n+m) week 6 Complexity of Algorithms 29 week 6 Complexity of Algorithms 30 8.
Recommended publications
  • 1 Vertex Connectivity 2 Edge Connectivity 3 Biconnectivity
    1 Vertex Connectivity So far we've talked about connectivity for undirected graphs and weak and strong connec- tivity for directed graphs. For undirected graphs, we're going to now somewhat generalize the concept of connectedness in terms of network robustness. Essentially, given a graph, we may want to answer the question of how many vertices or edges must be removed in order to disconnect the graph; i.e., break it up into multiple components. Formally, for a connected graph G, a set of vertices S ⊆ V (G) is a separating set if subgraph G − S has more than one component or is only a single vertex. The set S is also called a vertex separator or a vertex cut. The connectivity of G, κ(G), is the minimum size of any S ⊆ V (G) such that G − S is disconnected or has a single vertex; such an S would be called a minimum separator. We say that G is k-connected if κ(G) ≥ k. 2 Edge Connectivity We have similar concepts for edges. For a connected graph G, a set of edges F ⊆ E(G) is a disconnecting set if G − F has more than one component. If G − F has two components, F is also called an edge cut. The edge-connectivity if G, κ0(G), is the minimum size of any F ⊆ E(G) such that G − F is disconnected; such an F would be called a minimum cut.A bond is a minimal non-empty edge cut; note that a bond is not necessarily a minimum cut.
    [Show full text]
  • Simpler Sequential and Parallel Biconnectivity Augmentation
    Simpler Sequential and Parallel Biconnectivity Augmentation Surabhi Jain and N.Sadagopan Department of Computer Science and Engineering, Indian Institute of Information Technology, Design and Manufacturing, Kancheepuram, Chennai, India. fsurabhijain,[email protected] Abstract. For a connected graph, a vertex separator is a set of vertices whose removal creates at least two components and a minimum vertex separator is a vertex separator of least cardinality. The vertex connectivity refers to the size of a minimum vertex separator. For a connected graph G with vertex connectivity k (k ≥ 1), the connectivity augmentation refers to a set S of edges whose augmentation to G increases its vertex connectivity by one. A minimum connectivity augmentation of G is the one in which S is minimum. In this paper, we focus our attention on connectivity augmentation of trees. Towards this end, we present a new sequential algorithm for biconnectivity augmentation in trees by simplifying the algorithm reported in [7]. The simplicity is achieved with the help of edge contraction tool. This tool helps us in getting a recursive subproblem preserving all connectivity information. Subsequently, we present a parallel algorithm to obtain a minimum connectivity augmentation set in trees. Our parallel algorithm essentially follows the overall structure of sequential algorithm. Our implementation is based on CREW PRAM model with O(∆) processors, where ∆ refers to the maximum degree of a tree. We also show that our parallel algorithm is optimal whose processor-time product is O(n) where n is the number of vertices of a tree, which is an improvement over the parallel algorithm reported in [3].
    [Show full text]
  • Schematic Representation of Large Biconnected Graphs?
    Schematic Representation of Large Biconnected Graphs? Giuseppe Di Battista, Fabrizio Frati, Maurizio Patrignani, and Marco Tais Roma Tre University, Rome, Italy fgdb,frati,patrigna,[email protected] Abstract. Suppose that a biconnected graph is given, consisting of a large component plus several other smaller components, each separated from the main component by a separation pair. We investigate the existence and the computation time of schematic representations of the structure of such a graph where the main component is drawn as a disk, the vertices that take part in separation pairs are points on the boundary of the disk, and the small components are placed outside the disk and are represented as non-intersecting lunes connecting their separation pairs. We consider several drawing conventions for such schematic representations, according to different ways to account for the size of the small components. We map the problem of testing for the existence of such representations to the one of testing for the existence of suitably constrained 1-page book-embeddings and propose several polynomial-time algorithms. 1 Introduction Many of today's applications are based on large-scale networks, having billions of vertices and edges. This spurred an intense research activity devoted to finding methods for the visualization of very large graphs. Several recent contributions focus on algorithms that produce drawings where either the graph is only partially represented or it is schematically visualized. Examples of the first type are proxy drawings [6,12], where a graph that is too large to be fully visualized is represented by the drawing of a much smaller proxy graph that preserves the main features of the original graph.
    [Show full text]
  • Balanced Vertex-Orderings of Graphs
    Balanced Vertex-Orderings of Graphs Therese Biedl 1 Timothy Chan 1 School of Computer Science, University of Waterloo Waterloo, ON N2L 3G1, Canada. Yashar Ganjali 2 Department of Electrical Engineering, Stanford University Stanford, CA 94305, U.S.A. MohammadTaghi Hajiaghayi 3 Laboratory for Computer Science, Massachusetts Institute of Technology Cambridge, MA 02139, U.S.A. David R. Wood 4,∗ School of Computer Science, Carleton University Ottawa, ON K1S 5B6, Canada. Abstract In this paper we consider the problem of determining a balanced ordering of the vertices of a graph; that is, the neighbors of each vertex v are as evenly distributed to the left and right of v as possible. This problem, which has applications in graph drawing for example, is shown to be NP-hard, and remains NP-hard for bipartite simple graphs with maximum degree six. We then describe and analyze a number of methods for determining a balanced vertex-ordering, obtaining optimal orderings for directed acyclic graphs, trees, and graphs with maximum degree three. For undirected graphs, we obtain a 13/8-approximation algorithm. Finally we consider the problem of determining a balanced vertex-ordering of a bipartite graph with a fixed ordering of one bipartition. When only the imbalances of the fixed vertices count, this problem is shown to be NP-hard. On the other hand, we describe an optimal linear time algorithm when the final imbalances of all vertices count. We obtain a linear time algorithm to compute an optimal vertex-ordering of a bipartite graph with one bipartition of constant size. Key words: graph algorithm, graph drawing, vertex-ordering.
    [Show full text]
  • Pure Graph Algorithms
    Lecture IV Page 1 “Liesez Euler, liesez Euler, c’est notre maˆıtre a´ tous” (Read Euler, read Euler, he is our master in everything) — Pierre-Simon Laplace (1749–1827) Lecture IV PURE GRAPH ALGORITHMS Graph Theory is said to have originated with Euler (1707–1783). The citizens of the city1 of K¨onigsberg asked him to resolve their favorite pastime question: is it possible to traverse all the 7 bridges joining two islands in the River Pregel and the mainland, without retracing any path? See Figure 1(a) for a schematic layout of these bridges. Euler recognized2 in this problem the essence of Leibnitz’s earlier interest in founding a new kind of mathematics called “analysis situs”. This can be interpreted as topological or combinatorial analysis in modern language. A graph correspondingto the 7 bridges and their interconnections is shown in Figure 1(b). Computational graph theory has a relatively recent history. Among the earliest papers on graph algorithms are Boruvka’s (1926) and Jarn´ık (1930) minimum spanning tree algorithm, and Dijkstra’s shortest path algorithm (1959). Tarjan [7] was one of the first to systematically study the DFS algorithm and its applications. A lucid account of basic graph theory is Bondy and Murty [3]; for algorithmic treatments, see Even [5] and Sedgewick [6]. A D B C The real bridge Credit: wikipedia (a) (b) Figure 1: The 7 Bridges of Konigsberg Graphs are useful for modeling abstract mathematical relations in computer science as well as in many other disciplines. Here are some examples of graphs: Adjacency between Countries Figure 2(a) shows a political map of 7 countries.
    [Show full text]
  • A Generic Framework for the Topology-Shape-Metrics Based Layout
    A Generic Framework for the Topology-Shape-Metrics Based Layout Paul Klose Master Thesis October 2012 Christian-Albrechts-Universität zu Kiel Real-Time and Embedded Systems Group Prof. Dr. Reinhard von Hanxleden Advised by: Dipl-Inf. Miro Spönemann Abstract Modeling is an important part of software engineering, but it is also used in many other areas of application. In that context the arrangement of diagram elements by hand is not efficient. Thus, layout algorithms are used to create or rearrange the diagram elements automatically in order to free users from this. However, different types of diagrams require different types of layout algorithms. Planarity and orthogonality are well-known drawing conventions for many domains such as UML class diagrams, circuit schemata or entity-relationship models. One approach to arrange such diagrams is considered by Roberto Tamassia and is called Topology-Shape-Metrics approach, which minimizes edge crossings and generates compact orthogonal grid drawings. This basic approach works with three phases: the planarization, the orthogonalization, and the compaction. The implementation of these phases are considered in this thesis in detail with respect to a generic, extensible architecture, such that every phase can be exchanged with different alternatives. This leads to a considerable amount of flexibility and expandability. Special handling of high-degree nodes has been implemented based on this architecture. Moreover, approach and implementation proposals for interactive planarization and for handling edge labels, hypergraphs and port constraints are presented. iii Eidesstattliche Erklärung Hiermit erkläre ich an Eides statt, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel verwendet habe.
    [Show full text]
  • Strongly-Connected-Components(G) 1
    MA 515: Introduction to Algorithms & MA353 : Design and Analysis of Algorithms [3-0-0-6] Lecture 14 http://www.iitg.ernet.in/psm/indexing_ma353/y09/index.html Partha Sarathi Manal [email protected] Dept. of Mathematics, IIT Guwahati Mon 10:00-10:55 Tue 11:00-11:55 Fri 9:00-9:55 Class Room : 2101 Example: Strongly Connected Components Strongly Connected Components Def: A subset C V is a strongly connected of G if x, y C (xy y x). A subset C V is a strongly connected component (SCC) of G if it is maximally strongly connected: no proper superset of C is strongly connected. Strongly Connected Components • Any two vertices in a SCC lie on a cycle. • SCCs form a partition of the vertex set. SCC algorithms • Warshall’s Algorithm: 1962 • Tarjan’s Algorithm: 1972 • Kosaraju’s Algorithm: 1978 Transpose Digraph GT can be computed G=(V,E) from G in O(V+E) time GT =(V,ET) where ET={(u,v): (v,u) E} DFS on the Digraph a b c d 13/14 11/16 1/10 8/9 12/15 3/4 2/7 5/6 e f g h a b c d e f g h Kosaraju’s Algorithm 1. Perform DFS on G, store completion numbers. 2. Perform DFS on GT, where vertices are ordered by decreasing completion numbers. 3. Each tree in the second DFS is a SCC of the graph. Another version of Kosaraju’s Algorithm Strongly-Connected-Components(G) 1. Call DFS to compute f[u] u.
    [Show full text]
  • Finding Triconnected Components by Local Replacement1
    In SIAM J. Computing, 1993, pp. 587-616. FINDING TRICONNECTED COMPONENTS BY LOCAL 1 REPLACEMENT 3;5 2;3 DONALD FUSSELL , VIJAYA RAMACHANDRAN AND RAMAKRISHNA 4;5 THURIMELLA Abstract. We present a parallel algorithm for nding triconnected comp onents on a CRCW PRAM. The time complexity of our algorithm is O log n and the pro cessor-time pro duct is O m + n log log n where n is the number of vertices, and m is the numb er of edges of the input graph. Our algorithm, like other parallel algorithms for this problem, is based on op en ear decomp osition but it employs a new technique, lo cal replacement, to improve the complexity. Only the need to use the subroutines for connected comp onents and integer sorting, for which no optimal parallel algorithm that runs in O log n time is known, prevents our algorithm from achieving optimality. 1. Intro duction. A connected graph G = V; E is k -vertex connected if it has at least k +1vertices and removal of anyk 1 vertices leaves the graph connected. Designing ecient algorithms for determining the connectivity of graphs has b een a sub ject of great interest in the last two decades. Applications of graph connectivity to problems in computer science are numerous. Network reliability is one of them: algorithms for edge and vertex connectivity can be used to check the robustness of a network against link and no de failures resp ectively. In spite of all the attention this sub ject has received, O m + n-time sequential algorithms for testing k -edge and k -vertex connectivity of an n no de m vertex graph are known only for k < 3 [5],[12].
    [Show full text]
  • 55 GRAPH DRAWING Emilio Di Giacomo, Giuseppe Liotta, Roberto Tamassia
    55 GRAPH DRAWING Emilio Di Giacomo, Giuseppe Liotta, Roberto Tamassia INTRODUCTION Graph drawing addresses the problem of constructing geometric representations of graphs, and has important applications to key computer technologies such as soft- ware engineering, database systems, visual interfaces, and computer-aided design. Research on graph drawing has been conducted within several diverse areas, includ- ing discrete mathematics (topological graph theory, geometric graph theory, order theory), algorithmics (graph algorithms, data structures, computational geometry, vlsi), and human-computer interaction (visual languages, graphical user interfaces, information visualization). This chapter overviews aspects of graph drawing that are especially relevant to computational geometry. Basic definitions on drawings and their properties are given in Section 55.1. Bounds on geometric and topological properties of drawings (e.g., area and crossings) are presented in Section 55.2. Sec- tion 55.3 deals with the time complexity of fundamental graph drawing problems. An example of a drawing algorithm is given in Section 55.4. Techniques for drawing general graphs are surveyed in Section 55.5. 55.1 DRAWINGS AND THEIR PROPERTIES TYPES OF GRAPHS First, we define some terminology on graphs pertinent to graph drawing. Through- out this chapter let n and m be the number of graph vertices and edges respectively, and d the maximum vertex degree (i.e., number of edges incident to a vertex). GLOSSARY Degree-k graph: Graph with maximum degree d k. ≤ Digraph: Directed graph, i.e., graph with directed edges. Acyclic digraph: Digraph without directed cycles. Transitive edge: Edge (u, v) of a digraph is transitive if there is a directed path from u to v not containing edge (u, v).
    [Show full text]
  • 286 Graphs 6.2.5 Biconnected Components
    l 286 Graphs 6.2.5 Biconnected Components The operations that we have implemented thus far are simple extensions of depth first and breadth first search. The next operation we implement is more complex and requires the introduction of additional terminology. We begin by assuming that G is an undirected connected graph. An articulation point is a vertex v of G such that the deletion of v, together with all edges incident on v, produces a graph, G', that has at least two connected com­ ponents. For example, the connected graph of Figure 6.19 has four articulation points, vertices 1,3,5, and 7. A biconnected graph is a connected graph that has no articulation points. For example, the graph of Figure 6.16 is biconnected, while the graph of Figure 6.19 obvi­ ously is not. In many graph applications, articulation points are undesirable. For instance, suppose that the graph of Figure 6.19(a) represents a communication network. In such graphs, the vertices represent communication stations and the edges represent communication links. Now suppose that one of the stations that is an articulation point fails. The result is a loss of communication not just to and from that single station, but also between certain other pairs of stations. A biconnected component of a connected undirected graph is a maximal bicon­ nected subgraph, H, of G. By maximal, we mean that G contains no other subgraph that is both biconnected and properly contains H. For example, the graph of Figure 6.19(a) contains the six biconnected components shown in Figure 6.19(b).
    [Show full text]
  • Advanced Graph Algorithms
    Advanced Graph Yu-Fang Chen (陳郁⽅) Department of Information Management Algorithms National Taiwan University Biconnected Components Definition An undirected graph is connected if there is a path from every vertex to every other vertex. Definition An undirected graph is biconnected if there are at least two vertex disjoint paths from every vertex to every other vertex. By convention, a graph with one edge is biconnected. Definition An undirected graph is k-connected if there are at least k vertex disjoint paths from every vertex to every other vertex. Biconnected Components (cont.) Menger’s Theorem Let G be an undirected graph and u, v be two nonadjacent vertices in G. The minimal number of vertices whose removal from G disconnects u from v is equal to the maximal number of vertex disjoint paths from u to v. u v ❖ A graph is not biconnected iff there is a vertex whose removal disconnects the graph. Such a vertex is called an articulation point. Biconnected Components (cont.) Definition A biconnected component (BCC) is a maximal subset of the edges such that its induced subgraph is biconnected. Is this a BCC? Biconnected Components (cont.) The set of edges can be partitioned into biconnected components in a unique way. Lemma Two edges e and f belong to the same BCC iff there is a cycle containing both of them. A cycle is always entirely contained in one BCC. If it has edges from two BCCs, adding the entire cycle still forms a BCC. This contradicts the maximality requirement. If the two edges belong to the same BCC, we add two new vertices ve and vf to the “middle” of e and f.
    [Show full text]
  • A Distributed Algorithm for Finding Separation Pairs in a Computer Network
    University of Windsor Scholarship at UWindsor Electronic Theses and Dissertations Theses, Dissertations, and Major Papers 2009 A Distributed Algorithm for Finding Separation Pairs in a Computer Network Katayoon Moazzami University of Windsor Follow this and additional works at: https://scholar.uwindsor.ca/etd Recommended Citation Moazzami, Katayoon, "A Distributed Algorithm for Finding Separation Pairs in a Computer Network" (2009). Electronic Theses and Dissertations. 330. https://scholar.uwindsor.ca/etd/330 This online database contains the full-text of PhD dissertations and Masters’ theses of University of Windsor students from 1954 forward. These documents are made available for personal study and research purposes only, in accordance with the Canadian Copyright Act and the Creative Commons license—CC BY-NC-ND (Attribution, Non-Commercial, No Derivative Works). Under this license, works must always be attributed to the copyright holder (original author), cannot be used for any commercial purposes, and may not be altered. Any other use would require the permission of the copyright holder. Students may inquire about withdrawing their dissertation and/or thesis from this database. For additional inquiries, please contact the repository administrator via email ([email protected]) or by telephone at 519-253-3000ext. 3208. A DISTRIBUTED ALGORITHM FOR FINDING SEPARATION PAIRS IN A COMPUTER NETWORK by KATAYOON MOAZZAMI A Thesis Submitted to the Faculty of Graduate Studies through Computer Science in Partial Fulfillment of the Requirements for the Degree of Master of Science at the University of Windsor Windsor, Ontario, Canada 2009 © 2009 Katayoon Moazzami Author’s Declaration of Originality I hereby certify that I am the sole author of this thesis and that no part of this thesis has been published or submitted for publication.
    [Show full text]