Presentation is loading. Please wait.

Presentation is loading. Please wait.

Notes on assembly verification in the aTAM Days 22, 24 and 25 of Comp Sci 480.

Similar presentations


Presentation on theme: "Notes on assembly verification in the aTAM Days 22, 24 and 25 of Comp Sci 480."— Presentation transcript:

1 Notes on assembly verification in the aTAM Days 22, 24 and 25 of Comp Sci 480

2 Introduction We are going to study algorithms that verify tile sets E.g., write an algorithm that determines if a particular is uniquely produced by a tile set Critical resource: running time Important problems: design of self- assembly simulators

3 Warm up Problem 0 (Assembly verification = AV) –Input: A temperature τ and an assembly A Tile set inferred from the assembly A –Output: Yes if A is producible, and No otherwise Design an algorithm that solves problem 0 as efficiently as possible Is every assembly producible? –If yes, then running time would be O(1) –Not every assembly is producible

4 The algorithm Algorithm Greedy-Grow (A, τ) 1.Start with A' = A(0,0) // (0,0) always has the seed 2.While there is a site (x,y) with A(x,y) = t and A'(x,y) = empty such that t can be added to A' at (x,y), add it. 3.If A ≠ A', then output "A is not producible" 4.Else output "A is producible" Running time: ??? O(|A| 2 ) –For each tile addition, the perimeter of A' is searched O(|A|) –Don’t search the perimeter over and over again –Maintain a list of all sites at which a tile could be placed immediately |A| tile additions O(1) amount of work per tile addition

5 Easy and hard problems Some problems are “easy”, some are “hard” We’ll classify problems as “easy” if one can exhibit an algorithm that solves it with running time O(n 4 ), where n is the size of the input A “hard” problem is such that, no matter how clever the programmer, any algorithm that solves it has running time Ω(2 n )

6 Easy problem example Input: a list of numbers x 0, x 1, …, x n-1 and a number x Output: Yes if x = x i for some i = 0, …, n-1 and No otherwise Algorithm: linear search Running time O(n) (worst, best and average case)

7 Another easy problem Input: a temperature τ and an assembly A –Tile set inferred from the assembly A Output: Yes if A is producible and No otherwise Algorithm: use the Greedy-Grow algorithm –Running time is O(n), where n = |A| (size of input)

8 Hard problem example Notation: –x V y = “x or y” //x || y –x Λ y = “x and y”//x && y –¬x = “not x”//!x Input: –n boolean variables x 0, …, x n-1, –m clauses C j Disjunction (“or”) of three boolean literals –Boolean literal = a boolean variable, OR its negation That is, C j = (l p V l q V l r ), where 0 ≤ p < q < r ≤ n-1 and l p = x p or ¬x p, l q = x q or ¬x q, l r = x r or ¬x r –A formula φ = C 0 Λ C 1 Λ ∙∙∙ Λ C m-1 Conjunction (“and”) of the clauses Output: Yes if there is a way to assign boolean values to the variables x 0, … x n-1 so as to make φ true and No otherwise Example: φ = (x 0 V ¬x 1 V ¬x 2 ) Λ (x 0 V x 1 V x 3 ) –Output: Yes (setting x 0 to TRUE satisfies the formula) This problem is probably very hard –Not proven!

9 3SAT The previous problem is usually called “3SAT” Like I said, it is probably a very difficult problem for a computer program to solve Most likely: any algorithm you write that solves 3SAT (finds a satisfying assignment, or reports that one doesn’t exist) will run in time Ω(c n ), where c > 1 –Try it!

10 3SAT – What not to do This doesn’t work… For a given 3SAT formula φ… –Enumerate all possible True / False assignments for the n variables. –If one True / False assignment satisfies φ, then output Yes, otherwise output No This algorithm has running time… –?–? –O(2 n )

11 3SAT is useful We will use 3SAT to prove that certain problems in self-assembly are hard

