58
May 2014 Connectivity 1 Connected Graphs and Connectivity prepared and Instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University

Connected Graphs and Connectivity

  • Upload
    louisa

  • View
    55

  • Download
    0

Embed Size (px)

DESCRIPTION

Connected Graphs and Connectivity. prepared and Instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University. The Friendship Theorem. - PowerPoint PPT Presentation

Citation preview

Page 1: Connected Graphs and Connectivity

Connectivity 1May 2014

Connected Graphs and Connectivity

prepared and Instructed by Shmuel Wimer

Eng. Faculty, Bar-Ilan University

Page 2: Connected Graphs and Connectivity

Connectivity 2

The Friendship Theorem

May 2014

Theorem. (Erdös et. al. 1966) Let be a simple, -vertex graph, in which any two vertices (people) have exactly one common neighbor (friends). Then has a vertex of degree (everyone’s friend).

Proof. Suppose in contrary that . We first show that is regular. Consider two non adjacent vertices and , and assume w.l.o.g that .

Since and have a single common neighbor , has no subgraph. 𝑥 𝑦

𝑧1

𝑧 2

Page 3: Connected Graphs and Connectivity

Connectivity 3May 2014

We establish a one-to-one mapping of to .

For each denote by the common neighbor of and .

𝑥𝑁 (𝑥 ) 𝑦 𝑁 ( 𝑦 )𝑧

𝑣𝑓 (𝑣 )𝑣

𝑓 (𝑣 )impossible

is therefore one-to-one mapping from to , hence .

There is , hence for any non adjacent vertices of .

Page 4: Connected Graphs and Connectivity

Connectivity 4May 2014

Any other vertex is not a neighbor of at least one of , say ( has no ). By the same argument as above for and there is .

What about ? It could be the friend of all, but by the contrary assumption there is .

It has therefore one non adjacent vertex , and by same argument as above there is .

In conclusion . is therefore -regular.

We next look for a relation between and by counting the number of 2-edge paths in .

Page 5: Connected Graphs and Connectivity

Connectivity 5May 2014

By the theorem hypothesis, any two vertices have a unique common adjacent.

Picking two vertices yields a total of distinct 2-edge paths.

All in all there is .

For there are distinct paths, yielding a total of distinct 2-edge paths.

To investigate the possible values of , we examine the vertex adjacency matrix of .

Since is -regular, each row and column of has 1s.

Page 6: Connected Graphs and Connectivity

Connectivity 6May 2014

Let us consider .

Each row and column of has 1s. The diagonal of has therefore elements .

Since two vertices have one and only one common neighbor , there is .

is therefore , where is the matrix of all s and is the identity matrix.

the rank of is so it has an eigenvalue with multiplicity and eigenvalues with multiplicity .

has therefore one eigenvalue and eigenvalues .

Page 7: Connected Graphs and Connectivity

Connectivity 7May 2014

has therefore eigenvalues with total multiplicity and eigenvalue with multiplicity .

Since is simple, ‘s diagonal entries are all , so its trace is , and so is the sum of the eigenvalues.

Consequently, there is some integer (follows from the ) such that .

The only integers and solving is , implying , hence , contradicting the supposition . ■

The eigenvalues of are the square root of . By 2-edge path counting argument there is .

Page 8: Connected Graphs and Connectivity

Connectivity 8

Euler Tours

May 2014

A tour of a connected graph is a closed walk traversing each edge of a graph at least once.

Let be Eulerian and an Euler tour with initial and terminal vertex . Each time an internal vertex occurs, two edges are accounted.

It is called Euler tour if each edge is traversed exactly once. is Eulerian if it admits an Euler tour.

is therefore even for all , and also for .

Eulerian graph is therefore necessarily even.

Page 9: Connected Graphs and Connectivity

Connectivity 9May 2014

Proof. Let be a maximal trail but not closed. Since is open, the terminal edge has odd incident ’s edges.

But then has another non traversed incident edge which contradicts that is maximal. ■

Theorem. A finite graph (parallel edges and loops are allowed) is Eulerian iff it is connected and all its vertex degrees are even.

Proof. Necessity was shown. For sufficiency, Let be a maximal trail in (must be closed by the lemma).

Lemma. Every maximal trail in an even graph is closed.

Page 10: Connected Graphs and Connectivity

Connectivity 10May 2014

𝐺 ′𝑇𝑮

𝑣𝑒

Let be a maximal trail in , starting at along . By the lemma is closed.

If , let . is an even graph. There must be an edge incident to at a vertex .

Once the traversal of reached , we could switch to , consume its edges and return to v, a contradiction to being maximal trail at . ■

