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

Analytics Blog

Electoral College put to the math test


With the campaign two months behind us and the inauguration of Donald Trump two days away, isn’t it time to put the 2016 U.S. presidential election to bed and focus on issues that have yet to be decided? Of course not.


Headlines

Three keys for organizations to gain value from information

In the current information-driven society and increasingly digitalized world, Gartner, Inc. says that sentiments are shifting from the economics of tangible assets to the economics of information – “infonomics” – and other intangible assets. Infonomics is the theory, study and discipline of asserting economic significance to information. It strives to apply both economic and asset management principles and practices to the valuation, handling and deployment of information assets.  Read more →

Burtch Works study on ‘Salaries of Predictive Analytics Professionals’

According to the recently released Burtch Works study on “Salaries of Predictive Analytics Professionals 2017,” senior-level executives saw the largest increase in salaries from 2016 to 2017, and industry diversification of employment has diluted the concentration of such professionals from financial services and marketing/advertising to consulting and technology. Read more →

New study asks, ‘Is your business AI-ready?’

Despite fears that robots will replace human labor, the majority of artificial intelligence (AI) leaders (79 percent) expect their employees will work comfortably with robots by 2020, according to a new Genpact survey of C-Suite and senior executives titled, “Is Your Business AI-Ready?” Read more →

UPCOMING ANALYTICS EVENTS

INFORMS-SPONSORED EVENTS

2017 Winter Simulation Conference (WSC 2017)
Dec. 3-6, 2017, Las Vegas

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.