12 Hw5 Problem 1: self-assembly of “Pacman” shapes What defines a thin Nxk Pacman shape? –N must be odd –k < log N / (log log N - log log log N) –Row 0 is 2k points wide –Row N/2 is k points wide –Row N-1 is 2k points wide –For 0 < i ≤ N/2, row i can be no wider than row i-1 –For N/2 < i ≤ N-1, row i-1 can be no wider than row i

13 Pacman example Nxk Pacman shape, where N = 19, and k = 5 (not thin, but oh well) Must be 5 tiles wide Must be 10 tiles wide Seed tile, placed at the origin If T uniquely produces some Nxk thin Pacman shape, then |T| ≥ ??? Note: for particular N,k values, there are many thin Pacman shapes.

14 3SAT warm up Is the following formula “satisfiable”? –I.e., can you set the variables so that the formula is true? φ = (x 0 V ¬x 2 V ¬x 4 ) Λ (¬x 1 V x 3 V x 5 ) Λ (x 2 V ¬x 3 V x 5 ) Λ (¬x 4 V ¬x 5 V x 7 ) Λ (¬x 2 V ¬x 5 V ¬x 6 ) Λ (¬x 0 V x 3 V ¬x 7 )

15 Two problems Problem 1 (Unique assembly verification = UAV) –Input: A temperature τ and an assembly A Tile set inferred from the assembly A –Output: YES if is A uniquely produced and NO otherwise Problem 2 (Unique shape verification = USV) –Input: a tile set T, a temperature τ and a shape X –Output: YES if X is uniquely produced by T and NO otherwise Design algorithms to solve these problems (one algorithm per problem) What are the running time complexities? Which one is easy? Which one is hard?

16 Algorithm for UAV Algorithm Unique-Assembly (A, T, τ) // Adleman, et. al., 2002 1.Let A' = Greedy-Grow(A, τ) If A ≠ A', then A is not produced. 2.For all non-empty sites (x,y), test whether any tile t can be added at an adjacent site. If YES, then A is not terminal. 3.For all non-empty sites (x,y), let A/(x,y) be the assembly A with the tile at (x,y) removed. Let A'' = Greedy-Grow(A/(x,y), τ). If a tile t ≠ A(x,y) can be added to A'' at (x,y), then A is not uniquely produced. 4.If A does not fail any of the above three tests, then A is uniquely produced and terminal.

17 Algorithm Unique-Assembly (A, T, τ) // Adleman, et. al., 2002 1.Let A' = Greedy-Grow(A, τ) If A ≠ A', then A is not produced. 2.For all non-empty sites (x,y), test whether any tile t can be added at an adjacent site. If YES, then A is not terminal. 3.For all non-empty sites (x,y), let A/(x,y) be the assembly A with the tile at (x,y) removed. Let A'' = Greedy-Grow(A/(x,y), τ). If a tile t ≠ A(x,y) can be added to A'' at (x,y), then A is not uniquely produced. 4.If A does not fail any of the above three tests, then A is uniquely produced and terminal. Is this step necessary? YES! Stable, but not producible at temperature 2… Algorithm for UAV 1 23 456 07

18 Running time complexity What is the running time for the Unique- Assembly algorithm? Step 1 (is producible?): O(|A|) Step 2 (is terminal?): O(|A|*|T|) Step 3 (checking locations): O(|A| 2 ) –|A| calls to Greedy-Grow Running time: O(|A|*|T| + |A| 2 )

19 A special case If the temperature is 1, then we can do much better than O(|A|*|T| + |A| 2 ) Doty gives a special algorithm for verifying unique production at temperature 1 –Running time: O(|A|*log |T|) –Proven in ~2012 –Details omitted See: http://www.dna.caltech.edu/~ddoty/papers/phsa.pdfhttp://www.dna.caltech.edu/~ddoty/papers/phsa.pdf

20 An observation The unique assembly verification algorithms also work in 3D We’ll be reminded of this later…

