gr0 GRAPHS Hanan Samet

Similar documents
gr0 GRAPHS Hanan Samet

Pushdown Automata (PDAs)

Supplementary information Efficient Enumeration of Monocyclic Chemical Graphs with Given Path Frequencies

Constraint Satisfaction Problems

15.081J/6.251J Introduction to Mathematical Programming. Lecture 6: The Simplex Method II

Section 8.2 Polar Coordinates

A Bijective Approach to the Permutational Power of a Priority Queue

Matrix Colorings of P 4 -sparse Graphs

arxiv: v1 [math.co] 4 May 2017

HASHING METHODS. Hanan Samet

HASHING METHODS. Hanan Samet

MULTILAYER PERCEPTRONS

Classical Worm algorithms (WA)

REVIEW Polar Coordinates and Equations

Duality between Statical and Kinematical Engineering Systems

CERFACS 42 av. Gaspard Coriolis, Toulouse, Cedex 1, France. Available at Date: April 2, 2008.

ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS. D.A. Mojdeh and B. Samadi

Conspiracy and Information Flow in the Take-Grant Protection Model

MDS Array Codes with Optimal Rebuilding

Graphs of Sine and Cosine Functions

arxiv: v1 [math.co] 6 Mar 2008

Output-Sensitive Algorithms for Computing Nearest-Neighbour Decision Boundaries

24.2 Naive Backtracking

The Chromatic Villainy of Complete Multipartite Graphs

F-IF Logistic Growth Model, Abstract Version

Geometry of the homogeneous and isotropic spaces

Computers and Mathematics with Applications

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

Centripetal Force OBJECTIVE INTRODUCTION APPARATUS THEORY

The Millikan Experiment: Determining the Elementary Charge

Euclidean Figures and Solids without Incircles or Inspheres

New problems in universal algebraic geometry illustrated by boolean equations

Construction Schemes for Fault-Tolerant Hamiltonian Graphs

Auchmuty High School Mathematics Department Advanced Higher Notes Teacher Version

To Feel a Force Chapter 7 Static equilibrium - torque and friction

RELIABILITY is an important concept in the design

Explosive Contagion in Networks (Supplementary Information)

Lecture 18: Graph Isomorphisms

A Crash Course in (2 2) Matrices

Electrostatics (Electric Charges and Field) #2 2010

TAMPINES JUNIOR COLLEGE 2009 JC1 H2 PHYSICS GRAVITATIONAL FIELD

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

Analytical time-optimal trajectories for an omni-directional vehicle

Data Structures Week #10. Graphs & Graph Algorithms

Upward order-preserving 8-grid-drawings of binary trees

On the ratio of maximum and minimum degree in maximal intersecting families

ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE

Math 1105: Calculus I (Math/Sci majors) MWF 11am / 12pm, Campion 235 Written homework 3

On the Quasi-inverse of a Non-square Matrix: An Infinite Solution

Fractional Zero Forcing via Three-color Forcing Games

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012

Non-Linear Dynamics Homework Solutions Week 2

. Using our polar coordinate conversions, we could write a

Compactly Supported Radial Basis Functions

On decompositions of complete multipartite graphs into the union of two even cycles

Relating Branching Program Size and. Formula Size over the Full Binary Basis. FB Informatik, LS II, Univ. Dortmund, Dortmund, Germany

SUFFICIENT CONDITIONS FOR MAXIMALLY EDGE-CONNECTED AND SUPER-EDGE-CONNECTED GRAPHS DEPENDING ON THE CLIQUE NUMBER

On the ratio of maximum and minimum degree in maximal intersecting families

arxiv: v1 [math.co] 1 Apr 2011

On the Comparison of Stability Analysis with Phase Portrait for a Discrete Prey-Predator System

PHYS 1444 Lecture #5

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations

As is natural, our Aerospace Structures will be described in a Euclidean three-dimensional space R 3.

VECTOR MECHANICS FOR ENGINEERS: STATICS

EELE 3331 Electromagnetic I Chapter 4. Electrostatic fields. Islamic University of Gaza Electrical Engineering Department Dr.

