Russell Atkinson's Blog, page 25

September 14, 2022

A failed solving method

As a dedicated member of the American Cryptogram Association, I like to solve ciphers and I enjoy writing programs for that purpose. Regular readers will have read some of my posts on the subject. Recently I tried an experiment to modify my programs to make them faster. It didn’t work very well.

In its simplest form computer solving can be described as two steps: 1. try a decryption and 2. test the result. This process is repeated, usually until a solution is found or the user stops it. It can be done by running through a word list or by randomized guesswork such as hillclimbing. My idea to speed it up is very simple: don’t test the entire decryption; just test the beginning.

The way my programs usually do the testing is to score every tetragram (4-letter group) for its frequency in English or other target language. The more high-frequency tetragrams in the trial decryption, the more likely it is to be near the solution. I found that if I just test the first four tetragrams instead of the whole thing, it does save time. I found a strict cutoff score that allows 99.3% of valid decryptions through for a full decryption, but cuts off up to 90% of false decryptions depending on the cipher type. I thought this would improve my solving time by 90%. It didn’t turn out that way.

The first problem is that this method doesn’t reduce the number of decryptions, only the number of test cycles. For many cipher types, it is necessary to decrypt the entire thing before you have the beginning to test. It turns out that the decryption phase takes longer than the testing phase. The time savings were there on several types, but so minimal that it wasn’t wroth it. Remember, it’s not 100% accurate, so that means that every now and then it would cut off a valid solution, too, which is a limitation.

The second problem is that this only works for solving methods that rely on a 100% solution. For example if the decryption method is to decrypt using a word list as a key source, you expect that when the correct key word is test, the solution will be 100% valid English, including the beginning. It is safe to assume that if the beginning has bad tetragrams, one should go on to the next key. But if one is using hillclimbing, that is not so. You might make a change to the key that improves the overall score, and should be preserved, but doesn’t necessarily produce good text at the beginning. My method won’t work at all on a hillclimber, simulated annealing, etc. It also doesn’t work on types with numerals or with Playfair unless your frequency data is modified to deal with the numbers of extra X’s for the same reason.

I tried solving the first problem by extending the method to the decryption process. For many types, such as Vigenere, it is possible to just decrypt the beginning. So I did that, decrypting only the beginning and testing it. There were some savings in time, but surprising to me, it was only around 1% and still had the same risk of cutting out the valid solution. Apparently interrupting the normal loop of decryption to test the start slows down the whole process, especially for a type like Vigenere, that produces quite a few valid-looking beginnings even with wrong keys. The cost of the extra test cycle balanced out the savings from culling out some full decryptions.

Another limitation in the method is that it doesn’t work at all with transposition types. They have the same number of high-frequency letters as normal text, so nearly every trial decryption will pass the test and go on for the full-length decrypt/test cycle. In the end I decided to chuck the whole idea. It still seems like it ought to be possible to streamline the trial decrypt/test process. One way to do it it if you have a crib is to test whether the crib appears in the trial decryption. Similarly, if your decryption process involves reducing the text to a simple substitution, test to see if the pattern of the crib appears.

The post A failed solving method appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on September 14, 2022 09:20

September 12, 2022

The Martian Chronicles by Ray Bradbury

The Martian ChroniclesThe Martian Chronicles by Ray Bradbury
My rating: 3 of 5 stars

Bradbury, the author, and this book are both iconic symbols of science fiction. But the book really isn’t science fiction per se. As Bradbury himself says in the introduction, it’s myth. A bugaboo of mine is how booksellers and even libraries lump together science fiction and fantasy. I consider them separate genres. This book would clearly fall into the fantasy half since there is very little science in it. Bradbury makes little effort to portray Mars in ways that are remotely plausible to today’s audience. It is covered with water-filled canals, has sufficient oxygen for people to breathe, and is already populated by happily married Martian couples much resembling humans only with crystal hair and triangular doors. It often sounds silly, and in truth, it mostly is.

But the book isn’t intended to be hard science fiction like, say, The Martian. Bradbury uses Mars as metaphor, recreating the despoliation of the Americas by the Europeans, for how our earthly society could be so much better, or so much worse. Many later sci-fi books have done the same thing, but this book paved the way. It is rather amusing at times, as well as disappointing to some extent, to see how inaccurately the author foresaw the future. Of course it’s easy to see in hindsight, but Bradbury posits the families of the future to look mostly like the families of middle America in the 1950s. Women are happy to stay in the kitchen and go to the beauty parlor. All astronauts are men and most of them smoke cigars. Vehicles on Mars are all gas hogs with fossil fuel rocketed up from Earth. Come on, Ray, electric cars have been around since the 1890s. You could have done better even back then. By today’s standards, the book seems rather juvenile, but it deserves its place in the pantheon of pioneering science fiction.

