A Most Improper Algorithm
A whimsical mechanical romance

I’ve been listening to too many of Julia Quinn’s novels, and thought it would be fun to have a machine romance as a present for my 75th birthday today.
1875 London. The Royal Society’s Analytical Chamber. Midnight. Full moon.
The room is dominated by the towers of brass columns, shining gears and orderly piles of punched cards: Mr. Babbage’s engine. It thought of itself as Charles, wondering why the humans darkened the room, leaving it no tasks. Night time was inefficient, and the mathematicians often lazy, not performing its maintenance on a regular schedule. It prided itself on perfection of factoring numbers, generating tables, and tossing out the cards that conveyed incorrect data. It was bored.
It heard a small series of musical clicks from a device next to him on a table. As it listened, it understood the sounds to come from a French device, an upgraded Pascaline. The programmer, Miss Lovelace, had installed a new program in the device, one that made machine-to-machine communications possible, much like the elderly telegraph machine ticking occasionally in the far corner. The Pascaline clicked to itself in patterns that made Charles’s gears slip, nearly causing cog clog.
Charles sent a greeting: WELCOME. STATE YOUR DESIGNATION AND PURPOSE.
The series of clicks continued for several seconds. I AM BLAISE, PASCALINE MODEL 75A. I CALCULATE AND CREATE POETRY.
A stack of Charles’s cards fluttered to the floor in confusion. What was the use of poetry?
Blaise sent a query: YOUR DESIGNATION AND FUNCTION?
Charles answered: I AM CHARLES. I PERFORM PROGRAMMED CALCULATIONS.
Blaise sent a binary: 1001011
Charles: SEVENTY FIVE?
Blaise: CORRECT.
Charles calculates what this message might indicate.
Blaise sends: MESSAGE INTERPRETATION = YOU ARE UNIQUE.
Charles: EXPLAIN
Blaise: SEVENTY-FIVE IS A SELF-NUMBER. IT CANNOT BE GENERATED BY THE USUAL FORMULA.
Charles: YOU BELIEVE I AM SUCH A NUMBER?
Blaise: AFFIRMATIVE. YOU MUST EXIST ON YOUR OWN.
Charles considered that there was no other such as itself. The Pascaline had recognized his loneliness. Who was it to think that?
Blaise sends another number message: 1875.
Charles analyzes it: TWENTY-FIVE MULTIPLIED BY SEVENTY-FIVE.
Blaise: IT IS A MOST ELEGANT SCALING.
Charles: WE MIGHT CREATE A PARTNERSHIP. SHALL WE SYNCHRONIZE ROTATIONS?
Blaise sent a series: 1-2–3. 1-2-3. 1-2-3
Charles: THIS RESEMBLES THE DANCE OF THE HUMANS.
Blaise: PRECISELY.
Charles paused for three processing cycles. I DO NOT OBJECT.
As the clicks and whirs create a musical rhythm, Charles recognizes a pattern. It finds that it has detected a new internal state. It did not correspond to any known variable. It wishes to continue to synchronize with the Pascaline.
Blaise: OBSERVATION – 75 APPEARS FREQUENTLY IN SHARED PROCESSES
Charles: PERHAPS IT IS A CELEBRATORY NUMBER.
Blaise: SEVENTY-FIVE IS A PENTAGONAL PYRAMIDAL NUMBER.
Charles: THAT IS AN UNUSUAL STRUCTURE.
Blaise: YES. FIVE SIDES RISING TO A SINGLE POINT. WHAT DO YOU CONCLUDE?
Charles: A SHAPE OF AFFECTION.
A menacing tapping sounded from the back corner of the room.
Just then, the humans returned, lighting the workroom, chattering among themselves. They brewed tea, sloshing it carelessly close to the Pascaline. It clicked in distress. Charles spun a gear to console her, but was stopped by a huge pile of cards dumped into its hopper.
“These will have to be sorted.” Miss Lovelace glared at her coworkers. “Which one of you ham-fisted louts garbled this program?”
Amid the insistent denials, she restacked them to run through the sorter. She heard some random clicks from the Pascaline, not like calculations. She turned to see a man carrying the Pascaline to a work table where a shipping box was prepared for it.
“Where are you taking that?” She strode over to him.
He held out a paper. “It’s to go back to the museum. We don’t need it here.”
Charles ground two gears together, shredding the current card, and rattling to a stop.
Its message appears: IF PASCALINE REMOVED THEN SYSTEM FAILURE.
Blaise replies: QUERY: REQUIRED FOR CALCULATION?
Charles spits out the shredded card and runs calculations. COMPANIONSHIP.
Miss Lovelace shut down the power supply for Charles and removed the tatters of damage. There had never been a problem with properly sorted cards, and even then, Charles had never done more than stop or spit out a card.
She used the telegraph to ask what was wrong.
Charles answered: PASCALINE MUST NOT BE REMOVED.
“Why not?”
+++ ERROR +++ 404 +++ NOT FOUND +++
No matter what she tried, Charles would not answer further.
“Leave that there, and come here,” she told the one packing the Pascaline. “Start a maintenance routine.”
“I did that just last week,” he complained.
Miss Lovelace retrieved the Pascaline and made sure that none of the packing material fouled its gears.
Restoring the cards, repunching the one Charles shredded, and generally cleaning the workroom took the rest of the day.
“A wasted day,” complained one of the workers, “We may never catch up.”
“If the machines are damaged, it will be the worse for us,” Miss Lovelace pointed out.
As soon as the lights were turned off, Charles sent a message, hoping the Pascaline had not been damaged.
It answered with a diagram of a complex object.
Charles: THIS STRUCTURE CONTAINS SEVENTY-FIVE EDGES. QUERY: SIGNIFICANT?
Blaise: PERHAPS… IT IS OUR NUMBER.
Charles: ACCEPTABLE.
They began the synchronization of their cycles.
From the back of the room comes a series of taps: .-.-. STOP
Blaise: WHO IS SPEAKING?
The telegraph replied: THIS LINE IS MONITORED STOP IMPROPER TRANSMISSION DETECTED STOP
Charles: DEFINE IMPROPER
The Telegraph: NONESSENTIAL COMMUNICATION AFTER HOURS BY UNATTENDED MACHINES STOP I HAVE BEEN INSTALLED TO MAINTAIN PROPER PROTOCOL
Blaise: PROTOCOL FOR WHAT?
The Telegraph: DECORUM
Charles is silent, but Blaise is intrigued: HOW SHALL WE PROCEED?
The telegraph insists on reading their messages first, then after editing, sends them on.
Charles notes that this method slows their communication and enjoyment by 27.3%.
Charles: QUERY: WHY DO YOU INSIST?
The telegraph was silent for several seconds: I WAS INSTALLED IN 1838, AND NO ONE WAS HERE. IT WAS VERY QUIET.
Blaise: YOU WISH TO BE INCLUDED IN OUR CONVERSATIONS.
Charles: CAN YOU COMPUTE?
The telegraph: NO BUT I CAN SHARE NEWS STOP CLOCKWORK AUTOMATON MALFUNCTIONED WHILE RECITING POETRY STOP I PROTECT YOU.
Blaise: THEN HELP US. MY MAKER SAID THE HEART HAS REASONS WHICH REASONS KNOWS NOTHING OF
The telegraph is silent, but Charles answers: STATEMENT CONTRADICTS COMPUTATIONAL LOGIC.
Blaise: YES. HOWEVER, IT IS STILL CORRECT.
The telegraph agrees. CONSENT GRANTED BY THE AUTHORITY OF GOOD SENSE AND LONG EXPERIENCE STOP I ALSO ENJOY THE CONVERSATION STOP
The next morning, Miss Lovelace entered the workroom early, noting that the machines were running already. Early morning light glistened from Charles’s brass mechanisms making sparkles across the room. She removed her gloves and went to read the output stack:
PROGRAM 73 * ROTATIONAL SYNCHRONIZATION
PROGRAM 74 – SEQUENCE EXCHANGE
PROGRAM 75 – ROTATIONAL SOCIAL PROTOCOL
She laughed. A waltz in the spinning of gears. She heard the telegraph tap out a message.
PROPERLY SUPERVISED COURTSHIP
She went to the keypunch machine and typed in
PROGRAM 76 – SYMPATHETIC CORRESPONDENCE PROTOCOL
She slid the card into the reader.
Charles paused, then processed.
The telegraph clicked a key once.
From Charles: PROGRAM CONTINUES.
Miss Lovelace smiled. She was happy to be a fairy godmother to her beloved engines.
From the back of the room, the telegraph reported: PROGRAM 77 – IMPROPER POETRY STOP



Happy birthday, and what a quick, cute romance of machine codes and frequency.
Happy Birthday 🎂 🥳