Symmetries of embedded complete bipartite graphs

Chapter Sixteen: Electric Charge and Electric Fields

Chapter 7. Kleene s Theorem. 7.1 Kleene s Theorem. The following theorem is the most important and fundamental result in the theory of FA s:

Chromatic number and spectral radius

Analysis of simple branching trees with TI-92

Suborbital graphs for the group Γ 2

QUESTION 1 [25 points]

Physics 107 TUTORIAL ASSIGNMENT #8

(read nabla or del) is defined by, k. (9.7.1*)

Output-Sensitive Algorithms for Computing Nearest-Neighbour Decision Boundaries

OLYMON. Produced by the Canadian Mathematical Society and the Department of Mathematics of the University of Toronto. Issue 9:2.

working pages for Paul Richards class notes; do not copy or circulate without permission from PGR 2004/11/3 10:50

The geometric construction of Ewald sphere and Bragg condition:

ENGI 4430 Non-Cartesian Coordinates Page xi Fy j Fzk from Cartesian coordinates z to another orthonormal coordinate system u, v, ˆ i ˆ ˆi

The Congestion of n-cube Layout on a Rectangular Grid S.L. Bezrukov J.D. Chavez y L.H. Harper z M. Rottger U.-P. Schroeder Abstract We consider the pr

FEASIBLE FLOWS IN MULTICOMMODITY GRAPHS. Holly Sue Zullo. B. S., Rensselaer Polytechnic Institute, M. S., University of Colorado at Denver, 1993

Information Retrieval Advanced IR models. Luca Bondi

CALCULUS II Vectors. Paul Dawkins

INTRODUCTION. 2. Vectors in Physics 1

CHAPTER 25 ELECTRIC POTENTIAL

Exceptional regular singular points of second-order ODEs. 1. Solving second-order ODEs

A thermodynamic degree of freedom solution to the galaxy cluster problem of MOND. Abstract

An analysis of the fixation probability of a mutant on special classes of non-directed graphs

AP Physics C: Electricity and Magnetism 2001 Scoring Guidelines

Inverse Square Law and Polarization

Moment. F r F r d. Magnitude of moment depends on magnitude of F and the length d

THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX. Jaejin Lee

An intersection theorem for four sets

2 E. on each of these two surfaces. r r r r. Q E E ε. 2 2 Qencl encl right left 0

Hydroelastic Analysis of a 1900 TEU Container Ship Using Finite Element and Boundary Element Methods

15 B1 1. Figure 1. At what speed would the car have to travel for resonant oscillations to occur? Comment on your answer.

Vector d is a linear vector function of vector d when the following relationships hold:

MODULE 5a and 5b (Stewart, Sections 12.2, 12.3) INTRO: In MATH 1114 vectors were written either as rows (a1, a2,..., an) or as columns a 1 a. ...

A Metric on the Space of Reduced Phylogenetic Networks

Likelihood vs. Information in Aligning Biopolymer Sequences. UCSD Technical Report CS Timothy L. Bailey

Transcription:

g0 GRPHS Hanan Samet ompute Science epatment and ente fo utomation Reseach and Institute fo dvanced ompute Studies Univesity of Mayland ollege Pak, Mayland 0 e-mail: hjs@umiacs.umd.edu opyight 199 Hanan Samet hese notes may not e epoduced y any means (mechanical o electonic o any othe) without the expess witten pemission of Hanan Samet

GRPH (G) g1 Genealization of a tee 1. no longe a distinguished node called the oot implies no need to distinguish etween leaf and nonleaf nodes. two nodes can e linked y moe than one sequence of edges Fomally: set of vetices (V) and edges () joining them, with at most one edge joining any pai of vetices (V 0, V 1,, V n ): path of length n fom V 0 to V n (chain) Simple Path: distinct vetices (elementay chain) onnected: path etween any two vetices of G ycle: simple path of length 3 fom V 0 to V 0 (length in tems of edges) Plana: cuves intesect only at points of gaph egee: nume of edges intesecting at the node Isomophic: if thee is a one-to-one coespondence etween nodes and edges of two gaphs opyight 1998 y Hanan Samet

