Maths does not need colours

If the world would be in black and white maths was exactly the same that it is.

There is indeed no need of colours in maths at all. The basic fact that justifies this is that we can code maths with only zeros and ones, or in other words,  in black and white.  In this sense, maths is a science that do not “see in colours”.

In practical terms, if we could create a mathematical machine to simulate a human being it should be unable to see colours, however it could distinguish among them. Let me explain this. It is easy to write a program in order to distinguish colours, and surely it will work well in most of the cases. However, distinguish is different from see. If we take a look to what the machine really sees whenever it watches a colour, we should realise that it is indeed an image in black and white of what a colour is. The reason is that the machine understands in mathematical terms. This makes a huge difference between our perception of the word and the one of a mathematically made machine.

Paradoxically, it is usually said that teaching mathematics needs colours. This is because we are not mathematically programmed machines, moreover, colours allows us to incorporate, understand, remember and differentiate mathematical objects (surely a phycologist could say more about this). More in general, we are used to perceive our surrounding using colours, so, it is not very surprising that representing maths with colours do help us to understand them better (this is an interesting fact, that many maths professors could exemplify vasty).

It is a bit sad that a colour is indeed a not definable object in mathematics, so a proper definition of something so trivial is far beyond what we (mathematicians) can define. Defining a colour is a problem that more successfully than we, physicists, artists, phycologists, physicians and writers have accomplished, however, its fully comprehension looks at least intriguing.


Fire simulation

I was playing the nice video game Ni no Kuni. To be more specific, I was playing a stage called The Mountain of Fire, about a volcano that is going to erupt (in three minutes!). In the scene there are molten rocks, lava and fire. A natural question at this point is: how does the game simulate fire?

A short answer by a mathematician is using the Navier-Stokes Equation, and the one by a ”wikipedian” is using the paper Real-Time Fluid Dynamics for Games by Jos StamHowever, this problem is far more fascinating than this. My goal here is to explain in a few simple words why. I will start exhibiting the Navier-Stokes Equation, then I will comment about how to simulate fire and I will exhibit some simulations. Finally, I will enumerate current applications and possible ones.

The Navier-Stokes Equation

The Navier-Stokes equation is a basic model for incompresible fluids, like the water. We start by considering a velocity field

\begin{aligned}  u:&\mathbb R\times \mathbb R^3& \to &  \mathbb R^3\\  &(t,x)&\mapsto& u(t,x)=(u_1(t,x),u_2(t,x),u_3(t,x))  \end{aligned}

and the pressure

\begin{aligned}  p:&\mathbb R\times \mathbb R^3& \to &  \mathbb R\\  &(t,x)&\mapsto& p(t,x)  \end{aligned}

that depend on the time t and position x. Each fluid has a viscosity constant \nu>0. The Navier-Stokes equation is given by the system of equations

\begin{aligned}  &\frac{\partial}{\partial t} u+ (u \cdot\nabla)u=\nu \Delta u-\nabla p,\\  &\nabla \cdot u=0,\\  &u(0,x)=u_0(x).  \end{aligned}

Given a smooth initial velocity field u_0(x), a global smooth solution of the Navier-Stokes equation is a smooth velocity field u:[0,+\infty)\times\mathbb{R}^3\to\mathbb{R}^3 and a pressure function p:[0,+\infty)\times\mathbb{R}^3\to\mathbb{R} satisfying the system of equations.

The justification of the Navier-Stokes equation will not be discussed here, a note on its more important points can be found here, for example.

A solution u of the Navier-Stokes equation is said to blow up if \sup_{x\in\mathbb{R}^3}|u(t,x)|\to +\infty as t\to +\infty, i.e., at some time there is flow with arbitrarily high velocity. Whether is theoretically possible to always find global solutions that do not blow up is an open problem. You can read an explanation of why it is a complicated problem in Terry weblog.

How to simulate Fire

There is a well developed research field called Computational Fluid dynamics, that in particular, studies algorithms to simulate solutions of the Navier-Stokes equation. Numerical simulations using real data suggest, indeed, that there is always a global solution that do not blow up (as it is expected). If you are interested in understanding how to simulate solutions of the Navier-Stokes equation you can read this paper, for example.


