Share with your friends










Submit

Analytics Magazine

Five-Minute Analyst: PuzzlOR solution

Nerds gone wild: PuzzlOR John (left) and Five-Minute Analyst Harrison at INFORMS 2015 in Philadelphia.

Nerds gone wild: PuzzlOR John (left) and Five-Minute Analyst Harrison at INFORMS 2015 in Philadelphia.

 

Tribute to ‘PuzzlOR’ and ‘Thinking Analytically’ author John Toczek.

Harrison SchrammBy Harrison Schramm

This article is part solution, part retrospective and part tribute to my longtime friend and colleague, John Toczek, the longtime author of the “The PuzzlOR” column in OR/MS Today and the “Thinking Analytically” column in Analytics magazine. In the last issue of both publications, John “cryptically” announced that he was ending his column as his “day job” had expanded and demanded more of his time.

The oldest email correspondence I could find between myself and John is from October 2008, discussing the Markov’s Prison Problem. I have a vivid recollection of solving at least one previous problem, the Traveling Spaceman. I was deployed with the Navy in Bahrain, and working John’s PuzzlOR problems gave me something interesting to think about – as well as keeping my skills sharp – while I was away from O.R.

John’s final problem is a substitution cipher. He provides the text shown in Figure 1, along with the following assumption/clue: The word “puzzle” and/or “puzzlor” may be present.

Figure 1: The final PuzzlOR. What does it say?

Figure 1: The final PuzzlOR. What does it say?

Think about solving this problem while I tell more of my story.

This column began with an email to John. I was traveling and saw a news item that I thought might make for a good puzzle. The email resulted in an introduction to Peter Horner, who has been my editor ever since. That first piece was about the contest between law enforcement and DUI checkpoint apps.

Substitution ciphers are susceptible to frequency analysis, with the knowledge that “e” is the most common letter in the English Language (although not always; the 1939 novel “Gadsby” famously does not include a single instance). It is straightforward to compute the frequency table using R, where “CTEXT” is the cyphertext (Figure 1):

library(magrittr); library(knitr); library(dplyr)
countL = function(string, letter){
s2 <- gsub(letter,””,string)
return (nchar(string) – nchar(s2))
}
doubles = vector()
singles = vector()
for(i in LETTERS){
singles[i] = countL(CTEXT,i)
doubles[i] = countL(CTEXT,paste0(i,i))/2
}
CountD = data.frame(Letters = LETTERS, Single = singles, Double = doubles)
CountD %>% filter(Double > 0) %>% kable()

Frequency CountLooking at this output, I am of the mind that “Y” is mapped to “Z.” Let’s see where that takes us in cipher text. One assumption: The word “puzzle” and “puzzlor” may both be present, both of which “stem” to “puzz.” Note: This is the key intellectual step in solving this problem.

CTEXT %>% gsub(“Y”, “z”, .) %>%
gsub(“S”, “p”, .) %>%
gsub(“B”, “u”, .) %>%
gsub(“F”, “l”, .) -> Sub1

You can use the frequency counts to make a guess about e, as well as “puzzlor” to make a guess about “o” and “r.”

Sub1 %>%
gsub(“K”, “e”, .) %>%
gsub(“Q”, “o”, .) %>%
gsub(“T”, “r”, .) -> Sub2

Which produces an output that looks something like this:
DelloHXAouUrereUGHJNMDHPA
ouDUCeOr…

The last time I saw John in person was at INFORMS Analytics 2016 in Orlando, Fla. We were watching the two groups at the hotel arrive – the INFORMS attendees and the cheerleading conference that was happening at the same time. I remember walking around having one of the most enjoyable conversations of that year, covering manufacturing, fraud and – a common topic – elevator scheduling.

If you have followed along with your coding, you will have solved the final PuzzlOR by now:

“helloifyouarereadingthisyou
havecrackedthecodewithyoursupe
rioranalyticsskillsiwantedtothankyo
forreadingthepuzzlorforthesepast
tenyearsandletyouknowthatthiswill
bethelastpuzzlethishasbeenawon
derfulopportunityformetocontribu
tetotheinformscommunityandmeet
manynewpeoplebutitstimetocloseth
ischapterandmoveontonewopportu
nitiesthankyou”

