Monday, 9 July 2018

Powers + How Many Films Could Possibly Be Made

Rainbows give an inaccurate representation of how many colours the human eye can see, but if I were to be asked this question I would say the nursery rhyme; count the colours; say seven, maybe plus one as white is the presence of all other colours, whereas black is the absence of any; state everything else are just shades of them; get on with my day. Thankfully I wasn’t alive in 1931 and worked at the CIE, The International Commission on Illumination, although I heard their parties were pretty ‘lit’.
Thank you, I’m here all week. They did scientific research into the colours that the human eye can see and came up with the CIE 1931 XYZ Colour Space and CIE 1931 Chromaticity Diagram (inventive names), the latter of which is shown below. For example, white and grey have the same chromaticity but different brightness. These are both different ways of showing the approximately 2.4 million colours they calculated, so a few more than 7 or 8, but I was pretty close.
I prefer this more basic version of it though, not only because it implies that the answer is closer to my 7/8 colours, but that it would make the numbers involved in getting an answer to this question a heck of a lot smaller.
The next things we must consider are the number of pixels on the screen and its framerate. I know that cinema screens are only just beginning to move to into 8K (7680x4320 pixels) which is 33,177,600 pixels, so let’s go with that quality, just to be safe. Next, we would have to use a camera with a framerate (individual frames per second) which is the same as (or greater than) the framerate at which humans can process images. Studies performed by scientists on the United States Air Force in which pilots sat in a dark room and were flashed images for a very small amount of time to assess whether they could notice the image, concluded that humans can identify up to 220 fps (frames per second). It will not be so high nor so clear for everybody, but we must use the highest framerate to ‘be sure’. Now we can easily work out the total number of frames in, let’s say, a 2-hour period. 220 x 60 x 60 x 2 = 1,584,000 frames per 2-hour film. Now we have our numbers set up for the picture of our possible films, now for some audio.
A CD samples music at 44.1 kilohertz, where each ‘bit’ of information can be a 1 or a 0. This is similar to the first blog on power sets, where our set of possibilities is {0,1} instead of {the superhero is in the film, the superhero is not in the film}. But as there are two elements in each set, the maths works in the same way. In a 2-hour film, the audio file at this quality would contain 5,064,000,000 bits, each one being a 1 or a 0. This means that to find the possibilities of audio tracks that are 2-hours long we would raise 2 to this power. Therefore 25,064,000,000 = 1.10256 x 101,524,415,898 possibilities. I cannot begin to describe how big this number is. That is 110256… followed by 1,524,415,893 zeros, for anyone struggling to get their head round the standard form. In comparison, there are approximately 1 x 1080 atoms in the universe. Our possibilities are massive admittedly, yet finite.
Next, we find the amount of 2-hour silent movies there could be. We would then multiply these two astronomically large numbers together to get the number of possible 2-hour films there could be. That’s it. Imagine the first frame of the film, in the bottom right hand corner, there is a pixel. Now there are 2.4 million possible colours that it could be (that the human eye can see, we are also assuming that the camera and screen can capture and display that many colours which may not be true, but always go with the larger estimation to be safe). The pixel next to that also has 2.4 million possibilities, so there are 2,400,0002 possibilities between these two pixels alone, in the first 220th of a second of the film. You can see how the numbers are going to get huge rather quickly. If you repeat these possibilities for the first frame of the film, it is worked out by (2.4 x 106)33,177,600, which if you have noticed, is the number of possible pictures with 8k resolution. Now we use the power of powers, not mind control, literally ‘powers’ again. To see how many ways that the 1,584,000 frames in our film can be arranged using any of these p = (2.4 x 106)33,177,600 pictures, we again raise the amount of pictures p, to the number of frames. If you can’t follow the calculations, good. It means you have better things to do than me, which isn’t difficult admittedly. The total number of silent films that are two hours long, Ts, is
                                           Ts = P1,584,000 = 2.456 × 10335,301,272,844,929
To 4 significant figures. We multiply this by the possible 2-hour audio files we found earlier, 1.10256 x 101,524,415,898, to get the possible two hour films that could be made with every possible 2-hour audio file in the background. You think of it, it is in there... Every possible film about dogs narrated by Morgan Freeman wearing a poncho, in there. Every possible film about how your life will go is in there. A 90 minute football match where England bring football home from Russia followed by 30 minutes of hysteria, Sunday 4pm BBC One, but conveniently also in there. Its all in there! This number is

TA = 3.15225 × 10335,302,797,260,430


If I wanted to type this number out in full on a word document, I would type 315225 and then hit the ‘0’ key and hold it down… for over quarter of a million years! 284,601 years to be precise. If I aged like David Beckham and managed to live this long and then wanted to print this number out, it would take 87.3 billion sheets of paper. If I cut down and turned to paper, every tree in every park in London, I still wouldn’t have enough paper to print out the possibilities and this is a number that every second I hold down the ‘0’ button, I would be making approximately 10,000,000,000,000,000,000,000,000,000,000,000,000 larger. So, there you have it, the amount of possible films under the given conditions above is 3.15225 × 10335,302,797,260,430. Maybe a fact you can pull out in the kitchen at a party, if you never wanted to be invited back again. Thanks for reading.


