COVID-19 has changed a lot of things. All around the world Governments are restricting citizens movements to combat the spread of COVID-19 the deadly new Coronavirus. In Ireland the Government has restricted non-essential travel to a 2km zone around your place of residence. It turns out that’s an interesting choice, why so? Well we need […]

The post Covid-19. Why Irelands 2km isolation zone is interesting. appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>COVID-19 has changed a lot of things. All around the world Governments are restricting citizens movements to combat the spread of COVID-19 the deadly new Coronavirus. In Ireland the Government has restricted non-essential travel to a 2km zone around your place of residence. It turns out that’s an interesting choice, why so? Well we need to bring two things (circumference and area) together to find our answer. And then there’s a nice surprise at the end (unless you figure it out before you get there).

Being confined to 2km can seem restrictive, but if you look at the image above it isn’t just 2km. So how far can you walk while keeping within the 2km limit? How much space is that? Think of your residence as the center of a circle with a radius of 2km, and you can go anywhere within that circle. The length of the red circle (**circumference**) above is given by twice the radius times Pi. What? Well let’s do it on the blackboard.

\( circumference = 2 * radius * \pi \)

We know the radius is 2km – as set by the Government:

\( circumference = 2 * 2 * \pi \)

**\( circumference = 4 \pi \)**

We know that \(\pi\) = 3.14

\( circumference = 4 * 3.14 = 12.6 km \)

So even with a mere 2km you can walk around a 12.6km circumference. And remember you have to walk 2km to get from the center (your residence) to the edge of the circle, and then another 2km to get back to the center afterwards. **That gives a total of 16.6km, a lot more than a 2km limit might at first suggest.**

Be careful though, the further you walk/run/cycle the greater the chance you’ll encounter COVID-19 #StayHomeStaySafe

Walking around the edge of the circle (circumference) brings us from 2km to 12.6km (or 16.6km if you include getting to and from the circumference) which is a nice return. But what about the area within the circle, how much space do we actually have to move around in? Let’s illustrate the space we’re talking about with a super hi-tech graphic:

So how do we calculate the area of the circle in red above? Well \(\pi r^2\) will give us the area, where r is the radius = 2km.

\(area = \pi r^2\)

We substitute, r = 2

\(area = \pi * 2 ^ 2\)

\(area = 4\pi\)

We know that \(\pi\) = 3.14

\(area = 3.14 * 4\)

\(area = 12.6 km^2\)