𝑇 ′

Page 11: Connected Graphs and Connectivity

Connectivity 11May 2014

Theorem. For a connected nontrivial graph with odd vertices (why even?), the minimum number of pairwise edge disjoint trails covering the edges is .

Proof. The internal nodes of trails contribute even degree, and their terminals odd degree.

A trail has two terminals at most (zero if it is a tour) hence trails at least are required.

One trail at least is required since . It was shown also that for one trail (a tour) suffices, so at least max is required for .

Page 12: Connected Graphs and Connectivity

Connectivity 12May 2014

Add an edge connecting each paired odd vertices. is connected and each vertex is even, hence an Euler tour exists.

Traversing the Euler tour, a new trail starts each time an edge of is traversed, yielding a total of edge-disjoint trail cover of . ■ G

𝐺 ′

To see that edge-disjoint trails cover , pair up the odd vertices of arbitrarily.

Page 13: Connected Graphs and Connectivity

Connectivity 13May 2014

Algorithm. (Fleury 1883, Eulerian trail construction)

Input: A connected graph with at most two odd vertices.

Initialization: Start at an odd vertex if exists, otherwise start arbitrarily at any vertex.

Iteration: Traverse from the current vertex any non cut-edge, unless there is no other alternative.

Theorem. If has one non trivial component and at most two odd vertices, then Fleury’s algorithm constructs an Eulerian trail.

Proof. By induction on . Immediate if .

Page 14: Connected Graphs and Connectivity

Connectivity 14May 2014

If is even, it has no cut-edge. Otherwise, the removal of that edge would leave two separate components, each with a single odd degree vertex, which is impossible. (why?)

Suppose the construction claim holds for .

Consider . turn to odd degree vertices. Starting from , by the induction hypothesis a Eulerian trail exists. Then close to a tour along .

Suppose has two odd vertices . If , starting from , the rest graph has by induction an Eulerian trail from to .

Page 15: Connected Graphs and Connectivity

Connectivity 15

?

May 2014

Since is connected, there is a path . Since is odd, there is an edge not on .

Assume first . Remove from . Is connected?

So let .

Yes, otherwise would have been a single odd vertex of its component, which is impossible. (why?)

𝑃𝑢

𝑥

𝑣𝑮

Page 16: Connected Graphs and Connectivity

Connectivity 16May 2014

has two odd vertices and .

By induction there is an Eulerian trail, which can then be extended by to an Eulerian trail of .

If then is even.

By induction there is an Eulerian tour with starting (and terminating) at . It is then extended into an Eulerian trail by . ■

Page 17: Connected Graphs and Connectivity

Layout of CMOS Compound Gates

May 2014 Connectivity 17

Page 18: Connected Graphs and Connectivity

Connectivity 18

The Chinese Postman Problem

May 2014

(Guan Meigu 1962) A postman has to traverse all the roads of a town (a graph ), where every road (an edge) has a positive weight (e.g. length, time, biting dogs ). The postman starts and ends at the same vertex.

If is even, an Eulerian tour is optimal. Otherwise, edges must be repeated (multigarph, parallel edges).Edges are duplicates to produce an even graph. The problem is therefore to minimize the total weight of edge duplicates producing an even graph.

Find a closed walk of minimum weight that traverses all the edges.

Page 19: Connected Graphs and Connectivity

Connectivity 19May 2014

Edges need not be multiplied more than once. (why?)

If an edge is used three or more times, two duplicates can be removed while stays even.

4 4

4 4

7

2

2

7

1 2 2 13

3

3

3

1 1

1 1

Cost: .

Cost: .

Better solution:.

Duplicated edge connecting odd and even vertices switch their evenness.

Page 20: Connected Graphs and Connectivity

Connectivity 20May 2014

Edge addition must proceed until an odd vertex is met.

(Edmonds and Johnson 1973). If there were only two odd vertices, a shortest path connecting those solves the problem.

Given odd vertices, a weighted graph is defined. An edge weight is the length of the shortest path in G connecting the corresponding vertices.

The problem turns into finding a minimum weight perfect matching in the above weighted , for which a polynomial algorithm exists. ■

Page 21: Connected Graphs and Connectivity

Connectivity 21

Connection in Digraphs

May 2014

A directed walk in a digraph is an alternating sequence of vertices and arcs , such that and are the tail and head vertices of the arc , respectively, .

is the portion of starting at and ending at .

𝝏+¿ (𝑿 )¿

𝑿 is the outgoing arcs connected to .

Page 22: Connected Graphs and Connectivity

Connectivity 22May 2014

