eulerian graphs, de bruijn graphs and sequences

70
EULERIAN GRAPHS, DE BRUIJN GRAPHS AND SEQUENCES 1

Upload: fc-dharz

Post on 02-Dec-2015

12 views

Category:

Documents


1 download

DESCRIPTION

Graph Theory

TRANSCRIPT

Page 1: Eulerian Graphs, De Bruijn Graphs and Sequences

1

EULERIAN GRAPHS, DE BRUIJN GRAPHS

AND SEQUENCES

Page 2: Eulerian Graphs, De Bruijn Graphs and Sequences

2

EULERIAN GRAPHS

Page 3: Eulerian Graphs, De Bruijn Graphs and Sequences

3

Definitions A walk is trail, if for all. An Euler trail (Euler circuit) of a

graph G is a trail that traverses every edge only once.

Note: We call a closed trail a circuit when we do not specify the first vertex but keep the list in the cyclic order

An Euler tour of G is a closed Euler trail.

A connected graph G is an Eulerian if it has an Euler tour. An Euler path is a path that uses every edge of a graph

exactly once.

Page 4: Eulerian Graphs, De Bruijn Graphs and Sequences

4

Note: An Euler path starts and ends at different vertices while an Euler circuit starts and ends at the same vertex. An even graph is a graph with degree all even. A vertex is odd [even] when its degree is odd [even]. A maximal path in a graph G is a path P in G that is not

contained in a longer path.• When a graph is finite, no path can extend forever, so

maximal (non-extemdible) paths exist.

Page 5: Eulerian Graphs, De Bruijn Graphs and Sequences

5

1. Euler path: BBADCDEBC

2. Euler path:CDCBBADEB

Example of Euler Path

Page 6: Eulerian Graphs, De Bruijn Graphs and Sequences

Example of Euler Circuit

6

1

2

3 7

56

4

8

9

10

11

Euler Circuit: ABCFGHCGEDFA

Page 7: Eulerian Graphs, De Bruijn Graphs and Sequences

7

Lemma: If every vertex of G has degree at least 2, then G contains a cycle.(1.2.25)

Proof:

Let P a maximal path in G , and let u be an endpoint in P. Since P is a maximal ( cannot be extended), every vertex adjacent to u must already be in P. Since u has a degree at least two, there is an edge e extending from u to some other vertex v in P, where e is not in P. The edge e together with the section of P from u to v completes a cycle.

Page 8: Eulerian Graphs, De Bruijn Graphs and Sequences

8

Theorem 1. A graph G is Eulerian if and only if it has at m ost one nontrivial component and its vertices all have even degree.

Proof:

Necessity. Suppose that G has an Eulerian circuit C. Each passage of C through a vertex uses two incident edges and the first edge is paired with the last at the first vertex. Hence every vertex has even degree.

Also, two edges can be in the same trail only when they lie in the same component, so there is at most one non trivial component.

Page 9: Eulerian Graphs, De Bruijn Graphs and Sequences

9

• Sufficiency. Assuming that the condition holds, we obtain an Eulerian circuit using induction on the nember of edges, m.

Basis step: m=0. A closed trail consisting of one vertex suffices.

Induction step m >0.• When even degrees, each vertex in the nontrivial component

of G has degree at least 2.• By Lemma 1.2.25, the the nontrivial component has a cycle C• Let G’ be the graph obtained from G by deleting E(C)• Since C has 0 or 2 edges at each vertex, each component of

G’ is also an even graph.

Page 10: Eulerian Graphs, De Bruijn Graphs and Sequences

10

Continuation of Induction step m >0.

Since each component is also connected and has fewer than m edges, we can apply the induction hypothesis to conclude that each component of G’ has an Eulerian Circuit.

To combine these into an Eulerian circuit of G, we traverse C, but , but when a component of G’ is entered for the first time we detour along an Eulerian Circuit of component.

This circuit ends at the vertex where we began the detour. When we have completed the traversal of C, we have completed an Eulerian circuit of G.

Page 11: Eulerian Graphs, De Bruijn Graphs and Sequences

11

