uyhjjddddddddddd Web Optimisation, Maths and Puzzles: algebra

Header tag

Showing posts with label algebra. Show all posts
Showing posts with label algebra. Show all posts

Wednesday, 26 March 2025

Airband Radio Aerials: Maths in Action

I've been interested in aircraft and airshows for over 40 years - anything military or civil, and I've blogged in the past about how to use a spreadsheet to track down where to watch the Red Arrows fly past on their transit flights.  You didn't think that post was about geometry without some real-life applications?  What is this - "Another day I haven't used algebra"?

Anyway - I've been particularly interested in the Red Arrows and their air-to-air chatter, and the communications between pilots and air traffic control.  Yes, I take my airband radio along to airshows and to airports, and listen to the pilots request and receive clearance to take off or land.  Getting to airports is more of a challenge than it used to be - my children aren't as interested as I am in the whole thing, and standing at the end of a runway in poor weather isn't as much fun as it sounds!

So, I've started developing my home-based receiver.  In other words, I spent my birthday money on an airband antenna and an extension cable to connect it from outside (cold and sometimes rainy) to my desk (warm and inside) so that I can listen to pilots flying nearby.

Now: nearby is a relative term.

From Stoke on Trent, I've been able to pick up pilot transmissions from about 35 miles away, on the southern edge of Manchester Airport.  That's with a very basic antenna, set on my garden gatepost and about two metres off the ground - not bad for a first attempt.

My dad, on the other hand, has been tracking radio transmissions for decades.  His main areas of interest are long wave (around 200 kHz), medium wave (500-1600 kHz), and TV (UHF, 300 Mhz to 3GHz).  

Airband falls into the Very High Frequency range, around 100-200 MHz.

Here comes the maths:
All radio transmissions travel at the speed of light, c = 2.998 * 10^8 ms-1.
c = f w

Where f (sometimes the Greek letter nu, ν) is the frequency, and w (usually the Greek letter lambda, ƛ) is the wavelength.

So, if we know the frequency range that we want to listen to, we can calculate the wavelength of that transmission.  And this is important, because the length of the antenna (or aerial) that we need will depend on the wavelength.  Ideally, the aerial should be the length of one full wavelength, for maximum reception effectiveness.  Alternatively, a half-wavelength or a quarter-wavelength can be used.

So:  we know the speed of light, c = 2.998 * 10^8 ms-1
And we know the frequency of the transmissions we want to receive, which is around 118 MHz.

c/ν = ƛ

ƛ =   2.5 metres

Which is feasible for an external, wall-mounted aerial.  Can you see where this is going?

Exactly.  And here it is:  

It's just over two metres from end to end, with a feed at the midpoint.  This is the Mark One; the Mark Two will be the same aerial but even higher up, and closer to vertical (with a bracket that will enable it to dodge the eaves of the roof!


Monday, 1 April 2024

Generative AI proves the Collatz Conjecture

 It was proudly reported earlier today that mathematics' most famous and challenging problem has been solved.  A team from the UK's University of Cambridge, using a combination of classical maths and Generative Artificial Intelligence (Gen AI) have demonstrated that the Collatz Conjecture (also known as the 3n+1 problem) has been proved once and for all, using a new dynamic algorithm, similar to the type used by the Chess-playing program, Alpha Zero.

The problem is easy to state, but has confounded mathematicians for almost 100 years:  take any number, and if it's odd, then multiply by three and add one.  If it's even, divide by two.  Take this number, and repeat the operation:  if odd, then multiply by three and add one; if even, divide by two.  Continue to repeat this operation, and eventually, you reach 1.  (1 *3) +1 = 4, 4 /2 = 2, 2/2 = 1.

Mathematically:

The question, which has previously remained unanswered, is: does this apply to ALL numbers?

The team from Cambridge's Department for Applied Mathematics and Theoretical Physics worked on devising an algorithm that was able to overcome the Collatz Conjecture's key challenges.  Instead of trying to unpick the chaotic nature of the Conjecture's sequence, they embraced this using their dynamic Gen AI model.  Previously, the challenge of the Collatz Conjecture lay in its number sequence, which can grow to immense sizes swiftly, only to diminish just as quickly.  However, when they programmed their AI algorithm to map every integer in a variable 1-4 dimensional space, and plot each term in all sequences in a four-dimensional matrix, they uncovered a spherical symmetry that they had not expected.  As all real numbers are contained within this four-dimensional hypersphere, the team were able to prove the Collatz Conjecture for all real positive integers.

