<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:glthr="https://glthr.com/ns/rss"><channel><title>Algorithms | GLTHR.com, by Guillaume Lethuillier</title><link>https://glthr.com/tag/algorithms</link><description>Articles in Algorithms on glthr.com.</description><language>en</language><lastBuildDate>Sat, 08 Mar 2025 16:26:03 +0000</lastBuildDate><atom:link href="https://glthr.com/tag/algorithms/" rel="self" type="application/rss+xml"/><item><title>Discovering Errors in Donald Knuth’s TAOCP</title><link>https://glthr.com/discovering-errors-in-donald-knuths-taocp</link><guid isPermaLink="true">https://glthr.com/discovering-errors-in-donald-knuths-taocp</guid><pubDate>Sat, 08 Mar 2025 16:26:03 +0000</pubDate><dc:creator>Guillaume Lethuillier</dc:creator><description>In 2019 I reported imprecisions in Knuth’s Dancing Links fascicle and a wrong citation in TAOCP; he fixed them and sent me two reward checks, shown in scans.</description><content:encoded><![CDATA[<aside class="callout callout-abstract">
  <span class="callout-emoji" aria-hidden="true">↘</span>
  <div class="callout-body">
    <p>In 2019, I reported imprecisions in the Dancing Links fascicle of Donald Knuth’s <em>The Art of Computer Programming</em> and a wrong citation in a pre-fascicle. He corrected both and sent me two reward checks, shown here. I describe each error with its correction and Knuth’s explanation.</p>
  </div>