The Handshaking Theorem or The Hand Shaking Lemma. In every graph, the sum of the degrees of all vertices equals twice the number of edges.

• If there are n vertices , with degrees, and there are e edges, then

Or, equivalently,

Page 12: Eulerian Graphs, De Bruijn Graphs and Sequences

12

If n people shake hands, and the i th person shakes hands di

times, then the total number of handshakes that take place is

How come? Each handshake involves two people, so the number counts every handshake twice.

Page 13: Eulerian Graphs, De Bruijn Graphs and Sequences

13

The Number of Odd Vertices

The number of edges in a graph is which must be an integer.

Therefore, must be an even number.

Therefore, the numbers must include an even number of odd numbers.

Every graph has an even number of odd vertices.

Page 14: Eulerian Graphs, De Bruijn Graphs and Sequences

14

Theorem 2. A connected graph has an Euler trail if and only if it has 0 or 2 vertices of odd degree.

Page 15: Eulerian Graphs, De Bruijn Graphs and Sequences

15

Proof:

If G has an Euler trail , then as in the proof of Theorem1 , each vertex has an even degree.

Assume then that G is connected and has at most two vertices of odd degree. If G has no vertices of odd degree then, by Theorem 1, G has an Euler trail.

Page 16: Eulerian Graphs, De Bruijn Graphs and Sequences

16

Otherwise by the handshaking lemma, every graph has an even number of vertices with odd degree and therefore G has exactly two vertices, say u and v. Let H be a graph obtained form G by adding the vertex w, and the edges uw and vw. In H every vertex has an even degree, and hence it has Euler tour, say . Here the beginning part is an Euler trail of G. ⋆

Page 17: Eulerian Graphs, De Bruijn Graphs and Sequences

17

All the vertices of the graph below have an even degree. By Theorem 1, it is an Euler Graph and by Theorem 2 it has an Euler trail( Euler Circuit).

1

2

4

35

6

7

8

Euler Trail( Euler Circuit):

BEDABEFCB

Page 18: Eulerian Graphs, De Bruijn Graphs and Sequences

18

The graph on the left has 2 vertices of odd degrees. So, by Theorem 2, it has an Euler trail. However, it is not an Euler graph. It is just a semi-Eulerian Graph.1

2

3

4

5

6

7

8

Euler Trail: ECDFABCF

Page 19: Eulerian Graphs, De Bruijn Graphs and Sequences

19

FLEURY’S ALGORITHM

Page 20: Eulerian Graphs, De Bruijn Graphs and Sequences

20

When the graph has an Euler circuit or path, how do we find it? For small graphs, simple trial-and-error usually works fine, but real-life applications sometimes involve graphs with hundreds, or even thousands, of vertices. In these cases a trial-and-error approach is out of the question, and what is needed is a systematic strategy that tells us how to create an Euler circuit or path. In other words, we need an algorithm.

Algorithms

Page 21: Eulerian Graphs, De Bruijn Graphs and Sequences

There are many types of problems that can be solved by simply following a set of procedural rules–very specific rules like when you get to this point, do this, ... after you finish this, do that, and so on. Given a specific problem X, an algorithm for solving X is a set of procedural rules that, when followed, always lead to some sort of “solution” to X. X need not be a mathematics problem–algorithms are used, sometimes unwittingly, in all walks of life:

21

Algorithms

Page 22: Eulerian Graphs, De Bruijn Graphs and Sequences

directions to find someone’s house, the instructions for assembling a new bike, or a recipe for baking an apple pie are all examples of real-life algorithms. A useful analogy is to think of the problem as a dish we want to prepare and the algorithm as a recipe for preparing that dish. In mathematics, algorithms are either formula driven (you just apply the formula or formulas to the appropriate inputs) or directive driven (you must follow a specific set of directives).

22

Algorithms

Page 23: Eulerian Graphs, De Bruijn Graphs and Sequences

We will now turn our attention to an algorithm that finds an Euler circuit or an Euler path in a connected graph. Technically speaking, these are two separate algorithms, but in essence they are identical, so they can be described as one.The idea behind Fleury’s algorithm can be paraphrased by that old piece of folk wisdom: Don’t burn your bridges behind you.

23