A 3-D visualization of the 4-D Collatz Conjecture solution
University of Cambridge

As the conjecture’s proof is tied to other mathematical domains, such as number theory and dynamical systems, it is expected that proving it will have far-reaching consequences in these areas, necessitating a profound review of these disciplines.  



A second visualisation of the 4-D Collatz Conjecture solution showing a different 'shadow'
 
University of Cambridge

The team have not yet shared full details of how the proof works, but they explained that they mapped all known sequences into the 1-4 dimensional space, and the AI algorithm then arranged them in a way that would maximise their spatial symmetry.  The next step was then to map all the odd, so-called 'April' numbers and connect them to the even numbers.  By demonstrating that any odd number would always eventually path to another point on or within the same hypersphere, they were able to prove that all numbers eventually path to 1.  The algorithm was able to plot 'shadows' of this in 3D, and the visualizations have been as beautiful as they have symmetrical.  


A close up of a 3-D shadow of the 4-D solution, showing the connections between the real integers in Collatz sequences
University of Cambridge

The team plan to publish full details of their findings and proof in an upcoming issue of the Journal of the European Mathematical Society, following a thorough peer review.  I will provide more updates as I find them; I have my own series of articles here on this blog on the Collatz Conjecture, and the variations  5n+1, 3n+3 (which is wild) and 3n+5 (which grows very rapidly).

Thursday, 28 February 2019

Maths Puzzle: Cookie Jars

These puzzles are the second batch I'm taking from Math-E-Magic by Raymond Blum, Adam Hart-Davis, Bob Longe and Derrick Niedermann.  The first was a geometric question; these are based on algebra.
These puzzles are entitled Cookie Jar and Fleabags, but they are very similar to a wide range of puzzles (typically related to the relationships between people's ages).

Cookie Jar
Joe and Ken each held a cookie jar and had a look inside them to see how many cookies were left.  

Joe said, "If you gave me one of yours, we'd both have the same number of cookies."
Ken replied, "Yes, but you've eaten all of yours - you have none left!"
How many cookies does Ken have?

This is a relatively straightforward puzzle, helped by the fact that Joe has zero cookies, and there's only one other constraint - if Ken gives Joe a cookie, they'll have the same number (one).  So, if Joe will have one cookie after the transaction, then so will Ken.

But that isn't the answer.  We have to remember that Ken has one cookie after the transaction, but that he also had the one he would give to Joe - so he has two.


Fleabags

Two shaggy old dogs were walking down the street.
Captain sits down and says to Champ, "If one of your fleas jumped onto me, we'd have the same number."
Champ replies, "But if one of yours jumped onto me, I'd have five times as many as you!"
How many fleas are there on Champ?


This one is going to take a little more work - and we can use algebra to help solve it.


Let's have the number of fleas on Captain as A, and the number of fleas on Champ as H (taking the second letter of the two dogs' names).

If one flea jumps onto Captain, he will have A+1.  And if that flea has come from Champ, then he will have H-1.  And these numbers are the same, so A+1 = H-1  (1)


Now, if one flea jumps from Captain, he will have A-1.  And this number is five times greater than Champ's new total H+1.  So 5(A-1) = H+1    (2)

If A+1 = H-1 then A+2 = H (from 1)


And we can use this new value of H in (2), to give us 5(A-1) = (A+2) + 1

Expanding and simplifying:
5A - 5 = A + 3
4A = 8

A = 2

Captain has two fleas.

And since A+2 = H, Champ has four fleas.

A few other articles in the Mathemagic Series:

Arrange nine coins into ten straight lines
Solve 1/a + 1/b + 1/c = 1  for unique a, b, c
Solving Magic Triangles
and the slightly more complex Magic Hexagons

Wednesday, 24 June 2015

Mathematical Film Reviews

Here are some simple film reviews, expressed in mathematical form.  If you've seen some of the older films (or read the books), then you won't need to watch the newer ones (or perhaps they'll help you decide if you'd like to watch them).

Equilibrium = Fahrenheit 451 + 1984 + The Matrix

After Earth = Oblivion + Will Smith's son

Noah = Transformers + Merlin + Titanic -Bible

Live Die Repeat = Mission Impossible + Groundhog Day + 12:01 + Starship Troopers

White House Down = Olympus has Fallen

Earth to Echo = ET + Close Encounters + Batteries Not Included

