Any number of cut shuffles are done.
Five people pull out the top five cards in order.
A deck is given to someone in class.
Magic with Cards
The ones with red cards stand up.
All cards are identified.
The Card Identifier
X Y A B C
00 - ♣️ | 01 - ♠️ | 10 - ♦️ | 11 - ♥️
Five bits correspond to a card
A B C - value of the card (000 interpreted as 8)
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: 32 bits so that each location gives us a unique read.
00000100101100111110001101110101
The Sequence
Want: \(2^k\) bits so that each location gives us a unique read.
De Bruijn Sequences
Goal: build these sequences by taking an Euler Tour in a graph.
Vertices: one for each bit string of length \(k-1\).
Total # of vertices = \(2^{(k-1)}\).
Each vertex will have
two in-neighbors and two out-neighbors.
Total # of edges = \(2^{(k)}\).
00
11
01
10
\(a_1...a_{k-1}\)
\(b_1...b_{k-1}\)
When should you add this edge?
\(a_2...a_{k-1} = b_1...b_{k-2}\)
[Suffix-Prefix match.]
0
1
1
1
1
1
1
0
0
0
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
1
1
1
0
1
1
0
0
0
0
0
0
1
1
1
0
1
1
0
0
0
0
0
\(a_2\)
\(b_1\)
\(b_2\)
\(b_3\)
\(\cdots\)
\(b_{k-1}\)
\(a_1\)
\(a_3\)
\(\cdots\)
\(a_{k-2}\)
\(a_{k-1}\)
\(b_{k-1}\)
Any vertex has two out-neighbors.
\(a_2\)
\(b_1\)
\(b_2\)
\(b_3\)
\(\cdots\)
\(b_{k-1}\)
\(a_1\)
\(a_3\)
\(\cdots\)
\(a_{k-2}\)
\(a_{k-1}\)
\(b_{k-1}\)
Any vertex has two out-neighbors.
\(a_2\)
\(b_1\)
\(b_2\)
\(b_3\)
\(\cdots\)
\(b_{k-1}\)
\(a_1\)
\(a_3\)
\(\cdots\)
\(a_{k-2}\)
\(a_{k-1}\)
\(b_{k-1}\)
Any vertex has two in-neighbors.
\(a_2\)
\(b_1\)
\(b_2\)
\(b_3\)
\(\cdots\)
\(b_{k-1}\)
\(a_1\)
\(a_3\)
\(\cdots\)
\(a_{k-2}\)
\(a_{k-1}\)
\(b_{k-1}\)
Any vertex has two in-neighbors.
00
11
01
10
00
11
01
10
00
11
01
10
0
0
00
11
01
10
0
0
1
00
11
01
10
0
0
1
0
00
11
01
10
0
0
1
0
1
00
11
01
10
0
0
1
0
1
1
00
11
01
10
0
0
1
0
1
1
1
00
11
01
10
0
0
1
0
1
1
1
0
00
11
01
10
0
0
1
0
1
1
1
0
00
11
01
10
0
0
1
0
1
1
1
0
00
11
01
10
0
0
1
0
1
1
1
0
Card Trick Euler Tours
By Neeldhara Misra
Card Trick Euler Tours
- 562