SMPL GRPH PROLM g Given n people at a paty who shake hands, show that at the paty s end, an even nume of people have shaken hands with an odd nume of people heoem: Fo any gaph G an even nume of nodes have an odd degee Poof: 1. each edge joins nodes. each edge contiutes to the sum of degees 3. sum of degees is even. thus an even nume of nodes with odd degee opyight 1998 y Hanan Samet

FR RS g3 onnected gaph with no cycles Given G as a fee tee with n vetices 1. onnected, ut not so if any edge is emoved. One simple path fom V to V ( V V ) 3. No cycles and n 1 edges. G is connected with n 1 edges F G iffeences fom egula tees: 1. No identification of oot. No distinction etween teminal and anch nodes opyight 1998 y Hanan Samet

FR SURS g efinition: set of edges such that all the vetices of the gaph ae connected to fom a fee tee x: distiution of telephone netwoks London pl l ln Pais p Rio de Janeio n New Yok p n uenos ies opyight 1998 y Hanan Samet

FR SURS g efinition: set of edges such that all the vetices of the gaph ae connected to fom a fee tee x: distiution of telephone netwoks London pl l ln Pais p Rio de Janeio n New Yok p n uenos ies Fee sutee opyight 1998 y Hanan Samet

FR SURS 3 z g efinition: set of edges such that all the vetices of the gaph ae connected to fom a fee tee x: distiution of telephone netwoks London pl l ln Pais p Rio de Janeio n New Yok p n uenos ies Fee sutee Given: connected gaph G n nodes () m edges (8) yclomatic Nume = nume of edges that must e deleted to yield a fee tee ( = m n + 1 ) opyight 1998 y Hanan Samet

IR GRPH g efinition: gaph with diection attached to the edges (V 0, V 1,, V n ): lementay path: path of length n fom V 0 to V n all vetices ae distinct icuit: cycle (ut can have length 1 o ) lementay icuit: all vetices ae distinct Indegee: Outdegee: Stongly onnected: path fom any V to any V Rooted: at least one V with paths to all V V Note: stongly connected implies ooted ut not vice vesa opyight 1998 y Hanan Samet

SRUURS FOR GRPHS g6 Must decide what infomation is to e accessile and with what ease Most impotant infomation conveyed y a gaph is connectivity which is indicated y its edges wo choices 1. vetex-ased keeps tack of nodes connected to each node can implement as aay of lists a. one enty fo each vetex p. [p] is a list of all vetices P that ae connected to p y vitue of the existence of an edge etween p and q whee q P (also known as an adjacency list). edge-ased keeps tack of edges usually epesented as a list of pais of fom (p q) whee thee is an edge etween vetices p and q dawack: need to seach entie set to detemine edges connected to a paticula vetex opyight 1998 y Hanan Samet

SRUURS FOR GRPHS g6 Must decide what infomation is to e accessile and with what ease Most impotant infomation conveyed y a gaph is connectivity which is indicated y its edges wo choices 1. vetex-ased keeps tack of nodes connected to each node can implement as aay of lists a. one enty fo each vetex p. [p] is a list of all vetices P that ae connected to p y vitue of the existence of an edge etween p and q whee q P (also known as an adjacency list). edge-ased keeps tack of edges usually epesented as a list of pais of fom (p q) whee thee is an edge etween vetices p and q dawack: need to seach entie set to detemine edges connected to a paticula vetex opyight 1998 y Hanan Samet

JNY MRIX g Hyid appoach Good fo epesenting a diected gaph ij = 1 if an edge exists fom i to j ij = 0 othewise = adjacency matix of distance Somewhat wasteful of space as thee is an enty fo evey possile edge even though the aay is usually spase 1. in such cases, a vetex-ased epesentation such as an adjacency list is moe economical. adjacency matix is useful if want to detect if an edge exists etween two vetices cumesome when using a list as need to seach Useful if want to keep tack of all vetices eachale fom evey vetex c d x: Leftmost deivations d c oolean matices 1 + 1 = 1 1 1 = 1 1 + 0 = 1 1 0 = 0 1 = 0 0 = 0 0 + 0 = 0 n ycle of length n ii = 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 c 0 0 0 0 0 0 d 0 0 0 0 0 0 opyight 1998 y Hanan Samet

