Archive for the mathematics Category

Sizes, Shapes and Minkowski Functionals

Posted in mathematics, The Universe and Stuff with tags , , , , on August 27, 2022 by telescoper

Before I forget I thought I would do a brief post on the subject of Minkowski Functionals, as used in the paper we recently published in the Open Journal of Astrophysics. As as has been pointed out, the Wikipedia page on Minkowski Functionals is somewhat abstract and impenetrable so here is a much simplified summary of their application in a cosmological setting.

One of things we want to do with a cosmological data set to characterize its statistical properties to compare theoretical predictions with observations. One interesting way of doing this is to study the morphology of the patterns involved using quantitative measures based on topology.

The approach normally used deals with Excursion Sets, i.e. regions where a field exceeds a certain level usually given in terms of the rms fluctuation or defined by the fraction of space above the threshold. The field could, for example, be the temperature field on the CMB Sky or the density field traced by galaxies. In general the excursion set will consist of a number of disjoint pieces which may be simply or multiply connected. As the threshold is raised, the connectivity of the excursion set will shrink but also its connectivity will change, so we need to study everything as a function of threshold to get a full description.

One can think of lots of ways of defining measures related to an excursion set. The Minkowski Functionals are the topological invariants that satisfy four properties:

  1. Additivity
  2. Continuity
  3. Rotation Invariance
  4. Translation Invariance

In D dimensions there are (D+1) invariants so defined. In cosmology we usually deal with D=2 or D=3. In 2D, two of the characteristics are obvious: the total area of the excursion set and the total length of its boundary (perimeter). These are clearly additive.

In order to understand the third invariant we need to invoke the Gauss-Bonnet theorem, shown in this graphic:

The Euler-Poincare characteristic (χ) is our third invariant. The definition here allows one to take into account whether or not the data are defined on a plane or curved surface such as the celestial sphere. In the simplest case of a plane we get:

As an illustrative example consider this familiar structure:

Instead of using a height threshold let’s just consider the structure defined by land versus water. There is one obvious island but in fact there are around 80 smaller islands surrounding it. That illustrates the need to define a resolution scale: structures smaller than the resolution scale do not count. The same goes with lakes. If we take a coarse resolution scale of 100 km2 then there are five large lakes (Lough Neagh, Lough Corrib, Lough Derg, Lough Ree and Lower Lough Erne) and no islands. At this resolution, the set consists of one region with 5 holes in it: its Euler-Poincaré characteristic is therefore χ=-4. The change of χ with scale in cosmological data sets is of great interest. Note also that the area and length of perimeter will change with resolution too.

One can use the Gauss-Bonnet theorem to extend these considerations to 3D by applying to the surfaces bounding the pieces of the excursion set and consequently defining their corresponding Euler-Poincaré. characteristics, though for historical reasons many in cosmology refer not to χ but the genus g.

A sphere has zero genus (χ=1) and torus has g=1 (χ=0).

In 3D the four Minkowski Functionals are: the volume of the excursion set; the surface area of the boundary of the excursion set; the mean curvature of the boundary; and χ (or g).

Great advantage of these measures is that they are quite straightforward to extract from data (after suitable smoothing) and their mean values are calculable analytically for the cosmologically-relevant case of a Gaussian random field.

Here endeth the lesson.

A Leaving Certificate Applied Maths Problem

Posted in Cute Problems, Education, mathematics with tags , on June 11, 2022 by telescoper

The 2022 cycle of Leaving Certificate examinations is under way and the first Mathematics (Ordinary and Higher) were yesterday there’s been the usual discussion about whether they are easier or harder than in the past. I won’t get involved in this except to point you to this interesting discussion based on an archive of mathematics questions, that this year the papers have more choice for students and that, apparently, the first Higher Mathematics paper had very little calculus on it.

Anyway, I was looking through some old Applied Mathematics Leaving Certificate papers, as these cover some similar ground to our first year Mathematical Physics at Maynooth, and my eye was drawn to this question from 2010 about two balls jammed in a cylinder…