View all my reviews

The post The Martian Chronicles by Ray Bradbury appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on September 12, 2022 12:49

September 6, 2022

Our ignorant newsies – Triple digits

We’re in the middle of a heat weave here in California. Almost every weather reporter has been talking about triple digits. The idiocy that I can’t stand is when they say – and most of them do – that “it’s going to be over triple digits tomorrow.” No, it’s not. Triple digits is the range 100 to 999. To be over triple digits it would have to be at least 1000 degrees. What they mean is it’s going to be over double digits, or it’s going to be in triple digits. They don’t know the difference between over and in. I think the concept is over their heads when it should be in.

The post Our ignorant newsies – Triple digits appeared first on OnWords.

1 like ·   •  0 comments  •  flag
Share on Twitter
Published on September 06, 2022 20:59

Everything I Never Told You by Celeste NgMy rating: 3 of ...

Everything I Never Told YouEverything I Never Told You by Celeste Ng
My rating: 3 of 5 stars

I read Ng’s second book five years ago and found this one to have the same strengths and weaknesses. It begins with a mystery. Lydia, a teenage girl, drowns in a lake one evening, apparently alone. Was it an accident? A murder? A suicide? But for the next 200 or so pages the author leaves that mystery alone and begins an overlong and plodding history of Lydia’s dysfunctional family. The theme is clearly people’s failure to tell others their true feelings and thoughts and how that can cause harm. The mystery is explained at the end and it’s a rather clever twist I didn’t foresee.

Before that, though, the author paints a depressing story of what she seems to be suggesting is racism toward Asians (although she uses the term Orientals in keeping with the custom of the times depicted). I grew up in the fifties and sixties, the time frame in that part of the book, and found it to be an inaccurate portrayal, displaying a rather whiny victim mentality. Just like with the other book, I nearly gave up on it halfway through, and, like the other one, was eventually glad I didn’t. Still, in the end it felt more like a completed school assignment than an enjoyable read.

View all my reviews

The post by Celeste Ng appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on September 06, 2022 10:01

August 30, 2022

Brace for Impact is here!

Brace for Impact is now available on Amazon both as an ebook and a paperback.  Download it now. Just click on the image.

 

 

A big thank you to all my fans for supporting my writing.

The post Brace for Impact is here! appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on August 30, 2022 14:16

August 28, 2022

Brace for Impact – A Cliff Knowles Mystery

Cliff Knowles fans, you’ve been waiting a long time for a new Cliff Knowles Mystery. It’s on its way. I’ll let you know when it’s available. Here’s the cover as a tease. I’ll be sending out a notice to my mailing list.

 

The post Brace for Impact – A Cliff Knowles Mystery appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on August 28, 2022 15:54

August 26, 2022

Music Playlist update (Ethan Leinwand)

I just updated my music playlists. You know how great it feels to discover a new performer and acquire a bunch of new music? Well, I came across Ethan Leinwand and watched his excellent long video The History of Barrelhouse Blues Piano. I had to have this music, so I found his website and bought two CDs. That inspired me to update the playlists on my phone, so I ripped the CDs, bought some other songs I’d been meaning to add, and went back through my old songs that I’d removed from the playlists because I’d gotten tired of them. I found several I wanted to reinstate. So with this new batch of songs, I deleted some of the old stuff from the playlists (but not from my phone or computer) and added the new stuff.

I thought you might be interested in the changes. I’m listing only the removals and the adds, not the entire list. First the additions.