The Simulations showed here were made using some examples provided in the software Fire Dynamics Simulator (FDS) and Smokeview (SMV).

hqdefault Circular burner

Smoke_Simulation Smoke Simulation



As I motivated this post, the Navier-Stokes equation can be applied to simulate fire and smoke in modern video games. However, there are many other applications. I can enumerate some natural examples:

  1. Weather forecasting.
  2. Chemical and Energy industries.
  3. Evacuation routes and placement of fire alarms in case of smoke or fire in cities, forest, buildings, etc. See for example

    [RUSHMEIER, H. 1994. Rendering Participating Media: Problems and Solutions from Application Areas. In Proceedings of the 5th Eurographics Workshop on Rendering, 35–56].

  4. Ventilation design of the ocean, cities, buildings, miners, computers, etc.
  5. Design of planes, trains, ships, cars, bikes, etc.  More in general, the design of any device that interact with a fluid in order to accomplish a specific function, like, high stability, high velocity, etc.
  6. Design of anti-tsunami systems.
  7. Mathematical Cardiology, i.e. the modelling and simulation of the circulatory system.
  8. Increasing the velocity of transmission of information about certain properties that depend on fluids.

Artistic representation of fluids

The representation of fluids in arts is typical of an artistic movement called Expressionism. Expressionist artists combine together the representation of certain specific physical phenomena and the representation of daily life situations,  as a results, they create an emotional response to the viewer. Usually, the expressionism is studied from the point of view of the psychology, however, from a mathematical physic point of view we are interested in the specific physical phenomena that the artists use. We show examples of artistic representation of fluids by expressionist artists. 


The Scream (or The Cry) 1893, Edvard Munch.

The Cry is a representation of different fluids interacting together: a human being, a river and the atmosphere.

STARRY NIGHT by Vincent Van Gogh
The Starry Night 1889, Vincent van Gogh.

The Starry Night has been studied by many people, I will limite myself here to mention that the astronomer Charles A. Whitney studied the painting from the astronomic point of view. In particular, the brightest star is Venus and the moon was waning gibbous. From my point of view van Gogh is a step away (in physical terms) from the Navier-Stokes equation model of incompressible flows, because he is more likely representing the superfluidity of the lights. Even though, you can experimentally check (by watching here) that The Starry Night is closer related to the Navier Stokes equation than you may had thought.


Why maths and life are two different things?

Of course I do not intend to even try to answer this question, rather, I will explain an example that happened to me yesterday.

Imagine there are three lifts on the same wall.  You are in a rush (the stairs are far away not to be considered) and you need to stand up somewhere in order to take the lift as quick as possible. Where should you stand?

|                          0H   <-YOU

Mathematically the answer is simple if you consider that each lift has the same probability of arriving (all are available, have the same speed, arrive to every floor, etc…  ). In this case you should locate in front of the lift in the middle.

In the real life, however, this is far from being optimal. First of all, it is not very polite. Secondly, you may not been able to see if one of the other lifts arrive before. So a better answer is to consider the smallest distance from the lift in the middle that allows you to see the other two lifts. This answer uses the mathematical answer, but it improves it accordingly the real word.

This example clearly shows that maths and life are two different things, however, maths can help you to improve a decision in real life if you use it carefully.

Demasiada optimización (in Spanish)

Esta es la primera vez que escribo sobre la matemática en la filosofía. El tema que vamos a tratar esta basado en el libro de Byung-Chul Han, llamado La sociedad del cansancio (Müdigkeitsgesellschaft).

Vamos a remontarnos a la matemática en los años 40. El matemático Estadounidense  George Dantzig es contratado por la USAF como consultor matemático. En 1947, propone  el problema de programación lineal junto a un método para resolverlo. Esto da inicio a una de las áreas mádantzings importantes de la matemática aplicada actual, el de programación lineal y el desarrollo de métodos para resolver problemas con muchas variables. El método propuesto por Dantzing resulta no ser muy eficiente, ya que puede tomar tiempo exponencial (Klee y Minty, 1972). Sin embargo, hoy en día es sabido que el problema puede ser resuelto en tiempo polinomial usando el método del elipsoide (Khachiyan, 1979). A pesar de esto, el método del elipsoide sin modificaciones es en la práctica completamente inútil.

