Presentation on theme: "De Bruijn sequences Rotating drum problem: We require that any four consecutive segments uniquely determine the position of the drum. This means that the."— Presentation transcript:
De Bruijn sequences Rotating drum problem: We require that any four consecutive segments uniquely determine the position of the drum. This means that the 16 possible quadruples of consecutive 0’s and 1’s on the drum should be the binary representation the integers 0 to 15. Can this be done and, if yes, in how many ways?
p2. Consider a digraph (G4) by taking all 3-tuples of 0’s and 1’s as vertices and joining the vertex x 1 x 2 x 3 by a directed edge to x 2 x 3 0 and x 2 x 3 1. The arc (x 1 x 2 x 3, x 2 x 3 x 4 ) is numbered e j, where x 1 x 2 x 3 x 4 is the binary representation of j. The graph has a loop at 000 and 111. The graph has an Eulerian circuit because every vertex has in- degree 2 and out-degree 2. Such a closed path produces the required 16-bit sequence of the drum. Such a sequence is called a De Bruijn sequence Define G n to be the directed graph on (n-1)-tuples of 0’s and 1’s in a similar way. How many edges?
p3. For a 2-in 2-out graph G, we define the “doubled” graph G* as follows: (1) to each edge of G there corresponds a vertex of G*; (2) if a and b are vertices of G*, then there is an edge from a to b iff the edge of G corresponding to a has as terminal end (head) the initial end (tail) of the edge of G corresponding to b. Clearly, G n *=G n+1. A1A1 A2A2 A3A3 B1B1 B3B3 B2B2 a1a1 a3a3 a2a2 b2b2 b1b1 b3b3
p4. De Bruijn graph: ? ? ? ?
p5. Thm Let G be a 2-in 2-out graph on m vertices with M complete cycles. Then G* has 2 m-1 M complete cycles. Pf: Prove by induction on m. (1) If m=1 then G has one vertex p and two loops from p to p. Then G 2 =G* which has one cycle. (2) Suppose G is connected. If every vertex in G has a loop at it, then, with these loops, G has a circuit p 1 p 2 ... p m p 1. Let A i be the loop p i p i and B i be the arc p i p i+1. Denote the corresponding vertices in G* by lower cases.
AiAi aiai bibi a i+1 b i+1 G: G*: BiBi A cycle in G* has two ways of going from b i to b i+1. So G* has 2 m-1 complete cycles, whereas G has only one. Why? (3) Assume G has a vertex x that does not have a loop on it. a b c d P R QSQS x G: p rs q G*:
p7. From g we form a new 2-in 2-out graph with one vertex less by deleting the vertex x. This can be done in two ways: G1 is obtained by merging P=R, Q=S, and G2 by P=S, Q=R. By induction hypothesis, the theorem applies to G1 and G2. There are three types of complete cycles in G*, depending whether the two paths leaving r and returning to p, respectively q, both go to p, both to q, or one to p and one to q. We show one case. The other two cases are similar.
p8. Path 1 goes from r to p, path 2 from s to q, path 3 from s to p, and path 4 from r to q. These yield 4 complete cycles in G*: 1, pr,4,qs,3,ps,2,qr 1, ps,2,qr,4,qs,3,pr 1, ps,3,pr,4,qs,2,qr 1, ps,2,qs,3,pr,4,qr p rs q
p9. In G1* and G2* the situation reduces to: In each of G1* and G2* one complete cycle using the paths 1,2,3,4 is possible p=r q=s G1* p=s q=r G2* p rs q
p10. In the remaining two cases, we also find two complete cycles in G1* and G2* corresponding to 4 complete cycles in G*. Therefore, # complete cycles in G* = 2*(# complete cycles in G1* + # complete cycles in G2*) On the other hand, # complete cycles in G = # complete cycles in G1 + # complete cycles in G2. The theorem follows by induction hypothesis.
p11. Thm 8.2. G n has exactly complete cycles. Pf: It is true for n=1. Since G n *= G n+1, the result follows by ind from Thm 8.1. □