Notes on randomized self- assembly Days 34, 35, 36 and 37 of Comp Sci 480.

Slides:



Advertisements
Similar presentations
The Simple Regression Model
Advertisements

Chapter 4 Probability and Probability Distributions
Independence and the Multiplication Rule
Probability & Statistical Inference Lecture 3
April 2, 2015Applied Discrete Mathematics Week 8: Advanced Counting 1 Random Variables In some experiments, we would like to assign a numerical value to.
1 Discrete Math CS 280 Prof. Bart Selman Module Probability --- Part a) Introduction.
Probability Distributions Finite Random Variables.
Great Theoretical Ideas in Computer Science.
1 Copyright M.R.K. Krishna Rao 2003 Chapter 5. Discrete Probability Everything you have learned about counting constitutes the basis for computing the.
1 Section 5.1 Discrete Probability. 2 LaPlace’s definition of probability Number of successful outcomes divided by the number of possible outcomes This.
Probability and Probability Distributions
The Simple Regression Model
Zeros of Polynomial Functions
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
Random Variable and Probability Distribution
Joint Probability distribution
Stat 1510: Introducing Probability. Agenda 2  The Idea of Probability  Probability Models  Probability Rules  Finite and Discrete Probability Models.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
MATRICES AND DETERMINANTS
Sequences Informally, a sequence is a set of elements written in a row. – This concept is represented in CS using one- dimensional arrays The goal of mathematics.
1 9/8/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Chapter 6: Probability Distributions
Chapter 7: Polynomials This chapter starts on page 320, with a list of key words and concepts.
1 9/23/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
GCSE Session 27 – Probability and Relative Frequency.
Probability, contd. Learning Objectives By the end of this lecture, you should be able to: – Describe the difference between discrete random variables.
Probability The definition – probability of an Event Applies only to the special case when 1.The sample space has a finite no.of outcomes, and 2.Each.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 1 – Slide 1 of 34 Chapter 11 Section 1 Random Variables.
Notes for self-assembly of thin rectangles Days 19, 20 and 21 of Comp Sci 480.
Notes on assembly verification in the aTAM Days 22, 24 and 25 of Comp Sci 480.
1 Relational Algebra and Calculas Chapter 4, Part A.
Notes on the two-handed assembly model (2HAM) Days 38 and 39 of Comp Sci 480.
Copyright © 2010 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
Random Variable. Random variable A random variable χ is a function (rule) that assigns a number to each outcome of a chance experiment. A function χ acts.
1 CHAPTERS 14 AND 15 (Intro Stats – 3 edition) PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY.
Notes on local determinism Days 12, 13 and 14 of Comp Sci 480.
PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY
From Randomness to Probability Chapter 14. Dealing with Random Phenomena A random phenomenon is a situation in which we know what outcomes could happen,
1 CHAPTER 7 PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY.
Notes on temperature programming: lines and scaled shapes Days 28, 29 and 30 of Comp Sci 480.
Chapter 5 Joint Probability Distributions Joint, n. 1. a cheap, sordid place. 2. the movable place where two bones join. 3. one of the portions in which.
Measuring chance Probabilities FETP India. Competency to be gained from this lecture Apply probabilities to field epidemiology.
Probability Theory Modelling random phenomena. Permutations the number of ways that you can order n objects is: n! = n(n-1)(n-2)(n-3)…(3)(2)(1) Definition:
Notes for temperature 1 self- assembly Days 15, 16, 17 and 18 of Comp Sci 480.
+ Chapter 5 Overview 5.1 Introducing Probability 5.2 Combining Events 5.3 Conditional Probability 5.4 Counting Methods 1.
Notes on temperature programming: unique assembly verification Days 30 and 31 of Comp Sci 480.
1 Chapter 4, Part 1 Basic ideas of Probability Relative Frequency, Classical Probability Compound Events, The Addition Rule Disjoint Events.
Notes and Questions on Chapters 13,14,15. The Sample Space, denoted S, of an experiment is a listing of all possible outcomes.  The sample space of rolling.
R.Kass/F02 P416 Lecture 1 1 Lecture 1 Probability and Statistics Introduction: l The understanding of many physical phenomena depend on statistical and.
Chapter 14 From Randomness to Probability. Dealing with Random Phenomena A random phenomenon: if we know what outcomes could happen, but not which particular.
Great Theoretical Ideas in Computer Science for Some.
Chapter 2: Probability. Section 2.1: Basic Ideas Definition: An experiment is a process that results in an outcome that cannot be predicted in advance.
STROUD Worked examples and exercises are in the text Programme 29: Probability PROGRAMME 29 PROBABILITY.
3/7/20161 Now it’s time to look at… Discrete Probability.
1 35 th International Colloquium on Automata, Languages and Programming July 8, 2008 Randomized Self-Assembly for Approximate Shapes Robert Schweller University.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
Copyright © 2010 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
REVIEW A relation is a set of ordered pairs. {(2,3), (-1,5), (4,-2), (9,9), (0,-6)} This is a relation The domain is the set of all x values.
AP Statistics From Randomness to Probability Chapter 14.
Great Theoretical Ideas in Computer Science.
Chapter 4 Some basic Probability Concepts 1-1. Learning Objectives  To learn the concept of the sample space associated with a random experiment.  To.
Probability.
Now it’s time to look at…
Some Rules for Expectation
Chapter 4 – Part 3.
Honors Statistics From Randomness to Probability
Probability.
Notes on temperature programming
Presentation transcript:

