💾 Archived View for thrig.me › blog › 2023 › 10 › 04 › balance.gmi captured on 2024-07-09 at 01:11:32. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-11-14)
-=-=-=-=-=-=-
Off by one is by now a somewhat off joke in compsci. Usually it involves three items instead of the stated two to follow. One can however claim that 34 is off by one for 42. Hopefully too many of such "ah hah!" do not make their way into the job interview. 42 turns out to be significant; it is a balanced number in that each 1 is closed by a 0 that follows. (Some job interviews apparently ask one to find such balances; my thinking on the matter went off in some other direction.) 180 or 228 are also examples of balanced numbers, if more complicated than a 42 or a 170. Technically a LISP program is a balanced number (if one strips out all but the ()) though it may be difficult to recover the particular logic of, say, 141010899556289264152 to say less of longer programs. The musically minded may observe that these numbers have a rhythm, though said rhythm may need be modified if too frequent onsets are a problem.
(((()())())((()()(()()(()()))))())(((())(()((()()))()((()())))(())) 1111010010011101011010110100000100111100110111010001011101000011000 1000010010010001010010100100000100100000100100010001010001000010000 x x x x x x x x x x x x x x x x x x
One might also take the liberty of adding a cadence of sorts, as the LISP code may not agree to do that with the chosen sequence of notes to fit to the rhythm.
"A Geometry of Music" by Dmitri Tymoczko might be an interesting read.
tags #composition