Fleury’s Algorithm

Page 24: Eulerian Graphs, De Bruijn Graphs and Sequences

In graph theory the word bridge has a very specific meaning–it is the only edge connecting two separate sections (call them

24

Fleury’s Algorithm

A and B) of a graph, as illustrated in Fig.5-18.

Page 25: Eulerian Graphs, De Bruijn Graphs and Sequences

Thus, Fleury’s algorithm is based on a simple principle: To find an Euler circuit or an Euler path, bridges are the last edges you want to cross. Our concerns lie only on how we are going to get around the yet-to-be-traveled part of the graph. Thus, when we talk about bridges that we want to leave as a last resort,we are really referring to bridges of the to-be-traveled part of the graph.

25

Fleury’s Algorithm

Page 26: Eulerian Graphs, De Bruijn Graphs and Sequences

■ Preliminaries. Make sure that the graph is connected and either (1) has no odd vertices (circuit) or (2) has just two odd vertices (path).

■ Start. Choose a starting vertex. [In case (1) this can be any vertex; in case (2) it must be one of the two odd vertices.]

FLEURY’S ALGORITHM FOR FINDING AN EULER CIRCUIT (PATH)

26

Page 27: Eulerian Graphs, De Bruijn Graphs and Sequences

27

■ Intermediate steps. At each step, if you have a choice, don’t choose a bridge of the yet-to-be-traveled part of the graph. However, if you have only one choice, take it.

■ End. When you can’t travel any more, the circuit (path) is complete. [In case (1) you will be back at the starting vertex; in case (2) you will end at the other odd vertex.]

FLEURY’S ALGORITHM FOR FINDING AN EULER CIRCUIT (PATH)

Page 28: Eulerian Graphs, De Bruijn Graphs and Sequences

28

In implementing Fleury’s algorithm it is critical to separate the past (the part of the graph that has already been traveled) from the future (the part of the graph that still needs to be traveled). While there are many different ways to accomplish this (you are certainly encouraged to come up with one of your own), a fairly reliable way goes like this: Start with two copies of the graph. Copy 1 is to keep track of the “future”; copy 2 is to keep track of the “past.”

Fleury’s Algorithm Bookkeeping

Page 29: Eulerian Graphs, De Bruijn Graphs and Sequences

29

Every time you travel along an edge, erase the edge from copy 1, but mark it (say in red) and label it with the appropriate number on copy 2. As you move forward, copy 1 gets smaller and copy 2 gets redder. At the end, copy 1 has disappeared; copy 2 shows the actual Euler circuit or path.

Fleury’s Algorithm Bookkeeping

Page 30: Eulerian Graphs, De Bruijn Graphs and Sequences

30

The graph in Fig. 5-19(a) is a very simple graph – it would be easier to find an Euler circuit just by trial-and-error than by using Fleury’s algorithm. Nonetheless, we will do it using Fleury’s algorithm. The real purpose of

Example 5.20 Implementing Fleury’s Algorithm

the example is to see the algorithm at work.Each step of the algorithm is explained in Figs. 5-19(b) through (h).

Page 31: Eulerian Graphs, De Bruijn Graphs and Sequences

Start: We can pick any starting point we want. Let’s say we start at F.

31

Example 5.20 Implementing Fleury’s Algorithm

Page 32: Eulerian Graphs, De Bruijn Graphs and Sequences

Step 1: Travel from F to C. (Could have also gone from F to D.)

32

Example 5.20 Implementing Fleury’s Algorithm

Page 33: Eulerian Graphs, De Bruijn Graphs and Sequences

Step 2: Travel from C to D. (Could have also gone to A or to E.)

33

Example 5.20 Implementing Fleury’s Algorithm

Page 34: Eulerian Graphs, De Bruijn Graphs and Sequences

Step 3: Travel from D to A. (Could have also gone to B but not to F – DF is a bridge!)

34

Example 5.20 Implementing Fleury’s Algorithm

Page 35: Eulerian Graphs, De Bruijn Graphs and Sequences

Step 4: Travel from A to C. (Could have also gone to E but not to B – AB is a bridge!)

35

Example 5.20 Implementing Fleury’s Algorithm