</aside><p>In 2019, I reported errors in two parts of Volume 4 of Donald Knuth’s <em>The Art of Computer Programming</em> (TAOCP), for which I received two <a href="https://en.wikipedia.org/wiki/Knuth_reward_check" target="_blank" rel="noopener">Knuth reward checks</a>. To date, my account balance on his “bank”, the Bank of San Serriffe, <a href="https://www-cs-faculty.stanford.edu/~knuth/boss.html" target="_blank" rel="noopener">is still 0x2.40</a> (hexadecimal dollars): 0x2.00 for two errors, and 0x0.40 for two “<em>valuable suggestions.</em>”</p>
<p>His response to my error reports was faster than I expected: I emailed him four times to report different errors from December 18, 2019, to January 1, 2020 (although Knuth does not typically use email, <a href="https://www-cs-faculty.stanford.edu/~knuth/taocp.html" target="_blank" rel="noopener">there is an email address reserved for reporting TAOCP errors</a>, which his assistant prints). He updated the errata on January 1 and responded by postal mail on January 9, 2020.</p>
<p><img src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/f986b0e9-3965-4064-b940-e5806c8011d5.png" alt="Envelope from Stanford Engineering, with the printed sender Donald E. Knuth, Professor Emeritus of The Art of Computer Programming, postmarked San Francisco, 9 January 2020, and addressed by hand to the author; the postal address is blurred." width="800" height="355" data-full="/images/discovering-errors-in-donald-knuths-taocp/f986b0e9-3965-4064-b940-e5806c8011d5.png" data-full-width="800" loading="lazy" decoding="async"></p>
<p>The envelope contained my printed emails with his handwritten notes in pencil and two checks (dated December 24, 2019, and January 1, 2020).</p>
<p><img src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/8e01e6e3-791c-4c2a-be48-d0627d634795.png" alt="Reward check from Donald Knuth, drawn on the Bank of San Serriffe and dated 24 Dec 2019, crediting the author’s account with 1.00 hexadecimal dollar; the memo reads f8a.2." width="712" height="319" data-full="/images/discovering-errors-in-donald-knuths-taocp/8e01e6e3-791c-4c2a-be48-d0627d634795.png" data-full-width="712" loading="lazy" decoding="async"></p>
<p><img src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/7b6fb504-d70f-4771-8380-a998b9392fa2.png" alt="Second reward check from Donald Knuth, drawn on the Bank of San Serriffe and dated 01 Jan 2020, crediting the author’s account with 1.40 hexadecimal dollars (one and 64/256); the memo reads 4f5.(66,66)241." width="713" height="321" data-full="/images/discovering-errors-in-donald-knuths-taocp/7b6fb504-d70f-4771-8380-a998b9392fa2.png" data-full-width="713" loading="lazy" decoding="async"></p>
<p>Some reward recipients have shared their letters online, here and there; however, I will paraphrase Knuth’s responses instead of reproducing them verbatim, as they are part of private correspondence (this can change in the future—with his express permission, for instance; in that case, I will update this article to share a full scan of the letters). A notable exception is an excerpt of a letter containing generic information and a good anecdote: Knuth wished me a “<em>Joyeux Noël</em>” (French for “Happy Christmas”) because, probably without realizing it, I sent him an email on December 25.</p>
<p><a class="img-link" href="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/48a85378-ad42-4f28-9766-ce34ffae92f3.png" title="Open full size (2768×384)"><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/48a85378-ad42-4f28-9766-ce34ffae92f3-1800w.png" alt="Header of the author’s printed email about TAOCP Vol. 4, Pre-Fascicle 5c (Dancing Links). Highlighted: next to its date, Wed, Dec 25, 2019, Knuth circled the day and wrote “Joyeux Noël” in pencil." width="1800" height="250" data-full="/images/discovering-errors-in-donald-knuths-taocp/48a85378-ad42-4f28-9766-ce34ffae92f3.png" data-full-width="2768" loading="lazy" decoding="async"></a></p>
<h2 id="heading-errors-related-to-algorithm-x">Errors Related to Algorithm X<a class="anchor" href="#heading-errors-related-to-algorithm-x" aria-hidden="true" tabindex="-1">#</a></h2>
<p>I was familiar with <a href="https://en.wikipedia.org/wiki/Knuth%27s_Algorithm_X" target="_blank" rel="noopener">Algorithm X</a> before reviewing Volume 4 Pre-Fascicle 5c (published as Volume 4, Fascicle 5)—because <a href="https://en.wikipedia.org/wiki/Exact_cover" target="_blank" rel="noopener">exact cover problems</a> are fantastic! I did not expect to find fundamental errors, as Algorithm X has probably been one of the sections most thoroughly reviewed by its creator.</p>
<p>At that time, I kept track of Algorithm X’s states manually (I was on a flight without a computer). I maintained a record of the memory state with pen and paper, an experience that allowed me to focus on the essential details and discover small errors and imprecisions that led to minor corrections.</p>
<h3 id="heading-reported-errors">Reported Errors<a class="anchor" href="#heading-reported-errors" aria-hidden="true" tabindex="-1">#</a></h3>
<h4 id="heading-local-variables-not-declared">Local Variables Not Declared<a class="anchor" href="#heading-local-variables-not-declared" aria-hidden="true" tabindex="-1">#</a></h4>
<p>While the local variables of the first algorithmic step, <code>cover(i)</code>, are identified as such, the variables of the subsequent steps are not.</p>
<p><a class="img-link" href="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/c6b68b0b-ed08-4be1-be8a-afd124182b52.png" title="Open full size (2122×310)"><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/c6b68b0b-ed08-4be1-be8a-afd124182b52-1800w.png" alt="Excerpt of TAOCP defining cover(i) for Algorithm X, formula (12). Highlighted on its first line: “(Here p, l, and r are local variables.)”" width="1800" height="263" data-full="/images/discovering-errors-in-donald-knuths-taocp/c6b68b0b-ed08-4be1-be8a-afd124182b52.png" data-full-width="2122" loading="lazy" decoding="async"></a></p>
<p><a class="img-link" href="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/bcbb0bd1-4cc6-4bfb-be27-077b6a69c5b9.png" title="Open full size (2122×244)"><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/bcbb0bd1-4cc6-4bfb-be27-077b6a69c5b9-1800w.png" alt="Excerpt of TAOCP defining hide(p), formula (13). The variables q, u and d are highlighted where they are first set: nothing says that they are local." width="1800" height="207" data-full="/images/discovering-errors-in-donald-knuths-taocp/bcbb0bd1-4cc6-4bfb-be27-077b6a69c5b9.png" data-full-width="2122" loading="lazy" decoding="async"></a></p>
<p>Though this is not particularly problematic (this is trivially inferable from the context), Knuth recognized that it would have been beneficial to state this characteristic for each step explicitly. However, <strong>he decided against breaking up Algorithm X between different pages due to space constraints and, therefore, could not add clarifications for each step</strong>; he then appropriately quoted Voltaire: “<em>The secret of being a bore is to tell everything.</em>” Nevertheless, Knuth ultimately found an elegant solution (see below).</p>
<p class="reward"><em>Reward: 32¢ (0x20¢)</em></p>
<h4 id="heading-unused-memory-fields">Unused Memory Fields<a class="anchor" href="#heading-unused-memory-fields" aria-hidden="true" tabindex="-1">#</a></h4>
<p>When it was time to simulate the impact of the algorithm on the memory state, I was confused by this:</p>
<p><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/cc4b9308-f844-4892-9f6e-6c97923c89b7.png" alt="Excerpt of TAOCP with Table 1, the initial contents of memory for Algorithm X. Highlighted: the sentence “Fields marked ‘—’ are unused.” and node 30, the last spacer, whose DLINK field holds a dash." width="1762" height="950" data-full="/images/discovering-errors-in-donald-knuths-taocp/cc4b9308-f844-4892-9f6e-6c97923c89b7.png" data-full-width="1762" loading="lazy" decoding="async"></p>
<p>My interpretation was that a program attempting to access one of these unused fields would fail, as I took them to be in an uninitialized state. And indeed, my pen-and-paper program failed when reaching the hide step for the last spacer. Using the memory dump table as an example, covering one of the last nodes after some iterations leads to setting <code>q</code> to 30 and, therefore, to <code>d ← DLINK(30)</code>. If an unused field means an uninitialized memory location, then the algorithm’s execution should prematurely stop as, in this example, <code>DLINK(30) = —</code>. However, <strong>Knuth clarified that he did not explicitly state the variable was <em>uninitialized</em>; instead, it must be assumed to be initialized, but its value has no impact on the algorithm.</strong></p>
<p class="reward"><em>Reward: 32¢ (0x20¢)</em></p>
<h4 id="heading-unused-variables">Unused Variables<a class="anchor" href="#heading-unused-variables" aria-hidden="true" tabindex="-1">#</a></h4>
<p>Finally, <code>N</code> and <code>Z</code> were set during the algorithm initialization step, but I did not need to utilize them when manually tracking the memory state.</p>
<p><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/c747ea0f-b896-422a-9adf-d38b8bb79a86.png" alt="Opening of Algorithm X (Exact cover via dancing links) in TAOCP. Highlighted in step X1, Initialize: “Also set N to the number of items, Z to the last spacer address”." width="1762" height="240" data-full="/images/discovering-errors-in-donald-knuths-taocp/c747ea0f-b896-422a-9adf-d38b8bb79a86.png" data-full-width="1762" loading="lazy" decoding="async"></p>
<p>According to Knuth, they were, in fact, used in the exercises, notably exercise 83.</p>
<p><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/b1d90f0a-2a9a-49a4-aeb3-b07d1e0f8172.png" alt="Statement of exercise 83 in TAOCP: extend Algorithm C so that a solution containing the jth option for the first covered primary item p leaves the secondary items that end the earlier options uncovered." width="1764" height="250" data-full="/images/discovering-errors-in-donald-knuths-taocp/b1d90f0a-2a9a-49a4-aeb3-b07d1e0f8172.png" data-full-width="1764" loading="lazy" decoding="async"></p>
<p>To ensure this was the case, he reviewed it and noticed an error: <code>N</code> should be <code>N₁</code>.</p>
<p><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/cc7b2f39-264a-417a-8adf-e23710e8ed1b.png" alt="Answer to exercise 83 in TAOCP. Highlighted: the condition that j be greater than N, where N should be N₁." width="1762" height="116" data-full="/images/discovering-errors-in-donald-knuths-taocp/cc7b2f39-264a-417a-8adf-e23710e8ed1b.png" data-full-width="1762" loading="lazy" decoding="async"></p>
<p>He graciously rewarded me for helping him discover this error. (I transitively found this error, so to speak.)</p>
<p class="reward"><em>Reward: $2.56 (0x$1.00)</em></p>
<h3 id="heading-corrections">Corrections<a class="anchor" href="#heading-corrections" aria-hidden="true" tabindex="-1">#</a></h3>
<p>Corrections arising from my emails, all dated January 1, 2020, can be found in the <em>Errata for Volume 4 Fascicle 5, long-form</em> (available <a href="https://www-cs-faculty.stanford.edu/~knuth/taocp.html" target="_blank" rel="noopener">here</a>). Specifically, they are listed on pages 5 and 13 of the downloadable compressed PostScript file.</p>
<p><a class="img-link" href="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/f4408f9d-58fe-4061-958f-74b803127c9b.png" title="Open full size (1922×480)"><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/f4408f9d-58fe-4061-958f-74b803127c9b-1800w.png" alt="Errata excerpt with two highlighted entries for page 66, dated 01 Jan 2020: “are unused.” becomes “are unused and can contain anything.”, and “(Here p, l, and r are local variables.)” becomes “(Undeclared variables like p, l, r are local.)”" width="1800" height="450" data-full="/images/discovering-errors-in-donald-knuths-taocp/f4408f9d-58fe-4061-958f-74b803127c9b.png" data-full-width="1922" loading="lazy" decoding="async"></a></p>
<p><a class="img-link" href="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/59a51bd1-fe77-477b-914c-8481f5283cc7.png" title="Open full size (1922×124)"><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/59a51bd1-fe77-477b-914c-8481f5283cc7-1800w.png" alt="Errata entry for page 241, line 2 of answer 83, dated 01 Jan 2020 and flagged with a triangle: the comparison of j with N becomes a comparison of j with N₁." width="1800" height="116" data-full="/images/discovering-errors-in-donald-knuths-taocp/59a51bd1-fe77-477b-914c-8481f5283cc7.png" data-full-width="1922" loading="lazy" decoding="async"></a></p>
<p>It appears that:</p>
<ul>
<li>
<p>Knuth clarified what an “unused” field means by stating that such fields are implicitly but necessarily initialized, yet “<em>can contain anything</em>”.</p>
</li>
<li>
<p>Instead of listing all local variables, he refers to <code>p</code>, <code>l</code>, <code>r</code> as being part of a <em>non-exhaustive</em> list of local variables (“<em>Undeclared variables like p, l, r are local</em>”).</p>
</li>
<li>
<p>Last, in his answer to exercise 83, he replaced <code>N</code> with <code>N₁</code>.</p>
</li>
</ul>
<h4 id="heading-small-aside-using-a-heartbeat-arrow-as-delimiter">Small Aside: Using a “Heartbeat-Arrow” as Delimiter<a class="anchor" href="#heading-small-aside-using-a-heartbeat-arrow-as-delimiter" aria-hidden="true" tabindex="-1">#</a></h4>
<p>Notice how Knuth uses a bespoke symbol (a “heartbeat-arrow”, <span class="inline-image"><img style="display:inline-block;width:auto;height:1em;margin:0 0.12em;vertical-align:-0.18em" class="has-dark img-small" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/heartbeat-arrow.w.png" alt="Heartbeat arrow" width="216" height="144" data-full="/images/discovering-errors-in-donald-knuths-taocp/heartbeat-arrow.w.png" data-full-width="216" loading="lazy" decoding="async"></span>
) to indicate the transition from the error to its correction:</p>
<p><a class="img-link" href="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/8d04fd5a-8624-4bf4-80a7-73617f926bad.png" title="Open full size (1920×362)"><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/8d04fd5a-8624-4bf4-80a7-73617f926bad-1800w.png" alt="Explanatory entry of the errata (page 666, dated 04 Jul 1776). Highlighted: if the book says ‘n’ where it should have said ‘n + 1’, the change is shown as n, a zigzag arrow pointing right, then n + 1." width="1800" height="339" data-full="/images/discovering-errors-in-donald-knuths-taocp/8d04fd5a-8624-4bf4-80a7-73617f926bad.png" data-full-width="1920" loading="lazy" decoding="async"></a></p>
<p>This is because, as his corrections are inline/embedded (no table), he needed a symbol that is necessarily not already present in his books; otherwise, it could have been confused with a corrected symbol (typically, a simple right-pointing arrow, →, would have most probably been confused with a corrected material implication, and so forth). I believe this is an illustration of a <em>delimiter</em>, a special marker that must not be mistaken for the regular text; Knuth obtains this with a symbol his books do not use, whereas the delimiters of <a href="https://glthr.com/quotation-marks-string-literals-and-dna">an earlier article</a> are built from ordinary symbols.</p>
<h2 id="heading-erroneous-reference-to-an-obscure-article">Erroneous Reference to an Obscure Article<a class="anchor" href="#heading-erroneous-reference-to-an-obscure-article" aria-hidden="true" tabindex="-1">#</a></h2>
<h3 id="heading-reported-error">Reported Error<a class="anchor" href="#heading-reported-error" aria-hidden="true" tabindex="-1">#</a></h3>
<p>When reading the section on Hamiltonian paths in antiquity from Volume 4, Pre-Fascicle 8a, I stumbled upon the reference to a French article about icosahedral objects inscribed with Greek letters: P. Perdrizet, in <em>Bulletin de l’Institut français du Caire</em> 30 (1930), 1-16. I did not find this article in the journal, but instead <a href="https://gallica.bnf.fr/ark:/12148/btv1b53180372w" target="_blank" rel="noopener">located it</a> in <em>Bulletin de l’Institut français d’archéologie orientale</em>.</p>
<p>Acknowledging the error, <strong>Knuth took the time to review some articles in this journal and strongly recommended a volume about Egyptian poetry:</strong> <a href="https://ignca.gov.in/Asi_data/31424.pdf" target="_blank" rel="noopener"><em>Bulletin de l’Institut français d’archéologie orientale</em>, tome XXXV (1935)</a>. Although he did not specify an article, I believe he referred to Vikentiev, V. (1935). The metrical scheme of the « Shipwrecked Sailor ». <em>Bulletin de l’Institut français d’archéologie orientale</em>, 35(1), 1–40. It is indeed remarkable for that time (see notably Planche 1, page 18 of the PDF).</p>
<p class="reward"><em>Reward: $2.56 (0x$1.00)</em></p>
<h3 id="heading-correction">Correction<a class="anchor" href="#heading-correction" aria-hidden="true" tabindex="-1">#</a></h3>
<p>There is no erratum, as it is a pre-fascicle that is directly edited.</p>
<p>Here is, as a substitute, a comparison of a version from November 2019, retrieved with the Wayback Machine, and the current one (March 2025):</p>
<p><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/61ae981b-3c03-40d9-bd7f-7a50e76f6b84.png" alt="November 2019 version of the passage “Hamiltonian paths in antiquity”. Highlighted reference: P. Perdrizet, in Bulletin de l’Institut français du Caire 30 (1930), 1–16." width="1622" height="428" data-full="/images/discovering-errors-in-donald-knuths-taocp/61ae981b-3c03-40d9-bd7f-7a50e76f6b84.png" data-full-width="1622" loading="lazy" decoding="async"></p>
<p><img class="img-wide" src="https://glthr.com/images/discovering-errors-in-donald-knuths-taocp/ca0f5785-98d5-4d08-9c09-55e380452950.png" alt="March 2025 version of the same passage. The highlighted reference now reads: P. Perdrizet, in Bulletin de l’Institut français d’archéologie orientale 30 (1930), 1–16." width="1628" height="424" data-full="/images/discovering-errors-in-donald-knuths-taocp/ca0f5785-98d5-4d08-9c09-55e380452950.png" data-full-width="1628" loading="lazy" decoding="async"></p>
<h2 id="heading-conclusion">Conclusion<a class="anchor" href="#heading-conclusion" aria-hidden="true" tabindex="-1">#</a></h2>
<p>This event has left me with an immense sense of respect for Donald Knuth’s dedication to accuracy and attention to detail. It was an honor to contribute to the improvement of his work, even if it was just a small (to be honest: minuscule) part. I look forward to continuing my exploration of the latest published TAOCP fascicle, and discovering more errors to correct.</p>
]]></content:encoded></item><item><title>Contextual Yet Non-Descriptive Errors</title><link>https://glthr.com/contextual-yet-non-descriptive-errors</link><guid isPermaLink="true">https://glthr.com/contextual-yet-non-descriptive-errors</guid><pubDate>Tue, 24 Oct 2023 16:03:14 +0000</pubDate><dc:creator>Guillaume Lethuillier</dc:creator><description>I propose a dynamic mapping that generates unique, deterministic error codes on the fly, encapsulating the context of an error in a single number.</description><content:encoded><![CDATA[<aside class="callout callout-abstract">
  <span class="callout-emoji" aria-hidden="true">↘</span>
  <div class="callout-body">
    <p>I propose computing contextual error codes as bitmasks: each error-item has a stable power-of-two identifier, selected items are combined with OR, and engineers recover them with AND. The code represents a set of circumstances, complements a readable error message and can be decoded without looking up a log. It obscures implementation details rather than keeping them secret, and its capacity depends on the code’s bit width.</p>
  </div>
