tag:blogger.com,1999:blog-7410464849664331412018-03-05T08:01:11.244-08:00Kehagiat Scithanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-741046484966433141.post-58612086496183297512011-06-27T07:25:00.000-07:002011-06-27T07:25:06.875-07:00NetLogo Rebellion!!!<div dir="ltr" style="text-align: left;" trbidi="on"><div class="separator" style="clear: both; text-align: center;"><a href="http://ccl.northwestern.edu/netlogo/models/models/Sample%20Models/Social%20Science/Rebellion.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://ccl.northwestern.edu/netlogo/models/models/Sample%20Models/Social%20Science/Rebellion.png" width="320" /></a></div><br />This project models the rebellion of a subjugated population against a central authority. It is is an adaptation of Joshua Epstein's model of civil violence (2002). <a href="http://ccl.northwestern.edu/netlogo/">http://ccl.northwestern.edu/netlogo/</a></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-84454513060937350522011-06-20T12:09:00.000-07:002011-06-20T12:13:29.832-07:00Boids!!!<div dir="ltr" style="text-align: left;" trbidi="on"><a href="http://www.red3d.com/cwr/boids/">http://www.red3d.com/cwr/boids/</a><br /><br /><div align="center"><big><big><big><big><b>Boids</b> </big></big></big></big><br /><b>Background and Update</b> <br />by <a href="http://www.red3d.com/cwr/index.html">Craig Reynolds</a><br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowFullScreen='true' webkitallowfullscreen='true' mozallowfullscreen='true' width='320' height='266' src='https://www.youtube.com/embed/GUkjC-69vaw?feature=player_embedded' FRAMEBORDER='0' /></div><small><small><a href="http://www.red3d.com/cwr/boids/applet/"> </a></small></small><br /><small><small><a href="http://www.red3d.com/cwr/boids/applet/"> </a></small></small></div>In 1986 I made a computer model of coordinated animal motion such as bird flocks and fish schools. It was based on three dimensional computational geometry of the sort normally used in computer animation or computer aided design. I called the generic simulated flocking creatures <a href="http://www.brunel.ac.uk/research/AI/alife/al-boid2.htm">boids</a>. The basic flocking model consists of three simple <a href="http://www.red3d.com/cwr/steer/">steering behaviors</a> which describe how an individual boid maneuvers based on the positions and velocities its nearby flockmates: <br /><table align="center" border="0" cellpadding="0" cellspacing="0"><tbody><tr> <td><img alt="separation diagram" height="145" src="http://www.red3d.com/cwr/boids/images/separation.gif" width="217" /> </td> <td width="10"><br /></td> <td width="150"><b>Separation</b>: steer to avoid crowding local flockmates </td> </tr><tr> <td><img alt="alignment diagram" height="145" src="http://www.red3d.com/cwr/boids/images/alignment.gif" width="217" /> </td> <td width="10"><br /></td> <td width="150"><b>Alignment</b>: steer towards the average heading of local flockmates </td> </tr><tr> <td><img alt="cohesion diagram" height="145" src="http://www.red3d.com/cwr/boids/images/cohesion.gif" width="217" /> </td> <td width="10"><br /></td> <td width="150"><b>Cohesion</b>: steer to move toward the average position of local flockmates </td> </tr></tbody> </table>Each boid has direct access to the whole scene's geometric description, but flocking requires that it reacts only to flockmates within a certain small neighborhood around itself. The neighborhood is characterized by a <i>distance</i> (measured from the center of the boid) and an <i>angle,</i> measured from the boid's direction of flight. Flockmates outside this local neighborhood are ignored. The neighborhood could be considered a model of limited perception (as by fish in murky water) but it is probably more correct to think of it as defining the region in which flockmates influence a boids steering. <br /><div align="center"><img alt="neighborhood diagram" height="158" src="http://www.red3d.com/cwr/boids/images/neighborhood.gif" width="183" /><br />a boid's neighborhood<br /><br /><div style="text-align: left;">(More details on the algorithm can be found <a href="http://www.vergenet.net/%7Econrad/boids/pseudocode.html">here</a>.) </div></div></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-665237313772004722011-06-14T08:35:00.000-07:002011-06-14T08:36:21.695-07:00Cellular Automaton Traffic Simulators<div dir="ltr" style="text-align: left;" trbidi="on"><br /><a href="http://www.bolay.de/kai/RoadApplet/">This applet</a> demonstrates the simulation of traffic flow by cellular automata. You get pictures like this:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://sjsu.rudyrucker.com/images/traffic.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://sjsu.rudyrucker.com/images/traffic.gif" /></a></div><br /><br /><br /><br />There is a great theory on cellular automata as traffic models. You can read about it (for example) <a href="http://www.thp.uni-koeln.de/%7Eas/Mypage/traffic.html">here</a> or <a href="http://theory.org/complexity/traffic/">here</a>.<br /><br />Are you interested in cellular automata <i>generally</i>? They can produce great pictures:<br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://upload.wikimedia.org/wikipedia/commons/thumb/7/72/AC_rhombo.png/600px-AC_rhombo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="112" src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/72/AC_rhombo.png/600px-AC_rhombo.png" width="320" /></a></div>If you want to know the theory behind the pictures, read <a href="http://en.wikipedia.org/wiki/Cellular_automaton">this</a>.<br /><br /><br /></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-75722144789611248962011-06-13T06:36:00.000-07:002011-06-13T06:38:47.678-07:00Sierpinski Carpet<div dir="ltr" style="text-align: left;" trbidi="on">(<a href="http://ecademy.agnesscott.edu/%7Elriddle/ifs/carpet/carpet.htm">http://ecademy.agnesscott.edu/~lriddle/ifs/carpet/carpet.htm</a>)<br /><br /><table border="0" cellpadding="10"><tbody><tr><td>Start with a solid (filled) square <b>C(0)</b>. Divide this into 9 smaller congruent squares. Remove the interior of the center square (that is, do not remove the boundary) to get <b>C(1)</b>. Now subdivide each of the eight remaining solid squares into 9 congruent squares and remove the center square from each to obtain <b>C(2)</b>. Continue to repeat the construction to obtain a decreasing sequence of sets <br /><div align="center"><img align="bottom" alt="" height="13" src="http://ecademy.agnesscott.edu/%7Elriddle/ifs/carpet/image.gif" width="177" /></div>The Sierpinski carpet is the intersection of all the sets in this sequence, that is, the set of points that remain after this construction is repeated infintely often. The figures below show the first four iterations. The squares in red denote some of the smaller congruent squares used in the construction. <br /><div align="center"><img align="bottom" alt="" height="277" src="http://ecademy.agnesscott.edu/%7Elriddle/ifs/carpet/carpet.gif" width="390" /></div></td></tr><tr> <td valign="top"><table border="0" cellpadding="10"><tbody><tr></tr><tr><td>The original square is scaled by a factor <b>r</b>=1/3. This is done 8 times followed by the necessary translations to arrange the eight squares as depicted for <b>C(1)</b>. <br /><br /></td></tr></tbody></table></td> <td><br /></td></tr><tr><td valign="top"><table border="0" cellpadding="10"><tbody><tr><td><div align="center"><img align="bottom" alt="" height="570" src="http://ecademy.agnesscott.edu/%7Elriddle/ifs/carpet/image463.gif" width="189" /></div></td></tr><tr> <td valign="top">We have a hyperbolic IFS with three maps, each a similitude of ratio <b>r</b> < 1. Therefore the similarity dimension, <b>d</b>, of the unique invariant set of the IFS is the solution to <a href="http://ecademy.agnesscott.edu/%7Elriddle/ifs/carpet/image332.gif" style="margin-left: 1em; margin-right: 1em;"><img align="bottom" alt="" border="0" height="38" src="http://ecademy.agnesscott.edu/%7Elriddle/ifs/carpet/image332.gif" width="276" /></a></td> <td><div class="separator" style="clear: both; text-align: center;"><a href="http://ecademy.agnesscott.edu/%7Elriddle/ifs/carpet/image332.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div><br /><div align="center"></div></td></tr><tr> <td valign="top">Suppose the area of the original square <b>C(0)</b> is equal to 1. To get <b>C(k+1)</b>, we scale <b>C(k)</b> by 1/3, which reduces the area by 1/9 = (1/3)<sup>2</sup>. But we make 8 copies of this scaled version to form <b>C(k+1)</b>. Therefore the area of <b>C(k+1)</b> must be (8/9)th of the area of <b>C(k)</b>. This means that the area of <b>C(n)</b> is (8/9)<sup><b>n</b></sup> for all <b>n</b>. Notice that these areas go to 0 as <b>n</b> goes to infinity. This means that we have removed "all" of the area of the original square in constructing the Sierpinski carpet. But of course there are many points still left in the carpet. That is one reason why area is not a useful dimension for this set.<br />Sierpinski used the carpet to catalogue all compact one-dimensional objects in the plane (from a topological point of view). What this basically means is the Sierpinski carpet contains a topologically equivalent copy of any compact one-dimensional object in the plane. Thus for any curve contained in the plane, there is a set homeomorphic to the Sierpinski carpet that contains the curve. For a good discussion of this idea, consult the text by Peitgen, Jurgens, and Saupe [6], or the topology text by Engelking and Sieklucki [2].<br />In an article written in 1916, Sierpinski wrote [1]:<br /><blockquote>Note that as early as one year ago Mr. Mazurkiewicz found an example of a curve which was simultaneously a Jordan curve and a Cantor curve...Mazurkiewicz forms this curve by dividing the square into nine smaller squares using lines parallel to the sides and removing the interior of the center square, performing the same procedure on each of the remaining eight square, and iterating this procedure ad infinitum. </blockquote>So the Sierpinski carpet was actually invented by Stefan Mazurkiewicz, who in 1913 wrote his Ph.D. thesis under the supervision of Sierpinski on curves filling a square. For an example of how the Sierpinski Carpet has been an artistic inspiration, see the picture of the <a href="http://www.telusplanet.net/public/gdevries/sierpinski.html">quilt</a> "Sierpinksi Meets Mondrian" designed by Professor Gerda de Vries, University of Alberta.<br /><br /></td> <td><br /><br /><br /><div class="separator" style="clear: both; text-align: center;"><br /></div></td></tr></tbody></table></td><td><br /></td></tr><tr><td valign="top"><iframe allowFullScreen='true' webkitallowfullscreen='true' mozallowfullscreen='true' width='320' height='266' src='https://www.youtube.com/embed/m6oeQkTKxcg?feature=player_embedded' FRAMEBORDER='0' /></td><td><br /></td></tr></tbody></table></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-88469307920068519932011-06-11T08:18:00.000-07:002011-06-11T08:19:30.737-07:00Self referential senteces --- More<div dir="ltr" style="text-align: left;" trbidi="on"><a href="http://petr-mitrichev.blogspot.com/2009/02/self-referential-sentence.html">http://petr-mitrichev.blogspot.com/2009/02/self-referential-sentence.html</a> <br /><a href="http://selfreferentialsentences.blogspot.com/">http://selfreferentialsentences.blogspot.com/</a><br /><a href="http://selfreferentialsentences.blogspot.com/2010_01_01_archive.html">http://selfreferentialsentences.blogspot.com/2010_01_01_archive.html</a><br /><a href="http://www.robertdickau.com/filename.html">http://www.robertdickau.com/filename.html</a><br /><a href="http://www.ddewey.net/puzzle/">http://www.ddewey.net/puzzle/</a><br /><br /></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-39965588040175535262011-06-11T08:16:00.000-07:002011-06-11T08:16:25.695-07:00Self referential sentences<div dir="ltr" style="text-align: left;" trbidi="on">From <a href="http://www.lboro.ac.uk/departments/ma/gallery/selfref/index.html">http://www.lboro.ac.uk/departments/ma/gallery/selfref/index.html</a>.<br /><br /><table border="0" cellpadding="0" cellspacing="0"><tbody><tr valign="top"></tr><tr valign="top"> <td valign="top" width="100%"><span style="color: #c00000;"> Produced by <a href="http://www.port.ac.uk/departments/academic/maths/staff/title,38450,en.html">Andy Burbanks</a></span> The following is adapted from an idea presented by Douglas Hofstadter in his wonderful book <em>Metamagical Themas</em>. <h2>A very peculiar sentence...</h2><a href="" name="first"></a> Can you see anything special about the following sentence?<br /><pre>In this sentence, the number of occurences of 0 is 1,<br /> of 1 is 11, of 2 is 2, of 3 is 1, of 4 is 1, of 5 is 1,<br /> of 6 is 1, of 7 is 1, of 8 is 1, and of 9 is 1.<br /></pre>This is, in fact, a self-referential self-documenting sentence.<br />By <em>self-referential</em>, we mean that it talks about itself. By <em>self-documenting</em> we mean that it makes a (true) statement about its own contents. In this case, it makes a true statement about the number of occurences of each of the digits 0 to 9 that it contains<br />It is very important that the statement it makes is true, because there are plenty of statements of this kind that are false. Just try putting a few randomly chosen numbers into the sentence instead: it is highly unlikely that you will get a <em>true</em> statement just by chance!<br /><a href="" name="second"></a> You might think that the above statement is perhaps unique, but it's not the only one! The following sentence has the same property.<br /><pre>In this sentence, the number of occurences of 0 is 1,<br /> of 1 is 7, of 2 is 3, of 3 is 2, of 4 is 1, of 5 is 1,<br /> of 6 is 1, of 7 is 2, of 8 is 1, and of 9 is 1.<br /></pre><h2>Stranger still...</h2><a href="" name="pair"></a> There is at least one creature that is weirder than the above: What about the following <em>pair</em> of sentences?<br /><pre>In the next sentence, the number of occurences of 0 is 1,<br /> of 1 is 7, of 2 is 4, of 3 is 1, of 4 is 1, of 5 is 1,<br /> of 6 is 1, of 7 is 1, of 8 is 2, and of 9 is 1.<br /><br /> In the previous sentence, the number of occurences of 0 is 1,<br /> of 1 is 8, of 2 is 2, of 3 is 1, of 4 is 2, of 5 is 1,<br /> of 6 is 1, of 7 is 2, of 8 is 1, and of 9 is 1.<br /></pre>These take a peculiar interest in each others contents! But what is more interesting is that <em>both</em> of the sentences are true simultaneously. That is, each of the sentences makes a true statement about the other.<br /><h2>Construction</h2>How is it possible to come up with these strangely introspective sentences?<br />Firstly, consider the blank `template sentence':<br /><pre>In this sentence, the number of occurences of 0 is _,<br /> of 1 is _, of 2 is _, of 3 is _, of 4 is _, of 5 is _,<br /> of 6 is _, of 7 is _, of 8 is _, and of 9 is _.<br /></pre>What is needed is some way of filling in the gaps.<br /><h3>Choosing an initial value</h3>Suppose that we begin by putting in <em>any</em> ten numbers, even though the resulting sentence is almost bound to be false. Each choice of ten numbers gives a <em>vector</em> of ten entries. For example, choosing all of the numbers to be zero gives the vector:<br /><pre>(0,0,0,0,0,0,0,0,0,0)<br /></pre>The corresponding sentence would be:<br /><pre>In this sentence, the number of occurences of 0 is 0,<br /> of 1 is 0, of 2 is 0, of 3 is 0, of 4 is 0, of 5 is 0,<br /> of 6 is 0, of 7 is 0, of 8 is 0, and of 9 is 0.<br /></pre>In this case, the sentence is certainly false since each digit occurs at least once!<br /><h3>Applying a process</h3>What happens if we start with the <em>initial</em> vector chosen above, and then count up the proper numbers of digits that really occur in the corresponding sentence. This gives the new vector:<br /><pre>(11,1,1,1,1,1,1,1,1,1)<br /></pre>Unfortunately, applying this process has again resulted in a false sentence:<br /><pre>In this sentence, the number of occurences of 0 is 11,<br /> of 1 is 1, of 2 is 1, of 3 is 1, of 4 is 1, of 5 is 1,<br /> of 6 is 1, of 7 is 1, of 8 is 1, and of 9 is 1.<br /></pre><h3>Iteration and fixed points</h3>What happens if we repeat this process with the new sentence again and again? This is known as <em>iterating</em> the process. Here are the vectors that result:<br /><pre>(11,1,1,1,1,1,1,1,1,1)<br /> (1,12,1,1,1,1,1,1,1,1)<br /> (1,11,2,1,1,1,1,1,1,1)<span style="color: #c00000;"><br /> (1,11,2,1,1,1,1,1,1,1)</span><br /> ...<br /></pre>After a few steps, the numbers are no longer changing. The resulting vector<br /><pre>(1,11,2,1,1,1,1,1,1,1)</pre>is called a <em>fixed-point</em> of the process, since its value does not change when the process is applied. (We might also call it a <em>1-cycle</em>, i.e. a cycle which repeats every 1 step of the process.) What's more, the corresponding sentence is actually <em>true</em> (in fact, it is the first of the self-documenting sentences <a href="http://www.lboro.ac.uk/departments/ma/gallery/selfref/index.html#first">given above</a>).<br /><h3>'Attraction' to a fixed point</h3>Trying other initial vectors tends to eventually lead to the same result. This means that the fixed point vector is (in some sense) <em>attracting</em> other vectors to it when the process is applied.<br />Notice how an apparently difficult problem (namely, coming up with correct values to place into the template) has been solved by iterating a simple process. In this case it worked because the fixed point was `attracting' other values when the process was iterated.<br />In fact, the above fixed point is not the only one, there is another (corresponding to the <a href="http://www.lboro.ac.uk/departments/ma/gallery/selfref/index.html#second">second self-documenting sentence</a> shown above) as can be seen from the following sequence of vectors:<br /><pre>(243000,645,9,2225,234,0,23445987,23434,2,34)<br /> (5,1,9,7,9,4,2,2,2,3)<br /> (1,2,4,2,2,2,1,2,1,3)<br /> (1,4,6,2,2,1,1,1,1,1)<br /> (1,7,3,1,2,1,2,1,1,1)<br /> (1,7,3,2,1,1,1,2,1,1)<span style="color: #c00000;"><br /> (1,7,3,2,1,1,1,2,1,1)</span><br /> ...<br /></pre><h3>Cycles (periodic orbits)</h3>For some initial vectors, the process does not lead to a fixed point, but instead gives an alternating pair of values. For example:<br /><pre>(243,645,9765,2225,2340,300,234,23434,2,34)<br /> (4,1,9,8,8,4,3,2,1,2)<br /> (1,3,3,2,3,1,1,1,3,2)<br /> (1,5,3,5,1,1,1,1,1,1)<br /> (1,8,1,2,1,3,1,1,1,1)<br /> (1,8,2,2,1,1,1,1,2,1)<br /> (1,7,4,1,1,1,1,1,2,1)<br /> (1,8,2,1,2,1,1,2,1,1)<span style="color: #c00000;"><br /> (1,7,4,1,1,1,1,1,2,1)<br /> (1,8,2,1,2,1,1,2,1,1)</span><br /> ...<br /></pre>This is a 2-cycle, i.e. a cycle which repeats every 2 steps. The sequences of values produced by iterating a process is called the <em>orbit</em> of the initial value under the process. Cycles are also called <em>periodic orbits</em>, and a 2-cycle is also known as a <em>periodic orbit</em> having <em>period 2</em>.<br />Notice that the existence of a period-2 orbit implies the existence of a <em>pair</em> of sentences, each of which documents the contents of the other! (These values were used in the <a href="http://www.lboro.ac.uk/departments/ma/gallery/selfref/index.html#pair">self-documenting pair</a> given earlier.)<br />And, in general, if the method were to lead to an N-cycle (for some positive whole number N), then there must be a succession of N sentences, where each one documents the contents of the next (with the final sentence documenting the contents of the first).<br /><h2>Other links of interest</h2>To see other examples of iteration leading to fixed points and periodic orbits, see the following sections of the gallery:<br /><ul><li><a href="http://www.lboro.ac.uk/departments/ma/gallery/mandel/index.html">The Mandelbrot set</a></li><li><a href="http://www.lboro.ac.uk/departments/ma/gallery/lyap/index.html">Lyapunov pictures</a></li><li><a href="http://www.lboro.ac.uk/departments/ma/gallery/doubling/index.html">Period doubling</a>[JAVA]</li><li><a href="http://www.lboro.ac.uk/departments/ma/gallery/ifs/index.html">Iterated function systems</a></li></ul></td></tr></tbody></table><br /><br /><br /></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-5165893201465076952011-06-11T08:12:00.000-07:002011-06-11T08:12:27.579-07:00Polynomiography<div dir="ltr" style="text-align: left;" trbidi="on"><a href="http://www.polynomiography.com/">Polynomiography</a><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://www.polynomiography.com/images/revised/main.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="274" src="http://www.polynomiography.com/images/revised/main.jpg" width="320" /></a></div><br /></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-46125476814091897892011-06-06T13:47:00.000-07:002011-06-06T13:47:20.526-07:00Down with determinants<div dir="ltr" style="text-align: left;" trbidi="on">A <a href="http://www.axler.net/DwD.html">paper</a> on how to do linear algebra without detrminants!</div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0tag:blogger.com,1999:blog-741046484966433141.post-83014391320668344372011-06-06T12:29:00.000-07:002011-06-06T12:29:55.765-07:00Good Linear Algebra notes<div dir="ltr" style="text-align: left;" trbidi="on">Here is a <a href="http://tutorial.math.lamar.edu/">link</a> with good notes for Calculus I and II, Linear Algebra, Differential Equations and more ... <br /><br /></div>thanushttp://www.blogger.com/profile/13885925795422230160noreply@blogger.com0