Theorem. Given digraph , let . is reachable from iff , there is .

Proof. Let be a directed path from to . Consider any such that .

Let be reachable from and let be the last vertex on and its successor. Then and hence .

Conversely, suppose that is not reachable from , and let be the set of vertices reachable from .

There is . Since no vertex of is reachable from , the out-cut . ■

Page 23: Connected Graphs and Connectivity

Connectivity 23May 2014

Definition. A digraph is strongly connected if ordered vertex pair there is path in .

An Eulerian tour in implies .

This is also sufficient for the edges of to belong to a strongly connected component. The proofs are similar to those of undirected graphs.

Algorithm. (Directed Eulerian Tour)

Input. A digraph that is an orientation of a connected graph, satisfying .

Page 24: Connected Graphs and Connectivity

Connectivity 24May 2014

Step 1. Choose a vertex . Derive by reverting the edge directions of .

Construct a BFS spanning tree of rooted at . (It is possible since is strongly connected. Proven in next Theorem).

Step 2. Let be the reversal of . Designate the arc of .

Step 3. Construct an Eulerian tour from , where leaving from a vertex is on edge of only if all other outgoing arcs have already been used. ■

Since , a path exists for each , hence is strongly connected.

Page 25: Connected Graphs and Connectivity

Connectivity 25

𝑮

𝑻

𝑣

May 2014

𝑻 ′

𝑮 𝑮 ′𝑣

Page 26: Connected Graphs and Connectivity

Connectivity 26May 2014

Theorem. If is multi digraph with one non trivial component and , then the algorithm constructs an Eulerian tour of .

Proof. The construction of by BFS (oriented) must reach all . If it did not, let be the set of those reached and .

An arc within contributes one to the in-degree and one to the out-degree of ’s vertices.

is connected to only by entering arcs, otherwise could be expanded. Such arcs contribute only to the in-degree of ’s vertices.

Page 27: Connected Graphs and Connectivity

Connectivity 27May 2014

The total in-degree of ’s vertices is therefore greater than their total out-degree, which is impossible since . Hence .

The algorithm starts traversal from . We show that it must terminate at and consume .

Notice that all entering arcs of belong to .

The traversal leaves a vertex along an edge only after all the other out-arcs are consumed.

Since , it implies that all ’s in-arcs are also consumed, in particular, all those of .

Page 28: Connected Graphs and Connectivity

Connectivity 28May 2014

Finally, spans , so all the arcs must be traversed. ■

Therefore, entering into with an arc () implies that all the vertices and incident arcs of the sub tree rooted at are consumed.

Application. Testing the position of a rotating drum.

Is there a cyclic arrangement of binary digits, such that the -bit words obtained by successively sliding -bit window are all distinct?

By encoding the currently read -bit word (with a mounted sensor) the position of the drum is known.

Page 29: Connected Graphs and Connectivity

Connectivity 29May 2014

0 00

01

11

111

0

0

01

1

0

solves the problem for .

The problem can be solved using Eulerian digraph.

Associate the distinct ()-bit words with the vertices of a digraph .

Page 30: Connected Graphs and Connectivity

Connectivity 30May 2014

101 111

011

110

0 00

01

11

111

00

01

1

0Place an arc from sequence to sequence if the LSBs of a agree with the MSBs of .

000 010

001

100

1

1 1 1

1

11

10

000

0

00 0

Label an arc with the LSB of .

110

100

101

011

111

0

0

0

1

Page 31: Connected Graphs and Connectivity

Connectivity 31May 2014

For each sequence there are two out-going arcs labeled 0 and 1.

There are also two in-coming arcs labeled with the vertex’s code LSB. Hence is Eulerian.

head vertex

tail vertex

The -bit code obtained by appending the arc bit (LSB) to the bits at a tail vertex, agrees with the bits at the head vertex. ■

Page 32: Connected Graphs and Connectivity

Connectivity 32May 2014

Application. Street-Sweeping Problem.

Curbs of a city are described by a digraph .

Curbs are swept in the traffic direction. A two-way street implies two parallel oppositely directed arcs.

A one-way street implies two parallel arcs of same direction.

In NYC parking is prohibited form some street curbs each weekday to allow for street sweeping.

This defines a sub-graph of , consisting of the arcs available for sweeping on that day.

Page 33: Connected Graphs and Connectivity

Connectivity 33May 2014

The problem is how to sweep while minimizing deadheading time (no sweeping).

Each has a deadheading time .

If is Eulerian no deadheading time is needed.

Otherwise, arcs of are duplicated or arcs of are added (not being swept).

Let satisfy , , and satisfy , .