</aside><p>Developers must carefully balance the amount of information provided in error messages displayed to end-users. Disclosing too much information through these errors <a href="https://owasp.org/www-community/Improper_Error_Handling" target="_blank" rel="noopener">can lead to security breaches</a>. On the other hand, using generic error messages <a href="https://support.microsoft.com/en-gb/topic/-something-went-wrong-but-you-can-try-again-msa-b211f0a3-d7a9-e12e-1580-dfbe9b9c820e" target="_blank" rel="noopener">can make it more challenging for support teams to identify and resolve the underlying issues</a>.</p>
<p>A feasible solution is creating public-facing error messages that map to internal (potentially confidential) error objects, such as <a href="https://support.apple.com/en-us/HT204770" target="_blank" rel="noopener">iOS update and restore error codes</a>. These error codes are not very descriptive (or not descriptive at all), but they offer context to the engineers who can map them to their actual meaning—in terms of actual implementation. This manual and static mapping requires developers to maintain it when new categories or combinations of errors arise, which can be prone to errors and incompleteness.</p>
<p>To avoid the need for manual error code mapping, I propose <strong>a dynamic mapping that generates unique and deterministic error codes on the fly, encapsulating the context of an error in a single number (an error code)</strong>.</p>
<p>Programmers will recognize the mechanism: it is a set of bit flags, which Go writes <code>1 &lt;&lt; iota</code>. Structured error codes are not new either: a Windows <code>HRESULT</code> packs a severity bit, a facility and a code into 32 bits, and an SQL <code>SQLSTATE</code> is a two-character class followed by a three-character condition. What differs here is the use: there, each code is assigned and listed in a catalogue; here, only the error-items are listed, and the code of any combination is computed when the error occurs.</p>
<p>These dynamic error codes are contextual (they offer clues about the context of the errors), yet non-descriptive (they say nothing about that context to anyone who does not hold the list of error-items).</p>
<p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/error-code-idea.w.png" title="Open full size (2400×660)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/error-code-idea.w-1800w.png" alt="On the left, a panel named Context about the error, component, error type, etc., holds three highlighted error-items: Component A, Database error and Instance 1; a note says they are read back by the engineers. An arrow labelled encoded leads to a panel named Error code that shows only the number 7, shown to the user. A brace under the context reads contextual, a brace under the code reads non-descriptive, and the word yet stands between them." width="1800" height="495" data-full="/images/contextual-yet-non-descriptive-errors/error-code-idea.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
<h2 id="heading-identification-of-error-items">Identification of “Error-Items”<a class="anchor" href="#heading-identification-of-error-items" aria-hidden="true" tabindex="-1">#</a></h2>
<p>To begin with, I <em>define</em> a set of miscellaneous items—“error-items”—that can help identify the root cause of bugs, such as components, instances of the application (when the application knows their characteristics by the time an error object is generated), categories of errors, and so on. The developers arbitrarily define these error-items based on their perceived usefulness in debugging a specific issue. The purpose of these items is to quickly pinpoint the root cause of a bug; in other words, <em>to characterize the context of an error.</em></p>
<p>Let’s use a toy example to illustrate this idea.</p>
<p>A small application consists of two main components (or packages, or microservices, <em>etc.</em>), which can be instantiated several times. Additionally, I identify three categories of errors: WebSocket errors, some business logic errors, and database errors.</p>
<p>From the point of view of the definition of error details, this application contains a mixed bag of 8 error-items. I arbitrarily identified them as useful pieces of information that, when combined, can provide a relevant context to debug future bugs. I do not need to anticipate all combinations of items (or, to put it in another way, all possible error contexts): <em>this approach does it for me</em>.</p>
<p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/error-items.w.png" title="Open full size (2400×588)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/error-items.w-1800w.png" alt="Three panels group the eight error-items by kind. Components, marked by an oval: Component A, External component, Component B. Instances, marked by a triangle: Instance 1, Instance 2. Error categories, marked by a rectangle: Database error, Business logic error xyz, WebSocket error." width="1800" height="441" data-full="/images/contextual-yet-non-descriptive-errors/error-items.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
<p>Then, to represent each item in the error code, I start by assigning a unique number—a power of two—to each of them. These numbers are their identifiers.</p>
<p>Using binary manipulation, I create a one-hot vector for each item by left-shifting one bit by the position of the item in the list of error-items defined for the application (<code>1 &lt;&lt; index</code>; in a Go list of constants, <code>iota</code> is this index). The first item will be represented as <code>0b1</code> (1), the second as <code>0b10</code> (2), the third as <code>0b100</code> (4), and so on.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">type</span><span class="w"> </span><span class="nx">errorItem</span><span class="w"> </span><span class="kt">int64</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="kd">const</span><span class="w"> </span><span class="p">(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nx">ComponentA</span><span class="w"> </span><span class="nx">errorItem</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="kc">iota</span><span class="w"> </span><span class="c1">// 1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nx">DatabaseError</span><span class="w">                    </span><span class="c1">// 2</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nx">Instance1</span><span class="w">                        </span><span class="c1">// 4</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// ... list of error-items ...</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">)</span><span class="w">
</span></span></span></code></pre></div><p>These identifiers can alternatively be generated arithmetically, from the index <em>i</em> of each item:</p>
<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>i</mi><msub><mi>d</mi><mi>i</mi></msub><mo>=</mo><msup><mn>2</mn><mi>i</mi></msup></mrow><annotation encoding="application/x-tex">id_{i} = 2^{i}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="katex-base"><span class="katex-strut" style="height:0.8444em;vertical-align:-0.15em;"></span><span class="mord mathnormal">i</span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="katex-sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="katex-base"><span class="katex-strut" style="height:0.8747em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8747em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="katex-sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span></span></span></span></span></span></span></span></span></span></span></span></span><p>The error-items are now labelled.</p>
<p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/error-identifiers.w.png" title="Open full size (2400×840)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/error-identifiers.w-1800w.png" alt="A table lists the eight error-items in the order that assigns their identifiers, with index, name, identifier and binary value: 0 Component A, 1, 00000001; 1 Database error, 2, 00000010; 2 Instance 1, 4, 00000100; 3 Business logic error xyz, 8, 00001000; 4 External component, 16, 00010000; 5 WebSocket error, 32, 00100000; 6 Component B, 64, 01000000; 7 Instance 2, 128, 10000000. In each binary value only one digit is 1, and it moves one place left per row. A side panel gives the rule: identifier = 1 « i = 2 to the power i, a power of two, one bit per item." width="1800" height="630" data-full="/images/contextual-yet-non-descriptive-errors/error-identifiers.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
<p>This auto-generated mapping between error-items and their identifiers can be easily extended whenever a new feature is added to the application or when it becomes apparent that a new item needs to be defined. This can be done just by adding the new item to the list of constants, ensuring that all new items are properly represented in the error code.</p>
<p>It should be noted that, for the system to be future-proof, obsolete items have to be disabled—for instance by using a special enum—instead of being removed, and identifiers of new items have to be <span class="cue" data-cue="error-version" data-cue-value="8">greater than previous ones</span>.</p>
<div class="ix" data-ix="error-version" id="ix-1">
<div data-ix-fallback><div class="table-wrap" tabindex="0" role="region" aria-label="Scrollable table">
<table>
  <thead>
      <tr>
          <th>Code already issued</th>
          <th>Meant</th>
          <th>Read after adding “Cache error” first</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>7</td>
          <td>Component A, Database error, Instance 1</td>
          <td>Cache error, Component A, Database error</td>
      </tr>
      <tr>
          <td>33</td>
          <td>Component A, WebSocket error</td>
          <td>Cache error, External component</td>
      </tr>
      <tr>
          <td>208</td>
          <td>External component, Component B, Instance 2</td>
          <td>Business logic error xyz, WebSocket error, Component B</td>
      </tr>
  </tbody>
