CMSC 451: Lecture 4 Bridges and 2-Edge Connectivity Thursday, Sep 7, 2017

Similar documents
Depth First Search. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong

The University of Sydney MATH 2009

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees

Lecture 20: Minimum Spanning Trees (CLRS 23)

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

Weighted Graphs. Weighted graphs may be either directed or undirected.

Strongly connected components. Finding strongly-connected components

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

Divided. diamonds. Mimic the look of facets in a bracelet that s deceptively deep RIGHT-ANGLE WEAVE. designed by Peggy Brinkman Matteliano

Theorem 1. An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices.

4.1 Interval Scheduling. Chapter 4. Greedy Algorithms. Interval Scheduling: Greedy Algorithms. Interval Scheduling. Interval scheduling.

(Minimum) Spanning Trees

Graph Search (6A) Young Won Lim 5/18/18

In which direction do compass needles always align? Why?

Minimum Spanning Trees (CLRS 23)

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017

Improving Union. Implementation. Union-by-size Code. Union-by-Size Find Analysis. Path Compression! Improving Find find(e)

Applications of trees

Lecture II: Minimium Spanning Tree Algorithms

Minimum Spanning Trees (CLRS 23)

CSE 332. Data Structures and Parallelism

CSE 332. Graphs 1: What is a Graph? DFS and BFS. Data Abstractions. CSE 332: Data Abstractions. A Graph is a Thingy... 2

Platform Controls. 1-1 Joystick Controllers. Boom Up/Down Controller Adjustments

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

SAMPLE CSc 340 EXAM QUESTIONS WITH SOLUTIONS: part 2

Closed Monochromatic Bishops Tours

Having a glimpse of some of the possibilities for solutions of linear systems, we move to methods of finding these solutions. The basic idea we shall

Graphs Depth First Search

Face Detection and Recognition. Linear Algebra and Face Recognition. Face Recognition. Face Recognition. Dimension reduction

Planar convex hulls (I)

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

Single Source Shortest Paths (with Positive Weights)

MINI POST SERIES BALUSTRADE SYSTEM INSTALLATION GUIDE PRODUCT CODE: MPS-RP

d e c b a d c b a d e c b a a c a d c c e b

MATERIAL SEE BOM ANGLES = 2 FINISH N/A

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

2 Trees and Their Applications

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

23 Minimum Spanning Trees

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

DOCUMENT STATUS: RELEASE

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

The R-Tree. Yufei Tao. ITEE University of Queensland. INFS4205/7205, Uni of Queensland

Math 166 Week in Review 2 Sections 1.1b, 1.2, 1.3, & 1.4

Exam 2 Solutions. Jonathan Turner 4/2/2012. CS 542 Advanced Data Structures and Algorithms

DOCUMENT STATUS: LA-S5302-XXXXS LA, SSS, TRICEPS EXTENSION VERY

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

Functions and Graphs 1. (a) (b) (c) (f) (e) (d) 2. (a) (b) (c) (d)

CS 103 BFS Alorithm. Mark Redekopp


CSE 332. Graphs 1: What is a Graph? DFS and BFS. Data Abstractions. CSE 332: Data Abstractions. A Graph is a Thingy... 2

EE1000 Project 4 Digital Volt Meter

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

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

Phylogenetic Tree Inferences Using Quartet Splits. Kevin Michael Hathcock. Bachelor of Science Lenoir-Rhyne University 2010

On Hamiltonian Tetrahedralizations Of Convex Polyhedra

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

Tangram Fractions Overview: Students will analyze standard and nonstandard

Priority Search Trees - Part I

Self-Adjusting Top Trees

QUESTIONS BEGIN HERE!

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

MATERIAL SEE BOM ANGLES = 2 > 2000 DATE MEDIUM FINISH

23 Minimum Spanning Trees

The Constrained Longest Common Subsequence Problem. Rotem.R and Rotem.H

DOCUMENT STATUS: MINTP0 E-ST5080, BASE, NO DISPLAY VENDOR: 15.5 INCH MATERIAL SEE BOM FINISH REVISION HISTORY ITEM NO. PART NUMBER DESCRIPTION

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

ELECTRONIC SUPPLEMENTARY INFORMATION

Planar Upward Drawings

SAMPLE LITANY OF THE SAINTS E/G. Dadd9/F. Aadd9. cy. Christ, have. Lord, have mer cy. Christ, have A/E. Dadd9. Aadd9/C Bm E. 1. Ma ry and. mer cy.

An Introduction to Clique Minimal Separator Decomposition

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

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


CS September 2018

OpenMx Matrices and Operators

17 Basic Graph Properties

Present state Next state Q + M N

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

Dental PBRN Study: Reasons for replacement or repair of dental restorations

