Back to Home

Selection of mnemonic quotes for car and telephone numbers

It can sometimes be difficult to remember a digital or alphanumeric sequence · but if · using a simple rule · a string of a poem learned in childhood can be converted to this number ...

Selection of mnemonic quotes for car and telephone numbers

Sometimes it can be difficult to remember a digital or alphanumeric sequence, but if, using a simple rule, a line of a poem learned in childhood can be converted to this number, everything will become easier. In this article, Monte Carlo methods compare the results of selecting such passages using two different methods of coding numbers.

Let me give you an example: If you encode numbers in consonant letters, then each word or sentence corresponds to an integer. Usually, the following encoding method is chosen: 1-p, 2-d, 3-t, 4-h, 5-p, 6-h, 7-s, 8-c, 9th (because 9 is “a lot”). Then the words “my good friend” correspond to the number 219513. But this is somewhat inconvenient, because without special preparation it is not possible to quickly throw out unnecessary letters, however, “my good friend” is quite difficult to forget, which will always allow you to remember the number in a calm atmosphere 219513. And this is very tempting, since the number itself is very abstract and can easily be confused with other similar abstract numbers.


There is quite a lot of information on mnemonics, here I tried not to reinvent the wheel, but to use the possibilities of text selection, which are rather difficult to use without the help of a computer system.
Just in case, the definition from Wikipedia is: Mnemonics (Greek, the art of memorization), mnemonics - a set of special techniques and methods that facilitate the memorization of necessary information and increase the amount of memory by forming associations (connections). Replacing abstract objects and facts with concepts and representations that have a visual, auditory or kinesthetic representation, associating objects with existing information in various types of memory to simplify memorization.

In this case, matching an abstract set of numbers with a passage of text fills it with images and makes it easier to remember. As already mentioned, the idea is to pick up this text automatically. These are all certainly well-known things, I do not pretend to invent them at all, I recommend reading textbooks to those who are interested in the mnemonics themselves [1].

First letter coding


The initial idea was to try to pick a quote from the poetic part of the school curriculum that would correspond to a given car number, that is, some random sequence of letter-three_numerals-two_ letters (regular number without a region code). It was assumed that the first letter gives rise to the first word, each of the three digits is encoded by a consonant, each of which also gives rise to the word and the last two letters are two more words. Moreover, the Russian car number cannot contain any letters, only 12 of them are used: a, b, c, e, n, t, m, o, k, p, y, x. Several major poems were taken: Eugene Onegin, Poltava, Ruslan and Lyudmila, Romeo and Juliet + Krylov's fables. During the analysis, 1000 random numbers are generated for which a quote from these works is selected
The following script was written:
#!/usr/bin/php<?php
$path="school/";
$letters = array("а", "в", "с", "е", "н", "т", "м", "о", "к", "р", "у", "х");
$numbers = array("о", "р", "д", "т", "ч", "п", "ш", "с", "в", "м");
// получение случайного элемента из массива (отличие от array_rand в том, что возвращается значение, а не ключ)functionrn($a){ return $a[rand(0, count($a)-1)]; }
// получение длины и максимально возможной генерируемой последовательностиfunctiongetmax($handle, $required){
	$result=array(); $max = 0; $queue = array();
	fseek($handle, 0);
	while (($buffer = fgets($handle, 4096)) !== false) {
		$words=explode(" ", $buffer);
		for ($j=0;$j<count($words); $j++) {
			// обрезаем лишние символы и понижаем регистр
			$w = mb_strtolower(trim($words[$j], " \t.,\n\r0123456789:-!;?"), "UTF-8");
			if (!$w) continue;
			$queue[]=$w;
			$avail = min(count($required), count($queue));
			$match = $avail; 
			for ($k=0;$k<$avail;$k++) {
				if (mb_strpos($queue[$k], $required[$k], 0, "UTF-8")!==0) {
					$match = $k; break;
				}
			}
			if ($max<$match) $max=$match;
			if ($match===count($required)) {
				$result[]=array_splice($queue, 0, $match);
				returnarray($max, $result);
			}
			if (count($queue)>=count($required))
				array_shift($queue);
		}
	}
	returnarray($max, $result);
}
$plates = array();
for ($i=0;$i<1000;$i++) $plates[]=array(rn($letters), rn($numbers), rn($numbers), rn($numbers), rn($letters), rn($letters));
$files=scandir($path);
for ($i=0;$i<count($files);$i++) { 
	if (is_dir($path.$files[$i])) continue;
	$handle = @fopen($path.$files[$i], "r");
	if ($handle) {
		$cnt=array(0,0,0,0,0,0,0); $max = 0; $avg = 0; $best = array();
		for ($j=0;$j<count($plates);$j++) {
			list($c, $seq) = getmax($handle, $plates[$j]);
			if (($max && $max<$c) || !$max) { $max = $c; $best=array(implode("", $plates[$j])=>$seq);}
			elseif ($max===$c) $best[implode("", $plates[$j])]=$seq;
			$cnt[$c] += 1;
			$avg += $c;
		}
		$avg/=count($plates);
		print $files[$i]."\t".$avg;
		for ($j=0;$j<count($cnt);$j++) print"\t".$cnt[$j];
		print"\n";
		print_r($best);
	    fclose($handle);
	}
}


