tag:blogger.com,1999:blog-62580386884032286592017-11-27T08:16:16.717+00:00The Laughing MathematicianHere is a collection of posts that make me laugh or have a mathematical flavour. Hopefully, both.Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.comBlogger84125tag:blogger.com,1999:blog-6258038688403228659.post-89607420899040198622016-07-31T09:42:00.000+01:002016-07-31T09:42:15.651+01:00Job Advert for a Post-Doctoral Research Associate: Mapping cortex evolution through mathematical modelling<div style="text-align: justify;"></div><div style="text-align: justify;"><b>Closing Date: </b>Thursday, September 1, 2016 - 12:00</div><div style="text-align: justify;"><br /></div><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: 0px; margin-right: 0px; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-9e0n67gGNFA/V522paLTA6I/AAAAAAAAIiI/g-s5lzu5K4spp4V76BjcSp1mxjT9WfR8ACLcB/s1600/Brains.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://3.bp.blogspot.com/-9e0n67gGNFA/V522paLTA6I/AAAAAAAAIiI/g-s5lzu5K4spp4V76BjcSp1mxjT9WfR8ACLcB/s640/Brains.png" width="500" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-size: xx-small;">Figure 1. Illustrating the different cortex shapes produced by different animal species. Taken from J. De Felipe. 2011. Front. Neuro. 5:29.</span></td></tr></tbody></table><div style="text-align: justify;">Applications are invited for a 24-month fixed-term post of Research Assistant in <a href="http://www.sjc.ox.ac.uk/" target="_blank">St John’s College</a> Research Centre at St John’s College, University of Oxford. The post involves working on a research project entitled ‘Mapping cortex evolution through mathematical modelling’ funded by the St John’s College Research Centre and led by <a href="https://www.dpag.ox.ac.uk/team/zoltan-molnar" target="_blank">Professor Zoltán Molnár</a>, <a href="https://people.maths.ox.ac.uk/maini/" target="_blank">Professor Philip Maini</a>, and <a href="http://people.maths.ox.ac.uk/woolley/index.html" target="_blank">Dr Thomas Woolley</a>. The appointee will take up the post on November 1st or as soon as possible thereafter. The post is full-time and is for 24 months. The appointment will be on the University’s Grade 7 for Academic and Academic-related staff, currently ranging from £30,738 - £41,255 per annum.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Our project proposes to develop and understand a mathematical model for the differentiation of neurons from earlier pluripotent progenitor cell populations. This framework will allow us to map all possible evolutionary pathways of the cortex enabling us to quantitatively and qualitatively highlight multiple possible divergent evolutionary trajectories. Further, by comparing these theories with data we will construct a novel categorisation of different species, and understand the high diversity of cortex development, thus generating an impact in the field of neurobiology. Finally, through applying our framework to pathological cases, we will predict mechanistic links between neuron production failure and resulting phenotypes such as microcephaly, polymicrogyria syndromes and lissencephaly syndromes.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">There is no application form. Candidates should email a covering letter, a curriculum vitae with details of qualifications and experience, and a statement of current research interests and publications to academic.vacancies@sjc.ox.ac.uk. Applications should be in the form of a single PDF file. Candidates must also provide the names of two academic referees who should be asked to email their references to the same address. Both applications and references should reach the College no later than noon on 1st September. Late applications will not be accepted. Interviews will be held in Oxford on 16th September or if appropriate via Skype at the same time.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">The appointee will hold or be close to completing a PhD in mathematics or in a relevant field of quantitative biology. Research expertise in the field of inference is desirable.</div><div style="text-align: justify;">The appointee is expected to take the lead in delivering the programme of research, namely:</div><div style="text-align: justify;"><br /></div>1. Construct a mathematical model of differentiation from progenitor cells to neurons.<br />2. Qualitatively map the possible outcomes of the neuron developmental model in terms of the population distributions and time to full differentiation.<br />3. Categorise species data using the map.<br />4. Quantitatively parameterise the model using Bayesian inference techniques.<br />5. Highlight current gaps in data.<div style="text-align: justify;"><br /></div><div style="text-align: justify;">The candidate is expected to work closely with neurobiologists through extended visits to Professor Zoltán Molnár’s laboratory, where they will learn about the various cell lineage tracing methods in detail. Equally, they will attend pertinent biological group meetings.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Finally, they are expected to lead the creation of an interdisciplinary network of St John’s neurobiologists, psychologists and collaborative sciences.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">The candidate will contribute to preparing findings for publication and dissemination to academic and non-academic audiences; therefore, excellent communication skills are essential, and an excellent record of academic publication commensurate with stage of career is expected.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">St John’s College is an Equal Opportunity Employer.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">More information about St John's College can be found <a href="https://www.sjc.ox.ac.uk/460/Academic-Positions.html">here.</a><span id="goog_1576275863"><span id="goog_1576275867"></span><span id="goog_1576275868"></span></span><span id="goog_1576275864"></span></div><div style="text-align: justify;">Full job advert can be found <a href="https://drive.google.com/open?id=0B1Bj8rFsg9hGR0JtclBORDNNN2c" target="_blank">here.</a></div><div style="text-align: justify;">Further particular can be found <a href="https://drive.google.com/open?id=0B1Bj8rFsg9hGUmNHSmFXaDYwRXc" target="_blank">here.</a></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"> </div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-6271774526172228762016-07-09T21:34:00.000+01:002016-07-09T21:34:00.146+01:00A Mathematician's Holiday - Problem 7: Fix the Hotel Rooms.<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/wL1AbQQXAKw/0.jpg" src="https://www.youtube.com/embed/wL1AbQQXAKw?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div><div class="separator" style="clear: both; text-align: center;"><a href="https://3.bp.blogspot.com/-C4KFVGeBPww/VpKlHIoJOMI/AAAAAAAAIeA/OZJYtuWAOmU/s1600/Slide22.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div><b>Requirements:</b><br /><div style="text-align: justify;">Pen and paper is all that is required. We also use blow up rubber ring to demonstrate the solution.</div><b>Description:</b><br />Having got to<b> </b>our hotel rooms Dan, Will and I found that our water, electricity and gas supplies had all been damaged in the fire. Being the helpful souls that we are can we connect each of the utility supplies to each room without crossing the utilities?<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-C4KFVGeBPww/VpKlHIoJOMI/AAAAAAAAIeA/OZJYtuWAOmU/s1600/Slide22.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://3.bp.blogspot.com/-C4KFVGeBPww/VpKlHIoJOMI/AAAAAAAAIeA/OZJYtuWAOmU/s320/Slide22.PNG" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Problem set up.</td></tr></tbody></table>This is a classic mathematical problem known as "The Three Utilities Problem". Critically, it is known to be unsolvable on the flat sheet of the paper. However, the hotel we would be staying in would be three-dimensional and, thus, we are asking the audience to extend their ideas beyond the flat surface.<br /><br />Note that we really do not go into why the solution is impossible on the flat paper. The reason is because the proof of impossibility depends on some deep ideas from topology. However, the interested reader can find the proof <a href="https://en.wikipedia.org/wiki/Three_utilities_problem" target="_blank">here</a>.<br /><br /><b>Extension</b><br />If we add in another utility, can we still solve the problem on a torus, or doughnut?<b> </b>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-40983973684001299792016-06-25T19:41:00.000+01:002016-06-25T19:41:00.317+01:00A Mathematician's Holiday - Problem 6: The Tiny Lift.<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/8LVI65dqzUE/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/8LVI65dqzUE?feature=player_embedded" width="320"></iframe></div><b>Requirements:</b><br /><div style="text-align: justify;">We use two beards to go along with the story that we have concocted. However, you can use two hats, two name badges, etc. Anything that will denote two objects as being similar. </div><b>Description:</b><br />Once we got into the hotel we found that the lift to our floor was very small. This meant that only one of us could go up to the first floor at once. This leads to a problem: you see Will and I have bonded over our beards, whilst Dan does not have any facial hair! Thus, neither Will nor I want to be left alone with Dan because we would have nothing to discuss. How do you get us all from the ground floor to the first floor, without ever leaving an hirsute person with a beardless person?<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-UlsHC1XJYEw/VpKlZhNnjXI/AAAAAAAAIes/QvYFY4QbbZs/s1600/Slide20.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://1.bp.blogspot.com/-UlsHC1XJYEw/VpKlZhNnjXI/AAAAAAAAIes/QvYFY4QbbZs/s400/Slide20.PNG" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Problem set up.</td></tr></tbody></table><div class="separator" style="clear: both; text-align: justify;">This problem is simply the fox, chicken, grain problem, a classic brain teaser that has been around for centuries. The audience should have no problem producing an adhoc solution in no time. However, there are two key factors that should be extracted. Firstly, having them demonstrate the problem is a very fun, visual and hilarious thing to do, if you are using beards and, so, it rejuvenates a flagging audience. The second (mathematical) point of the solution to extract is that the audience probably solved the problem by trial and error, however, the solution can be solved neatly by using a graph, just like the "<a href="http://laughmaths.blogspot.com/2016/04/a-mathematicians-holiday-problem-2.html" target="_blank">airport security</a>" problem.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: justify;"><b>Extension 1</b></div><div class="separator" style="clear: both; text-align: justify;">Can you solve these two related, but different transport problems:</div><div class="separator" style="clear: both; text-align: justify;"><b>Vampires and maidens</b></div>Three maidens and three vampires must cross a river using a boat which can carry at most two people, under the constraint that, for both banks, if there are maidens present on the bank, they cannot be outnumbered by vampires (otherwise the vampires would bite the maiden).<br /><b>Jealous husbands</b><br />Three married couples want to cross the river in a boat that can only hold two people. Unfortunately, no woman can be in the presence of another man unless her husband is also present.<br /><div class="separator" style="clear: both; text-align: justify;"><b> </b></div><br /><b>Extension 2</b><br />How is the vampire and maidens<b> </b>puzzle related to the Jealous husbands puzzle?Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-69602899980184329722016-06-11T18:30:00.000+01:002016-06-11T18:30:00.583+01:00A Mathematician's Holiday - Problem 5: Hotel Fire!<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/j0LUmK1Qqj4/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/j0LUmK1Qqj4?feature=player_embedded" width="320"></iframe></div><b>Requirements:</b><br /><div style="text-align: justify;">Some pieces of string, or rope, depending on the size of your demonstration and a play to draw the diagram below in Figure 1. Note that it does not have to be too accurate.</div><b>Description:</b><br />Having got to the hotel we unfortunately find that it is on fire. Thankfully, there is a river very close to our location, where we can load up buckets with water and, thus, help put the fire out. What is the quickest route from our location, to the river and to the hotel?<br /><b><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-45jiKmxeJF4/VpKlF26GKlI/AAAAAAAAIdo/6kszGfWegqQ/s1600/Slide18.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://4.bp.blogspot.com/-45jiKmxeJF4/VpKlF26GKlI/AAAAAAAAIdo/6kszGfWegqQ/s400/Slide18.PNG" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Problem set up.<b><br /></b></td></tr></tbody></table></b><br />This problem is very similar to "<a href="http://laughmaths.blogspot.com/2016/05/a-mathematicians-holiday-problem-3-late.html" target="_blank">Late for the Plane</a>"<b> </b>and works well if they are done in combination with one another. Again, the question relies on using the ropes to measure distance, in order to measure time.<br /><br />A critical point for the audience to understand is that the helpers all run at the same speed, even when they are carrying water.<br /><br /><b>Extension:</b><br />Suppose we run slower once we are carrying water. How does this extra facet influence the solution? <b> </b>Note that you can solve this problem as well, however, but it is far more involved and involves calculus.<br /><br /><br />Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-64084789797195018452016-05-28T18:17:00.000+01:002016-05-28T18:17:00.156+01:00A Mathematician's Holiday - Problem 4: Bags Mix-up.<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/yqmhhDPjjkI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/yqmhhDPjjkI?feature=player_embedded" width="320"></iframe></div><b>Requirements:</b><br /><div style="text-align: justify;">Three bags with different named labels. A t-shirt or jumper. Of course, you can dress this problem up in many different ways so if you have got a t-shirt or jumper to hand you could have three pencil cases with blue and yellow pencils, for example.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><b>Description:</b></div><div style="text-align: justify;">En route to China our luggage got mixed up. Each of our bags look the same, but the name tags have all been mixed up such that we know that <u>no bag has the correct label</u> (a key point to reiterate). We are allowed to put our hand in a bag of our choice and pull out an object at random (we can look in the bag). Can we identify which bag belongs to each person, from this single piece of information?</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">You should ensure that the audience understands that we are looking for a definite strategy. We do not need to consider probabilities at all.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><b>Extension:</b></div><div style="text-align: justify;">To be honest, I cannot think of one. This question is pretty much self contained. However, the idea behind this question, i.e. logical deduction, is one of the crucial weapons in the mathematical arsenal. If you have any suggestions for extensions please write them in the comments below.</div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-72665968951667250622016-05-14T17:47:00.000+01:002016-05-14T17:47:00.155+01:00A Mathematician's Holiday - Problem 3: Late for the Plane.<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/U7p1gbmsv4U/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/U7p1gbmsv4U?feature=player_embedded" width="320"></iframe></div><b>Requirements:</b><br /><div style="text-align: justify;">Some pieces of string, or rope, depending on the size of your demonstration and a play to draw the diagram below in Figure 1. Note that it does not have to be too accurate.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><b>Description:</b><br />The critical point to ensure for this question is that you're audience is comfortable with the idea of a straight line between two points being the shortest distance between those two points and, thus, the route of shortest distance.<b> </b><br /><br />We are late for our plane and so we want to take the quickest route from the terminal<b> </b>our aeroplane. However, there are two active runways between us and our destination. Since these are dangerous places to be we want to ensure that we minimise our time over the runways and, so, we always run directly across, at right angles to the runway direction. What path minimises our total distance?<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-cd-vrk9LbrM/VpKlZFW6QKI/AAAAAAAAIeo/QUqTpkyIaaI/s1600/Slide10.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://3.bp.blogspot.com/-cd-vrk9LbrM/VpKlZFW6QKI/AAAAAAAAIeo/QUqTpkyIaaI/s400/Slide10.PNG" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. The problem set up.</td></tr></tbody></table><br />Unless they've seen the problem before it is highly unlikely that your audience will generate the solution shown in the video. However, that does not matter. The fundamental concept we are trying to introduce here is that we are looking for a method, rather than an exact solution. Thus, it should be made clear to the audience that the problem set up does not need to be exact.<br /><br /><b>Extension</b><br />In what case is the shortest route from the terminal to the plane an actual straight line?<br /><b> </b></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-32458674646669939052016-04-30T19:36:00.000+01:002016-04-30T19:36:00.164+01:00A Mathematician's Holiday - Problem 2: Airport security.<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/01JpSWUUVoU/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/01JpSWUUVoU?feature=player_embedded" width="320"></iframe></div><b>EASY VERSION </b><br /><b>Requirements:</b><br /><div style="text-align: justify;">Two containers in the ratio 3:5, for example 75ml and 125ml. We used the bottom of drinks bottles and scaled up the quantities in order to make them more visible for a large audience.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><b>Description:</b></div><div style="text-align: justify;">Airports only allow 100ml of fluid through onto a plane. Can we measure out exactly 100ml of fluid using containers that are of the sizes given above and none of the containers have graduation marks? Beyond the trial and error that the audience may try you can actual solve this problem very easily using a graph.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Figure 1 shows a graph illustrating the volume on liquid contained in each. Filling and emptying each container corresponds to horizontal movements, all the way to the left and all the way to the right. Transferring the liquid from one container to the other corresponds with travelling diagonally as far as you can go. By using these two rules you can easily bounce around the graph and successfully reach 100ml.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-jIgoqfy4GkA/VpKlIg_lPGI/AAAAAAAAIeI/l9kGafW7RH4/s1600/Slide9.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://4.bp.blogspot.com/-jIgoqfy4GkA/VpKlIg_lPGI/AAAAAAAAIeI/l9kGafW7RH4/s400/Slide9.PNG" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Solving the fluid problem graphically. The volume of water in the 75ml bottle in along the vertical axis and the volume of water in the 125ml bottle in along the horizontal axis.</td></tr></tbody></table><b>Extensions:</b><br />In Figure 1 we filled the 125ml bottle first. Can you solve the problem by filling the 75ml bottle first?<br />What values of fluid can you not possibly make using this method of pouring between the containers?<br /><br /><b>HARD VERSION </b><br /><b>Requirements:</b><br /><div style="text-align: justify;">Three containers in the ratio 3:5:8, for example 75ml, 125ml and 200ml.<br /><br /><b>Description:</b><br />The task is the same as above. However, this time we do not have a reservoir of water to fill from, and empty to. We only have a container of 200ml of water, which can be transferred amongst the different sized bottles.<br /><br />Critically, the solution to this problem depends on ternary coordinates, which are plotted in a triangle form, as seen in Figure 2, see the video for more details. Once the students have seen this form of graph they are able to solve the problem in exactly the same way as the previous question. </div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-IGYxmvG3bT0/VpKlc_WnlgI/AAAAAAAAIfI/MfbabKSC1qg/s1600/Slide4.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://4.bp.blogspot.com/-IGYxmvG3bT0/VpKlc_WnlgI/AAAAAAAAIfI/MfbabKSC1qg/s400/Slide4.PNG" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 2. Ternary coordinate plot. Each side of the equilateral triangle represents the volume in one of the bottles. Each of the stars represents one of the points on the left. See the video for more details.</td></tr></tbody></table><b>Extensions:</b><br />Again, what values of fluid can you not possibly make using this method of pouring between the containers?<br />Instead of starting with 200ml, suppose we started with 125ml only. What fluid volumes can now be made by transferring the fluid between the bottles?Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-67520837430165347362016-04-16T18:25:00.000+01:002016-04-16T18:25:00.168+01:00A Mathematician's Holiday - Problem 1: Planning the tour.<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ynC6pNaHDJE/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/ynC6pNaHDJE?feature=player_embedded" width="320"></iframe></div><b>Requirements:</b><br />Each participant should have a pencil, paper and rubber to draw and modify the diagram shown in Figure 2.<br /><br /><b>Description: </b> <br />In this activity we set the scene of the whole presentation. In particular, we talk about how all the activities were motivated by problems that we faced on our tour. The first problem is then, of course, organising the tour.<br /><br />As mentioned previously we visited a number of locations around China and South Korea. These locations are shown in Figure 1.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-dR1i11uBFZQ/VpKg2RZe5mI/AAAAAAAAIdE/uck7E4KaMHQ/s1600/Slide3.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://2.bp.blogspot.com/-dR1i11uBFZQ/VpKg2RZe5mI/AAAAAAAAIdE/uck7E4KaMHQ/s400/Slide3.PNG" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. All of the locations we visited on our tour.</td></tr></tbody></table>Being huge tourists, we didn't want to have to travel between these locations in the same way twice, because each transportation route would allow us to see something different. In Figure 2 we represent each method of transportation by a black line between each of the cities. For example, the O and L mean Oxford and London and the two black lines represent the two different transportations of train and bus.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-JPfX4WlRnw0/VpKg2aUkwwI/AAAAAAAAIdI/KR0XxGeEp_o/s1600/Slide4.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://2.bp.blogspot.com/-JPfX4WlRnw0/VpKg2aUkwwI/AAAAAAAAIdI/KR0XxGeEp_o/s400/Slide4.PNG" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 2. Representing the city connections.</td></tr></tbody></table>The challenge is then to find a way around all the cities using all possible forms of transport. We found that we were not able to solve this problem. Can you? Of course the answer is contained in the video at the top.<br /><br /><b>Extension</b><br />From watching the video you should be able to see that identifying whether a set of paths are completely traversable with no repeating is pretty easy. However, suppose we specified the time each path took, how difficult would it be to find the quickest path around all cities?Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-90397630934720033262016-04-02T17:05:00.000+01:002016-04-02T17:05:02.463+01:00A Mathematician's Holiday - Prologue.<div style="text-align: justify;">One of the first activities that got me into outreach was joining <a href="https://www.maths.ox.ac.uk/study-here/undergraduate-study/outreach/marcus-marvellous-mathemagicians" target="_blank">Marcus' Marvellous Mathemagicians</a> (M3), which was started in 2008 by Marcus du Sautoy. The idea was that hundreds of schools contact Marcus every year to give presentations to their kids, but unfortunately he simply doesn't have the time to answer all the requests. Thus, myself and a number of other undergraduates and graduates go out to schools and take a number of fun mathematical workshops</div><div class="separator" style="clear: both; text-align: center;"></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-YXDGhpWjkvY/VpKEdVOfzjI/AAAAAAAAIcM/5_CQajH6MLw/s1600/Outreach.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="http://3.bp.blogspot.com/-YXDGhpWjkvY/VpKEdVOfzjI/AAAAAAAAIcM/5_CQajH6MLw/s400/Outreach.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Multiple Oxford scientists coming out in force at the Newbury Science Festival</td></tr></tbody></table><div class="separator" style="clear: both; text-align: justify;">As part of M3, I've been up and down the country giving maths workshops, over to Ireland and Wales, and presented at numerous science festivals across the country.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div>However, perhaps the best experience I've ever had was when myself, Will Binzi and Dan Martin were invited to tour around the Dulwich Colleges of China and South Korea and demonstrate mathematics to all the kids out there.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-Lcq-nGLxgk8/VpKGMXkZAFI/AAAAAAAAIcY/Pz75L_ZwBmw/s1600/Dan_Will_Me_Great_Wall.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="http://4.bp.blogspot.com/-Lcq-nGLxgk8/VpKGMXkZAFI/AAAAAAAAIcY/Pz75L_ZwBmw/s400/Dan_Will_Me_Great_Wall.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">From left to right: Dan, Will and myself enjoying the view from the Great Wall.</td></tr></tbody></table>During our two weeks out there we travelled to Beijing, Suzhou, Shanghai, Zhuhai and Seoul. By the end of the two weeks we were of course exhausted but extremely happy because our workshops had gone down so well.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-XLz2JDD1VFs/VpKKM2kV5OI/AAAAAAAAIck/vfiUpZGwUeE/s1600/Beijing_students.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="http://3.bp.blogspot.com/-XLz2JDD1VFs/VpKKM2kV5OI/AAAAAAAAIck/vfiUpZGwUeE/s200/Beijing_students.jpg" width="200" /></a><a href="http://2.bp.blogspot.com/-LlZd2IDo5ec/VpKKz-0Az8I/AAAAAAAAIcs/1xKLZ1uUe_A/s1600/Presenting_in_Beijing.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="http://2.bp.blogspot.com/-LlZd2IDo5ec/VpKKz-0Az8I/AAAAAAAAIcs/1xKLZ1uUe_A/s200/Presenting_in_Beijing.jpg" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">We presented in classrooms and theatres. The Dulwich college kids were great audiences.</td></tr></tbody></table>Specifically, because this was a very special tour we decided to write a brand new presentation for the Dulwich students. The presentation was called <a href="https://podcasts.ox.ac.uk/series/mathematicians-holiday" target="_blank">A Mathematician's Holiday</a> and collected eight different problems that you might come across whilst planning and presenting on such an international tour.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-PTE5wdYnkv0/VpKgnHPBE8I/AAAAAAAAIdA/vAU8ATSfUhk/s1600/Slide1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="http://2.bp.blogspot.com/-PTE5wdYnkv0/VpKgnHPBE8I/AAAAAAAAIdA/vAU8ATSfUhk/s400/Slide1.PNG" width="400" /></a></div>When we came back we decided to film the presentation so it can be used by anybody. The videos can either be found on <a href="https://www.youtube.com/channel/UChwESLnSHzd-YIOpPQbMnJQ/videos" target="_blank">YouTube</a>, <a href="https://itunes.apple.com/gb/itunes-u/id934781982" target="_blank">iTunes U</a> or through the <a href="https://www.youtube.com/channel/UChwESLnSHzd-YIOpPQbMnJQ/videos" target="_blank">University of Oxford's Podcasts page</a>. Over the next 8 weeks I will be presenting each video and discussing any particular techniques that we found aided us in our presenting the workshop.<br /><br />Crucially, because we were taking this tour on the road, we had to make sure all the props were light, transportable, easily fixable, reproducible, or cheap to buy. In the end we simply used:<br /><ul><li>rope;</li><li>plastic bottles;</li><li>bears;</li><li>a t-shirt;</li><li>a jumper; </li><li>three hold alls; and</li><li>a blow up ring.</li></ul>As a final note on the videos, they're pretty low energy. Normally we would have been giving this presentation in front of 30-50 excitable kids. Here we had 6 sixth-form students and a doctoral researcher, not exactly our prime demographic, but it had to do!<br /><br />We begin next time by organising the tour!<br /><br /><br />Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-12156755313010066002016-03-19T15:22:00.000+00:002016-03-19T15:22:02.909+00:00Diffusion of the dead - Epilogue. Part 2, The results.<div style="text-align: center;"><div style="text-align: justify;"><a href="http://laughmaths.blogspot.com/2015/01/diffusion-of-dead-epilogue-part-1.html" target="_blank">Last time</a>, I presented a question that I had been given by<span style="font-family: inherit;"> <a href="http://www.itsprettygreen.com/" target="_blank">PrettyGreen</a>, a </span><span style="font-family: inherit;"><span style="font-family: inherit;">PR company that asked <span style="font-family: inherit;">me to </span></span>get involved with their <span style="font-family: inherit;">Halloween</span> publicity campaign for the</span> mobile network operator <span style="font-family: inherit;"><a href="https://giffgaff.com/" target="_blank">GiffGaff</a></span>. We also saw how I modelled the problem and this week I present the results and also the Matlab codes that I used, should you want to recreate, or play around, with the solutions.<br /><br />The advert presenting the characters involved can be found below.</div><div style="text-align: center;"><iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/XptM1LCX7r4" width="560"></iframe><br /></div>________________________________________________________________</div><div style="text-align: center;">________________________________________</div><br /><b>Results</b><br /><div style="text-align: justify;">The survival time of each character in ascending order can be found in the table below. This is further complemented by Figure 1, in which we illustrate the health of each combatant over a 60 minute time span.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">The first two characters to die are the Dead Girl and Skin Face. Although these two characters are relatively strong their low initial healths mean that the other combatants are able to dispatch them with relative ease. Thus, neither of them last longer than a minute demonstrating that neither of them are able to use their aggression to its fullest. Similarly, Baby Man is next to die, because although he is able to defend himself better, lasting just over a minute, the combatants once again go after the weakest.</div><div align="center"><br /><table class="tg"><tbody><tr> <th class="tg-hgcj">Name</th> <th class="tg-hgcj">Survival time</th> </tr><tr> <td class="tg-s6z2">Dead Girl</td> <td class="tg-s6z2">3 secs</td> </tr><tr> <td class="tg-s6z2">Skin Face</td> <td class="tg-s6z2">13 secs</td> </tr><tr> <td class="tg-s6z2">Baby Man</td> <td class="tg-s6z2">1 mins 44 secs</td> </tr><tr> <td class="tg-s6z2">Pumpkin Head</td> <td class="tg-s6z2">7 mins 9 secs</td> </tr><tr> <td class="tg-s6z2">Tall Guy</td> <td class="tg-s6z2">10 mins 7 secs</td> </tr><tr> <td class="tg-s6z2">Hero Girl</td> <td class="tg-s6z2">55 mins 37 secs</td> </tr><tr> <td class="tg-s6z2">Evil Clown</td> <td class="tg-s6z2">Survivor</td> </tr></tbody></table></div><div style="text-align: justify;">The next two to die are quite interesting, these are Pumpkin Head and Tall Guy, lasting approximately 7 and 10 minutes respectively. Up until this point the group has simply been killing the current weakest. At the five minute marker this would be Tall Guy, however, as seen in Figure 1, he is able to outlast Pumpkin Head because Tall guys higher agility allows him to defend better.</div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-IDwDThklJYo/VKbHNNzcBfI/AAAAAAAAIXQ/jmS-LGjxFbE/s1600/Results.jpeg" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-IDwDThklJYo/VKbHNNzcBfI/AAAAAAAAIXQ/jmS-LGjxFbE/s1600/Results.jpeg" width="500" /></a></div><div style="text-align: justify;">Eventually, only Evil Clown and Hero Girl are the surviving combatants. This is interesting as it is often the plot of a horror film to have the heroine survive up until the last few moments, when the final kill is unleashed during extended scenes of heightening tensions. This is exactly what is seen in Figure 1. Initially, things are looking good for Hero Girl as she begins the final battle with much more health than Evil Clown. Furthermore, the agility of the Hero Girl and Evil Clown are equal and the highest out of the group. This has kept them safe up until this point because they were able to run away from danger. Similarly, for the 30 minutes after Tall Guy’s death the two characters are able to capably defend themselves and escape each others attacks.<br /><br />These tropes are used in many horror films: although the heroine is no physical match for the villain, she is able to make up for the lack of strength in terms of speed. It is also a standard horror trend that it should look like the heroine will survive, but then she is subjected to escalating bouts of terror. Although she is able to put up a valiant fight Hero Girl’s life is slowly drained by Evil Clown’s higher strength, ultimately leading to his victory after 55 minutes and with 45 health remaining.</div><br /><div style="text-align: justify;">Who'd have thought that the Evil Clown was so dangerous?! And who could have foreseen where such a simple piece of mathematics, based on the modelling of zombies, would take us?</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">This brings us to the end of this current set of posts. Next time: something completely different.</div><br /><div style="text-align: center;">________________________________________________________________</div><div style="text-align: center;">________________________________________<br /><div style="text-align: justify;">function Battle_Royale<br />%Clear computer memory and plots.<br />clear<br />close all<br />clc<br /><br />options = odeset('RelTol',1e-4,'AbsTol',1e-5); %Options set for the ODE solver.<br /><br />S=[9 7 6 8 3 8 9]; %Vector of strength values.<br />A=[7 8 4 3 8 6 3]; %Vector of agility values.<br />H=[45 65 60 40 90 10 20];%Vector of initial health. <br />C=S.*A; %The interaction function is scaled by the strength multiplied by the agility.<br /><br />[T,Y] = ode45(@(t,y) ODES(t,y,C),[0 7000],H,options); % Solve the ODE.<br /><br />cc=lines(7); % Set the legend colours.<br />for i=1:7<br /> %Find the last moment alive.<br /> YY=Y(:,i);<br /> YY(YY<0.1)=0;<br /> index=find(YY,1,'last');<br /> YY(YY==0)=nan;<br /> YY(index)=0;<br /><br /> plot(T/60,YY,'linewidth',3,'color',cc(i,:)); %Plot results.<br /> t(i)=T(index)/60;<br /> hold on<br />end<br />t %Print out the times of death.<br />axis([0 60 0 90]) %Set axes.<br /><br />%Make the plot look nice.<br />legend('Tall guy','Evil Clown','Pumpkin Head','Baby Man','Hero Girl','Dead Girl','Skin Face','location','northoutside','orientation','horizontal')<br />xlabel('Time in minutes')<br />ylabel('Combatant Health')<br /><br />function dy = ODES(t,y,C)<br />Terms=y.*C'; %The value of the each combatant's attack.<br />dy=zeros(7,1); %Preallocation of the variables.<br />for i=1:7<br /> indices=[1:i-1,i+1:7]; %Indices to be summed over.<br /> dy(i)=-heaviside(y(i))/((1+y(i)^2)*2*C(i))*sum(Terms(indices)); %Differential equation.<br />end<br /><br /></div></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-88493953652983216172016-03-05T15:17:00.000+00:002016-03-05T15:17:01.317+00:00Diffusion of the dead - Epilogue. Part 1, Horror Battle Royale.<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script><br /><div style="text-align: justify;"></div><div class="MsoNormal" style="text-align: justify;"><span style="font-family: inherit;">Having written and <a href="http://www.press.uottawa.ca/mathematical-modelling-of-zombies" target="_blank">published</a> the article on zombie invasion I thought the story would end there. Of course the media picked it up and I had my 15 minutes of fame on the <a href="https://soundcloud.com/thomasewoolley/interview-with-phil-gayle-on-bbc-oxford-about-the-maths-of-zombies" target="_blank"> radio</a> and <a href="http://gooddaysacramento.cbslocal.com/video/10967858-zombie-migration-math/" target="_blank">TV</a>. However, it appears I was very wrong. A PR company, <a href="http://www.itsprettygreen.com/" target="_blank">PrettyGreen</a>, contacted me about getting involved with their <span style="font-family: inherit;">Halloween</span> publicity campaign for <a href="https://giffgaff.com/" target="_blank">GiffGaff</a>, </span>a mobile network operator. </div><div class="MsoNormal" style="text-align: justify;"><br /></div><div class="MsoNormal" style="text-align: justify;">Their question was: suppose seven stereotypical characters from horror movies are released in an arena leading to a battle royale, who would survive? <span style="font-family: inherit;">The characters are:</span><br /><ul><li><span style="font-family: inherit;"> Tall Guy – A very tall (6,9 ft) escaped convict<span style="font-family: inherit;">;</span></span></li><li><span style="font-family: inherit;"> Evil Clown – An evil, twisted clown;</span></li><li><span style="font-family: inherit;"> Pumpkin Head – A man with a pumpkin as a head;</span></li><li><span style="font-family: inherit;"> Baby Man – A somewhat mental man who has spent is life trapped in a basement;</span></li><li><span style="font-family: inherit;"> Hero Girl – A normal young girl;</span></li><li><span style="font-family: inherit;"> Dead Girl – A dead bride;</span></li><li><span style="font-family: inherit;"> Skin Face – A man with excess skin stapled over his face.</span></li></ul></div><div class="MsoNormal" style="text-align: justify;"><span style="font-family: inherit;">My first thought was how was I going to do this? As mentioned when we first started this set of <a href="http://laughmaths.blogspot.com/2014/10/diffusion-of-dead-maths-of-zombie.html" target="_blank">posts</a> there are many different ways mathematics could answer this question. I decided to use differential equations to model the health of each character. As the characters interact their health would reduce depending on certain factors. Thus, I asked PrettyGreen to provide me with a strength, agility and initial health for each combatant and I used these to simulate who will be the last person standing. They were even kind enough to send <span style="font-family: inherit;">m<span style="font-family: inherit;">e a picture to use with this post.</span></span></span><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-2f7yCT3cfHQ/VKbO-bZrTiI/AAAAAAAAIXg/s9CkM_kHBi0/s1600/GiffGaff_570-HiRes.jpeg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://4.bp.blogspot.com/-2f7yCT3cfHQ/VKbO-bZrTiI/AAAAAAAAIXg/s9CkM_kHBi0/s1600/GiffGaff_570-HiRes.jpeg" width="410" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Hero Girl, Evil Clown, Dead Girl, Tall Guy and Pumpkin Head all having a nice jog in London. Image courtesy of PrettyGreen.</td></tr></tbody></table><span style="font-family: inherit;">This post is a little more mathematical then normal as I present <span style="font-family: inherit;">all the <span style="font-family: inherit;">gory <span style="font-family: inherit;">equation details. However, do<span style="font-family: inherit;"> no<span style="font-family: inherit;">t let this scare you. Ho<span style="font-family: inherit;">pefully, <span style="font-family: inherit;">I provide al<span style="font-family: inherit;">l the <span style="font-family: inherit;">in<span style="font-family: inherit;">tuitive deta<span style="font-family: inherit;">ils you shoul<span style="font-family: inherit;">d need in the text. If you just want the <span style="font-family: inherit;">brief tha<span style="font-family: inherit;">t appeared in the news, then please look <a href="http://www.cityam.com/1414684632/science-scariness-who-should-you-be-most-afraid-halloween" target="_blank">here</a>.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div><div style="text-align: center;">________________________________________________________________</div><div style="text-align: center;">________________________________________</div><b>Method</b><br /><div class="MsoNormal" style="text-align: justify;"><span style="font-family: inherit;"> </span></div><div class="MsoNormal" style="text-align: justify;">The battle simulation is based on the reduction of each combatant’s initial health at a rate proportional to their meeting with an opponent. Once a combatant’s health has dropped to zero, they are immediately removed from the conflict, whilst the survivors fight on.</div><div class="MsoNormal" style="text-align: justify;"><br /></div><div class="MsoNormal" style="text-align: justify;">The interaction outcome is based on a scaled form of the empirical rule known as the “Law of Mass Action”. Explicitly, the rate of reduction in health is proportional to the attacker’s health, scaled by an inverse square of the defender’s health. Intuitively, this simply means that a reduction in health can only occur when the attacker and defender meet. Moreover as the attacker gets weaker, their attacks do less damage. Equally, as the defender becomes weaker their defence is less effective. The precise form of the interaction term is,<br />\begin{equation}<br />\frac{H_a}{1+H_d^2}, <br />\end{equation} </div><div class="MsoNormal" style="text-align: justify;">where $H_a$ is the health of the attacker and $H_d$ is the health of the defender. It should be understood that this interaction term is known as a "constitutive equation". This means that it is not based on any fundamental law, but it is postulated because it produces the right kind of dynamics that we would expect. There are many other functions I could have used in its place, however, in using this equation, I am hoping that it is simple enough to capture the general outcomes of the system and, thus, the results will be robust to any small changes that might occur.<br /><br /><div class="MsoNormal" style="text-align: justify;">From these assumptions we can construct a coupled set of ordinary differential equations that will evolve the battle and predict who will win. The exact form of the equation for combatant <span style="mso-bidi-font-style: normal;">$i=1,2,…,7$</span> is</div>\begin{equation}<br />\tau\frac{dH_i}{dt}=\frac{-1}{1+H_i^2}\frac{1}{S_iA_i}\sum_{j\neq i}S_jA_jH_j. <br />\end{equation}<br />Note that the equation is only active while $H_i>0$. Also notice that we have scaled the terms with the strength parameter, $S_i$, and agility parameter, $A_i$. Thus, speed is, potentially, just as important as strength. Parameters can be found in the Table 1, below. Finally, we define the initial condition as: <br />\begin{equation}<br />H_i{0}=H_{i0}. <br />\end{equation} </div><div align="center"><style type="text/css">.tg {border-collapse:collapse;border-spacing:0;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg .tg-hgcj{font-weight:bold;text-align:center} .tg .tg-s6z2{text-align:center} </style><br /><table class="tg"><tbody><tr> <th class="tg-hgcj">Name and variable</th> <th class="tg-hgcj">Strength, $S_i$</th> <th class="tg-hgcj">Agility, $A_i$</th> <th class="tg-hgcj">Initial health, $H_{i0}$</th> </tr><tr> <td class="tg-s6z2">Tall Guy, $H_1$</td> <td class="tg-s6z2">9</td> <td class="tg-s6z2">7</td> <td class="tg-s6z2">45</td> </tr><tr> <td class="tg-s6z2">Evil Clown, $H_2$</td> <td class="tg-s6z2">7</td> <td class="tg-s6z2">8</td> <td class="tg-s6z2">65</td> </tr><tr> <td class="tg-s6z2">Pumpkin Head, $H_3$</td> <td class="tg-s6z2">6</td> <td class="tg-s6z2">4</td> <td class="tg-s6z2">60</td> </tr><tr> <td class="tg-s6z2">Baby Man, $H_4$</td> <td class="tg-s6z2">8</td> <td class="tg-s6z2">3</td> <td class="tg-s6z2">40</td> </tr><tr> <td class="tg-s6z2">Hero Girl, $H_5$</td> <td class="tg-s6z2">3</td> <td class="tg-s6z2">8</td> <td class="tg-s6z2">90</td> </tr><tr> <td class="tg-s6z2">Dead Girl, $H_6$</td> <td class="tg-s6z2">8</td> <td class="tg-s6z2">6</td> <td class="tg-s6z2">10</td> </tr><tr> <td class="tg-s6z2">Skin Face, $H_7$</td> <td class="tg-s6z2">9</td> <td class="tg-s6z2">3</td> <td class="tg-s6z2">20</td> </tr></tbody></table></div><div style="text-align: justify;">The parameters were chosen such that strength and agility were on a scale from 1 to 10, such that higher numbers represent higher strengths and speeds, respectively. The health parameter is on a scale of 0 to 100, with the relative size determining how healthy each character is. It should be noted that in the original data Dead Girl’s health was 0. Understandably, this would make her “dead”, however, it would also suggest that she was unkillable, resulting in her inevitable win. To ensure such a case does not occur I changed her initial health to 10.</div><br /><div style="text-align: justify;">Next time I will present the results of the above simulations and demonstrate that although this is only a simple model it produces an outcome that you would expect to see in any good (or bad) horror film. In the mean time, have a go at simulating the system yourself and perhaps vary the interaction rule to see how the results are influenced by this equation. </div><br />Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-32622106970347664652016-02-20T15:12:00.000+00:002016-02-20T15:12:00.773+00:00Diffusion of the dead - The maths of zombie invasions. Part 9, The complete strategy.<div style="text-align: justify;"><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-hROCx-4FqCU/Vf8FGpwULGI/AAAAAAAAIbY/Vkc5VcqGI-A/s1600/Man_vs_zombie.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="http://2.bp.blogspot.com/-hROCx-4FqCU/Vf8FGpwULGI/AAAAAAAAIbY/Vkc5VcqGI-A/s320/Man_vs_zombie.png" width="320" /></a></div>Over the past 8 posts we have investigated the mathematical implications of a zombie invasion. If you really can't be bothered to read all of the details, please see part <a href="http://laughmaths.blogspot.com/2014/10/diffusion-of-dead-maths-of-zombie.html" target="_blank">1</a>, where you'll find some links to presentations that I have done and I'll give you all the details inside of one hour!<br /><br />For the more patient reader, we began in parts <a href="http://laughmaths.blogspot.com/2014/11/diffusion-of-dead-maths-of-zombie.html" target="_blank">2</a>, <a href="http://laughmaths.blogspot.com/2015/09/diffusion-of-dead-maths-of-zombie_56.html" target="_blank">3</a> and <a href="http://laughmaths.blogspot.com/2015/09/diffusion-of-dead-maths-of-zombie_25.html" target="_blank">4</a> where we discussed the philosophy of modelling, the assumptions that would make up the zombie invasion model and some basic mathematical simulation techniques. Although important for the recreational mathematician if you're really in a pinch you'll want to skip right to the results. <br /><br />In particular, in parts <a href="http://laughmaths.blogspot.com/2015/08/diffusion-of-dead-maths-of-zombie.html" target="_blank">5</a> and <a href="http://laughmaths.blogspot.com/2015/09/diffusion-of-dead-maths-of-zombie_18.html" target="_blank">6</a> we showed that running away from zombies increases the initial interaction time far more than trying to slow the zombies down. Thus, fleeing for your life should be the first action of any human wishing to survive. However, we cannot run forever; interaction with zombies is inevitable.<br /><br />In part <a href="http://laughmaths.blogspot.com/2015/09/diffusion-of-dead-maths-of-zombie_20.html" target="_blank">8</a> we showed that the best long-term strategy is to create a fortified society that can sustain the population, whilst allowing us to remove the zombies as they approach. This, in effect, reduces the risk to zero and we will survive.<br /><br />In the event of the apocalypse, it is unlikely that we would be able to support such a commune without raiding parties scavenging for medicine, food and fuel. Thus, in this case, we fall back on the maxim of being more deadly than the zombies which allows us to survive as shown in part <a href="http://laughmaths.blogspot.com/2015/09/diffusion-of-dead-maths-of-zombie.html" target="_blank">7</a>.<br /><br />Over all, it is difficult for us to survive simply because zombies do not have a natural death rate, and by biting us, they are able to increase their own ranks whilst reducing ours. Thus reinforcing our greatest fear that human allies could quickly become our biggest nightmares.<br /><br />Our conclusion is grim, not because we want it to be so but because it is so. It had always been the authors' intention to try and save the human race. So to you, the reader, who may be the last survivor of the human race, we say: run. Run as far away as you can get; an island would be a great choice. Only take the chance to fight if you are sure you can win and seek out survivors who will help you stay alive.</div><div style="text-align: center;"><b>Good luck.</b><br /><b>You are going to need it.</b></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-52499663325178213342016-02-06T12:37:00.000+00:002016-02-15T21:42:47.729+00:00Diffusion of the dead - The maths of zombie invasions. Part 8, Surfing the infection wave.<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script><br /><div style="text-align: justify;">Last time we considered the interaction rules</div><ol style="text-align: justify;"><li> humans kill zombies;</li><li>zombies kill humans; and</li><li>zombies can transform humans into zombie,</li></ol><div style="text-align: justify;">and produced the following system of equations, </div><div style="text-align: justify;">\begin{align}\frac{\partial H}{\partial t}&=D_H\frac{\partial^2 H}{\partial x^2}-\alpha HZ\label{Human_PDE}\\\frac{\partial Z}{\partial t}&=D_Z\frac{\partial^2 H}{\partial x^2}+\beta HZ\label{Zombie_PDE},\end{align}</div><div style="text-align: justify;">which predicts the evolution of the human population, $H$, and the zombie population, $Z$.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">To see how quickly the infection moves through the human population, we look for a particular type of solution, known as a "Fisher wave". This type of wave travels at a specific speed and does not change its shape as its travels. Such a solution can be seen below.</div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/ySD1mxIJtWM/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/ySD1mxIJtWM?feature=player_embedded" width="320"></iframe></div><div style="text-align: center;"> Movie: The black line represents the human population. The red dashed line represents the zombie population. Initially, there are only a small number of zombies, but over time the infected population spreads out and transforms the susceptible population.</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">By manipulating the equations we can show that the wave speed, $v$, has a value of</div><div style="text-align: justify;">\begin{equation}<br />v^2=4D_Z\beta H_0,<br />\end{equation}</div><div style="text-align: justify;">where $D_Z$ is diffusion rate of the zombies, $\beta$ is the net-rate of zombification (a.k.a how quickly the zombie population grows) and $H_0$ is the initial human population. Critically, note that the left-hand side of the equation is positive, because it is a squared value.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">In order to slow the infection, we should try to reduce the right-hand side of the above equation. </div><ul style="text-align: justify;"><li>Reducing $D_Z$ amounts to slowing the zombies down; thus, an effective fortification should have plenty of obstructions that a human could navigate but a decaying zombie would find challenging. </li><li>Reducing $\beta$ occurs through killing zombies quicker than they can infect humans. If we are really effective in our zombie destroying ways then we can make $\beta$ negative. This would make the right-hand side of the equation negative, but the left-hand side of the equation is positive. Since we get a contradiction no wave can exist and the infection wave is stopped.</li><li>Reducing $H_0$ involves reducing the human population. This could mean geographically isolating the population on an island because if the zombies are unable to get to you then they can't infect you.</li></ul><div style="text-align: justify;">The last tactic of reducing the human populations could also lead to a rather controversial tactic. Suppose you don't live near a deserted fortified island. Rather, you work in an office surrounded by people who would not be able to protect themselves from the oncoming hordes. Then you may consider removing the humans around you in a more drastic and permanent way. This is because everyone that surrounds you is simply a potential infection!</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">I do not recommend this cause of action, as reducing the human population also reduces the number of people able to fight the zombies and humans sacrificing other humans would only speed the extinction of their own species. The human population will have enough trouble trying to survive the hordes of undead, without worrying about an attack from their own kind!<br /><br />This, pretty much, brings us to the end of the mathematical zombie story. It's been a long journey, thus, to ensure that you haven't missed any of the critical strategies along the way the next post simply focuses on summarising and concluding what we're been discussing since Halloween. See you then.<!--0--></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com1tag:blogger.com,1999:blog-6258038688403228659.post-34646888728194276232016-01-23T12:47:00.000+00:002016-02-15T21:42:29.663+00:00Diffusion of the dead - The maths of zombie invasions. Part 7, Face to face with a zombie.<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script>So far we have only considered zombie motion. It has been an incredibly simply model, but it has been able to furnish us with a wealth of information. In particular, we have been able to predict how long it will take the zombies to get to us and we have shown that the best strategy is to run away.<br /><br />Unfortunately, you can only run so far. At some point you are no longer running away from the living dead, but actually running towards a different mob of zombies. So what should you do when you finally end up having to go hand to hand with a zombie?<br /><br />To model human-zombie interactions, we suppose that a meeting between the <br /><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">two populations can have three possible outcomes. Either</div><ol><li> the human kills the zombie;</li><li>the zombie kills the human; or</li><li>the zombie infects the human and so the human becomes a zombie.</li></ol>These outcomes are illustrated in Figure 1. <br /><ol></ol>Allowing $H$ to stand for the human population and $Z$ to stand for the zombie population, these three rules can be written as though they were chemical reactions:<br /><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">\begin{align}<br />H+Z&\stackrel{a}{\rightarrow}H \text{ (human kills zombie)}\\<br />H+Z&\stackrel{b}{\rightarrow}Z \text{ (zombie kills human)}\\<br />H+Z&\stackrel{c}{\rightarrow}Z+Z \text{ (human becomes zombie).}<br />\end{align}</div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">The letters above the arrows indicate the rate at which the transformation </div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">happens and are always positive. If one of the rates is much larger than the </div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">other two, then this "reaction" would most likely happen.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-0lMK2MD0Llk/VXXqNdEoUnI/AAAAAAAAIaI/sCm2PshBsaY/s1600/Three_possibilities.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="370" src="https://2.bp.blogspot.com/-0lMK2MD0Llk/VXXqNdEoUnI/AAAAAAAAIaI/sCm2PshBsaY/s400/Three_possibilities.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. The possible outcomes of a human-zombie interaction. Either (a)<br /><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">humans kill zombies, (b) zombies kill humans, or (c) zombies convert humans.</div></td></tr></tbody></table><div style="text-align: justify;"></div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">To transform these reactions into a mathematical equation, we use the "Law of Mass Action". This law states that the rate of reaction is proportional to the product of the active populations. Simply put, this means that the above reactions are more likely to occur if we increase the number of humans and/or zombies. Thus, we can produce the following equations which govern the population dynamics</div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">\begin{align}\frac{\partial H}{\partial t}&=D_H\frac{\partial^2 H}{\partial x^2}-\alpha HZ\\\frac{\partial Z}{\partial t}&=D_Z\frac{\partial^2 H}{\partial x^2}+\beta HZ.\end{align}<br /><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">where $b+c=\alpha$ is the net death rate of humans and $c-a=\beta$ is the net creation rate of zombies.<br /><br />If we ignore the reactions for a second, we have seen the first part of the equations <a href="http://laughmaths.blogspot.com/2015/11/diffusion-of-dead-maths-of-zombie_28.html" target="_blank">before</a>. Explicitly we are assuming that both the zombies and humans randomly diffuse throughout their domain. Now we have <a href="http://laughmaths.blogspot.com/2015/11/diffusion-of-dead-maths-of-zombie.html" target="_blank">previously</a> justified the zombies' diffusive motion as they are mindless monsters. However, humans are not usually known for their random movement. Here, we use the fact that if the dead should start to rise from their graves, then panic would set in and humans would start to run away and spread out randomly from location of high population density. Thus, human movement could also be described by diffusion, although their diffusion rate is likely to be much larger than the zombies'.<br /><br />If we now include the interaction formulation once again then the equations immediately highlight some important components of this problem. Firstly, because $b$, $c>0$ and $H$, $Z\geq 0$ then the human interaction term, $-\alpha HZ$, is always negative. Thus, the human population will only ever decrease over time.<br /><br />We could add a birth term into this equation, which would allow the population to also increase in the absence of zombies but, as we have <a href="http://laughmaths.blogspot.com/2015/08/diffusion-of-dead-maths-of-zombie_23.html" target="_blank">seen</a> <a href="http://laughmaths.blogspot.com/2015/06/diffusion-of-dead-maths-of-zombie_28.html" target="_blank">previously</a>, the time scale on which we are working on is extremely short, much shorter than the 9 months it takes for humans to reproduce! Thus we ignore the births since they are not likely to alter the populations a great deal during this period.<br /><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><br /></div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">Interpreting the zombie equation is not so easy. The term $c-a=\beta$ may either be positive or negative. If $(c-a)>0$ then the creation rate of zombies, $c$, must be greater than the rate which we can destroy them, $a$. In this case the humans will be wiped out as our model predicts that the zombie population will grow and the human population will die out. However, there is a small hope for us. If the rate at which humans can kill zombies is greater than the rate at which zombies can infect humans then $(c-a) < 0$. In this case both populations are decreasing, thus our survival will come down to a race of which species becomes extinct first.<br /><br />Next week we will delve into the equations more and consider the spread of infection. We will then be able to derive expressions that really tell us how to survive, or at least delay, the zombie uprising.<!--0--></div></div></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-47441192340937280432016-01-09T11:57:00.000+00:002016-02-15T21:41:03.185+00:00Diffusion of the dead - The maths of zombie invasions. Part 6, Run, don't fight.<div style="text-align: justify;"><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script>Last time I demonstrated how to approximately find the time of your first interaction with a zombie using the diffusion equation and the bisection method. The Time-Distance-Diffusion graph is illustrated below.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-uKcOmwx2ayo/VLGC_YxMx_I/AAAAAAAAIYk/evL5OfD3eAo/s1600/Speed_graph.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="312" src="https://3.bp.blogspot.com/-uKcOmwx2ayo/VLGC_YxMx_I/AAAAAAAAIYk/evL5OfD3eAo/s640/Speed_graph.png" width="500" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Time in minutes until the density of zombies reaches one for various rates of diffusion and distances.</td></tr></tbody></table><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><div style="text-align: justify;">When the apocalypse does happen, we have to ask ourselves the question: do we want to waste time computing solutions when we could be out scavenging? In order to speed up the computational process we consider the diffusive time scale:</div>\begin{equation}t=\frac{L^2}{\pi^2 D}.\label{Time_scale}\end{equation}</div><div style="text-align: justify;">You may recognise this group of parameter, as we saw it back in <a href="http://laughmaths.blogspot.com/2015/06/diffusion-of-dead-maths-of-zombie.html" target="_blank">Part 4</a>. In particular, in the solution to the diffusion equation, we can see that this is the time it takes for the first term of the infinite sum to fall to $\exp(-1)$ of its original value. The factor of $\exp(-1)$ is used due to its convenience.</div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><br /></div><div style="text-align: justify;">Only the first term of the expansion is considered because as $n$ increases, the contribution from the term</div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">\begin{equation}\exp\left(-\left( \frac{n\pi}{L} \right)^2Dt\right)\end{equation}</div><div style="text-align: justify;">rapidly decreases. Thus, the first term gives an approximation to the total solution and, so, equation \eqref{Time_scale} gives a rough estimate of how quickly the zombies will reach us.</div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><br /></div><div style="text-align: justify;">For example, being 90 metres away and with zombies who have a diffusion rate of 100m$^2$/min, $t\approx 26$ minutes, comparable to the solution in Figure 1. We have had to use no more computing power than you would find on a standard pocket calculator. More importantly this parameter grouping also implies a very important result about delaying the human-zombie interaction.There are two possible ways we could increase the time taken for the zombies to reach us. We could: </div><ol style="text-align: justify;"><li>run away, thereby increasing $L$; or</li><li>slow the zombies down, thereby decreasing $D$.</li></ol><div style="text-align: justify;">Since the time taken is proportional to the length squared, $L^2$ and inversely proportional to the diffusion speed, $D$. This means that if we were to double the distance between ourselves and the zombies, then the time for the zombies to reach us would approximately quadruple. However, if we were to slow the zombies down by half, then the time taken would only double.</div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><br /></div><div style="text-align: justify;">Since we want to delay interaction with the zombies for as long as possible then, from the above reasoning, we see that it is much better to expend energy running away from the zombies than it is to try and slow them down. Note that we are assuming that zombies are hard to kill without some form of weaponry. If they weren't difficult to destroy then we need not worry about running away.</div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><br /></div><div style="text-align: justify;">These conclusions are confirmed in Figure 1. Slowing a zombie down from 150 m/min to 100 m/min only gains you a couple of minutes when you are 50 metres away. However, running from 50 m to 90 m increases the time by over 10 minutes, even in the scenario of relatively fast zombies.</div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><br /></div><div style="text-align: justify;">It should be noted that the time derived here is a lower bound. In reality, the zombies would be spreading out in two dimensions and would be distracted by obstacles and victims along the way, so the time taken for the zombies to reach us may be longer. The fact that this is a conservative estimate though will keep us safe, since the authors would prefer to be long gone from a potential threat rather than chance a few more minutes of scavenging!</div><div style="-qt-block-indent: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><br /></div><div style="text-align: justify;">Of course, we can't run forever. Next week we will begin to ask what happens when we finally meet this horrific horde! </div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com2tag:blogger.com,1999:blog-6258038688403228659.post-16466247322663299912015-12-26T21:18:00.000+00:002016-02-15T21:40:37.785+00:00Diffusion of the dead - The maths of zombie invasions. Part 5, Time of first interaction.<div style="text-align: justify;">Previously, we saw how to simulate the diffusion equation, which we're using to model zombie motion. Critically, the diffusion equation allows us to predict the density of zombies at all places and for all time. </div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">There are many questions we could answer with this equation; however, the most pressing question to any survivors is, <b>"How long do we have before the first zombie arrives?"</b>. The mathematical formulation of this question is, <b>"For what time, $t_z$, does $Z(L, t_z) = 1$?"</b>. Unfortunately, this does not have a nice solution that can be evaluated easily. However, we can calculate $t_z$ numerically to any degree of accuracy we choose by using a simple solution searching technique known as the "Bisection Search Algorithm"</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">The first thing to notice about $Z(L,t)$ is that it is monotonically increasing in time, thus, if $t_1>t_2$ then $Z(L,t_1)>Z(L,t_2)$. This can be seen in a number of ways. For example, by watching the diffusion simulation from <a href="http://laughmaths.blogspot.com/2015/12/diffusion-of-dead-maths-of-zombie.html" target="_blank">last time</a> we see that as time increases the zombie population on the boundary only ever increases. This makes intuitive sense, because diffusion is causing the zombie population to spread out, so that it becomes uniform everywhere.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Using this knowledge then a simple method of solving $Z(L, t_z) = 1$ would be to substitute in a value of $t$. If $Z(L, t) < 1$ then we double $t$ and consider $Z(L, 2t)$, which will be greater than $Z(L,t)$, because of the monotonic property we discussed above. We keep doubling $t$ until we reach a value such that $Z(L, 2^nt) > 1$. Defining $t_0 = 2^{n-1}t$ and $t_1 = 2^nt$, then we know that there exists some $t_z$ between $t_0$ and $t_1$ such that $Z(L, t_z) = 1$.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">To gain better approximations to the value of $t_z$, we start halving this domain and only keep the half that contains the solution. However, how do we know which half contains the solution? We once again rely on the monotonic property and evaluate the function at the midpoint of the domain. Explicitly, if $Z(L,(t_0+t_1)/2) < 1$ then the solution is in the right half. Alternatively, if $Z(L,(t_0+t_1)/2) > 1$ then the solution is in the left half.<br /><br />An example illustrating this concept is shown in Figure 1. In the initial setup, $Z(L,(t_0+t_1)/2)>1$, thus, we redefine $t_1 = (t_0 + t_1)/2$ and repeat the process.<!--1--></div><div style="text-align: justify;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-FXzjvYQ_BAg/VLF9xX0ir-I/AAAAAAAAIYM/5hpE1fkLHyk/s1600/Bisection.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="https://1.bp.blogspot.com/-FXzjvYQ_BAg/VLF9xX0ir-I/AAAAAAAAIYM/5hpE1fkLHyk/s400/Bisection.png" width="340" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Bisection technique. After each iteration, the domain, shown by the dashed lines,<br />becomes half as long as it was before.</td></tr></tbody></table><div style="text-align: justify;">After each iteration, we halve the size of the interval $[t_0, t_1]$, making it smaller and smaller. Thus, by design, since we always have $t_z$ within $[t_0, t_1]$ and by repeating the halving process, we can estimate $t_z$ to any accuracy we like.</div><div style="text-align: justify;"></div><div style="text-align: justify;"><br />The benefit of this method is its simplicity and reliability; it will always work. However, the cost of this reliability comes at the price of speed. If the initial searching region is very big, it may take a large number of iterations before the process produces an answer to an accuracy with which we are happy. There are quicker methods, but these are usually more complex and sometimes they may fail to find a solution altogether.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">If the zombies are closing in on you and you need to compute their interaction times more quickly, we direct you to consider Newton-Raphson techniques rather than the bisection method. Although if the zombies really are that close may I suggest you focus on fighting them off before you read any further?</div><div style="text-align: justify;"><br />No matter what solution method you use you should end up with a graph like Figure 2, which illustrates the time in minutes we have before we meet a zombie depending on how far away we are and how fast the zombies are diffusing.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-uKcOmwx2ayo/VLGC_YxMx_I/AAAAAAAAIYk/evL5OfD3eAo/s1600/Speed_graph.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://3.bp.blogspot.com/-uKcOmwx2ayo/VLGC_YxMx_I/AAAAAAAAIYk/evL5OfD3eAo/s640/Speed_graph.png" width="500" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 2. Time in minutes until the first zombie arrives for various rates of diffusion and distances.</td></tr></tbody></table><div style="text-align: justify;">At this point we can consider two general strategies. Either we run away, or we try and slow the zombie down. Both of these approaches will indeed increase the time it takes for the zombies to get to you. However, Figure 2 clearly shows that we gain much more time by running away compared to the strategy of slowing the zombies down. Next time I will expand on this point and show how to estimate the zombie interaction time much quicker.<br /><div style="text-align: center;">________________________________________________________________</div><div style="text-align: center;">________________________________________<br /><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-4HLRAjVoCA4/VLGNB333g_I/AAAAAAAAIY0/qkUr0L4m7fo/s1600/Zombie_Lorraine.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="197" src="https://1.bp.blogspot.com/-4HLRAjVoCA4/VLGNB333g_I/AAAAAAAAIY0/qkUr0L4m7fo/s200/Zombie_Lorraine.png" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">My amazing wife on her zombie themed hen do.<br />Note that the theme had nothing to do with me.</td></tr></tbody></table><div style="text-align: justify;">You may be wondering how I chose the variable ranges for Figure 2. Well, the Oxford maths department is approximately 90m away from a graveyard so the distances simply came from a matter of self preservation. The diffusion speed on the other hand was generated with the aid of my loving wife. I got her to wander randomly around, staggering like a zombie. I timed her and measured how far she had moved and, thus, calculated that her zombie diffusion rate was approximately 115m$^2$/minute. Don't worry we did the experiment three times and took an average, which ensures that this value is accurate.</div></div><br /></div><div style="text-align: justify;"><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-23985878704331614982015-12-12T09:00:00.000+00:002016-02-15T21:39:51.511+00:00Diffusion of the dead - The maths of zombie invasions. Part 4, Simulating zombie movement.<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script><br />Last time we presented the diffusion equation<br />\begin{equation}<br />\frac{\partial Z}{\partial t}(x,t)=D\frac{\partial^2 Z}{\partial x^2}(x,t).<br />\end{equation}<br />and demonstrated that it had the right properties to model zombie motion. However, stating the equation is not enough. We must add additional information to the system before we can solve the problem uniquely. Specifically, we need to define: the initial state of the system, where the boundaries of the system are, and, finally, what happens to the zombies at the boundaries.<br /><br />For the boundary condition we assume that the zombies cannot move out of the region $0\leq x\leq L$. This creates theoretical boundaries which the population cannot cross; the zombies will simply bounce off these boundaries and be reflected back into the domain. Since no zombies can cross the boundaries at $x=0$ and $x=L$, the `flux of zombies' across these points is zero,<br />\begin{equation}<br />\frac{\partial Z}{\partial x}(0,t)=0=\frac{\partial Z}{\partial x}(L,t) \text{ (the zero flux boundary conditions).}<br />\end{equation}<br /><br />For the initial condition, we assume that the zombies are all localised in one place, a graveyard for example. Thus the zombies have a density of $Z_0$ zombies/metre in the region $0\leq x \leq 1$,<br />\begin{equation}<br />Z(x,0)=\left\{\begin{array}{cc}<br />Z_0&\text{for }0\leq x\leq 1,\\<br />0&\text{for } x>1, <br />\end{array}<br />\right. \text{ (the initial condition).}<br />\end{equation}<br /><br />The diffusion with the given initial and boundary conditions can be solved exactly and has the form,<br />\begin{equation}<br />Z(x,t)=\frac{Z_0}{L}+\sum^\infty_{n=1}\frac{2Z_0}{n\pi}\sin\left(\frac{n\pi}{L}\right) \cos\left(\frac{n\pi}{L}x\right)\exp\left({-\left( \frac{n\pi}{L} \right)^2Dt}\right).\label{Solution}<br />\end{equation}<br />Although I have made this solution magically appear from nowhere, the solution can be rigorously produced using methods called "separation of variables" and "Fourier series".<br /><br /><table border="5" bordercolor="grey"><tbody><tr><td><a href="http://en.wikipedia.org/wiki/Separation_of_variables" target="_blank">Separating the variables</a> means that we assume space and time components of the solution are not coupled together in a complicated manner. Namely, the solution can be written as a spatial component, multiplied by a time component, which can be seen above because the space variable, $x$, only appears in the cosine function, whilst the time variable, $t$, only appears in the exponential function.<br /><br /><a href="http://en.wikipedia.org/wiki/Fourier_series" target="_blank">Fourier series</a> allows us to write a function as an infinite summation of sines and cosines. Although this may seem cumbersome the Fourier series usually have very nice properties, which allow them to be manipulated with ease.</td></tr></tbody></table><br />The `$\sin$' and `$\cos$' functions are those that the reader may remember from their trigonometry courses. The exponential function, `$\exp$', is one of the fundamental operators of mathematics, but for now the only property that we are going to make use of is that if $a>0$ then $\exp(-at)\rightarrow 0$ as $t\rightarrow \infty$. Using this fact we can see that as $t$ becomes large most of the right-hand side of the solution becomes very small, approximately zero. Hence, for large values of $t$, we can approximate<br />\begin{equation}<br />Z(x,t)\approx\frac{Z_0}{L}.\label{Longtime_approximation}<br />\end{equation}<br />This means that as time increases, zombies spread out evenly across the available space, with average density $Z_0/L$ everywhere.<br /><br /><div style="text-align: center;"><iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/HdwHF3hJhBw" width="420"></iframe><br /></div><br /><div style="text-align: justify;">The simulation illustrates two solutions to the diffusion equation for the zombie density. Namely, the video above compares the analytical solution, given in equation \eqref{Solution}, with a direct numerical solution of the diffusion equation. If you stop the video right at the start, the initial condition can be seen and it shows that there is a large density of zombies between $0\leq x \leq 1$. The movie then illustrates how diffusion causes the initial peak to spread out filling the whole domain. After 500 time units the density of zombies has become uniform throughout the domain. The Matlab codes for plotting this solutions can be found below.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">There are a couple of things to note in this simulation. Firstly, we say that the analytical solution is only a approximation because we can not simulate an infinite number of cosine terms. The movie shows only the first 1000 terms and, as you can see, the comparison between the two results is pretty good. Secondly we have not given units for the density, space or time, thus, are we using seconds and metres or minutes and miles? Well, the answer is that in some sense it doesn't matter, whilst in other cases it matters a great deal. Since we are only interested in visualising the dynamics of diffusion, we can keep the units arbitrary. However, if we had a specific application, with data, then we would have to ensure that all our units were consistent.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">This finishes our look at solving the diffusion equation. Next time we actually use these solutions to provide us with the first of ours answers. These answers will then provide us with a strategy to deal with the eventual zombie apocalypse.</div><div style="text-align: center;">________________________________________________________________</div><div style="text-align: center;">________________________________________</div><div style="text-align: justify;">Below you will find the Matlab code used to generate the above movie. If you have Matlab then you can simply copy and paste the text into a script and run it immediately.<br /><br /></div>function Diffusion_solution<br />clear<br />close all<br />clc<br /><br />Z0=100; %Initial density.<br />L=10; %Length of domain.<br />D=0.1; %Diffusion coefficient.<br />dx=0.1; %Space step.<br />x=[0:dx:L]; %Spatial discretisation.<br />dt=1; %Time step.<br />final_time=500; %Final time.<br />times=0:dt:final_time; %Time discretisation.<br />iter=1; %Parameter initialisation.<br /><br />%% Analytical solution.<br />Z=ones(1+final_time/dt,length(x))*Z0/L;<br />for t=0:dt:final_time<br />for n=1:1000<br />Z(iter,:)=Z(iter,:)+2*Z0/(n*pi)*sin(n*pi/L)*cos(x*n*pi/L)*...<br />exp(-(n*pi/L)^2*t*D);<br />end<br />iter=iter+1;<br />end<br /><br />%% Direct numerical solution.<br />sol = pdepe(0,@(x,t,u,DuDx)Zombies(x,t,u,DuDx,D),@(x)ICs(x,Z0),@BCs,x,times);<br /><br />%% Plotting<br />for i=1:final_time+1<br />plot(x,Z(i,:),'b','linewidth',3)<br />hold on<br />plot(x,sol(i,:),'g--','linewidth',3)<br />set(gca,'yTick',[0:20:100])<br />xlabel('Distance, x','fontsize',20);<br />ylabel('Density, Z','fontsize',20);<br />set(gca,'fontsize',20)<br />grid off<br />axis([0 10 0 100])<br />title(['Time=',num2str((i-1)*dt)])<br />legend('Approximate analytic solution','Approximate numerical solution','location','northoutside')<br />drawnow<br />hold off<br />end<br /><br />function value = ICs(x,Z0)<br />% Setting the initial condition, which is a step function. Namely, the<br />% density of zombies is Z0 when x is less than 1 and 0 everywhere else.<br />if x < 1<br />value=Z0;<br />else<br />value=0;<br />end<br />function [c,b,s] = Zombies(~,~,~,DuDx,D)<br />% Matlab syntax for the diffusion equation.<br />c = 1;<br />b = D*DuDx(1);<br />s = 0;<br />function [pl,ql,pr,qr] = BCs(~,~,~,~,~)<br />% Matlab syntax for the zero flux boundary conditions.<br />pl = 0;<br />ql = 1;<br />pr = 0;<br />qr = 1;Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-43008127476473894572015-11-28T09:00:00.000+00:002016-02-15T21:38:11.193+00:00Diffusion of the dead - The maths of zombie invasions. Part 3, Diffusive motion.<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script><br /><div style="text-align: justify;">As discussed <a href="http://laughmaths.blogspot.co.uk/2015/11/diffusion-of-dead-maths-of-zombie.html" target="_blank">previously</a>, we are going to model the zombie motion using the diffusion equation. In this post we introduce the gritty details. I've interpreted the mathematical symbols intuitively, so, if you stick with it, you should find yourself understanding more than you ever thought you could.<br /><br />It is impossible to overstate the importance of the diffusion equation. Wherever the movement of a modelled species can be considered random and directionless, the diffusion equation will be found. This means that by understanding the diffusion equation we are able to describe a host of different systems such as heat conduction through solids, gases (e.g. smells) spreading out through a room, proteins moving round the body, molecule transportation in chemical reactions and rainwater seeping through soil, to name but a few of the great numbers of applications.<br /><br />If you've never come across diffusion before, or want to know more about it's basic properties the video below is a very good primer, although feels very much like a "<a href="https://www.youtube.com/watch?v=gaI6kBVyu00" target="_blank">Look around you</a>" episode.</div><div style="text-align: center;"><iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/H7QsDs8ZRMI" width="420"></iframe><br /></div><div class="separator" div="" style="text-align: justify;"></div><div style="text-align: justify;">The mathematical treatment of diffusion begins by defining the variables that we will need. Let the density of zombies at a point $x$ and at a time $t$ be $Z(x,t)$ then the density has to satisfy the diffusion equation,</div><div style="text-align: justify;">\begin{equation}<br />\frac{\partial Z}{\partial t}(x,t)=D\frac{\partial^2 Z}{\partial x^2}(x,t).<br />\end{equation}<br />To some an equation can be scarier than any zombie, but fear not. I am going to break this equation down into bits so that you are able to see the reality behind the mathematics. </div><div style="text-align: justify;"><br />Notice that the equation is made up of two terms, the left-hand side and the right-hand side, which are defined to be equal. Explicitly, the left-hand side is known as the time derivative and it simply tell us how the zombie density is changing over time,<br />\begin{equation}<br />\frac{\partial Z}{\partial t}(x,t)=\text{rate of change of $Z$ over time at a point $x$}.<br />\end{equation}</div><div style="text-align: justify;">Although the numerical value of this term is important, what is more important is if the term is positive or negative. Specifically, if $\partial Z/\partial t$ is positive then $Z$ is increasing at that point in time, and, vice-versa, if $\partial Z/\partial t$ is negative then $Z$ is decreasing. Thus, we use this term to tell us how the zombie population is changing over time.<br /><br /><div style="text-align: justify;">The term on the right-hand side is known as the second spatial derivative and it is a little more complicated than the time derivative. Essentially it encapsulates the idea that the zombies move from areas of high density to areas of low density (i.e. they spread out). To aid your intuitive understanding of this term see Figure 1.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-atNmKHKXE2U/VLF-5SwQMLI/AAAAAAAAIYU/Ac6qM3x0hcE/s1600/Rate_of_change_of_zombies.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="308" src="https://1.bp.blogspot.com/-atNmKHKXE2U/VLF-5SwQMLI/AAAAAAAAIYU/Ac6qM3x0hcE/s1600/Rate_of_change_of_zombies.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. A typical initial zombie density graph. There are regions of high zombie activity, e.g. a graveyard, and there are regions of low zombie density, e.g. your local library.</td></tr></tbody></table>In the figure, there are initially more zombies on the left of the space than the right. Just before the peak in density the arrow (which is the tangent to the curve known as the spatial derivative, or $\partial Z/\partial x$ at this point) is pointing upwards. This means that as $x$ increases, so does the zombie density, $Z$. At this point</div><div style="text-align: justify;">\begin{equation}<br />\frac{\partial Z}{\partial x}=\textrm{rate of change of $Z$ as $x$ increases} > 0.<br />\end{equation}</div><div style="text-align: justify;">Just after the peak the arrow is pointing down thus, at this point,</div><div style="text-align: justify;"><div style="text-align: justify;">\begin{equation}<br />\frac{\partial Z}{\partial x}=\textrm{rate of change of $Z$ as $x$ increases} < 0.<br />\end{equation}</div></div><div style="text-align: justify;">Thus, at the peak, the spatial derivative is decreasing, because it goes from positive to negative. This, in turn, means that the second derivative is negative at the peak, because a negative second derivative means the first derivative is decreasing. This is analogous to statements made above about the sign of the time derivative and the growth, or decay, of the zombie population.<br /><br />In summary, our hand wavy argument tells us that at local maximum $\partial^2 Z/\partial x^2<0$. Using the equality of the diffusion equation, this means that at a local maximum the time derivative is negative and, thus, the density of zombies is decreasing. A similar argument shows that the population of zombies at a local minimum increases. In summary, we see that diffusion causes zombies to move from regions of high density to low density. <!--0--></div></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Finally, we mention the factor $D$, which is called the diffusion coefficient. $D$ is a positive constant that controls the rate of movement. Specifically, the larger $D$ is the faster the zombies spread out.</div><div style="text-align: justify;"><br />And with that you now understand one of the most important partial differential equations in all of mathematics. That wasn't too hard was it? Next time we discuss the solution of the diffusion equation including some simulations and Matlab code for you to try yourself.</div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-79639198821057934312015-11-14T09:00:00.000+00:002016-02-15T21:37:23.329+00:00Diffusion of the dead - The maths of zombie invasions. Part 2, Important questions you need to ask in a zombie outbreak.<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script><br /><div style="text-align: justify;">We begin modelling a zombie population in the same way that a mathematician would approach the modelling of any subject. We, first, consider what questions we want to ask, as the questions will direct which techniques we use to solve the problem. Secondly, we consider what has been done before and what factors were missing in order to achieve the answers we desire. This set of blog posts will consider three questions:<br /><ol><li>How long will it take for the zombies to reach us?</li><li>Can we stop the infection?</li><li>Can we survive?</li></ol>In order to answer these questions <a href="http://people.maths.ox.ac.uk/woolley/" target="_blank">I</a>, <a href="http://www.maths.ox.ac.uk/people/ruth.baker" target="_blank">Ruth Baker</a>, <a href="http://people.maths.ox.ac.uk/gaffney/" target="_blank">Eamonn Gaffney</a> and <a href="https://people.maths.ox.ac.uk/maini/" target="_blank">Philip Maini</a> focused on the motion of the zombies as their speed and directionality would have huge effects on these three questions. Explicitly, we used a mathematical description of diffusion as a way to model the zombies motion. This was discussed in a <a href="http://laughmaths.blogspot.co.uk/2011/07/diffusing-zombies.html" target="_blank">previous post</a>, but I recap the main points here.</div><ul><li style="text-align: justify;">The original zombie infection article by <a href="http://mysite.science.uottawa.ca/rsmith43/" target="_blank">Robert Smith?</a> did not include zombie, or human movement.</li><li style="text-align: justify;">Zombies are well known for is their slow, shuffling, random motion. The end of <i>Dawn of the Dead</i> (shown in the YouTube clip below) gives some great footage of zombies just going about their daily business.</li><li style="text-align: justify;">This random motion is perfectly captured through the mathematics of diffusion.</li></ul><ul style="text-align: center;"></ul><div style="text-align: center;"><iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/WHix_Yp18d8" width="420"></iframe><br /></div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Of course, there is plenty of evidence to suggest that zombies are attracted to human beings, as they are the predator to our prey. However, as we will see, we are going to be over run on a time scale of minutes! Thus, although mathematicians can model directed motion, and chasing, these additional components complicate matters. Further, random motion leads to some nice simple scaling formulas that can be used to quickly calculate how long you approximately have left before you meet a zombie.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Another simplifying assumption that we make is that we can model the zombie (and human) populations as continuous quantities. Again, this is incorrect as zombies are discrete units (even if they are missing body parts). Since we are making an assumption we will create an error in our solution. But how big is this error? In particular, if the error in the assumption is smaller than the errors in our observable data set then we do not have to worry too much. The error introduced by this assumption is actually dependent on the size of the population we are considering. The more individuals you have, you more the population will act like a continuous quantity. Since there are a lot of corpses out there, we do not think this assumption is too bad.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div style="text-align: justify;">Note that we could model the motion of each zombie individually, however, the computing power needed by such a simulation is much larger than the continuum description, which can be solved completely analytically. This is particularly important in the case of the zombie apocalypse, where time spent coding a simulation, may be better spent scavenging.</div><br /><div style="text-align: justify;">These are the basic assumptions we made when modelling a zombie population. Although I have tried to justify them you may have reservations about their validity. That is the very nature of mathematical modelling; try the simplest thing, first, and compare it to data. If you reproduce the phenomena that you are interested in then you have done your job well. However, if there is a discrepancy between the data and your maths then you have to revisit your assumptions and adapt them to make them more realistic.</div><br /><div style="text-align: justify;">Next time we contend with the equations and model the motion of the zombie as a random walker.<!--0--><!--0--><!--0--></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-68419511838137170162015-10-31T09:00:00.000+00:002015-10-31T09:00:01.400+00:00Diffusion of the dead - The maths of zombie invasions. Part 1, For those who can't wait.<div style="text-align: justify;"><a href="http://laughmaths.blogspot.co.uk/2011/05/zombies.html" target="_blank">Many years ago</a> I posted a blog post about an academic article I had written about zombies. Finally, the article was published in <a href="http://www.press.uottawa.ca/mathematical-modelling-of-zombies" target="_blank"><i>Mathematical Modelling of Zombies</i></a>. The book is designed to be readable by anyone with an interest in mathematics. However, those with an numerical background will find that it pushes them further as it does not shy away from clearly displaying the mathematics, whilst explaining the methods behind the madness.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-YIsmnRLUhSg/Ta3unBKkMMI/AAAAAAAAHIc/_dRnvy79jEg/s1600/Zombie.gif" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://4.bp.blogspot.com/-YIsmnRLUhSg/Ta3unBKkMMI/AAAAAAAAHIc/_dRnvy79jEg/s1600/Zombie.gif" width="208" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">As always, thank you to Martin Berube<br />for the use of his zombie image.</td></tr></tbody></table>The articles range over a number of fields and are simply a means to dress up our everyday techniques in a way that is more palatable for a non-mathematical audience. Of course not all of you will want to shell out for the book. Thus, I've decided to essentially serialize the chapter in the next few posts, thus, we will be looking at all of the results of our paper and, hopefully, I'll be explaining the mathematics more clearly, so that any one is able to follow it. I may even throw in a matlab code or two, so that anyone is able to reproduce the results.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">For those of you who are just interested in a quick review, you can read <a href="http://www.thetimes.co.uk/tto/science/article4226409.ece" target="_blank">The Times article</a>, or my brief version on the <a href="https://www.maths.ox.ac.uk/node/13036" target="_blank">University of Oxford's Mathematical Institute website</a>. Alternatively, if you are too tired to read you can always watch, or listen to a recorded version from the <a href="http://www.blod.gr/lectures/Pages/viewlecture.aspx?LectureID=2003" target="_blank">Athens Science Festival</a>, <a href="https://soundcloud.com/university-of-cambridge/good-will-hunting-and-the" target="_blank">Cambridge Science Festival</a>, or on <a href="http://laughmaths.blogspot.co.uk/2012/06/zombies-on-radio.html" target="_blank">The Science of Fiction radio show</a>. Finally, you could always see me live, when I'm giving <a href="https://nineworlds.co.uk/2013/track/science" target="_blank">one</a> <a href="http://cambridge.skepticsinthepub.org/Event.aspx/1391/ThinkCon-2013" target="_blank">of</a> <a href="http://cambridge.skepticsinthepub.org/Event.aspx/858/Diffusion-of-the-dead" target="_blank">my</a> <a href="http://www.livmathssoc.org.uk/cgi-bin/sews.py?Event_20140306_PopularLecture" target="_blank">talks</a>.<br /><br />Next time, we will start at the beginning by modelling the zombie motion. </div><div style="text-align: justify;"><br /></div><br /><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><br /></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-41350226068894581672014-10-13T09:00:00.000+01:002014-10-13T10:05:27.018+01:00Prime Venn diagrams<div style="text-align: justify;">Last time I gave a rigorous proof that if a number, N, was composite then the N-set Venn diagram could not be rotationally symmetric. Further, as we have seen <a href="http://laughmaths.blogspot.com/2014/08/back-to-rotationally-symmetric-venn.html" target="_blank">previously</a>, the 2-, 3- and 5-set diagrams (reproduced below) do have rotational symmetric forms.</div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-1ifvBz4mX_w/U7Rl3vVwVCI/AAAAAAAAHbc/ob4lOO5Xbsg/s1600/2_vectorised_no_stroke.png" imageanchor="1"><img border="0" src="http://3.bp.blogspot.com/-1ifvBz4mX_w/U7Rl3vVwVCI/AAAAAAAAHbc/ob4lOO5Xbsg/s1600/2_vectorised_no_stroke.png" width="150" /></a><a href="http://2.bp.blogspot.com/-9yWaXyQk9xE/U7Rl3sHxfJI/AAAAAAAAHbo/NQZnOCEaax4/s1600/3_vectorised_no_stroke.png" imageanchor="1"><img border="0" src="http://2.bp.blogspot.com/-9yWaXyQk9xE/U7Rl3sHxfJI/AAAAAAAAHbo/NQZnOCEaax4/s1600/3_vectorised_no_stroke.png" width="150" /></a><a href="http://1.bp.blogspot.com/-_BUwTbLh8S4/U7Rl3rOFeUI/AAAAAAAAHbg/0C_5ASt4KN4/s1600/Vector_5.png" imageanchor="1"><img border="0" src="http://1.bp.blogspot.com/-_BUwTbLh8S4/U7Rl3rOFeUI/AAAAAAAAHbg/0C_5ASt4KN4/s1600/Vector_5.png" height="146" width="150" /></a> </div><div style="text-align: justify;">Surely, the evidence suggests that all Venn diagrams with prime numbers of sets have rotational symmetric forms, right?</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Well, of course, "suggestion" isn't good enough for mathematicians. We demand logical proof more rigorous than any other science. </div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Surprisingly, this question has only been laid to rest relatively recently. In fact, up until 1992 some people thought that a rotational form of the 7-set diagram did not exist at all. The 7-set rotationally symmetric diagram was first created by <a href="http://www.math.washington.edu/%7Egrunbaum/" target="_blank">Branko Grünbaum,</a> whilst he was actually trying to disprove its existence!<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-1F5opn3oyq4/U866ec3mIkI/AAAAAAAAHfY/BQtTbbEtV-0/s1600/7_vectorised_no_stroke.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-1F5opn3oyq4/U866ec3mIkI/AAAAAAAAHfY/BQtTbbEtV-0/s1600/7_vectorised_no_stroke.png" height="386" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">A 7-set rotational Venn diagram.</td></tr></tbody></table>There the problem stayed until 1999, when <a href="http://www.wku.edu/math/html/dept_head.html" target="_blank">Peter Hamburger</a> introduced a new idea of how to generate such diagrams [1]. Using his technique he pushed the bounds to 11 sets. Two examples of such diagrams can be found below. <br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-SisLGGO7KCM/VCrdx8izXeI/AAAAAAAAHj0/O2IkyC7BLe0/s1600/No_stroke_rounded_11.png" imageanchor="1"><img border="0" src="http://3.bp.blogspot.com/-SisLGGO7KCM/VCrdx8izXeI/AAAAAAAAHj0/O2IkyC7BLe0/s1600/No_stroke_rounded_11.png" height="390" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-iNbUzP_xl5M/VCravvB5sFI/AAAAAAAAHjg/ln5XgiRmG40/s1600/No_stroke_wavy_11.png" imageanchor="1"><img border="0" src="http://1.bp.blogspot.com/-iNbUzP_xl5M/VCravvB5sFI/AAAAAAAAHjg/ln5XgiRmG40/s1600/No_stroke_wavy_11.png" height="390" width="400" /></a></div></div><div style="text-align: justify;"></div><div style="text-align: justify;">Building on Hamburger's technique <a href="http://people.math.sc.edu/griggs/" target="_blank">Jerrold Griggs</a>, <a href="http://www4.ncsu.edu/~savage/" target="_blank">Carla Savage</a> and <a href="https://www.cs.purdue.edu/homes/ckillian/" target="_blank">Charles Killian</a> demonstrated that it was possible to produce rotationally symmetric Venn diagrams whenever the number of sets is prime [2]. Unfortunately, the proof of this claim is quite complex and far beyond my capabilities to convey in a simple and intuitive way. However, for those seeking more details, the reference can be found below.</div><div style="text-align: justify;"><br />So, the question was finally laid to rest. Or was it? As I <a href="http://laughmaths.blogspot.co.uk/2014/09/back-to-rotationally-symmetric-venn.html" target="_blank">originally stated</a> when we first started discussing rotationally symmetric diagrams, mathematicians love to abstract any property they can. Hence, once a problem has been solved a mathematician will try to solve the problem once again under heavier constraints.<br /><br />Thus, mathematicians are now looking for Venn diagrams that are "simple". A Venn diagram is <i>simple</i> if at all points there are at most two sets crossing each other. In the diagrams above the constructions are so complicated that at some points three or more sets cross each other at the same point.<br /><br />The question of existence and how to create a simple rotationally symmetric Venn diagram is still open. However, in 2012 Khalegh Mamakani and Frank Ruskey produced the first example of a simple symmetric 11-Venn diagram [11]. This has been reproduced below.<br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-VuWyB4o0b60/VDRHoif9w5I/AAAAAAAAHkI/So-lvq3OgIc/s1600/No_stroke_simple_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-VuWyB4o0b60/VDRHoif9w5I/AAAAAAAAHkI/So-lvq3OgIc/s1600/No_stroke_simple_11.png" height="400" width="396" /></a></div><div class="" style="clear: both; text-align: justify;">Zooming into the Venn diagram (below) we see the intricate details of all the curves passing through one another. Yet, by definition, we can be sure that there are only ever at most two sets crossing at each point.</div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-B8eU-bacvcw/VDRMuAn3WzI/AAAAAAAAHkY/b0qDDaM5xuQ/s1600/Simple_patch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-B8eU-bacvcw/VDRMuAn3WzI/AAAAAAAAHkY/b0qDDaM5xuQ/s1600/Simple_patch.png" height="133" width="400" /></a></div><br />As we have reached the edges of our current knowledge we come to the end of my posts regarding rotationally symmetric Venn diagrams. I hope you have enjoyed learning about these beautiful diagrams just as much as I have enjoyed creating them.<br /><div style="text-align: center;">Next time, something completely different!</div><div style="text-align: center;">________________________________________________________________</div><div style="text-align: center;">________________________________________</div><br />[1] Doodles and Doilies, Non-Simple Symmetric Venn Diagrams. Peter Hamburger.<br />[2] Venn Diagrams and Symmetric Chain Decompositions in the Boolean Lattice. Jerrold Griggs, Charles E. Killian, Carla D. Savage.<br />[3] A New Rose: The First Simple Symmetric 11-Venn Diagram. Khalegh Mamakani and Frank Ruskey.</div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com2tag:blogger.com,1999:blog-6258038688403228659.post-16721573237860750902014-09-22T09:00:00.001+01:002014-09-23T09:37:21.690+01:00Primes, composites and rotationally symmetric Venn diagrams<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script><br /><div style="text-align: justify;"><div style="text-align: justify;">Last time I boldly stated that if a Venn diagram is made up of $N$ sets, where $N$ is a composite number, i.e. not prime [1], then the Venn diagram can never be rotationally symmetric.<br /><br />Before we prove the statement we first define the "rank" of the section in a Venn diagram.<br /><br /><b>The rank of a section is the number of sets, which the section is a part of.</b><br /><br /><a href="http://3.bp.blogspot.com/-0ag48s6wpPw/U7gP0ujqOCI/AAAAAAAAHeg/iPBTM60LqjY/s1600/2_numbered.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://3.bp.blogspot.com/-0ag48s6wpPw/U7gP0ujqOCI/AAAAAAAAHeg/iPBTM60LqjY/s1600/2_numbered.png" height="194" width="200" /></a>For example, in the 2-set Venn diagram, the region outside of the circles has rank zero, because any point out there is in neither set. The sections on the extreme left and right of the circles each have rank 1, because they are a member of the either the right or left sets only. Finally, the overlapping region in the center has rank 2, because this section belongs to both sets.<br /><br />Using this definition we can now head towards proving the initial statement. We do this by combining three smaller proofs concerning a general $N$-set Venn diagram. Explicitly, we</div><ol style="text-align: justify;"><li>count how many sections there are of each rank;</li><li>show that in a rotationally symmetric Venn diagram these ranks must be divisible by $N$;</li><li>prove that the ranks are divisible by $N$ if and only if $N$ is prime.</li></ol><div style="text-align: justify;">Without further delay the three theorems and proofs can be found below.</div><div style="text-align: justify;"><br /><b><i>Theorem 1</i></b><br />Suppose $k$ is an integer where $0\leq k\leq N$ then in an $N$-set Venn diagram there are <br />\begin{equation} <br />\frac{N!}{k!(N-k)!},<br />\end{equation}<br />sections of rank $k$ [2]. <br /><br /><i><b>Proof 1</b></i> <br />In order to help our intuition in counting the sections of a given rank we consider the 1-, 2-, 3-, 4-set Venn diagrams and summarise their details in the table below.<br /><br /><table style="border-collapse: collapse; border-spacing: 0; margin: 0px auto;"><tbody><tr><th colspan="2" rowspan="2" style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; font-weight: normal; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /><b>Number of</b><br /><b>sections of</b><br /><b>each rank</b></th><th colspan="5" style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; font-weight: normal; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>Rank</b></th><th colspan="2" rowspan="7" style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; font-weight: normal; overflow: hidden; padding: 10px 5px; word-break: normal;"><img src="http://2.bp.blogspot.com/-C324BYblj_s/U7gP0sY0AHI/AAAAAAAAHeM/ucbaLj9a-74/s1600/1_numbered.png" width="120" /><img src="http://3.bp.blogspot.com/-0ag48s6wpPw/U7gP0ujqOCI/AAAAAAAAHeg/iPBTM60LqjY/s1600/2_numbered.png" width="120" /><br /><img src="http://4.bp.blogspot.com/-S3D9DSEyHnA/U7gP0wobVhI/AAAAAAAAHeU/yrKzzeeXXOw/s1600/3_numbered.png" width="120" /><img src="http://1.bp.blogspot.com/-DZYf8bJabb0/U7gUGpXbrVI/AAAAAAAAHes/nl_xhxbP8Nw/s1600/4_numbered.png" width="120" /></th></tr><tr><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>0</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>1</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>2</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>3</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>4</b></td></tr><tr><td rowspan="5" style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>Venn</b><br /><b>diagram</b><br /><b>size</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>0 sets</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td></tr><tr><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>1 set</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td></tr><tr><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>2 sets</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">2</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td></tr><tr><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>3 sets</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">3</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">3</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><br /></td></tr><tr><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;"><b>4 sets</b></td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">4</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">6</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">4</td><td style="border-style: solid; border-width: 1px; font-family: Arial, sans-serif; font-size: 14px; overflow: hidden; padding: 10px 5px; text-align: center; word-break: normal;">1</td></tr></tbody></table><br />The pattern of numbers within the table maybe familiar to you, as it is the famous <a href="http://en.wikipedia.org/wiki/Pascal%27s_triangle" target="_blank">Pascal's triangle</a>. We may have expected these numbers to appear in this formation, because the numbers in Pascal's triangle represent exactly the quantity we are trying to calculate. Namely, the $(k+1)^{th}$ number in the $(N+1)^{th}$ row of Pascal's triangle tells us how many ways there are of choosing $k$ objects from $N$ objects. Note that we need to use the $(k+1)^{th}$ number and not the $k^{th}$ number, because the first number of each row deals with the trivial section, which is in none of the sets. Similarly, we use $(N+1)^{th}$ row and not the $N^{th}$ row because the first row deals the trivial Venn diagram of 0 sets.<br /><br />To cement this idea, suppose we have three objects {A,B,C}. How many different ways are there of choosing two objects from these three (under the assumption that ordering doesn't matter)? Explicitly, there are three ways, {A,B}, {B,C} and {A,C}. This is exactly the answer we get from Pascal's triangle if we look at the third number on the fourth row. Because of this identification we normally call the numbers $N$ choose $k$, or, $_NC_k$, for short.<br /><br />There are many ways to calculate the coefficients of Pascal's triangle. The quickest way is to use the formula [3]<br />\begin{equation}<br />_NC_k= \frac{N!}{k!(N-k)!}.<br />\end{equation}<br /><br /><i><b>Theorem 2</b></i><br />If an $N$-set Venn diagram is rotationally symmetric the number of section of a given rank $k$, where $0\leq k\leq N$, must be divisible by $N$.<br /><br /><i><b>Proof 2</b></i><br /><a href="http://4.bp.blogspot.com/-bIZQ7kdebGQ/U8EVTRY3ZWI/AAAAAAAAHfE/g1qQoSwSfjg/s1600/3_angled_sectors.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://4.bp.blogspot.com/-bIZQ7kdebGQ/U8EVTRY3ZWI/AAAAAAAAHfE/g1qQoSwSfjg/s1600/3_angled_sectors.png" height="194" width="200" /></a>By definition, an $N$-set Venn diagram is rotationally symmetric if it has $N$ orders of rotational symmetry. This means that if we find the rotational center of the diagram and split the diagram into equal sectors of $2\pi/N$ radians (or $360/N$ degrees) each sector should "look" identical. For example, have a look at the 3-set Venn diagram which has been split into thirds. Each third contains sections with exactly the same rank.</div><div style="text-align: justify;">We deduce that the total sum of sections with rank $k$ (where $0\leq k\leq N$ [4]) must be divisible by $N$. Suppose it wasn't true, we would not be able to divide the sections of rank $k$ into $N$ identical parts and therefore our diagram could not have $N$ identical sectors, suggesting that the diagram wasn't rotationally symmetric. In order to avert this contradiction we conclude that $N$ divides the total number of sections with rank $k$ for all values of $k$, where $0\leq k\leq N$.<br /><div style="text-align: justify;"> <i><b> </b></i></div><div style="text-align: justify;"><i><b>Theorem 3</b></i></div><div style="text-align: justify;">\begin{equation}<br />_NC_k= \frac{N!}{k!(N-k)!},<br />\end{equation}<br />is divisible by $N$ for all values of $k$ such that $0\leq k\leq N$ if and only if $N$ is prime.<br /><br /><i><b>Proof 3</b></i><br /><div style="text-align: justify;"><div style="text-align: justify;">Firstly, suppose $N$ is prime. Consider $N$ choose $k$, which has a simplified form<br />\begin{equation}<br />_NC_k= \frac{N(N-1)(N-2)\dots(N-k+1)}{k(k-1)(k-1)\dots1},<br />\end{equation}<br />for all $0\leq k\leq N$. Note $_NC_k$ is an integer and that the top of the fraction has a prime factor $N$, which does not cancel down because there is no factor of $N$ on the bottom. Thus, $_NC_k$ contains a factor of $N$, and so it is divisible by $N$.<br /><br />Conversely, suppose $N$ is composite. Choose $p$ to be the smallest prime factor of $N$, and define $n=N/p$ then<br />\begin{equation}<br />_NC_p=\frac{N(N-1)(N-2)\dots(N-p+1)}{p!}=\frac{n(N-1)(N-2)\dots(N-p+1)}{(p-1)!}.<br />\end{equation}<br />Now if $_NC_p$ is divisible by $N$ the top of the fraction must contain a factor of $N$ and therefore a factor of $p$. Because $N=np$ and we already have a factor of $n$ on the top then $p$ must divide at least one of the factors of $N-1$, $N-2$, ..., or $N-p+1$. But $p$ divides $N$, so it does not divide any of these other factors. Once again the only way out of the contradiction is to conclude that when $N$ is composite $N$ does not divide $_NC_p$ and, hence, $_NC_k$ is divisible by $N$ for all values of $k$ such that $0\leq k\leq N$ if and only if $N$ is prime.<br /><br />Putting these three theorems together we generate the proof we were originally searching for.<br /><br /><i><b>Theorem 4</b></i><br />If $N$ is a composite number then the $N$-set Venn diagram is not rotationally symmetric.<br /><br /><i><b>Proof 4</b></i> <br /><ul><li>By proof 1 the total number of sections of a given rank is given by $_NC_k$.</li><li>By proof 2 if a Venn diagram is rotationally symmetric the total number of sections of a given rank must be divisible by $N$ for all $0\leq k\leq N$ .</li><li>We conclude that if a Venn diagram is rotationally symmetric $_NC_k$ must be divisible by $N$ for all $0\leq k\leq N$.</li><li>Finally, by proof 3, $_NC_k$ is be divisible by $N$ for all $0\leq k\leq N$ if and only if $N$ is prime.</li></ul>Therefore, if $N$ is composite $N$ does not divide $_NC_k$ for all $0\leq k\leq N$ and, hence, the Venn diagram cannot be rotationally symmetric.</div><div style="text-align: center;"><div style="text-align: justify;"><br />We finish this week's post by noting that, although we have proven that an $N$-set Venn diagram is not rotationally symmetric when $N$ is composite, this does not mean that it is rotationally symmetric if $N$ is prime. We will discuss more about this point next time.</div>________________________________________________________________</div><div style="text-align: center;">________________________________________</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">[1] For those of you who may have forgotten the definition: a positive number is prime if and only if it was only two distinct integer factors, which are itself and 1. For example 2, 3, 5 and 7 are all prime numbers. However, 9 is not a prime number, because 3$\times$3=9 and the factors of 9 are 1, 3 and 9. Any number that is not prime (other than 1) is called composite. The number 1 is a special case as it is neither prime nor composite. It is called a unit.<br /><br />[2] The exclamation mark symbol $n!$ represents the product of all positive integers up to and including $n$, i.e. $n!=1\times2\times3\times...\times n$. <br /><br />[3] Ok, I've slightly cheated and not proven that this formula does give us the numbers that we want. However, if you want to read more about the connection between the Pascal numbers and the formula see this <a href="http://mathforum.org/library/drmath/view/56492.html" target="_blank">post</a>.<br /><br />[4] Note that we have excluded $k=0$ and $k=N$, why is that?</div><br /></div></div><br /></div></div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com1tag:blogger.com,1999:blog-6258038688403228659.post-91751379840373570652014-09-08T09:00:00.000+01:002014-09-15T10:58:57.091+01:00Back to rotationally symmetric Venn diagrams<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"> MathJax.Hub.Config({ HTML: ["input/TeX","output/HTML-CSS"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js"], equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true }, "HTML-CSS": { availableFonts: ["TeX"], linebreaks: { automatic: true } } }); </script><br /><div style="text-align: justify;"><span id="goog_287299821"></span><span id="goog_287299822"></span>Over the past few posts we have been considering Venn diagrams, their <a href="http://laughmaths.blogspot.com/2014/04/rotationally-symmetric-venn-diagrams.html" target="_blank">properties</a> and <a href="http://laughmaths.blogspot.com/2014/07/more-venn-diagrams-with-logic-puzzle.html" target="_blank">their</a> <a href="http://laughmaths.blogspot.com/2014/08/dangerous-caterpillars-solution.html" target="_blank">uses</a>. Although we are usually more concerned with what goes into the Venn diagram sets than their actual shape mathematicians like to abstract everything they can get their hands upon. Thus, they very quickly stopped thinking about the things inside the sets and simply began to consider the properties of the diagrams themselves.<br /><br />An algorithm for creating a Venn diagram with any numbers of sets was quickly found. For example, <a href="http://en.wikipedia.org/wiki/A._W._F._Edwards" target="_blank">Anthony Edwards</a> showed that a diagram containing any number of sets can be constructed using symmetric wavy curves as shown in the animation below.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-JS94H8Sd4fE/U7Riy7i1LhI/AAAAAAAAHaw/bQDfp4ysBkc/s1600/Construction.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-JS94H8Sd4fE/U7Riy7i1LhI/AAAAAAAAHaw/bQDfp4ysBkc/s1600/Construction.gif" height="251" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Anthony Edwards' construction of a diagram which will contain the intersection of all sets. However, it is not a true Venn diagram as, although all possible intersections do appear, some of the intersections appear more than once.</td></tr></tbody></table>Having solved the basic problem of showing existence further constraints where added to the problem. In particular, mathematicians asked whether it was possible to create rotationally symmetric Venn diagrams. To be honest, I have no idea why rotational symmetry is so highly prized, other than it quite aesthetically pleasing.<br /><br />A rotationally symmetric Venn diagram of $N$ sets is simply a Venn diagram that can be rotated around its centre, such that after $360/N$ degrees (or $2\pi/N$ radians) the graph looks the same as it did initially. With small numbers of sets rotationally symmetric Venn diagrams are fairly easy to produce. For example below are $N=$2, 3 and 5 set diagrams.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-1ifvBz4mX_w/U7Rl3vVwVCI/AAAAAAAAHbc/ob4lOO5Xbsg/s1600/2_vectorised_no_stroke.png" imageanchor="1"><img border="0" src="http://3.bp.blogspot.com/-1ifvBz4mX_w/U7Rl3vVwVCI/AAAAAAAAHbc/ob4lOO5Xbsg/s1600/2_vectorised_no_stroke.png" width="150" /></a><a href="http://2.bp.blogspot.com/-9yWaXyQk9xE/U7Rl3sHxfJI/AAAAAAAAHbo/NQZnOCEaax4/s1600/3_vectorised_no_stroke.png" imageanchor="1"><img border="0" src="http://2.bp.blogspot.com/-9yWaXyQk9xE/U7Rl3sHxfJI/AAAAAAAAHbo/NQZnOCEaax4/s1600/3_vectorised_no_stroke.png" width="150" /></a><a href="http://1.bp.blogspot.com/-_BUwTbLh8S4/U7Rl3rOFeUI/AAAAAAAAHbg/0C_5ASt4KN4/s1600/Vector_5.png" imageanchor="1"><img border="0" src="http://1.bp.blogspot.com/-_BUwTbLh8S4/U7Rl3rOFeUI/AAAAAAAAHbg/0C_5ASt4KN4/s1600/Vector_5.png" height="146" width="150" /></a></div>Unfortunately, we are unable to create a rotationally symmetric Venn diagram with 4 sets. As we have seen <a href="http://laughmaths.blogspot.com/2014/04/rotationally-symmetric-venn-diagrams.html" target="_blank">previously</a>, the 4 set diagram cannot be created using circles. Instead, ovals can be used, as seen below.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-egXMPf4xZQQ/U7RofgMkY7I/AAAAAAAAHbw/hkbcSaUKfsU/s1600/4_vectorised_no_stroke.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-egXMPf4xZQQ/U7RofgMkY7I/AAAAAAAAHbw/hkbcSaUKfsU/s1600/4_vectorised_no_stroke.png" height="194" width="200" /></a></div>Of course, just presenting one 4 set diagram that is not rotationally symmetric is not a proof that such a representation does not exist. Perhaps there is a 4 set Venn diagram with non-regular shaped sets that is rotationally symmetric? Fortunately, there is a simple proof that shows that only prime number set diagrams could possibly be rotationally symmetric. Next time I will reproduce the proof that for any composite number $N$ the accompanying $N$ set Venn diagram cannot be rotationally symmetric.</div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-14455239827308585962014-08-25T09:00:00.002+01:002014-09-19T09:25:54.055+01:00Dangerous caterpillars solution<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-VYymg0CYhLQ/U-dwmBPp1QI/AAAAAAAAHg4/-ufaEJZbTKA/s1600/All_caterpillars.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><span id="goog_1017631353"></span><span id="goog_1017631354"></span><img border="0" src="http://2.bp.blogspot.com/-VYymg0CYhLQ/U-dwmBPp1QI/AAAAAAAAHg4/-ufaEJZbTKA/s1600/All_caterpillars.png" height="200" width="123" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. The usual suspects.</td></tr></tbody></table><div style="text-align: justify;"><a href="http://laughmaths.blogspot.com/2014/07/more-venn-diagrams-with-logic-puzzle.html" target="_blank">Last time</a> I asked if we could work out which caterpillars from Figure 1 are safe based on the following rules:</div><ol style="text-align: justify;"><li>If a caterpillar has blue eyes or spots it is dangerous. If a caterpillar has both, we can't tell if it is dangerous.</li><li>All safe caterpillars have more than one of the following features: teeth, blue eyes, spots, or spikes. </li><li>Caterpillars with both teeth and spots are dangerous.</li></ol><div style="text-align: justify;">As I suggested Venn diagrams are expertly suited to this kind of puzzle. </div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">To solve the puzzle using Venn diagrams we, first, decide what our sets are going to be. In the clues there are 4 features that are discussed: teeth, blue eyes, spots and spikes. Thus, we construct a Venn diagram of these four qualities and insert the caterpillars to their appropriate spaces. This can be seen in Figure 2. Note that in this specific problem we have to use the full Venn diagram form of the four sets, rather than the Euler diagram that we discussed, <a href="http://laughmaths.blogspot.com/2014/04/rotationally-symmetric-venn-diagrams.html" target="_blank">previously</a>.</div><div style="text-align: justify;"></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-GKC3zAUyhp0/U-d1BdMjphI/AAAAAAAAHhE/QsN79Vn4h6s/s1600/Venn_caterpillars.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-GKC3zAUyhp0/U-d1BdMjphI/AAAAAAAAHhE/QsN79Vn4h6s/s1600/Venn_caterpillars.png" height="320" width="294" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 2. Separating the caterpillars into types.</td></tr></tbody></table><div style="text-align: justify;">Now that we have our diagram we use the clues to remove sections and restrict the safe caterpillar possibilities.<br /><br />The simplified Venn diagrams corresponding to each of the clues can be seen in Figure 3. For example, the first clue states that animals with blue eyes and spots (but, perhaps, not both) are dangerous. Thus, we remove the sections corresponding to the blue eyed caterpillars and the spots. However, the region over which they intersect is left, because we can't be sure if those caterpillars are dangerous or not.</div><div style="text-align: justify;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-wSNDpoaiB2E/U-d2md1-DhI/AAAAAAAAHhg/1kCbTKoJaOY/s1600/Venn_segments.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-wSNDpoaiB2E/U-d2md1-DhI/AAAAAAAAHhg/1kCbTKoJaOY/s1600/Venn_segments.png" height="150" /></a><a href="http://2.bp.blogspot.com/-oTSXC21An3c/U-d2mMZtaUI/AAAAAAAAHhc/pHHs2BzaMh0/s1600/Venn_segments_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-oTSXC21An3c/U-d2mMZtaUI/AAAAAAAAHhc/pHHs2BzaMh0/s1600/Venn_segments_2.png" height="150" /></a><a href="http://1.bp.blogspot.com/-VxNXqFXM9GU/U-d2mgRsHoI/AAAAAAAAHhk/pKSj9AKCSNs/s1600/Venn_segments_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-VxNXqFXM9GU/U-d2mgRsHoI/AAAAAAAAHhk/pKSj9AKCSNs/s1600/Venn_segments_3.png" height="150" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 3. Removing sections of the Venn diagram based on the clues. Left: the blanked out section corresponds to either having blue eyes or spots, but not both. Center: removing the sections with only one feature. Right: removing the section with teeth and spots.</td></tr></tbody></table></div>This process is carried out for all three clues. Finally, we put together only the sections that remain in all three diagrams in Figure 3 to get Figure 4.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-8MH75rS4L4w/U-d6HAQKnJI/AAAAAAAAHhs/GTRtnfA1MFM/s1600/Venn_caterpillars_solution.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://3.bp.blogspot.com/-8MH75rS4L4w/U-d6HAQKnJI/AAAAAAAAHhs/GTRtnfA1MFM/s1600/Venn_caterpillars_solution.png" height="320" width="315" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 4. Only one caterpillar left.</td></tr></tbody></table><div style="text-align: justify;"><a href="http://3.bp.blogspot.com/-7yZotD_ARlg/U-d7E6eeTlI/AAAAAAAAHh0/ukUJ9DbCwOA/s1600/Solution.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://3.bp.blogspot.com/-7yZotD_ARlg/U-d7E6eeTlI/AAAAAAAAHh0/ukUJ9DbCwOA/s1600/Solution.png" height="200" width="196" /></a>As you see will from Figure 4 there are only 3 sections of the Venn diagram left. These include two sections in the blue eyes and spots region. Because of rule 1, we cannot tell if those sections are safe, or not. Luckily, there are no caterpillars in these regions, so no risks need be taken. The only caterpillar left has both spikes and teeth... would you trust this guy?</div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com0tag:blogger.com,1999:blog-6258038688403228659.post-41322852920438683702014-08-11T09:00:00.001+01:002014-09-19T09:26:11.532+01:00More Venn diagrams with a logic puzzle<div style="text-align: justify;">A long time ago I <a href="http://laughmaths.blogspot.co.uk/2014/04/rotationally-symmetric-venn-diagrams.html" target="_blank">posted</a> about Venn and Euler diagrams and I have been meaning to get back to this subject. Coincidentally, it was John Venn's 180th birthday on the 4th of August, <a href="https://www.google.com/doodles/john-venns-180th-birthday" target="_blank">celebrated by Google</a>, so I cannot think of a better time to revive the subject.<br /><br />Firstly, we recall the all important definition: a Venn diagram contains every single possible intersection between all combinations of the sets. This can be compared with an Euler diagram, which only shows the intersections in which you are interested. An illustration of this can be found in Figure 1.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-Uxtl6uc_f-c/UvwDrjmMWUI/AAAAAAAAHPw/vB8GZKJzxxU/s1600/image011.png" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://1.bp.blogspot.com/-Uxtl6uc_f-c/UvwDrjmMWUI/AAAAAAAAHPw/vB8GZKJzxxU/s1600/image011.png" height="197" width="200" /></a><a href="http://4.bp.blogspot.com/-UUN1LAnYPRo/UvwDsYLZBXI/AAAAAAAAHQA/PL3bWdhhoAY/s1600/image013.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-UUN1LAnYPRo/UvwDsYLZBXI/AAAAAAAAHQA/PL3bWdhhoAY/s1600/image013.png" height="163" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Figure 1. Using four shapes a basic Euler diagram is not the same as a Venn diagram. The right shows an Euler diagram whereas the left is a Venn diagram, as it contains all possible combinations of the four groups.</td></tr></tbody></table><div style="text-align: justify;">As I mentioned, these are great ways of seeing logical information quickly and clearly. To show how useful they are let us consider the following puzzle.<br /><div style="text-align: center;">________________________________________________________________</div><div style="text-align: center;">________________________________________</div>I have a collection of 8 caterpillars that have a range of different features. They can all be seen in Figure 2, below.<br /><div style="text-align: center;"><a href="http://2.bp.blogspot.com/-VYymg0CYhLQ/U-dwmBPp1QI/AAAAAAAAHg4/-ufaEJZbTKA/s1600/All_caterpillars.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-VYymg0CYhLQ/U-dwmBPp1QI/AAAAAAAAHg4/-ufaEJZbTKA/s1600/All_caterpillars.png" width="500" /></a></div>Unfortunately, some of them are dangerous to touch. Equally troubling is that I do not know which the dangerous ones are! All I know is that the following three statements are true:<br /><ol><li>If a caterpillar has blue eyes or spots it is dangerous. If a caterpillar has both, we can't tell if it is dangerous.</li><li>All safe caterpillars have more than one of the following features: teeth, blue eyes, spots, or spikes. </li><li>Caterpillars with both teeth and spots are dangerous.</li></ol>Using just these facts, which caterpillars are safe to touch?<br /><br />Now of course there are many ways to solve this little puzzle, but Venn diagrams offer a really nifty way of seeing the solution simply and completely. Have a go at solving it and I'll post the solution next time.</div>Thomas Woolleyhttp://www.blogger.com/profile/07895826981003298350noreply@blogger.com18