window movie - What is self

advertisement
Notes for self-assembly of thin
rectangles
Days 19, 20 and 21 of Comp Sci 480
Warm-up
• (From hw3) PROVE: There exist infinitely values of N
for which the tile complexity of uniquely building an
NxN square is O(log log N)
– This is MUCH better (asymptotically) than O(log N / log log
N)
• Consider values of N that are powers of 2: 1, 2, 4, 8,
16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, …
NxN square for N = 1024 + 11
• Observation: 1024 = 210
• Thus, 1024 has 1 + log 1024 = 11 bits
– Encode 1024 using 11 (log 1024) tile types?
– NO!
• Don’t encode 1024 – just encode 10
• Then build a 10x10 square
• Once the “little square” is done, use its top row as
the start value of another counter (something like 8
additional tile types for this)
• The “big square” will have about 210 rows
– 1024 + 10 rows
0 0 0 0 0 0 0 0 0 0 X X X X X X X X
X D C
Y
1034 x 1034
Tile complexity for this
example:
“O(log 10) = O(log log
1034)”
D C
D C
0 0 0 0 0 0 0 0 1 0 D C
0 0 0 0 0 0 0 0 0 1 C
0 0 0 0 X X X X Y X
1
1
X
B
A
0
0
B
A
Y
Y X
Y X
1 0 X
0 1 X
A Y
Y Y
Y Y Y Y Y
In general (if N = 2m):
O(log m) = O(log log N)
No optimal encoding
either!
Y Y Y Y Y Y Y Y Y
We could do this for any
value of N that is a
Y
Y Y Y power of 2!
Warm-up summary
• (Hw3) Prove/disprove: There exists a positive constant c such
that, for all values of N, the tile complexity of uniquely
assembling an NxN square is at least c*log N / log log N.
• Disproved
• For all positive constants c, there exists a value of N such that
the tile complexity of uniquely assembling an NxN square is
less than c*log N / log log N
• Our “power of 2” construction had tile complexity O(log log N)
• Claim: For any positive constant c, there exists an N such that
log log N < c * log N / log log N
– This solves the homework problem
Another warm-up
• Prove (from hw4): there is a program that can remove unused tile types from a given tile set T
• Here’s what doesn’t work:
– For each tile type t in T:
• simulate T (in TAS or some other simulator)
– If there is more than one assembly sequence, then just simulate them all
– If t never appears in the assembly, then remove it from T
• What can go wrong?
• In fact, one can prove that there is NO program that can, in
general, remove un-used tile types from a given tile set
• This doesn’t necessarily mean you should disprove the
problem on the homework
Thin rectangles
What is a thin rectangle?
• Rectangle: Nxk
– N rows, k columns
• Thin rectangles: when k < log N / (log log N –
log log log N)
– “Thick” otherwise
• What does this mean?
• Thin rectangles are so thin…
– You can’t use the optimal encoding trick!
– Why? …
No optimal encoding
• For optimal encoding, we have x = xn-1xn-2∙∙∙x0 that we
split up into n/k k-bit substrings, where n/log n ≤ 2k
< 2n/log n
• Do the math:
n/k ≈ c* n/(log n - log log n), for some constant c
• If n = log N, then we need ≈ log N/(log log N - log log
log N) columns just to start the encoding
• Thin rectangles do not give us enough space to do
this
• Therefore: cannot use optimal encoding for thin
rectangles
Thick rectangles?
• If k > log N / (log log N – log log log N), then the
rectangle is thick
• Can use optimal encoding to uniquely build thick
rectangles
– An NxN square is an example of a thick rectangle
• Tile complexities
– Upper bound: O(log N / log log N) for ALL values of N
• The width doesn’t really matter
– Lower bound: Ω(log N / log log N) for “almost all” N
• Infinitely many examples of N for which the bound does not hold
– Hw3
• Proof uses “Kolmogorov complexity” (see me for project idea)
Lower bound
Lower bound for thin rectangles
• Goal: Prove that the tile complexity for
building thin Nxk rectangles is at least a
certain value
• First, develop sufficient conditions for when
we can “pump” an assembly (up or down)
– A kind of pumping lemma for self-assembly
– Temperature can be arbitrary, so not really related
to pumpability
Window movie lemma
Windows
• Let A be an assembly
• A window is partitioning of A into two disjoint “subassemblies” AL and AR
– AL and AR need not be connected!
– We say that w “cuts” A into AL and AR
• Technically, a window is a way to divide the 2D (3D) coordinate space into
two parts
The window w
S
AL
w’ = w + (-1,0)
S
A = AL U AR
Given a window w, its translation by the vector (x,y) is written as w + (x,y)
Given an assembly A, its translation by a vector (x,y) is written as A + (x,y)
AR
Window movie
• We will now define the term “window movie”
• A window movie will keep track of the order
of placement, position and glue type for each
glue that appears along the window w in
assembly sequence a
Window movie definition
• Let a = (a0, a1, …) be an assembly sequence and w be a
window
• A window movie is the maximal (possibly infinite) sequence
of position and glue ordered pairs, written as Ma,w =
((x0,y0),g0), ((x1,y1),g1), …, given by the order of appearance of
the glues along window w
– If two glues appear simultaneously along a window then the positions
and glues appear in the window movie in the order N, E, S, W
– gi could be “empty”
• The translation of a window movie Ma,w = ((x0,y0),g0),
((x1,y1),g1), … by the vector (x,y), written as Ma,w + (x,y), is the
window movie Ma,w’, where w’ = w + (x,y)
– Each point in the sequence gets translated
Window movie example
NOTE: Different assembly sequences give different window movies
S
S
S
S
S
Seed is placed at (0,0)
S
What is the window movie?
S
Ma,w = ((-1,0), green), ((0,1), yellow), ((0,1), “empty”),
((-1,1), “empty”), ((-1,1), green), ((0,2), yellow),
((-2,1), “empty”)
Window movie lemma (setup)
• Let a = (a0, a1, …) be an assembly sequence
with final result A
• Let w be a window that cuts A into AL and AR
• Let w’ = w + (x,y), for (x,y) ≠ (0,0), be a
translation of w that cuts A into BL and BR
• Let Ma,w and Ma,w’ be window movies for w
and w’, respectively
• Assume AL contains the seed tile
Window movie lemma (setup)
AL
A
AR
w
BL
w’
BR
Window movie lemma
• If Ma,w = Ma,w’ - (x,y), for some (x,y) ≠ (0,0),
then the following two assemblies are
producible:
– ALB’R = AL U B’R
• Where B’R = BR - (x,y)
– B’LAR = B’L U AR
• Where B’L = BL + (x,y)
• Proof idea: construct a valid assembly
sequence that produces the assembly ALB’R.
Further details omitted.
Window movie lemma high-level
example
AL
A
AR
w
BL
w’
BR
Window movie lemma high-level
example
AL
ALB’R = AL U (BR - (x,y))
B’R = BR - (x,y)
A better example
w
S
w’ = w + (3,0)
5 6 8 14 15
2 3 9 11 12
1 4 7 10 13
Ma,w = Ma,w’ + (-3,0)  Window movie lemma says that we can do
this…
Example
w
S
w’ = w + (3,0)
5 6 8 14 15
2 3 9 11 12
1 4 7 10 13
This must also be producible (via Window movie lemma)…
…using a different assembly sequence
Glue windows vs. tile windows
• Window movies are sequences of locationglue pairs
• What about location-tile pairs?
• That is, what if we define a window movie as
Ma,w = ((x0,y0),t0), ((x1,y1),t1), …, where each ti
is a tile type ???
• Let’s do some examples…
“Tile window” example
Same “tile windows” (up to translation)
Try to splice…
Definitely NOT producible!
What if we require the shape to be rectangular OR the tile window
to be completely filled?
“Glue window” example
Back to using glue windows (our original definition)…
There is no assembly sequence that results in equivalent (glue) window
movies (up to translation) for the two windows given above…
…why?
This means we CANNOT apply the Window movie lemma to get a weird,
non-producible (disconnected) assembly!
Thin rectangle tile complexity
• We will prove that the tile complexity of
uniquely building a thin rectangle is Ω(N1/2k/k)
– For EVERY value of N and k
– Only assume unique production of shape
• Allows for possibility of non-determinism
• Our proof is by contradiction
– Assume we can uniquely build a thin rectangle
using a tile set that is “just barely” too small
Thick rectangles need not apply
• Apply the Ω(N1/2k/k) thin rectangle bound to thick rectangles…
• Let k = log N
• Then we have:
N1/2log N/log N
=
(N1/log N)1/2/log N
=
21/2/log N
≈
1.4/log N,
which says that we need at least 0 tile types (as N gets bigger
and bigger)
• If k = N, then we have:
N1/2log N/log N
=
(N1/N)1/2/log N
<
(N1/log N)1/2/log N
≈
1.4/log N.
The setup
• Let T be any tile set that uniquely builds an
Nxk (thin) rectangle
• For the sake of simplicity, assume the single
seed tile type is placed at the origin
• Let G be the number of unique glues in T
– Strength-label pairs
The assumption
• Assume 0 < G < ((N-1)/(2k)!)1/2k
– Should still work with “N-1” replaced with “N” or
“N+1” – either way, not a big deal
• Once we get a contradiction, we will know
that G ≥ ((N-1)/(2k)!)1/2k
Horizontal windows
• Only consider windows that cut the Nxk
rectangle horizontally
• In any such window, there are 2k glue
positions (see the picture…)
• There are less than (N-1)/(2k)! distinct ways
to position glues in these 2k positions...
G < ((N-1)/(2k)!)1/2k
 < ((N-1)/(2k)!)1/2k choices for the first position,
