# Physics 434, 2014: Homework 4

1. Write a Matlab code that would generate random E. coli trajectories, similar to what we did in class: constant velocity motion, exponential waiting time between tumbles (modulated by going up or down the gradient), and random re-orientation during a tumble. Verify by histogramming that the distribution of positions of E. coli after many (100 or more) tumbles, as simulated by your script, is, indeed, a gaussian. Plot the mean of the simulated distribution as a function of time. Does is scale linearly with the time? Plot the standard deviation. Does it scale as a square root of time? You will need to run your function many times for different durations to estimate the distribution of the positions. Do the simulations for different parameter values and see how do the mean and the variance of the position depend on the velocity, minimum waiting time, and so on. Explain your observations. Now suppose that the E. coli doesn't choose a totally random direction at every tumble, but instead its new direction is ${\displaystyle \pm \pi /2}$ from the direction of the previous run. How does it change the mean and the variance of the position on long time scales? If you can answer this analytically, submit an analytical argument. If you cannot, do a simulation. Please submit your code as well.
2. Consider a model of a transcription factor moving on a DNA sequence, modeling this as a discrete time random walk. For a single factor bound to the DNA, it will move with ${\displaystyle \propto Dt}$. However, if there are multiple transcription factors, they will hinder each other's diffusion -- two or more cannot be bound to the same DNA site. This is called the excluded volume interaction. Estimate numerically using Matlab/Octave the scaling of ${\displaystyle }$ as a function of the fraction of the number of DNA sites occupied by bound transcription factors. Since two transcription factors cannot exchange their position on the 1-d DNA, the diffusion constant should go to zero in the limit when almost every DNA site is bound by some transcription factor. Do you observe this? Can you guess the functional form of the dependence of ${\displaystyle D}$ on the fraction of occupied sites.
3. For Graduate Students Only: We have discussed that the mean squared displacement in a random walk scales as ${\displaystyle \propto Dt}$. Does this mean that signals propagating due to diffusion are always bound to propagate slowly? Consider the following model, which may be considered as a model describing establishment of morphogen gradients, as we will see later in the class. A 1-dimensional lattice has a particle sitting at each lattice node. However, none of the particles can random walk until they are activated. Activation happens by a contact with another particle. That is, if a particle moves into a site which has an inactive particle, the former activates the latter, both now become motile, and both can activate new particles when they get to them. Originally, only one particle sitting at 0 is motile. Write code to estimate the growth with time of the average size of the region around 0 where all particles are activated. Does the size of the region go as a square root of time? Linearly with time? Or some other scaling? Explain your results with a qualitative physical argument. This is not an easy code to write, and I encourage you to work together on it.