21 A really difficult problem How do we design an algorithm for USV? The problem: –In USV, a tile set may produce exponentially many assemblies that all have the same shape Can’t do a brute-force verification over all possible assemblies

22 A different approach Don’t try to solve USV directly by designing an algorithm that can determine if a tile set uniquely produces a shape Use the USV problem to solve another (probably) hard problem… 3SAT!

23 Solve 3SAT with self-assembly Let φ be a 3SAT formula with n variables and m clauses Let’s design a tile set T φ that “solves” the 3SAT formula φ Basic idea (two phases): –T φ will generate all possible True/False assignments to the n variables –For each True/False assignment of the n variables, T φ will determine whether or not that assignment solves φ (the assembly in which this happens should be rectangular) –If φ is NOT solved by some True/False assignment, don’t place a tile in the corner (the resulting shape is NOT a rectangle)

24 Something from last time Can we prove the following “easily”?: log log N < log N / (log log N – log log log N) Easy, once you realize this: log(a / b) = log a - log b log N / (log log N – log log log N) = log N / log (log N / log log N) > log N / (log N / log log N) = log N * log log N / log N = log log N

25 More efficient algorithm for UAV? Algorithm Unique-Assembly (A, T, τ) // Adleman, et. al., 2002 1.Let A' = Greedy-Grow(A, τ) If A ≠ A', then A is not produced. 2.For all non-empty sites (x,y), test whether any tile t can be added at an adjacent site. If YES, then A is not terminal. 3.Let A' be an empty assembly. While there is a site (x,y) with A(x,y) = t and A'(x,y) = empty such that t can be added to A' at (x,y), add it. If at any point in this process, two tile types could be placed at (x,y), then A is not uniquely produced. 4.If A does not fail any of the above three tests, then A is uniquely produced and terminal.

26 More efficient algorithm for UAV? Algorithm Unique-Assembly (A, T, τ) // Adleman, et. al., 2002 1.Let A' = Greedy-Grow(A, τ) If A ≠ A', then A is not produced. 2.For all non-empty sites (x,y), test whether any tile t can be added at an adjacent site. If YES, then A is not terminal. 3.Let A' be an empty assembly. While there is a site (x,y) with A(x,y) = t and A'(x,y) = empty such that t can be added to A' at (x,y), add it. If at any point in this process, two tile types could be placed at (x,y), then A is not uniquely produced. 4.If A does not fail any of the above three tests, then A is uniquely produced and terminal. Running time: ?

27 More efficient algorithm for UAV? Algorithm Unique-Assembly (A, T, τ) // Adleman, et. al., 2002 1.Let A' = Greedy-Grow(A, τ) If A ≠ A', then A is not produced. 2.For all non-empty sites (x,y), test whether any tile t can be added at an adjacent site. If YES, then A is not terminal. 3.Let A' be an empty assembly. While there is a site (x,y) with A(x,y) = t and A'(x,y) = empty such that t can be added to A' at (x,y), add it. If at any point in this process, two tile types could be placed at (x,y), then A is not uniquely produced. 4.If A does not fail any of the above three tests, then A is uniquely produced and terminal. Running time: O(|A|) + O(|A|*|T|) + O(|A|) = O(|A|*|T|) Does it work?

28 NO! S12 3 4 5 u vw S12 3u vwxy Counter-example… Suppose we have a tile set that can produce two assemblies like this… The previously shown (efficient) algorithm for UAV would sometimes say that either of these assemblies is uniquely produced

29 The coolest tile set in the world…

30 x0x0 x0x0 x0x0 * x0x0 BL x1x1 x n-1 X n-1 x n-1 TL * Variable tiles – one for each of the n variables * * C0C0 BL C0C0 C1C1 C0C0 C0C0 C m-1 BRC m-1 * BR * SAT T * * TLT T OK TT F TF F FF F FF 0 * * xixi * 0x i 1 * * xixi 1x i OK CjCj 0x i If x i = 0  C j true OK CjCj 1x i If x i = 1  C j true OK CjCj CjCj 1x i Otherwise CjCj CjCj CjCj 0x i Otherwise CjCj OK 0x i OK 1x i OK CjCj CjCj 1x i 0x i