Once again our 2km has given us a bigger number, this time an area of \(12.6km^2\). Did you notice anything about the circumference and the area? That’s right, they both have a magnitude of 12.6 (or \(4\pi\). INTERESTING. Yes, to a STEM NERD this is INTERESTING and necessitates more thinking, yum yum :7

Be careful though, the further you walk/run/cycle the greater the chance you’ll encounter COVID-19 #StayHomeStaySafe

Questions questions questions. Is this coincidence or consequence? What else, if anything, gives this same result where circumference equals area? Is there an infinite series of radius sizes, a finite set, or is this a unique situation? We can test these questions by using values other than 2km, we can try 3km, 4km, 4.5km etc. But then we’d have to try every possible number and that will take forever. So we can use algebra, yep yum yum algebra. After all, why test tons of numbers when you can just use one single letter, the letter ‘r’ in this case.

The trick here is to know that we are looking for the situation(s) where the circumference and the area will give us the same value (like the 12.6 we just saw above for r = 2). That means the magnitude of the circumference should equal the area. (Aside: Let’s leave the dimensions out for now and just deal with scalars, we’ll talk about the dimensions shortly). Ok. so let’s go back to the blackboard.

We want to find out when: circumference = area

\(2 \pi r = \pi r^2\)

We divide both sides by \(\pi\):

\(2r = r^2\)

We divide both sides by r:

\(2 = r\)

So we have a single answer. **Only when r = 2 will we have the same value for circumference and area. And that is why 2km was an interesting choice.** Do you reckon the Government knew this when they chose 2km? Probably not, but it’s interesting. Let’s have a look at values in the range 1 to 5 to see how they look.

We can see the lines crossover over at radius = 2. As one would expect, since the circumference is linear while the area is quadratic, they continue to diverge as the radius increases.

We should note the following minor points, before noting another major insight:

- The choice of unit (km, mile, furlong, light year) affects the magnitude. For example, if we convert to miles we’ll have 1.24miles (not 2km), and 1.24 is not the magic number in this case. In fact, we could pick arbitrary units of length to ensure we get 2, or we don’t get 2 as we wish.
- I have ignored the radius \(\leq\) 0 as they are not practical, but you can imagine the plot would be a projection through the y-axis. You will also note the plots intersect at r = 0, again this is not practically useful.
- You could get the equation of the line and the quadratic equation and verify their intersection points. I’ll leave that for your homework.

Be careful though, the further you walk/run/cycle the greater the chance you’ll encounter COVID-19 #StayHomeStaySafe

I didn’t until it was pointed out by a Leaving Cert student (if there is a Leaving Cert this year). They noted that the circumference was the derivative of the area. Well spotted.

\(\pi r^2 = 2 \pi r\)

\(f'(\pi r^2) = 2 \pi r\)

This of course led to more questions. Is it particular to circles, or does it apply to triangles, squares, rectangles; does it apply to higher spatial dimension objects like spheres to circles, cubes to squares etc. They’re fun to think about and work out, or you can read more about these in the Further Reading section below, so you can grab your snorkel and go for a deep dive if you wish.

- J. Tong, Area and perimeter, volume and surface area, College Math. J. 28 (1) (1997) 57
- M. Dorf & L. Hall, (2002) Solids in \(\rm I\!R ^n\) whose Area is the Derivative of the Volume
- Slideshow: Derivative relationships between volume and surface area of compact regions in \(\rm I\!R ^p \)

Thanks for reading, hope you enjoyed it. If you have any comments, or corrections feel free to leave a comment. Or you may like to read some of my other interesting blog posts involving maths.

The post Covid-19. Why Irelands 2km isolation zone is interesting. appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>“Work = mad” may not be news to you. But did you know it is a physical fact and provable using Maths? It all started with a discussion about moments, torque, force, work, energy, power etc. We need to briefly talk about Force, and then Work. Force Sir Isaac Newton is probably the greatest scientist […]

The post Work = mad. Physics says so. Maths proves so. appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>“**Work = mad**” may not be news to you. But did you know it is a physical fact and provable using Maths? It all started with a discussion about moments, torque, force, work, energy, power etc. We need to briefly talk about Force, and then Work.

Sir Isaac Newton is probably the greatest scientist ever. I once stood in the same room as Newton, unfortunately I was 350 years late. One of the many contributions Newton made to Physics was in the ‘field of mechanics’ (*disambiguation*: not a pasture of grease-monkeys, rather the area of physics concerned with the study of bodies in motion).

Newton gave us 3 Laws of Motion, and Newtons 2nd Law of Motion states “*When a resultant external force acts on a body, the rate of change of velocity is proportional to and takes place in the direction of that force*“. In other words, when we apply a force, F, to an object/mass, m, the object/mass will accelerate, a, (rate of change of velocity) proportionately to the size of the applied force. Newtons 2nd Law of Motion is symbolized as:

\( F = ma \) Equation (1)

We can thank Gustave-Gaspard Coriolis for the notion of ‘Work’ in mechanics. ‘Work’ refers the distance (displacement) over which a Force is applied, and can be symbolized as:

\(Work = Force \times distance\)\( Work = Fd\) Equation (2)

If we now substitute Equation (1) into Equation (2), by substituting ‘ma’ for F, we can see that

\( Work = mad\)Q.E.D.

Note: The above derivation takes a simple non-relativistic case of a Force operating on a mass in a straight line.

The post Work = mad. Physics says so. Maths proves so. appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>The latest update to Chrome (Chrome 70) sneaks in yet another ‘convenience’ for you. When you use Chrome to login to and Google account (Gmail, YouTube, etc.), it will automatically also log you into Chrome. That could be handy – if you want to sync your Passwords, Payment handlers, bookmarks, browsing history, search history, etc. […]

The post Chrome 70 – Chrome sign-in is Automatic with any Google login appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>The latest update to Chrome (Chrome 70) sneaks in yet another ‘convenience’ for you. When you use Chrome to login to and Google account (Gmail, YouTube, etc.), it will automatically also log you into Chrome. That could be handy – if you want to sync your Passwords, Payment handlers, bookmarks, browsing history, search history, etc. But it could be a serious security and privacy breach if the machine you’re using is not your machine; whether that be in work, college, library, internet-cafe etc.

There is no pop-up warning you, or asking your permission, and you are opted in automatically when you update to Chrome 70. Fortunately you can disable it. It’s in the same location as the previous sneaky ‘convenience’ was added, as described in my previous blog post “Chrome 68 Payment Handler API – is it storing Payment Methods?“.

Thanks to issues raised by users as described in this Google Blog “Product updates based on your feedback” Google relented and included the option to turn off the auto Chrome sign-in. But why did the opt-out only come after a wave of negative feedback? Didn’t Google realise in their design meetings the opt-out was a necessity? Or did they prioritise the data they’d gather over your security and privacy?

The post Chrome 70 – Chrome sign-in is Automatic with any Google login appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>Chrome 68 Payment Methods – it’s on without you knowing it’s on Googles latest update of the worlds most popular browser just released is Chrome 68. There are several additions in Chrome 68 and the labelling of non-https websites as “Insecure” is rightly getting plenty of attention. But another important addition in this update is […]

The post Chrome 68 Payment Handler API – is it storing Payment Methods? appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>Googles latest update of the worlds most popular browser just released is Chrome 68. There are several additions in Chrome 68 and the labelling of non-https websites as “Insecure” is rightly getting plenty of attention. But another important addition in this update is the inclusion of Chrome 68 Payment Handler API, and notably the fact it is ENABLED by default. You may like that, or you may not.

If you don’t want Chrome giving permission to websites you visit to “check if you have payment methods saved” then head to your Chrome settings [see instructions below] now and DISABLE the option – because Google have already enabled it in the Chrome 68 update.

Payment Methods are all about making it easier to make online purchases. In principle that’s a good thing, however you may not like it due to the privacy, security or other considerations. The good thing is that you have a choice, and it’s up to you to make an informed choice. The bad thing is that Google have decided for you and you’re not informed, they could have at least given a pop-up to ask how you would like to configure the new option. If you don’t want the slightly more technical details – no problem, just skip the next section and jump to “How Do I Disable Payment Methods in Chrome?”.

The World Wide Web Consortium (W3C) describes itself as an “*international community where Member organizations, a full-time staff, and the public work together to develop Web standards.*“. There are two particular standards that relate to Payment Methods:

“This specification standardizes an API to allow merchants (i.e. web sites selling physical or digital goods) to utilize one or more payment methods with minimal integration. User agents (e.g., browsers) facilitate the payment flow between merchant and user.”

“This specification defines capabilities that enable Web applications to handle requests for payment.”

The two links above give the full specs, including further links to the repos on github for both Payment Request API source code, and Payment Handler API source code. That means you can contribute to the APIs – remember the W3C plus others “*and the public work together to develop Web standards.*“. That’s pretty cool. In addition, or alternatively, you could contribute to your favourite open source browser. If your favourite browser isn’t open source then you can’t contribute to it. That sucks. Of course you could make an open source browser your new favourite, or start your own open source browser…

If you’ve decided you don’t want to allow websites to view your saved payment methods then in Chrome it’s pretty simple to disable it in Chrome 68 Payment Methods.

- Go to Settings
- Link to chrome://settings [linking seems not to work], or
- In Chrome address bar navigate to:
**chrome://settings/**, or - Click the 3 vertical dots to the right of the address bar, then select
**Settings**

- Scroll to the bottom of the page and click
**Advanced**. - Go the the
**Privacy and Security**section. - Go to
**Allow sites to check if you have payment methods saved**and Disable. - That’s it you’re done!

You might be wondering how I noticed such a subtle addition to the Chrome settings. Well as it happens following writing my first 2 Chrome Extensions recently and blogging about them (Hacking Google Chrome – Custom Chrome New Tab Extension, and ReHacking Google Chrome – Customisable New Tab Extension ) I became quite familiar with the Chrome Settings and Extensions. So when the new update came out I noticed the new addition straight away.

It is a good idea to periodically go through the Settings of your Browser and other applications and check you’re happy with them, this is especially important after an update – as in the case of Chrome 68 Payments.

In reality nothing is “safe”, all you can really do is attempt to identify and minimise risk. The best way to do that by being informed – don’t click on links unless you know exactly where the link goes to – as opposed to where is says it goes; keep your software up to date and patched – OS, firewall, antivirus, browser, etc. Periodically review the settings on all the software you use. Only install software from reputable sources. Run regular scans with your preferred anti-malware software.

Any questions or comments use the section below. Now, I’m thinking about a blog for a robot I just finished building, and then there’s that AI thing I’m working on, and the IOT project …

The post Chrome 68 Payment Handler API – is it storing Payment Methods? appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>New Tab → Customisable New Tab 🙂 Take control of your web browsing experience with this customisable New Tab Custom Colour Blank Page Chrome Extension. It will allow you to pick a colour for your New Tabs in Chrome, because you can choose from a selection of popular colours (Black, White, Incognito, InPrivate, Red, Yellow, Blue, etc.) or […]

The post ReHacking Google Chrome – Customisable New Tab Extension appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>Take control of your web browsing experience with this customisable New Tab Custom Colour Blank Page Chrome Extension. It will allow you to pick a colour for your New Tabs in Chrome, because you can choose from a selection of popular colours (Black, White, Incognito, InPrivate, Red, Yellow, Blue, etc.) or similarly choose from a palette of 256 colours to suit your personal mood and taste. This will replace the default New Tab in Chrome which consists of 2554 lines of HTML and scripts, with a quick loading 10 lines of HTML. Gone will be the Search bar and the 8 Most Recently visited websites.

If you already installed my simpler “New Tab Blank Black Page” or read about it in the blog Hacking Google Chrome – Custom Chrome New Tab Extension then you may also like the extra features this new Extension offers. Or if you are happy with just Black then that simpler Extension is perfect for you.

Another advantage to using this New Tab extension is that you can set the Start Page in Chrome to open your New Tab page. So Chrome will launch even quicker, and it might avoid some awkward moments. Like when you open Chrome or a New Tab and your boss sees a list of recruitment websites in your Most Visited Sites. Or your partner sees you’ve been on dating websites :p . Or most frightening is if your nerd friends see you’ve visited uncool-tech sites <_< , now you can impress them with your customised New Tab. Of course a true nerd will write their own, hey wait a second!

Open Chrome and simply go to the New Tab Custom Colour Blank Page ( ← or click that link) in the Chrome Webstore and click the “*Add to Chrome*” button. That’s it! You will see the Extension icon appear to the right of the Chrome address bar. You can configure the extension by clicking the icon.

Enjoy using the extensions and other apps, feel free to rate them and leave a comment, feedback or suggestion.

The post ReHacking Google Chrome – Customisable New Tab Extension appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>Hacking the Chrome New Tab – Speed up your Browsing experience About two-thirds of us use Google Chrome for web surfing. And I’d say about two-thirds of us would like to change the Chrome New Tab page. Well I did anyway. You know the New Tab page with the Search bar and 8 most recently […]

The post Hacking Google Chrome – Custom Chrome New Tab Extension appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>About two-thirds of us use Google Chrome for web surfing. And I’d say about two-thirds of us would like to change the Chrome New Tab page. Well I did anyway. You know the New Tab page with the Search bar and 8 most recently opened websites [see picture below]. I don’t like it, it’s slower loading and gets replaced 90% of the time. So I went to the Settings to change it to a blank page (loads faster etc.) but I was surprised to find that there is no such option. Whaaaat! You can only change the New Tab to open a specific URL (or their New Tab page). Previously I would create a local file, e.g. blank.html, and load that. But this time I decided I’d see if I could hack Chrome to bend to my wishes. Well of course you can hack Chrome, in fact they encourage you do so, and even to publish and share your work. So I did just that.

According to the Chrome Developer website “*Extensions are small software programs that customize the browsing experience.*” Sounds perfect and just the ticket. It’s surprisingly easy to write an extension, all I needed was an .html file and a .json file. If you want to publish your Extension on the Chrome Web Store you will need a Chrome Developer account which requires a gmail and a once off $5 fee. But you don’t have to publish it to use it or even share it, you can distribute the extension yourself and people can use it directly however they will have to enable Developer Mode in Chrome in order to enable it initially – but once installed they can turn Developer Mode off again.

It doesn’t get any easier than human-readable tagged languages like HTML and JSON. Firstly you need an HTML file which will be what is displayed when the New Tab opens. This was super easy because I want a blank page – but you can use any valid HTML you like including text, images, links, videos, etc. So here it is below, I just give the page a title “New Tab” and set the colour to Black (#000000).

<!DOCTYPE html> <html> <head> <title>New Tab</title> </head> <body style="background-color:#000000"> <!-- Alan Cowap 2018 --> </body> </html>

All Chrome Extensions require a manifest file named manifest.json, this will be familiar to Android developers (as is the whole HTML + CSS + Javascript MVC pattern to devs of all flavours). The manifest tells the Browser, and the Web Store, about your Extension. The manifest (see code below) is fairly self-explanatory thanks to the fact it’s written in JSON (JavaScript Object Notation) which is human-readable. It uses key:value pairs, so for example the app “name” : “New Tab Blank Black Page”, it also includes the version number, author, icon details etc. And that’s it, the extension is done.

{ "manifest_version": 2, "name": "New Tab Blank Black Page", "version": "0.1", "description" : "New Tab opens with a blank black page", "author": "Alan Cowap", "icons": { "16": "images/NewTab_16x16.png" }, "chrome_url_overrides" : { "newtab": "Blank.html" } }

You have two options on how to use your Chrome Extension:

- Load it directly into your Chrome browser in Developer Mode.
- Publish the Extension on the Chrome Web Store.

The process to Publish in the Chrome Store is given in detail on their Developer website so I will look at option 1. You can view your extensions by typing the following into the address bar in Chrome.

chrome://extensions/

If you want a list of all Chrome URLs then navigate to:

chrome://about/

Note some of these are intended for developers so be advised!

Select the “*Developer mode*“, you will then get an option to “*LOAD UNPACKED*” which you can select and use the Dialog to navigate to the folder containing the HTML and JSON files of your Extension. Once loaded the Extension will be visible with all the other extensions. You should probably de-select “*Developer mode*” right away just to be safe. Just check the button is selected to enable the Extension; now open a New Tab and w00t you’ve got a fast loading privacy respecting blank black page. Congratulations!

You can also set the New Tab page to be the default page that opens whenever you open Chrome – which is a nice bonus. Just navigate to the settings or enter the following URL in Chrome:

chrome://settings/

Go to the “*On startup*” section and choose the option “*Open the New Tab page*“, and you’re all set. Chrome will now load faster and respect your privacy a little better. You can add my Extension to your Chrome here: New Tab Blank Black Page.

Is your inner hacker already thinking about tinkering with the extension? Why a black page, why not white, what about green, or orange, why can’t you pick whatever colour you want? The current extension hardcodes the colour in the HTML, so dynamically picking one will require some JavaScript and … another developer itch needs to be scratched.

[Update] Said itch has now been scratched. Read about it in this blog “ReHacking Google Chrome – Customisable New Tab Extension“. You can install the Chrome Extension “New Tab Custom Colour Blank Page” in the Chrome Webstore (open in Chrome).

The post Hacking Google Chrome – Custom Chrome New Tab Extension appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>The Rope of Dreams Recut – Cubic Equations Did you make the most of The Rope of Dreams in my previous post “The Rope of Dreams : Polynomials of the Second Order – Quadratic Equations“. I hope so. Well now you have a chance to take your 120 meter rope and enter another Dimension with Cubic […]

The post The Rope of Dreams Recut: Polynomials of the Third Order – Cubic Equations appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>Did you make the most of The Rope of Dreams in my previous post “The Rope of Dreams : Polynomials of the Second Order – Quadratic Equations“. I hope so. Well now you have a chance to take your 120 meter rope and enter another Dimension with Cubic Equations.

Once again you are given the Rope of Dreams, and a Golden Scissors which is the only thing that can cut the Rope of Dreams. You can cut the Rope of Dreams twice (cross section, no longitudinal cuts), which will give you 3 lengths. These lengths will be laid out one for each dimension X, Y, Z (i.e. left-right, backward-forward, up-down), and whatever volume you enclose anywhere on Earth is yours to keep, or do with whatever you wish. You can enclose only a single volume, a single time, and then must return the rope and the scissors. What would you do? You may not think of a Polynomial of the Third Order – a Cubic Equation, but you probably should. In this post we’re talking about cuboids, we’ll leave spherical shapes aside for now.

This time we’ll do the mathematics first and then apply our findings to determine how best to maximise the volume we enclose. In the previous post we derived and proved the following quadratic equation:

Previously: \({ x^2 = (x-n)(x+n) + n^2 }\)

Multiply by \(x\): \({ x^3 = x ((x-n)(x+n) + n^2)}\)

Multiplying this out: \(\boxed{ x^3 = (x-n) x (x+n) + xn^2}\)

And there we have it! The way to maximise volume is to have n=0. Why? Well may you ask. The equation is telling us that if we move n units from x, i.e. \((x-n)\), then the loss of volume will be \(xn^2\). If we don’t want to lose any volume then we should have \(n=0\) because then \(xn^2 = 0\).

With \(n=0\): \({ x^3 = (x-0) x (x+0) + x0^2}\)

Which gives: \({ x^3 = (x) x (x) + 0}\)

Let’s contrast that with moving 50 units from x:

With \(n=50\): \({ x^3 = (x-50) x (x+50) + x50^2}\)

Which gives: \({ x^3 = (x-50) x (x+50) + 2500x}\)

So by moving 50 units we lost a volume of \(2500x\). Ouch!

Let’s prove that: \({ x^3 = (x-n) x (x+n) + xn^2}\)

Moving x: \({ x^3 = (x( (x-n) \cdot (x+n) )) + xn^2}\)

Multiplying: \({ x^3 = (x( x^2 +nx -nx -n^2) ) + xn^2}\)

Simplifying: \({ x^3 = (x( x^2 -n^2) ) + xn^2}\)

Multiplying: \({ x^3 = x^3 -xn^2 + xn^2}\)

Simplifying: \({ x^3 = x^3}\)

Q.E.D.

A cube will give the greatest volume, any other rectangular cuboid will be sub-maximal. So you should cut the 120m rope into three sections of 40m each – this will give you the maximum volume of 40 x 40 x 40 = 64000 m^3. Let’s look at some sample choices:

Two 10 meter sections and a 100 meter section: \( 10 \cdot 10 \cdot 100 = 10000m^3\)

Two 20 meter sections and an 80 meter section: \( 20 \cdot 20 \cdot 80 = 32000m^3\)

Two 30 meter sections and an 60 meter section: \( 30 \cdot 30 \cdot 60 = 54000m^3\)

**Three 40 meter sections: \( 40 \cdot 40 \cdot 40 = 64000m^3\)**

Two 50 meter sections and a 20 meter section: \( 50 \cdot 50 \cdot 20 = 50000m^3\)

A cube is the ideal shape (for cuboids) to maximise volume. The further you move from a cube the greater the loss in volume. The equation is simple to derive and we’ve proved it mathematically, and used sample values for our Rope of Dreams. I hope you found somewhere nice to use it. Send us a postcard!

The Cube is King of the Cuboids: \(\boxed{ x^3 = (x-n) x (x+n) + xn^2}\)

Never one to shy away from a Star Trek connection I will point out that the stalwart of spacetravel for the BORG is their trusty BORG Cube, measuring 3km sides giving a total volume of 27 cubic km. Never one to miss out on an efficiency the BORG know their cubes and their cubic equations. (They also use Spheres – again an optimal shape for surface area to volume).

.

The post The Rope of Dreams Recut: Polynomials of the Third Order – Cubic Equations appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>The Rope of Dreams – Polynomial Imagine you are given a length of rope that is 120 meters long, and told that you can go to any place on Earth and whatever you enclose with the rope – is yours to keep, or do with whatever you wish. You can enclose only a single area, […]

The post The Rope of Dreams : Polynomials of the Second Order – Quadratic Equations appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>**The Rope of Dreams – Polynomial**

Imagine you are given a length of rope that is 120 meters long, and told that you can go to any place on Earth and whatever you enclose with the rope – is yours to keep, or do with whatever you wish. You can enclose only a single area, a single time, and then must return the rope. What would you do? You may not think of a Polynomial of the Second Order – a Quadratic Equation, but you probably should.

Say a big “Thanks”, take the rope, and start pondering the options. A likely plan is to think of where on Earth you want to go (a tropical island, a bustling city, a countryside retreat, maybe even Fort Knox – it’s your choice), and while en route to your destination figure out how to maximize the area the 120 meter rope can enclose. I’ll leave the destination to your own imagination (you can post in the Comments section below) and turn our attention for now to maximizing the area the rope can enclose once you get there. Did someone say Polynomial!

A likely first question you might have is to get an idea of just how long 120 meters is, so some reference examples might help, note that ‘m’ is short for ‘meter’. A soccer pitch is between 90m and 120m in length; A rugby pitch is 100m – the same as the 100m sprint in Athletics (Usain Bolt, Carl Lewis etc.); An American football pitch is 110m long; A CLG/GAA (Cumann Lúthchleas Gael / Gaelic Athletic Association) pitch is between 130m – 145m in length. For petrol heads, 120m is about 24 Nascars end-to-end, or 21 Formula1 cars end-to-end – that’s almost the entire grid – are you heading to Monaco with your rope?

A second question might be what shape to use, that is a great question and goes to the heart of this blog post. You might think of a **triangle** like the ancient Egyptians; or a **rectangle** shape like so many sports pitches and courts; an **oval** shape like running and race tracks; or a **square** shape like many public Parks. Or maybe you didn’t think about shape at all, maybe you thought shape doesn’t matter; but shape matters a whole lot and we’re about to find out why.

So a triangle could be a good shape to try, and let’s make it a long triangle because it seems logical that the longer it is the more area it will have. Let’s say we go with a triangle with sides of length 50m, 50m, and a base of 20m – that totals 120m. This type of triangle, with two sides of equal length is called an *isosceles triangle*. Now lets calculate the area of the triangle. using the formula below we get an area of \(490m^2\). That seems decent, for 120m length of rope we can cover an area of 490 sq.m.

For a Triangle: \( Area = \frac {base \cdot height} {2} \)

Herons Formula: \( Area = \sqrt {p(p-a)(p-b)(p-c)}\)

where p is half the perimeter i.e. \(p = \frac {a+b+c}{2}\)

Now let’s try another configuration of triangle, one that is more symmetric, in fact an *equilateral triangle* i.e. a triangle with 3 sides of equal length. The equilateral triangle will have sides of 40m, 40m, and 40m – all equal, and totalling 120m. Using Herons Formula above we see that we now have an area of \(693m^2\), that’s over 200 sq.m. more than the previous triangle. With a slight change in how we used our rope we’ve bagged ourselves a considerable area with an equilateral triangle of \(693m^2\).

Rectangle – Wrecked angle, broken square, get it. Heheheh. Ok, so if changing the shape of a triangle can bag us a bigger area, what about roping a rectangle! Once again we’ll go for a longer length and shorter width in the hope the longer dimension pays dividends. Let’s go with a rectangle of sides 50m and width 10m, that’s a total perimeter of 120m (50+10+50+10). This rectangle gives us an area of \(500m^2\). Hmm, that’s a bit better than our original isosceles triangle (490 sq.m.) but a lot less than our equilateral triangle (693 sqm.).

For a Rectangle: \( Area = length \cdot width \)

Now let’s try the same thing we did with the triangles i.e. go for a more symmetric shape, you can’t get a more symmetric rectangle than – a square. That’s right, a square is just a special case of a rectangle where the length and width are equal. A square will have 4 sides of 30m each, totaling 120m and using all our rope. The area of this square will be 30 times 30 i.e. \(900m^2\). That’s more like it, once again a reconfiguration of our shape has yielded a much greater area with a square yielding \(900m^2\).

Applying the lessons we learned from Triangles and Rectangles, it would seem that the more symmetric the shape the greater the area for a given circumference. So what shape is the most symmetric of all? Triangles, Squares, Pentagons, Hexagons, Heptagons, Octagons, and so on. But where does it end, what is the most sided shape you ca make?

Is the ultimate shape the humble Circle, as used in the World Heritage Site Brú na Bóinne in Ireland over 5200 years ago in the prehistoric passage tombs of Newgrange, Nowth and Dowth? Let us see. The perimeter i.e. circumference of the circle we can describe is 120 meters long, using the equations below we can determine the radius of the circle will be \( \frac {60} {\pi} \), we can use that to determine the area of the circle which is \(1146m^2\). Winner! Optimizing out shape by using a circle has yielded us a maximum area to enclose with our rope of \(1146m^2\).

For a Circle: \( Area = \pi r^2 = \pi {( \frac{d}{2} )}^2 \), and \( Perimeter = \pi d \)

Given circumference, C, \( Area = \frac {C^2} {4\pi} \)

Remember that all of these areas were obtained with the same 120 meter long rope, no magic, only mathematics!

\(490m^2\) – Isosceles triangle.

\(693m^2\) – Equilateral triangle.

\(500m^2\) – Long Rectangle.

\(900m^2\) – Square.

\(1146m^2\) – Circle.

I’m glad you asked. This all started when I was looking at numbers on a number line and squaring them and seeing how the values changed. Then I wondered, what is the difference between squaring a number (i.e. multiplying a number by itself); and multiplying the number to the left by the number on the right. So for example if I take the number 6, squaring it gives 36 (i.e. 6 * 6). Multiplying the number to the left by the number on the right is 5 * 7 = 35. 35 differs from 36 by 1. Interesting.

And what if I take the number 8, squaring gives 64; multiplying 7 * 9 = 63, once again this is one less. Interesting! Then I wondered if this relationship held for all numbers. Now multiplying an infinite amount of numbers is too much work, and that’s why we love Algebra because it saves us from all that extra work.

Let me call the number I pick, x. So the number to the left of x is one less i.e. x-1, and the number to the right of x is one more i.e. x+1. The examples above showed that:

My test cases showed: \( x^2 = (x-1)(x+1) + 1 \)

Multiplying this out: \( x^2 = x^2 + x -x -1 +1 \)

Simplifying: \( x^2 = x^2 \)

Q.E.D.

Next I wondered if there was a relationship between moving two spaces left and two spaces right. Taking 6 * 6 = 36, while 4 * 8 = 32; so a difference of 4. Interesting. Taking 8 * 8 = 64, while 6 * 10 = 60; again it is 4 less. Note that 4 is 2 squared i.e. 2 * 2 = 4.

Then I wondered about the relationship with moving 3 places. Since moving one space left a deficit of 1, moving 2 spaces left a deficit of 4, would moving 3 spaces leave a deficit of 9; or would it be 8? Let us see. Taking 6 * 6 = 36, while 3 * 9 = 27, so a deficit of 9. Interesting. Taking 8 * 8 = 64, while 5 * 11 = 55, again a deficit of 9. Note that 9 is 3 squared i.e. 3 * 3 = 9.

Once again, taking x as the initial number, and n as the number of places to move to the left and right, we can see the above results give us the generality:

\(\boxed{ x^2 = (x-n)(x+n) + n^2 }\)

Once again, we should prove the proposed equation.

Starting with \({ x^2 = (x-n)(x+n) + n^2 }\)

Multiplying out \({ x^2 = x^2 +nx -nx -n^2 +n^2 }\)

Simplifying: \( x^2 = x^2 \)

Q.E.D.

You can try the formula with your own values, please comment below if your calculations agree or disagree – and you can provide numbers used, calculations and results. You can confine your calculations to Integers i.e. positive and negative whole numbers including 0.

Great question, and the answer is Yes. The equation tells us algebraically and in a more general and proven way, what we found out empirically by choosing different types of shape. The ideal scenario is to choose a value of n = 0 i.e. not to wander away from the square condition. The further you wander, i.e. the greater n, then the greater \(n^2\) will become. If you move 2, the loss is the square (\(n^2\)) i.e. 4, if you move 3 the loss is 9, if you move 4 the loss is 16, if you move 5, the loss is 25 and so on. This is why the isosceles triangle of 50-50-20 was much worse than the equilateral triangle of 40-40-40. It is also why the rectangle of 50-10-50-10 was much worse than the square of 30-30-30-30.

Another great question. If you look carefully at the boxed equation above you may notice that it is very similar to the equation of a circle, and also very similar to Pythagoras Theorem. But really it boils down to symmetry, the way to get a maximum area with a given perimeter/circumference is to use a circle because it satisfies these equations and gives a maximum value. Corners are inefficient, curves are efficient.

Be mindful the opposite is true when it comes to packing and stacking i.e. corners are efficient and curves are inefficient. The Hexagon is a nice compromise between minimizing perimeter, maximizing area, and maximizing stacking and packing. Somehow bees seem to know this and build their nests accordingly.

Our equation: \(\boxed{ x^2 = (x-n)(x+n) + n^2 }\)

Eqn. of a Circle: \( r^2 = (x-h)^2 + (y-k)^2 \)

Pythagoras Theorem: \( c^2 = a^2 + b^2 \)

Take that Rope of Dreams, decide where you want to go, and if you want to maximize the area you cover – choose a circle. If you liked this post you will probably like the posts on the Monty Hall Problem – Can You Solve This Maths Puzzle? Enjoy!

UPDATE: You’ll definitely like the follow-up post to this which takes things to another Dimension (there’s even mention of the BORG), The Rope of Dreams Recut: Polynomials of the Third Order – Cubic Equations. Triple enjoy!

The post The Rope of Dreams : Polynomials of the Second Order – Quadratic Equations appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>Monty Hall Proof – The Formula is here. My two previous posts described the Monty Hall Problem – Can You Solve This Maths Puzzle? and Monty Hall Solution – Advanced! Well, this is the next installment of the trilogy, a simple mathematical proof. If you don’t like Maths (Mathematics, Math) then, well, you have serious problems […]

The post Monty Hall Proof – The Formula appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>**Monty Hall Proof – The Formula is here.** My two previous posts described the Monty Hall Problem – Can You Solve This Maths Puzzle? and Monty Hall Solution – Advanced! Well, this is the next installment of the trilogy, a simple mathematical proof.

If you don’t like Maths (Mathematics, Math) then, well, you have serious problems – get some help :^) This isn’t difficult at all, it’s just a bit of simple probability and algebra, yep ALGEBRA

The Probability that you will Win is the quotient of the Number of Cars, and (divided by) the Number of Doors. To represent that symbolically using algebra is simple:

\(P(W) = \frac{NC}{NDtot} \) … Equation (1)

The Probability that you will Lose is a little more interesting, it is the quotient of the Number of Doors less the Number of Cars, and (divided by) the Number of Doors, in symbolic notation this is:

\(P(L) = \frac {NDtot – NC}{NDtot} \) … Equation (2)

There’s one last equation we want, and it says the Probability that we either Win or Lose is 1 – since these are the only two possible events. In other words, we have to either win or lose – there are no other possible events (see my earlier post re the philosophical and physics debates on that general point). Anyway, to represent this symbolically:

\(P(W) + P(L) = 1 \) … Equation (3)

(Equation (3) is based on Kolmogorov’s second axiom i.e. \(P(\Omega) = 1\))

Those 3 Equations give us what we need to check the proof. If the Equations are correct then when we combine the equations the result should give us an equality – that’s why *equations* are also known as e*qualities*!

We start with Equation (3), into which we will substitute P(W) from Equation (1), and P(L) from Equation (2); as follows:

\(P(W) + P(L) = 1 \) … Equation (3)

\(\frac{NC}{NDtot} + \frac {NDtot – NC}{NDtot} = 1 \) … Substituting for P(W) and P(L) … Equation (4)

Now we want to simplify, an easy simplification is to combine the two terms of the left-hand-side of the equation since they have the same denominator (NDtot), which gives us:

\(\frac {NC + NDtot – NC}{NDtot} = 1 \) … Combining the left hand terms

Can you spot the next simplification? Take a look and see. Did you get it? That’s right, the ND and -ND will cancel each other out, giving us:

\(\frac {NDtot}{NDtot} = 1 \) … The NC terms cancel each other out

Can you finish the Monty Hall Proof? Yes, any term divided by itself equals 1, giving us:

\(\frac {1}{1} = 1 \) … we get 1 = 1 which is a proper equality, we did it!

**Q.E.D.**

So it seems we have this all wrapped up, but let’s try it with the actual numbers from the App. We have 3 doors, and 1 car, Recall Equation 4:

\(\frac{NC}{NDtot} + \frac {NDtot – NC}{NDtot} = 1 \)

Now let’s put in our values for total number of doors: NDtot =3, and number of cars NC = 1, giving us:

\(\frac{1}{3} + \frac {3 – 1}{3} = 1 \) … using our actual numbers from the App

\(\frac{1}{3} + \frac {2}{3} = 1 \) …do the math 🙂

\(\frac {3}{3} = 1 \) … great, it’s correct!

**Q.E.D.**

Go ahead and try with 2 cars and 3 doors; or try with 3 cars 3 doors, or 4 cars and 20 doors, it even works with 4 cars and 3 doors 😀

I hope you enjoyed the Monty Hall Proof, including the previous posts, and found them informative. Feel free to leave a comment, or if you see an error let me know, finally a nod to Andrey Kolmogorov and his pioneering work on Probability, he was born 115 years and 1 week ago.

Checkout the code on GitHub.

Get the free Monty Hall Game on Google Play.

The post Monty Hall Proof – The Formula appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>This post “Monty Hall Solution” continues on from my previous post Monty Hall Problem – Can You Solve This Maths Puzzle? If you haven’t read that post, then read it now before reading this. Because I will now show you even more Monty Hall Solution coolness! We saw that you could increase (double) your chances of winning a car […]

The post Monty Hall Solution – Advanced! appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>This post “Monty Hall Solution” continues on from my previous post Monty Hall Problem – Can You Solve This Maths Puzzle? If you haven’t read that post, then read it now before reading this. Because I will now show you even more Monty Hall Solution coolness! We saw that you could increase (double) your chances of winning a car by understanding some maths, so let’s delve further into it and who knows, you might win something big (then again you might not, but hey!).

So what happens, if there are 4 doors instead of 3 doors? And what happens if there are 5 doors, 6 doors, hmmm, more code required – cool!

Checkout the code on GitHub.

Get my free Monty Hall Game on Google Play.

For 4 doors we would expect that the odds would be 1/4 (**25%**) for not changing Vs 1.5/4 (**37.5%**) for changing. “*How did you get those figures?*” I hear you ask. Well, with 4 doors, each door has a 25% chance of being correct. Our 1st chosen door has a 25% chance – the other 3 doors have a combined 75% chance. When Monty removes one of those 3 doors by opening it -the remaining 2 doors still have a combined 75% chance – which is now divided by the 2 remaining doors i.e. 37.50% chance each. Once again the figures from the 70 million simulations are very precise.

Doors in Game: 4 Unchanged Wins: 2498993, Changed Wins: 3750566Unchanged Wins: 24.99%, Changed Wins: 37.51%Unchanged Wins: 2498720, Changed Wins: 3750419Unchanged Wins: 24.99%, Changed Wins: 37.50%Unchanged Wins: 2500812, Changed Wins: 3748980Unchanged Wins: 25.01%, Changed Wins: 37.49%Unchanged Wins: 2499171, Changed Wins: 3747829Unchanged Wins: 24.99%, Changed Wins: 37.48%Unchanged Wins: 2499602, Changed Wins: 3749207Unchanged Wins: 25.00%, Changed Wins: 37.49%Unchanged Wins: 2497548, Changed Wins: 3748332Unchanged Wins: 24.98%, Changed Wins: 37.48%Unchanged Wins: 2499206, Changed Wins: 3749860Unchanged Wins: 24.99%, Changed Wins: 37.50%

For 5 doors we would expect the odds to be 1/5 (**20%**) vs 1.33/5 (**26.66%**). These figures are derived as described above for 4 doors. So how does the simulation match up, well very precisely thank you:

Doors in Game: 5 Unchanged Wins: 1997315, Changed Wins: 2667064Unchanged Wins: 19.97%, Changed Wins: 26.67%Unchanged Wins: 1999994, Changed Wins: 2666099Unchanged Wins: 20.00%, Changed Wins: 26.66%Unchanged Wins: 2001180, Changed Wins: 2667386Unchanged Wins: 20.01%, Changed Wins: 26.67%Unchanged Wins: 1999664, Changed Wins: 2667039Unchanged Wins: 20.00%, Changed Wins: 26.67%Unchanged Wins: 2000629, Changed Wins: 2668808Unchanged Wins: 20.01%, Changed Wins: 26.69%Unchanged Wins: 1999954, Changed Wins: 2665963Unchanged Wins: 20.00%, Changed Wins: 26.66%Unchanged Wins: 1998652, Changed Wins: 2667357Unchanged Wins: 19.99%, Changed Wins: 26.67%

Odds are 1/6 (**16.66%**) for not changing door, vs 1.25/6 (**20.83%**) for changing door. And yes, the simulation agrees…

Doors in Game: 6 Unchanged Wins: 1663952, Changed Wins: 2083233Unchanged Wins: 16.64%, Changed Wins: 20.83%Unchanged Wins: 1667182, Changed Wins: 2083964Unchanged Wins: 16.67%, Changed Wins: 20.84%Unchanged Wins: 1666971, Changed Wins: 2083919Unchanged Wins: 16.67%, Changed Wins: 20.84%Unchanged Wins: 1666952, Changed Wins: 2083654Unchanged Wins: 16.67%, Changed Wins: 20.84%Unchanged Wins: 1666734, Changed Wins: 2083798Unchanged Wins: 16.67%, Changed Wins: 20.84%Unchanged Wins: 1666166, Changed Wins: 2082401Unchanged Wins: 16.66%, Changed Wins: 20.82%Unchanged Wins: 1667218, Changed Wins: 2086789Unchanged Wins: 16.67%, Changed Wins: 20.87%

And so on, as the number of doors increases we find that sticking or twisting becomes less important as 2 doors is an increasingly small fraction of the total number of doors i.e. 2/3, 2/4, 2/5, 2/6, 2/7 etc.

Just if you’re curious, here is a run of 10 million games for each number of doors (3-9), so a total of 70 million games. You can see the gap narrowing as the number of doors increases.

Doors in Game: 3 Unchanged Wins: 3332776, Changed Wins: 6667224Unchanged Wins: 33.33%, Changed Wins: 66.67%Doors in Game: 4 Unchanged Wins: 2500354, Changed Wins: 3749370Unchanged Wins: 25.00%, Changed Wins: 37.49%Doors in Game: 5 Unchanged Wins: 2000567, Changed Wins: 2665857Unchanged Wins: 20.01%, Changed Wins: 26.66%Doors in Game: 6 Unchanged Wins: 1665930, Changed Wins: 2083850Unchanged Wins: 16.66%, Changed Wins: 20.84%Doors in Game: 7 Unchanged Wins: 1430746, Changed Wins: 1713655Unchanged Wins: 14.31%, Changed Wins: 17.14%Doors in Game: 8 Unchanged Wins: 1250934, Changed Wins: 1458256Unchanged Wins: 12.51%, Changed Wins: 14.58%Doors in Game: 9 Unchanged Wins: 1111668, Changed Wins: 1271298Unchanged Wins: 11.12%, Changed Wins: 12.71%

Feel free to download/fork the code and test it yourself, modify the number of doors and play around with it and see how the numbers come out. There is still something I want to do with this Monty Hall Problem / Monty Hall Solution before I put it down. Hmm, more thinking and typing required, expect a final post on this topic …

…And here it is, the final installment: Monty Hall Proof – The Formula

Questions or comments welcome below, and contributions to the code are welcome too, it is available on here Github

P.S. Nod to Cepheus~commonswiki for the images.

The post Monty Hall Solution – Advanced! appeared first on COVID19 - Stay Home Stay Safe, Social Distance, Cough & Sneeze Etiquette, Wash Your Hands..

]]>