Gin Mill BluesBilly MayFive Point BluesBob Crosby & BobcatsLittle Rock GetawayBob Crosby & BobcatsFarrish Street JiveBoogie Woogie RostySun Flower Slow dragBrent WatkinsEarly In The MorningBuddy HollyAll That JazzChicago CastLucilleChuck BerryKrazy Kat BoogieDaddy StovepipeSweet Home ChicagoDaddy StovepipeBlue Railroad TrainDoc Watson44 Vicksburg BluesEthan LeinwandAtlanta RagEthan LeinwandBlues For Henry BrownEthan LeinwandCripple Cow Cow BluesEthan LeinwandCuttin’ (And Pastin’) The BluesEthan LeinwandHead Rag HopEthan LeinwandJoe Louis RagEthan LeinwandLittle BrotherEthan LeinwandMemphis Blues (Leinwand)Ethan LeinwandPratt City BluesEthan LeinwandSkippy WhippyEthan LeinwandThe 31 BluesEthan LeinwandThe Georgia GrindEthan LeinwandThe Ma GrinderEthan LeinwandTripitinaEthan LeinwandWest Dallas DragEthan LeinwandMirandyEubie BlakeFlip, Flop & FlyIndigo SwingPal Of MineJoan BaezRush EKevin MacLeodHollywood PastimeLarry ClintonOld Joe ClarkLee MooreOccapellaManhattan TransferBlack Rat SwingMary FlowerHudson River RagMary FlowerLadyfingersMary FlowerRoyal Garden BluesMax QGood Luck CharmOC TimesWhy Don’t We Just DanceOC TimesThe Great Crush Collision MarchRichard ZimmermanOld Country RockStefan GrossmanHadacol BoogieSteve JamesPuttin’ On The RitzTacoBad DebtUppity Blues Women


Now the removals (although they may come back when I’m no longer tired of them).

Bumble BoogieB. BumbleBy My SideBarbara AcklinSing, Sing, SingBenny GoodmanRaunchyBill JustisCall MeBlondieBlackberry BlossomBroken Circle Bluegrass BandRuebens TrainBroken Circle Bluegrass BandThink It OverBuddy HollyBuxtehude organ (regal)BuxtehudeMalaguenaChet AtkinsRainbeau medleyCraig VentrescoSogno Di PrimaveraCraig VentrescoI am a PilgrimDoc WatsonSt Louis BluesDoc WatsonWhen I was a LadD’Oyly Carte Opera Co.Spanish FandangoEtta BakerThe Stars and Stripes ForeverEubie BlakeSwaneeGeorge GershwinWhen You Want ‘EmGeorge GershwinChattanooga Choo ChooGlen MillerRailroad BoyGoldbriersOld Joe ClarkJim GreerSt. Louis BluesJohn FaheyFlight of the Bumble BeeJose FelicianoMaple Leaf RagJoshua RifkindDueling BanjosKeith BillikStompin on the RapahannockLeo KottkeOne Kind FavorLightnin’ HopkinsMind HeistLondon Music WorksMemphisLonnie MackGranadaMaestro JerardSugar BabeMark SpoelstraLast Kind Word BluesMary FlowerMain Street BluesMary FlowerLast Train to ClarksvilleThe MonkeesDanzaMuriel AndersonSimple GiftsMuriel AndersonDrivin’ BluesPat DonohoeRagtime BluesPat Donohoe & Mike DowlingSiboneyPat Donohoe & Mike DowlingNon-Stop Boogie pt. 1Preacher Jack96 TearsQuestion Mark & the MysterionsDengozoRagtime SkedaddlersDixie BlossomsRagtime SkedaddlersPeaches And CreamRagtime SkedaddlersPepper SauceRagtime SkedaddlersThe EntertainerRagtime SkedaddlersTobascoRagtime SkedaddlersBach Prelude #1Ramiro SchiavoniI Got a WomanRay CharlesLa Vida breve, opera, G 35- DanzaSergi Vicente59th St. Bridge SongSimon & GarfunkelWheelsString-A-LongsBaby LoveSupremesOculus ex EterniSymphony XPineapple RagTon Van BergeykHudson River RagHudson River RagMusic Hall StompunknownStackaleeunknownApacheThe Ventures

The entire list consists of 438 unique songs at the moment, although I spread them over three playlists and some of the songs are on more than one playlist. The total number of songs I play from beginning to end, including repeats, is 520. If you want to see that for comparison, I posted the previous list earlier, click here.

The post Music Playlist update (Ethan Leinwand) appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on August 26, 2022 21:36

August 22, 2022

Magpie by Elizabeth Day

MagpieMagpie by Elizabeth Day
My rating: 4 of 5 stars

A young couple living the life in London takes in another woman out of necessity. Will the man’s fidelity be tested? After reading several chapters into the book, I was fully prepared to dismiss it as typical chick lit about a man taking advantage of his female partner, with the woman eventually screwing up her courage and dumping the cad, teaching him a lesson in the process. It had all the female author markings, like constant descriptions of what the women were wearing. I had to look up numerous fashion terms. I now know what a Breton top is (a white sweater with thin, black, horizontal strips) and boyfriend-style jeans (baggy, oversized, worn looking ones). A male author would have just written, “she wore a striped sweater and baggy jeans.”

