In the section Matemoción of the Notebook of Scientific Culture we are passionate about poetry, as well as its relationship with mathematics. If we look at the history of it we can find many entries linking both, from the series The poetic numbers ( first part second part and third part ) in which poems with a mathematical theme were discussed, such as the poem about the number pi by the Nobel Prize Winner for Polish literature Wisława Szymborska or Dark Numbers by the Barcelona poet Clara Janés, up to poems in whose structure there is mathematics, such as poems about a Moebius strip (see the entry Twisted poetry about the Moebius strip ), the combinatorial of the poetic work One hundred thousand billion poems by the French writer Raymond Queneau (see 100,000,000,000,000 poems ) or the use of the Fibonacci sequence, both in the work Alphabet by the Danish poet Inger Christensen (see We love Fibonacci! ), as in the so-called Fibonacci poems (see Fibonacci Poems ).
But we have also approached the mathematical analysis of some questions related to poetry, as in the entry The poetic origin of Fibonacci numbers in which it is shown that the amount of possible structures for verses with m moras (the mora is the "unit that measures the syllabic weight, that is, the duration of the phonological segments that make up the syllable" and there are two types of syllables, some short of a mora or syllabic instant and other lengths of two blackberries) is equal to the Fibonacci number F m + 1 .
In this entry in the Scientific Culture Notebook we are going to continue with the mathematical analysis of poetry, specifically, we are going to be interested in the question of metrics and answer the following question:
How many possible rhyme structures exist for stanzas or poems with a fixed number of verses?
Even if it is a known question, let's start ar from the beginning. What is rhyme? According to the RAE dictionary, it is the " identity of vowel and consonant sounds, or only vowels, from the last stressed vowel in two or more verses ". Thus, in the final couplet of the poem Phrases by the Argentine poet Alfonsina Storni (1892-1938),
Bravo león, mi corazón,
has appetites, no reason
the rhyme is “Ón”, then a consonant rhyme, while in the final couplet of the poem Monday, Wednesday and Friday by the Andalusian poet Federico García Lorca (1898-1936)
Before a broken glass window
I coso mi lyrical clothes
the rhyme is “ota” and “opa”, then assonance rhyme, since the vowels oa are repeated.
Although the question that interests us in this entry is not so much whether the rhyme is assonance or consonant, but rather to analyze the amount of possible rhyme structures for a stanza, or poem, with a fixed number of verses. For example, in a two-line stanza there are two possibilities, that the two rhyme, as in the case of couplet which would be the AA structure, or that they do not rhyme, which would be the free structure AB, as in the haiku of the Japanese poet Taneda Santoka (1882-1940)
My begging bowl
accepts fallen leaves
Therefore, for stanzas or poems with two verses there are only two types of rhyme, AA and AB (In this entry we will always write the rhyme with capital letters, regardless of whether the verse is minor art –with between two and eight syllables– or major art –more than eight syllables–). Obviously, in the trivial case of a single verse there is only a trivial possibility.
Now let's think about the amount of rhythmic structures that are possible in triplets, that is, in stanzas or poems with three lines. For example, the haikus which are small poems of Japanese origin that usually have three verses, do not usually have rhymes, then ABC, like this poem by the poet Karmelo C. Iribarren, titled Domingo afternoon .
What do I do
looking at the rain
if it doesn't rain
On the other hand, the rhyme of the Andalusian soleá is ABA, as in the following soleá del Sevillian poet Antonio Machado (1875-1939).
I have a love and a grief:
grief wants me to live;
love wants me to die.
It is called monorrimous triplet to those triplets that have the same rhyme, either assonance or consonant, in the three verses, AAA, as in the triplets of the poem A Goya by the Nicaraguan poet Rubén Darío (1867-1916), within the Songs of life and hope . Thus begins the poem.
rare reckless ingenuity,
for you I light my censer.
For you, whose great palette,
capricious, abrupt, restless,
must love every poet;
for your gloomy visions,
your white irradiations,
your blacks and vermilions;
for your Dantesque colors,
for your picturesque majos,
and the glories of your frescoes.
Another possible rhyme for triplets is AAB, as in the poem La muerte de Melisanda by the Chilean poet Pablo Neruda (1904-1973), whose stanzas are of two verses (it begins like this … A la sombra de los laureles / Melisanda is dying .), Except for the penultimate stanza which is a triplet with rhyme AAB.
For her he will tread the roses,
he will chase the butterflies
and will sleep in cemeteries.
While the ABB rhyme is found for example in the following poem of the Madrid poet Gloria Fuertes (1917-1998).
On clear nights,
I solve the problem of the loneliness of being.
I invite the moon and with my shadow we are three.
Therefore, we have put examples of all the possible rhymes for stanzas or poems with three lines, AAA, AAB, ABB, ABA and ABC. In other words, for three verses there are five possible rhythmic structures.
Next, let's analyze how many are the possible rhyme structures in stanzas or poems with four lines. Let's start with a classic poetic composition, the sonnet, which consists of fourteen verses separated into two quartets and two triplets. Let's see a classic and humorous example of a sonnet by the Madrid poet and playwright Lope de Vega (1562-1635).
A sonnet tells me to do Violante,
that in my life I have seen myself in such a predicament;
fourteen verses say it is a sonnet;
mocking, mocking, the three go ahead.
I thought I would not find a consonant,
and I'm in the middle of another quartet;
but if I see myself in the first triplet,
there is nothing in the quartets that scares me.
For the first triplet I am entering,
and it seems that I entered with the right foot,
well, I am giving the end to this verse.  I am already in the second, and I still suspect
that I am finishing the thirteen verses;
count if there are fourteen, and it is done.
As seen in this example, the quartets of a sonnet have rhyme ABBA, which is known as rima embraced . The rhythmic structure in which the four AAAA verses rhyme is known as continuous or monorithic quartet . An example is found in the Book of Good Love by the Archpriest of Hita (approx. 1283-1350), in the chapter Enxiemplo del garçón who wanted to marry three women .
He was a crazy garçón, mançebo very brave:
He did not want to marry only one;
Synon with three women: such was his talent.
All the people fought over him.
His father and his mother and his older brother
They supported him a lot because of his love
With two that he married, first with the youngest,
Dende á one month with pleasure, marry the eldest.
The ABAB rhyme is known as the crusade rhyme . We can find examples of this rhyme in many poems, for example, in the poem by the Valencian poet Miguel Hernández (1910-1942), entitled Niño yuntero of which we show the first stanzas.
Carne de yoke, was born
more humiliated than beautiful,
with the neck pursued
by the yoke for the neck.
It was born, like the tool,
destined to blows,
of a discontented land
and an unsatisfied plow.
Between pure and living manure
of cows, brings to life
an olive-colored soul
old and calloused.
Rereading some poems by the Portuguese poet Fernando Pessoa (1888-1935), I have also found many quatrains with ABAB rhymes, like the following poem.
The poet is a pretense.
He pretends so completely
that he even pretends that the pain he really feels is pain
And those who read what he writes,
feel, in the pain read,
not both that the A poet lives
but the one who has not had.
And so he goes on his way,
that train with no real destination
But We also find quartets with other rhymes, such as AABA, in the poem that begins like this.
Impassive servant of a desolate end,
Don't believe or disbelieve too much.
It doesn't matter whether you think or not.
Everything is unreal, anonymous, unthinkable.
P but there are more possible rhythmic structures for a quartet, AAAB, AABB, ABAA, ABBB, AABC, ABAC, ABCA, ABBC, ABCB, ABCC and even without ABCD rhyme. In total, there are fifteen rhythmic structures for four lines.
The next thing would be to find out how many possible rhyme structures there are for five-line stanzas or poems. You can list yourself all the possibilities that exist and you will discover that there are 52, although we are going to take the opportunity to use some very special diagrams to show them.
In the classic novel of Japanese literature Genji's Romance, by the writer Murasaki Shikibu (approx. 978-1014), the 52 possible rhythmic structures are represented with beautiful diagrams. The vertical lines with the verses of the stanza or poem, and the horizontal lines join the lines that rhyme. Each chapter, in total there are 54, begins with the image of one of those diagrams, although there is one that is repeated and another extra. The symbols used in Genji's Romance are those that appear in this image.
For example, the first sign would correspond to the rhyme ABACC, the number 37 with ABCAA or the number 52 with ABABA. An example of an ABABB rhyme, which is diagram 29 in the previous image, is the poem Dark Night by the Castilian friar and poet Juan de la Cruz (1542-1591), which begins like this:
In one dark night
with longing, in inflamed love,
oh happy luck!
I left without being noticed,
my house was already calm.
In the dark, and safe,
by the secret scale in disguise,
Oh happy luck!
in the dark, and in a trap,
my home already calm.
And we could continue studying how many rhyme structures are possible for stanzas or poems of six or more verses.
If we take stock of the results we have obtained on how many possible rhyme structures exist for stanzas or poems with a number fixed n of verses, we have seen that for the values n = 1, 2, 3, 4 and 5, from one to five verses, the number of possible rhythmic structures are: 1 , 2, 5, 15 and 52.
These are the first five terms of an important combinatorial sequence, the Bell numbers (the sequence A000110 in the Online Encyclopedia of sequences of integers), named after the American mathematician and novelist Eric Temple Bell (1883-1960), known for being the author of the book The Great Mathematicians from Zenón to Poincaré .
In combinatorics we define the Bell number B n as the number of possible partitions of a set of n elements, that is, the number of different forms of distribute the n elements of a set into groups.
If for every natural number n the set of natural numbers up to n 1, 2,…, n is taken as the reference set – 1, n , let's calculate the possible partitions of this set and, therefore, the Bell numbers.
For n = 1, there is only one possible partition of the set , the trivial one, then B 1 = 1;
for n = 2, the partitions of the set , that is, the ways to distribute the elements of that set into groups are 2 and , therefore, B 2 = 2;
for n = 3, the partitions of are 2 , , 1, 3 2, 2, 3 and , therefore B 3 = 5;  for n = 4, they are 2 4, 4, 1, 3 2 4 , 2 , 2, 3 4, , 2, 1, 2 , 1, 3 , 2, 3, 4, , 2, and 1, 2, 3, 4, that is, B 4 = 15;
in the same way you can calculate the partitions of and obtain that B 5 = 52. In general, the first members of the sequence of Bell numbers are
1, 2, 5, 15, 52, 203, 877, 4.140, 21.147, 115.975,…
As the set on which we consider the partitions can be any one, this allows making different diagrams and interpretations of Bell numbers. For example, if points are considered in the plane, their partitions can be represented as shown in the following images, for B 3 and B 4 . 
Although if we add color to the partitions, the diagram looks more beautiful, like the following image for calculating B 5 .
On the other hand, if a number N is the product of n different prime numbers, which is usually called a square-free number then B n is equal to the number of ways to express N as a product of its divisors, except 1. Thus, the number 105 can be expressed as 105 = 3 · 5 · 7 = 15 · 7 = 21 · 5 = 35 · 3 ( b 3 = 5). Note that the set that is considered is the one formed by the prime divisors of the number N in the case of 105 it would be , and each partition gives rise to a way of expressing the number N as a product of its divisors, so the partition 3, 7 gives rise to 105 = 21 · 5, since 21 = 3 · 7.
But going back to the central theme of this entry, if we now take the set of verses of a stanza or poem with n verses to calculate the number of Bell B n then the number of structures for the rhymes of a stanza or a poem of n verses is equal to the Bell number B n since the verses that are in the same group are considered to have the same rhyme.
If we look at the sequence of Bell numbers, B 7 = 877 , that is, there are 877 rhythmic structures for stanzas or poems of 8 lines, among which are the rhymes ABCBDAD, ABCBADA of the first stanzas of the poem Nanas de la onion by the poet Miguel Hernández.
The onion is frost
closed and poor:
frost of your days
and of my nights.
Hunger and onion:
black ice and frost
big and round.
In the cradle of hunger
my child was.
With onion blood
But your blood
was frosted with sugar,
onion and hunger.
1.- Toni Prat, Visual poetry (blog)
2.- Raúl Ibáñez, The great family of numbers (provisional title), Catarata, 2020.
About the author: Raúl Ibáñez is a professor in the Department of Mathematics of UPV / EHU and collaborator of the Chair of Scientific Culture