Posts

Lightweight building material seen in Devs

Image
Quantum physics slash Silicon Valley drama Devs features an interesting architectural idea, namely a floating laboratory.  In order make a laboratory float you need very lightweight construction materials and it seems that they've solved this problem by using Menger Sponge bricks, which are very lightweight indeed. A Menger Sponge is a 3D version of this To make a Menger Sponge you need to perform an iteration.  Start with any shape, then make 8 copies each scaled down by a factor of 3, and use them to construct the perimeter of a square.  Then take that shape and do the same operation, and keep repeating.  The picture above shows that you end up with the same thing whether you start with a solid square or a hollow square.  But actually it doesn't matter what shape you start off with (as long as it's bounded). So, what's the area $A$ of the 2D version Menger Sponge shown above?  We can see from the first row in the picture that it's made up of 8 copies of itself,

Fossil Fuel Free Pensions

Image
Fossil Fuels are dragging your pension down!   At the end of last year I finally managed to switch to a fossil fuel free pension.  The journey wasn't completely straightforward, but it was worth it and hopefully this will become a lot easier in the near future. Why do this? There's a bunch of things you can do to reduce your carbon footprint including giving up flying and eating less meat, and I recommend all of them.  But right at the top has to be to stop investing in fossil fuel companies.  A typical pension pot in the UK is around £88,000 of which - typically - 4% is invested in oil, gas, and coal.  That's three and half grand of your money going directly to the likes of ExxonMobil.  If you simply spent this much on tax free petrol it would buy you about 8.8 tons of fuel which would create about 29 tons of CO2, or about 5x the annual emissions of an average Brit.  But investing probably results in an order of magnitude more emissions $^\dagger$ . But it's worse t

How much of the UK's arable land will be needed to make it's biofuel?

Image
According to this story on today's BBC news website the UK government is set to mandate the proportion of ethanol in standard petrol is increased from 5% to 10%.  The 5% grade is known as E5 and the new grade will be known as E10. So, how much of the UK's arable land would be needed to make this, if it were made here? The article says " Ethanol is a kind of alcohol manufactured from plants, including sugar beet and wheat ".  Since sugar beet can be grown successfully in the UK, and it has a higher ethanol yield than wheat per square metre, I'm going to assume that we make the ethanol entirely from sugar beet.  So let's see if we can work out what proportion of the UK's 60,000 sq km arable land would be needed to power 10% of it's vehicle miles: In [ 1 ]: beet_ton_per_sq_km_per_year = 1320 In [ 2 ]: litre_biofuel_per_ton_beet = 108 In [ 3 ]: litre_biofuel_per_sq_km_per_year = beet_ton_per_sq_km_per_year*litre_biofuel_per_ton_beet In [ 4 ]: gallon_b

Mass Extinction and ... Flying Cars!

Image
What's Strange about this clip?   (fair use)   This programme about the future appeared on my TV last night, and it touched on an issue close to my heart: the future viability of life on Earth.     The first 3 minutes 45 seconds delivers some of the stark evidence for what we are doing and projections for where we are heading.  There's no emotion on display, but that's fine - we can't be emotional all the time and there's room for dispassionate analysis as well as appeals to the heart.  But then something strange happens at 3:48 - the presenter Hannah Fry introduces the next subject with an incredibly chirpy "Flying Cars! There - I've said it". Watching this one is left thinking:   Either I'm mad or everyone else is.  We've just been told that the average population decline across all species between 1970 and 2020 will be 67%.   And after dedicating three and bit minutes to that we're now talking about flying cars!  I'm worried we won

Why are we talking about hydrogen boilers?

Image
  Hydrogen is an incredibly inefficient way to heat your home compared with heat pumps.  Heat pumps move about 4 times as much energy in the form of heat as the electrical energy they consume.  With hydrogen boilers the heat is created from chemical energy rather than moved and so there's no such upscaling.  In fact it's worse than that since the hydrogen has to be created in the first place and if you're creating it from renewable electricity about a third is wasted. Despite the horrendous waste, hydrogen boilers may have a role.  Heat pumps require an insulated hot water tank and many houses, especially in the UK, will not have space for an airing cupboard.  So perhaps the solution will be to install heat pumps where-ever possible and then use the much-less efficient hydrogen boilers to mop up the rest.  The risk, however, is that the government's enthusiasm for Hydrogen will slow down the decarbonisation of our heating sector. We are in a deadly race, with only a fe

Comparison of Covid deaths India vs UK

Image
  The news here in the UK over the last couple of months has focussed on the unfolding catastrophe of Covid19 in India.  It has been implicit in pretty much all of the coverage that the situation there is much much worse than we have suffered in the UK, and this has been backed up by numbers showing just how many more people have died in India than here. True to form, our media have almost universally failed to take into account the fact that the population of India is nearly 25 times bigger.  I think dividing one number by another is not part of the training.... Here's a chart that puts things in context.  I've used 66.65 million for the UK population and 1.366 billion for India: INDIA OFFICIAL:   These are the Indian government official statistics republished by JHU CSSE COVID-19 Data showing 311,000 deaths INDIA ESTIMATE: These are from David Spiegalhalter and are based on excess mortality.  The best estimate is 1.6 million but could be as low as 600,000 or as high as 4 mi

Spinning Top

Image
Simple example from The Theoretical Minimum I recently re-read The Theoretical Minimum - Classical mechanics , an excellent book. The authors give an example of the use of the Hamiltonian formulation of mechanics to illustrate how much easier it makes things (compared to the Newtonian formulation) and that inspired me to have a go myself. The example they give in the book is of a negligible mass charged sphere spinning in a magnetic field pointing in the z direction. In this case the Hamiltonian $H = T + V$ is proportional to $L_z$ where $\mathbf{L}$ is the angular momentum $L_x \hat{i} + L_y \hat{j} + L_z \hat{k}$. Let's say $H=\omega^2L_z$. The book explains that for any function $G(q,p)$ of the generalized coordinates $q_i$ and the conjugate momenta $p_i$ that $$ \dot{G} = \{G,H\} $$ i.e the time derivative of $G$ is the poisson bracket of $G$ and the Hamiltonian. And indeed this does make the solution simple because the components of angular momentum satisfy $$ \begin{align}

Cathy Comb Home

Image
 I've just found this design I must have drawn when I was 16 I had a girlfriend at the time called Catherine with very long hair.  In fact it was so long she could sit on it.  Anyway, I was amazed at how much time she spent combing - about half an hour every day.  She'd start at the bottom and work her way up, combing all the way to the ends with each stroke. I thought that there had to be a better way, so I came up with this machine.  The two belts rotate in opposite directions and the angle between them gradually decreases so that it starts off just untangling the ends and ends up combing the whole length of the hair. Fortunately it never got built.

Thinking of repainting the kitchen

Image
... One day. But I don't want to lose this important historical information - my offspring's height vs time! So I've converted it into a nice graph Using some code #!/usr/bin/env python3 from datetime import datetime from matplotlib import pyplot as plt table = [ (132.4, '10/7/11' ), (134.8, '14/9/11' ), (136.9, '2/3/12' ), (138.4, '7/9/12' ), (141.5, '25/5/13' ), (142.6, '23/6/13' ), (145.8, '15/3/14' ), (148.7, '15/11/14' ), (150.0, '20/1/15' ), (153.1, '8/6/15' ), (157.7, '12/11/15' ), (159.0, '21/12/15' ), (160.1, '7/2/16' ), (164.1, '12/6/16' ), (167.6, '27/12/16' ), (169.9, '4/3/17' ), (171.7, '14/11/17' ), (172.1, '6/6/18' ), (172.9, '24/8/19' ), (173.6, '2/4/20' ), ] def labelToX(label: str): d,m,y = label.sp

How much would car tax be if we treated cars like cladding?

Image
Are we approaching the cladding crisis rationally? Cladding is in the news at the moment.  In response to the tragedy at Grenfell the UK government has introduced regulations requiring buildings with "unsafe" cladding to be patrolled.  This is obviously expensive and in most circumstances the cost is borne by the leaseholder.  The average paid per leaseholder is £137 per month (with a median of double that).  If we assume an average of two occupants per flat that comes to £822 per occupant per year. Obviously these actions may save lives.  But there are many other risks that we face day in and day out and it is worth considering whether we price these risks the same.  After all, that money has consequences - it has bankrupted people, particularly those who face the tail end of the cost distribution.  So let's try to work out how much car tax would be if we treated the risk of dying in a traffic accident in the same way, and loaded the cost per life onto drivers the way we

Many Worlds Quantum Tic Tac Toe

Image
MWQT$^3$ I've just discovered Quantum Tic Tac Toe .  This is a brilliant game designed to give players an intuition for Quantum Mechanics without requiring them to learn any complicated mathematics. Superposition Instead of playing in just one square each player gets to play in two squares at once.   Here player X has played in the 1st & 2nd squares on their first move, the 3rd & 6th squares on their 2nd move, and the 8th & 9th squares on their 3rd move.  Similarly player O has played on two squares each move, and the marks are subscripted to indicate when in the game play they were laid down. Entanglement Ultimately each pair of marks will be replaced with a single mark and the board will look like ordinary Tic Tac Toe - which is how we are able to determine a winner.  But the final location of, say, $O_2$ may need to depend on the final location of, say, $X_1$ if we are to avoid ending up with squares with multiple marks in them.  In this case the moves $X_1$ and $O_2

Finite State Machine Wizard

Image
    Here's my free to use, no attribute required FSM Wizard .  This one generates C++ code.  I'm not a fan of C++ but it happens to be the language I'm using at the moment.  However, it can easily be ported to other languages if desired. The FSM Wizard works like this 1. Write a CSV file with format initialState,Event,NewState,ActionFn,OptionalComment .  The code includes an example called MyFsm.csv RedGateLow,TrainPassed,RedGateLow,CheckLine, RedGateLow,LineClear,RedGateLow,RaiseGate, RedGateLow,GateRaised,Green,SetGreen, Green,TrainDetected,Yellow,StartTimerYellowRed Yellow,TimerExpired,RedGateHigh,StartTimerRedGate RedGateHigh,TimerExpired,RedGateHigh,LowerGate RedGateHigh,GateLowered,RedGateLow,  2. Run the wizard: ./fsmGen.py MyFsm.csv   3. View the output PNG file and optionally edit the autogenerated C++ files

Can population control solve the climate crisis?

Image
Yes and no. According to the IPCC, if we continue to emit as we do now, we have 10 years worth of carbon budget remaining before we reach a dangerous 1.5$^\circ$C of warming.  We can avoid exceeding this budget by  halving our emissions between now and 2030, and then bringing them to zero by 2040. Let's imagine an incredibly successful population control strategy, based on family planning, that results in zero births this decade.  By how much would the world's population fall?  According to Wikipedia the average life expectancy globally is about 72 , so let's assume that anyone over the age of 62 would shuffle off this mortal coil by 2030.  According to the UN there were 962 million people over the age of 60 in 2017 , so there's at most that many over the age of 62 now.  Oh dear that means that the population would only fall by $100\times\frac{0.962}{7.8}$ or 12%, but we'd need it to fall by 50% if it was our main strategy in reducing emissions. So, population contr

Christmas Cracker Magic Trick

Image
 When I was a kid I pulled a Christmas Cracker and 6 cards with numbers fell out: It's a mind reading magic trick.  Have a go against my virtual assistant, and see if you can work out how it's done:

Misunderstanding the Continuum Hypothesis

Image
(sometimes) A few days ago I read this article and realized I'd misunderstood the Continuum Hypothesis.  The Continuum Hypothesis is a statement in the language of set theory that says something like this: There's no set whose cardinality is between that of the real numbers $\mathbb{R}$ and the integers $\mathbb{Z}$. Set Theory Set theory is an axiomatic theory designed to give a rigorous foundation to our intuitive beliefs about sets.  The axioms of set theory take for granted just two things:  That there is a collection - also known as a class - of objects, which are known as sets That there is a binary relation between sets, represented by the symbol $\in$, and where $x \in A$ is read as "x is an element of A". Those two assumptions in themselves do not create any sort of parallel between the objects discussed and the naive concept of the "set".  That's the purpose of the axioms.  There's about 10 of these - known as the Zermelo-Fraenkel axioms

The arrow of time

Image
Why do we experience time the way we do?  The future seems a very different beast to the past, but as far as we can tell all of nature's fundamental laws are fully reversible.  Take a ball that's just been kicked into the air.  Newton tells us that the ball will lose speed as it rises to it's greatest height at which point it will start to fall and that it will trace out a parabola as it does.  However, if we play the video backwards, the ball will do exactly the same thing,   and this is   because the laws apply equally well when you start with "final" conditions instead of "initial" conditions and rewrite the equations in terms of "backwards time" $\tau = -t$ instead of time $t$. Despite this we do not experience the two directions the same.  In this post I will give an argument for why this is the case - one that borrows from thermodynamics, Hamiltonian classical mechanics, and Landauer's Limit. Phase Space and Entropy The 19th Century I

Why is Trump replacing NOAA director with a climate denier?

Image
Probably to stop them reporting things like this: Smoke from Californian wildfires is turning the sky pink in New York. The president does not want Americans to know.

Gormanian calendar shell utility

Image
CAL++(1)                    BSD General Commands Manual                   CAL++(1) NAME      cal++ — displays The Gormanian Calendar SYNOPSIS     cal++ -h     cal++ [-y] [[month] year] DESCRIPTION The cal++ utility displays a simple Gormanian calendar. The options are as follows: -h       help -y      [DEPRECATED] Make Gormanian year match Gregorian year. This is deprecated as it causes Dave Gorman's birthday to inconveniently have different representations in the two calendars. However, the option is included for compatibility with some online calculators. A single parameter specifies the year (1–9999) to be displayed; note the year must be fully specified: “cal++ 89” will not display a calendar for 1989. Two parameters denote the month and year; the month is either a number between 1 and 14 - where 14 represents the Intermission.  The current date is highlighed if it appears in the output. A year starts on March 1. SEE ALSO cal(1) HISTORY The Gormanian calendar