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

Using machine learning and optimization to improve refugee integration

Andrew C. Trapp, a professor at the Foisie Business School at Worcester Polytechnic Institute (WPI), received a $320,000 National Science Foundation (NSF) grant to develop a computational tool to help humanitarian aid organizations significantly improve refugees’ chances of successfully resettling and integrating into a new country. Built upon ongoing work with an international team of computer scientists and economists, the tool integrates machine learning and optimization algorithms, along with complex computation of data, to match refugees to communities where they will find appropriate resources, including employment opportunities. Read more →

Gartner releases Healthcare Supply Chain Top 25 rankings

Gartner, Inc. has released its 10th annual Healthcare Supply Chain Top 25 ranking. The rankings recognize organizations across the healthcare value chain that demonstrate leadership in improving human life at sustainable costs. “Healthcare supply chains today face a multitude of challenges: increasing cost pressures and patient expectations, as well as the need to keep up with rapid technology advancement, to name just a few,” says Stephen Meyer, senior director at Gartner. Read more →

Meet CIMON, the first AI-powered astronaut assistant

CIMON, the world’s first artificial intelligence-enabled astronaut assistant, made its debut aboard the International Space Station. The ISS’s newest crew member, developed and built in Germany, was called into action on Nov. 15 with the command, “Wake up, CIMON!,” by German ESA astronaut Alexander Gerst, who has been living and working on the ISS since June 8. Read more →

UPCOMING ANALYTICS EVENTS

INFORMS-SPONSORED EVENTS

INFORMS Computing Society Conference
Jan. 6-8, 2019; Knoxville, Tenn.

INFORMS Conference on Business Analytics & Operations Research
April 14-16, 2019; Austin, Texas

INFORMS International Conference
June 9-12, 2019; Cancun, Mexico

INFORMS Marketing Science Conference
June 20-22; Rome, Italy

INFORMS Applied Probability Conference
July 2-4, 2019; Brisbane, Australia

INFORMS Healthcare Conference
July 27-29, 2019; Boston, Mass.

2019 INFORMS Annual Meeting
Oct. 20-23, 2019; Seattle, Wash.

Winter Simulation Conference
Dec. 8-11, 2019: National Harbor, Md.

OTHER EVENTS

Advancing the Analytics-Driven Organization
Jan. 28–31, 2019, 1 p.m.– 5 p.m. (live online)

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.