V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005



Similar documents
Social Media Mining. Graph Essentials

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Analysis of Algorithms, I

Midterm Practice Problems

Graph theory and network analysis. Devika Subramanian Comp 140 Fall 2008

Network/Graph Theory. What is a Network? What is network theory? Graph-based representations. Friendship Network. What makes a problem graph-like?

Course on Social Network Analysis Graphs and Networks

Euler Paths and Euler Circuits

Graph Theory Origin and Seven Bridges of Königsberg -Rhishikesh

CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin

Chapter 6: Graph Theory

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

Introduction to Graph Theory

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

3. Eulerian and Hamiltonian Graphs

Graph Theory: Penn State Math 485 Lecture Notes. Christopher Griffin

Graph Theory Problems and Solutions

Discrete Mathematics Problems

Connectivity and cuts

Simple Graphs Degrees, Isomorphism, Paths

CMPSCI611: Approximating MAX-CUT Lecture 20

SPANNING CACTI FOR STRUCTURALLY CONTROLLABLE NETWORKS NGO THI TU ANH NATIONAL UNIVERSITY OF SINGAPORE

Class One: Degree Sequences

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

Finding and counting given length cycles

Total colorings of planar graphs with small maximum degree

Graph/Network Visualization

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Mathematics for Algorithm and System Analysis

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

Complex Networks Analysis: Clustering Methods

Full and Complete Binary Trees

A Fast Algorithm For Finding Hamilton Cycles

8.1 Min Degree Spanning Tree

One last point: we started off this book by introducing another famously hard search problem:

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

Graph Theory Lecture 3: Sum of Degrees Formulas, Planar Graphs, and Euler s Theorem Spring 2014 Morgan Schreffler Office: POT 902

General Network Analysis: Graph-theoretic. COMP572 Fall 2009

A Study of Sufficient Conditions for Hamiltonian Cycles

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis

Graph Classification and Easy Reliability Polynomials

Load balancing Static Load Balancing

UPPER BOUNDS ON THE L(2, 1)-LABELING NUMBER OF GRAPHS WITH MAXIMUM DEGREE

Practical Graph Mining with R. 5. Link Analysis

A 2-factor in which each cycle has long length in claw-free graphs

Approximation Algorithms

SCORE SETS IN ORIENTED GRAPHS

A REMARK ON ALMOST MOORE DIGRAPHS OF DEGREE THREE. 1. Introduction and Preliminaries

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Networks and Paths. The study of networks in mathematics began in the middle 1700 s with a famous puzzle called the Seven Bridges of Konigsburg.

Graphical degree sequences and realizations

Load Balancing and Termination Detection

Social Media Mining. Network Measures

On planar regular graphs degree three without Hamiltonian cycles 1

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Network (Tree) Topology Inference Based on Prüfer Sequence

Degree Hypergroupoids Associated with Hypergraphs

Cycles in a Graph Whose Lengths Differ by One or Two

Graphs without proper subgraphs of minimum degree 3 and short cycles

Theoretical Computer Science (Bridging Course) Complexity

BOUNDARY EDGE DOMINATION IN GRAPHS

Sum of Degrees of Vertices Theorem

Every tree contains a large induced subgraph with all degrees odd

CSV886: Social, Economics and Business Networks. Lecture 2: Affiliation and Balance. R Ravi ravi+iitd@andrew.cmu.edu

Faster Fixed Parameter Tractable Algorithms for Finding Feedback Vertex Sets

Application of Graph Theory to

Technology, Kolkata, INDIA,

Rising Rates in Random institute (R&I)

Lecture 7: NP-Complete Problems

Examination paper for MA0301 Elementær diskret matematikk

Mathematical Induction. Lecture 10-11

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

Small Maximal Independent Sets and Faster Exact Graph Coloring

Asking Hard Graph Questions. Paul Burkhardt. February 3, 2014

Extremal Wiener Index of Trees with All Degrees Odd

Fast Edge Splitting and Edmonds Arborescence Construction for Unweighted Graphs