</table>
</div>
<p><em>Added first, a new item moves every identifier up: the codes already issued name the wrong items.</em></p>
</div>

</div>




<p>Each error-item takes one bit of the code, so the size of the code bounds the number of items: with the <code>int64</code> used above, an application can define up to 64 error-items (63 if the code must stay positive, as the last bit is the sign bit). The toy example needs only 8.</p>
<h2 id="heading-encoding-the-error-context">Encoding the Error Context<a class="anchor" href="#heading-encoding-the-error-context" aria-hidden="true" tabindex="-1">#</a></h2>
<p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/encoder.w.png" title="Open full size (2400×615)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/encoder.w-1800w.png" alt="A list of error-items with the identifiers 1, 2, 4, 8, 16, 32, 64 and 128 feeds the encoder from above, with an arrow labelled identifiers. On the left, Details about the error, component, error type, etc., flow into the Encoder, which applies a bitwise OR; on the right comes out the Error code, one number." width="1800" height="461" data-full="/images/contextual-yet-non-descriptive-errors/encoder.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
<p>When an error occurs in the application, its error code is computed through a bitwise <code>OR</code> operation on all selected error-items (basically, the items that compose the context of the error). This operation generates a unique number representing the union of items—as they are unique powers of two.</p>
<p>Let’s consider an example.</p>
<p>Suppose there are two items having identifiers <code>2</code> and <code>16</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">n</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="mi">16</span><span class="w"> 
</span></span></span><span class="line"><span class="cl"><span class="nx">fmt</span><span class="p">.</span><span class="nf">Printf</span><span class="p">(</span><span class="s">&#34;%d &lt;=&gt; %b (%b | %b)\n&#34;</span><span class="p">,</span><span class="w"> </span><span class="nx">n</span><span class="p">,</span><span class="w"> </span><span class="nx">n</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">16</span><span class="p">)</span><span class="w"> 
</span></span></span><span class="line"><span class="cl"><span class="c1">// 18 &lt;=&gt; 10010 (10 | 10000)</span><span class="w">
</span></span></span></code></pre></div><p>The result is a unique number (<code>18</code>) representing the union of the two singleton sets.</p>
<p>Here are additional illustrations of this idea, based on the toy example.</p>
<p>A) A database error returned by component A that occurred in the first instance of the application ⇒ <code>Component A ∪ Instance 1 ∪ Database Error</code> ⇒ <code>7</code></p>
<div class="ix" data-ix="error-code" id="ix-2">
<div data-ix-fallback><p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/example-a.w.png" title="Open full size (2400×990)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/example-a.w-1800w.png" alt="The table of the eight error-items, with Component A (1, binary 00000001), Database error (2, 00000010) and Instance 1 (4, 00000100) highlighted and the other five greyed. Under a rule, the bitwise OR of the highlighted rows gives 7, binary 00000111. A side panel, Example A, database error, component A, instance 1, gives 1 ∪ 2 ∪ 4 = 7 (111) and shows the error code 7." width="1800" height="743" data-full="/images/contextual-yet-non-descriptive-errors/example-a.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
</div>