Desde los años 80 en adelante la optimización ha tomado un rol preponderante en la industria. El estudio e implementación de modos eficientes para resolver problemas de la vida real, junto con el avance de los computadores, han permitido desarrollar en el último tiempo tecnología impensada hace un par de años.

Que efectos tiene la matemática, y en especial, el concepto de optimización en la sociedad?

byung-chul-hanEsta es la pregunta que se plantea Byung-Chul Han en su libro La sociedad del cansancio. Según el autor, la enfermedad de la sociedad postmoderna es el estado patológico de exceso de positividad y del sentimiento que todo es posible. La sociedad, se ha transformado en una sociedad de rendimiento, donde abundan los gimnasios, las torres de oficina, los bancos, los grandes centros comerciales y los laboratorios genéticos. Los sujetos no son como antes sujetos de obediencia, pero de rendimiento, emprendedores de sí mismos, explotadores de sí mismos. El ser humano en su conjunto se convierte en una máquina de rendimiento cuyo objetivo consiste en funcionar sin alteraciones y sin negatividad, ya que estas ralentizan el proceso de optimización.

Entre las consecuencias de este exceso de positividad se encuentra la violencia, que se despliega en una sociedad permisiva y pacífica. Una violencia que no es privativa, sino que exhaustiva. Este tipo de violencia que sacia y nos hace obeso, no nos da la oportunidad de estar aburridos, sino que al contrario, nos hace estar todo el tiempo pendiente de muchas variables, de muchos datos, y todos simultáneamente. Según el autor, los animales con mayor capacidad para llevar a cabo muchas actividades simultáneamente son los más agresivos y los más salvajes.  (Byung-Chul Han)

Otra arista de la violencia producida por el exceso de positividad se ve reflejada en la supresión del esquema negativo de la prohibición. Con el fin de aumentar la productividad se sustituye la disciplina por el rendimiento. El rendimiento es determinado por el nivel de producción. La prohibición tiene un efecto negativo, ya que bloquea e impide un crecimiento ulterior. La positividad del poder hacer es mucho más eficiente que la negatividad del deber. (Byung-Chul Han)

En cuánto al individuo, el exceso de positividad genera un sentimiento de depresión y fracaso. Surge el concepto de ”nada es posible”, ”nada me resulta” que sigue la aceptación del de ”todo es posible”.  (Byung-Chul Han)

El resultado final del exceso de positividad en la sociedad es de cansancio y agotamiento excesivo.  Es un tipo de cansancio que no solo no permite ver al otro, sino que vé en el otro  al mismo tiempo el YO. Esto conlleva finalmente a una sociedad del dopaje, donde los individuos son ápaticos y muy violentos. (Byung-Chul Han)

Antes de explicar la solución que Byung-Chul Han propone al exceso de positividad, y por consiguiente, una solución a la actual enfermedad de la sociedad postmoderna, producto del áfan por la optimización; vamos a abogar por las matemáticas y en particular por la optimización.

En las báses del desarrollo de las matemáticas se encuentra un proceso contemplativo y un sentimiento intenso de impotencia y fracaso. Es muy acertado en este proceso lo que escribe Byung-Chul Han, la pura agitación no genera nada nuevo, solo reproduce y acelera lo existente. Por ejemplo, existe un sitio web especializado para hacer preguntas en matemáticas, donde muchos matemáticos agitados hacen preguntas públicas de modo que otros matemáticos puedan responderle de manera casi instántanea. El resultado es un sitio lleno de preguntas (muy interesantes), pero que no aporta al desarrollo de las matemáticas, ya que es más bien un caos acelerado de toda la matemática ya existente.

No es la matemática, ni la optimización que están detrás de la enfermedad del exceso de positividad de la sociedad que plantea Byung-Chul Han, sino que es resultado natural en la sociedad de la disponibilidad de tecnologías nuevas.

