plus.maths.org
https://plus.maths.org/content
enWhere's the maths in beer?
https://plus.maths.org/content/wheres-maths-beer
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/beer_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Chris Budd</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div style="float:right; margin-left: 1em;"><iframe width="400" height="225" src="https://www.youtube.com/embed/GplDsuHnVXI?rel=0" frameborder="0" allowfullscreen></iframe>
<p style="width: 400px; font-size: small; color: purple;">This article is based on one of Budd's Gresham College lectures. Watch the full lecture here, and see <a href="http://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world">here</a> to find out more about this free, public lecture series.</p>
</div><p>There's actually quite a lot of maths in beer. To convince you of this, here are three beer-related maths stories.</p>
<h3>Blowing bubbles</h3>
<!-- <div class="leftimage" style="max-width: 235px;"><img src="/content/sites/plus.maths.org/files/articles/2017/Budd/bitter2.jpg" alt="Bitter" width="235" height="283" />
<p>A nice pint of bitter.</p>
</div>
-->
<p>Let's start with the head. One of the key features of a pint of Guinness is the wonderful creamy foam head. This is in contrast to the much smaller head that we find on a pint of bitter beer. For the manufacturers of beer to get both types of head involves a lot of science and maths. The foam in the head of a pint of bitter is made of networks of bubbles of carbon dioxide separated by thin films of the beer itself, with surface tension giving the strength to the thin walls surrounding each bubble. The walls of these bubbles move as a result of surface tension, with smaller bubbles moving faster as they have a higher curvature. This results in the smaller bubbles being "eaten" by the larger ones in a process called <em><a href="https://en.wikipedia.org/wiki/Ostwald_ripening">Oswald ripening</a></em>. Basically small bubbles shrink and large bubbles grow, leading to a coarse foam made up of large bubbles only. Eventually the liquid drains from the large bubbles and they pop, and the foam disappears.</p>
<p> The remarkable mathematician <a href="http://www-history.mcs.st-andrews.ac.uk/Biographies/Von_Neumann.html">John von Neumann</a>, who was (amongst many other achievements) responsible for the development of the modern electronic computer, devised an equation in 1952 which explained the patterns that we see in such cellular structures in two dimensions. In 2007 this was extended to three dimensions by a group of mathematicians in Princeton interested in the applications of maths to beer. It's a hard life!</p>
<h3>Why the widget?</h3>
<div class="leftimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2017/Budd/guinness.jpg" alt="Guinness" width="250" height="370" />
<p>Guinness has a lovely creamy head. Image: <a href="https://commons.wikimedia.org/wiki/File:A_pint_of_Guinness.jpg">PDPhoto.org</a>.</p>
</div>
<p>Another group of mathematicians, appropriately from Limerick in Ireland, have made a study of the foam on a pint of Guinness. This is much creamier than the foam on a pint of bitter. The reason is that whilst the foam on bitter is made up of air bubbles, the foam on a pint of Guinness is made up of nitrogen. This gas diffuses a hundred times slower in air than carbon dioxide, meaning that the bubbles are smaller and the foam is much more stable and creamier. </p>
<p>The nitrogen needs to be introduced into the Guinness when it is poured. In a pub this is achieved by having a separate pipe, linked to a nitrogen supply, which supplies the nitrogen at the same time as the beer is served from the barrel.</p><p>For many years Guinness in cans did not have a head. However, this problem was solved by the introduction of a <em>widget</em>, which is a nitrogen container in the can, and which releases precisely the right amount of nitrogen when the can is opened. This process must be very carefully controlled, and a lot of careful design work is required to make the widget work well. The whole process was analysed by (it appears!) the whole of the applied mathematics department at Limerick, and described in the charmingly titled paper <em><a href="http://ulsites.ul.ie/macsi/sites/default/files/macsi_the_initiation_of_guinness.pdf">The initiation of Guinness</a></em>. Notably the same group has now done a complete analysis of the mathematics of making coffee.</p>
<h3>Why statisticians couldn't organise a piss up in a brewery</h3>
<p>In the year 2005 the <a href="https://www.britishscienceassociation.org/british-science-festival">British Science Festival</a> came to Dublin. At that time I had the honour of being the president of the maths section of the British Science Association, which was organising the festival, and had the responsibility of devising a mathematics programme for the event. </p>
<div class="rightimage" style="max-width: 256px;"><img src="/content/sites/plus.maths.org/files/articles/2017/Budd/William_Sealy_Gosset.jpg" alt="Bitter" width="256" height="330" />
<p>William Sealy Gosset (1876 - 1937).</p>
</div>
<!-- Image in public domain -->
<p>One of our plans was to have a mathematics visit to the Guinness Breweries in Dublin. Obviously there are many reasons why we might want to visit a brewery, but why should mathematicians want to go there, and why should they want to go to Guinness? The answer to both of these questions lies in the person of <a href="http://www-history.mcs.st-andrews.ac.uk/Biographies/Gosset.html">William Gosset</a> (pictured) who was the chief statistician at Guinness in the first part of the 20th Century. </p><p>Guinness was in many ways ahead of its time in the production and quality control that it applied to its product (as well as the way that it was advertised). Gosset was employed in part to ensure that the Guinness stout was of a consistent quality. This was done by making careful measurements of a sample of the product and using these to assess both its general quality and its variability. This was, at the time, a difficult problem in statistics. To solve it Gosset devised a new statistical test to compare the measurements. This worked extremely well and made a very real difference to improving the quality of Guinness stout. Gosset felt it important to publish this test, but was reluctant to disclose his identity and that of his employer. Instead it was published in the journal <em><a href="https://academic.oup.com/biomet">Biometrika</a></em>, in 1908, under the anonymous name of "Student". Ever since this test has been known as <em><a href="https://en.wikipedia.org/wiki/Student%27s_t-test">Student's t-test</a></em>. It plays a central role in testing and maintaining the quality of food and drink all over the world.</p>
<p>So, let's get back to the British Science Festival. Having decided to go to Guinness we set up a sub-committee to organise the trip to it during the science festival, in part to celebrate the invention there of the t-test and its contribution to modern statistics. Clearly such a trip should include a reception and a drink of a pint of Guinness. Unfortunately, through no one's fault, it wasn't possible in the end to do this. It was only after the event that we realised we could be accused of being unable to organise a piss up in a brewery.</p>
<h3>Three mathematicians walk into a pub...</h3>
<p>I will finish this article with a bad story/joke about mathematicians and drinking. You have to concentrate a bit to get the joke.</p><p>
Three mathematicians go into a pub and the bar tender asks, "Does anyone want a lager"?</p><p>
The first mathematician pauses for thought, and then says, "I don't know".
The second mathematician likewise says, "I don't know".
Finally the third mathematician says, "No!"
</p><p>
So the bar tender ask, "Does everyone want a bitter then?"</p><p>
The first mathematician pauses for thought, and then again says, "I don't know".
The second mathematician likewise says, "I don't know".
Finally the third mathematician says, "Yes!"</p><p>
So they all have a bitter.</p>
<hr/>
<h3>About this article</h3>
<p>This article is adapted from one of Budd's Gresham College lectures. See <a href="http://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world">here</a> to find out more about this free, public lecture series.</p>
<div class="rightimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2015/Mornington/chris.jpg" alt="Chris Budd" width="250" height="153" />
<p>Chris Budd.</p>
</div>
<p>Chris Budd OBE is Professor of Applied Mathematics at the University of Bath, Vice President of the <a href="http://www.ima.org.uk/">Institute of Mathematics and its Applications</a>, Chair of Mathematics for the <a href="http://www.rigb.org/registrationControl?action=home">Royal Institution</a> and an honorary fellow of the <a href="http://www.britishscienceassociation.org/">British Science Association</a>. He is particularly interested in applying mathematics to the real world and promoting the public understanding of mathematics.</p><p>
He has co-written the popular mathematics book <em><a href="/content/mathematics-galore">Mathematics Galore!</a></em>, published by Oxford University Press, with C. Sangwin, and features in the book <em><a href="https://global.oup.com/academic/product/50-visions-of-mathematics-9780198701811?cc=gb&lang=en&">50 Visions of Mathematics</a></em> ed. Sam Parc.
</p></div></div></div>Tue, 16 May 2017 14:40:52 +0000Marianne6823 at https://plus.maths.org/contenthttps://plus.maths.org/content/wheres-maths-beer#commentsMaths in a minute: Some basic linear programming
https://plus.maths.org/content/maths-minute-some-linear-programming
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/pineaple_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="rightimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2017/linear_programming/pineapple.jpg" alt="Pineapple" width="350" height="240" />
<p>How many of these should you plant?</p>
</div>
<p>Imagine you have an allotment and you want to make some money by planting and selling two crops, cocoa and pineapples (you're lucky to live in a warm country). You obviously want to maximise your return, but you're constrained by how much money you can spend up front and by the size of your plot. How much of each crop should you plant?</p>
<p>This sounds like one of those headachey word problems we all know from school, but it turns out that it has a neat graphical solution. Let’s write <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> for the amount of cocoa you’ll plant and <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> for the amount of pineapples. Suppose that when you harvest the crops you’ll get a unit return of <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0003.png" alt="$\pounds 3$" style="vertical-align:0px;
width:20px;
height:12px" class="math gen" /> on the cocoa, and of <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0004.png" alt="$\pounds 2$" style="vertical-align:0px;
width:20px;
height:12px" class="math gen" /> on the pineapples. Your total return <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0005.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> will therefore be </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0006.png" alt="\begin{equation} P=3x+2y.\end{equation}" style="width:94px;
height:15px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>1</span>)</span></td>
</tr>
</table><p>That’s the amount you’d like to maximise. However, planting also comes with a cost. The unit cost of cocoa seed is <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0004.png" alt="$\pounds 2$" style="vertical-align:0px;
width:20px;
height:12px" class="math gen" />, and of pineapple seed is <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0007.png" alt="$\pounds 1$" style="vertical-align:0px;
width:19px;
height:12px" class="math gen" />, and there’s an upfront cost <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0008.png" alt="$\pounds 4$" style="vertical-align:0px;
width:20px;
height:12px" class="math gen" /> just to use the field in the first place. The total cost <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0009.png" alt="$C$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> of growing the two crops is given by </p><table id="a0000000003" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0010.png" alt="\begin{equation} C=2x+y+4.\end{equation}" style="width:115px;
height:15px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>2</span>)</span></td>
</tr>
</table><p> You only have <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0011.png" alt="$\pounds 50$" style="vertical-align:0px;
width:28px;
height:13px" class="math gen" /> in the bank, so you need the total cost to be less than that: </p><table id="a0000000004" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0012.png" alt="\begin{equation} C=2x+y+4 \leq 50.\end{equation}" style="width:153px;
height:16px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>3</span>)</span></td>
</tr>
</table><p>The size of the field also provides a constraint. If the amount of space taken up by a unit cocoa is <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0013.png" alt="$1m^2$" style="vertical-align:0px;
width:28px;
height:14px" class="math gen" /> and by a unit pineapple is <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0013.png" alt="$1m^2$" style="vertical-align:0px;
width:28px;
height:14px" class="math gen" /> then the total amount of space <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0014.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" /> taken up in the field by our two crops is given by </p><table id="a0000000005" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0015.png" alt="\begin{equation} S = x+y.\end{equation}" style="width:75px;
height:14px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>4</span>)</span></td>
</tr>
</table><p>The size of your plot is <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0016.png" alt="$30m^2$" style="vertical-align:0px;
width:37px;
height:14px" class="math gen" />, so <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0014.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" /> cannot exceed this value: </p><table id="a0000000006" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0017.png" alt="\begin{equation} S = x+y \leq 30\end{equation}" style="width:109px;
height:15px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>5</span>)</span></td>
</tr>
</table><p>It’s also clear that <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> both need to be greater than or equal to <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0018.png" alt="$0$" style="vertical-align:0px;
width:8px;
height:12px" class="math gen" /> (you can’t plant a negative amount of crops). </p><p>Here’s how to solve the problem. First, consider a Cartesian coordinate system with the <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" />-axis representing cocoa and the <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" />-axis representing pineapples. Rewriting inequality 3 and turning it into an equation gives <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0019.png" alt="$y=-2x+46,$" style="vertical-align:-3px;
width:102px;
height:15px" class="math gen" /> the equation of a line. The points <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0020.png" alt="$(x,y)$" style="vertical-align:-4px;
width:36px;
height:18px" class="math gen" /> satisfying inequality 3 are those points that lie underneath that line. Similarly, the points that lie underneath the line <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0021.png" alt="$y=-x+30$" style="vertical-align:-3px;
width:89px;
height:15px" class="math gen" /> satisfy inequality 5. </p><p>Remembering that both <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> need to be greater than or equal to <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0018.png" alt="$0$" style="vertical-align:0px;
width:8px;
height:12px" class="math gen" />, we see that the shaded line in the graph below gives us the points in the <img src="/MI/d242765b2254ed1b1ce3fb1e19064239/images/img-0020.png" alt="$(x,y)$" style="vertical-align:-4px;
width:36px;
height:18px" class="math gen" />-plane satisfying all constraints. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2017/linear_programming/shaded.png" alt="Graphs" width="518" height="358" />
<p style="max-width: 518px;">The red line represents <em>y = -2x + 46</em> and the blue line represents <em>y = -x + 30</em>. The values of <em>x</em> and <em>y</em> are both positive in the top right quadrant of the coordinate system. Hence, the shaded region contains all the values of <em>x</em> and <em>y</em> that satisfy all the constraints. </p>
</div>
<!-- Image made by MF -->
<p>Now what about maximising <img src="/MI/bbf4506f138ef1108b08dbf9df61a1a9/images/img-0001.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />? Rewriting equation 1 we see that <img src="/MI/bbf4506f138ef1108b08dbf9df61a1a9/images/img-0002.png" alt="$y=-3/2x+P/2.$" style="vertical-align:-4px;
width:130px;
height:16px" class="math gen" /> Whatever the value of <img src="/MI/bbf4506f138ef1108b08dbf9df61a1a9/images/img-0001.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />, this equation gives a line of slope <img src="/MI/bbf4506f138ef1108b08dbf9df61a1a9/images/img-0003.png" alt="$-3/2$" style="vertical-align:-4px;
width:36px;
height:16px" class="math gen" />. By increasing the value of <img src="/MI/bbf4506f138ef1108b08dbf9df61a1a9/images/img-0004.png" alt="$P/2$" style="vertical-align:-4px;
width:28px;
height:16px" class="math gen" /> from <img src="/MI/bbf4506f138ef1108b08dbf9df61a1a9/images/img-0005.png" alt="$0$" style="vertical-align:0px;
width:8px;
height:12px" class="math gen" /> upwards (use the slider in the <a href="https://www.geogebra.org">Geogebra</a> applet below), we see that the last contact point between the line <img src="/MI/0dcda878a6c749473a2f964e35568ef7/images/img-0001.png" alt="$y=-3/2x+P/2$" style="vertical-align:-4px;
width:126px;
height:16px" class="math gen" /> and the shaded region occurs at the corner point <img src="/MI/0dcda878a6c749473a2f964e35568ef7/images/img-0002.png" alt="$A=(16,14)$" style="vertical-align:-4px;
width:86px;
height:18px" class="math gen" /> of the shaded region. That's the point for which <img src="/MI/0dcda878a6c749473a2f964e35568ef7/images/img-0003.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> is maximised but the constraints are still satisfied. Hence you should plant <img src="/MI/0dcda878a6c749473a2f964e35568ef7/images/img-0004.png" alt="$x=16$" style="vertical-align:0px;
width:47px;
height:12px" class="math gen" /> units of cocoa and <img src="/MI/0dcda878a6c749473a2f964e35568ef7/images/img-0005.png" alt="$y=14$" style="vertical-align:-3px;
width:47px;
height:15px" class="math gen" /> units of pineapples. Your return will be <img src="/MI/0dcda878a6c749473a2f964e35568ef7/images/img-0006.png" alt="$P = 3 \times 16 + 2 \times 14 = 76.$" style="vertical-align:-1px;
width:188px;
height:14px" class="math gen" /></p>
<iframe scrolling="no" src="https://www.geogebra.org/material/iframe/id/HfyAzBaR/width/518/height/359/border/888888/smb/false/stb/false/stbh/false/ai/false/asb/false/sri/true/rc/false/ld/false/sdz/true/ctl/false" width="518px" height="359px" style="border:0px;"> </iframe>
<p>Even if the green line, representing the relationship of <img src="/MI/057ca0c5e43e693f9f32b7dd86cd97ea/images/img-0001.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> and <img src="/MI/057ca0c5e43e693f9f32b7dd86cd97ea/images/img-0002.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/057ca0c5e43e693f9f32b7dd86cd97ea/images/img-0003.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" />, had a different slope, you can convince yourself that <img src="/MI/057ca0c5e43e693f9f32b7dd86cd97ea/images/img-0001.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> is always maximised at one of the corner points of the shaded region. This is true whatever the numbers in equations 1, 2 and 4. As long as these equations are <em>linear</em> (ie don’t involve any powers of <img src="/MI/057ca0c5e43e693f9f32b7dd86cd97ea/images/img-0002.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/057ca0c5e43e693f9f32b7dd86cd97ea/images/img-0003.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> or their products), you can solve the problem by finding a shaded region using the constraints, and then working out for which of its corner points <img src="/MI/057ca0c5e43e693f9f32b7dd86cd97ea/images/img-0001.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> is largest. </p>
<p>Our method is an example of a <em>linear programming problem</em>, which involves optimising a quantity subject to restraints, when all the relationships are linear. The method can be extended to work with more constraints (this simply gives you a shaded region possibly bounded by more lines) and also to work when more than two variables (crops) are involved. The extended method is called the <em><a href="http://mathworld.wolfram.com/SimplexMethod.html">simplex algorithm</a></em>. It was invented in 1947 by <a href="https://en.wikipedia.org/wiki/George_Dantzig">George Dantzig</a> and has a huge range of applications.</p></div></div></div>Wed, 26 Apr 2017 12:24:44 +0000Marianne6820 at https://plus.maths.org/contenthttps://plus.maths.org/content/maths-minute-some-linear-programming#commentsHow much maths can you eat?
https://plus.maths.org/content/how-much-maths-can-you-eat
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/food_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Chris Budd</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div style="float:right; margin-left: 1em;"><iframe width="400" height="225" src="https://www.youtube.com/embed/GplDsuHnVXI?rel=0" frameborder="0" allowfullscreen></iframe>
<p style="width: 400px; font-size: small; color: purple;">This article is based on one of Budd's Gresham College lectures. Watch the full lecture here, and see <a href="http://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world">here</a> to find out more about this free, public lecture series.</p>
</div>
<p>A universal constant amongst all animals is the need to eat. The food and drink industry is the largest in the world and in order to feed the growing population of the world we will have to grow more food in the next fifty years than we have in the last 10,000 years.</p>
<p>What does maths have to do with this? The simple answer is "a lot". In this article we'll look at some applications of maths to food, from its role in growing food to its role in transporting and storing food. </p>
<h3>It all starts in a field</h3>
<p>Most of our food production, whether it is crops or animals, involves a field on a farm. This may appear to be a low technology area, but a lot of science and mathematics is involved in making a field effective for food production. Indeed there are sophisticated computer packages which are used to simulate the behaviour of a field and to advise farmers on the best way to manage the fields on their farm. The basic questions that need to be addressed by a farmer growing crops are: what crops to grow and how much, how much to irrigate them, what pesticides to use, how to react to the weather and when to harvest. </p>
<p>The first of these questions involves the mathematics of <em>optimisation</em>. It is useful to give an idea of how this might work with a simple field (or maybe several fields) on a farm. Let's consider the example of a farm somewhere in the tropics in which we want to grow two crops, such as cocoa and pineapples. If <img src="/MI/afbc767704c14d861bf573fc653f0f3e/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> is the amount of cocoa we plan to grow in one year, and <img src="/MI/afbc767704c14d861bf573fc653f0f3e/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> is the amount of pineapples, the unit cost of cocoa seed is <img src="/MI/afbc767704c14d861bf573fc653f0f3e/images/img-0003.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" />, and of pineapple seed is <img src="/MI/afbc767704c14d861bf573fc653f0f3e/images/img-0004.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />, then the total cost <img src="/MI/afbc767704c14d861bf573fc653f0f3e/images/img-0005.png" alt="$C$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> of growing the two crops is given by</p>
<table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0001.png" alt="\begin{equation} C = ax+by+d,\end{equation}" style="width:123px;
height:14px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>1</span>)</span></td>
</tr>
</table><p>where <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0002.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> is the upfront cost we must take on just to use the field in the first place (such as labour, irrigation, pesticides etc). Similarly, when we harvest the crops we might expect a unit return of <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0003.png" alt="$e$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" /> on the cocoa, and of <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0004.png" alt="$f$" style="vertical-align:-3px;
width:8px;
height:14px" class="math gen" /> on the pineapples. Thus we might make a profit <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0005.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> given by </p><table id="a0000000003" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0006.png" alt="\begin{equation} P=ex+fy.\end{equation}" style="width:95px;
height:14px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>2</span>)</span></td>
</tr>
</table><p>Finally, if the amount of space taken up by a unit cocoa is <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0007.png" alt="$g$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> and by a unit pineapple is <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0008.png" alt="$h$" style="vertical-align:0px;
width:8px;
height:11px" class="math gen" /> then the total amount of space <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0009.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" /> taken up in the field by our two crops is given by </p><table id="a0000000004" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0010.png" alt="\begin{equation} S = g x + h y. \end{equation}" style="width:93px;
height:14px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>3</span>)</span></td>
</tr>
</table><p>The problem faced by our farmer is then as follows. They want to grow the right amount of cocoa <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0011.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and pineapples <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0012.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> which in turn maximises their profit <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0005.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. But at the same time they must also want to keep the cost <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0013.png" alt="$C$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> below some maximum <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0014.png" alt="$C_{max}$" style="vertical-align:-2px;
width:38px;
height:13px" class="math gen" />, (their total available cash) and require that the space taken up is less than the total area of the field given by <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0015.png" alt="$S_{max}$" style="vertical-align:-2px;
width:35px;
height:13px" class="math gen" />. These two conditions are called <em>constraints</em>. In mathematical terms the problem of maximising the profit becomes: </p><p><em>Maximise <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0005.png" alt="$P$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> over all positive values of <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0011.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0012.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> subject to <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0016.png" alt="$C< C_{max}$" style="vertical-align:-2px;
width:73px;
height:13px" class="math gen" /> and <img src="/MI/3cec11b04b08ed40a99fb1fead5c4cd9/images/img-0017.png" alt="$S<S_{max}.$" style="vertical-align:-2px;
width:73px;
height:13px" class="math gen" /></em> </p>
<p>This problem is a special example of a constrained optimisation problem called a <em>linear programming problem</em>. The problem can be solved using a graph. We show an example in which the optimal combination of <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> is highlighted. The horizontal axis represents <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and the vertical axis represents <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" />. The shaded area is bounded by the lines defined by the constraints and contains values of <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0003.png" alt="$(x,y)$" style="vertical-align:-4px;
width:36px;
height:18px" class="math gen" /> that satisfy the constraints. The optimal combination of <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> occurs at the corner point <img src="/MI/47eaacb831e345bec71069e54d717c64/images/img-0004.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> of the shaded figure. Perhaps you can work out for yourself why this is the case — if not see <a href="/content/maths-minute-some-linear-programming">here</a> to find out more.</p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2017/linear_programming/shaded2.png" alt="Graphs" width="518" height="358" />
<p style="max-width: 518px;">The problem with <em>a=e=g=h</em>=1, <em>b=f</em>=2, and <em>c</em>=4. The optimal combination of <em>x</em> and <em>y</em>
occurs at the corner point <em>A</em> of the shaded region. </p>
</div>
<!-- Image made by MF -->
<p>Generally a farmer will have many more crops, or even animals, to consider, as well as many more constraints, such as labour costs, irrigation costs, and the resistance of each crop to disease and the impact of the weather. This leads to more complex problems similar in form to the one above, but involving many more variables and constraints. A key feature of our problem is that it is <em>linear</em>: we see <img src="/MI/2ce5ae37dbb465295939b28230ffb880/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/2ce5ae37dbb465295939b28230ffb880/images/img-0002.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> and their multiples in it, but not more complicated functions such as <img src="/MI/2ce5ae37dbb465295939b28230ffb880/images/img-0003.png" alt="$x^2$" style="vertical-align:0px;
width:15px;
height:14px" class="math gen" />, <img src="/MI/2ce5ae37dbb465295939b28230ffb880/images/img-0004.png" alt="$x^3$" style="vertical-align:0px;
width:15px;
height:14px" class="math gen" /> or <img src="/MI/2ce5ae37dbb465295939b28230ffb880/images/img-0005.png" alt="$x\times y$" style="vertical-align:-3px;
width:37px;
height:11px" class="math gen" />. Remarkably, despite their apparent complexity, there is an algorithm to solve all such linear problems. It is called the <em>simplex algorithm</em>, and its invention in 1947 by <a href="https://en.wikipedia.org/wiki/George_Dantzig">George Dantzig</a> was one of the key developments in mathematical algorithms in the 20th century. Today countless optimisation problems are solved by the simplex algorithm, from problems in farming to some of the most complex problems in economics and scheduling. </p>
<h3>Feeding the world</h3>
<div class="rightimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2017/Budd/field.jpg" alt="Field" width="350" height="234" />
<p>How much food do we need to feed the world?</p>
</div>
<!-- Image from fotolia -->
<p>Mathematicians have also considered the growth of crops for the whole of the world. This is important if we are to grow enough to feed the whole of the world's population. The problem of how things grow was studied in a classic text by <a href="http://www-history.mcs.st-and.ac.uk/Biographies/Thompson_DArcy.html">D'Arcy Thompson</a>. If a relatively small amount <em>c</em> of a crop is planted and allowed to grow year on year (during which it will be pollinated), then the rate of growth of the crop is proportional to the amount of the crop. We can express this as a <em>differential equation</em> of the form</p>
<table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0001.png" alt="\[ \frac{dc}{dt} = a(t)c. \]" style="width:78px;
height:33px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>The derivative <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0002.png" alt="$\frac{dc}{dt}$" style="vertical-align:-5px;
width:13px;
height:20px" class="math gen" /> of the crop <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0003.png" alt="$c$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" /> with respect to time <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0004.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> measures the rate of change of <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0003.png" alt="$c$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" /> over time, that is, the growth of <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0003.png" alt="$c$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" /> over time. The constant <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0005.png" alt="$a(t)$" style="vertical-align:-4px;
width:26px;
height:18px" class="math gen" /> is a <em>constant of proportionality</em> which describes just how the growth of <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0003.png" alt="$c$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" /> depends on <img src="/MI/ab5ed62fad83aca55f4617d54a027b91/images/img-0003.png" alt="$c$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" />. It will depend upon factors such as the weather and the effects of irrigation and of pests. </p>
<p>This equation works well if <img src="/MI/e6a220e1bf880618b94560275bc50baa/images/img-0001.png" alt="$c$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" /> is small, but as it gets larger, more resources are needed to grow the crop, and its rate of growth slows down. Also, when <img src="/MI/e6a220e1bf880618b94560275bc50baa/images/img-0001.png" alt="$c$" style="vertical-align:0px;
width:7px;
height:7px" class="math gen" /> is large enough we will want to harvest it at a rate proportional to the amount of the crop. These effects are well captured by the so-called <em>logistic equation</em> introduced by <a href="http://www-history.mcs.st-and.ac.uk/Biographies/Verhulst.html">Pierre François Verhulst</a> in 1838:</p>
<table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/4149ed944880b8e9ece96e19ccdbaf86/images/img-0001.png" alt="\[ \frac{dc}{dt} = a(t)c(k-c) - b(t)c. \]" style="width:181px;
height:33px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>Here <img src="/MI/4149ed944880b8e9ece96e19ccdbaf86/images/img-0002.png" alt="$k$" style="vertical-align:0px;
width:8px;
height:11px" class="math gen" /> is an upper bound for the amount of crops and <img src="/MI/4149ed944880b8e9ece96e19ccdbaf86/images/img-0003.png" alt="$b(t)$" style="vertical-align:-4px;
width:24px;
height:18px" class="math gen" /> is the harvesting rate. This equation can be solved to find the amount <img src="/MI/4149ed944880b8e9ece96e19ccdbaf86/images/img-0004.png" alt="$c(t)$" style="vertical-align:-4px;
width:24px;
height:18px" class="math gen" /> of the crop at time <img src="/MI/4149ed944880b8e9ece96e19ccdbaf86/images/img-0005.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />, and can give a very useful prediction of its value if different harvesting strategies are employed. </p>
<p>An equation similar to the one above was originally devised by <a href="https://en.wikipedia.org/wiki/Thomas_Robert_Malthus">Thomas Robert Malthus</a> to study population growth in human populations. Such is the power of applied mathematics that the logistic equation can be used in many other areas related to the supply of food. One of these is fishing, where now <img src="/MI/db52fda7db26615f972ef8c6a1ec3870/images/img-0001.png" alt="$ c(t)$" style="vertical-align:-4px;
width:24px;
height:18px" class="math gen" /> gives the numbers of a fish species, and <img src="/MI/db52fda7db26615f972ef8c6a1ec3870/images/img-0002.png" alt="$b(t)$" style="vertical-align:-4px;
width:24px;
height:18px" class="math gen" /> a strategy for catching the fish. Extra terms need to be added to allow for the movement of fish into and out of the fishing area, but the basic equation remains the same. Models for the populations of fish allow managements of fisheries to determine what level of fishing is possible to ensure that there is a sustainable fish population. </p>
<h3>This isn't all</h3>
<p>Once food has been produced (or caught) it needs to be delivered to where it can be eaten. This often involves cooling or freezing the food. The equations of <em><a href="https://en.wikipedia.org/wiki/Thermodynamics">thermodynamics</a></em>, which describe the behaviour of materials when they are being heated or cooled, are hugely important in this context. Using these equations we can potentially save huge amounts of food going to waste, and allow it to be stored and transported safely.</p>
<p>Transporting food to its intended destinations also introduces huge logistical challenges, made worse by the fact that different foods have different shapes, weights and times of delivery. These problems are very hard to solve. A classical example is the <em>travelling salesman problem</em>, which aims to find the optimal route for a salesman to deliver his goods. You can find out more about this problem, and the huge difficulties in solving it, in <a href="/content/travelling-salesman">this</a> <em>Plus</em> article. </p><p>
Another example is the knapsack problem which tries to find the best way to fit a set of differently shaped objects into a knapsack, with direct application to the problem of fitting food into a freezer lorry or a transport plane (find out more in <a href="/content/maths-minute-knapsack-problem">this</a> <em>Plus</em> article). Only relatively recently have efficient (probabilistic based) algorithms been developed to provide an answer. These algorithms are now making a huge difference to the way that goods are transported all over the world. </p>
<div class="leftimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2017/Budd/fish.jpg" alt="Fish" width="350" height="193" />
<p>Is it fresh?</p>
</div>
<!-- Image from fotolia -->
<p>But how do you know a food is fresh when you receive it in a shop?
One of the more interesting problems that I have had to work on was
finding out how fresh a fish is. We often think that we can test the freshness of a foodstuff by its smell, but often food only starts to smell when it is far from being fresh. So, with fish, a method for testing it had to be used which did not (only) rely on its smell. The method we came up with was to look at the <em>elasticity</em> of the skin, and the <em>viscosity</em> (stickiness) of the flesh beneath the skin. Both are closely related to the freshness: our own skin becomes less elastic as we grow older. In order to test this method we produced a mechanical probe to test the elasticity of the fish skin. This probe bounced a small needle off the skin, and then monitored its response. By formulating a mathematical equation for the expected motion of the skin, and comparing this with the measurements of the probe, it was possible to deduce both the elasticity and the viscosity of the flesh, and hence the freshness of the fish. </p>
<p>As we've seen, there's plenty of maths involved in delivering food to our plates. But what about the drink in our glasses? That's what we will look at in <a href="/content/wheres-maths-beer">this</a> article.</p>
<hr/>
<h3>About this article</h3>
<p>This article is adapted from one of Budd's Gresham College lectures. See <a href="http://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world">here</a> to find out more about this free, public lecture series.</p>
<div class="rightimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2015/Mornington/chris.jpg" alt="Chris Budd" width="250" height="153" />
<p>Chris Budd.</p>
</div>
<p>Chris Budd OBE is Professor of Applied Mathematics at the University of Bath, Vice President of the <a href="http://www.ima.org.uk/">Institute of Mathematics and its Applications</a>, Chair of Mathematics for the <a href="http://www.rigb.org/registrationControl?action=home">Royal Institution</a> and an honorary fellow of the <a href="http://www.britishscienceassociation.org/">British Science Association</a>. He is particularly interested in applying mathematics to the real world and promoting the public understanding of mathematics.</p><p>
He has co-written the popular mathematics book <em><a href="/content/mathematics-galore">Mathematics Galore!</a></em>, published by Oxford University Press, with C. Sangwin, and features in the book <em><a href="https://global.oup.com/academic/product/50-visions-of-mathematics-9780198701811?cc=gb&lang=en&">50 Visions of Mathematics</a></em> ed. Sam Parc.
</p></div></div></div>Wed, 26 Apr 2017 10:04:33 +0000Marianne6819 at https://plus.maths.org/contenthttps://plus.maths.org/content/how-much-maths-can-you-eat#commentsWomen of Mathematics: Carola-Bibiane Schönlieb
https://plus.maths.org/content/node/6830
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/Carola_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>We talk to Carola-Bibiane Schönlieb about her life and work as a Professor of Applied Mathematics at the University of Cambridge. The interview accompanies the <em>Women of Mathematics</em> photo exhibition which is currently being shown in Cambridge. To see a transcript and video of the interview, meet other female mathematicians, and find out more about the exhibition, see <a href="/content/women">here</a>.</p></div></div></div><div class="field field-name-field-remote-encl field-type-file field-label-inline clearfix clearfix"><div class="field-label">Podcast download link: </div><div class="field-items"><div class="field-item even"><span class="file"><img class="file-icon" alt="Audio icon" title="audio/mpeg" src="/content/modules/file/icons/audio-x-generic.png" /> <a href="https://plus.maths.org/content/sites/plus.maths.org/files/Carola_podcast.mp3" type="audio/mpeg; length=11346222">Carola_podcast.mp3</a></span></div></div></div>Tue, 25 Apr 2017 16:51:14 +0000Marianne6830 at https://plus.maths.org/contenthttps://plus.maths.org/content/node/6830#commentsWomen of Mathematics: Holly Krieger
https://plus.maths.org/content/node/6829
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/Holly_icon_1.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>We talk to Holly Krieger about her life and work as a Lecturer of Mathematics at the University of Cambridge. The interview accompanies the <em>Women of Mathematics</em> photo exhibition which is currently being shown in Cambridge. To see a transcript and video of the interview, meet other female mathematicians, and find out more about the exhibition, see <a href="/content/women">here</a>.</p></div></div></div><div class="field field-name-field-remote-encl field-type-file field-label-inline clearfix clearfix"><div class="field-label">Podcast download link: </div><div class="field-items"><div class="field-item even"><span class="file"><img class="file-icon" alt="Audio icon" title="audio/mpeg" src="/content/modules/file/icons/audio-x-generic.png" /> <a href="https://plus.maths.org/content/sites/plus.maths.org/files/Holly_podcast_0.mp3" type="audio/mpeg; length=7975817">Holly_podcast.mp3</a></span></div></div></div>Tue, 25 Apr 2017 16:46:37 +0000Marianne6829 at https://plus.maths.org/contenthttps://plus.maths.org/content/node/6829#commentsWomen of Mathematics: Julia Gog
https://plus.maths.org/content/node/6828
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/Julia_icon_0.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>We talk to Julia Gog about her life and work as a Reader in Mathematical Biology at the University of Cambridge. The interview accompanies the <em>Women of Mathematics</em> photo exhibition which is currently being shown in Cambridge. To see a transcript and video of the interview, meet other female mathematicians, and find out more about the exhibition, see <a href="/content/women">here</a>.</p></div></div></div><div class="field field-name-field-remote-encl field-type-file field-label-inline clearfix clearfix"><div class="field-label">Podcast download link: </div><div class="field-items"><div class="field-item even"><span class="file"><img class="file-icon" alt="Audio icon" title="audio/mpeg" src="/content/modules/file/icons/audio-x-generic.png" /> <a href="https://plus.maths.org/content/sites/plus.maths.org/files/Julia_podcast.mp3" type="audio/mpeg; length=7421701">Julia_podcast.mp3</a></span></div></div></div>Tue, 25 Apr 2017 16:39:47 +0000Marianne6828 at https://plus.maths.org/contenthttps://plus.maths.org/content/node/6828#commentsWomen of Mathematics: Anne-Christine Davis
https://plus.maths.org/content/node/6827
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/Anne_icon_0.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>We talk to Anne-Christine Davis about her life and work as a Professor of Theoretical Physics at the University of Cambridge. The interview accompanies the <em>Women of Mathematics</em> photo exhibition which is currently being shown in Cambridge. To see a transcript and video of the interview, meet other female mathematicians, and find out more about the exhibition, see <a href="/content/women">here</a>.</p></div></div></div><div class="field field-name-field-remote-encl field-type-file field-label-inline clearfix clearfix"><div class="field-label">Podcast download link: </div><div class="field-items"><div class="field-item even"><span class="file"><img class="file-icon" alt="Audio icon" title="audio/mpeg" src="/content/modules/file/icons/audio-x-generic.png" /> <a href="https://plus.maths.org/content/sites/plus.maths.org/files/Anne_podcast.mp3" type="audio/mpeg; length=14606736">Anne_podcast.mp3</a></span></div></div></div>Tue, 25 Apr 2017 16:34:09 +0000Marianne6827 at https://plus.maths.org/contenthttps://plus.maths.org/content/node/6827#commentsWomen of Mathematics: Nilanjana Datta
https://plus.maths.org/content/node/6826
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/Nilanjana_icon_1.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>We talk to Nilanjana Datta about her life and work as a Lecturer in Quantum Information Theory at the University of Cambridge. The interview accompanies the <em>Women of Mathematics</em> photo exhibition which is currently being shown in Cambridge. To see a transcript and video of the interview, meet other female mathematicians, and find out more about the exhibition, see <a href="/content/women">here</a>.</p></div></div></div><div class="field field-name-field-remote-encl field-type-file field-label-inline clearfix clearfix"><div class="field-label">Podcast download link: </div><div class="field-items"><div class="field-item even"><span class="file"><img class="file-icon" alt="Audio icon" title="audio/mpeg" src="/content/modules/file/icons/audio-x-generic.png" /> <a href="https://plus.maths.org/content/sites/plus.maths.org/files/packages/2017/Women/Nilanjana_podcast.mp3" type="audio/mpeg; length=8802571">Nilanjana_podcast.mp3</a></span></div></div></div>Tue, 25 Apr 2017 16:29:37 +0000Marianne6826 at https://plus.maths.org/contenthttps://plus.maths.org/content/node/6826#commentsWomen of Mathematics: Natalia Berloff
https://plus.maths.org/content/node/6824
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/Natalia_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>We talk to Natalia Berloff about her life and work as a Professor of Applied Mathematics at the University of Cambridge. The interview accompanies the <em>Women of Mathematics</em> photo exhibition which is currently being shown in Cambridge. To see a transcript and video of the interview, meet other female mathematicians, and find out more about the exhibition, see <a href="/content/women">here</a>.</p></div></div></div><div class="field field-name-field-remote-encl field-type-file field-label-inline clearfix clearfix"><div class="field-label">Podcast download link: </div><div class="field-items"><div class="field-item even"><span class="file"><img class="file-icon" alt="Audio icon" title="audio/mpeg" src="/content/modules/file/icons/audio-x-generic.png" /> <a href="https://plus.maths.org/content/sites/plus.maths.org/files/Natalia_podcast.mp3" type="audio/mpeg; length=6151435">Natalia_podcast.mp3</a></span></div></div></div>Tue, 25 Apr 2017 16:13:31 +0000Marianne6824 at https://plus.maths.org/contenthttps://plus.maths.org/content/node/6824#commentsMaths in a minute: The knapsack problem
https://plus.maths.org/content/maths-minute-knapsack-problem
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/knapsack_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>Imagine you're going to see your friends on the other side of the world and you've bought them so many presents, you can't fit them all into your luggage — some have to be left behind. You decide to pack a combination of presents that is highest in value to your friends, but doesn't exceed the weight limit imposed by the airline. How do you find that combination?</p>
<div class="rightimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2017/knapsack/knapsack.png" alt="Knapsack" width="350" height="303" />
<p>The knapsack problem. Image: <a href="https://commons.wikimedia.org/wiki/File:Knapsack.svg">Dake</a>, <a href="https://creativecommons.org/licenses/by-sa/2.5/deed.en">CC BY-SA 2.5</a>.</p>
</div>
<p>The obvious thing to do is to try all possible combinations, calculate their value and weight, and pick one that is below the weight limit but maximises value. This is fine if there are only a few items, but gets hard when many are involved: there are simply too many combinations to try out and your plane is leaving soon. The question is whether there is an algorithm
— a recipe for finding a solution — which works for any number of items and doesn't take too long even when many items are involved. </p>
<p>This kind of problem interests computer scientists because creating algorithms, mechanical procedures a computer can execute, is what computer science is all about. Computer scientists have a way of measuring the complexity of a problem in terms of how fast the time it takes to solve the problem grows with the size of the input. For example, suppose the size of the input (the number of presents) is <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0001.png" alt="$n.$" style="vertical-align:0px;
width:14px;
height:7px" class="math gen" /> If the time it takes to solve the problem grows roughly like <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0002.png" alt="$n,$" style="vertical-align:-3px;
width:14px;
height:10px" class="math gen" /> or <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0003.png" alt="$n^2,$" style="vertical-align:-3px;
width:21px;
height:17px" class="math gen" /> or <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0004.png" alt="$n^3,$" style="vertical-align:-3px;
width:21px;
height:17px" class="math gen" /> or <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0005.png" alt="$n^ k$" style="vertical-align:0px;
width:17px;
height:14px" class="math gen" /> for any other natural number <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0006.png" alt="$k,$" style="vertical-align:-3px;
width:12px;
height:14px" class="math gen" /> as <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0007.png" alt="$n$" style="vertical-align:0px;
width:10px;
height:7px" class="math gen" /> gets larger, then the problem is deemed "easy". The number <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0005.png" alt="$n^ k$" style="vertical-align:0px;
width:17px;
height:14px" class="math gen" /> could still grow fast with <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0007.png" alt="$n$" style="vertical-align:0px;
width:10px;
height:7px" class="math gen" /> if <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0008.png" alt="$k$" style="vertical-align:0px;
width:8px;
height:11px" class="math gen" /> is large, of course, but this kind of <em>polynomial growth</em>, as it's called, is nowhere near as explosive as exponential growth, described, for example, by the expression <img src="/MI/83273fded2de608f3b76089e7f10d053/images/img-0009.png" alt="$2^ n$" style="vertical-align:0px;
width:16px;
height:12px" class="math gen" />. (See <a href="https://en.wikipedia.org/wiki/Time_complexity#Polynomial_time">here</a> for a more technical definition of so-called <em>polynomial time algorithms</em>.)</p>
<p>
So does such a polynomial time algorithm exist for our problem?
There's a slightly easier <em>decision version</em> of the problem. Rather than asking "what is the optimal combination of presents that stays under the weight limit but maximises value", we ask "given a particular value <em>V</em>, is there a combination that stays within the weight limit and has a value exceeding <em>V</em>?". This problem has the nice property that given a potential solution (a combination of presents) it's very easy to check that it's correct: you only need to add up the weights and values, and you can do that in polynomial time. However, whether or not a polynomial time algorithm exists to solve the problem from scratch isn't known. This puts the decision version of the knapsack problem into a class of problems called <em>NP</em>. </p>
<div class="leftimage" style="max-width: 400px;"><img src="/content/sites/plus.maths.org/files/articles/2017/knapsack/NP_0.png" alt="Complexity classes" width="400" height="250" />
<p>The hierarchy of complexity classes. The class <em>P</em> contains all those problems that can be solved in polynomial time. The class <em>NP</em> contains all those problem for which a potential solution can be checked in polynomial time. It's possible that the <em>NP</em> class is equal to the <em>P</em> class, though nobody knows if it is, which is why there are two diagrams: one for the case that <em>P=NP</em> and one for the case that it isn't. <em>NP</em> complete problems are within the <em>NP</em> class, but particularly hard, and <em>NP</em> hard problems are at least as hard as <em>NP</em> complete ones.
Image: <a href="https://commons.wikimedia.org/wiki/File:P_np_np-complete_np-hard.svg">Behnam Esfahbod,</a> <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA 3.0</a>.</p>
</div>
<p> The decision version of the knapsack problem also has another amazing feature: if you do find a polynomial time algorithm to solve the decision knapsack problem, then you'll be able to derive a polynomial time algorithm for <em>every</em> problem in the <em>NP</em> class, which would be quite something. This feature means that the decision version of the knapsack problem belongs to a subclass of <em>NP</em> problems called <em>NP complete</em>. (Confused? See the diagram on the left.)</p>
<p>And the full knapsack problem? Well, it's at least as hard to solve as the decision version of the problem.
Even given a potential solution, there's no known polynomial time algorithm that can tell you whether the solution is correct. But as for the decision version of the problem, if you do find a polynomial time algorithm to solve the full knapsack problem, then you'll be able to derive a polynomial time algorithm for every problem in the <em>NP</em> class.
The knapsack problem is a so-called <em>NP hard</em> problem. </p>
<p>
Optimisation problems such as the knapsack problem crop up in real life all the time. Luckily there are efficient algorithms which, while not necessarily giving you the optimal solution, can give you a very good approximation for it. Thus, the question of whether the knapsack problem can be solved in polynomial time isn't that interesting for practical purposes, rather it's something that enthuses theorists. When it comes to delivering presents, however, our advice is not to buy too many in the first place.</p>
<p>
You can find out more about the complexity of algorithms on <em><a href="/content/tags/complexity">Plus</a></em>.
</p></div></div></div>Thu, 13 Apr 2017 13:31:10 +0000Marianne6822 at https://plus.maths.org/contenthttps://plus.maths.org/content/maths-minute-knapsack-problem#comments