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

Report: One in five cloud-based user accounts may be fake

According to the Q2 2018 DataVisor Fraud Index Report, more than one in five user accounts set up through cloud service providers may be fraudulent. The report, based on information gathered between April and June, analyzes 1.1 billion active user accounts, 1.5 million email domains, 231,000 device types and 562 cloud hosting providers and data centers, among other indicators. Read more →

When managers respond to online critics, more negative reviews ensue

A new study in the INFORMS journal Marketing Science found that when managers respond to online reviews it’s possible that those responses could actually stimulate additional reviewing activity and an increased number of negative reviews. The study, “Channels of Impact: User Reviews When Quality is Dynamic and Managers Respond,” is authored by Judith Chevalier of the Yale School of Management and NBER, Yaniv Dover of the Hebrew University of Jerusalem and Dina Mayzlin of the Marshal School of Business at the University of Southern California. Read more →

IE student designs software to optimize snow removal at Penn State

It is well known among the State College and Penn State communities that it takes a lot for university officials to shut the campus down after a major snowfall. In fact, since 2010, the University Park campus has been shut down just three full days due to snowfall. Much to the chagrin of students – and faculty and staff – the snow day at Penn State may just have become even more elusive, thanks to software developed by recent industrial engineering graduate Achal Goel. Read more →

UPCOMING ANALYTICS EVENTS

INFORMS-SPONSORED EVENTS

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

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

Applied AI & Machine Learning | Comprehensive
Dec. 3, 2018 (live online)


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.