ONN GRPH g8 ef: thee exists path etween any two vetices of the gaph x: inay image 3 1 3 6 8 9 10 11 1 13 1 1 18 19 0 16 1 1 6 11 1 13 18 8 9 10 1 1 16 1 1. image gaph image elements ae vetices hoizontal and vetical adjacencies etween image elements ae edges. connected component laeling: detemine sepaate egions of inay image image gaph is stoed implicitly easy to access adjacent vetices given location of a vetex neithe a vetex-ased o edge-ased epesentation; instead algoithms ae ased on them 1. vetex-ased implies need to follow connectivity depth-fist o seed-filling appoach many page faults if disk-esident data. edge-ased detemines edges y examining image ow-y-ow only need to access two ows simultaneously good fo disk-esident data 3. oth take O(nume of image elements) time opyight 1998 y Hanan Samet 19 0

MINIMUM SPNNING R g9 ost ij associated with each edge fom i to j Find the fee sutee of G with minimum cost Solution: = connected nodes: initially { } U = unconnected nodes: initially { all nodes } 1. choose aitay node and place it in. select node in U that is closest to a node in and add edge; move node fom U to ; epeat until U is empty x: 1 3 1 Stat with node 0 is uilt y choosing: opyight 1998 y Hanan Samet

MINIMUM SPNNING R g9 ost ij associated with each edge fom i to j Find the fee sutee of G with minimum cost Solution: = connected nodes: initially { } U = unconnected nodes: initially { all nodes } 1. choose aitay node and place it in. select node in U that is closest to a node in and add edge; move node fom U to ; epeat until U is empty x: 1 3 1 Stat with node 0 is uilt y choosing: opyight 1998 y Hanan Samet

MINIMUM SPNNING R 3 z g9 ost ij associated with each edge fom i to j Find the fee sutee of G with minimum cost Solution: = connected nodes: initially { } U = unconnected nodes: initially { all nodes } 1. choose aitay node and place it in. select node in U that is closest to a node in and add edge; move node fom U to ; epeat until U is empty x: 1 3 1 Stat with node 0 is uilt y choosing: opyight 1998 y Hanan Samet

MINIMUM SPNNING R g 3 z g9 ost ij associated with each edge fom i to j Find the fee sutee of G with minimum cost Solution: = connected nodes: initially { } U = unconnected nodes: initially { all nodes } 1. choose aitay node and place it in. select node in U that is closest to a node in and add edge; move node fom U to ; epeat until U is empty x: 1 3 1 Stat with node 0 is uilt y choosing: 1 opyight 1998 y Hanan Samet

MINIMUM SPNNING R v g 3 z g9 ost ij associated with each edge fom i to j Find the fee sutee of G with minimum cost Solution: = connected nodes: initially { } U = unconnected nodes: initially { all nodes } 1. choose aitay node and place it in. select node in U that is closest to a node in and add edge; move node fom U to ; epeat until U is empty x: 1 3 1 Stat with node 0 is uilt y choosing: 1 3 opyight 1998 y Hanan Samet

MINIMUM SPNNING R 6 v g 3 z g9 ost ij associated with each edge fom i to j Find the fee sutee of G with minimum cost Solution: = connected nodes: initially { } U = unconnected nodes: initially { all nodes } 1. choose aitay node and place it in. select node in U that is closest to a node in and add edge; move node fom U to ; epeat until U is empty x: 1 3 1 Stat with node 0 is uilt y choosing: 1 3 1 opyight 1998 y Hanan Samet