Page 36: Eulerian Graphs, De Bruijn Graphs and Sequences

Step 5: Travel from C to E. (There is no choice!)

36

Example 5.20 Implementing Fleury’s Algorithm

Page 37: Eulerian Graphs, De Bruijn Graphs and Sequences

Steps 6, 7, 8, and 9: Only one way to goat each step.

37

Example 5.20 Implementing Fleury’s Algorithm

Page 38: Eulerian Graphs, De Bruijn Graphs and Sequences

We will apply Fleury’s algorithm to the graph in Fig. 5-20.

38

Example 5.21 Fleury’s Algorithm for Euler Paths

Page 39: Eulerian Graphs, De Bruijn Graphs and Sequences

Since it would be a little impractical to show each step of the algorithm with a separate picture as we did in Example 5.20, you are going to have to do some of the work. Start by making two copies of the graph.

39

Example 5.21 Fleury’s Algorithm for Euler Paths

■ Start. This graph has two odd vertices, E and J. We can pick either one as the starting vertex. Let’s start at J.

Page 40: Eulerian Graphs, De Bruijn Graphs and Sequences

■ Step 1. From J we have five choices, all of which are OK. We’ll randomly pick K. (Erase JK on copy 1, and mark and label JK with a 1 on copy 2.)

40

Example 5.21 Fleury’s Algorithm for Euler Paths

■ Step 2. From K we have three choices (B, L, or H). Any of these choices is OK. Say we choose B. (Now erase KB from copy 1 and mark and label KB with a 2 on copy 2.)

Page 41: Eulerian Graphs, De Bruijn Graphs and Sequences

■ Step 3. From B we have three choices (A, C, or J). Any of these choices is OK. Say we choose C. (Now erase BC from copy 1 and mark and label BC with a 3 on copy 2.)

41

Example 5.21 Fleury’s Algorithm for Euler Paths

■ Step 4. From C we have three choices (D, E, or L). Any of these choices is OK. Say we choose L. (EML–that’s shorthand for erase, mark, and label.)

Page 42: Eulerian Graphs, De Bruijn Graphs and Sequences

42

■ Step 5. From L we have three choices (E, G, or K). Any of these choices is OK. Say we choose K. (EML.)

Example 5.21 Fleury’s Algorithm for Euler Paths

■ Step 6. From K we have only one choice– to H. We choose H. (EML.)

Page 43: Eulerian Graphs, De Bruijn Graphs and Sequences

43

■ Step 7. From H we have three choices (G, I, or J). We

Example 5.21 Fleury’s Algorithm for Euler Paths

should not choose G, as HG is a bridge of the yet-to-be-traveled part of the graph (see Fig. 5-21).

Page 44: Eulerian Graphs, De Bruijn Graphs and Sequences

44

■ Step 7. Either of the other two choices is OK. Say we

Example 5.21 Fleury’s Algorithm for Euler Paths

choose J. (EML.)

Page 45: Eulerian Graphs, De Bruijn Graphs and Sequences

45

■ Step 8. From J we have three choices (A, B, or I), but we should not choose I, as JI has just become a bridge. Either of the other two choices is OK. Say we choose B. (EML)

Example 5.21 Fleury’s Algorithm for Euler Paths

■ Step 9 through 13. Each time we have only one choice. From B we have to go to A, then to J, I, H, and G.

Page 46: Eulerian Graphs, De Bruijn Graphs and Sequences

46

■ Step 14 through 21. Not to belabor the point, let’s just cut to the chase. The rest of the path is given by G, F, E, D, C, E, G, L, E. There are many possible endings, and you should find a different one by yourself.

Example 5.21 Fleury’s Algorithm for Euler Paths

The completed Euler path (one of hundreds of possible ones) is shown in Fig. 5-22.

Page 47: Eulerian Graphs, De Bruijn Graphs and Sequences

47

Example 5.21 Fleury’s Algorithm for Euler Paths

Page 48: Eulerian Graphs, De Bruijn Graphs and Sequences

DE BRUIJN GRAPHS AND SEQUENCES

48

Page 49: Eulerian Graphs, De Bruijn Graphs and Sequences