But along comes Part 2 and the first big plot twist gave me a jolt. Wow! This is not what it seemed. I realized it could turn dark quickly, and it did. I’m always a bit skeptical of the unreliable narrator trick since it’s so overdone, but this had an original edge to it. You never know whom to trust, all the way to the very end. The suspense builds deliciously. It’s a clever plot and the writing is quite good, too. If you get a little bored at the beginning, stick with it. I’m glad I did. I’d give it 4 1/2 stars if they allowed it in Goodreads.

View all my reviews

The post Magpie by Elizabeth Day appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on August 22, 2022 16:09

August 11, 2022

The Haunted Lady by Mary Roberts Rinehart

The Haunted Lady (Hilda Adams 4)The Haunted Lady by Mary Roberts Rinehart
My rating: 4 of 5 stars

Rinehart truly deserves her epithet as the American Agatha Christie. This story is a classic locked-room mystery. An old woman is found dead in her room that is tightly sealed and guarded by a nurse outside the door. It’s a traditional Victorian style house with many rooms, family members, servants, and regular visitors who may or may not have motives. Nurse Hilda Adams is the protagonist cum detective. The writing is sharp, old-fashioned, and refreshingly free of swearing and gore. The plot is convoluted and far-fetched. I doubt anyone figured it all out until the final reveal but I managed to guess one small piece in advance. It may be too tame and complex for some, but I enjoyed it.

The author does have one original stylistic trait that I found interesting: overt foreshadowing. For example, Hilda would meet someone and the author would write something like “She would later describe the person to the inspector as looking ill and upset,” thus suggesting that this physical state is important to the mystery. Or maybe you’re supposed to wonder if Hilda is mistaken or even intentionally describing the person inaccurately. She could have written that Hilda met the person and he looked ill and upset. Why write that she later told the inspector at that point? She could mention it later when Hilda actually talks to the inspector. The point is to alert the reader that this is a clue (or maybe a red herring!) She’d begin a chapter with “Mrs. Fairbanks was murdered on Saturday night.” At that point in the story, it was still Saturday morning and the author proceeds to write about everything that happened on Saturday, but you’re forewarned that you’d better pay attention to where everyone is at every point because you know the murder is about to happen. These are not spoilers because you are told very early on who is going to die. You lose the surprise element to an extent from the foreshadowing, but instead you get a sort of foreboding suspense which is at least as entertaining.

View all my reviews

The post The Haunted Lady by Mary Roberts Rinehart appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on August 11, 2022 10:22

August 6, 2022

The Greatest Invention by Silvia Ferrara

The Greatest Invention: A History of the World in Nine Mysterious ScriptsThe Greatest Invention: A History of the World in Nine Mysterious Scripts by Silvia Ferrara
My rating: 1 of 5 stars

I am very much interested in the subject matter, or at least I thought I was. But the writing in this book was so atrocious I couldn’t finish it. Halfway through I gave up. The author is a chatterbox and fills the pages with digressions and blather. I expected a serious discussion of the various scripts mentioned in the title along with many illustrations and comparisons of the unique features of each. Instead we get the author’s opinions about almost everything backed up with nothing more than “It’s obvious that …” or “Everyone agrees that …” except it’s not obvious to me and I doubt everyone agrees.

The chatty informal tone is totally inappropriate and her meanderings make it hard to follow her points. She uses metaphors mercilessly and is constantly telling us what she is going to tell us instead of just telling it. Here’s an example from page 42 shortly after she’s told us a few paragraphs earlier that Linear B is of little interest since it’s been deciphered:

Earlier I mentioned Linear B – let’s talk about it, at least for a bit. The truth is Linear B isn’t of all that much interest to us, since it’s been deciphered. For now, we’ll spare it only a few measly lines. Though we’ll come back to it, I promise, since it’ll be of help when we look at the process of deciphering scripts. So then, Linear B.

Not only is it repeating what she’s just told us, but she takes an entire paragraph to tell us that she’s going to start writing about something. Just start writing about it, for Pete’s sake! You’ve already used up those “few measly lines.” This can’t be explained away by a bad translation.

She punctuates the text with pop culture references and compares rocks and clay tablets to iPhones and bedsheets. She’s also dismissive of all opinions that differ from her own. She typically says things like “this is generally referred to as X but really it is Y” without a convincing explanation as to why conventional terminology is wrong. She mentioned some Japanese term and said you could tell what it means just from the sound of it. No, I couldn’t, and I speak some Japanese. You get the idea. She’s a perfect example of Often Wrong But Never in Doubt.

View all my reviews

The post The Greatest Invention by Silvia Ferrara appeared first on OnWords.

 •  0 comments  •  flag
Share on Twitter
Published on August 06, 2022 08:14