Notes on randomized self- assembly Days 34, 35, 36 and 37 of Comp Sci 480

Randomized self-assembly Also known as “tile concentration programming” assembly model –Or just “concentration programming” –First proposed by Becker, Remila, Rapaport in ~2006 Model refined by Kao, Schweller (2008), Doty (2009) Tiles are assigned relative concentrations –In one “mole” of solution, tile t 0 makes up 50% of the tiles, t 1 25%, t 2 15% and t 3 10% Models the situation where two different tile types are “competing” for the chance to bind at a particular location –The higher the concentration of a particular tile, the more likely it is to bind at that location Can be used to study “running time” in self-assembly –We won’t do this

The basic idea ? A B t0t0 A B 2 1 t1t1 A B Y X t1t1 A B Y X t1t1 A B Y X t1t1 A B Y X t1t1 A B Y X t1t1 A B Y X t1t1 A B Y X t0t0 A B 2 1 t0t0 A B 2 1 t1t1 A B Y X t1t1 A B Y X Which tile is more likely to bump into the assembly and bind at this position? Tile type t 1 is more likely to bind, because it has a higher concentration.

Non-determinism Concentration programming always involves non-determinism –Otherwise, what’s the point of the concentrations of tiles? Not interested in tile sets that uniquely produce an assembly Very interested in tile sets that uniquely produce a shape!

Rules of the model The rules are the same as they are for the aTAM –Tiles bind one at a time to a growing assembly –Must bind with strength at least a certain temperature value –Etc. Assign to each tile t T a probability, p(t), such that Σ t T p(t) = 1 Things get interesting when there is more than one location at which a tile may be placed –Even more interesting if, at one of these locations, more than one tile type may attach How to determine which tile binds next to the growing assembly A? –Choose a location –Choose a tile to go at that location…

Step 1: choose a location First, choose a location (there could be many) at which a tile may bind in A Let ∂(A) be the set of all locations in A that can receive a tile Let F(x,y) = “the sum of all the probabilities of all the tiles that can bind to A at location (x,y)” –F(x,y) = Σ { t T | t can bind at A(x,y) } p(t) Let F = “the sum of all the probabilities of all the tiles that can bind at any location in A” –F = Σ (x,y) ∂(A) F(x,y) Let P(x,y) = F(x,y) / F –P(x,y) is known as the “position selection probability”