Luke Bennett

Monday, 2 April 2018

The Calculus of Variations + Waterslides


People give up on maths. People give up on maths because it’s hard, but it doesn’t do itself any favours though. Maths is said to be a language that a person can never be fluent in, which is like playing the Zombies Mode on Call of Duty; There’s no completing it, you just keep hacking away at things. Maybe somebody will find a new glitch, maybe somebody will develop a new technique, but you’ll probably just end up running around like a headless chicken and relying on that one friend who actually knows what they are doing. When I was given ‘An Introduction to the Calculus of Variations’ as the topic of my dissertation, the headless chicken approach was inevitable. It seemed that I had been dropped into wave 50 without the help of friends, equipped only with a Springfield and a few Molotov cocktails. If you do not get the reference, just know that I seemed screwed.

A Functional is a mapping from a vector space X, usually of functions, to the real or complex numbers, often expressed as the definite integral. That may as well be Spanish to some of you, as it seemed to me at first glance. A mapping (or function) can be seen as a machine that eats stuff and spits it out again once that stuff has followed a rule or set of rules it has. Now imagine there is machine eating machine, a cannibal machine if you will; It chews up these machines whilst those machines chew on stuff too. Simultaneously, the cannibal machine and the smaller machine spit its contents out at the same time. That is the most exciting way to describe a functional, as a cannibal. In the field of the Calculus of Variations at least, This cannibal that we call a functional is an integral between two points and is essential to this whole area of maths.

Now we can finally define what the Calculus of Variations is. It is the area of mathematics that focuses upon maximising or minimising these cannibalistic functionals, similar to finding the maxima of the simpler f(x) functions, where the gradient equals 0. It gets a little more complicated than that but it’s along the same lines. I do aim to write this blog though such that you get to the end without falling asleep so I will gladly leave that stuff out.
The Brachistochrone Problem was something that mathematicians took a while to crack. ‘Brachisto’ meaning ‘shortest’ in ancient Greek, and ‘Chronos’ meaning ‘time’, this was the problem of shortest time. It aimed to find the fastest time for which a particle dropped down a slope under only gravity, no other forces like friction or air resistance, to any another point below it. Here is a diagram for it. I made this in Microsoft Word at 3am and it’s actually in my dissertation. Professionalism.


Turns out that after loads of tedious calculus, the answer to the curve between the starting point and any end point that minimises the time is found by a cycloid curve. A cycloid curve is one which is created when you trace from a point on a circle when it rolls along a flat surface.
Now imagine a cycloid curve is a picture in Microsoft Word. To find the Brachistochrone (shortest time) curve from our start point to another randomly given point, imagine lining up our start point with the start of our cycloid curve, but the cycloid curve is the opposite way round to the animation, we basically drag the corner of the picture of the cycloid curve to make it bigger or smaller while it stays in the same ratio of width and height and stop when our end point lies on the curve somewhere. What we are changing to find our specific section of the cycloid curve is the radius of the rolling circle, that’s it. It will always be fastest with a section of a cycloid curve (assuming only gravity is acting). Looking at the diagram below, when you find the first derivative of any cycloid curve, no matter what size, the extrema, where the gradient is zero, will always lye on the same line if it starts at the point (0,0).



This line is y=2x/π, or if you flip upside down to make things easier to visualise like we have above, it is y=-2x/π. This is important when designing the ideal waterslide. It doesn’t take a genius to know that a waterslide needs to end with a flat section for safety, but if we want the fastest possible safe waterslide, we must have a Brachistochrone curve slide that ends at the flat part of the curve. We need to have the endpoint and start point of the waterslide that lye on the same of y=-2x/π and draw a Brachistochrone curve between them. There are 3 other cases if you wanted the fastest possible slide (Brachistochrone slide) but the points don’t both lye on this line.
In Case 1, the user will be rapidly smashed into the ground. This is terrible for waterpark safety and the lawsuits will ultimately get your park closed. Would not recommend. Case 2 is like Case 1 but the user will get to enjoy a lovely view before any tragedy, catching some sweet air in the process. Would also not recommend. Case 3 is a little better, remember that we are not taking into account any forces other than gravity because on a waterslide there will be little anyway as you are also propelled a little by the water. Case 3 sees the user stuck in an infinite loop of going up and down, and an air ambulance would have to be called to rescue the user. Better than 1 and 2 but still not good for publicity.
The Brachistochrone curve is also an example of a Tautochrone (‘same time’) curve. This means that if many people used the slide at the same time from different starting positions, they would arrive at the bottom at the same time. This sounds nice at first, that they would all join together in some train at the bottom, but the reality is that they would all have different velocities at this moment, and all but one of these people would be kicked in the back. Again, would not recommend.

Thanks for reading.

Luke Bennett.


Thursday, 15 March 2018

Power Sets + Superheroes


