- Computational Journalism at Columbia, Fall 2013, Lecture 8: Social Network Analysis
- 00723735
- 13. Mathematics - Ijmcar - Connected Middle Domination in Graphs
- An Efficient Brain Tumor Detection and classification using Neural Network Model
- finalusermanualjavafiles
- 3.Comp Sci - IJCSE - Global Reliability - Mohd Ashraf
- Cs 261 Notes
- A Primal-Dual Heuristic for a Heterogeneous Unmanned Vehicle Path Planning Problem
- investigation task
- 10.1.1.12.9179
- BVZ-cvpr98
- Graph Structure in the Web
- mg0a
- 06 Advanced Centrality Concepts
- Project
- Problem Search
- On the Foundations of Combinatorial Theory
- CHAP-2
- Olympiad Combinat or Ics Chapter 7
- CMS Notes on Mathematics
- MIST MSc-CSE Syllabus
- Uninformed Search
- Ban Dung Ryan 3
- 119096576 AI Lab Programs
- Unit II(Greedy Algorithms)
- Discrete Mathematics
- ms and phd
- A Topological Framework for Local Structure Analysis in Condensed Matter
- Bethe
- Untitled
- BÀI GIẢNG CỦA THẦY NGUYỄN THÀNH NHÂN
- QA
- LE QUY DON
- Trick Mules
- Ve Hoc Tieng Anh
- Flash
- 300 Cau Do Hay Danh Cho Tre Mam Non
- Anzan Exercises FYzzTz
- 1 Phonics Links and Resources
- TO-DO
- cau do
- 0-100_list
- Idoc.vn Giao an Lets Go 1a Hoc Ky 2 Cuc Hay
- Lịch Thi Đấu World Cup 2014
- Cach Tao Fanpage Ban Hang Online 140205114918 Phpapp01
- Brain Gym Excercise
- 11-knnglmvicnhm-110310104238-phpapp01
- TUYỂN DỤNG
- Greeting
- 123
- 6758842 How to Remember Names and Faces
- 2000%2B Most Common Words, Translated (PUBLIC)
- 05_06_2009_20538_461
- 123
- SO LUOC NỘI DUNG
- 78154917 Dang Kyd Uth i
- NỘI DUNG HỘI THẢO
- NỘI DUNG HỘI THẢO
- Memory Course Adv
- Tri Nho Sieu Dang

De Bruijn Sequences

Adam M. Goyt

Minnesota State University Moorhead

web.mnstate.edu/goytadam

goytadam@mnstate.edu

October 1, 2012

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 1 / 41

1

Introduction to de Bruijn sequences

2

Questions about de Bruijn Sequences

3

Applications

4

The Mathematician as an Explorer

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 2 / 41

Introduction to de Bruijn sequences

Outline

1

Introduction to de Bruijn sequences

2

Questions about de Bruijn Sequences

3

Applications

4

The Mathematician as an Explorer

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 3 / 41

Introduction to de Bruijn sequences

How do you do it?

Deﬁnition

A de Bruijn sequence with window length k is a binary sequence of

length 2

k

such that every consecutive sequence of k digits appears

exactly once going around the corner.

Example

0011

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 4 / 41

Introduction to de Bruijn sequences

How do you do it?

Deﬁnition

A de Bruijn sequence with window length k is a binary sequence of

length 2

k

such that every consecutive sequence of k digits appears

exactly once going around the corner.

Example

0011

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 4 / 41

Introduction to de Bruijn sequences

How do you do it?

Deﬁnition

A de Bruijn sequence with window length k is a binary sequence of

length 2

k

such that every consecutive sequence of k digits appears

exactly once going around the corner.

Example

0011

00

.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 5 / 41

Introduction to de Bruijn sequences

How do you do it?

Deﬁnition

A de Bruijn sequence with window length k is a binary sequence of

length 2

k

such that every consecutive sequence of k digits appears

exactly once going around the corner.

Example

0011

00 01

/

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 6 / 41

Introduction to de Bruijn sequences

How do you do it?

Deﬁnition

