Presentation on theme: "De Bruijn sequences Rotating drum problem:"— Presentation transcript:
1De Bruijn sequences Rotating drum problem: 111111Rotating drum problem:We require that any four consecutive segmentsuniquely 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 theintegers 0 to 15.Can this be done and , if yes, in how many ways?11
2Consider a digraph (G4) by taking all 3-tuples of 0’s and 1’s as vertices and joining the vertex x1x2x3 by a directed edge to x2x30 and x2x31.The arc (x1x2x3 , x2x3x4 ) is numbered ej, where x1x2x3x4 is the binary representation of j.The graph has a loop at 000 and 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 Gn to be the directed graph on (n-1)-tuples of 0’s and 1’s in a similar way. How many edges?
3For 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, Gn*=Gn+1.a2b2b1A2B2a3B1a1A1A3B3b3
5Thm Let G be a 2-in 2-out graph on m vertices with M complete cycles. Then G* has 2m-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 G2=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 circuitp1 p2 ... pm p1 . Let Ai be the loop pi piand Bi be the arc pi pi+1. Denote the corresponding vertices in G* by lower cases.
6(3) Assume G has a vertex x that does not have a loop on it. Aibiai+1Biaibi+1A cycle in G* has two ways of going from bi to bi+1. So G* has 2m-1 complete cycles, whereas G has only one. Why?(3) Assume G has a vertex x that does not have a loop on it.G:G*:abpqPRQSxrsdc
7From 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.
8These yield 4 complete cycles in G*: 1, pr,4,qs,3,ps,2,qr 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,qr1, ps,2,qr,4,qs,3,pr1, ps,3,pr,4,qs,2,qr1, ps,2,qs,3,pr,4,qr
9In G1* and G2* the situation reduces to: pqIn 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.3412rs4G1*2G2*1p=r q=s23p=s q=r431
10Therefore, # complete cycles in G* 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.
11Thm 8.2. Gn has exactly complete cycles. Pf:It is true for n=1.Since Gn*= Gn+1, the result follows by ind from Thm 8.1.□