Lucy = Limitless + Scarlett Johansson

The Philadelphia Experiment = Quantum Leap + Titanic + Time Tunnel

Looper = Back to the Future + Die Hard

X-Men: Days of Future Past = Back to the Future + The Incredibles


Guardians of the Galaxy = The Avengers Assemble + Star Wars IV

I'm not saying that all the films in Hollywood are derivative (in fact there are some very original films out there), I'm just pointing out some recent similarities I've found.  To be honest, many of the films I've mentioned here are actually favourites of mine.

On the subject of very original films, I'd like to share a brief word about 2001 A Space Odyssey.  It's widely regarded as a genre-defining ground-breaking film, so you might be surprised to learn that even though I'm a sci-fi fan, I didn't watch it until 2015 (even though it was released in 1968, years before I was born).

I don't know why I hadn't watched it until now.  Now, I wish I hadn't bothered.


For example, if you just want to watch a computer play chess, then watch Kasparov and the Machine.

If you like model spaceships and spacecraft, go to a hobby modeller shop
If you like actual spacecraft, watch the footage of the Sputnik launch and the early Apollo missions.
If you like listening to the Blue Danube Waltz, buy it on CD (or tape, or even vinyl).

If you like a murder mystery, go and watch (or read) Agatha Christie or Arthur Conan Doyle
If you like stories with a bizarre ending, watch The Italian Job or Planet of the Apes
If you like long drawn-out stories, watch Les Miserables (released 1925, at 5hr 59 mins), or the 1927 film Napoleon (at 5hr 30 mins).

All better in comparison, and all better for watching.  2001 A Space Odyssey's only claim to fame is that it did a lot of things first.  It's just a shame that it made so many mistakes at the same time, and while doing so many things first, it forgot about the basics like story-telling, pace, narrative, dialogue and just having things make sense.

Tuesday, 31 March 2015

Geometry: A Circle in the corner of a circle

This article is specifically written to answer the geometry question:  "What is the radius of a circle drawn in the space between a circle of radius 1 unit, and the corner of the enclosing square?" To better explain the question, and then answer it, I have drawn the diagram shown below.  The question states that the radius of the larger circle is 1 unit of length, and that it is enclosed in a square. What is the radius of the smaller circle drawn in the space in the corner region?  (The question was asked in a GCSE workbook, aimed for children aged 14-16, although the geometry and algebra became more complicated than I had expected).





The diagram isn't perfect, but I'm better at using a pencil and compasses than I am with drawing geometric shapes in Photoshop.  The larger circle has centre E, and DE = EF = 1 unit.  What is the radius of the smaller circle, with centre C (BC = CD = smaller radius).

By symmetry, the angle at A = 45 degrees, so triangles ACG and AEH are right-angled isosceles triangles.
AH and EH are equal to the radius of the larger circle = 1 unit
By Pythagoras' Theorem, length AE = √2

Length AD = AE - DE = √2 -1
However, length AD is not the diameter of the smaller circle.  The diameter of the smaller circle is BD, not AD.  We are still making progress, nonetheless.

Next, consider the ratio of the lengths AD:AF.
AD = √2 -1 as we showed earlier
AF = AD + DF = (√2 -1) + 2 (the diameter of the circle) = √2 + 1

So the ratio AD:AF =  √2 -1 :  √2 + 1

And the fraction AD/AF = √2 -1 /  √2 + 1

What is the remaining distance between the circle and the origin?
Look again at the larger circle, and the ratio of the diameter to the distance from the corner to the furthest point on the circle?

The fraction AB/AD is equal to the fraction AD/AF.  This fraction describes the relationship between the diameter of a circle and the additional distance to the corner of the enclosing square.  The diameter of the circle is not important, the ratio is fixed.

So we can divide the shorter length AD in the ratio AD:AF, and this will give us the length AB and (as we already know AD) the diameter of the smaller circle, BD.

To express it more simply and mathematically:  AD/AF = AB/AD
Substituting known values for AD and AF, this gives:

AD/AF = AB/AD

(AD^2) / AF = AB

(√2 -1)^2(√2 + 1) = AB


 Evaluating:
(√2 -1)^2 = 3 - 2 √2 = 0.17157...

and:
(√2 + 1) =  2.4142...

Now:  BD (diameter or circle) = AD ('corner' of larger circle) - AB ('corner' of small circle)
Substituting values for AD and AB, and then combining terms over the same denominator, we get:


 Having combined all terms over the same denominator, we can now simplify (√2 -1)(√2 +1), since (a+b)(a-b) = a^2 - b^2