A de Bruijn sequence with window length k is a binary sequence of

length 2

k

such that every consecutive sequence of k digits appears

exactly once going around the corner.

Example

0011

00 01 11

**Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 7 / 41
**

Introduction to de Bruijn sequences

How do you do it?

Deﬁnition

A de Bruijn sequence with window length k is a binary sequence of

length 2

k

such that every consecutive sequence of k digits appears

exactly once going around the corner.

Example

0011

00 01 11 10

**Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 8 / 41
**

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

00000100101100111110001101110101

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 9 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

00000100101100111110001101110101

**Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 10 / 41
**

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

00000100101100111110001101110101

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 11 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

0000010010 1100111110001101110101

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 12 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

1100111110001101110101 0000010010

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 13 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

11001111100011011101010000010010

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 14 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

00000100101100111110001101110101

The de Bruijn sequence above has window length 5, and so has

2

5

= 32 digits. Our deck consists of the 32 cards Ace through 8

of each suit.

Each window consists of 5 bits.

The ﬁrst 2 bits tell the suit of the card.

00 01 10 11

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 15 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

00000100101100111110001101110101

The de Bruijn sequence above has window length 5, and so has

2

5

= 32 digits. Our deck consists of the 32 cards Ace through 8

of each suit.

Each window consists of 5 bits.

The ﬁrst 2 bits tell the suit of the card.

00 01 10 11

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 15 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

00000100101100111110001101110101

The de Bruijn sequence above has window length 5, and so has

2

5

= 32 digits. Our deck consists of the 32 cards Ace through 8

of each suit.

Each window consists of 5 bits.

The ﬁrst 2 bits tell the suit of the card.

00 01 10 11

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 15 / 41

Introduction to de Bruijn sequences

How do you do it?

The de Bruijn sequence we use for the trick is

00000100101100111110001101110101

The de Bruijn sequence above has window length 5, and so has

2

5

= 32 digits. Our deck consists of the 32 cards Ace through 8

of each suit.

Each window consists of 5 bits.

The ﬁnal 3 bits tell the rank of the card.

000 001 010 011 100 101 110 111

8 A 2 3 4 5 6 7

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 16 / 41

Questions about de Bruijn Sequences

Outline

1

Introduction to de Bruijn sequences

2

Questions about de Bruijn Sequences

3

Applications

4

The Mathematician as an Explorer

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 17 / 41

Questions about de Bruijn Sequences

Questions about de Bruijn Sequences

Does a de Bruijn sequence with window k exist for each k > 0?

If so how many de Bruijn sequences are there with window k?

How do we ﬁnd these de Bruijn sequences?

Finally, are there any uses for de Bruijn sequences other than

just to amaze your friends?

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 18 / 41

Questions about de Bruijn Sequences

Questions about de Bruijn Sequences

Does a de Bruijn sequence with window k exist for each k > 0?

If so how many de Bruijn sequences are there with window k?

How do we ﬁnd these de Bruijn sequences?

Finally, are there any uses for de Bruijn sequences other than

just to amaze your friends?

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 18 / 41

Questions about de Bruijn Sequences

Questions about de Bruijn Sequences

Does a de Bruijn sequence with window k exist for each k > 0?

If so how many de Bruijn sequences are there with window k?

How do we ﬁnd these de Bruijn sequences?

Finally, are there any uses for de Bruijn sequences other than

just to amaze your friends?

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 18 / 41

Questions about de Bruijn Sequences

Questions about de Bruijn Sequences

Does a de Bruijn sequence with window k exist for each k > 0?

If so how many de Bruijn sequences are there with window k?

How do we ﬁnd these de Bruijn sequences?

Finally, are there any uses for de Bruijn sequences other than

just to amaze your friends?

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 18 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences?

The answer to this question is yes. We will need a little graph theory

to explain.

Deﬁnition

A directed graph, D is a pair of sets (V, E) where

V is a set of elements called vertices, and

E is a set of of ordered pairs from V called directed edges.

Example

•

v

1

•

v

2

•

v

3

•

v

4

¸

¸¸