Las soluciones esbozadas en ”La sociedad del cansancio” son: rescatar la importancia del sosiego, de la vida contemplativa, de la rabia y del miedo. (Byung-Chul Han)

El sosiego, en el sentido de Nietzsche:

Por falta de sosiego, nuestra civilización desemboca en una barbarie. En ninguna época, se han cotizado más los activos, es decir, los desasosesgados. Cuéntase, por tanto, entre las correcciones necesarias que deben hacérsele al carácter de la humanidad el fortalecimiento en amplia medida del elemento contemplativo.

La vida contemplativa, en el sentido de Catón:

Nunca está nadie más activo que cuando no hace nada, nunca está menos solo que  cuando está consigo mismo

La rabia y el miedo, en el sentido de Byung-Chul Han:

En el marco de la aceleración e hiperactividad generales, olvidamos, asimismo, lo que es la rabia. Esta tiene una temporalidad particular que no es compatible con la aceleración e hiperactividad generales, las cuales no toleran ninguna extención dilatada del tiempo. El futuro se acorta convirtiéndose en un presente prolongado. Le falta cualquier negatividad que permita la existencia de una mirada hacia lo otro. La rabia, en cambio, cuestiona el presente como tal. Requiere un detenerse en el presente que implica una interrupción.  Por esa condición se diferencia del enfado. La dispersión general que caracteriza la sociedad actual no permite que se desplieguen el énfasis y tampoco la energía de la rabia. La rabia es una facultad capaz de interrumpir un estado y posibilitar que comience uno nuevo. Actualmente, cada vez más deja paso al enfado y al estado inervado, que no abren la posibilidad a ningún tipo de cambio decisivo. Así, uno se enfada incluso de cara a lo inevitable. El enfado es para la rabia lo que el temor para el miedo. A diferencia del temor, dirigido a un determinado objeto, el miedo se refiere al Ser como tal. Comprende y quebranta toda existencia.

Lo interesante de la propuesta de Byung-Chul Han en relación a la incorporación en la sociedad del concepto de optimización, es el hecho de constituir una visión postmoderna de la simbiosis Matemática-Sociedad, con la que tendremos que aprender a convivir del modo más humano posible.

Referencias: Recibí recientemente como regalo de cumpleaños el libro ”La sociedad del cansancio” de parte de mi amigo Angello Estefane.

Bingo winning strategy

I will write about a problem by my friend Edgardo Roldán Pensado. He told me it long time ago. If you are a mathematician the solution may be trivial, however, I personally admire the way he faced the situation and came out with this nice problem.

I won’t bore you with a longer introduction, let start the problem.

Suppose you bought two days ago (in for example) a Royal Bingo Supplies Wooden Bingo Game (like the one in the picture)


  • Wooden Bingo Game Set with instructions.
  • Perfect for old-fashioned fun with a nostalgic twist.
  • Includes with 18 Bingo cards, 150 Bingo chips, a Bingo board, brass cage and 75 wooden balls.
  • Great for parties, barbeques or family game nights.
  • Recommended for ages 3 and up.

Today you received your game and you invite seven other friends to play together. Each player takes a bingo card and you start playing. Five hours later, when everybody is already tired of playing, you decide to count the times each player has won. Everybody is very  surprised how lucky a single player was, who won many more times than anybody else.

Is there a Bingo winning strategy? Or do you have a very lucky friend?

Well…Everybody has a very lucky friend, so no discussion about this. However, there is also a Bingo winning strategy, so, there is a chance the winner was a Bingo´s tactician (with a bit of luck).

How does the Bingo´s tactician play?

This guy chose his bingo card at the end, after analysing the bingo cards of the other player. Each card was (hopefully, I do not know if it is true) created with a uniform random distribution (for each square you choose a number from 1 to 75 with probability 1/75.). He considered a metric on the set of bingo cards, for example, given two bingo cards a=(x_1,\ldots,x_{24}) and b=(y_1,\ldots,y_{24}), d(a,b)=\#\{i:x_i\neq y_i\}, with the convention that \# \emptyset :=0. He was a bit lucky enough to be able to find a bingo card that maximises the d distance with respect to the bingo cards of the other player.