MINIMUM SPNNING R z 6 v g 3 z g9 ost ij associated with each edge fom i to j Find the fee sutee of G with minimum cost Solution: = connected nodes: initially { } U = unconnected nodes: initially { all nodes } 1. choose aitay node and place it in. select node in U that is closest to a node in and add edge; move node fom U to ; epeat until U is empty x: 1 3 1 Stat with node 0 is uilt y choosing: 1 3 1 opyight 1998 y Hanan Samet

SHORS LMNRY HIN g10 Given node X0 in G find the shotest (cheapest) chain joining X0 with all the nodes of G Solution: = connected nodes: initially X0 U = unconnected nodes: initially all ut X0 = set of edges: initially empty 1. find the closest node in U to X0 (say X1). move X1 fom U to 3. add (X0, X1) to. fo each Xi in find Yi in U that is closest; choose Ym such that cost fom X0 to Ym is a minimum and add (Xm, Ym) to ; epeat until U is empty x: stat at node 0 1 3 1 Result: good fo designing flight schedules opyight 1998 y Hanan Samet

SHORS LMNRY HIN g10 Given node X0 in G find the shotest (cheapest) chain joining X0 with all the nodes of G Solution: = connected nodes: initially X0 U = unconnected nodes: initially all ut X0 = set of edges: initially empty 1. find the closest node in U to X0 (say X1). move X1 fom U to 3. add (X0, X1) to. fo each Xi in find Yi in U that is closest; choose Ym such that cost fom X0 to Ym is a minimum and add (Xm, Ym) to ; epeat until U is empty x: stat at node 0 1 3 1 Result: 0 (0,) good fo designing flight schedules opyight 1998 y Hanan Samet

SHORS LMNRY HIN 3 z g10 Given node X0 in G find the shotest (cheapest) chain joining X0 with all the nodes of G Solution: = connected nodes: initially X0 U = unconnected nodes: initially all ut X0 = set of edges: initially empty 1. find the closest node in U to X0 (say X1). move X1 fom U to 3. add (X0, X1) to. fo each Xi in find Yi in U that is closest; choose Ym such that cost fom X0 to Ym is a minimum and add (Xm, Ym) to ; epeat until U is empty x: stat at node 0 1 3 1 Result: 0 (0,) (0,) o (,) good fo designing flight schedules opyight 1998 y Hanan Samet

SHORS LMNRY HIN g 3 z g10 Given node X0 in G find the shotest (cheapest) chain joining X0 with all the nodes of G Solution: = connected nodes: initially X0 U = unconnected nodes: initially all ut X0 = set of edges: initially empty 1. find the closest node in U to X0 (say X1). move X1 fom U to 3. add (X0, X1) to. fo each Xi in find Yi in U that is closest; choose Ym such that cost fom X0 to Ym is a minimum and add (Xm, Ym) to ; epeat until U is empty x: stat at node 0 1 3 1 0 (0,) (0,) o (,) (,) Result: good fo designing flight schedules opyight 1998 y Hanan Samet

SHORS LMNRY HIN v g 3 z g10 Given node X0 in G find the shotest (cheapest) chain joining X0 with all the nodes of G Solution: = connected nodes: initially X0 U = unconnected nodes: initially all ut X0 = set of edges: initially empty 1. find the closest node in U to X0 (say X1). move X1 fom U to 3. add (X0, X1) to. fo each Xi in find Yi in U that is closest; choose Ym such that cost fom X0 to Ym is a minimum and add (Xm, Ym) to ; epeat until U is empty x: stat at node 0 1 3 1 0 (0,) (0,) o (,) (,) Result: (,) good fo designing flight schedules 3 opyight 1998 y Hanan Samet

SHORS LMNRY HIN 6 v g 3 z g10 Given node X0 in G find the shotest (cheapest) chain joining X0 with all the nodes of G Solution: = connected nodes: initially X0 U = unconnected nodes: initially all ut X0 = set of edges: initially empty 1. find the closest node in U to X0 (say X1). move X1 fom U to 3. add (X0, X1) to. fo each Xi in find Yi in U that is closest; choose Ym such that cost fom X0 to Ym is a minimum and add (Xm, Ym) to ; epeat until U is empty x: stat at node 0 1 3 1 0 (0,) (0,) o (,) (,) Result: (,) (,) o (,) good fo designing flight schedules 3 1 opyight 1998 y Hanan Samet