I’d add another: does it matter whether or not the cylinder is smooth (as this is not specified in the question)?

Your answers are welcome through the comments box!

Job Opportunity in Computer Science, Statistics or Applied Mathematics at Maynooth

Posted in mathematics, Maynooth with tags on February 21, 2022 by telescoper
This is the Library not the Hamilton Institute but you get the idea..

Just a quick post to pass on the news that my colleagues in the Hamilton Institute at Maynooth University have a vacancy for a permanent position at Professorial level.

You can find the full advert here. Please feel free to pass it on to anyone you think might be interested.

P. S. I’m looking forward to mentioning further announcements about a number of other permanent job opportunities at Maynooth in the not-too-distant future!

Scientific Computing Then and Now

Posted in Biographical, mathematics with tags , , , on February 10, 2022 by telescoper

This afternoon I was in charge of another Computational Physics laboratory session. This one went better than last week, when we had a lot of teething problems, and I’m glad to say that the students are already writing bits of Python code and getting output – some of it was even correct!

After this afternoon’s session I came back to my office and noticed this little book on my shelf:

Despite the exorbitant cost, I bought it when I was an undergraduate back in the 1980s, though it was first published in 1966. It’s an interesting little book, notable for the fact that it doesn’t cover any computer programming at all. It focusses instead on the analysis of accuracy and stability of various methods of doing various things.

This is the jacket blurb:

This short book sets out the principles of the methods commonly employed in obtaining numerical solutions to mathematical equations and shows how they are applied in solving particular types of equations. Now that computing facilities are available to most universities, scientific and engineering laboratories and design shops, an introduction to numerical method is an essential part of the training of scientists and engineers. A course on the lines of Professor Wilkes’s book is given to graduate or undergraduate students of mathematics, the physical sciences and engineering at many universities and the number will increase. By concentrating on the essentials of his subject and giving it a modern slant, Professor Wilkes has written a book that is both concise and that covers the needs of a great many users of digital computers; it will serve also as a sound introduction for those who need to consult more detailed works.

Like any book that describes itself as having “a modern slant” is almost bound to date very quickly, and so this did, but its virtue is that it does complement current “modern” books which don’t include as much about the issues covered by Wilkes because one is nowadays far less constrained by memory and speed than was the case decades ago (and which circumstances I recall very well).

The Course Module I’m teaching covers numerical differentiation, numerical integration, root-finding and the solution of ordinary differential equations. All these topics are covered by Wilkes but I was intrigued to discover when I looked that he does numerical integration before numerical differentiation, whereas I do it the other way round. I put it first because I think it’s easier, and I wanted the students do do actually coding as quickly as possible, but I seem to remember doing e.g. Simpson’s Rule at school but don’t recall ever being taught about derivatives as finite differences.

Looking up the start of numerical differentiation in Wilkes I found:

This is a far less satisfactory method than numerical integration, as the following considerations show.

The following considerations indeed talk about the effect of rounding errors on calculations of finite differences (e.g. the forward difference Δf = [f(x+δ)-f(x)]/δ or backward difference Δf = [f(x)-f(x-δ)]/δ) with relatively large step size δ. Even with a modest modern machine one can use step sizes small enough to make the errors negligible for many purposes. Nevertheless I think it is important to see how the errors behave for those cases where it might be difficult to choose a very small δ. Indeed it seemed to surprise the students that using a symmetric difference Δf=[f(x+δ)-f(x-δ)]/2δ is significantly better than a forward or backward difference. Do a Taylor series expansion and you’ll understand why!

This example with δ=0.1 shows how the symmetric difference recovers the correct derivative of sin(x) far more accurately than the forward or backward derivative:

R.I.P. Sir David Cox (1924-2022)

Posted in Biographical, mathematics, The Universe and Stuff with tags , , , , on January 21, 2022 by telescoper