Since leaving university, I have tried to find any excuse to use the mathematics that I learned there in everyday life, even if a lecturer did tell us that it would be difficult. It always makes me think back to when I would use maths as procrastination from maths during exam season.

A set is defined to be a collection of well defined distinct objects, often being of numbers, for example:

{0,1,2,3}.

You can have a set containing anything though. Another example would be the set containing the years that Liverpool have won the Premier League, . This is the empty set, and is a subset of every possible set. Now let’s consider a set S. The power set of S, written P(S), is a set itself containing every possible subset of S. If you found that sentence harder to unscramble than an egg I do not blame you, so it is best that I give an example: If

                                                                        S = {1,2,3},

                                           P(S) = {∅, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }.

I used to think as a power set as every possible crossover between the elements in the set, as if they were films to be made, but we’ll come back to this later.

When I was younger I had no objection to superhero movies. Being a child who was easily entertained and subsequently thought that every film I saw was the greatest thing ever, I quite obviously enjoyed them. There came a point though where they just began to annoy me, with their somewhat copy and paste storylines and somebody defying all probability yet again. There are a few exceptions to the rule of course, The Dark Knight and Deadpool to name a couple, but on the whole, they are usually not for me. I thought, at what point will they run out? A quick Google search when I was meant to be revising for my final exams found that there are around 947 of them (although I copy and pasted the superheroes list straight from the marvel website, deleting any duplicates and it came out closer to 1250, so we’ll just play it safe here and stick to 947).

Scrolling through this giant list made for a good laugh. Some superhero names are pretty cool, but then again you put two cool words together and hey presto! Any 10-year-old could nail it: Black Panther, Hawkeye, Steel Serpent and my favourite... Mathemaniac. Not sure what Mathemaniac’s superpower could be though, maybe he can total the price of his weekly shop before he gets to the checkout or something. The cool names are short lived though. There are 10 superheroes or villains that start with ‘Mr.’ and 8 that start with ‘Captain’. Then there are some that must have been thought up at 5-to-5 on a Friday with names like; Bloke, which accurately describes him I suppose but the naming here is about as lazy as Garfield and Homer Simpson holidaying in The Maldives together; Giant Man, which suggests he may be a giant man, but who can really be sure, and; Hindsight Lad, I am not making this up. I can only imagine this is some guy walking around in a cape who keeps telling people he meets at checkouts or in locker rooms that he wishes he travelled more or that he bet on Leicester City to win the Premier League. But we are just getting started. Those are just the lazy names. All of these names only strengthened my annoyance towards most superheroes as I continued this list. There are; Spider-Ham, a joke in The Simpsons Movie and not surprisingly, as a comic too; Xavin, what is he Xavin, his face? 3-D man, or as I like to refer to him, Man. Then the final 3 sound like a Pokémon evolution line, being Namar, Namora and Namorita.

Insults aside, let us have the set S being the set containing the approximate 947 marvel superheroes. You can call the set anything, but ‘S’ is easy as it stands for superhero, although the word superfluous is a better fit.

                                           S = {Ant-Man, Banshee, Bloke, Hindsight Lad, Iron Man…}

When you have a set of elements, you can see that all the elements in its power set can be divided into how many elements each set has. To easier visualise this, consult the examples below. Assume we have some set X of 4 or more elements. The number of subsets of X that contain themselves 2 elements can be found with the formula below. This formula does not change, no matter how big X is.



We can repeat this to find the number of subsets of size 3, 4, 5, up to any number you want. When you add up all of these quantities, they sum to 2n elements in the power set of X, or in our example, S. As we are looking at film crossovers though, we will minus 1 as the empty set would be a film containing no superheroes, but this will make no noticeable difference to our outcome, as 2n in the case of S, is going to get more out of hand than a wet bar of soap.



Now we see that there are just under half a million 2-character crossovers between all marvel characters, which let’s assume you can watch 8 films a day, would total a time of over 153 years to watch them all. 3 and 4-character crossovers increase each time up until 473 and back down again in the shape of a standard deviation correlation, so just how many can we get?
I have been watching a lot of maths and science based, very interesting videos on YouTube recently on a channel called ‘Vsauce’. Here is the video, entitled ‘How Many Things Are There?’, which caught my attention most.
In the video, Michael approximates the possible number of thoughts that our universe could have before a googol (10100) years has past and there is no usable energy left in the universe. First he takes the approximate mass of the universe, 3.4 x 1060kg and the fastest possible computing limit due to the speed of light and the uncertainty principle (called Bremermann’s limit) 1.36 x 1050bits sec-1 kg-1. Using these he simulates making the universe into a universe sized supercomputer that estimates that for the 3.154 x 10116 seconds that the universe has left, there are 1.458 x 10227 thoughts that could be thought. This is assuming that each thought takes about 1 sentence, or 800 bits worth of information. This is an interesting result when it comes to the amount of superhero movies there could ‘possibly’ be…

So now we just need to plug in the numbers. 2n-1 gives the number of crossover films for a group of superheroes of size n, which we find to be in the case of n=947 is

                                                          5.80866 x 10281,
 making them literally unthinkable. Thanks for reading.


Luke Bennett