Presentation is loading. Please wait.

Presentation is loading. Please wait.

R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 1 קומבינטוריקה למדעי - המחשב – הרצאה #16 1.4 DE BRUIJN SEQUENCES מבוסס על הספר : S. Even, "Graph Algorithms",

Similar presentations


Presentation on theme: "R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 1 קומבינטוריקה למדעי - המחשב – הרצאה #16 1.4 DE BRUIJN SEQUENCES מבוסס על הספר : S. Even, "Graph Algorithms","— Presentation transcript:

1 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 1 קומבינטוריקה למדעי - המחשב – הרצאה #16 1.4 DE BRUIJN SEQUENCES מבוסס על הספר : S. Even, "Graph Algorithms", Computer Science Press, 1979 שקפים, ספר וחומר רלוונטי נוסף באתר הקורס : Slides, book and other related material at: http://www.cs.technion.ac.il/~cs234141

2 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 2 1.4 DE BRUIJN SEQUENCES 1.4 DE BRUIJN SEQUENCES Let  = {0, 1,...,  – 1} be an alphabet of  letters. Clearly there are  n different words of length n over . A de Bruijn sequence is a (circular) sequence a 0 a 1... a l-1 over  such that for every word w of length n over  there exists a unique i such that a i a i+1... a i+n-1 = w,

3 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 3 G ,n (V, E) which has the following structure: 1. V is the set of all  n-1 words of length n – 1 over . 2. E is the set of all  n words of length n over . 3. The edge b 1 b 2 … b n, starts at vertex b 1 b 2 … b n-1 and ends at vertex b 2 b 3 … b n.

4 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 4 Fig 1.5 G 2,3

5 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 5 Fig 1.6 G 2,4

6 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 6 Fig 1.7 G 3,2

7 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 7 Theorem 1.3: For every positive integers  and n, G ,n has a directed Euler circuit. Proof: (Strong Connectivity) קשירות היטב we shall show that G ,n is strongly connected. Let b 1 b 2 … b n-1 and c 1 c 2 … c n-1 be any two vertices; the directed path b 1 b 2 … b n- c 1, b 2 b 3 … b n-1 c 1 c 2, …, b n-1 c 1 c 2 … c n-1 leads from the first to the second.

8 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 8 Theorem 1.3: For every positive integers  and n, G ,n has a directed Euler circuit. Proof (Cont…): (degrees) דרגות we have to show that d out (v) = d in (v) for each vertex v. The vertex b 1 b 2 … b n-1 is entered by edges cb 1 b 2 … b n-1, where c can be chosen in  ways, and is the start vertex of edges b 1 b 2 … b n-1 c, where again c can be chosen in  ways.

9 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 9 Theorem 1.3: For every positive integers  and n, G ,n has a directed Euler circuit. Corollary 1.1: For every positive integers  and n there exists a de Bruijn sequence:

10 R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 10 Fig 1.5 G 2,3 001, 011, 111, 110, 101, 010, 100, 000


Download ppt "R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 1 קומבינטוריקה למדעי - המחשב – הרצאה #16 1.4 DE BRUIJN SEQUENCES מבוסס על הספר : S. Even, "Graph Algorithms","

Similar presentations


Ads by Google