Why is this a winning strategy?

Suppose that the 7 bingo cards chosen by the opponents of the winner were very close with respect to the distance d, moreover, suppose that all the 7 bingo cards were exactly the same. On the other hand, the “lucky one” chose a different bingo card. So there is \frac{1}{2} probability one of the other seven players (and then all) wins, and \frac{1}{2} probability the “lucky one” wins. Now, suppose, the 7 bingo cards chosen by the opponents are very close (with respect to d), but all different. Then the “lucky one” player wins with probability close to \frac{1}{2}, whilst  and the other players with probability close to \frac{1}{14}.

Explaining maths without using them

At the time I was finishing my thesis some non mathematician friends asked me to explain them what I was actually doing.  In this post I write the explanation I elaborated for them. In one sentence, the first problem one need to know how to solve is the following.

How do you explain a mathematical result without using maths at all?

The answer is well known to everybody teaching maths,  however, I will elaborate a bit on this. The first step is to understand the historical roots of the problem you solved, together with the main motivations that people had to need to develop maths in such a determined direction that your problems appeared naturally. Once, you have understood completely this part, you need to associate each problem you solved to something that the people you want to explain the problem to can understand well. This means to associate each result to something completely different but that behaves exactly the same. Finally, you need to somehow transport all this information and deliver it to your audience in a comprehensive way. The last part of the process is well performed by an ”artistic drawing” (whatever that means) together with an explanation of each element. The hardest part of the communication is the explanation of the proof of each result, it happened indeed, that this becomes an issue of time.

In what follows I will answer a more specific question.


Explain your thesis to your friends with time constrains conditions.



My thesis can be coded by the following drawing.

Sketches, page 1

The drawing has 5 main elements: a black disk at the top left, a black disconnected curve at the top and bottom, a red apple shape at the left, a blue swirl at the bottom and a green tree shape in the centre and right of the drawing. I will explain each of the five element in what follows.

  1. Black disk: If one goes back in time from the questions I faced in my thesis, we arrive to the three body problem. This is represented by the three white bodies inside the black disk. I can suggest you some nice reference to read about, like [Wikipedia, Celestial Encounters by F. Diacu and P. Holmes]. In a few words:  The n-body problem consists in determining the position of  n planet at any time t, given the initial conditions of known position and velocity at time t=0. For n=2 the problem can be easily solved, one can prove indeed, that the trajectory of one planet with respect to the other always lies along a conic section. The problem for n=3 was addressed by Henri Poincaré and literally he found the chaos in it. He was not able to find a solution, but instead, introduces qualitative methods to understand the solution, like, periodic solutions, recurrence theorem, non existence of uniform integrals, asymptotic solutions, dependence of the solutions with respect to a parameter, homoclinic orbits, first return map, invariant curves and homoclinic tangles. These qualitative methods are still our tools to understand dynamic systems that are too complicated to be understand in a deterministic way, i.e. those dynamical systems which equations can be  solved.
  2. Black disconnected curve:  This curve represents the continuous trajectory of a particle that moves because of some physical laws acting on it. We suppose that there is a finite measure on the drawn system, we assume further that it is invariant under the physical laws. Under these assumptions,  by the Poincare recurrence theorem, almost every particle will enter in a finite amount of time into a set A, providing the measure of this set is strictly positive. The set A in the picture corresponds to the black disk, and the black disconnected curve eventually enters A after some (unknown) finite amount of time. The question that we face is how can we estimate the time that takes the particle to enter for first time A. We solved this problem under very strong hypothesis on the physical laws. Estimations for this problem under our hypothesis are known, however, we refined the existing bound.
  3. Blue swirl: This represents chaos in the classic sense of the diagram of phase of ODE´s (Ordinary differential equation). Recall that when we have an ODE x'=Ax in \mathbb{R}^2, the diagram of phase corresponds to the plot of the vectors (y_1,y_2) in the (x_1,x_2)-plane, where we draw at the point x= (x_1,x_2) the vector (y_1,y_2)=Ax. This represent the velocity field of the solutions of the ODE.  We assume A is not singular, so that the equilibrium is x=0.  The diagram of phase will be determined by the eigenvalues and eigenvectors \lambda_1,\lambda_2 of the matrix A. There are 7 cases for the equilibrium state. The equilibrium state is:
    1. Stable if \lambda_1<\lambda_2<0.
    2. Unstable if 0<\lambda_1<\lambda_2.
    3. Saddle if \lambda_1<0<\lambda_2.
    4. Degenerate if \lambda_1=\lambda_2\in \mathbb{R}. 
    5. Center if \lambda_1=i \beta, \beta\in\mathbb{R}\setminus \{0\}.  
    6. Stable spiral if \lambda_1=\alpha+i \beta, \alpha<0, \beta\in\mathbb{R}\setminus \{0\}.
    7. Unstable spiral if \lambda_1=\alpha+i \beta, \alpha>0, \beta\in\mathbb{R}\setminus \{0\}. In the drawing we represented this case.
  4. Red apple shape: This represents a seed that gives birth to a tree after a process that allows to ”build” a complex structure from iterations of a simpler one. This is analogous to the system build by a simple iterated function scheme that consists of two disjoint contractions on the unit interval, these contractions have associated a unique non-empty closed invariant set. This sets comes from a structure similar to the one of a tree, where one branch divided into to smaller, and each smaller one into two smaller and so on.
  5. Green tree shape: The green structure represent a tree that we consider analogous to the invariant set of an iterated function system. The problem that we face in the last chapter is: What happens if we perturb a little bit the seed of the tree, how different is going to be our tree? The analogy with this is: perturbing a little bit both maps of our iterative function and study how smoothly that affect the invariant set. A mathematical way to do this is by considering the for example the ”measure” (called Hausdorff dimension) of the invariant set.