Discuss the size of the instance for the minimum spanning tree problem.

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

Part 2: Community Detection

Any two nodes which are connected by an edge in a graph are called adjacent node.

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Clar Structure of Fullerenes

Best Monotone Degree Bounds for Various Graph Parameters

Data Structure [Question Bank]

Million Dollar Mathematics!

An Introduction To Presented by Leon Guzenda, Founder, Objectivity

Labeling outerplanar graphs with maximum degree three

Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1

Fundamentals of algorithms

An Introduction to APGL

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis. Contents. Introduction. Maarten van Steen. Version: April 28, 2014

Quantum Monte Carlo and the negative sign problem

Transcription:

V. Adamchik 1 Graph Theory Victor Adamchik Fall of 2005 Plan 1. Basic Vocabulary 2. Regular graph 3. Connectivity 4. Representing Graphs Introduction A.Aho and J.Ulman acknowledge that Fundamentally, computer science is a science of abstraction. Computer scientists must create abstractions of real-world problems that can be represented and manipulated in a computer. Sometimes the process of abstraction is simple. For example, we use a logic to design a computer circuits. Another example - scheduling final exams. For successful scheduling we have to take into account associations between courses, students and rooms. Such set of connections between items is modeled by graphs. Let me reiterate, in our model the set of items (courses, students and rooms) won't be much helpful. We also have to have a set of connections between pairs of items, because we need to study the relationships between connections. The basic idea of graphs were introduced in 18th century by the great Swiss mathematician Leonhard Euler. He used graphs to solve the famous Königsberg bridge problem. Here is a picture (taken from the internet)

V. Adamchik 21-127: Concepts of Mathematics German city of Königsberg (now it is Russian Kaliningrad) was situated on the river Pregel. It had a park situated on the banks of the river and two islands. Mainland and islands were joined by seven bridges. A problem was whether it was possible to take a walk through the town in such a way as to cross over every bridge once, and only once. Here is the graph model of the problem A graph is a set of points (we call them vertices or nodes) connected by lines (edges or arcs). The simplest example known to you is a linked list.

V. Adamchik 3 The Web: The entire Web is a graph, where items are documents and the references (links) are connections. Networks: A network consist of sites that send and recieve messages of various types. Program Structure: A compiler builds a graph to represent relationships between classes. The items are classes; connections are represented by possibility of a method of one class to call a method from another class Basic Vocabulary A substantial amount of definitions is associated with graphs. We start with introduction to different types of graphs A graph that have nonempty set of vertices connected at most by one edge is called simple When simple graphs are not efficient to model a cituation, we consider multigraphs. They allow multiple edges between two vertices. If that is not enough, we consider pseudographs. They allow edges connect a vertex to itself. What do these three types of graphs have in common? The set of edges is unordered. All such graphs are called undirected. A directed graph consist of vertices and ordered pairs of edges. Note, multiple edges in the same direction are not allowed.

V. Adamchik 21-127: Concepts of Mathematics If multiple edges in the same direction are allowed, then a graph is called directed multigraph. Usually by a graph people mean a simple undirected graph. No directions, no self-loops, no multiple edges. Be careful and watch out! An edge may also have a weight or cost associated with it. If a, b is an edge we might denote the cost by ca, b In the example below, ca, bcb, a7. Two vertices are called adjacent if there is an edge between them. The degree of a vertex in an undirected graph is the number of edges associated with it. If a vertex has a loop, it contributes twice.

V. Adamchik 5 In the above picture, the degree of vertex a is 2, and the degree of vertex c is 4. Theorem (The handshaking theorem). Let G be an undirected graph (or multigraph) with V vertices and N edges. Then Example, 2 N degv vv Exercise. Suppose a simple graph has 15 edges, 3 vertices of degree 4, and all others of degree 3. How many vertices does the graph have? 3*4 + (x-3)*3 = 30 In a directed graph terminology reflects the fact that each edge has a direction. In a directed graph vertex v is adjacent to u, if there is an edge leaving v and coming to u. In a directed graph the in-degree of a vertex denotes the number of edges coming to this vertex. The out-degree of a vertex is the number of edges leaving the vertex.