Step 2: choose a tile Once we have a location, we need to choose a tile that can be placed For this, define P(t | (x,y)) = p(t) / F(x,y) –Tile selection probability –It’s the conditional probability that t attaches at location (x,y) in A Assuming (x,y) can receive a tile at all!

Put it all together Multiply the probabilities to see which tile goes next –I.e., to see the probability of a particular tile being placed at a particular location P(x,y) * P(t | (x,y)) –This is the probability that t is placed at location (x,y) in the next assembly step –Can be simplified to: p(t) / F Time for an example…

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% E 5 D 54

Terminal assemblies S 2 4 C 3 4 A 1 2 S 2 4 A 1 2 B 3 1 E 5 D 54 A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% E 5 D 54 Two terminal assemblies… …which one is more likely to self- assemble?

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 E 5 D 54

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 P(0,1)*p(A | (0,1)) = (F(0,1) / F)*(p(A) / F(0,1)) =.05 / ( ) * (.05 /.05) =.05 /.85 * 1 =.059 = 5.9% (0,1) E 5 D 54 D 54

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 P(1,0)*p(C | (1,0)) = (F(1,0) / F)*(p(C) / F(1,0)) = (.6 +.2) / ( ) * (.6 / (.6 +.2)) =.8 /.85 *.6 /.8 =.6 /.85 =.706 (1,0) 5.9% E 5 D 54 D 54

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 P(1,0)*p(D | (1,0)) = (F(1,0) / F)*(p(D) / F(1,0)) = (.6 +.2) / ( ) * (.2 / (.6 +.2)) =.8 /.85 *.2 /.8 =.2 /.85 = 23.5% (1,0) 5.9% 70.6% E 5 D 54 D 54

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 P(1,0)*p(D | (1,0)) = (F(1,0) / F)*(p(D) / F(1,0)) = (.6 +.2) / ( ) * (.2 / (.6 +.2)) =.8 /.85 *.2 /.8 =.2 /.85 = 23.5% 5.9% 70.6%23.5% E 5 D 54 D 54

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 S 2 4 C 3 4 S 2 4 A 1 2 A % P(1,0)*p(C | (1,0)) = (F(1,0) / F)*(p(C) / F(1,0)) = (.6 +.2) / (.6 +.2) * (.6 / (.6 +.2)) = 1 *.6 /.8 =.75 = 75% ??% E 5 D 54 D 54 D % 70.6%23.5%

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 S 2 4 C 3 4 S 2 4 A 1 2 A % 75% ??% P(1,0)*p(D | (1,0)) = (F(1,0) / F)*(p(D) / F(1,0)) = (.6 +.2) / (.6 +.2) * (.2 / (.6 +.2)) = 1 *.2 /.8 =.25 = 25% E 5 D 54 D 54 D % 70.6%23.5%

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 S 2 4 C 3 4 S 2 4 D 54 A 1 2 A % 75% 25% D 54 E 5 D % 70.6%23.5%

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 S 2 4 C 3 4 S 2 4 A 1 2 A 1 2 S 2 4 C 3 4 A 1 2 S 2 4 A 1 2 B 3 1 E 5 D 54 E 5 D 54 D 54 D % 70.6%23.5% 100% 75% 25% 100%

Probability of producibility For a producible assembly A, look at every path, say π A, from the seed to A Compute the product of all the edges along π A Add up all the products The final number is the probability that A will be produced Back to our example…

A 1 2 B 3 1 C 3 4 S 2 4 p(A) = 5% p(B) = 5% p(C) = 60% p(S) = 5% p(D) = 20% p(E) = 5% S 2 4 S 2 4 S 2 4 S 2 4 A 1 2 C 3 4 S 2 4 C 3 4 S 2 4 A 1 2 A 1 2 S 2 4 C 3 4 A 1 2 S 2 4 A 1 2 B 3 1 E 5 D 54 E 5 D 54 D 54 D % 70.6%23.5% 100% 75% 25% 100%.706 * 1 * *.75 * 1 =75% ??%

A simple case Things aren’t always that complicated If your tile set has the property that, at any step, there is only one location, then all you have to consider is the tile selection probabilities Example: building a 1xN line