</div>


<p>B) A WebSocket error returned by component A ⇒ <code>Component A ∪ WebSocket Error</code> ⇒ <code>33</code></p>
<p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/example-b.w.png" title="Open full size (2400×990)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/example-b.w-1800w.png" alt="The table of the eight error-items, with Component A (1, binary 00000001) and WebSocket error (32, 00100000) highlighted and the other six greyed. Under a rule, their bitwise OR gives 33, binary 00100001. A side panel, Example B, WebSocket error, component A, gives 1 ∪ 32 = 33 (100001) and shows the error code 33." width="1800" height="743" data-full="/images/contextual-yet-non-descriptive-errors/example-b.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
<p>C) An error returned by an external component that occurred in component B of the second instance of the application ⇒ <code>Component B ∪ External component ∪ Instance 2</code> ⇒ <code>208</code></p>
<p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/example-c.w.png" title="Open full size (2400×990)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/example-c.w-1800w.png" alt="The table of the eight error-items, with External component (16, binary 00010000), Component B (64, 01000000) and Instance 2 (128, 10000000) highlighted and the other five greyed. Under a rule, their bitwise OR gives 208, binary 11010000. A side panel, Example C, external component, component B, instance 2, gives 64 ∪ 16 ∪ 128 = 208 (11010000) and shows the error code 208." width="1800" height="743" data-full="/images/contextual-yet-non-descriptive-errors/example-c.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
<p>This operation is trivial: it simply corresponds to adding the identifiers of the error-items. What makes this process useful is that this addition can be <em>reversed</em> to extract its terms. In other words, <strong>the contextual information transformed by the addition can be reconstructed ex-post</strong>.</p>
<h2 id="heading-decoding-the-error-codes">Decoding the Error Codes<a class="anchor" href="#heading-decoding-the-error-codes" aria-hidden="true" tabindex="-1">#</a></h2>
<p><a class="img-link" href="https://glthr.com/images/contextual-yet-non-descriptive-errors/decoder.w.png" title="Open full size (2400×615)"><img class="has-dark img-wide" src="https://glthr.com/images/contextual-yet-non-descriptive-errors/decoder.w-1800w.png" alt="The same list of error-items, with the identifiers 1 to 128, feeds the decoder from above, with an arrow labelled identifiers. On the left, the Error code, one number, flows into the Decoder, which applies a bitwise AND; on the right come out the Details about the error, component, error type, etc." width="1800" height="461" data-full="/images/contextual-yet-non-descriptive-errors/decoder.w.png" data-full-width="2400" loading="lazy" decoding="async"></a></p>
<p>To decode the error code, it suffices to perform the reverse operation (permitted by the fact that the identifiers are unique powers of two) by applying the <code>AND</code> operation between each identifier and the error code. If the operation results in the identifier itself—that is: <code>(errorCode &amp; identifier) == identifier</code>—this item belongs to the context of the error.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">errorCode</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="mi">18</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">for</span><span class="w"> </span><span class="nx">_</span><span class="p">,</span><span class="w"> </span><span class="nx">identifier</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="k">range</span><span class="w"> </span><span class="p">[]</span><span class="kt">int</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="mi">16</span><span class="p">,</span><span class="w"> </span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="mi">64</span><span class="p">,</span><span class="w"> </span><span class="mi">128</span><span class="p">}</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nx">belongsToErrorContext</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="p">(</span><span class="nx">errorCode</span><span class="w"> </span><span class="o">&amp;</span><span class="w"> </span><span class="nx">identifier</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nx">identifier</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nx">fmt</span><span class="p">.</span><span class="nf">Printf</span><span class="p">(</span><span class="s">&#34;%d: %v\n&#34;</span><span class="p">,</span><span class="w"> </span><span class="nx">identifier</span><span class="p">,</span><span class="w"> </span><span class="nx">belongsToErrorContext</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 1: false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 2: true   ✔</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 4: false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 8: false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 16: true  ✔</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 32: false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 64: false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c1">// 128: false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><p>Because the identifiers are automatically mapped to the error-items, the reconstituted terms of the addition/<code>OR</code> operation are translated into a meaningful context.</p>
<h2 id="heading-discussion">Discussion<a class="anchor" href="#heading-discussion" aria-hidden="true" tabindex="-1">#</a></h2>
<p>So, what’s the point of these contextual yet non-descriptive errors?</p>
<p>These error codes lack helpful information for end-users, making it challenging for them to resolve the issue by themselves (when applicable). A user-friendly, customized error message is <em>always</em> preferable.</p>
<p>Furthermore, when investigating a bug, with this approach, engineers need to use a decoder that perfectly matches the encoder’s representation of error-items.</p>
<p>I think that these errors can still be helpful for the following reasons.</p>
<ol>
<li>
<p><strong>Complementary debugging device.</strong> This approach provides an additional indicator that <em>complements</em> well-thought-out error messages (it does not aim at replacing them), making it easier for developers to identify and resolve issues without leaking details about the internal implementation—just compare <code>Username cannot be created</code> vs. <code>Username cannot be created (11)</code>. It offers a clue about the context of an error without having the developers examine multiple variables and logs while making it harder for attackers to reverse-engineer sensitive information—though it obscures the details rather than keeping them secret: anyone who holds the list of error-items can decode the code. And whoever can provoke errors at will can learn, code after code, which bit goes with which cause: the code is obfuscated, not secret. Where that matters, encrypt it with a key that stays on the server before showing it. (Decoded against the toy example, <code>11</code>, that is <code>8 | 2 | 1</code>, names Component A, a database error and the business logic error xyz.)</p>
</li>
<li>
<p><strong>Simplified error management.</strong> Thanks to this algorithmic mapping, developers do not need to worry about managing error mapping, as this approach takes care of it automatically. This leads to increased flexibility in handling new combinations of existing items. For instance, imagine that the <code>Database Error</code> is only used in combination with <code>Component A</code> (because this component is the only one using a database). Later, this application is updated so that <code>Component B</code> now uses a database. No need for the developers to define a new error-item. It suffices to automatically generate a new error code based on the <code>Component B ∪ Database Error</code> union. Programmatically, the developer just has to call the function that generates the code with the enums corresponding to component B and the database error type. In this respect, while the error-items have to be defined, the mapping, corresponding to combinations of items, is dynamic.</p>
</li>
<li>
<p><strong>Simplified logging.</strong> When errors are propagated from one service to another, this approach simplifies logs by only transmitting the error code and potentially a customized error message, rather than duplicating the entire error object. In practice, in the context of a microservices architecture, people reviewing the logs of a service that propagates the error code can quickly identify the relevant log thanks to the contextual information encoded by the error code.</p>
</li>
<li>
<p><strong>Easy to implement.</strong> Last but not least, the encoder and decoder are based on simple, stateless, and easy-to-understand operations, further simplifying the development process.</p>
</li>
</ol>
<p>Why not a trace ID or a correlation ID, then, as many services already return? Such an ID is only a key: it says nothing by itself, and an engineer has to look it up in the logs, which supposes that the logs are kept long enough and can be reached. A contextual error code carries its context in the code itself: anyone with the decoder can read it from a screenshot sent by a user, without any log lookup. An ID remains the better choice when the whole history of a request matters (the exact time, the parameters, the sequence of calls across services), and nothing prevents an application from showing both.</p>
]]></content:encoded></item><item><title>Theseus, Penepos, and the Eternal Labyrinth</title><link>https://glthr.com/theseus-penepos-and-the-eternal-labyrinth</link><guid isPermaLink="true">https://glthr.com/theseus-penepos-and-the-eternal-labyrinth</guid><pubDate>Sun, 07 Jun 2015 00:00:00 +0000</pubDate><dc:creator>Guillaume Lethuillier</dc:creator><description>A short parable from 2015. Ariadne’s thread has been cut, and Theseus must leave the Labyrinth with an old blind man who can tell which paths cannot lead out.</description><content:encoded><![CDATA[<aside class="callout callout-abstract">
  <span class="callout-emoji" aria-hidden="true">↘</span>
  <div class="callout-body">
    <p>A parable from 2015 about P and NP: with Ariadne’s thread cut, Theseus must leave the Labyrinth guided by a blind old man who can tell, at each intersection, which paths cannot lead to the exit.</p>
  </div>
