Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Similar documents
Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

Section 10.4 Connectivity (up to paths and isomorphism, not including)

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

CS 241 Analysis of Algorithms

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

CS 461, Lecture 17. Today s Outline. Example Run

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

Chapter 9. Graphs. 9.1 Graphs

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

1. Determine whether or not the following binary relations are equivalence relations. Be sure to justify your answers.

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

COMP108 Algorithmic Foundations

Solutions to Homework 5

Constructive Geometric Constraint Solving

0.1. Exercise 1: the distances between four points in a graph

Planar Upward Drawings

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

Graph Theory. Vertices. Vertices are also known as nodes, points and (in social networks) as actors, agents or players.

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

12. Traffic engineering

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

Numbering Boundary Nodes

QUESTIONS BEGIN HERE!

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

QUESTIONS BEGIN HERE!

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

N=4 L=4. Our first non-linear data structure! A graph G consists of two sets G = {V, E} A set of V vertices, or nodes f

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

Construction 11: Book I, Proposition 42

EE1000 Project 4 Digital Volt Meter

CSI35 Chapter 11 Review

Trees as operads. Lecture A formalism of trees

Walk Like a Mathematician Learning Task:

1 Introduction to Modulo 7 Arithmetic

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

Minimum Spanning Trees

CIT 596 Theory of Computation 1. Graphs and Digraphs

CS September 2018

This chapter covers special properties of planar graphs.

Last time: introduced our first computational model the DFA.

(a) v 1. v a. v i. v s. (b)

Present state Next state Q + M N

Page 1. Question 19.1b Electric Charge II Question 19.2a Conductors I. ConcepTest Clicker Questions Chapter 19. Physics, 4 th Edition James S.

Instructions for Section 1

Discovering Pairwise Compatibility Graphs

ECE 407 Computer Aided Design for Electronic Systems. Circuit Modeling and Basic Graph Concepts/Algorithms. Instructor: Maria K. Michael.

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

Polygons POLYGONS.

Scientific Programming. Graphs

Aquauno Video 6 Plus Page 1

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

Section 3: Antiderivatives of Formulas

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

The Equitable Dominating Graph

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x)

Seven-Segment Display Driver

Compression. Compression. Compression. This part of the course... Ifi, UiO Norsk Regnesentral Vårsemester 2005 Wolfgang Leister

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 23, April 5, 2016

Graph Contraction and Connectivity

CMSC 451: Lecture 2 Graph Basics Thursday, Aug 31, 2017

IEEE TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. TK, NO. TK, MONTHTK YEARTK 1. Hamiltonian Walks of Phylogenetic Treespaces

Garnir Polynomial and their Properties

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski

TOPIC 5: INTEGRATION

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

The Plan. Honey, I Shrunk the Data. Why Compress. Data Compression Concepts. Braille Example. Braille. x y xˆ

Steinberg s Conjecture is false

On Local Transformations in Plane Geometric Graphs Embedded on Small Grids

arxiv: v1 [math.co] 15 Dec 2015

Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c

Transcription:

Grphs CSC 1300 Disrt Struturs Villnov Univrsity

Grphs Grphs r isrt struturs onsis?ng of vr?s n gs tht onnt ths vr?s. Grphs n us to mol: omputr systms/ntworks mthm?l rl?ons logi iruit lyout jos/prosss f Qus%ons n isomorphism n yls/pths n plnrity n oloring

Grphs: Bsi Trminology A grph is fin s G = (V, E) with th st of vr?s V n st of gs E Two vr?s u n v in n unirt grph G r jnt (or nighors) if {u, v} is n g of G. Th g is si to onnt (or to inint with) u n v. orr of grph = numr of vr?s G = ({v 1, v 2,,v 3 }, { 1, 2 }) grph of orr 3 g: g 2 onnts v 2 n v 3 v 2 v 3 2 1 v 1 G

Dirt Grphs By fini?on, th gs of irt grph r orr pirs. In irt grph, if w hv g = (u,v), thn u is si to jnt to v, th trminl vrtx v is si to jnt from u, th ini2l vrtx 1 = (,) 2 = (,) 3 = (,) 4 = (,) 5 = (,)

Typs of Grphs Typ Egs Multipl Egs? Simpl grph Unirt No No Multigrph Unirt Ys No Psuogrph Unirt Ys Ys Dirt grph Dirt No Ys Dirt multigrph Dirt Ys Ys Loops? Trminology vris sur to hk fini?ons whn onsul?ng othr ooks/r?ls

Dgr of vrtx Th gr of vrtx v is th numr of gs inint on v. Dnot g(v) A loop on v ontriuts 2 to th g(v) Exmpl: g() = 3 g() = 1 g() = 5 g() = 0 g() = 1

Hnshking Lmm In n unirt grph, th sum of th grs of th vr?s is twi th numr of gs. Thrfor, th sum of th grs of ll th vr?s is vn. Σ g(v) = 2 E. v V Corollry: An unirt grph hs n vn numr of vr?s of o gr.

