All The Stuff You Wished You Knew About Fourier Transforms But Were Afraid To Ask

The Fourier transform underpins so much of our technological lives, in most cases probably without our realising it. The ability to mathematically split a waveform into its frequency components and vice versa underpins much of the field of digital signal processing, and DSP has become an essential part of many electronic devices we take for granted.

But while most of us will know what a Fourier transform is, fewer of us will know anything of how one works. They are a function called from a library rather than performed in themselves. Even when they are taught in schools or university courses they remain something that not all students “get”, and woe betide you if (as your scribe did) you have a sub-par maths lecturer.

The video below the break then is very much worth a look if Fourier transforms are a bit of a mystery to you. In it [Grant Sanderson] explains them through a series of simple graphical examples in a style that perhaps may chalk-and-talk mathematics teachers should emulate. You may still only use Foruier transforms through a library, but after watching this video perhaps some of their mysteries will be revealed.

Continue reading “All The Stuff You Wished You Knew About Fourier Transforms But Were Afraid To Ask”

Building A Working Game Of Tetris In Conway’s Game Of Life

If you haven’t been following along with Conway’s Game of Life, it’s come a long way from the mathematical puzzle published in Scientific American in 1970. Over the years, mathematicians have discovered a wide array of constructs that operate within Life’s rules, including many that can be leveraged to perform programming functions — logic gates, latches, multiplexers, and so on. Some of these creations have gotten rather huge and complicated, at least in terms of Life cells. For instance, the OTCA metapixel is comprised of 64,691 cells and has the ability to mimic any cellular automata found in Life.