31 x0x0 x0x0 x0x0 * x0x0 BL x1x1 x n-1 X n-1 x n-1 TL * * C0C0 BL C0C0 C1C1 C0C0 C0C0 C m-1 BRC m-1 * BR SAT T * * TLT T OK TT F TF F FF F FF 0 * * xixi * 0x i 1 * * xixi 1x i OK CjCj 0x i If x i = 0  C j true OK CjCj 1x i If x i = 1  C j true OK CjCj CjCj 1x i Otherwise CjCj CjCj CjCj 0x i Otherwise CjCj OK 0x i OK 1x i OK CjCj CjCj Clause tiles – one for each of the m clauses * * 1x i 0x i

32 x0x0 x0x0 x0x0 * x0x0 BL x1x1 x n-1 X n-1 x n-1 TL * * C0C0 BL C0C0 C1C1 C0C0 C0C0 C m-1 BRC m-1 * BR SAT T * * TLT T OK TT F TF F FF F FF 0 * * xixi * 0x i 1 * * xixi 1x i OK CjCj 0x i If x i = 0  C j true OK CjCj 1x i If x i = 1  C j true OK CjCj CjCj 1x i Otherwise CjCj CjCj CjCj 0x i Otherwise CjCj OK 0x i OK 1x i OK CjCj CjCj Assignment tiles – these tiles attach non-deterministically to “guess” a true/false assignment for the n variables (2 n possible assemblies) * * 1x i 0x i

33 x0x0 x0x0 x0x0 * x0x0 BL x1x1 x n-1 X n-1 x n-1 TL * * C0C0 BL C0C0 C1C1 C0C0 C0C0 C m-1 BRC m-1 * BR SAT T * * TLT T OK TT F TF F FF F FF 0 * * xixi * 0x i 1 * * xixi 1x i OK CjCj 0x i If x i = 0  C j true OK CjCj 1x i If x i = 1  C j true OK CjCj CjCj 1x i Otherwise CjCj CjCj CjCj 0x i Otherwise CjCj OK 0x i OK 1x i OK CjCj CjCj Computation tiles – these tiles initially bind via south and west. Only one of the tile types per row is created * * 1x i 0x i

34 x0x0 x0x0 x0x0 * x0x0 BL x1x1 x n-1 X n-1 x n-1 TL * * C0C0 BL C0C0 C1C1 C0C0 C0C0 C m-1 BRC m-1 * BR SAT T * * TLT T OK TT F TF F FF F FF 0 * * xixi * 0x i 1 * * xixi 1x i OK CjCj 0x i If x i = 0  C j true OK CjCj 1x i If x i = 1  C j true OK CjCj CjCj 1x i Otherwise CjCj CjCj CjCj 0x i Otherwise CjCj OK 0x i OK 1x i OK CjCj CjCj Propagation tiles – once a clause is satisfied (made to be true), then we propagate the OK signal to the top of the assembly * * 1x i 0x i

35 x0x0 x0x0 x0x0 * x0x0 BL x1x1 x n-1 X n-1 x n-1 TL * * C0C0 BL C0C0 C1C1 C0C0 C0C0 C m-1 BRC m-1 * BR SAT T * * TLT T OK TT F TF F FF F FF 0 * * xixi * 0x i 1 * * xixi 1x i OK CjCj 0x i If x i = 0  C j true OK CjCj 1x i If x i = 1  C j true OK CjCj CjCj 1x i Otherwise CjCj CjCj CjCj 0x i Otherwise CjCj OK 0x i OK 1x i OK CjCj CjCj Status tiles –track the status of the whole formula being satisfied. Once a false clause is found, the formula cannot be made true after that. * * 1x i 0x i