Pth A wlk gins t vrtx v 0, follows n g 1 to v 1, follows nothr g to v 2 A wlk is rprsnt without gs whn thr r no prlll gs (v 0, v 1, v 2, v n ) Si to of lngth n A tril from v 0 to v n is wlk with no rpt gs. A pth from v 0 to v n is wlk with no rpt vr?s. A wlk is los if it strts n ns in th sm vrtx; othrwis th wlk is si to opn

Ciruits n yls A iruit is los tril of lngth grtr thn 2. Som yls: (,,,,,) (,,,,,,) (,,,,,,) (,,,,,,) (,,,,,) A yl (or simpl iruit) is iruit from v to v with no rpt vrtx, xpt v. 3-yl or tringl: yl of lngth 3 k-yl: yl of lngth k

Connt Grph A grph G is onnt if givn ny vr?s v 1 n v 2 in G, thr is pth from v 1 to v 2. Connt f Not Connt f onnt omponnts

Bipr?t Grph A simpl grph is ll ipr@t if its vrtx st V n pr??on into 2 isjoint sts V 1 n V 2 suh tht vry g in th grph onnts vrtx in V 1 to vrtx in V 2. Bipr%t V 1 = {,,} V 2 = {,} Not Bipr%t

Ai?onl onpts (s txt) mul?pr?t rig ut- vrtx isonnt onnt omponnt

Spil Grphs Cyl C n Cyl P n Whls W n Complt grph K n Complt Bipr?t K n,m 2-rgulr: ll vr?s hv gr 2 n-rgulr: ll vr?s hv gr n. Tr: onnt grph with no yls Forst: grph with no yls

Complmnt Lt G = (V, E) Th omplmnt G = (V, E ) whr E = {{u,v} u V n v V n {u,v} E} Exmpl: Wht is th omplmnt of G 1? G 1 f

Union Th union of G 1 =(V 1,E 1 ) n G 2 =(V 2,E 2 ) is th grph: Exmpl: G 1 G 2 = (V 1 V 2, E 1 E 2 ) G 1 G 2 f G 1 G 2 f A onnt omponnt of grph is sugrph tht is onnt.

Sugrph H is sugrph of G iff V(H) V(G) n E(H) E(G) Exmpl: G 2 is sugrph of G 1 G H f

Sugrphs H is n inu sugrph of G iff whnvr two vr?s of H r jnt in G, thy r lso jnt in H. in othr wors, H onsists of sust of G s vr?s n ll th gs twn thm A sugrph H of grph G is spnning sugrph of G iff V(H) = V(G).

V Rprsnt?on of Grphs E {{,,,, }, {{,}, {,}, {,}, {,}, {,}, {,}, {,}} 1 2 4 7 5 3 mul?st rprsnt?on (llows rp??on) 6 Ajny list Ajny mtrix :,, :, :, :,, :,, 0 1 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 0 2 1 0 0 2 0

Isomorphism It mns two grphs r ssn?lly th sm (my rwn iffrntly n r-ll) Sm numr of vr?s Sm numr of gs Sm gr squn G 1 f G 2 Som?ms it is hr to tll r ths ssn?lly th sm grph? 2 4 nssry ut NOT suffiint oni?ons 1 6 3 5

Isomorphism Dfini?on: Two grphs G 1, G 2 r isomorphi iff thr xists ij?on h : V(G 1 ) à V(G 2 ) suh tht {v, w} E(G 1 ) iff {h(v), h(w)} E(G 2 ) In othr wors, h is ij?on twn th vr?s of th two grphs tht prsrvs gs In this s, th isomorphism fun?on is th in?ty fun?on. 1 2 5 6 3 4 6 4 5 2 1 3 h(1) = 1 h(2) = 2 h(3) = 3 h(4) = 4 h(5) = 5 h(6) = 6

Isomorphism Dfini?on: Two grphs G 1, G 2 r isomorphi iff thr xists ij?on h : V(G 1 ) à V(G 2 ) suh tht {v, w} E(G 1 ) iff {h(v), h(w)} E(G 2 ) In othr wors, h is ij?on twn th vr?s of th two grphs tht prsrvs gs if w rnumr th vr?s, th grphs r s?ll isomorphi, ut w gt iffrnt isomorphism fun?on 1 2 5 6 3 4 1 4 5 6 2 3 h(1) = 4 h(2) = 3 h(3) = 6 h(4) = 2 h(5) = 1 h(6) = 5

Isomorphism It mns two grphs r ssn?lly th sm (my rwn iffrntly n r-ll) Sm numr of vr?s Sm numr of gs Sm gr squn G 1 Som?ms it is hr to tll r ths ssn?lly th sm grph? f G 2 2 4 nssry ut NOT suffiint oni?ons 1 NO G 1 is 3-rgulr, whrs G 2 is not (g, vrtx 5 hs gr 2) 6 3 5

Isomorphism G 1 Som?ms it is hr to tll r ths ssn?lly th sm grph? f f G 2 YES è Isomorphism fun?on: h() = 5 h() = 3 h() = h() = 6 h() = h(f) = 3 1 2 5 6 4