A group of hackers has used OTCA metapixels to create a Tetris game out of Life elements. The game features all 7 shapes as well as the the movement, rotation, and drops one would expect. You can even preview the next piece. The game is the creation of many people who worked on individual parts of the larger program. They built a RISC computer out of Game of Life elements, as well as am assembler and compiler for it, with the OTCA metapixels doing the heavy lifting. (The image at the top of the post is the program’s data synchronizer.

Check out the project’s source code on GitHub, and use this interpreter. Set the RAM to 3-32 and hit run.

For a couple of other examples of Life creations, check out the Game of Life clock and music synthesized from Life automata we published earlier.

Symmetry For Dummies: Noether’s Theorem

Einstein referred to her as the most important woman in the history of mathematics. Her theorem has been recognized as “one of the most important mathematical theorems ever proved in guiding the development of modern physics.” Yet many people haven’t the slightest clue of who this woman was, or what she did that was so significant to our understanding of how our world works. If you count yourself as one of those who have never heard of Emmy Noether and wish to enlighten yourself, please read on. I can only hope I do her memory justice. Not just by telling you who she was, but by also giving you an understanding of how her insight led to the coming together of symmetry and quantum theory, pointing academia’s arrow toward quantum electrodynamics.

N_01
Emmy Noether

Being a female in Germany in the late 1800s was not easy. She wasn’t allowed to register for math classes. Fortunately, her father happened to be a math professor, which allowed her to sit in on many of his classes. She took one of his final exams in 1904 and did so well that she was granted a bachelors degree. This allowed her to “officially” register in a math graduate program. Three years later, she earned one of the first PhD’s given to a woman in Germany. She was just 25 years old.

1907 was a very exciting time in theoretical physics, as scientists were hot on the heels of figuring out how light and atoms interact with each other. Emmy wanted in on the fun, but being a woman made this difficult. She wasn’t allowed to hold a teaching position, so she worked as an unpaid assistant, surviving on a small inheritance and under-the-table money that she earned sitting in for male professors when they were unable to teach. She was still able to do what professors are supposed to do, however – write papers. In 1916, she would pen the theorem that would have her rubbing shoulders with the other physics and mathematical giants of the era.

Noether’s Theorem – The Basics

Emmy Noether’s Theorem seems simple on the onset, but holds a fundamental truth that explains the fabric of our reality. It goes something like this:

For every symmetry, there is a corresponding conservation law.

We all have heard of laws such as Newton’s first law of motion, which is about the conservation of momentum. And the first law of thermodynamics, which is about the conservation of energy. Noether’s theorem tells us that there must be some type of symmetry that is related to these conservation laws. Before we get into the meaning, we must first understand a little known subject called The Principle of Least Action.

The Universe is Lazy

N_02I would wager a few Raspberry Pi Zeros that many of you already have an intuitive grasp of this principle, even if you’ve never heard of it before now. The principle of least action basically says that the universe has figured out the easiest way possible to get something done. Mathematically, it’s the sum over time of kinetic energy minus potential energy as the action occurs. Let us imagine that you’re trying to program an STM32 Discovery eval board in GCC. After about the 6,000th try, you toss the POS across the room and grab your trusty Uno. The graph depicts the STM32 moving through time and space.

 

The green points represent particular points of how how high the STM32 is at a given point in time. Note that there are no values for height and time – this example is meant to explain a principle. We can say that at these points (and all points along the curve), the SMT32 has both kinetic and potential energies. Let us call the kinetic energy (kt) and the potential energy (pt). The ‘t‘ subscript is for time, as both the energies are functions of time. The action for each point will be called s, and can be calculated as:

s = k_t-p_t

However, action is the total sum of the difference of energies at each point between t1 and t2. If you’ve read my integral post, you will know that we need to integrate in order to calculate the total action.

S = \int_{t_1}^{t_2} (k - p) dt

Now before you get your jumper wires in a bunch, all that is saying is that we’re taking the difference in potential (p) and kinetic (k) energies at each point along the curve between t1 and t2, and we’re adding them together. The elongated S symbol means a sum, and the (dt) means as it changes over time. The path that the STM32 will take will be the path where the action S is at its minimum value. Check out the video in the source section below if you’re confused. It’s only 10 minutes and goes into this concept in easy to follow details.

Noether’s Theorem – The Details

N_03Noether’s theorem is based upon a mathematical proof. It’s not a theory. Her proof can be applied to physics to develop theories, however. Now that we know what the principle of least action is, we can do just this.

Any law of nature can be traced back to a symmetry and the least action principle. Let’s consider two very simple examples – Newton’s first law of motion and the first law of thermodynamics.

Conservation of Momentum

Space has what is known as translational symmetry. That’s just fancy-pants talk for saying that what you do in one point in space is the same as what you do in another point in space. It doesn’t matter what hacker space you throw your STM32, it will act the same at all hacker spaces on earth. Space itself provides the symmetry. And because the principle of least action applies, you have a natural law – the first law of motion.

Conservation of Energy

Time has the same translational symmetry as space does. If I toss the STM32 now, and toss it tomorrow, it will act the same. It doesn’t matter what point in time I toss it, the results will always be the same. Thus energy is conserved between different points in time. Time is our symmetry, and the 1st law of thermodynamics is the result.

Now, I realize these examples might seem a bit useless. But when you dig a bit deeper, things get interesting. Electrical charge is also conserved. Noether says there must then be some type of symmetry involved. What do you suppose that symmetry might be? Keep following that rabbit hole, and you’ll end up face to face with QED. We’ll get there in a future article, so for now just keep Noether’s Theorem in mind.

Sources

Physics Helps, The principle of least action, video link.

Ransom Stephens, Ph.D., Emmy Noether and The Fabric of Reality, video link

Prime Numbers Are Stranger Than You Thought

If you’ve spent any time around prime numbers, you know they’re a pretty odd bunch. (Get it?) But it turns out that they’re even stranger than we knew — until recently. According to this very readable writeup of brand-new research by [Kannan Soundararajan] and [Robert Lemkein], the final digits of prime numbers repel each other.

More straightforwardly stated, if you pick any given prime number, the last digit of the next-largest prime number is disproportionately unlikely to match the final digit of your prime. Even stranger, they seem to have preferences. For instance, if your prime ends in 3, it’s more likely that the next prime will end in 9 than in 1 or 7. Whoah!

Even spookier? The finding holds up in many different bases. It was actually first noticed in base-three. The original paper is up on Arxiv, so go check it out.

This is a brand-new finding that’s been hiding under people’s noses essentially forever. The going assumption was that primes were distributed essentially randomly, and now we have empirical evidence that it’s not true. What this means for cryptology or mathematics? Nobody knows, yet. Anyone up for wild speculation? That’s what the comments section is for.

(Headline photo of researchers Kannan Soundararajan and Robert Lemke: Waheeda Khalfan)

Bone Up On Your Multiplication Skills

John Napier was a Scottish physicist, mathematician, and astronomer who usually gets the credit for inventing logarithms. But his contributions to simplifying mathematics and building shorthand solutions didn’t end there. In the course of performing the many calculations he needed to practice these subjects in the 1500s, Napier invented a kind of computing mechanism for multiplication. It’s a physical manifestation of an old system known as lattice multiplication or gelosia.

Lattice multiplication makes use of the multiplication table in order to multiply huge numbers together quickly and easily. It is thought to have originated in India and moved west into Europe. When the lattice method reached Italy, the Italians named it gelosia after the trellised window covering it resembled, which was commonly used to keep prying eyes away from one’s possessions and wife.

Continue reading “Bone Up On Your Multiplication Skills”

How To Find A Lost Drone With The Integral

If I asked you to find the area of a square, you would have no problem doing so. It would be the same if I asked you to find the volume of a cone or rectangle or any other regular shape. You might have to turn to Google to get the proper formula, but it would be a trivial process nonetheless. But what if I asked you to find the volume of some random vase sitting on a kitchen counter? How does one go about finding the volume of irregular shapes?

One way would be to fill the vase with much smaller objects of a known volume. Then you could add up the smaller volumes to get an estimate of the total volume of the vase. For instance, imagine we fill the vase with marbles. A marble is a sphere, and we can calculate the volume of each marble with the formula zeno014/3πr3. We count all of our marbles and multiply the total by the volume of a single marble and arrive at our answer. It is not perfect, however. There is a lot of empty space that exists between the marbles as they fill the vase. We are forced to conclude that our estimated volume will be lower that the actual volume.

It would be about this time when our good friend Isaac Newton would ask the question “What if you made the marbles smaller?” Reducing the size of each marble would reduce the empty space that exists between them as they pile up in the vase, giving us a more accurate total volume. But how small? Is there a limit to how small we can make them? “Do not trouble yourself with the limit.” says [Newton]. “You will find that as you make the marbles smaller and smaller, you will begin to converge on a single number – and that number will be the exact volume of your vase.”

Reducing the size of the marble to get a more exact volume demonstrates the idea of the integral – one of the two fundamental principles of The Calculus. The other principle is known as the derivative, which we explained in our previous article by taking a very careful and tedious examination of an arrow in flight. In this article, we shall take the same approach toward the integral. By the end, you will have a fundamental understanding of what the integral is, and more importantly, how it works. Our vase example gives you a good mental image of what the integral is all about, but it is hardly a fundamental understanding of it. Just how do you make those marbles smaller? To answer this question, let us look again at one of Zeno’s moving arrows.

Continue reading “How To Find A Lost Drone With The Integral”

Calculus Is Not Hard – The Derivative

The Calculus is made up of a few basic principles that anyone can understand. If looked at in the right way, it’s easy to apply these principles to the world around you and to see how the real world works in their terms. Of the two main ideas of The Calculus — the derivative and the integral — today we’ll focus on the derivative.

You can enjoy this article by itself, but it is also worth looking back at the previous installment in this series. We went over the history of The Calculus and saw how it arose from two paradoxes put forth by a 4th century philosopher named Zeno of Elea. These paradoxes lead to the derivative/integral ideas that revolutionized mankind’s understanding of motion.

Continue reading “Calculus Is Not Hard – The Derivative”