< ((N-1)/(2k)!)1/2k choices for the second position, etc…
 < ((N-1)/(2k)!)1/2k * ((N-1)/(2k)!)1/2k * ∙∙∙ ((N-1)/(2k)!)1/2k
= (((N-1)/(2k)!)1/2k)2k = (N-1)/(2k)!
k
Order matters
• If, along a horizontal window, there are 2k
positions, then how many different ways could
these glues show up?
• How many different orderings?
• Example: how many different ways are there
to order the numbers 1, 2, 3, 4 and 5?
5!
• 2k glue positions means there are (2k)!
possible ways in which the glues could show
up along the window
How many windows?
• In an Nxk rectangle, we have N
rows of tiles
• But only N-1 internal row-to-row
boundaries
• Therefore, there are N-1 ways a
window can cut an Nxk rectangle
horizontally
N
k
Two “identical” window movies
• There are less than (N-1)/(2k)! distinct ways to position glues
in 2k positions along a horizontal window
• Key: In an Nxk rectangle, a positioning of glues along a
horizontal window must be repeated for more than (2k)! of
the windows…
– “N-1 horizontal windows” divided by “number of ways to position
glues along that window” = “number of times some positioning of
glues must be repeated in Nxk assembly”…
– (N-1)/((N-1)/(2k)!) = (2k)!
• But there are only (2k)! possible orderings
• Thus, at least two orderings must be repeated across all
horizontal windows that cut the Nxk assembly
– This gives us two windows w, w’, with w’ = w + (x,y) and (x,y) ≠ (0,0)
such that Ma,w = Ma,w’ - (x,y)
Apply the Window movie lemma
• Assume this is a terminal
assembly produced by T
• The window movie lemma says
that T should be able to do this…
• ALB’R cannot be an Nxk rectangle
B’R
w’
– w’ = w + (x,y), where (x,y) ≠ (0,0)
• ALB’R is terminal
– Otherwise the assembly before
“splicing” wasn’t terminal
ALB’Rw
AL
Where’s the contradiction?
• ALB’R is a contradiction
• What is the contradiction?
• We originally assumed that T uniquely
produces an Nxk rectangle
– Possibly many assemblies, but all must have the
same Nxk rectangle shape
• ALB’R is NOT an Nxk rectangle
The math
• Thus, we have:
G ≥
((N-1)/(2k)!)1/2k
>
((N-1)/(2k)2k)1/2k
; (2k)2k > (2k)!
=
((N-1)1/2k/(2k)2k/2k
=
(N-1)1/2k/2k
>
(N/22k)1/2k/2k ; N-1 > N/22k for k > 2, and large N
=
(N1/2k/2)/2k
=
N1/2k/4k
=
Ω(N1/2k/k)
• Since |T| ≥ G/4, it follows that |T| = Ω(N1/2k/k)
– Note: G/4 ≤ |T| < G4
• |T| < G4 (four sides, G choices per side)
• |T| ≥ G/4 (G glues, tiles have four sides, put a different glue on every side
of every tile type)
Upper bound
Let’s build thin rectangles!
• Build a base-m counter, where m = N1/k
– Do NOT use zig-zag counter design
• Start value encoded in the seed row
– Have k unique tile types
• Total columns: k
• How many “counter” tile types?
– O(m)
•
•
•
•
•
Total rows (start counting at 0): N1/kk = mk
Can start at any number between 0 and mk – 1
North glues of seed row should represent mk – N
Tile complexity: O(m + k) = O(N1/k + k)
Observation: we never used assumption that k < log N /
(log log N - log log log N)
A special case
• Upper bound is O(N1/k + k) for all N
• What if k = log N
– N x log N rectangle
– Not thin
– Tile complexity (as per above):
O(N1/log N + log N) =
O(2 + log N)
=
O(log N)
Discussion
• Upper bound is O(N1/k + k) for all N
• Lower bound is Ω(N1/2k/k) for all N
• Can we get the two bounds to be closer
together?
– Can we lower the upper bound?
– Can we increase the lower bound?
• It is possible to prove a lower bound of Ω(N1/k/k) for all
N
– Can’t use the Window movie lemma
– Use tile windows but pump up, not down
Download