I was saddened to hear a few days ago that the eminent statistician David Cox has passed away at the age of 97. I didn’t know Professor Cox personally – I met him only once, at a joint astronomy-statistics meeting at (I think) the Royal Astronomical Society back in the day – but I learnt a huge amount from books he co-wrote, despite the fact that he was of the frequentist persuasion. Three examples from my bookshelf are shown above.

I started my PhD DPhil in 1985 with virtually no formal study of statistics under my belt so I had to follow a steep learning curve and I was helped enormously by these books. I bought the book on Point Processes so as to understand some of the ideas being applied to galaxy clustering. It’s only a short book but it’s crammed with interesting ideas. Cox & Miller on Stochastic Processes is likewise a classic.

I know I’m not the only person in astrophysics whose career has been influenced by David Cox and I’m sure there are many other disciplines who have benefitted from his knowledge.

Among many other awards, David Cox was elected a Fellow of the Royal Society in 1973 and knighted in 1985.

Rest in peace Sir David Cox (1924-2022)

The Coronavirus Vaccine Effect

Posted in Covid-19, mathematics with tags , , , , , , on December 12, 2021 by telescoper

When I was updating my Covid-19 page today I thought I would try something a bit different. Here are the cases and deaths (in the form of 7-day rolling averages) as I usually plot them:

You can see a slight recent downturn – the latest 7-day average of new cases is 4214.3; it has been falling for a few days. A log plot like this shows up the changing ratio between deaths and cases quite well, as in l if you multiply a quantity by a factor that manifests itself as a constant shift upwards or downwards. There is clearly a bigger shift between the orange and blue curves after 500 days than there is, say, between, 300 and 400.