{nuy,l^, W%- TEXAS DEPARTMENT OT STATE HEALTH SERVICES

18 Basic Graph Properties

An action with positive kinetic energy term for general relativity. T. Mei

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

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

Graphs Breadth First Search

Computer Graphics. Viewing & Projections

A Simple Method for Identifying Compelled Edges in DAGs

DOCUMENT STATUS: CORE HEALTH & FITNESS, LLC IL-D2002-XXAAX IP,DUAL ADJUSTIBLE PULLEY MATERIAL SEE BOM FINISH N/A N/A SHEET SIZE: B SCALE: 1:33.

n

46 D b r 4, 20 : p t n f r n b P l h tr p, pl t z r f r n. nd n th t n t d f t n th tr ht r t b f l n t, nd th ff r n b ttl t th r p rf l pp n nt n th

I N A C O M P L E X W O R L D


T h e C S E T I P r o j e c t

L.3922 M.C. L.3922 M.C. L.2996 M.C. L.3909 M.C. L.5632 M.C. L M.C. L.5632 M.C. L M.C. DRIVE STAR NORTH STAR NORTH NORTH DRIVE

GEORGE F. JOWETT. HOLDER -of NUMEROUS DIPLOMAS and GOLD. MEDALS for ACTUAL MERIT

One-Dimensional Computational Topology

F102 1/4 AMP +240 VDC SEE FIGURE 5-14 FILAMENT AND OVEN CKTS BLU J811 BREAK-IN TB103 TO S103 TRANSMITTER ASSOCIATED CAL OFF FUNCTION NOTE 2 STANDBY

Vr Vr

22 t b r 2, 20 h r, th xp t d bl n nd t fr th b rd r t t. f r r z r t l n l th h r t rl T l t n b rd n n l h d, nd n nh rd f pp t t f r n. H v v d n f

Transcription:

Rn: Not ovr n or rns. CMSC 451: Ltr 4 Brs n 2-E Conntvty Trsy, Sp 7, 2017 Hr-Orr Grp Conntvty: (T ollown mtrl ppls only to nrt rps!) Lt G = (V, E) n onnt nrt rp. W otn ssm tt or rps r onnt, t somtms t s srl to v r r o onntvty. For xmpl, rp n sonnt tro t rmovl o snl or vrtx, t onntvty s rtr rl. Hr r som ntons: Br: Any wos rmovl rslts n sonnt rp (s F. 1). 2-E Connt: A rp s 2- onnt t ontns no rs (s F. 1). In nrl rp s k- onnt t rmovl o ny k 1 s rslts n onnt rp. Hr r lso vrtx-s qvlnts: Ct Vrtx: Any vrtx wos rmovl (totr wt t rmovl o ny nnt s) rslts n sonnt rp (s F. 1). Bonnt: A rp s onnt t ontns no t vrts (s F. 1()). In nrl rp s k-onnt t rmovl o ny k 1 vrts rslts n onnt rp. Not onnt nor 2-E Connt t vrtx 2-E Connt Bonnt t vrtx r () F. 1: Hr-orr onntvty n rps W wll prsnt n O(n + m)-tm lortm or omptn ll t rs o n nrt rp. (T lortm n mo to ompt t t vrts s wll.) Alto w wll not prov t, sl t ot 2- onnt rps s tt twn vry pr o stnt vrts, tr r t lst two -sont pts twn tm. (Ts s onsqn o mor nrl rslt ll Mnr s Torm.) I rp s onnt, tn or vry pr o s tr s smpl yl (tt s yl tt os not rpt ny vrts) tt ontns ot s. Ltr 4 1 Fll 2017

Fnn Brs tro DFS: An ovos, t slow, wy or omptn rs wol to lt n tn pply DFS to trmn wtr t rsltn rp rmns onnt. Howvr, ts wol tk O(m(n + m)) tm. W wll s tt t s possl to nty ll t rs wt snl pplton o DFS n O(n + m) tm. W ssm tt G s onnt, w mpls tt tr s snl DFS tr. Rll tt t DFS tr onssts o two typs o s: tr s, w onnt prnt wt ts l n t DFS tr, n k s, w onnt (non-prnt) nstor wt (non-l) snnt. Sppos tt w r rrntly prossn vrtx n DFSvst, n w s n (, v) on to nor v o. I ts s k (tt s, v s n nstor o ) tn (, v) nnot r, s t tr s twn n v prov son wy to onnt ts vrts. Tror, w my lmt onsrton to wn (, v) s tr, tt s, v s not yt n sovr, n so w wll nvok DFSvst(v). Wl w r on ts, w wll kp trk o t k s n t str root t v. Osrv tt ll ts k s rmn ntrly wtn ts str (s F. 2) tn (, v) s r, sn ts rmovl ompltly sonnts ts str rom t rst o t tr. On t otr n, tr s vn snl k ln ot rom ts str, tn (, v) s not r. S k mst o rom wtn t str to propr nstor o v. By t Prntss Lmm, ts mns tt t ls to vrtx wos sovry tm s strtly smllr tn v s sovry tm. (Rll vrtx s nstors r sovr or t.) In smmry, w v stls t ollown lm. (, v) s r v (, v) s not r v F. 2: Contons or vrtx to t vrtx. Clm: An (, v) s r n only t s tr n (ssmn tt s t prnt o v) tr s no k wtn v s str tt ls to vrtx wos sovry tm s strtly smllr tn v s sovry tm. Trkn Bk Es: T ov lm provs s wt strtrl rtrzton o rs. How n w sn n lortm tt tsts ts onton? To o ts, w wll ntro n xlry qntty, w wll ompt s t DFS rns. W n Low[] = mn([], mn{[w] : k (v, w) wr v s snnt o. Ltr 4 2 Fll 2017

Not tt w s t trm snnt n t nonstrt sns, tt s, v my tsl. Inttvly, Low[] s t losst to t root tt yo n t n t tr y tkn ny on k rom tr or ny o ts snnts. (Bwr o ts notton: Low mns low sovry tm, not low n or rwn o t DFS tr. In t Low[] tns to n t tr, n t sns o n los to t root.) Also not tt yo my onsr ny snnt o, t yo my only ollow on k. To ompt Low[] w s t ollown smpl rls: Sppos tt w r prormn DFS on t vrtx. Intlzton: Low[] = []. Bk (, v): Low[] = mn(low[], [v]). Explnton: W v tt nw k omn ot o. I ts os to lowr -vl tn t prvos k tn mk ts t nw Low (s F. 3). Tr (, v): Low[] = mn(low[], Low[v]). Explnton: Sn v s n t str root t ny snl k lvn t tr root t v s snl k or t tr root t (s F. 3). Bk v [v] Low[] mn(low[], [v]) Tr Low[v] v Low[] mn(low[], Low[v]) F. 3: Ct Vrts n t nton o Low[]. T o lok low sows ow to ompt Low[] or ll vrts. W o not ot omptn ns tms, sn ty r not n or or prposs. Not tt tr s stlty n trmnn wtr n s k. Clrly, s n mst o to prvosly sovr vrtx (w s wy t s n t ls-ls), t w lso n to k tt ts vrtx s not s prnt. Rll tt vry o n nrt rp s rlt tw n t ny lst (wt v s nor o n s nor o v). W n to k tt w r not smply sn t tr n, t rom t l k to t prnt. To o ts, w k v s not s prnt, tt s v pr[]. Osrv tt on Low[] s ompt or ll vrts, w n tst wtr vn tr (pr[v], v) s r y tstn wtr tr s no k n v s str on to n rlr sovr vrtx, tt s, [v] = Low[v]. (Atlly, t tst s mor ntrlly stt s [v] Low[v], t y nton Low[v] [v], so tstn or qlty s qvlnt.) T nl o s sown n t o lok low. Ltr 4 3 Fll 2017

DFSvst() { mrk[] = sovr Low[] = [] = ++tm or (v n A()) { (mrk[v] == nsovr) { pr[v] = DFSvst(v) Low[] = mn(low[], Low[v]) ls (v!= pr[]) { Low[] = mn(low[], [v]) Moton o DFSvst or Low omptton // st sovry tm n nt Low // (,v) s tr // v s prnt s // pt Low[] // (,v) s k // pt Low[] nallbrs(g) { tm = 0 or ( n V) mrk[] = nsovr // ntlz Comptn Brs v DFS or ( n V) (mrk[] == nsovr) DFSVst() or (v n V) { = pr[v] (!= nll n [v] == Low[v]) otpt (, v) s n r // nsovr vrtx? //...strt nw sr r // k or t rs 2:2 1:1 8:8 [] : Low[] 4:4 5:4 3:2 9:8 7:2 10:8 Brs: (, ) (, ) (, ) 6:4 () F. 4: Comptn rs v DFS. Ltr 4 4 Fll 2017

Wrpp: W v sown ow to ompt rs n n nrt rp. Tr r nmr o ntrstn prolms tt w stll v not sss. Frst, w lm tt t s possl to pt ts lortm to ompt t vrts s wll. (T omptton o Low s t sm, t rnt onton s ppl to trmn w vrts r t vrts.) Son, rp ls to 2- onnt, t my srl to prtton t vrts o t rp nto 2- onnt omponnts. For xmpl, n F. 4() t omponnts onsst o {,,, {,,, {, n {,,. Ts n on y smpl xtnson s wll. (T vrts r stor on stk, n wnvr r s tt, w pop o n pproprt sst o t stk. W wll lv t tls s n xrs.) A smlr ppro n ppl to omptn t onnt omponnts o rp, w s prtton o t st o t rp. Ltr 4 5 Fll 2017