De Bruijn Graphs

A graph is a an ordered pair G = (V;E) where V is a set of vertices called nodes, together with a set E of edges which are pairs of nodes.Directed graphs, graphs whose edges are an ordered pair of nodes.A subgraph, G’ = (V’ ;E’), of a graph G = (V;E), is a graph on a subset V’ of V with the property that every edge e Ɛ E with endpoints in V’ is also in E’.

49

Page 50: Eulerian Graphs, De Bruijn Graphs and Sequences

Directed multigraph G(V, E) consists of set of vertices, V and

multiset of directed edges, E

Otherwise, like a directed graph

Node’s indegree = # incoming edges

Node’s outdegree = # outgoing edges

De Bruijn graph is a directed multigraph

50

V = { a, b, c, d }E = { (a, b), (a, b), (a, b), (a, c), (c, b) }

Page 51: Eulerian Graphs, De Bruijn Graphs and Sequences

● A (β1 ● ● ● βn) is called a successor of node (α1 ●●● αn) if there is an edge from (α1 ●●● αn) to (β1 ● ● ● βn). Likewise, (α1 ●●● αn) is said to be a predecessor of (β1 ● ● ● βn).

● Two nodes are adjacent nodes if there is an edge between them and that two edges are adjacent edges if they share a common node.

● A De Bruijn graph is a directed graph with dn nodes labeled by n-tuples over a d-character alphabet (denoted by juxtaposition). The edges are defined to be ordered pairs of the form ((α1 ●●● αn), (α2 ●●● αn αn+1)) where αn+1 is any character in the alphabet.

● We will denote the De Bruijn graph В (d, n)

(Note: d=n-1)

51

Page 52: Eulerian Graphs, De Bruijn Graphs and Sequences

52

Successor Predecessor

Node

Page 53: Eulerian Graphs, De Bruijn Graphs and Sequences

Few basic properties of De Bruijn graphs:

1) The number of nodes in B(d, n) is dn since each n-tuple is a node.2) The number of edges in B(d, n) is dn+1 since there are nodes and out-degree

of d on each node.

3) Every node in B(d, n) has out-degree d since every successor of (α1 ●●● αn) has the form (α2 α3 ●●● αn β) and there are d choices for β .

4) Every node in B(d, n) has in-degree d since if we examine the predecessors of (α1 ●●● αn) we see that they will be those which look like (βα1 ●●● αn-1) with any of the d choices for β .

5) Since the edges are defined explicitly, we see that the graph B(d, n) is unique for fixed d and n.

Page 54: Eulerian Graphs, De Bruijn Graphs and Sequences

Since d=2, n=3 the number of nodes is .

So, the graph to be constructed has 4 nodes or vertices.

The combinations that can be made from S={A,B} = AA,AB,BB,BA or AAABBBBA

The n-tuples or 3-tuples are:

54

Example: Construct the De Bruijn Graph of :A={A,B} , B(2,3)

(n-1)-tuples (nodes) or d:

Page 55: Eulerian Graphs, De Bruijn Graphs and Sequences

55

Constructed Graph:

AA AA, AAAA AA, AA AB, AB BBAA, AA AA, AB

AA AA, AA AB, AB BB, BB BBAA AA, AA AB, AB BB, BB BB, BB BA

Note: When graphing the De Bruijn, there is an edge connecting between the left and the right nodes.

1. 2. 3.4.

5.6.

Page 56: Eulerian Graphs, De Bruijn Graphs and Sequences

56

DE BRUIJN SEQUENCES

Page 57: Eulerian Graphs, De Bruijn Graphs and Sequences

57

A De Bruijn Sequence B(d,n) is a cylic sequence of an alphabet A (that consists of d elements ) in which EVERY possible subsequence of length n appears as a sequence of consecutive letters EXACTLY once.

Page 58: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 58

De Bruijn cycles 1.4.25

• Application:– There are 2n binary strings of length n. – Is there a cyclic arrangement of 2n binary digits such that the 2n

strings of n consecutive digitals are all distinct? – Example: For n =4, (0000111101100101) works.

0000 0001 0011 0111 1111 1110 1101 1011 …

