+ All Categories
Home > Documents > Sierpinski's Art: A Spreadsheet Simulation

Sierpinski's Art: A Spreadsheet Simulation

Date post: 23-Dec-2016
Category:
Upload: peter-armstrong
View: 215 times
Download: 3 times
Share this document with a friend
3
Sierpinski's Art: A Spreadsheet Simulation Author(s): Peter Armstrong Source: Mathematics in School, Vol. 24, No. 4 (Sep., 1995), pp. 2-3 Published by: The Mathematical Association Stable URL: http://www.jstor.org/stable/30215193 . Accessed: 07/04/2014 15:53 Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at . http://www.jstor.org/page/info/about/policies/terms.jsp . JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about JSTOR, please contact [email protected]. . The Mathematical Association is collaborating with JSTOR to digitize, preserve and extend access to Mathematics in School. http://www.jstor.org This content downloaded from 81.152.52.202 on Mon, 7 Apr 2014 15:53:11 PM All use subject to JSTOR Terms and Conditions
Transcript

Sierpinski's Art: A Spreadsheet SimulationAuthor(s): Peter ArmstrongSource: Mathematics in School, Vol. 24, No. 4 (Sep., 1995), pp. 2-3Published by: The Mathematical AssociationStable URL: http://www.jstor.org/stable/30215193 .

Accessed: 07/04/2014 15:53

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at .http://www.jstor.org/page/info/about/policies/terms.jsp

.JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range ofcontent in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new formsof scholarship. For more information about JSTOR, please contact [email protected].

.

The Mathematical Association is collaborating with JSTOR to digitize, preserve and extend access toMathematics in School.

http://www.jstor.org

This content downloaded from 81.152.52.202 on Mon, 7 Apr 2014 15:53:11 PMAll use subject to JSTOR Terms and Conditions

Spreadsheet simulations can be fun and they can form the basis of extremely interesting and stimulating practical mathematics and investigations. They allow pupils to apply their mathematics and enhance access to some further mathematics. The following simulation could provide a basis for some practical and investigational activity for able GCSE pupils (working, perhaps, as a group) or for sixth form students. The simulation assumes that the pupils would use Microsoft Excel spreadsheet which, unlike some other software, is quite quickly and easily accessible to novice spreadsheet users because of its intuitive nature. In particular its graphics are good, easy to use and may be embedded in the spreadsheet itself. Although this example uses one or two special spreadsheet techniques, these are really only equivalent to simple computer programming (no more inaccessible than BASIC or LOGO). They should not pose significant or insurmountable learning problems for the more able GCSE pupils, sixth formers or for those mathematics students with competence and interest in computer programming. If students constructed their own spreadsheet simulations they should reinforce some basic mathematics, discover some further mathematics and perhaps be encouraged to find out more about such topics as chaos.

toi~k'

Aizt

by Peter Armstrong Loughborough University

Sierpinski's ant is not as other ants. It forages for food in a quite different (and 'chaotic') manner from a normal ant. It has three sources of food, situated separately at three different vertices of a square. Its nest is situated at the fourth vertex. As it leaves the nest it chooses one food source to be most attractive. This choice is random. Sierpinski's ant then sets off in a straight line towards this most attractive food. However, halfway along its intended journey it stops and lays down a pheromone marker (in a

re

re re

misguided attempt to guide other ants to the food). Perversely it then chooses, at random, another most attractive food from the three sources and sets off towards the new choice. Again, halfway along its journey it stops, lays down another pheromone marker and then repeats the process of choosing. This behaviour continues, over and over again, for quite a long time and a pheromone pattern is formed. How could we construct a spreadsheet simulation to investigate the pheromone pattern which is formed?

Mathematics in School, September 1995 2

Fig. 1

This content downloaded from 81.152.52.202 on Mon, 7 Apr 2014 15:53:11 PMAll use subject to JSTOR Terms and Conditions

Example Simulation The following spreadsheet provides just one example of how the task could be completed.

A B C D E F G H I J K 1 Food i Ant's Position 2 Vertex

-X Y

_ RAND_ x. 3 1 i0 0 2 I 1.00 1.00

1..