If you comment a little on the code, then all incoming words are added to the queue, which grows no more than the length of the selected sequence. The length of the maximum match is remembered. Thus, the maximum number of letters from the beginning that can be encoded using some text is found out.

The results are as follows:
TitleThe average0one23fourfive6Volume
Fables of Krylov2.434035530403thirty2083Kb
Eugene Onegin3.2370012054930624one1.1 Mb
Poltava2.507017510424472085Kb
Romeo and Juliet2.821036239598122five0219Kb
Ruslan and Ludmila2.617068359469976one138Kb


We can say that these results did not please me, it turns out that only for two numbers out of 1000 it turned out to pick up a quote. Let's look at these two quotes: m052rk - “mine.” They are, with an addicted soul Jealous of ”; o817vs - “From the inflamed Ruslan Suddenly hid among.” Some logic in these phrases is certainly present, but the incompleteness and fragmentation makes their memorization not too simple. Nevertheless, tests allowed us to say that even on the basis of these texts in most cases it turns out to generate a sequence for three letters.

Of course, I became interested: what happens when the texts get bigger? Perhaps a larger number of fragments appear from which you can already choose. For the next test, I chose from the Moshkov library: two Bible testament in a synodal translation, all major Baudelaire verses, all Dostoevsky’s novels, “The Hobbit, or There and Backward”, all Pushkin’s novels in verses, all of Shakespeare’s, all Tolstoy’s novels. The following results were obtained:

TitleThe average0one23fourfive6Volume
Old Testament3.09001885572351731.1 Mb
New Testament3.1260131804982891731.5 Mb
Dostoevsky4.05300ten2065262372115 Mb
Tolkien3.120ten148581234270807Kb
Pushkin3.2340011456529525one1.2 Mb
Baudelaire2.9430four231594160eleven0461Kb
Shakespeare4.489000494744166164 Mb
Tolstoy3.9600eight236555190eleven11 Mb


Quotations themselves turned out quite a lot, so as not to bore the reader, I won’t give them all, I’ll just mention that their character remained the same, some unfinished and mysterious: in 488th - “That's what, Vanya believe one: Masloboev”, t380tt - “three thousands, he cried out, three thousand, "m081 not -" slavery is pleasure to me from you. There is". Having read them all, the thought of some fortune-telling that suits books (when they open a random page, read a random line and try to somehow interpret it within the framework of their own lives) is visited. But I did not set such goals.


Graph of the average versus the decimal logarithm of the volume (Y - average, plus or minus standard deviation, and X - the logarithm of the volume of text used)

In principle, this kind of dependence could be guessed, only two volumes of the Bible are slightly knocked out here, but otherwise the average grows in proportion to the volume logarithm.

Length Coding


The first thing that comes to mind is that the way of encoding too much text is left out of the question, that is, for numbers only 10 letters are taken and for letters 12, the rest of the words only break the chains. Of course, you can come up with other coding methods that use all letters, or at least only consonants. These methods are described in the literature, but my idea was to make an easy-to-use tool so that the user did not puzzle over how the phrase corresponds to this number, which letters to discard and which to take into account, otherwise it would be possible apply coding to the first significant letter, it gives unambiguity, but is not convenient for a person. The idea came to encode numbers by the number of letters in a word. With this encoding, there is a problem of representing zero, but for now we will not dwell on this. In order to compare, I conducted a series of tests on the same set and according to the same rules (the code is almost the same, for this reason the listing would be one repetition):