Two goals Working in the tile concentration programming model, we will accomplish the following: Design a tile set with size O(1) that can build any 1xN line –N is specified by the concentrations of the tiles –Not possible in neither the aTAM nor the temperature programming model Design a tile set with size O(1) that can build any NxN square –N is specified by the concentrations of the tiles –Also possible with temperature programming, but NOT in the aTAM

Lines Recall tile complexities for 1xN lines: –aTAM: N –Temperature programming: N Tile concentration programming: There is a tile set of size O(1) that can build any 1xN line –N specified by the relative concentrations of the tile types Basic idea: start from a seed and always have two tile types that can bind: –Keep going –Stop growing How many tile types? –3–3

The tile set S ? A ?? B ? p(S) =.01 p(A) = (1 - 1/(N - 1))(1 -.01) p(B) = (1/(N - 1))(1 -.01) Note: p(S) + p(A) + p(B) =.01 + (1 - 1/(N - 1))(1 -.01) + (1/(N - 1))(1 -.01) =.01 + (1 -.01)(1 - 1/(N - 1) + 1/(N - 1)) =.01 + (1 -.01)(1) = = 1.0 This tile set, say T, produces infinitely many terminal assemblies May never stop growing (with extremely low probability) What is the “expected” (a.k.a., average) length of a finite terminal assembly?

Expected length What is the average length of any finite assembly produced by T? Let X represent the length of assembly produced by T –X is a “random variable”, i.e., its value depends on a random process (either stop, or keep going) We want to compute the expectation of X, denoted as E[X] –The average value that X takes on

Expectation To compute the expected value of a random variable, we need to compute this quantity: E[X] = Σ k Pr(X = k)*k Note: k ranges over all values that X can take on Each term in the sum: “The probability that X equals k, times k” In our lines example, k ranges from 2 to infinity!

Expectation computation First and foremost, what is Pr(X = k)? –The probability that the line length is k What has to happen in order to get a line of length exactly k? This means we need k-2 “keep going” tiles to attach followed by a “stop” tile What is the probability of getting this assembly?

S ? A ?? B ? S ? A ?? S ? A ?? A ?? S ? A ?? (1 - 1/(N - 1))(1 -.01) / ((1 - 1/(N - 1))(1 -.01) + (1/(N - 1))(1 -.01)) = 1 - 1/(N – 1) A ?? A ?? S ? A ?? A ?? k - 2 Pr(X = k) = (1 - 1/(N - 1)) k-2 (1/(N - 1)) (1/(N - 1))(1 -.01) / ((1 - 1/(N - 1))(1 -.01) + (1/(N - 1))(1 -.01)) = 1/(N - 1) (1 - 1/(N - 1))(1 -.01) / ((1 - 1/(N - 1))(1 -.01) + (1/(N - 1))(1 -.01)) = 1 - 1/(N – 1)

Expectation summation the good ol’ fashion way… E[X] = Σ k≥2 k*Pr(X = k) = Σ k≥2 k*(1 - 1/(N - 1)) k-2 (1/(N - 1)); definition of Pr(X = k) = Σ k≥2 k*(1 - 1/(N - 1)) k-2 (1/(N - 1)) ; algebra = Σ k≥2 k*(1 - 1/(N - 1)) k-2 (1 - (1 - 1/(N - 1))) ; algebra = Σ k≥2 {k*(1 - 1/(N - 1)) k-2 - k(1 - 1/(N - 1))(1 - 1/(N - 1)) k-2 } ; algebra = Σ k≥2 {k*(1 - 1/(N - 1)) k-2 - k(1 - 1/(N - 1)) k-1 } ; algebra = 1 + Σ k≥0 (1 - 1/(N - 1)) k ; tricky: consecutive terms cancel = 1 + (1 / (1 - (1 - 1 / (N - 1)))); geometric series formula: Σ k≥0 x k = 1 / (1 - x) = 1 + (1 / (1 / (N - 1))) = 1 + (N - 1) = N Hurray!! Easier way: Google “geometric distribution” and note that formula for E[X], when X is a geometric random variable…

