Music theory for nerds

I don’t know anything about music. I know there are letters but sometimes the letters have squiggles; I know an octave doubles in pitch; I know you can write a pop song with only four chords. That’s about it. The rest has always seemed completely, utterly arbitrary. Why do we have twelve notes, but represent them with only seven letters? Where did the key signatures come from? Why is every Wikipedia article on this impossible to read without first having read all the others? A few days ago, some of it finally clicked. I feel like an idiot for not getting it earlier, but I suppose it doesn’t help that everyone explains music using, well, musical notation, which doesn’t make any sense if you don’t know why it’s like that in the first place. ...

25 de septiembre de 2016 · 1 min · 139 palabras · Nacho Cano

Demystifying the regular expression that checks if a number is prime

A while back I was researching the most efficient way to check if a number is prime. This lead me to find the following piece of code: public static boolean isPrime(int n) { return !new String(new char[n]).matches(”.?|(..+?)\\1+”); } I was intrigued. While this might not be the most efficient way, it’s certainly one of the less obvious ones, so my curiosity kicked in. How on Earth could a match for the .?|(..+?)\1+ regular expression tell that a number is not prime (once it’s converted to its unary representation)? ...

10 de septiembre de 2016 · 1 min · 92 palabras · Nacho Cano

Probability, Paradox, and the Reasonable Person Principle

In this notebook, we cover the basics of probability theory, and show how to implement the theory in Python. » Peter Norvig | nbviewer.ipython.org

17 de octubre de 2015 · 1 min · 24 palabras · Nacho Cano

Las matemáticas explican por qué no puedes ganar al Tetris hagas lo que hagas

“La única forma de ganar es no jugar”. Tom Murphy, programador, creó en 2013 un programa que era capaz de aprender a jugar a Super Mario Bros de forma que en sucesivas partidas conseguía salvar los distintos obstáculos que se encontraba el personaje hasta ganar el juego. Cuando enfrentó su software al Tetris, sin embargo, Murphy se encontró con que no había victoria posible. » R. Pérez | elconfidencial.com

5 de mayo de 2015 · 1 min · 69 palabras · Nacho Cano

10 Futurama jokes that will make you smarter

The Futurama writers had a rule that the show’s more obscure jokes couldn’t be central to the plot. So the background is stuffed with nods to mathematics, science, history, and literature. Numbers are often translated into math problems (instead of Studio 54, the crew visits Studio 1²2¹3³). Robot information is conveyed in binary (”The Honking” references the ”Redrum” scene in The Shining, when Bender is perplexed to see ”0101100101” written in blood on a wall, but then realizes that it reads ”1010011010” in the mirror, a series of digits that translates to ”666”). And of course, there’s the Alienese language. But the writers also built entire episodes around the Banach-Tarski paradox and the premise of three-dimensional characters entering two-dimensional space. ...

1 de enero de 2015 · 1 min · 125 palabras · Nacho Cano

Who invented pointers, amortized complexity, and more?

Andrey Kolmogorov, Fred Hennie, Richard Stearns, and Walter Savitch are all famous separately; but they have something in common. Read on, and see. Today I wish to discuss some algorithmic tricks and show that they were initially used by complexity theorists, years before they were used by algorithm designers. To steal a phrase: it`s computational complexity all the way down. Well not exactly. The situation is slightly more complex”a bad pun. The complexity theorists often invented a concept and used it in a narrow way, while later it was rediscovered and made a general notion. ...

9 de septiembre de 2014 · 1 min · 100 palabras · Nacho Cano

Sistema binario: unos y ceros a través de la historia

Los unos y los ceros llevan milenios entre nosotros, desde algunas culturas primitivas, pero las bombillas se han ido encendiendo poco a poco hasta llegar a su actual omnipresencia en la electrónica. Primero fueron Leibniz y la aritmética, luego Boole y la lógica, y finalmente Shannon y su idea de utilizar el álgebra de Boole para simplificar los circuitos. Una historia apasionante hasta llegar a nuestro smartphone. » David G. Ortiz | blogthinkbig.com

6 de septiembre de 2014 · 1 min · 73 palabras · Nacho Cano

Cómo 4 ecuaciones cambiaron el mundo

Cuenta la anécdota que un día de la primavera de 1855 el físico inglés Michael Faraday daba una conferencia pública en la que mostraba sus pioneros experimentos sobre la electricidad y el magnetismo. Entre la audiencia se encontraba William Gladstone, entonces Ministro de Hacienda y futuro Primer Ministro. Gladstone se levantó y le espetó al investigador: ”todo esto es muy bonito, ¿pero alguna vez le encontraremos una aplicación práctica?”, a lo que Faraday respondió: ”no se preocupe, algún día el gobierno cobrará impuestos sobre esto”. ...

4 de mayo de 2013 · 1 min · 87 palabras · Nacho Cano

La idea matemática que hizo volar al Voyager

La sonda espacial Voyager ha cautivado al mundo con su proeza en los confines del Sistema Solar, pero su lanzamiento en 1977 sólo fue posible gracias a las ideas matemáticas y la persistencia de un estudiante de doctorado que descubrió cómo catapultar sondas al espacio. » Christopher Riley y Dallas Campbell | bbc.co.uk

30 de octubre de 2012 · 1 min · 53 palabras · Nacho Cano

Transformada de Fourier discreta en Python con SciPy

En este artículo vamos a ver cómo calcular la transformada de Fourier discreta (o DFT) de una señal en Python utilizando la transformada rápida de Fourier (o FFT) implementada en SciPy. El análisis de Fourier es la herramienta fundamental en procesamiento de señales y resulta útil en otras áreas como en la resolución de ecuaciones diferenciales o en el tratamiento de imágenes. » Juanlu001 | pybonacci.wordpress.com

29 de octubre de 2012 · 1 min · 66 palabras · Nacho Cano