36 An example Here’s an example formula: φ = (x 0 V x 1 V ¬x 2 ) Λ (x 0 V ¬x 1 V x 2 ) Λ (¬x 0 V x 1 V ¬x 2 ) Can φ be solved? –Can you assign values to the 3 variables that make all the clauses of φ true? Sure! x 0 = true, x 1 = true and x 2 = false Not every true/false assignment works, e.g., x 0 = true, x 1 = false and x 2 = true We can convert φ into a tile set T φ and use the tile assembly model to solve φ

37 *x0x0 x1x1 *TT *C0C0 C1C1 C2C2 *** SAT φ = (x 0 V x 1 V ¬x 2 ) Λ (x 0 V ¬x 1 V x 2 ) Λ (¬x 0 V x 1 V ¬x 2 ) All possible true/false assignments tested… Each true/false assignment represented by a different terminal assembly TT 11x2x2 OK C1C1 *0C0C0 C1C1 TT ** FF 10 * x0x0 x1x1 * *C0C0 C1C1 C2C2 * x2x2 C1C1 *0C0C0 C1C1 T 000 * x0x0 x1x1 * *C0C0 C1C1 C2C2 * x2x2 C1C1 T * * * SATTT C0C0 OK C1C1 C0C0 T 100 * x0x0 x1x1 * *C0C0 C1C1 C2C2 * x2x2 T * * * SATTT OK C2C2 C2C2 T 101 * x0x0 x1x1 * *C0C0 C1C1 C2C2 * x2x2 T 110 * x0x0 x1x1 * *C0C0 C1C1 C2C2 * x2x2 T * * * C2C2 TTSATT 01 * x0x0 x1x1 * *C0C0 C1C1 C2C2 * x2x2 0 * *OK *C0C0 C1C1 C0C0 C0C0 FFFT * * * C2C2 C2C2 SATTTTT *** TT 111 * x0x0 x1x1 * *C0C0 C1C1 C2C2 * x2x2 OK C2C2

38 Tile complexity If φ is a 3SAT formula with n variables and m clauses, then what is |T φ | ?? |T φ | = O(m + n) Time complexity to create T φ : O(m + n)

39 What does this mean? For each 3SAT formula φ, we can create a tile set T φ that “solves” φ in a special way –I.e., either placing (or NOT placing) the upper- right corner tile depending on whether φ is solved by a particular True/False assignment If T φ does not uniquely produce a shape, then we can conclude that φ CAN be solved

40 Just pretend Now pretend that there is an algorithm, say Unique-Shape, that solves USV in time O(|X|) –Input: a tile set T, a temperature τ and a shape X –Output: Yes if T uniquely produces a shape (also output the points in the shape in this case) and No otherwise (no output) How do we use Unique-Shape in an algorithm, say Solve-3SAT, that can solve 3SAT with running time “O(n)”?

41 Solve 3SAT using USV Algorithm Solve-3SAT(φ) // φ is a 3SAT formula with n variables // and m clauses 1.Create a tile set T φ as previously discussed. 2.If Unique-Shape(T φ ) outputs No then output Yes. 3.If Unique-Shape(T φ ) outputs Yes then output Yes if the shape is a rectangle, and No if the shape is a rectangle with the top-right corner missing. Running time of Solve-3SAT : O(m + n) + “O(|X|)” + “O(|X|)” + “O(1)”= O(m + n) + “O(1)” = O(m + n) + O(1) = O(n) But this means 3SAT is an “easy” problem, because we have an algorithm that computes it in time O(n) In other words, assuming USV is easy, so too is 3SAT. Contradiction! Thus, USV is probably not easy (so an efficient Unique-Shape probably doesn’t exist).

42 Summary Assembly verification (2D/3D) –Easy Unique assembly verification (2D/3D) –Easy Unique shape verification (2D/3D) –Difficult 


Download ppt "Notes on assembly verification in the aTAM Days 22, 24 and 25 of Comp Sci 480."

Similar presentations


Ads by Google