(I don’t think you can read much into the gap between the curves at the beginning (up to around 100 days in) as testing coverage was very poor then so cases were significantly underestimated.

Anyway, to look at this a bit more clearly I plotted the ratio of daily reported deaths to daily confirmed cases over the course of the pandemic. This is the result:

The sharp downward glitches occur whenever the number of reported deaths is zero, as log of zero is minus infinity. The broader downward feature after about 300 days represents the period in January 2021 when cases were climbing but deaths had not caught up. To deal with that I tried plotting the deaths recorded at a particular time divided by the cases two weeks earlier. This is that result:

The spike is still there, but is much decreased in size, suggesting that a two week lag between cases and deaths is a more useful ratio to look at. Note the ratio of deaths to cases is significantly lower from 500 days onwards than it was between 200 and 400 (say), by a factor a bit less than ten.

This obviously doesn’t translate into a direct measure of the efficacy of vaccines (not least because many of the recent cases and deaths are among the minority of unvaccinated people in Ireland) but it does demonstrate that there is a vaccine effect. Without them we would be having death rates up to ten times the current level for the same number of daily cases or, more likely, we would be in a strict lockdown.

On the other hand if cases do surge over the Christmas period there will still be a huge problem – 10 % of a large number is not zero.

Solar Corona?

Posted in Bad Statistics, Covid-19, mathematics, The Universe and Stuff on December 8, 2021 by telescoper

A colleague pointed out to me yesterday that  evidence is emerging of a four-month periodicity in the number of Covid-19 cases worldwide:

The above graph shows a smoothed version of the data. The raw data also show a clear 7-day periodicity owing to the fact that reporting is reduced at weekends:

I’ll leave it as an exercise for the student to perform a Fourier-transform of the data to demonstrate these effects more convincingly.

Said colleague also pointed out this paper which has the title New indications of the 4-month oscillation in solar activity, atmospheric circulation and Earth’s rotation and the abstract:

The 4-month oscillation, detected earlier by the same authors in geophysical and solar data series, is now confirmed by the analysis of other observations. In the present results the 4-month oscillation is better emphasized than in previous results, and the analysis of the new series confirms that the solar activity contribution to the global atmospheric circulation and consequently to the Earth’s rotation is not negligeable. It is shown that in the effective atmospheric angular momentum and Earth’s rotation, its amplitude is slightly above the amplitude of the oscillation known as the Madden-Julian cycle.

I wonder if these could, by any chance, be related?

P.S. Before I get thrown into social media prison let me make it clear that I am not proposing this as a serious theory!

The Omicron Variant

Posted in Covid-19, Crosswords, mathematics on November 30, 2021 by telescoper

As a theoretical physicist I use Greek characters all the time in mathematical work but, being very slow on the uptake, I only just realized a few days ago that the name of the Greek letter ‘omicron’ (ο) is derived from the Greek meaning ‘little-o’ while the name ‘omega’ means ‘big o’.

More recently still a Greek friend of mine pointed out that the lower-case symbol for omega (ω) was originally formed as ‘oo’, i.e. double-o.

In modern Greek ο and ω are pronounced the same but in ancient Greek the vocalisation of ω was longer than that of ο, suggesting that οmicron is more like short ‘o’ than little ‘o’ while omega is long `o’ rather than big ‘o’.

Incidentally, I was brought up to pronounce π like “pie” but in most of Europe (including Greece) it is pronounced “pee”. It is in fact the Greek letter ‘p’. I feel I’ve been delta very weak hand when it comes to Greek pronunciation and I’ll beta majority of theoretical physicists feel the same. I think we need to take a nu approach in schools, and rho back from the old ways. Anyway I’m going home now to eta bit of curry for supper…

On Fourier Series

Posted in mathematics, Maynooth, The Universe and Stuff with tags , , , , , , on November 30, 2021 by telescoper

So here we are, in the antepenultimate week of the Autumn Semester, and once again I find myself limbering up for the “and” bit of my second-year module on Vector Calculus and Fourier Series, i.e. Fourier Series.

As I have observed periodically, I don’t like to present the two topics mentioned in the title of this module as completely disconnected, so I linked them in a lecture in which I used the divergence theorem of vector calculus to derive the heat equation, the solution of which led Joseph Fourier to devise his series in Mémoire sur la propagation de la chaleur dans les corps solides (1807), a truly remarkable work for its time that inspired so many subsequent developments.


Anyway I was looking for nice demonstrations of Fourier series to help my class get to grips with them when I remembered this little video recommended to me some time ago by esteemed Professor George Ellis. It’s a nice illustration of the principles of Fourier series, by which any periodic function can be decomposed into a series of sine and cosine functions.

This reminds me of a point I’ve made a few times in popular talks about astronomy. It’s a common view that Kepler’s laws of planetary motion according to which which the planets move in elliptical motion around the Sun, is a completely different formulation from the previous Ptolemaic system which involved epicycles and deferents and which is generally held to have been much more complicated.

The video demonstrates however that epicycles and deferents can be viewed as the elements used in the construction of a Fourier series. Since elliptical orbits are periodic, it is perfectly valid to present them in the form a Fourier series. Therefore, in a sense, there’s nothing so very wrong with epicycles. I admit, however, that a closed-form expression for such an orbit is considerably more compact and elegant than a Fourier representation, and also encapsulates a deeper level of physical understanding.

The Hardest Problem

Posted in Cute Problems, Education, mathematics with tags , , , on November 19, 2021 by telescoper

The following Question, 16(b), is deemed to have been the hardest problem on the Maths Extension 2 paper of this year’s HSC (Higher School Certificate), which I think is the Australian Equivalent of the Leaving Certificate. You might find a question like this in the Applied Mathematics paper in the Leaving Certificate actually. Since it covers topics I’ve been teaching here in Maynooth for first-year students I thought I’d share it here.

I don’t think it’s all that hard really, probably because it’s really a physics problem (which I am supposed to know how to solve), but it does cover topics that tend to be treated separately in school maths (vectors and mechanics) which may be the reason it was found to be difficult.

Anyway, answers through the comments box please. Your time starts now.