Can we do better? Can we do better than 3 tile types? Could we build 1xN (expected) lines with 2 tile types in the tile concentration model? NO! How would you “cap” growth at both ends? –Need two “cap” tiles One would have zero strength on the left The other would have zero strength on the right

Squares How to build NxN squares with O(1) tile types? Modify the line tile set…

Modified (and extended) tile set S 0 A ?? B ?

0 0? S 0 A ?? B ? # L# # # #RRRLL

Example 0 0? S 0 A ?? B ?RRLL A ?? A ?? A ?? # L# # # #R # L# # # #R # L# # # #R # L# # # #R # L# # # #RRRRRRRRRRRRRRRRRRR # L#LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

Relative concentrations 0 0? S 0 A ?? B ? # L# # # #RRRLL p(“all tile types that are not A and B”) =.001 c = Σ t≠A,B p(t) p(A) = (1 - c)(1 - 1/(N - 1)) p(B) = (1 - c)(1/(N - 1)) Let X = dimension of produced square E[X] = N (same as the analysis for lines)

Summary / discussion Randomized self-assembly –A.k.a., tile concentration programming Lines: O(1) tile types Squares: O(1) tile types Correct expected size, but the sizes can vary wildly –Probability of getting a line/square that’s too big/small cannot be controlled in our constructions Other results: –Kao and Schweller (2008): squares with O(1) tile types but more precise control over dimension of the produced square –Doty (2009): squares with O(1) tile types, but extremely precise control over dimension of the produced square Can make the probability of getting a square even just a tiny bit bigger/smaller than desired arbitrarily small…

Wild variation! The average size of our produced square is NxN Probability of getting an NxN square for N = 100 with our simple construction… – (1 - 1/100) 98 (1/100) ≈ =.3%!! There’s no way to make this any better without making serious modifications –Getting a 1000x1000 square will basically never happen Doty (2009): –Constant tile set –Pick a really small (real) number, say ε = Encode ε in the concentrations of the tile types –Doty’s tile set self-assembles into an NxN square (exactly!) with probability at least 1 - ε =.99999

Previous example 0 0? S 0 A ?? B ? # L# # # #RRRLL p(“all tile types that are not A and B”) =.001 c = Σ t≠A,B p(t) p(A) = (1 - c)(1 - 1/(N - 1)) p(B) = (1 - c)(1/(N - 1)) Let X = dimension of produced square E[X] = N (mimic the analysis for lines) Can we do better than 8 tile types?

One last example Let’s do one more example with randomized self-assembly Let’s build a square in a weird kind of way Randomly build the bottom row and then randomly build the height Basic idea: –build the bottom row –build the right column Only after bottom row fully completes –fill in the middle with fillers How do we do this?

ONE way to do it… S # Hi What are the concentrations? p(“all tile types that are neither B nor C”) =.01 c = p(A) + p(Lo) + p(Hi) + p(S) p(B) = (1/2)(1 - c)(1 - 1/(N - 1)) p(C) = (1/2)(1 - c)(1/(N - 1)) What is the average size of the produced assembly? Answer = N Lo B Hi# # A # Lo # C Hi # S # A # Lo # B Hi# # A # Lo # B Hi# # C # A # Lo # Hi Lo

ANOTHER The tile set S ? A ?? F What are the concentrations? p(“all tile types that are not A, A', B and B'”) =.01 c = p(F) + p(S) p(A) = (1/2)(1 - c)(1 - 1/(N - 1)) p(B) = (1/2)(1 - c)(1/(N - 1)) p(A') = (1/2)(1 - c)(1 - 1/(N - 1)) p(B') = (1/2)(1 - c)(1/(N - 1)) What is the average size of the produced assembly? B ? ? A' ? ? B' ?

