A historically informed bruteforce

Is music a free playground ?

Part 0

"Bruteforce" or "exhaustive search" is the process of solving a task by trying out every possible solution until finding the correct one. It gets less practical as the number of attempts required increases.

Bruteforce is commonly associated with cryptography for obvious reasons. It is the reason why



 "tYpPVhQBBFx&7F*^y3Z*%wEJo2iKENq8ZRCM&WruC&d4ECYJD"

 

is a safer password than:

 "352"

Assuming a secret code was only 3 digits long and every attempt to unlock it required 1 second to be executed, a thief would need no longer than 17 minutes to try out all possible combinations from 0 till 999. No violence, no intellect... just patience.

When working with computers, Computer Processors and Graphics Cards can help us speed up the process by doing thousands of calculations every second. Because they are so fast, we hardly notice their activity in the background. In fact, even the simple scroll on a screen hides a surprisingly complicated amount of operations.

 

If a screen is 1080 × 920 pixels, it means there are a total of 993600 pixels that need to be computed multiple times a second whenever an event -such as the user interaction- accurs with the device.

Part 1: If music is free, it is so just because it's big enough

Athanasius Kircher

Athanasius Kircher (1602–1680) was a German Jesuit polymath who worked on a variety of topics including Egyptology, geology, medicine, linguistics, and technology. Although some of his theories could be considered substantially flawed, he carries major historical relevance for his contributions to the early stages of scientific research. In the year 1650 he published one of the biggest music theory book of history, the Musurgia Universalis, consisting of 10 volumes and over 1000 pages in total, all in latin. The topics are various and ranges from acoustics to organology, counterpoint, theological discourses and much more. 

Birds' chirping transcribed. From Musurgia Universalis, Athanasius Kircher

In Volume 8, Ars-Combinatoria is discussed (what today we call "combinatorics")

 

Athanasius Kircher explores the idea of exhausting melodies. How to do a bruteforce? How long can they get? etc.

 

Some page is spent for briefly illustrating the math of bruteforce by showing several scenarios.

Note how "big numbers" are not only a matter of Computer Processors, pixels and Informatics. He is well aware of the Combinatorial Explosion effect: each new parameter added to the system exponentially increases the total number of combinations.

Athanasius Kircher makes sure to include an estimate of the numbers of years required for one of the problems mentioned (a specific bruteforce of 22 notes). If someone wrote a thousand combinations a day, this is how much time would be required to exhaust all the "mutations".

 

It's not easy to grasp the meaning of such number.

 

If scientists are correct in believing the Earth is around 4.5 bilion years old, it would mean that starting from the very birth of our planet -when no life was around- until today (2024 AD), we would be around 20% done.

 

One last illustration is shown before closing Chapter 11:

 

 

 

 

 

### Brute-force Attack Initialized ###
[DATE: 2024-10-02 12:34:56] | User: Athanasii_Kircheri
[INFO] Cracking password...
[INFO] Charset: A-B-C-D-E-F-G
[INFO] Maximum length: 21 characters
[INFO] Mode: Incremental Brute-force

[ATTEMPT] [2024-10-02 12:34:57] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:34:59] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-B \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:01] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-B-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:03] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-B-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:05] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-B-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:07] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-B-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:09] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-B-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:11] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-B-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:13] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-B-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:15] / A-A-A-A-A-A-A-A-A-A-A-A-A-B-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:17] / A-A-A-A-A-A-A-A-A-A-A-A-B-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:19] / A-A-A-A-A-A-A-A-A-A-A-B-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:21] / A-A-A-A-A-A-A-A-A-A-B-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:23] / A-A-A-A-A-A-A-A-A-B-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:25] / A-A-A-A-A-A-A-A-B-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:27] / A-A-A-A-A-A-A-B-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:29] / A-A-A-A-A-A-B-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:31] / A-A-A-A-A-B-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:33] / A-A-A-A-B-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:35] / A-A-A-B-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:37] / A-A-B-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:39] / A-B-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:41] / B-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:43] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-C \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:45] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-C-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:47] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-C-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:49] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-C-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:51] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-C-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:53] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-C-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:55] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-A-C-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:57] / A-A-A-A-A-A-A-A-A-A-A-A-A-A-C-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:35:59] / A-A-A-A-A-A-A-A-A-A-A-A-A-C-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:36:01] / A-A-A-A-A-A-A-A-A-A-A-A-C-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:36:03] / A-A-A-A-A-A-A-A-A-A-A-C-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:36:05] / A-A-A-A-A-A-A-A-A-A-C-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:36:07] / A-A-A-A-A-A-A-A-A-C-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid
[ATTEMPT] [2024-10-02 12:36:09] / A-A-A-A-A-A-A-A-C-A-A-A-A-A-A-A-A-A-A-A-A-A \ --> Invalid