¸¸

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 19 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences?

The answer to this question is yes. We will need a little graph theory

to explain.

Deﬁnition

A directed graph, D is a pair of sets (V, E) where

V is a set of elements called vertices, and

E is a set of of ordered pairs from V called directed edges.

Example

•

v

1

•

v

2

•

v

3

•

v

4

¸

¸¸

¸¸

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 19 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences?

The answer to this question is yes. We will need a little graph theory

to explain.

Deﬁnition

A directed graph, D is a pair of sets (V, E) where

V is a set of elements called vertices, and

E is a set of of ordered pairs from V called directed edges.

Example

•

v

1

•

v

2

•

v

3

•

v

4

¸

¸¸

¸¸

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 19 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

The de Bruijn Graph for window length k can be constructed as

follows:

The vertices are the 2

k−1

binary sequences of length k −1.

Place a directed edge from vertex a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

if

a

2

a

3

. . . a

k−1

= b

1

b

2

. . . b

k−2

.

Label the edge from a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

by

a

1

a

2

. . . a

k−1

b

k−1

Example

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 20 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

The de Bruijn Graph for window length k can be constructed as

follows:

The vertices are the 2

k−1

binary sequences of length k −1.

Place a directed edge from vertex a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

if

a

2

a

3

. . . a

k−1

= b

1

b

2

. . . b

k−2

.

Label the edge from a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

by

a

1

a

2

. . . a

k−1

b

k−1

Example

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 20 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

The de Bruijn Graph for window length k can be constructed as

follows:

The vertices are the 2

k−1

binary sequences of length k −1.

Place a directed edge from vertex a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

if

a

2

a

3

. . . a

k−1

= b

1

b

2

. . . b

k−2

.

Label the edge from a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

by

a

1

a

2

. . . a

k−1

b

k−1

Example

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 20 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

The de Bruijn Graph for window length k can be constructed as

follows:

The vertices are the 2

k−1

binary sequences of length k −1.

Place a directed edge from vertex a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

if

a

2

a

3

. . . a

k−1

= b

1

b

2

. . . b

k−2

.

Label the edge from a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

by

a

1

a

2

. . . a

k−1

b

k−1

Example

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 20 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

The de Bruijn Graph for window length k can be constructed as

follows:

The vertices are the 2

k−1

binary sequences of length k −1.

Place a directed edge from vertex a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

if

a

2

a

3

. . . a

k−1

= b

1

b

2

. . . b

k−2

.

Label the edge from a

1

a

2

. . . a

k−1

to b

1

b

2

. . . b

k−1

by

a

1

a

2

. . . a

k−1

b

k−1

Example

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 20 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

Use the de Bruijn Graph to construct a de Bruijn sequence as follows:

Choose a starting vertex and write down its label.

Walk along an edge from that vertex to another vertex and

record the last digit of the label on the new vertex.

Continue in this manor until you have traversed every edge

exactly once and are back where you started.

Erase the digits that overlap with the beginning of the sequence.

Congratulations, you have a de Bruijn sequence!

Example

00 00 01 10 01 11 11 10 00

collapses to

00010111

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 21 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

Use the de Bruijn Graph to construct a de Bruijn sequence as follows:

Choose a starting vertex and write down its label.

Walk along an edge from that vertex to another vertex and

record the last digit of the label on the new vertex.

Continue in this manor until you have traversed every edge

exactly once and are back where you started.

Erase the digits that overlap with the beginning of the sequence.

Congratulations, you have a de Bruijn sequence!

Example

00 00 01 10 01 11 11 10 00

collapses to

00010111

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 21 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

Use the de Bruijn Graph to construct a de Bruijn sequence as follows:

Choose a starting vertex and write down its label.

Walk along an edge from that vertex to another vertex and

record the last digit of the label on the new vertex.

Continue in this manor until you have traversed every edge

exactly once and are back where you started.

Erase the digits that overlap with the beginning of the sequence.

Congratulations, you have a de Bruijn sequence!

Example

00 00 01 10 01 11 11 10 00

collapses to