V. Adamchik 21-127: Concepts of Mathematics Theorem. Let G be a directed graph (or multigraph) with V vertices and N edges. Then Regular graph N indegv outdegv vv vv A graph in which every vertex has the same degree is called a regular graph. Here is an example of two regular graphs with four vertices that are of degree 2 and 3 correspondently The following graph of degree 3 with 10 vertices is called the Petersen graph (after Julius Petersen (1839-1910), a Danish mathematician.)

V. Adamchik 7 Exercise. Given a regular graph of degree d with V vertices, how many edges does it have? The complete graph on n vertices, denoted K n, is a simple graph in which there is an edge between every pair of distinct vertices. Here are K 4 and K 5 : Exercise.How many edges in K n? Connectivity A path is a sequence of distinctive vertices connected by edges. Vertex v is reachable from u if there is a path from u to v. A graph is connected, if there is a path between any two vertices. Exercise. Given a graph with 7 vertices; 3 of them of degree two and 4 of degree one. Is this graph is connected? No, the graph have 5 edges.

V. Adamchik 21-127: Concepts of Mathematics A directed graph is strongly connected if there is a path from u to v and from v to u for any u and v in the graph. A directed graph is weakly connected if the underlying undirected graph is connected Representing Graphs Theorem. In an undirected simple graph with N vertices, there are at most NN1 2 edges. Proof. By induction on the number of vertices. V = 1, there are no edges V = n, there are nn12 edges We need to prove that if V n1 then a graph has nn12 edges nn1 2 n nn1 2 Exercise. What is the maximum number of edges in a simple disconnected graph with N vertices? For all graphs, the number of edges E and vertices V satisfies the inequality E V 2. If the number of edges is close to V log V, we say that this is a dense graph, it has a large number of edges. Otherwise, this is a sparse graph E V log V. In most cases, the graph is relatively sparse. There are two standard ways to represent a graph: as a collection of adjacency lists

V. Adamchik 9 or as an adjacency matrix An adjacency list representation is used for representation of the sparse graphs. An adjacency matrix representation may be preferred when the graph is dense. The adjacency-list representation of a graph G consists of an array of linked lists, one for each vertex. Each such list contains all vertices adjacent to a chosen one. Here is an adjacency-list representation: Vertices in an adjacency list are stored in an arbitrary order. A potential disadvantage of the adjacency-list representation is that there is no quicker way to determine if there is an edge between two given vertices. This disadvantage is eliminated by an adjacency matrix representation. The adjacency matrix is a matrix of size V x V such that M i j 1, if there is an edge between i and j 0, otherwise

V. Adamchik 21-127: Concepts of Mathematics Trees A tree is a connected simple graph without cycles. A cycle is a sequence of distinctive adjacent vertices that begins and ends at the same vertex. A tree with V vertices must have V 1 edges. A connected graph with V vertices and V 1 edges must be a tree. A rooted tree is a tree with one vertex designated as a root. A forest is a graph without cycles. In orther words, a forest is a set of trees. A spanning tree of a graph is a subgraph, which is a tree and contains all vertices of the graph. In the figure below, the right picture represents a spanning tree for the graph on the left. A spanning tree is not unique.

V. Adamchik 11 Famous Problems on Graphs The Euler cycle (or tour) problem: Is it possible to traverse each of the edges of a graph exactly once, starting and ending at the same vertex? The Hamiltonian cycle problem: Is it possible to traverse each of the vertices of a graph exactly once, starting and ending at the same vertex? The traveller salesman problem: Find the shortest path in a graph that visits each vertex at least once, starting and ending at the same vertex? The planar graph: Is it possible to draw the edges of a graph in such a way that edges do not cross? The four coloring problem: Is it possible to color the vertices of a graph with at most 4 colors such that adjacent vertices get different color? The marriage problem (or bipartite perfect matching): At what condition a set of boys will be marrying off to a set of girls such that each boy gets a girl he likes?