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

Challenges facing supply chain execs: leadership, labor, legacy technology

While most companies recognize the value of a digitally enabled supply chain – empowered by new technologies like artificial intelligence, blockchain, big data and analytics – many chief supply chain officers (CSCOs) are not leveraging their C-suite counterparts to help reinvent the supply chain function and transform it into an engine of new growth models and customer experiences, according to new research from Accenture. Read more →

Data Science Bowl: Using AI to accelerate life-saving medical research

Imagine unleashing the power of artificial intelligence to automate a critical component of biomedical research, expediting life-saving research in the treatment of almost every disease from rare disorders to the common cold. This could soon be a reality, thanks to the fourth Data Science Bowl, a 90-day competition in which, for the first time, participants trained deep learning models to examine images of cells and identify nuclei, regardless of the experimental setup – and without human intervention. Read more →

UPCOMING ANALYTICS EVENTS

INFORMS-SPONSORED EVENTS

INFORMS International Conference
June 17-20, 2018, Taipei, Taiwan

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

OTHER EVENTS

Advancing the Analytics-Driven Organization
July 16-19, noon-5 p.m.


Making Data Science Pay
July 30-31, 12:30 p.m.-5 p.m.


Predictive Analytics: Failure to Launch Webinar
Aug. 18, 11 a.m.


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

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.