</aside><aside class="callout callout-note">
  <span class="callout-emoji" aria-hidden="true">✎</span>
  <div class="callout-body">
    <p><strong>Restored (November 2026):</strong> I first published this story on June 7, 2015, on my earlier site, and republished it on glthr.com on December 20, 2015. I restored it here with minor corrections.</p>
  </div>
</aside><p>It is well known that Theseus escaped the Labyrinth thanks to a ball of thread his beloved, Ariadne, gave to him. Let’s cut Ariadne’s thread. Because of us, Theseus has no means to find the exit. Of course he can systematically follow each path <em>(brute force)</em> and retrace <em>(backtrack)</em> his steps when necessary… until he dies because the Labyrinth is so vast and complex.</p>
<p>Struck by remorse, we now want to help Theseus. The Labyrinth is so complicated that we need a miracle; that is why we send him a supernatural—at least for the moment we think he is—companion: an old blind man named Penepos. He does not seem very impressive, bent over his walking stick. But this man seems to be able to <em>“see”</em> things mere human beings cannot. Here he is with Theseus.</p>
<p>He says to him, in a wavering voice and with his whitish eyes: <em>“Great Theseus, I will help you to find the path to the exit.”</em></p>
<p><em>“Well,”</em> replies Theseus in an English as broken as mine, <em>“that’s adorable, Penepos, but, <strong>well</strong>, I am sorry to ask you this question, but, <strong>huh</strong>, how can you be so confident when you are not even able to see your own feet?”</em></p>
<p>The old man remains silent, then says: <em>“Doubtful Theseus, at each intersection, I will tell you if the path we face <strong>cannot</strong> lead to the exit, or <strong>may</strong> lead to the exit. And at each intersection, you have the choice to follow me, or not.”</em></p>
<p>Theseus — <em>“OK, sure. I guess I have no real choice.”</em></p>
<p>And at each intersection, the old blind man confidently says that it is a dead end, even if the path seems to lead to a thousand others, or that it is a promising path. Theseus and Penepos are progressing fast despite the slow pace of the latter. Suddenly, they reach the exit.</p>
<p>Theseus is baffled: <em>“Truly, Penepos, you must be a demigod! You see things others cannot see. You are more useful than this stupid and fragile thread Ariadne gave to me.”</em></p>
<p>Penepos — <em>“Relieved Theseus, I am neither a god nor a demigod. I am not even a mere human. Maybe I am a demihuman. I do not deserve your honors.”</em></p>
<p>Theseus — <em>“But in this case, how did you manage to find the exit?”</em></p>
<p>Penepos — <em>“Because it is by the sea.”</em></p>
<p>Theseus opens his eyes wide; Penepos blinks his.</p>
<p>Theseus — <em>“I… I do not understand.”</em></p>
<p>Penepos — <em>“We are by the sea, just next to the exit. It is quite windy here.”</em></p>
<p>Theseus — <em>“I think I have lost the thread. <strong>Again</strong>.”</em></p>
<p><em>“Let me explain this to you,”</em> says the old man; <em>“when we were in the Labyrinth, when we were facing some paths, I was unable to feel anything on my skin, but when we were facing others, I was feeling a very subtle breeze. In front of some paths, I could not hear anything. In front of others, I could hear the remote muffled murmur of the sea. Since I am blind, I have to trust my remaining senses. Thus, I knew if the path was somehow linked to the exit or not without knowing how the paths are connected together. When you are in a labyrinth, you may use a map to see how the paths are linked to each other. Because I am blind, and because we had no map, <strong>I had to trust my own representation of this territory</strong>.”</em></p>
<p>Theseus — <em>“So, wait a minute. If checking the paths on the map is a simple task, and searching for the exit in the gigantic Labyrinth without a map is an impossible quest, you are telling me that we have experienced a situation where a very complex task can be solved almost as efficiently as checking if this task is done well?”</em></p>
<p>Old Penepos silently turns his face to the sea, and smiles; then, he leaves Theseus looking at the vast blue expanse with puzzled eyes.</p>
]]></content:encoded></item></channel></rss>