BD is the diameter of the smaller circle, BD = 0.216...  Comparing this with the diameter of the larger circle, which is 2.00, we can see that the smaller circle is around 10% of the diameter of the larger one.  This surprised me - I thought it was larger.

In future posts, I'll look at other arrangements of circles in corners - in particular the quarter-circle in the corner (which, as a repeating pattern, would lead to a smaller circle touching four larger circles in a square-like arrangement), and a third-of-a-circle in the corner of a hexagon.  I'll then compare the two arrangements (in terms of space filled) and also check against any known alloys, looking at the ratios of diameters to see if I can find a real-life application.

Other 'circle' posts:

A Circle in the Corner of a Circle
A Circle in the Corner of a Hexagon
Close-packed Circles - calculating the space occupied
Close-packed Spheres - calculating the volume occupied




Thursday, 18 December 2014

Buy a Lego Sports Car set with Shell Petrol

Shell Petrol have a promotion on for the rest of this month, and it got my attention.  It's special promotional Lego - and Lego is one of my favourite pastimes.  The offer is this:  if you spend £30 on their special high-performance petrol, you can purchase one of the special promotional sets for £1.99.  I saw this last week, and it's been percolating in my  brain since then:  based on the price difference between the 'normal' and 'high performance' petrol, how much would you actually have to pay for the Lego?  Lego isn't cheap, and sets of this size and complexity are typically in the £4 - £5 price range, so £1.99 is a considerable saving - in theory. 



Now, in my calculations, I will assume that the mileage performance of the two petrol grades is negligible (despite any marketing messages about how good the premium petrol is).  That's a whole separate question, and one that I'd like to be able to address with an A/B test.

So:  petrol in the UK is priced per litre (the prices per gallon would be too scary to display).  Working from memory, Shell's standard unleaded petrol is approximately 119 pence per litre, while the expensive petrol is around 125 pence per litre.  Based on these assumptions, I'll complete a worked example, then dive into the algebra. 

Now, my plan here is to identify how much standard petrol I could buy with £30, to understand how much more that's going to cost me if I buy premium (as I will be doing) and what the extra cost would be if I bought the same amount of standard petrol.


If I spend £30 = 3000 pence on the standard petrol, how much petrol will I purchase?
3000 pence / 119 pence per litre = 25.21 litres of petrol

How much will it cost me to buy 25.21 litres of premium petrol?
25.21 litres x 125 pence per litre = 3151 pence

So the difference in cost would be 151 pence (£1.51).  Added to the stated cost of the Lego set (£1.99) this means that the actual total cost of the Lego set would be £1.51 + £1.99 = £3.50.  


Another view

Now, the truth is that I won't be spending the extra money on premium petrol - I will be buying £30 of premium petrol and buying less petrol.  But how much less - and what's the hidden cost of buying the premium petrol instead of the standard?

3000 pence of premium petrol at 125 pence per litre will buy me 24 litres exactly.

24 litres of standard grade petrol (at 119 pence per litre) would cost me 2856 pence, so the additional cost I'm paying is £1.44, close to the £1.51 I calculated through the other method.

Actual figures

With actual figures of 118.9 pence per litre for the standard, and 126.9 for the premium, the petrol cost difference is £1.90, and the total cost is close to the £4.00 figure I calculated through the other method.


Algebra 
Looking at this in terms of algebra:

Let E be the price per litre of the Expensive petrol, and C be the price per litre of the Cheap petrol.


 = volume of cheap petrol I would buy with 3000 pence


 

 
= difference in cost between cheap and expensive petrol.


















Application
 Now, this is all very academic, but it can be put to use with one key question:  if I think the Lego set is worth £4 (or 400 pence) then what's the maximum differential between the cheap and expensive petrol that I can accept?

If I am prepared to spend a total of 400 pence on the Lego set, then (deducting the 199p offer price) this means the maximum price difference for the petrol = 400p - 199p = 201p. 

So, if C = 119 then E = 126.8

When I re-visited the petrol station, I discovered that C = 118.9 and E = 126.9.    It's like they almost worked it out that way:  if E = 126.9 and C = 118.9 then the total cost of the Lego would be almost exactly 400p.
Did I buy the petrol?  And the Lego?



Well, yes.  But I knew I was paying more than the stated £1.99 for it :-)