Thank you, John, for your contributions to our professional dialog and giving many of us something interesting to think about while away from our “day jobs.”


Harrison Schramm (Harrison.schramm@gmail.com), CAP, PStat, is a principal operations research analyst at CANA Advisors, LLC, and a member of INFORMS.

Analytics data science news articles

Related Posts

  • 67
    The Analytics Society’s leadership team is now launching its strategic priorities for 2017. As described last month, we are going to focus on three areas to add more value for our members and profession, and I would like to invite you to participate.
    Tags: analytics, informs
  • 67
    Make a difference in underserved communities by volunteering your time and talents to the INFORMS Pro Bono Analytics program. Volunteer opportunities are constantly being added.
    Tags: analytics, informs, time
  • 63
    The Analytics Society announced three finalists for the 2017 Innovative Applications of Analytics Award (IAAA) sponsored by Caterpillar and the Society. Scott Grasman of Rochester Institute of Technology chaired the judging committee. The finalists will present their projects at the 2017 INFORMS Conference on Analytics & O.R. in Las Vegas…
    Tags: analytics, informs
  • 62
    The Analytics Society of INFORMS enjoyed a successful year in 2016, when it not only received society status within INFORMS, but it also again grew in membership and expanded its scope of activities, all of which were reviewed at a lively reception and business meeting at the 2016 Annual Conference…
    Tags: analytics, informs
  • 61
    Stefan Karisch (photo) of Boeing was elected president of the Analytics Society of INFORMS, and he formally took the gavel from outgoing President Jim Williams of FICO at the Society's business meeting in Nashville, Tenn., on Nov. 14.
    Tags: analytics, informs


Headlines

Former INFORMS President Cook named to U.S. Census committee

Tom Cook, a former president of INFORMS, a founding partner of Decision Analytics International and a member of the National Academy of Engineering, was recently named one of five new members of the U.S. Census Bureau’s Census Scientific Advisory Committee (CSAC). The committee meets twice a year to address policy, research and technical issues relating to a full range of Census Bureau programs and activities, including census tests, policies and operations. The CSAC will meet for its fall 2018 meeting at Census Bureau headquarters in Suitland, Md., Sept. 13-14. Read more →

Gartner identifies six barriers to becoming a digital business

As organizations continue to embrace digital transformation, they are finding that digital business is not as simple as buying the latest technology – it requires significant changes to culture and systems. A recent Gartner, Inc. survey found that only a small number of organizations have been able to successfully scale their digital initiatives beyond the experimentation and piloting stages. “The reality is that digital business demands different skills, working practices, organizational models and even cultures,” says Marcus Blosch, research vice president at Gartner. Read more →

Innovation and speculation drive stock market bubble activity

A group of data scientists conducted an in-depth analysis of major innovations and stock market bubbles from 1825 through 2000 and came away with novel takeaways of their own as they found some very distinctive patterns in the occurrence of bubbles over 175 years. The study authors detected bubbles in approximately 73 percent of the innovations they studied, revealing the close relationship between innovation and stock market bubbles. Read more →

UPCOMING ANALYTICS EVENTS

INFORMS-SPONSORED EVENTS

INFORMS Annual Meeting
Nov. 4-7, 2018, Phoenix

Winter Simulation Conference
Dec. 9-12, 2018, Gothenburg, Sweden

OTHER EVENTS

Applied AI & Machine Learning | Comprehensive
Sept. 10-13, 17-20 and 24-25


Advancing the Analytics-Driven Organization
Sept. 17-20, 12-5 p.m. LIVE Online


The Analytics Clinic: Ensemble Models: Worth the Gains?
Sept. 20, 11 a.m.-12:30 p.m.


Predictive Analytics: Failure to Launch Webinar
Oct. 3, 11 a.m.


Advancing the Analytics-Driven Organization
Oct. 1-4, 12 p.m.-5 p.m.


Applied AI & Machine Learning | Comprehensive
Oct. 15-19, Washington, D.C.


Making Data Science Pay
Oct. 29 -30, 12 p.m.-5 p.m.


CAP® EXAM SCHEDULE

CAP® Exam computer-based testing sites are available in 700 locations worldwide. Take the exam close to home and on your schedule:


 
For more information, go to 
https://www.certifiedanalytics.org.