Set and . There is

Page 34: Connected Graphs and Connectivity

Connectivity 34May 2014

Since in the super-digraph the in and out degrees must be balanced, the additions are paths in from to , whose cost is the shortest path length.

The Eulerian super-digraph must add arcs whose tails are in and arcs whose heads are in .

The cost of shipment of one unit from to is (shortest path length), with .

This turns into a Transportation Problem with supplies for and demands for .

We have solved a similar problem of farms and factories in the graph matching discussion. ■

Page 35: Connected Graphs and Connectivity

Connectivity 35

Cuts and Connectivity

May 2014

It is desired to preserve network service when some nodes or connections break.

For expensive connections it is desired to maintain connectivity preservation with as few edges as possible.

Graphs and digraphs are assumed loopless.

Definitions. A set of a graph is a separating set or vertex cut if has more than one component.

is -connected if for every such there is .

The connectivity is the smallest vertex cut size.

Page 36: Connected Graphs and Connectivity

Connectivity 36May 2014

Example. Though has no separating set, we define .

What is ?

Every induced subgraph of having at least one and is connected.

Hence either or must be included in a separating set.

Since and are separating sets by themselves, there is . ■

Page 37: Connected Graphs and Connectivity

Connectivity 37May 2014

A -d cube has vertices, obtained from two copies by connecting matched vertices.

is -regular. Deletion of the neighbors of a vertex separates and hence .

Example. What is the connectivity of a -dimensional cube ?

To prove that we show by induction that every vertex cut has at least vertices.

Page 38: Connected Graphs and Connectivity

Connectivity 38May 2014

is obtained by matching the corresponding vertices of two copies and .

Let be any vertex cut of .

If and are connected then is connected too, unless contains one end vertex of each of the matching edges.

But then for , hence we may assume that is disconnected.

has vertices, hence by induction , hence has vertices in .

Page 39: Connected Graphs and Connectivity

Connectivity 39May 2014

If would not have vertices in then would be connected and all the vertices of have neighbors in (by the matching edges).

would therefore be connected unless has at least one vertex in , yielding . ■

When is not a clique, deleting all the neighbors of a vertex disconnects , so , but equality does not necessarily hold.

Page 40: Connected Graphs and Connectivity

Connectivity 40

Edge Connectivity

May 2014

Perhaps that the transceivers (vertices) of a network are so reliable that more than never fail, hence communication is guaranteed.It is desired that the links (edges) are also designed so it is hard to separate by edge deletion.

Definitions. A disconnecting set of edges is a set such that has more than one component.

Given , denotes the edges having one vertex in and one in . An edge cut is of the form , where .

Page 41: Connected Graphs and Connectivity

Connectivity 41May 2014

is -edge connected if every disconnecting set has at least edges.The edge-connectivity of is the minimum size of a disconnecting set.Every edge cut is a disconnecting set since there is no path from to .The converse is false. The 3 edges of are disconnecting set, but not an edge cut. Still, there isProposition. Every minimal disconnecting set is an edge cut.Let and have more than one component.

Page 42: Connected Graphs and Connectivity

Connectivity 42May 2014

there must be some component whose outgoing edges are deleted.Hence contains the edge cut . is not a minimal disconnecting set unless . ■

Deleting one endpoint of each edge of disconnects .

It is therefore expected that will always hold, unless a vertex deletion eliminates a component of , producing a connected subgraph. Theorem. .Proof. follows immediately since the deletion of the incident edges of a vertex disconnects .

Page 43: Connected Graphs and Connectivity

Connectivity 43May 2014

To show let be a minimum edge cut.

If every vertex of is adjacent to every vertex of then .

We therefore assume that there exist , but an edge does not exist.

Let T be a vertex set of .

𝑥

𝑦𝑆 𝑆

𝑇𝑇

Page 44: Connected Graphs and Connectivity

Connectivity 44May 2014

Since and belong to different components of , is a separating set.

The vertices of can be associated with distinct edges connecting to , hence . ■

Page 45: Connected Graphs and Connectivity

Connectivity 45

-connected Graphs

May 2014

A communication network is fault-tolerant if there are alternative paths between vertices.

The more vertex disjoint paths (except ends) the better.

Lemma. A graph G is connected iff for every non trivial partition , , there is where and .

Proof. Suppose is connected, and let and be a partition.

Since is connected, there is a path between every and .

Page 46: Connected Graphs and Connectivity

Connectivity 46May 2014

Let be the last vertex of in and its successor. is the desired edge.Conversely, if is disconnected, let be a component of . Then and is a partition.

There cannot exist an edge between and , otherwise would not be a component. ■