Click here to listen

 

I made a sonification of a melody bruteforce (and called it AAAAAAAA), in case you were curious to hear how it sounds like.


NOTES:

Note A: I have reduced the number of notes from 21 to 8 for 2 reasons:

\Reason A1: it changes faster, making the listener better keep track of what's happening

\Reason A2: it improves the sense of rythm

Note B: The way the melody evolves differs from the one shown above by Athanasius Kircher

\Reason B1: it would have broke the sense of rythm mentioned in Reason A2.

Note C: A sinewave was used as instrument

\Reason C1: its timbre is very clean and simple

Note D: I made the rendering 55 minutes and 55 seconds long.

\Reason D1: between, 11.11, 22.22, 33.33, 44.44, 55.55, 55.55 was the closest to an hour, the average length of CDs

 

Problem:

 

How many years would be required to listen until GGGGGGGG ???

 

 

Personal opinion:


I am really aware of the soul-less nature of such "piece".

Yet I find a very slow but "hard" sense of evolving. The sequence of notes is always similar, but never quite the same. Focusing my attention, I can foresee what the next notes will be.

Also, I'm intrigued how even after a whole hour of this, the first notes don't even change, making you realize you didn't even scratch the surface of the whole sequence. 

It makes me contemplate the Universe.

 

Many of my favourite tunes -perhaps some of yours as well- are in it, somewhere.

A similar attempt can be found in Mersenne's Harmonie Universelle (1636). Marin Mersenne (1588–1648) was a French mathematician, theologian, and music theorist. He worked on number theory, acoustics, and mechanics.

The author provides all possible sequences of Ut,re,mi,fa,sol,la. The total amount is 720, or 6 factorial (6!=6x5x4x3x2x1).

In case the reader was more familiar with music notation:

It took me 2 hours to transcribe all 720 hexachords on my laptop. For a proof, you can check the whole transcription on YouTube by clicking on the image. I did a few mistakes while transcribing it -but so did Mersenne.

Similar considerations can be found also in the Dissertatio de Arte Combinatoria by German mathematician and philosopher Gottfried Wilhelm Leibniz (Lepzig 1666) although neither the explicit procedure nor the set of permutations are shown: only the numerical results. As the book focuses on combinatorics, a wide variety of examples on different fields can also be found.

Interestingly M.Mersenne kindly provides an exhaustion of the 24 tetrachords too.

A few pages before, rythmical variations of ut,re,mi,fa are also systematically explored:

Factorials and invertible counterpoint

The steep increase of factorials suggest how in strict counterpoint, a texture of multiple voices is preferable to one with fewer ones.

 

1!=1

2!=2

3!=6

4!=24

5!=120

6!=720

7!=5040

8!=40320

...

n!

 

While it is true playing 4 voices holds greater challenge for the keyboardist compared to 2 voices, it also allows for many more permutations with the available material (24 vs 2), thus allowing an easier expansion of the piece.

 

Fugue BWV 532 in D major by J.S.Bach is a real Tour de Force of permutations. The piece does not exhaust all possibilities, but it ensures 5 minutes of music -at least- of very playful music by shuffling very similar material across the voices.

 

The "combinatorial explosion" of factorials is likely to be one of the very few features that make writing -or improvising- a 5 voices fugue desirable in the first place.

 


Click on the archer to

go back to the Home Page