400 likes | 502 Views
Notes on the optimal encoding scheme for self-assembly. Days 10, 11 and 12 Of Comp Sci 480. Question. How do you encode an n-bit binary string?. Answer. Have a unique tile type to encode each bit separately, so we represent 1 bit per tile. We’ve seen this before. Is this optimal? NO!.
E N D
Notes on the optimal encoding scheme for self-assembly Days 10, 11 and 12 Of Comp Sci 480
Question How do you encode an n-bit binary string?
Answer Have a unique tile type to encode each bit separately, so we represent 1 bit per tile. We’ve seen this before. Is this optimal? NO!
A brief history • Rothemund and Winfree (2000): 1 bit per tile • Adleman, et. al. (2002): > 1 bit per tile (an optimal number of bits per tile) • Works at temperature 3 • Soloveichik and Winfree (2004): Modified optimal encoding scheme of Adleman, et. al. to work at temperature 2 • Encodes n bits using O(n/log n) tile types
Basic idea • Start with a binary string x = xn-1xn-2∙∙∙x0 • Choose k such that it is the smallest number satisfying n/log n ≤ 2k • More math later… • Break w up into n/k k-bit substrings and store each substring in a unique tile type • Extract the bits from all the substrings until you have 1 bit per tile • Use the value to start a binary counter, or something else…
0 0L 1 1 1 1 0 0 0 0 1 1 0 0 1 1R 1 1 0 1 1 0 0 1 01 R 0L 1 1 0 0 1 01 R 01 01 R R 0L 1 1 0 0 101 R 0L 1 1 0 0 101 R 0 0 $ $ 101 101 R R 0L 1 10 + 0101 R 0L 1 10 + 0101 R 10 10 + + 0101 0101 R R 0L 110 + 0101 R 0L 110 + 0101 R 110 110 + + 0101 0101 R R 0110L + 0101 R 0110L + 0101 R 3 3 2 2 1 1 Can use the bits encoded in the north glues of the topmost row as the start value for a binary counter (or an input to a Turing machine)! For the sake of example, let k = 4 for the binary string x = 01100101
The general construction Unpacking tiles broken down into several logical groups • Seed row • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
The seed row Since x = xn-1xn-2∙∙∙x0, we let m = n/k, i.e., the number of k-bit substrings in x. Write x = wm-1wm-2∙∙∙w0 as the concatenation of m k-bit binary substrings, with wm-1 padded to the left with leading 0’s if needed. Create these tile types: wm-1L + wm-2 + w0 R 2m-1 2m-1 2m-2 2m-2 2m-3 2m-3 2m-4 1 0 0
The general construction Unpacking tiles broken down into several logical groups • Seed row • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
0 0L 1 1 1 1 0 0 0 0 1 1 0 0 1 1R 1 1 0L 1 1 0 0 1 01 R 0L 1 1 0 0 1 01 R 01 01 R R 0L 1 1 0 0 101 R 0L 1 1 0 0 101 R 0 0 $ $ 101 101 R R 0L 1 10 + 0101 R 0L 1 10 + 0101 R 10 10 + + 0101 0101 R R 0L 110 + 0101 R 110 + 0101 R 110 + + 0101 0101 R R + 0101 R bL b 0110L + 0101 R x x 3 3 2 2 1 1 bxL bx Extract bit 0L 110 0110L For all x ϵ {0,1}j where 0 < j ≤ k-1 and b ϵ {0,1}, create the following tile types: Notation: {0,1}j means “the set of all length j binary strings”
The general construction Unpacking tiles broken down into several logical groups • Seed row • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
0 0L 1 1 1 1 0 0 0 0 1 1 0 0 1 1R 1 1 0L 1 1 0 0 1 01 R 0L 1 1 0 0 1 01 R 01 01 R R 0L 1 1 0 0 101 R 0L 1 1 0 0 101 R 0 0 $ $ 101 101 R R 0L 1 10 + 0101 R 0L 1 10 + 0101 R 10 10 + + 0101 0101 R R 0L 110 + 0101 R 110 + 0101 R 110 + + 0101 0101 R R + 0101 R 0110L + 0101 R x x 3 3 2 2 1 1 x + x R + R Copy substring being extracted 0L 110 0110L For all x ϵ {0,1}j where 1 < j ≤ k-1, create the following tile types:
The general construction Unpacking tiles broken down into several logical groups • Seed row • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
0 0L 1 1 1 1 0 0 0 0 1 1 0 0 1 1R 1 1 0L 1 1 0 0 1 01 R 0L 1 1 0 0 1 01 R 01 01 R R 0L 1 1 0 0 101 R 0L 1 1 0 0 101 R 0 0 $ $ 101 101 R R 0L 1 10 + 0101 R 0L 1 10 + 0101 R 10 10 + + 0101 0101 R R 0L 110 + 0101 R 110 + 0101 R 110 + + 0101 0101 R R + 0101 R b 0110L + 0101 R $ x 3 3 2 2 1 1 bx Initiate unpacking of a new substring 0L 110 0110L For all x ϵ {0,1}k-1 and b ϵ {0,1}, create the following tile types:
The general construction Unpacking tiles broken down into several logical groups • Seed row • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
0 0L 1 1 1 1 0 0 0 0 1 1 0 0 1 1R 1 1 0L 1 1 0 0 1 01 R 0L 1 1 0 0 1 01 R 01 01 R R 0L 1 1 0 0 101 R 0L 1 1 0 0 101 R 0 0 $ $ 101 101 R R 0L 1 10 + 0101 R 0L 1 10 + 0101 R 10 10 + + 0101 0101 R R 0L 110 + 0101 R 110 + 0101 R 110 + + 0101 0101 R R + 0101 R + x x 0110L + 0101 R + x x + x R 3 3 2 2 1 1 x + R Copy substring not being extracted 0L 110 0110L For all x ϵ {0,1}k, create the following tile types:
The general construction Unpacking tiles broken down into several logical groups • Seed row • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
0 0L 1 1 1 1 0 0 0 0 1 1 0 0 1 1R 1 1 0L 1 1 0 0 1 01 R 0L 1 1 0 0 1 01 R 01 01 R R 0L 1 1 0 0 101 R 0L 1 1 0 0 101 R 0 0 $ $ 101 101 R R 0L 1 10 + 0101 R 0L 1 10 + 0101 R 10 10 + + 0101 0101 R R 0L 110 + 0101 R 110 + 0101 R 110 + + 0101 0101 R R + 0101 R bL b b 0110L + 0101 R b $ 3 3 2 2 1 1 bL b + Copy bit 0L 110 0110L For all b ϵ {0,1}, create the following tile types:
The general construction Unpacking tiles broken down into several logical groups • Seed row • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
0 0L 1 1 1 1 0 0 0 0 1 1 0 0 1 1R 1 1 0L 1 1 0 0 1 01 R 0L 1 1 0 0 1 01 R 01 01 R R 0L 1 1 0 0 101 R 0L 1 1 0 0 101 R 0 0 $ $ 101 101 R R 0L 1 10 + 0101 R 0L 1 10 + 0101 R 10 10 + + 0101 0101 R R 0L 110 + 0101 R 110 + 0101 R 110 + + 0101 0101 R R + 0101 R R 0R 1R 0110L + 0101 R R 0 1 3 3 2 2 1 1 R R The right side 0L 110 0110L Create the following tile types:
Setup For an arbitrary length n bit string w, represented as n/k k-bit substrings, how many tile types do we need to extract w? Reminder: n is the number of bits in the input binary string. Reminder: k chosen such that it is the smallest number satisfying n/log n ≤ 2k
A key fact • 2k < 2n/log n • Assume otherwise… • 2k ≥ 2n/log n 2k-1 ≥ n/log n • Contradiction to the definition of k being the smallest such number with n/log n ≤ 2k
The seed row • Seed row has 2*n/k unique tile types • We know 2k ≥ n/log n by our choice of k • Therefore: k ≥ log(n/log n) ; take the log of both sides of the previous inequality • Then we have, for “large” values of n: 2*n/k ≤ 2*n/log(n/log n) = 2*n/(log n - log log n) ; log (a/b) = log a - log b < 2*n/(log n - 0) ; 0 < log log n for n ≥ 4 ≤ 2n/log n + 1 ; x ≤ x + 1 for any x ≤ 2n/log n + n/log n ; n/log n ≥ 1 for n ≥ 2 = 3n/log n = O(n/log n)
Tile complexity of the general construction Unpacking tiles broken down into several logical groups • Seed row: O(n/log n) • Extract a bit • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
Extract a bit • We need to compute 2*(2(|{0,1}1| + |{0,1}2| + ∙∙∙ + |{0,1}k-1|)) • 2*(2(|{0,1}1| + |{0,1}2| + ∙∙∙ + |{0,1}k-1|)) = 2*(2*(2+4+∙∙∙+2k-1)) = 4*(2k - 2) < 4*2k < 4*2*n/log n = O(n/log n) For all x ϵ {0,1}j where 0 < j ≤ k-1 and b ϵ {0,1}, create the following tile types: Notation: {0,1}j means “the set of all length j binary strings” bL b x x bxL bx
Tile complexity of the general construction Unpacking tiles broken down into several logical groups • Seed row: O(n/log n) • Extract a bit O(n/log n) • Copy substring being extracted • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
Copy substring being extracted • We need to compute 2*(2(|{0,1}2| + |{0,1}3| + ∙∙∙ + |{0,1}k-1|)) • 2*(2(|{0,1}2| + |{0,1}3| + ∙∙∙ + |{0,1}k-1|)) = 2*(2*(4+8+∙∙∙+2k-1)) = 4*(2k - 4) < 4*2k < 4*2*n/log n = O(n/log n) x x For all x ϵ {0,1}j where 1 < j ≤ k-1 and b ϵ {0,1}, create the following tile types: x + x R + R
Tile complexity of the general construction Unpacking tiles broken down into several logical groups • Seed row: O(n/log n) • Extract a bit O(n/log n) • Copy substring being extracted O(n/log n) • Initiate unpacking of a new substring • Copy substring not being extracted • Copy a bit • The right side
Initiate unpacking of a new substring • The size of the set {0,1}k-1 is 2k-1, and b can take on two possible values, so the total number of tile types created in this step is: 2*2k-1 = 2k < 2n/log n = O(n/log n) b For all x ϵ {0,1}k-1, and b ϵ {0,1}, create the following tile types: $ x bx
Tile complexity of the general construction Unpacking tiles broken down into several logical groups • Seed row: O(n/log n) • Extract a bit O(n/log n) • Copy substring being extracted O(n/log n) • Initiate unpacking of a new substring O(n/log n) • Copy substring not being extracted • Copy a bit • The right side
Copy substring not being extracted • The size of the set {0,1}k is 2k, so the total number of tile types created in this step is: 3*2k < 3*2n/log n = O(n/log n) + x x For all x ϵ {0,1}k, create the following tile types: + x x + x R x + R
Tile complexity of the general construction Unpacking tiles broken down into several logical groups • Seed row: O(n/log n) • Extract a bit O(n/log n) • Copy substring being extracted O(n/log n) • Initiate unpacking of a new substring O(n/log n) • Copy substring not being extracted O(n/log n) • Copy a bit O(1) • The right side O(1) TOTAL: O(n/log n)
Summary • We can encode an n-bit binary string using O(n/log n) unique tile types
Application to squares • How do we apply the optimal encoding scheme to the self-assembly of an NxN square? • What is the resulting tile complexity? • n = log N • Can encode n bits using O(n/log n) tile types • Tile complexity of square: O(log N / log log N) • Homework problem
Improvement • I presented the construction using “spacer” tiles in between each k-bit substring • Can we remove the spacer tiles? • This wouldn’t give us an asymptotical improvement over O(n/log n), but it might make implementation easier • Definitely worth thinking about…
wm-1L + wm-2 + w0 R 2m-1 2m-1 2m-2 2m-2 2m-3 2m-3 2m-4 1 0 0 wm-1L wm-2 w0R 2m-1 2m-1 2m-2 1 0 + x x x x x + x x + x R x x + y x R x + R + y R Improved (?) construction Need to modify seed row: Still get O(n/log n) tile types after deleting the “spacer” tile types. Need to combine “Copy substring being extracted” with “Copy substring not being extracted” groups… Copy substring being extracted Copy substring NOT being extracted BEFORE… Among others, we will at least need these tile types… For all x ϵ {0,1}j, where 1 < j ≤ k-1, and for all y ϵ {0,1}k create the following tile types… What is the tile complexity of just this group of tile types?
Tile complexity of modification • Tile complexity of our previous modification: “For all x ϵ {0,1}j, where 1 < j ≤ k-1, and for all y ϵ {0,1}k create the following tile types…” |{0,1}j | 1 < j ≤ k-1 }|*|{0,1}k| = (2k-2) 2k = 2k2k-2*2k > 22k - 2*(2*n/log n) = (2k)2- 2*(2*n/log n) ≥ (n/log n)2 - 1/2*(n/log n)2 = 1/2*(n/log n)2 = Ω(n2/log2 n) = No good! • It seems like the spacer tiles are needed, unless drastic changes are made.