00010111

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 21 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

Use the de Bruijn Graph to construct a de Bruijn sequence as follows:

Choose a starting vertex and write down its label.

Walk along an edge from that vertex to another vertex and

record the last digit of the label on the new vertex.

Continue in this manor until you have traversed every edge

exactly once and are back where you started.

Erase the digits that overlap with the beginning of the sequence.

Congratulations, you have a de Bruijn sequence!

Example

00 00 01 10 01 11 11 10 00

collapses to

00010111

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 21 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

Use the de Bruijn Graph to construct a de Bruijn sequence as follows:

Choose a starting vertex and write down its label.

Walk along an edge from that vertex to another vertex and

record the last digit of the label on the new vertex.

Continue in this manor until you have traversed every edge

exactly once and are back where you started.

Erase the digits that overlap with the beginning of the sequence.

Congratulations, you have a de Bruijn sequence!

Example

00 00 01 10 01 11 11 10 00

collapses to

00010111

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 21 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

Use the de Bruijn Graph to construct a de Bruijn sequence as follows:

Choose a starting vertex and write down its label.

Walk along an edge from that vertex to another vertex and

record the last digit of the label on the new vertex.

Continue in this manor until you have traversed every edge

exactly once and are back where you started.

Erase the digits that overlap with the beginning of the sequence.

Congratulations, you have a de Bruijn sequence!

Example

00 00 01 10 01 11 11 10 00

collapses to

00010111

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 21 / 41

Questions about de Bruijn Sequences

The de Bruijn Graph

Use the de Bruijn Graph to construct a de Bruijn sequence as follows:

Choose a starting vertex and write down its label.

Walk along an edge from that vertex to another vertex and

record the last digit of the label on the new vertex.

Continue in this manor until you have traversed every edge

exactly once and are back where you started.

Erase the digits that overlap with the beginning of the sequence.

Congratulations, you have a de Bruijn sequence!

Example

00 00 01 10 01 11 11 10 00

collapses to

00010111

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 21 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences

The key to ﬁnding a de Bruijn sequence is to ﬁnd a way to walk

through the de Bruijn graph so that each edge is traversed exactly

once and we ﬁnish where we began.

Deﬁnition

A path through a graph that traverses every edge exactly once and

ends where it began is called an Eulerian circuit.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 22 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences

The key to ﬁnding a de Bruijn sequence is to ﬁnd a way to walk

through the de Bruijn graph so that each edge is traversed exactly

once and we ﬁnish where we began.

Deﬁnition

A path through a graph that traverses every edge exactly once and

ends where it began is called an Eulerian circuit.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 22 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences

Question

How can we tell if a directed graph has an Eulerian circuit?

Theorem (Euler, 1736)

A directed graph without isolated vertices has an Eulerian circuit if

and only if

1

The graph is connected, i.e. you can get from any vertex to any

other vertex by following the arrows.

2

The number of edges coming into any vertex is the same as the

number of edges leaving that vertex.

Thus, the de Bruijn graph always has an Eulerian circuit, and hence

de Bruijn sequences exist for any window length k.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 23 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences

Question

How can we tell if a directed graph has an Eulerian circuit?

Theorem (Euler, 1736)

A directed graph without isolated vertices has an Eulerian circuit if

and only if

1

The graph is connected, i.e. you can get from any vertex to any

other vertex by following the arrows.

2

The number of edges coming into any vertex is the same as the

number of edges leaving that vertex.

Thus, the de Bruijn graph always has an Eulerian circuit, and hence

de Bruijn sequences exist for any window length k.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 23 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences

Question

How can we tell if a directed graph has an Eulerian circuit?

Theorem (Euler, 1736)

A directed graph without isolated vertices has an Eulerian circuit if

and only if

1

The graph is connected, i.e. you can get from any vertex to any

other vertex by following the arrows.

2

The number of edges coming into any vertex is the same as the

number of edges leaving that vertex.

Thus, the de Bruijn graph always has an Eulerian circuit, and hence

de Bruijn sequences exist for any window length k.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 23 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences

Question

How can we tell if a directed graph has an Eulerian circuit?

Theorem (Euler, 1736)

A directed graph without isolated vertices has an Eulerian circuit if

and only if

1

The graph is connected, i.e. you can get from any vertex to any

other vertex by following the arrows.

2

The number of edges coming into any vertex is the same as the

number of edges leaving that vertex.

Thus, the de Bruijn graph always has an Eulerian circuit, and hence

de Bruijn sequences exist for any window length k.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 23 / 41

Questions about de Bruijn Sequences

Existence of de Bruijn Sequences

Question

How can we tell if a directed graph has an Eulerian circuit?

Theorem (Euler, 1736)

A directed graph without isolated vertices has an Eulerian circuit if

and only if

1

The graph is connected, i.e. you can get from any vertex to any

other vertex by following the arrows.

2

The number of edges coming into any vertex is the same as the

number of edges leaving that vertex.

Thus, the de Bruijn graph always has an Eulerian circuit, and hence

de Bruijn sequences exist for any window length k.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 23 / 41

Questions about de Bruijn Sequences

How many de Bruijn Sequences are there?

We need to be able to count the number of Eulerian circuits in a

directed graph.

Theorem (de Bruijn, 1946)

There are

2

2

k−1

−k

de Bruijn sequences of window length k.

For k = 5 there are 2048 de Bruijn sequences.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 24 / 41

Questions about de Bruijn Sequences

How many de Bruijn Sequences are there?

We need to be able to count the number of Eulerian circuits in a

directed graph.

Theorem (de Bruijn, 1946)

There are

2

2

k−1

−k

de Bruijn sequences of window length k.

For k = 5 there are 2048 de Bruijn sequences.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 24 / 41

Questions about de Bruijn Sequences

History of de Bruijn sequences