The above lemma shows that each pair of vertices is connected with a path iff is -edge-connected.

We subsequently generalize this characterization to -edge-connected graphs and to -connected graphs.

Page 47: Connected Graphs and Connectivity

Connectivity 47May 2014

Theorem. (Whitney 1932) A graph , , is -connected iff each are connected with a pair of internally-disjoint paths (disjoint vertices except and ).

Proof. Suppose that any two vertices are connected with a pair of internally-disjoint paths.

Deletion of one vertex cannot disconnect those vertices, and at least two vertex deletion is required, hence G is 2-connected.Conversely, suppose that is -connected. We prove by induction on (shortest path) that two internally-disjoint -paths exist.

Page 48: Connected Graphs and Connectivity

Connectivity 48May 2014

For the base . is still connected, since ( is -connected).

A -path is internally-disjoint from , which being an edge, has no internal vertices, hence two disjoint paths exist.

Assume by induction that has a pair of internally-disjoint -paths for .

Let and let be the vertex before on the -path.

, and by the induction hypothesis there are vertex-disjoint paths and .

Page 49: Connected Graphs and Connectivity

Connectivity 49May 2014

Since is connected, there is a -paths , and .

If is vertex-disjoint of or we are done, since and either of or are edge disjoint paths. .

Otherwise, let intersect both and .

Assume w.l.o.g that its last common vertex is on .

Combining the -path of with -path of yields a vertex-disjoint path to path. ■

Rx

u vw

PQ

Page 50: Connected Graphs and Connectivity

Connectivity 50May 2014

Theorem. (-connected graph characterization)If , the following conditions are equivalent.• is connected and has no cut-vertex.• For all , there are internally-disjoint -paths.• For all , there is a cycle through and .• , and every pair of edges of is on a common cycle.

Page 51: Connected Graphs and Connectivity

Connectivity 51May 2014

Let be a graph with two distinguished vertices.

The local connectivity is the maximum number of pairwise internally disjoint . denotes the smallest vertex cut separating and .

Theorem. (Menger 1927, Göring’s proof 2000)Let be non adjacent. Then .

Proof. Let

There is , because any family of internally disjoint meets any -vertex-cut in at least distinct vertices.

Page 52: Connected Graphs and Connectivity

Connectivity 52May 2014

We subsequently show by induction on that .

We can assume that there is an edge incident neither to nor to .

Otherwise, every is of lengths , so the interim vertices of the -paths define an -vertex-cut and the Theorem’s conclusion follows immediately.

Set . Because is a subgraph of there is

By induction there is .

Page 53: Connected Graphs and Connectivity

Connectivity 53May 2014

We may assume that .

Otherwise, , hence and the Theorem’s conclusion follows.

Thus, in particular, .

Let be a minimum -vertex-cut in .

Since every -vertex-cut of together with either end of is an -vertex-cut of G , there is , yielding

.

Page 54: Connected Graphs and Connectivity

Connectivity 54

𝑥 𝑦

May 2014

𝑢 𝑣𝑒

𝑋 𝑌𝑆

Let the set of vertices reachable from in .

Since , cannot be an -vertex-cut of ().

There must exist therefore an -path in , that includes , where w.l.o.g and .

Page 55: Connected Graphs and Connectivity

Connectivity 55May 2014

Let us contract into a single vertex , and denote the outcome by .

Likewise, let us contract into a single vertex , and denote the outcome by .

Every -vertex-cut in is necessarily so in . Otherwise, there was an -path in avoiding .

𝑥 𝑦𝑢

𝑋 𝑆 𝑮 /𝒀𝑦𝑥

𝑣

𝑌𝑆𝑮 /𝑿

Page 56: Connected Graphs and Connectivity

Connectivity 56May 2014

The subgraph of would then contain an -path avoiding , impossible since is an -vertex-cut in .

Consequently ().

On the other hand, which is an -vertex-cut of , is also such in , and therefore .

Consequently, , and is a minimum -vertex-cut in .

By the induction hypothesis (), there are internally disjoint xy-paths in , and each must lie on one and only of them.

Page 57: Connected Graphs and Connectivity

Connectivity 57May 2014

Assume w.l.o.g that , and .

Likewise, there are internally disjoint -paths in , obtained by contracting to , such that , and .

𝑥𝑢

𝑦𝑣

𝑌𝑆𝑋

𝑄1 ,…,𝑄𝑘𝑃1 ,…,𝑃𝑘

Page 58: Connected Graphs and Connectivity

Connectivity 58May 2014

It follows that there are internally disjoint -paths in , , and .

Consequently . ■