1.00 4 2 0 1 3 ( 0.50 i 1."00 5 3 1 0 1 0.75 0.50 0.90

6 2 0.38 i .25 0.80 7 2 0.19 1 0.63

12.. .

0

00.70. 8 3 0.09 i 0.81 9 2 - 0.5 0.41 0.60 10 1

........... 0.27 . 0.70 . 0.40 . 11 2 0.14 0.35 0 0.40

12 1 0 0.00 0.50

13 2 0.03 0.34 11 0.30

14 I 2 00 0.67 '

15 1 I i

..I3

0.01 0.83 0.10 16I i 2 0.50 0.42

17 2 1 0.25 0.71 11 0.00 -

18 2 0.13 0.85 0.00 0.50 1.00 19I i 2 0.06 0.93 1

20 1 1 0.03 0.96

21 0 i1 1002 0.48

22 1 t i 2 L .0* 1 0.24 I

Fig. 2

The following figure shows how the spreadsheet could be constructed.

A B C E F G 1 Food Ant's Position 2 Vertex X Y RAND x y 3 1 0 0 =ROUND(RAND()*(3-1)+1,0) 1 1 4 2 0 1 =ROUND(RAND()*(3-1)+1,0) =(F3+LOOKUP(E3,$A$3:$A$5,$B$3:$B$5))/2 =(G3+LOOKUP(E3,$A$3:$A$5,$C$3:$C$5))/2 5 3 1 0 =ROUND(RAND()*(3-1)+1,0) =(F4+LOOKUP(E4,$A$3:$A$5,$B$3:$B$5))/2 =(G4+LOOKUP(E4,$A$3:$A$5,$C$3:$C$5))/2 6 =ROUND(RAND()*(3-1)+1,0) =(F5+LOOKU P(E5,$A$3:$A$5,$B$3:$B$5))/2 =(G5+LOOKUP(ES,$A$3:$A$5,$C$3:$C$5))/2 7 =ROUND(RAND()*(3-1)+1,0) =(F6+LOOKU P(E6,$A$3:$A$5,$B$3:$B$5))/2 =(G6+LOOKUP(E6,$A$3:$A$5,$C$3:$C$5))/2 8 =ROUND(RAND()*(3-1)+1,0) =(F7+LOOKU P(E7,$A$3:$A$5,$B$3:$B$5))/2 =(G7+LOOKUP(E7,$A$3:$A$5,$C$3:$C$5))/2 9 =ROUND(RAND()*(3-1)+1,0) =(F8+LOOKUP(E8,$A$3:$A$5,$B$3:$B$5))/2 =(G8+LOOKUP(E8,$A$3:$A$5,$C$3:$C$5))/2 10 =ROUND(RAND()*(3-1)+1,0) =(F9+LOOKUP(E9,$A$3:$A$5,$B$3:$B$5))/2 =(G9+LOOKUP(E9,$A$3:$A$5,$C$3:$C$5))/2

Fig. 3

Notice that Cartesian coordinates have been used so that food is situated at the vertices (0,0), (0,1) and (1,0). The nest is at (1,1).

The spreadsheet uses the following Excel functions;

ROUND(n,0), which rounds the number n to the nearest integer,

RAND()*(b-a) +a, which generates an evenly distrib- uted random number equal to or greater than a and less than b,

LOOKUP(look_up value, look_up vector, resultvector).

Although these functions are not very difficult to learn and master, with a little hands-on experience, the latter two functions probably demand some further explanation.

RAND() returns an evenly distributed random number greater than or equal to 0 and less than 1. So, RAND()*3 returns an evenly distributed random number greater than or equal to 0 and less than 3. Therefore, RAND()*(3 - 1) + 1 = RAND()*2 + 1 returns an evenly dis- tributed random number greater than or equal to 1 and less than 3.

LOOKUP is a little more complicated and is probably best explained with another, simpler example. In the spreadsheet below the formula "= LOOKUP(3,A1:A4, Bl:B4)" is entered into cell D2. Here, the look up value is 3, the look up vector is the column vector in the cells Al down to A4 (A1 :A4) and the return vector is the column vector in the cells B1 down to B4 (B1 :B4). Excel looks up the largest value in A1 :A4 less or equal to 3. This is 2.5 in cell A2. It then looks up the cell to the right of A2, which is B2. Now B2 contains the text "Pear", so "Pear" is returned to cell D2

D2 I I =LOOKUP(3,A1: A4,8 1:B 4)

bl LOOKUP

- B C D E

O 1 1.2 Apple .

......................... ....2......................p

p e ....... ............. .. .................................... .................. 2 2.5 Pear i I Pear

. .................................... ............. ........: ........................................

3 3.2 j Orange ............... ..2................. ..... .. ........................... ............... . ...................... .................................... .................. 4 4.6 Plum

....................................5 ........................................................................................................................................... 5 ..................................... .................................... ............... ................................ ^ ....................................- ..................

Fig. 4

Extending the Activity There are, of course, many different ways of tackling the activity and, in doing so, pupils may discover further facilities and functions which Excel has to offer and, indeed more mathematics. The activity is open-ended, since other spreadsheet simulations might be constructed to investigate the pheromone patterns which are formed when there are more than three sources of food - in different arrange- ments - and when Sierpinski's ant has different rules for cutting short its straight line forages. F*

Mathematics in School, September 1995 3

This content downloaded from 81.152.52.202 on Mon, 7 Apr 2014 15:53:11 PMAll use subject to JSTOR Terms and Conditions


Recommended