TitleThe average0one23fourfive6Volume
Fables of Krylov2.83109620349019713one83Kb
Onegin3.49709685166536113four1.1 Mb
Poltava2.80809623145919913285Kb
Romeo and Juliet3.149096116377371346219Kb
Ruslan and Ludmila2.94096178443258232138Kb


We can say that the situation is much better, only the same number 96 in the “1” column is immediately alarming, numbers are calculated here for which a word was found in the first letter, but not in the first digit. These are naturally numbers starting at zero, about 100 of these numbers are still in columns 2 and 3, as you can see, there are no more than 85. An example of the resulting quote: v325nm - “to you: I would be glad ... I can’t right.” The discontinuity in the case of poems can be compensated for by quoting from the beginning of the line, the user will need to additionally remember where the number begins in the poem, for example, the quoted quote should be displayed as: “I swear to you: I would be glad ... I can’t right.” Or even with the previous line: “Ah, gracious knight, I swear to you: I would be glad ... I can’t right.” But already the beginning of the phrase ceases to be obvious. If you remember the beginning of a phrase, then you can also remember the position of the zeros separately. Perhaps someone will find such an idea a mockery, but I consider it applicable at least.
Application of this idea gives the following results:

TitleThe average0one23fourfive6Volume
Fables of Krylov3.4440011442636788five83Kb
Onegin4.2600293596261481.1 Mb
Poltava3.4130013241436783four85Kb
Romeo and Juliet3.791003929850814312219Kb
Ruslan and Ludmila3.61100833564459917138Kb
Old Testament4.18900five126585243411.1 Mb
New Testament4.29200383581285481.5 Mb
Dostoevsky5.019000020856522715 Mb
Tolkien (The Hobbit)4.12300215558723026807Kb
Pushkin4.25100394593269411.2 Mb
Baudelaire3.9460018214591158nineteen461Kb


According to these data, it can be assumed that for a random number with a probability of 22%, you can pick up the appropriate quote from Dostoevsky, is not bad. The quotes, of course, turn out to be very significant, as in the past case: В725вр - “looks at our cheerful work merrily”, m582to - “my words seemed to touch her, she”, m385ns - “meanwhile, by some miracle there is an unusual resemblance”, к514nt - "The bloody battle and the day has come for the crowd."

But what if you generate not for car numbers, but for telephone numbers? No sooner said than done:

TitleThe averageone23fourfive67
Fables of Krylov4.1450232703872147135
Onegin5.248009260347242142
Poltava4.1310sixteen2933851937637
Romeo and Juliet4.6080013837428614656
Ruslan and Ludmila4.3490eleven2123812569347


These results suggest that for a six-digit random number with a probability of almost 40% there is a corresponding quote from the work “Eugene Onegin”, and these are poems that are much more pleasant to remember (not for everyone most likely, but for the majority, nevertheless, I hope )

other methods


What other possibilities remained behind the scenes: the generation of texts, namely the generation of the corresponding words or sentences of a certain structure (with the required number of letters or even how), in principle, this has long been done without computers. The textbook indicated in the literature offers for each number from 0 to 1000 a word that has already been selected by the author, but, unfortunately, this method does not make it possible to memorize large numbers, since the images cannot be combined, this, according to the author, erases them. It is understandable, everything begins to overlap, and so on. Here's an easy way, for example: you can encode numbers with common associations - 3 (from 03) - a doctor, 7 - an ax (because of form) and for example 5 - Friday.

Conclusion


The word length generation algorithm is implemented in an application that recognizes car numbers on mobile devices and is a non-profit development just for fun. In addition, such selection is carried out on the site YaZapomnil [2].

It seemed quite interesting to me that the variety of texts regarding such strange metrics as the sequence of the number of letters or the sequence of the first letters of words grows with an increase in the volume of the text. Moreover, the results are pretty good on the line. As the text increases, the possibility of choosing between fragments increases, this may improve their quality.

At the moment, I’m thinking of a source that would contain a large number of beautiful texts, as well as a way of comparison that would be obvious to a person and that would allow me to select a larger number of quotes.
I would be glad if the idea seemed interesting.

References


  1. Kozarenko V. A. Textbook of Mnemonics, 2002, electronic publication
  2. Selection of quotes by the number yazapomnil.ru/n/

Read Next