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

Similar documents
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

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

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

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

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

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

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

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

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

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

Planar Upward Drawings

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

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

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

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

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

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

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

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

COMP108 Algorithmic Foundations

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

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

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

Minimum Spanning Trees

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

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

12. Traffic engineering

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

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

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

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?

CS 241 Analysis of Algorithms

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

QUESTIONS BEGIN HERE!

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

Constructive Geometric Constraint Solving

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

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

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

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

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

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

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

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

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

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

QUESTIONS BEGIN HERE!

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

Present state Next state Q + M N

Chapter 9. Graphs. 9.1 Graphs

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

CSI35 Chapter 11 Review

Garnir Polynomial and their Properties

Numbering Boundary Nodes

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

EE1000 Project 4 Digital Volt Meter

Scientific Programming. Graphs

Spanning Trees. BFS, DFS spanning tree Minimum spanning tree. March 28, 2018 Cinda Heeren / Geoffrey Tien 1

This chapter covers special properties of planar graphs.

Section 3: Antiderivatives of Formulas

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

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

(Minimum) Spanning Trees

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

Seven-Segment Display Driver

GREEDY TECHNIQUE. Greedy method vs. Dynamic programming method:

Analysis for Balloon Modeling Structure based on Graph Theory

The University of Sydney MATH 2009

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

Complete Solutions for MATH 3012 Quiz 2, October 25, 2011, WTT

Minimum Spanning Trees

Discovering Pairwise Compatibility Graphs

Steinberg s Conjecture is false

CS September 2018

Solutions to Homework 5

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

Trees as operads. Lecture A formalism of trees

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

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

CMPS 2200 Fall Graphs. Carola Wenk. Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk

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

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

Designing A Concrete Arch Bridge

Walk Like a Mathematician Learning Task:

Preview. Graph. Graph. Graph. Graph Representation. Graph Representation 12/3/2018. Graph Graph Representation Graph Search Algorithms

Decimals DECIMALS.

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

10/30/12. Today. CS/ENGRD 2110 Object- Oriented Programming and Data Structures Fall 2012 Doug James. DFS algorithm. Reachability Algorithms

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

Chem 104A, Fall 2016, Midterm 1 Key

Lecture 2: January 27

Problem solving by search

Lecture 11 Waves in Periodic Potentials Today: Questions you should be able to address after today s lecture:

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

Plan. I Gale-Shapley Running Time. I Graphs. I Motivation and definitions I Graph traversal: BFS and DFS

Lecture 20: Minimum Spanning Trees (CLRS 23)

Week 3: Connected Subgraphs

Transcription:

4/25/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 2 Eulr s rig prolm (Brigs of Konigsrg Prolm) Ciruits Rivr Btwn Eg Bnk D A An Cyl Eg Btwn Eg Btwn A n CA n C A spil yl tht psss through vry vrtx (or g) in grph xtly on n rturns k to th pl it strt. Eg Btwn Isln C C n D Isln D Eg Btwn Rivr Eg Btwn B n Eg C Btwn B n D Bnk B n C B Eulr Is it possil to trvl ross vry rig without rossing ny rig mor thn on? hmp://yskrthi.worprss.om/2006/07/31/ulr- n- th- rigs- of- konigsrg Eulr s rig prolm (Brigs of Konigsrg Prolm) 4 Eulr pths/iruits Eulr pth: A pth tht visits h g only on in th grph Eulr iruit: A yl tht visits h g only on in th grph Eulr Is it possil to trvl ross vry rig without rossing ny rig mor thn on? hmp://yskrthi.worprss.om/2006/07/31/ulr- n- th- rigs- of- konigsrg 5 1

Exmpl: Dos ny grph hv n Eulr iruit? Exmpl: Dos ny grph hv n Eulr pth? 7 8 Exmpl: Dos ny grph hv n Eulr iruit? Eulr pths/iruits f g Is thr simpl ritrion tht llows us to trmin whthr grph hs n Eulr iruit or pth? 9 Eulr Pths Eulr Ciruits Thorm: A onnt multigrph hs n Eulr pth iff it hs xtly two vrtis of o gr Thorm: A onnt multigrph with t lst two vrtis hs n Eulr iruit iff h vrtx hs n vn gr. 2

Mohmm s Simitrs Hmiltonin Pths/Ciruits f Cn Mohmm s simitrs rwn without lizing pnil n th rwing gins n ns t th sm point? i g h j k A Hmiltonin pth/iruit: pth/iruit tht visits vry vrtx xtly on. Dfin for irt n unirt grphs. Is thr n ffiint wy to trmin whthr grph hs Hmiltonin iruit? - - f- i- - - - - g- h- j- i- k- g- - - 13 Dos ny grph hv Hmilton iruit or Hmilton pth? DIRAC s Thorm If G is simpl grph with n vrtis with n 3 suh tht th gr of vry vrtx in G is t lst n/2, thn G hs Hmilton iruit. 15 16 Or s Thorm Hmiltonin Pths/Ciruits If G is simpl grph with n vrtis with n 3 suh tht g(u)+g(v) n for vry pir of nonjnt vrtis u n v in G, thn G hs Hmilton iruit. Dir n Or s thorms provi suffiint onition for onnt simpl grph to hv Hmilton iruit. Thy o NOT provi nssry onition for th xistn of Hmilton iruit This prolm longs to lss of prolms for whih it is liv thr is no ffiint (polynomil running tim) lgorithm. 17 3

4/25/12 Th Trvling Slsmn Prolm (TSP) Exmin ll possil Hmilton iruits n slt on of minimum totl lngth With n itis.. TSP: Givn list of i^s n thir pirwis istns, fin shortst possil tour tht visits h ity xtly on. (n-1)! Diffrnt Hmilton iruits Ignor th rvrs orr iruits (n-1)!/2 13,509 i^s n towns in th US tht hv mor thn 500 rsints An op^ml TSP tour through Grmny s 15 lrgst i^s (on out of 14!/2) With 50 itis 12,413,915,592,536,072,670,862,289,04 7,373,375,038,521,486,354,677,760,000, 000,000 routs hmp://www.tsp.gth.u/ 20 Th thr u^li^s prolm Hous A Using Hmilton Ciruits Hous B? Plnr Grphs You r signing mirohip onntions twn ny two units nnot ross Hous C 21 Plnr Grphs You r signing mirohip onntions twn ny two units nnot ross Th grph sriing th hip must plnr hmp://www.mom.org/ Is this grph plnr? plnr non- plnr hmp://n.wikipi.org/wiki/plnr_grph 24 4

Chip Dsign You wnt mor thn plnrity: th lngths of th onntions n to s short s possil (fstr, n lss ht is gnrt) hmp://www.mom.org/ 5