0 00

0

1

11

10

0

11

0

0

1

1

Page 59: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 59

De Bruijn cycles 1.4.25

• We can use such an arrangement to keep track of the position of a rotating drum. – One drum has 2n rotational positions. – A band around the circumference is split into 2n portions that

can be coded 0 or 1. – Sensors read n consecutive portions. – If the coding has the property specified above, then the

position of the drum is determined by the string read by the sensors.

Page 60: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 60

De Bruijn cycles 1.4.25

• To obtain such a circular arrangement, – define a digraph Dn whose vertices are the binary (n-

1)-tuples. – Put an edge from a to b if the last n-2 entries of a

agree with the first n-2 entries of b. – Label the edge with the last entry of b.

Page 61: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 61

De Bruijn cycles 1.4.25

0 00

0

1

1

110

0

11

0

0

1

1

0

0 0

0

0

0

0

0

1

1

1

1 1 1

1

1

001

000

100

010 101

011

110

111

a b

Put an edge from a to b if the last n-2 entries of a agree with the first n-2 entries of b. Label the edge with the last entry of b.

Below we show D4..

Page 62: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 62

De Bruijn cycles 1.4.25

We next prove that Dn is Eulerian and show how an Eulerian circuit yields the desired

circular arrangement.

Page 63: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 63

Theorem. The digraph Dn of Application 1.4.25 is Eulerian, and the edge labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26

Proof:

• We show – first that Dn is Eulerian.

– Then the labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct.

Page 64: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 64

Theorem. The digraph Dn is Eulerian 1.4.26

Proof: 1/2

• Every vertex has out-degree 2– because we can append a 0 or a 1 to its name to obtain the name

of a successor vertex.

• Similarly, every vertex has in-degree 2, – because the same argument applies when moving in reverse and

putting a 0 or a 1 on the front of the name.

001

101

011

110

111

Page 65: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 65

Theorem. The digraph Dn is Eulerian 1.4.26

Proof: 2/2

• Also, Dn is strongly connected,

– because we can reach the vertex b=(b1,…..,bn-1) from any vertex by successively follows the edges labeled b1,…..,bn-1.

• Thus Dn satisfies the hypotheses of Theorem 1.4.24 and is Eulerian.

0

0 0

0

0

0

0

0

1

11 1 1

1

1

001

000

100

010 101

011

110

111

a b1

1

Page 66: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 66

Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic

arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26

Proof: 1/4

• Let C be an Eulerian circuit of Dn. Arrival at vertex a=(a1,…..,an-1) must be along an edge with label an-1

– because the label on an edge entering a vertex agrees with the last entry of the name of the vertex.

0

0 0

0

0

0

0

0

1

1

1

1 1 1

1

1

001

000

100

010 101

011

110

111

a b

Page 67: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 67

Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic

arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26

Proof: 2/4

• The successive earlier labels (looking backward) must have been an-2,…..,a1 in order. – because we delete the front and shift the reset to

obtain the reset of the name at the head

0

0 0

0

0

0

0

0

1

1

1

1 1 1

1

1

001

000

100

010 101

0 1 1

110

111

a b

Page 68: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 68

Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic

arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26

Proof: 2/4

• If C next uses an edge with label an, then the list consisting of the n most recent edge labels at that time is a1,…..an.

0

0

1

0

0

0

0

0

1

1

1

1 1 1

1

1

001

000

100

010 101

011

110

111

a b

0

1

Page 69: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 69

Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26

Proof: 3/4

• Since – the 2n-1 vertex labels are distinct, and – the two out-going edges have distinct labels, and – we traverse each edge exactly once

011 0

011 1

Distinct vertex label

Distinct labels onout-going edges

Page 70: Eulerian Graphs, De Bruijn Graphs and Sequences

Graph Theory Ch. 1. Fundamental Concept 70

Theorem. The labels on the edges in any Eulerian circuit of Dn form a cyclic arrangement in which the 2n consecutive segments of length n are distinct. 1.4.26

Proof: 4/4

• We have shown that the 2n strings of length n in the circular arrangement given by the edge labels along C are distinct.