Expected squares Let X = size of the produced assembly E[X] = Σ w,h≥2 (w*h)*Pr(X = w*h) What is Pr(X = w*h)? Seed, w-2 A tiles, 1 B tile, h-2 A' tiles, 1 B' tile, fillers take care of the rest –Pr(X = w*h) = (1-1/N) w-2 (1/N)(1-1/N) h-2 (1/N) = (1 - 1/N) w+h-4 1/N 2 E[X] = Σ w,h≥2 (w*h)*Pr(X = w*h) = Σ w,h≥2 (w*h)(1-1/N) w+h-4 1/N 2 = ??? There’s an easier way…

Independent events Let X and Y be two events (things we want to have happen) X and Y are said to be independent if P(A and B) = P(A)*P(B) Example: –A = probability of rolling a dice one time and getting a 6 –B = probability of rolling two numbers that sum to 8 A and B are NOT independent events P(A) = 1/6 P(B) = “2,6” + “3,5” + “4,4” + “5,3” + “6,2” / 6*6 = 5/36 P(A and B) = 1/36 P(A)*P(B) = 1/6 * 5/36 < 1/6 * 6/36 = 1/36

From last time: the tile set S ? A ?? F What are the concentrations? p(“all tile types that are not A, A', B and B'”) =.01 c = p(F) + p(S) p(A) = (1/2)(1 - c)(1 - 1/(N - 1)) p(B) = (1/2)(1 - c)(1/(N - 1)) p(A') = (1/2)(1 - c)(1 - 1/(N - 1)) p(B') = (1/2)(1 - c)(1/(N - 1)) What is the average size of the produced assembly? B ? ? A' ? ? B' ?

Expectation and independence For random variables X, Y, we say that X and Y are independent if all the events related to X and Y are independent events –Not a formal definition –Formal definition is more complicated than this Example: X is the length of the line –Related event: X = 4 If X and Y are independent random variables, then E[X*Y] = E[X]*E[Y] Let X = width of produced assembly Let Y = height of produced assembly Are X and Y independent? –Yes! –Can get any height regardless of the height, and vice versa

Expected size of assembly Let Z = X*Y = size of produced assembly –If E[Z] = N 2, then we’re good! E[Z] = E[X*Y] = E[X]*E[Y] E[X] = E[Y] In our previous example: E[X] = N –Now what is it?

Expectation computation E[X] = Σ k≥2 k*Pr(X = k) = Σ k≥2 k*(1 - 1/(N - 1)) k-2 (1/(N - 1)) = Σ k≥2 k*(1 - 1/(N - 1)) k-2 (1 - (1 - 1/(N - 1))) = Σ k≥2 {k*(1 - 1/(N - 1)) k-2 - k(1 - 1/(N - 1))(1 - 1/(N - 1)) k-2 } = Σ k≥2 {k*(1 - 1/(N - 1)) k-2 - k(1 - 1/(N - 1)) k-1 } = 1 + Σ k≥0 (1 - 1/(N - 1)) k = 1 + (1 / (1 - (1 - 1 / (N - 1)))) = 1 + (1 / (1 / (N - 1))) = 1 + (N - 1) = N Expected size of the produced assembly = E[Z] = E[X*Y] = E[X]*E[Y] = E[X] 2 = N 2 Exactly what we wanted!

Can we do even better? S ? A ?? F Can we build (expected) NxN squares with 5 tile types? A' ? ? B' ? B ? ?

Yes? S ? A ?? Can we build (expected) NxN squares with 5 tile types? What are the concentrations? B ? ? A' ? ? B' ? ?

Randomized comb? S ? A ?? Can we build (expected) NxN squares with 5 tile types? What are the concentrations? What is the expected size of the produced assembly? … Hmmmmmm B ? ? A' ? ? B' ? ? p(S) =.001 p(A) = (1/2)(1-p(S))(1-1/(N-1)) p(B) = (1/2)(1-p(S)(1/(N-1)) p(A') = (1/2)(1-p(S))(1-1/(N-2)) p(B') = (1/2)(1-p(S))(1/(N-2))