The existence question was ﬁrst proposed by A de Rivi`ere in the

french problem journal l’Interm´ediaire des Math´ematiciens in

1894.

The ﬁrst solution was published the same year by C Flye de

Sainte-Marie [5] using graph theory.

Many others contributed between 1894 and 1946. De Bruijn

later acknowledged Sainte-Marie’s proof being the ﬁrst, but his

name stuck.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 25 / 41

Questions about de Bruijn Sequences

How do we ﬁnd de Bruijn sequences?

We could spend all day tracing our ﬁnger around the de Bruijn graph

and write down de Bruijn sequences. However, as k gets large the de

Bruijn graph becomes very messy and hard to use.

Donald Knuth’s Art of Computer Programming Volume 4 [3] has an

entire section on algorithms for ﬁnding de Bruijn sequences. If you

are interested this is good place to get information.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 26 / 41

Questions about de Bruijn Sequences

How do we ﬁnd de Bruijn sequences?

We could spend all day tracing our ﬁnger around the de Bruijn graph

and write down de Bruijn sequences. However, as k gets large the de

Bruijn graph becomes very messy and hard to use.

Donald Knuth’s Art of Computer Programming Volume 4 [3] has an

entire section on algorithms for ﬁnding de Bruijn sequences. If you

are interested this is good place to get information.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 26 / 41

Questions about de Bruijn Sequences

Our Special de Bruijn Sequence

Recall that the de Bruijn sequence for our trick is

00000100101100111110001101110101.

Question

Once we know the ﬁrst card how do we determine the next four?

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 27 / 41

Questions about de Bruijn Sequences

Our Special de Bruijn Sequence

Recall that the de Bruijn sequence for our trick is

00000100101100111110001101110101.

Question

Once we know the ﬁrst card how do we determine the next four?

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 27 / 41

Questions about de Bruijn Sequences

a + c to the end

If the current window is abcde, where a, b, c, d, and e are all binary

digits in the sequence then the next sequence is bcde(a + c).

The Ace of Hearts corresponds to 11001, so the next card is 10011,

which is the 3 of Diamonds.

Note: This method of working through the sequence does not include

00000, which is the 8 of Clubs.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 28 / 41

Questions about de Bruijn Sequences

a + c to the end

If the current window is abcde, where a, b, c, d, and e are all binary

digits in the sequence then the next sequence is bcde(a + c).

The Ace of Hearts corresponds to 11001, so the next card is 10011,

which is the 3 of Diamonds.

Note: This method of working through the sequence does not include

00000, which is the 8 of Clubs.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 28 / 41

Questions about de Bruijn Sequences

a + c to the end

If the current window is abcde, where a, b, c, d, and e are all binary

digits in the sequence then the next sequence is bcde(a + c).

The Ace of Hearts corresponds to 11001, so the next card is 10011,

which is the 3 of Diamonds.

Note: This method of working through the sequence does not include

00000, which is the 8 of Clubs.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 28 / 41

Applications

Outline

1

Introduction to de Bruijn sequences

2

Questions about de Bruijn Sequences

3

Applications

4

The Mathematician as an Explorer

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 29 / 41

Applications

de Bruijn Sequences, not just for magic anymore

Some uses of de Bruijn sequences:

Robotics

Data Encryption

DNA fragment assembly

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 30 / 41

Applications

Where Am I?

00000100101100111110001101110101

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 31 / 41

Applications

de Bruijn Arrays

Deﬁnition

A de Bruijn array with window size u ×v is an array of zeros and

ones such that every u ×v window of zeros and ones appears exactly

once going around the edges.

Example

A de Bruijn array with window size 2 ×2.

1 0 1 1

1 0 0 0

0 0 0 1

1 1 0 1

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 32 / 41

Applications

de Bruijn Arrays

Deﬁnition

A de Bruijn array with window size u ×v is an array of zeros and

ones such that every u ×v window of zeros and ones appears exactly

once going around the edges.

Example

A de Bruijn array with window size 2 ×2.

1 0 1 1

1 0 0 0

0 0 0 1

1 1 0 1

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 32 / 41

Applications

de Bruijn Arrays

Deﬁnition

A de Bruijn array with window size u ×v is an array of zeros and

ones such that every u ×v window of zeros and ones appears exactly

once going around the edges.

Example

A de Bruijn array with window size 2 ×2.

1 0 1 1

1 0 0 0

0 0 0 1

1 1 0 1

0 0

0 0

The window for:

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 33 / 41

Applications

de Bruijn Arrays

Deﬁnition

A de Bruijn array with window size u ×v is an array of zeros and

ones such that every u ×v window of zeros and ones appears exactly

once going around the edges.

Example

A de Bruijn array with window size 2 ×2.

1 0 1 1

1 0 0 0

0 0 0 1

1 1 0 1

1 1

0 1

The window for:

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 34 / 41

Applications

de Bruijn Arrays

Deﬁnition

A de Bruijn array with window size u ×v is an array of zeros and

ones such that every u ×v window of zeros and ones appears exactly

once going around the edges.

Example

A de Bruijn array with window size 2 ×2.

1 0 1 1

1 0 0 0

0 0 0 1

1 1 0 1

1 1

1 1

The window for:

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 35 / 41

Applications

de Bruijn Arrays

Do de Bruijn Arrays always exist?

If so, is there a nice way to produce them?

How many are there?

Are there always de Bruijn Arrays that allow for easy

determination of location?

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 36 / 41

Applications

de Bruijn Arrays

Do de Bruijn Arrays always exist? In special cases yes, but in

general we don’t know.

If so, is there a nice way to produce them? Not sure.

How many are there? Not sure.

Are there always de Bruijn Arrays that allow for easy

determination of location? Not sure.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 37 / 41

Applications

Digital Pens and Paper

Livescribe [2] Dot Paper that uses the Anoto Pattern

The paper is covered with a dot pattern that is relatively

invisible and is printed on the paper at a resolution of 600 dots

per inch (dpi).

The pen’s infared camera can read the dots and knows it’s exact

location. It can tell the location because the dot pattern is

unique in each “window” of the pen’s camera.

If one thinks of a dot as being a 1 and a blank space as being a

0. This is a sort of de Bruijn array of dots.

There are other such “digital papers” out there.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 38 / 41

Applications

Digital Pens and Paper

Livescribe [2] Dot Paper that uses the Anoto Pattern

The paper is covered with a dot pattern that is relatively

invisible and is printed on the paper at a resolution of 600 dots

per inch (dpi).

The pen’s infared camera can read the dots and knows it’s exact

location. It can tell the location because the dot pattern is

unique in each “window” of the pen’s camera.

If one thinks of a dot as being a 1 and a blank space as being a

0. This is a sort of de Bruijn array of dots.

There are other such “digital papers” out there.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 38 / 41

Applications

Digital Pens and Paper

Livescribe [2] Dot Paper that uses the Anoto Pattern

The paper is covered with a dot pattern that is relatively

invisible and is printed on the paper at a resolution of 600 dots

per inch (dpi).

The pen’s infared camera can read the dots and knows it’s exact

location. It can tell the location because the dot pattern is

unique in each “window” of the pen’s camera.

If one thinks of a dot as being a 1 and a blank space as being a

0. This is a sort of de Bruijn array of dots.

There are other such “digital papers” out there.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 38 / 41

Applications

Digital Pens and Paper

Livescribe [2] Dot Paper that uses the Anoto Pattern

The paper is covered with a dot pattern that is relatively

invisible and is printed on the paper at a resolution of 600 dots

per inch (dpi).

The pen’s infared camera can read the dots and knows it’s exact

location. It can tell the location because the dot pattern is

unique in each “window” of the pen’s camera.

If one thinks of a dot as being a 1 and a blank space as being a

0. This is a sort of de Bruijn array of dots.

There are other such “digital papers” out there.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 38 / 41

Applications

Digital Pens and Paper

Livescribe [2] Dot Paper that uses the Anoto Pattern

The paper is covered with a dot pattern that is relatively

invisible and is printed on the paper at a resolution of 600 dots

per inch (dpi).

The pen’s infared camera can read the dots and knows it’s exact

location. It can tell the location because the dot pattern is

unique in each “window” of the pen’s camera.

If one thinks of a dot as being a 1 and a blank space as being a

0. This is a sort of de Bruijn array of dots.

There are other such “digital papers” out there.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 38 / 41

The Mathematician as an Explorer

Outline

1

Introduction to de Bruijn sequences

2

Questions about de Bruijn Sequences

3

Applications

4

The Mathematician as an Explorer

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 39 / 41

The Mathematician as an Explorer

The Mathematician as an Explorer

yam´at´ar´ajabh´anasalag´am [6]

0111010001

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 40 / 41

The Mathematician as an Explorer

The Mathematician as an Explorer

yam´at´ar´ajabh´anasalag´am [6]

0111010001

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 40 / 41

The Mathematician as an Explorer

Thank You

Thank You

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 41 / 41

The Mathematician as an Explorer

P. Diaconis, R. Graham, Magical mathematics, Princeton

University Press, Princeton, NJ, 2012, the mathematical ideas

that animate great magic tricks, With a foreword by Martin

Gardner.

L. Inc., Livescribe::never miss a word (September 2012).

URL http://www.livescribe.com

D. E. Knuth, The art of computer programming. Volume 4A.

Combinatorial Algorithms, Part 1, Addison-Wesley Publishing

Co., Reading, Mass.-London-Don Mills, Ont., 2011.

A. Ralston, de Bruijn sequences—a model example of the

interaction of discrete mathematics and computer science, Math.

Mag. 55 (3) (1982) 131–143.

URL http://dx.doi.org/10.2307/2690079

C. F. Sainte-Marie, Solution to problem number 58,

l’Interm´ediaire des Mathe´ematiciens 1 (1894) 107–110.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 41 / 41

The Mathematician as an Explorer

S. K. Stein, The mathematician as an explorer, Sci. Amer.

204 (5) (1961) 148–158.

Adam M. Goyt (MSUM) The Magic of De Bruijn Sequences October 1, 2012 41 / 41

- Computational Journalism at Columbia, Fall 2013, Lecture 8: Social Network AnalysisUploaded byJonathan Stray
- 00723735Uploaded byysf1991
- 13. Mathematics - Ijmcar - Connected Middle Domination in GraphsUploaded byTJPRC Publications
- An Efficient Brain Tumor Detection and classification using Neural Network ModelUploaded byijsret
- finalusermanualjavafilesUploaded byapi-275233489
- 3.Comp Sci - IJCSE - Global Reliability - Mohd AshrafUploaded byiaset123
- Cs 261 NotesUploaded byPeng Hui How
- A Primal-Dual Heuristic for a Heterogeneous Unmanned Vehicle Path Planning ProblemUploaded byAurel GS
- investigation taskUploaded byapi-351066982
- 10.1.1.12.9179Uploaded byOlivera Taneska
- BVZ-cvpr98Uploaded bySujeeth Kumar Gattu
- Graph Structure in the WebUploaded byapi-26490800
- mg0aUploaded byconterfoil
- 06 Advanced Centrality ConceptsUploaded bymorgoth12
- ProjectUploaded bySameer Hussain
- Problem SearchUploaded byNopparut
- On the Foundations of Combinatorial TheoryUploaded byscribering
- CHAP-2Uploaded byRAMAKRISHNAN
- Olympiad Combinat or Ics Chapter 7Uploaded bymarinknezevic
- CMS Notes on MathematicsUploaded byHimansu Mookherjee
- MIST MSc-CSE SyllabusUploaded bySajid86
- Uninformed SearchUploaded byOsaigbovo Timothy
- Ban Dung Ryan 3Uploaded byRAJAT SHARMA
- 119096576 AI Lab ProgramsUploaded byगणेश पराजुली
- Unit II(Greedy Algorithms)Uploaded byAshi Krey
- Discrete MathematicsUploaded byAhmad Alhour
- ms and phdUploaded byapi-241206202
- A Topological Framework for Local Structure Analysis in Condensed MatterUploaded byLa
- BetheUploaded byGeorge Jose
- UntitledUploaded byapi-108235015

- BÀI GIẢNG CỦA THẦY NGUYỄN THÀNH NHÂNUploaded byduyhoa83
- QAUploaded byduyhoa83
- LE QUY DONUploaded byduyhoa83
- Trick MulesUploaded byduyhoa83
- Ve Hoc Tieng AnhUploaded byduyhoa83
- FlashUploaded byduyhoa83
- 300 Cau Do Hay Danh Cho Tre Mam NonUploaded byduyhoa83
- Anzan Exercises FYzzTzUploaded byduyhoa83
- 1 Phonics Links and ResourcesUploaded byduyhoa83
- TO-DOUploaded byduyhoa83
- cau doUploaded byduyhoa83
- 0-100_listUploaded byduyhoa83
- Idoc.vn Giao an Lets Go 1a Hoc Ky 2 Cuc HayUploaded byduyhoa83
- Lịch Thi Đấu World Cup 2014Uploaded byduyhoa83
- Cach Tao Fanpage Ban Hang Online 140205114918 Phpapp01Uploaded byduyhoa83
- Brain Gym ExcerciseUploaded byduyhoa83
- 11-knnglmvicnhm-110310104238-phpapp01Uploaded byduyhoa83
- TUYỂN DỤNGUploaded byduyhoa83
- GreetingUploaded byduyhoa83
- 123Uploaded byduyhoa83
- 6758842 How to Remember Names and FacesUploaded byduyhoa83
- 2000%2B Most Common Words, Translated (PUBLIC)Uploaded byduyhoa83
- 05_06_2009_20538_461Uploaded byduyhoa83
- 123Uploaded byduyhoa83
- SO LUOC NỘI DUNGUploaded byduyhoa83
- 78154917 Dang Kyd Uth iUploaded byduyhoa83
- NỘI DUNG HỘI THẢOUploaded byduyhoa83
- NỘI DUNG HỘI THẢOUploaded byduyhoa83
- Memory Course AdvUploaded byduyhoa83
- Tri Nho Sieu DangUploaded byduyhoa83