Metro Linea 5

This is the Santiago Metro Line 5:


There are three kind of stations, R red, G green and M red/green. Between 6 and 9 hours and between 18 and 21 hours a train goes either along R and M stations, or along G and M stations. The rest of the time, trains stop at every station. This systems is part a “route express” program.

Is the route express system efficient ?

This turns out to be a highly non-trivial maths problem. First of all, we require to design an accurate model of the Santiago Metro Line 5.

Mathematical model:  

  1. We need to identify the passenger entrance rate to each station. It is certainly not a Poisson distribution, as there is not constant rate (it highly depends on the time) and moreover, the arrivals are not independent, because usually people enters in group. Actually, I currently do not know which discrete distribution would be the most appropriate. An obvious simplification is to consider it is Poisson with different rates depending on the time (example from 6 to 7, 7 to 8, etc.). In this case we could use some statistical test to adjust the rates at each station and at each hour. 
  2. We need to identify the passenger exit rate to each station. An ideal supposition is it that the exit rate at each station at the time n+12 \pmod{24} is equal to its entry rate at the time n. This would allows us to consider only entrance rates.
  3. Once we have established the entrance and exit rate we can evaluate the efficiency of the system. We consider a random passenger X, its expected travel time is \mathbb{E}(X)= \sum \mathbb{P}(going from the station a to the station b)\times Time(going from the station a to the station b), where the sum is over all possible combinations of a and b. The function Time does depend on the strategy of the model (i.e. which stations are R, G or M).

Choosing the optimal transportation plan:

A similar problem was addressed by the french mathematician Gaspard Monge in 1781.

  1. Each strategy of colouring stations by R, G, M will give a (optimal) travel time from the station a to the station b. We are no force in principle either to assign the same colouring for routes in opposite directions.
  2. In order to solve the problem we would need to check 2 \times 3^{30} different possibilities and choose the one that gives the smaller value of \mathbb{E}(X). As this is clearly impossible with modern computers, we need to design an efficient algorithm to solve this problem in a reasonable amount of time.

There is still the harder part of the work to be done in order to answer our original question. I wonder to know how strong are the assumptions by Metro de Santiago in order to determine its route express system.