Cool logic in the face of fire

“Well, look at it logically,” said Hermione, turning to the rest of the group. “I mean, Binky didn't even die today, did he? Lavender just got the news today.”
Lavender wailed loudly.

— Hermione Granger in Prisoner of Azkaban

Again and again Hermione manages to demonstrate her emotional range being that of a robotic teaspoon. Because of that, I think it would be fair to build our very own Hermione (using Prolog), and try and win ourselves “50 points for Gryffindor”!

In Philosopher’s Stone, Harry and Hermione find themselves trapped in a chamber on the way to get the stone. There are a number of flasks on a table together with a piece of paper bearing a riddle:

Potions -fullwidth

Continue reading

A simple way to approximate $e$

\begin{align} \frac{22}{7} &= 3.14285714285714…&{} &\approx \pi \\ e^\pi - \pi &= 19.9990999791894…&{} &\approx 20 \end{align}
\begin{align} &\Rightarrow & e^{\frac{22}{7}} - \frac{22}{7} &\approx 20 \\ &\Rightarrow & e^{\frac{22}{7}} &\approx 20 + \frac{22}{7} \\ &\Rightarrow & e &\approx \sqrt[\frac{22}{7}]{20 + \frac{22}{7}} \\ &&&= (20 + \frac{22}{7})^{\frac{7}{22}} \\ &&&= 2.7172692474731… \end{align} Close enough.

Continue reading

Fibonacci spirals and the mind of plants

Plants are bimbos. Beautiful, but stupid–at least that’s what most people think. But in this post I want to talk about why I think plants are much more intelligent than people give them credit for. You’ve probably seen the pretty spirally patterns that emerge in many plants when leaves or seeds grow outwards (see figure below). I think they are very interesting and I want to convince you that plants do need to be intelligent to be able to create them.

Plants -fullwidth

Spirals!1

1

A well known fun-fact about these spirals is their connection to the Fibonacci numbers. These are the numbers belonging to the Fibonacci sequence: $1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …$ (every number is the sum of its two preceding numbers). In plants, these spirals almost always2 seem to have a Fibonacci number of arms (see the figure below).

  1. Source 1, Source 2, Source 3 

  2. Swinton, J., Ochu, E., & MSI Turing’s Sunflower Consortium. (2016). Novel Fibonacci and non-Fibonacci structure in the sunflower: results of a citizen science experiment. Royal Society open science, 3(5), 160091. 

Continue reading

Having a blog

The first rule of writing is “Know your reader.” I don’t know my reader. In fact, there is no reader yet. So this makes things a bit more difficult, but I’ll try my best.

To get a grasp of the audience, maybe some code can help us analyse the situation. To be realistic, I will assume that there are one million people currently reading this.1 They are randomly distributed on the so-called “Nerd Scale”:

N = 1000000                             # That's just the beginning!
initial_readers = np.random.randn(N)    # Draw N random people from the global population (normally distributed along nerd scale)

If we plot a histogram of the current readers regarding their nerd factors, this is what we get:

Initial Readers -fullwidth

To clarify how this scale works, one may refer to the table below:

  1. Proof (live analytics):  

Continue reading