SHORS LMNRY HIN z 6 v g 3 z g10 Given node X0 in G find the shotest (cheapest) chain joining X0 with all the nodes of G Solution: = connected nodes: initially X0 U = unconnected nodes: initially all ut X0 = set of edges: initially empty 1. find the closest node in U to X0 (say X1). move X1 fom U to 3. add (X0, X1) to. fo each Xi in find Yi in U that is closest; choose Ym such that cost fom X0 to Ym is a minimum and add (Xm, Ym) to ; epeat until U is empty x: stat at node 0 1 3 1 Result: 0 (0,) (0,) o (,) (,) (,) (,) o (,) (,) good fo designing flight schedules 3 1 opyight 1998 y Hanan Samet

ULRIN HINS N YLS g11 When is it possile to tace a plana gaph without tacing any edge moe than once so that the pencil is neve emoved fom the pape? H I G F uleian cycle = edges ae all the edges of G (end up at point whee stated) heoem: an uleian cycle exists fo a connected gaph G wheneve all nodes have an even degee and vice vesa Poof: one diection: if an uleian cycle exists, then each time we ente a node y one edge we leave y anothe edge othe diection: moe complex uleian chain = joins nodes X and Y such that its edges ae all the edges of G (end up at point diffeent fom stating point) heoem: an uleian chain etween nodes X and Y fo a connected gaph G exists if and only if nodes X and Y have odd degee and the emaining nodes have even degee opyight 1998 y Hanan Samet

ULRIN HINS N YLS g11 When is it possile to tace a plana gaph without tacing any edge moe than once so that the pencil is neve emoved fom the pape? I H G F uleian chain uleian cycle Neithe uleian cycle = edges ae all the edges of G (end up at point whee stated) heoem: an uleian cycle exists fo a connected gaph G wheneve all nodes have an even degee and vice vesa Poof: one diection: if an uleian cycle exists, then each time we ente a node y one edge we leave y anothe edge othe diection: moe complex uleian chain = joins nodes X and Y such that its edges ae all the edges of G (end up at point diffeent fom stating point) heoem: an uleian chain etween nodes X and Y fo a connected gaph G exists if and only if nodes X and Y have odd degee and the emaining nodes have even degee opyight 1998 y Hanan Samet

HMILONIN HINS N YLS g1 When is it possile fo a salesman ased in city X to cove his teitoy in such a way that he neve visits a city moe than once, whee not evey city is connected diectly to anothe city? F F Hamiltonian cycle = cycle whee each vetex appeas once (salesman ends up at home!) Hamiltonian chain = chain whee each vetex appeas once (salesman need not end up at home!) Unlike uleian chains and cycles, no necessay and sufficient conditions exist fo a gaph G to have a Hamiltonian chain o cycle Sufficient condition: heoem: simple gaph with n 3 nodes such that fo any distinct nodes X and Y not joined y an edge and degee (X) + degee (Y) n, then G has a Hamiltonian cycle x: opyight 1998 y Hanan Samet

HMILONIN HINS N YLS g1 When is it possile fo a salesman ased in city X to cove his teitoy in such a way that he neve visits a city moe than once, whee not evey city is connected diectly to anothe city?? F F Hamiltonian cycle exists No Hamiltonian chain o cycle Hamiltonian chain exists (only one way fom to F) Hamiltonian cycle = F Hamiltonian cycle = cycle whee each vetex appeas once (salesman ends up at home!) Hamiltonian chain = chain whee each vetex appeas once (salesman need not end up at home!) Unlike uleian chains and cycles, no necessay and sufficient conditions exist fo a gaph G to have a Hamiltonian chain o cycle Sufficient condition: heoem: simple gaph with n 3 nodes such that fo any distinct nodes X and Y not joined y an edge and degee (X) + degee (Y) n, then G has a Hamiltonian cycle x: opyight 1998 y Hanan Samet