Fix recent (ex PDF) assigment/archive/*.shtml typos.
[parallel_computing.git] / assignments / archive / logistic_cuda / index.shtml.itex2MML
index 03951bbdc2011810bb3958e16b37856b0f96136b..80445bfe1fbf8e157d5470eaa3671a19acf03db9 100644 (file)
@@ -6,7 +6,8 @@
 <h2>Purpose</h2>
 
 <p>Learn the CUDA language.</p>
-</p>Note: Please identify all your work.</p>
+
+<p>Note: Please identify all your work.</p>
 
 <!--TableOfContents:Begin-->
 <!--TableOfContents:End-->
@@ -69,7 +70,7 @@ that generates a bifurcation diagram for the logistic map. The
 logistic map is a map of real line to itself given by</p>
 
 <p class="equation">\[
-  x_{i+1} = a − x2_i.
+  x_{i+1} = a - x_i^2.
 \]</p>
 
 <p>This mapping is ubiquitous in many problems of practical interest
@@ -84,21 +85,21 @@ values of $a$. A plot of the asymptotic values of $x$ verses $a$ is
 called a <em>bifurcation diagram</em>.</p>
 
 <p>The reason for this terminology is as follows. The asymptotic
-behavior often varies smoothly with $a$. For example, for some $a$
-$x_0$ may tend to some fixed point $x^∗$ with the value of $x^∗$
-varying smoothly with $a$. However, for another $a$ $x_0$ could end up
-in a period two orbit, oscillating between two values $x_1^∗$ and
-$x_2^∗$. The values of these two points may also vary smoothly with
-$a$, but there is some transition value $\tilde{a}$ where we jump from
-the fixed point to the period two orbit. This non-smooth process is
-called a <em>bifurcation</em>. The bifurcation diagram then shows all
-of these bifurcations on a single plot since we scan over all values
-of $a$.</p>
+behavior often varies smoothly with $a$. For for some $a$, $x_0$ may
+tend to some fixed point $x^{(1)}$ with the value of $x^{(1)}$ varying
+smoothly with $a$. For another $a$, $x_0$ could end up in a period two
+orbit, oscillating between two values $x_1^{(2)}$ and $x_2^{(2)}$. The
+values of these two points may also vary smoothly with $a$, but there
+is some transition value $\tilde{a}$ where we jump from the fixed
+point to the period two orbit. This non-smooth process is called a
+<em>bifurcation</em>. The bifurcation diagram then shows all of these
+bifurcations on a single plot since we scan over all values of
+$a$.</p>
 
 <p>The serial code loops over a and iterates a random initial
 condition <code>THRESH</code> number of times. This is to let
 transients “die out” and approach the asymptotic behavior.  If an
-iterate leaves the interval $[2, 2]$ during this time it will
+iterate leaves the interval $[-2, 2]$ during this time it will
 eventually escape to $\infty$, so the trajectory is thrown out and
 another random initial condition is tried. It is known that positive
 measure attracting sets exist for the $a$ values in the program so
@@ -112,7 +113,7 @@ in. This repeats until <code>xRES</code> number of initial conditions
 have been iterated and binned. The bins are then normalized to a
 maximum value of one and are then output to the screen. The values in
 the bins are essentially the density of iterates around various points
-and plotting them shows the bifurcation structure of the map.</code>
+and plotting them shows the bifurcation structure of the map.</p>
 
 <h3 id="B-assigment">Assignment</h3>
 
@@ -123,7 +124,7 @@ you’re supposed to produce.</p>
 
 <pre>
 gcc -o logistic logistic.c -lm
-./logistic > log.dat
+./logistic &gt; log.dat
 gnuplot -persist log.p
 </pre>
 
@@ -165,12 +166,12 @@ or (Lebesgue almost) every initial condition may excape to
 $\infty$.</p>
 
 <p>Modify the CUDA program using an extra dimension of block/threads
-to assign initial condtions distributed throughout the interval $[2,
+to assign initial condtions distributed throughout the interval $[-2,
 2]$ amongst these threads. Have the various threads bin the bounded
 trajectories together. Solutions that escape the interval should not
 be binned.</p>
 
-<p>Test this code on the map $x_{i+1} = a−(a−x_i^2)^2$ and compare
+<p>Test this code on the map $x_{i+1} = a-(a-x_i^2)^2$ and compare
 against the original code. Are the results different? Note, this
 example is the second iterate of the logistic map, so period two
 orbits of the original become distinct period one orbits of the second