September 20th, 2022 (Permalink)
Charts & Graphs: The Incredible Booming Coffee Shop
The bar chart shown above, which is just a detail from a full page "infographic" on the growing number of Starbucks coffee shops1, combines three types of problematic graph in one. For some unknown reason, the "bars" are actually cylinders, that is, three-dimensional―how did the designer managed to resist the temptation to turn them into Starbucks coffee cups? This is not a problem per se, but the addition of depth to the graph adds no new information and, as I explained a decade ago2, risks misleading the viewer. Here are the three problems:
- Adding the third dimension to the chart makes it ambiguous whether the height of the "bars" is to be measured by their cylindrical top, or by their two-dimensional edge. These are not the same because, as the chart is drawn, we seem to be looking down at an angle on the cylinders. Judging from the last cylinder's height, it appears to represent 6K stores in 2003. However, if you look closely you'll see a thin line stretching from the top edge of the cylinder over to the lefthand scale. Moreover, the top of the chart tells us that there were 6,200 shops at the time the graph was published, which seems to be verified by the position at which the thin line meets the scale. So, it seems to be the visual edge of each "bar" that represents the number of shops, rather than the top of the cylinder.
The main effect of the extra dimension is to make it difficult to read the numbers of shops represented by the other "bars" from the scale. For instance, how many stores were there in 2000? It appears there were somewhere between 3,000 and 3,500, but it's difficult to be more precise. The chartmaker might defend it on the grounds that no one really wants to know the exact number of shops for any given year, and that the point of the chart is just to show the enormous growth of Starbucks, but a linear graph would be a better way to do it.
- Another problem3 with this chart is that the width of the cylinders increases with their height but, as we've seen, the data is represented only by their heights. The extra width of the taller bars can exaggerate the difference between those of different heights. For instance, the cylinder for the year 2000 represents about half as many shops as that for 2003, yet the latter cylinder is about four times larger in area. As a result, the casual viewer is likely to overestimate the increase in numbers.
In addition, if the bars really were cylinders, then the 2003 one would have approximately eight times the volume of the 2000 one. In mentally comparing them, the viewer may tend to compare their apparent volumes rather than their heights or even areas. The only way for a viewer to correctly compare the bars in this chart is to ignore the fact that they are portrayed as cylinders and compare their heights, not their areas or volumes.
- The above two problems we've seen before, but I've never seen the like of this third one4: the larger cylinders at the right side of the chart seem to advance towards the viewer. This is shown by the overlapping of the later bars, their advancing shadows, and their bottoms getting farther from the baseline. This creates a trick of perspective that makes the later cylinders appear closer to the viewer, and thus visually larger.
All three of these 3D effects tend to exaggerate the increase in the number of Starbucks shops. If this chart were put out by Starbucks, I would suspect that the company was trying to exaggerate its growth to impress people. Since it seems to come from a neutral organization, I suppose the only reason for the exaggeration is to create a more visually exciting chart. A plain bar chart is very boring but there ought to be a way to make it more fun to look at without misleading people.
- You can see the full graphic here: "Infographic", International Networks Archive, accessed: 9/20/2023.
- The 3D Bar Chart, Part 1, 6/3/2013.
- For more on this problem, see: The One-Dimensional Pictograph, 8/1/2021.
- The following entry discusses a similar, but not identical, problem: The 3D Bar Chart, Part 2, 7/11/2013
September 14th, 2023 (Permalink)
Nasa jet travels 850 miles in 10 seconds1
That seems fast, but how fast is it? Does it seem credible that a jet could travel that fast? Last year, I posted a short series on credibility checking2, and this headline is a good candidate for such a check.
The headline expresses the jet's speed in a way that's difficult to evaluate, since we're used to speeds expressed in miles per hour (MPH) or kilometers per hour, and I've never before seen a speed expressed in miles per ten seconds. So, how fast would that be in miles per hour? Take ten seconds if you're fast, or a minute or two if you're more my speed, to convert the headline into MPH.
So that you can check your work, here are my calculations. Since there are sixty seconds in a minute, there are six ten-second periods per minute. So, the jet was going 6 × 850 = 5,100 miles per minute, and given that there are sixty minutes in an hour, it was travelling at 60 × 5,100 = 306,000 MPH. That is fast!
At this point, if not before, your skeptical sense should start tingling. Is that speed plausible? To find out, let's read down in the article beneath the headline:
An aircraft that can fly at ten times the speed of sound will be tested over the Pacific Ocean today—possibly leading to “hypersonic” cruise missiles that could travel from Los Angeles to Pyongyang in less than an hour. The aircraft was designed by Nasa to travel 850 miles in just ten seconds, or 7,000mph.3
Hold on! 7K MPH is a lot less than 306K MPH; in fact, the latter is almost 44 times faster. Obviously, the two claims about the jet's speed are inconsistent: either it doesn't go 850 miles in ten seconds or it's much faster than 7K MPH.
It seems to me that 306K MPH is highly implausible, but let's do some research to find out for sure. According to NASA itself4, the jet in question, which was known as the X-43A, reached the speed of 7K MPH or almost ten times the speed of sound, which is a little over 760 MPH5.
So, where did the author of the article get the notion that the jet travelled 850 miles in ten seconds? I'm not sure, but a NASA press release6 states that during a later flight the jet would travel 850 miles and its engine would fire for eleven seconds. If you assume that the engine was firing the entire time of the 850 mile flight, then you would conclude that the jet flew 850 miles in a little over ten seconds. However, given that its speed was only a little over 7K MPH, the engine must have fired only for the first eleven seconds of that flight, and the entire flight must have lasted over seven minutes.
As I pointed out in a previous entry:
When it comes to high speeds, we quickly run out of landmarks by which to judge claims for plausibility. Our experience with speeds is very limited, and anything over around a hundred MPH is just "really fast".7
How could the author or editor of the article have avoided such an egregious error? Someone should have taken the minute or two to convert the headline claim from the unfamiliar units of miles-per-ten-minutes into the familiar MPH, as we did above. Such unusual units should be avoided because they are both unintuitive and difficult to compare with the usual ones. If that had been done, the implausibility of the headline would have been obvious, as well as the difference with the later claim that the jet's speed was 7K MPH.
Surprisingly, the article has never been corrected, despite the fact that it will be two decades old next year.
- Chris Ayres, "Nasa jet travels 850 miles in 10 seconds", The Times, 11/16/2004. Via: Brian W. Kernighan, Millions Billions Zillions: Defending Yourself in a World of Too Many Numbers (2018), p. 43.
- Paragraphing suppressed.
- "NASA's X-43A Scramjet Breaks Speed Record", NASA, 11/16/2004.
- "what is the speed of sound", Wolfram Alpha, accessed: 9/14/2023.
- "NASA X-43A 'Scramjet' Readied For Mach 10 Flight", NASA, 11/9/2004.
- Faster Than a Speeding Bullet, 1/12/2019.
September 11th, 2023 (Permalink)
How to Solve a Problem: Divide and Conquer1
Try solving the following problem.
Problem 1: A Puzzle in Woodpecker Woods
An ornithologist studying the birds in Woodpecker Woods made the following observations:
- All the yellowbellies are sapsuckers.
- Some of the blackbacks are redheads.
- None of the sapsuckers are redheads.
What could the ornithologist conclude is the relation between yellowbellies and blackbacks in Woodpecker Woods?
Note: This is a logic puzzle and not necessarily ornithologically correct, so knowledge about birds will not help solve it and may even mislead you. Base your answer entirely on the above clues.
If you try to solve this problem directly, you may find it difficult because there are three clues and four classes: yellowbellies, sapsuckers, blackbacks, and redheads2. What you'll probably need to do is take the problem two clues at a time. Which two clues should you use? Look for two clues that have a class in common: clues 1 and 3, which share "sapsuckers", and clues 2 and 3, which share "redheads". Since these pairs of clues have only three classes among them, you can use a Venn diagram or whatever technique you please; you may even be able to do them in your head. You could pick either of these duos to solve the puzzle, but I'll show how using 1 and 3:
- Clues 1 & 3: From these two clues we can conclude that no yellowbellies are redheads.
- Step 1 & Clue 2: Using the conclusion of the previous step together with clue 2, we can conclude that some blackbacks are not yellowbellies, which is the solution to the puzzle.
This was an inferential problem, that is, it asked you to infer something from a group of premisses. While there are advanced methods to solve such a problem directly from all the premisses, it's usually easier to break it down into two or more simpler problems. This is what I mean by "divide and conquer": solving a complex and difficult problem by breaking it down into simpler ones, because simpler is easier.
In a previous entry3, I mentioned how the primary technique for solving jigsaw puzzles is hill-climbing, that is, adding pieces to the puzzle until there are no longer any left to add. As anyone who has ever worked a jigsaw will have noticed, they tend to get easier as you go along, and the hardest part of the puzzle is getting started. The reason is that the problem space4 of the puzzle is largest at the beginning and decreases with every added piece; for instance, if the puzzle has a thousand pieces, then you have to start looking through that many pieces to find two that fit together. To do so systematically, you'd need to make almost a million comparisons―more precisely, 1,000 × 999 = 999,000―so a systematic search is impractical. What can you do?
The usual strategy for solving a jigsaw puzzle is to start out by sorting the pieces into at least two piles: border pieces and interior pieces. It's easy to tell border pieces and interior ones apart because those on the border have one straight edge. Once the pieces have been sorted into two piles, put the interior pieces aside and work on the border of the puzzle first. Assuming that a thousand piece puzzle has a hundred edge pieces, assembling the border of the puzzle first reduces the problem space by a factor of a hundred5.
In effect, this procedure turns one big puzzle into two smaller ones: the border puzzle and the interior puzzle. In this way, the problem space is reduced to more manageable sizes. In other words, you "divide and conquer" it.
As with the other problem-solving techniques we've looked at in this series, it's not always possible to divide a problem into smaller ones, but it is a possibility to consider, especially when confronted by a large and difficult problem.
Now, here's a chance for you to practice using your new tool.
Problem 2: The Three Stooges Gang
A major bank robbery is being investigated by the police, who suspect that a gang known as "the three stooges" committed it. The stooges are three thieves who rob banks and jewelry stores wearing masks representing the members of the famous comedy team they were named after. The original members of the gang were three crooks who had met in prison and started working together on their release. The three were always fighting with each other, and the police had heard rumors that two of them were on the outs. So, it was always possible that one or more of the original stooges might not have participated in the robbery.
The police interviewed their confidential informants (CIs) to find out what the word in the underworld was on the robbery and the gang. I will refer to the usual members of the gang as "Moe", "Larry", and "Curly" to protect the innocent. The police gathered the following clues from the CIs:
- If Moe didn't plan the robbery, then Larry participated but not Curly.
- Either Curly was involved in the crime or Larry wasn't.
- Larry didn't participate in the robbery if and only if both Moe planned it and Curly was included.
Assuming that what the CIs said is correct, who if any among the original three stooges was involved in the robbery?
Divide and Conquer
Moe planned the robbery and Curly participated, but Larry was not included.
Explanation: Like a jigsaw puzzle, the hardest part of this puzzle is getting started. You don't have a lot to work with; just an "if", an "or", and an "if and only if". One way to get started is to split the disjunctive clue―2―into two parts by assuming each disjunct in turn. Whatever turns out to be true under both of these assumptions will be true for the problem as a whole, which is known as "argument by cases".
Clue 2 tells us that either Curly was involved in the crime or Larry wasn't, so let's see what happens when we assume each of these in turn:
- Suppose that Curly was involved. From clue 1, we know that if Moe didn't plan the caper then Larry was involved but not Curly. But we just assumed that Curly was involved, so we can infer that Moe did plan it. Moreover, if Moe planned it and Curly participated, then Larry must not have been involved, by clue 3. To sum up: Moe planned the crime, Curly participated, but Larry wasn't involved.
- Suppose that Larry was not involved. Then Moe was the planner and Curly was involved, by clue 3.
In either case, we have the same conclusion: Moe planned the crime, Curly participated, but Larry wasn't involved.
So, the above solution worked by dividing the puzzle into two simpler puzzles and conquering each. As is usually the case, this is not the only way to solve this problem, and some methods might not require dividing and conquering, but it's good to have another tool in your problem-solving toolbox.
- For previous entries in this series, see:
- If you're familiar with traditional logic, you might notice that the three clues are each categorical statements. If there were only two clues and three classes, you could treat it as a categorical syllogism, for which there are established techniques. As it is, there are three statements with four class terms among them, so it's impossible to make a single syllogism out of them. Similarly, if you know how to use Venn diagrams, you might think to represent the logical relations between the four classes in a diagram, but the standard "pretzel" diagram only relates three classes. There are diagrams for more than three classes, but they tend to be less intuitive and harder to use. See Martin Gardner's Logic Machines and Diagrams (2nd edition, 1982), chapter 2.
- Climbing Up that Hill, 7/5/2023.
- By the "problem space" of a puzzle I mean the class of all possible solutions to it.
- The number of comparisons is 100 × 99 = 9,900, which is one-hundredth of that for the full puzzle.
September 4th, 2023 (Permalink)
This year is the eightieth anniversary of Operation Chastise, the so-called dambusters bombing raids of World War Two1. The raids, conducted by Britain's Royal Air Force, took place on May 16th and 17th of 1943 and aimed at destroying three dams along the Ruhr river where Germany's war industry was concentrated. The operation was largely successful as two of the dams were sufficiently damaged to flood the river valley2. However, as interesting as this true story is, this is not a history lesson; rather, it's prompted by a BBC television presenter named Sally Nugent who, in commenting on the anniversary, called the raids "infamous"3.
If you only knew the word "famous" and the prefix "in-", you would probably think that "infamous" means "not famous" since "in-" is a negative prefix, but there's another way to be negative. Instead of "non-famous", "infamous" means famous for something negative4, so that calling the dambusters raids "infamous" means they are famous in some bad way. While the raids are no doubt famous in England, the fact that the BBC found it necessary to apologize for its presenter's remark shows that they are not infamous.
My guess is that either Nugent or whoever wrote the script she was reading simply didn't know the meaning of "infamous", rather than intending to suggest that the raids were well-known for being bad. Some words with negative meanings, such as "bad" and "sick", are sometimes used in the opposite sense, and I've previously come across "infamous" used in this way.
I don't know how well the dambusters raids are known in the United States nowadays, but I was aware of them from having seen the 1955 movie The Dam Busters5 on television as a boy. As you can tell from the title, this was a fictionalized film version of the famous raids. I was not the only one to see and love the movie: so did a young George Lucas, who based the final scenes of a famous 1977 movie on it6.
Substituting "infamous" for "famous" is the sort of error that neither a spelling nor even grammar checking program can be expected to catch, since both are English adjectives. To notice the substitution of one for the other requires understanding the difference in meaning between the two, and not just spelling or even grammar. I tried the full sentence spoken by Nugent in several online copyediting programs and, unsurprisingly, not a one caught it. So, if you don't want to become as infamous as Nugent, add this distinction to your mental copyeditor.
- David McKenna, "Events mark 80th anniversary of Dambusters raids", BBC News, 5/13/2023.
- "The Incredible Story Of The Dambusters Raid", Imperial War Museum, accessed: 9/3/2023.
- Charlie Parker, "BBC apologises for Sally Nugent’s ‘infamous’ Dambusters comment", The Sunday Times, 8/3/2023.
- "Infamous", Cambridge Dictionary, accessed: 9/3/2023.
- Alex von Tunzelmann, "The Dam Busters: hits its targets–and doesn't dumb down", The Grauniad, 8/7/2015.
- Bryan Young, "How The World War II Drama 'The Dam Busters' Influenced The Space Battles Of 'Star Wars: A New Hope'", Slash Film, 5/2/2018.
Casino Bonuses are not easy to find on the internet. There are simply too many and their terms and conditions makes them difficult to compare. You can find the best bonuses at casinopilot.
You can find the best casinos at MrCasinova.com as this website update online casinos and compare them on daily basis.
August 31st, 2023 (Permalink)
The Old Newspeak & the New Newspeak
- Pamela Paul, "What It Means to Call Prostitution ‘Sex Work’", The New York Times, 8/17/2023. It's interesting to see this article in the NYT.
Last week at the National Organization for Women’s New York office, women’s rights advocates, anti-trafficking groups and former prostitutes convened to galvanize New Yorkers to take action against the city’s booming sex trade. In addition to arguing for enforcement of existing laws…they wanted to send an important message about the language used around the problem.
“The media uses terms like ‘sex work’ and ‘sex worker’ in their reporting, treating prostitution as a job like any other,” said Melanie Thompson…. The language of “sex work,” Thompson argued, implies falsely that engaging in the sex trade is a choice most often made willingly; it also absolves sex buyers of responsibility. … “I urge the media to remove the terms ‘sex work’ and ‘sex worker’ from your style handbooks,” she said.
In reporting the event afterward, The New York Post used the term “sex workers.”1 The Post is hardly alone. In what at first glance might seem like a positive…move, the term “sex work” suddenly appears to be everywhere. Even outside academic, activist and progressive strongholds, “sex work” is becoming a widespread euphemism for “prostitution.” It can also refer to stripping, erotic massage and other means of engaging in the sex trade. It’s now commonly used by politicians, the media, Hollywood and government agencies. …
It should be noted that the NYT itself used the phrase "sex work" as a euphemism for "prostitution" as recently as last month2, so just because this article appeared in its opinion pages doesn't mean that it will drop the doublespeak.
"Sex worker" as a euphemism for "prostitute" has been around for a long time, and I discussed an example of it in a headline fifteen years ago3. As I explained then, William Lutz documented the phrase "sex industry worker" from as long ago as 1988. A book entitled Sex Work: Writings by Women in the Sex Industry4 was first published in 1987 and was popular enough to spawn a second edition in 1998. A search for "sex work" and "sex worker" in Google's Ngram Viewer shows that the phrases were practically non-existent before the late-1980s5, so the book may have actually started their spread.
So, given that "sex worker" is an old euphemism, and euphemisms lose their power over time, we should be getting a new one soon. Given the current fad for "person-first language"6, I expect that "sex worker" will soon be Oldspeak and the new euphemism will be "person who works in the sex industry", which has the advantage of being five words longer with over twice as many letters.
Why, you might wonder, does exchanging money for sex need a rebrand? Derogatory terms like “hooker” and “whore” were long ago replaced by the more neutral “prostitute.”
"Hooker" is slang and always has been. More importantly, whatever negative charge attaches to the word "prostitute" and even "whore" comes from what they mean. As with words such as "murder" and "rape", "prostitution" has a negative charge because of what it refers to. The negative charge flows from the activity to the word, not from the word to the activity. Changing the word for "prostitution" will work only until people figure out what it means, then a new euphemism will become necessary.
But “sex worker” goes one step further, couching it as a conventional job title…. Its most grotesque variant is the phrase “child sex worker,” which has appeared in a wide range of publications, including BuzzFeed, The Decider and The Independent. (Sometimes the phrase has been edited out after publication.)
If you can't write "child prostitute" because it's politically incorrect to write "prostitute", what can you write?
The term “sex work” emerged several decades ago among radical advocates of prostitution. People like Carol Leigh and Margo St. James, who helped convene the first World Whores' Congress in 1985, used “sex work” in an effort to destigmatize, legitimize and decriminalize their trade.
After they had convened a "whores' congress"?
Not surprisingly, this shift toward acceptability has been welcomed by many men, who make up a vast majority of customers. The term subsequently gained traction in academic circles and among other progressive advocacy groups, such as some focused on labor or abortion rights. …
No advocacy worker wants to stigmatize the women or children who are trafficked or who resort to prostitution. Survivors of the sex trade should never be blamed or criminalized. Nor should the humanity of individuals working in the sex trade be reduced to what they do for money. Both opponents and advocates of the term “sex worker” share these goals. …
The term “sex work” whitewashes the economic constraints, family ruptures and often sordid circumstances that drive many women to sell themselves. It flips the nature of the transaction in question: It enables sex buyers to justify their own role, allowing the purchase of women’s bodies for their own sexual pleasure and violent urges to feel as lightly transactional as the purchase of packaged meat from the supermarket. Instead of women being bought and sold by men, it creates the impression that women are the ones in power. …
In recent years, language has undergone drastic shifts in an effort to reduce harm. Sometimes these shifts result in contorted language that obscures meaning. Sometimes these shifts make people feel better without changing anything of substance. And sometimes they do move the needle toward positive change, which is always welcome. But the use of “sex work,” however lofty the intention, effectively increases the likelihood of harm for a population that has already suffered so much. To help people hurt by the sex trade, we need to call it like it is.
The only thing I disagree with in this last paragraph is the claim that doublespeak sometimes does "move the needle toward positive change"; I've seen no evidence of this and Paul offers none. Does she really believe this or did she just write it in a futile attempt to mollify critics? To deal with any problem, we must understand it, and how can we do that if we refuse to speak honestly about it?
- Matt Taibbi, "Tracking Orwellian Change: The Aristocratic Takeover of 'Transparency'", Racket News, 8/21/2023.
“Transparency” was one of America’s great postwar reforms. In 1955, a Democratic congressman named John Moss from California…introduced legislation that would become one of the great triumphs of late-stage American democracy.
The Freedom of Information Act [FOIA] took a tortuous path to becoming law, opposed from the start by nearly every major government agency and for years struggling to gain co-sponsors despite broad public support. … After a series of final tweaks it eventually passed the House 307-0 in 1966, when it landed on the desk of Lyndon Johnson, who didn’t like the bill, either. Johnson signed it….
The Freedom of Information Act gave reporters and citizens alike extraordinary power to investigate once-impenetrable executive agencies that conduct the business of government. … Transparency for decades was understood to mean a pro-democratic concept giving ordinary citizens the power to see how their government operates, how taxes are spent, and whether or not public officials are complying with laws. …
By 2023, the transformation of the term “transparency” has advanced to a stage where the word is now commonly understood by politicians to mean the mathematical opposite of what someone like John Moss would have thought. When elite politicians and media figures speak of “transparency” now, they mean giving government power to obtain “transparency” into the activities of private citizens. … Transparency is what authorities…want to have into your every action, transaction, and thought. It’s a terrifying idea, and…something Hitler or Stalin would have been reluctant to say out loud, though of course this exact idea was foundational to both totalitarian societies. …
The easiest way to understand the language of contemporary politics is to assume that words mean the opposite of what they purport to mean; for instance, "diversity" is "celebrated" by holding racially-segregated ceremonies, and people are excluded from events in the name of "inclusion"7. "War is peace. Freedom is slavery.8"
One last note. The extraordinary pro-democratic ideal of FOIA was underscored by the fact that the tool was available to every citizen. Not just New York Times journalists, but every private digger, potential whistleblower, even crackpots were granted the power of “transparency.”
The chief way you know the new version of transparency is a fraud is that it’s limited to “qualified” researchers. We’re even seeing lately news stories sourced to some of these same “researchers” complaining about having to comply with FOIA requests…. Ideologically, these self-appointed intellectual vanguards do not believe information is for everyone, nor do they believe they should have to answer to the people funding their “research,” while simultaneously believing that private companies and individuals should get used to the principle of endless inquiry.
When the meanings of noble words are turned inside out, we have to pay attention, and this example is about as infamous as this sort of thing gets. Don’t let anyone tell you transparency means surrendering your privacy to the state. It’s supposed to be the other way around.
- Jared Downing, Priscilla DeGregory & Jorge Fitz-Gibbon, "Politicians, prosecutors dropping the ball on booming NYC sex trade: advocates", The New York Post, 8/8/2023.
- See, for instance: Teo Bugbee, "‘Kokomo City’ Review: Dispatches From the Down Low", The New York Times, 7/27/2023.
- Doublespeak Headline, 8/3/2008.
- Frédérique Delacoste & Priscilla Alexander, editors, Sex Work: Writings by Women in the Sex Industry (2nd Edition, 1998).
- "Sex Work, Sex Worker", Google Books Ngram Viewer, accessed: 8/31/2023.
- Close Encounters with Doublespeak of the Third Kind, 9/8/2019.
- Anemona Hartocollis, "Colleges Celebrate Diversity With Separate Commencements", The New York Times, 6/2/2017.
- George Orwell, Nineteen Eighty-Four (1949), Part I, Chapter 1.
Disclaimer: I don't necessarily agree with everything in these articles, but I think they're worth reading as a whole. In abridging them, I have sometimes changed the paragraphing of the excerpts.
August 14th, 2023 (Permalink)
How to Solve a Problem: Backtracking1
As usual in these entries on problem-solving, let's start out with a puzzle.
Puzzle: A Delivery Dilemma
If you work delivering packages nowadays, you are expected to deliver a diverse assortment of items to the same address. For instance, suppose that you are tasked with delivering to a house on top of a high hill. Unfortunately, no one is home so that you'll have to leave the packages on the porch of the house. The road ends at the bottom of the hill, and the only way to get to the porch is a steep and narrow footpath up the side of the hill. Suppose, further, that you are to deliver a live goat, a hungry dog, and a pizza. Because of the steepness of the hill, you can only take up one item at a time, so it will require at least three trips to deliver all three to the porch. That's a lot of climbing! However, you can't leave the goat and the pizza alone together in the delivery van or on the porch, because the goat would eat the pizza. Similarly, you can't leave the hungry dog alone with the goat, since the dog would attack the goat. Luckily, you can leave the dog alone with the pizza, since everyone knows that dogs don't like pizza.
How can you get all three items alive and intact to the porch? What is the minimum number of trips up and down the steep hill that you will have to make?2
This puzzle looks like a prime candidate for hill-climbing3, and indeed that will play a role in solving it. Since your problem is to get all three items from the base of the hill up to the house on top, you have a clear measure of progress, namely, how many objects are on the porch. So, let's work our way through it.
The first step, of course, is to carry one of the objects up to the house and leave it on the porch, but which one? You can't take the pizza up first, since that would leave the dog and goat alone together in the delivery van. Also, you can't take the dog up first, since that would leave the goat and pizza alone. So, the only alternative left is to take the goat up first, leaving the dog and the pizza in the van4. So far, so good.
However, now you're stuck. You can't take the dog up and leave it on the porch alone with the goat since the dog will attack the goat, and you can't take the pizza up and leave it on the porch because the goat will eat it. The puzzle appears to be insoluble! In fact, it is impossible to solve if you stick to hill-climbing.
To solve the puzzle, you must backtrack, which is the topic of this entry. Here's how to do it: take the dog or the pizza―it doesn't matter which―up to the porch and leave it, then take the goat back down to the van! This step goes against common sense, which is what makes the puzzle hard. It also violates the hill-climbing algorithm, since all you've done is switch one object on the porch for another. The hill-climbing algorithm tells you to always take an action that increases the number of items delivered, but you can't do so and solve the puzzle.
To continue the solution: you return to the van with the goat, leave it in the van, and take the pizza or dog, as the case may be, up the hill. You can safely leave the dog and pizza together on the porch as you return to the van for the goat. Finally, you take the goat back up and place it on the porch. It took four trips up and down the hill to deliver the three items!5
Hill-climbing alone is usually not enough to solve a problem. Instead, you need to combine it with backtracking, that is, when you get stuck and can't seem to make further progress towards the goal, backtrack to an earlier stage and take a different route. For instance, in trip-planning, we often use hill-climbing by choosing among routes that lead in the general direction of where we want to go. However, sometimes the shortest route to a destination may require that you backtrack to gain access to it, or it may take a road that sometimes heads in the wrong direction.
In the above puzzle, you must backtrack because you have two different goals that sometimes conflict: one goal is to get all three items on the porch―and if this was your only goal you could accomplish it with hill-climbing alone―but your other goal is to deliver the items undamaged, and for that you have to backtrack.
In the previous entry, I mentioned three different obstacles faced by hill-climbing: plateaus, ridges, and multiple peaks. If, in the course of hill-climbing, you get stuck on any of these obstacles, then backtracking will be necessary in order to get off. The above puzzle is a different type of obstacle―namely, a detour6―which comes about when you have more than just the goal of getting to the top of the hill. When you have more than one goal, you will often need to backtrack in order to accomplish all of them.
Now that you have another problem-solving tool in your kit, try the following puzzle for practice. Note that this puzzle takes place in a world of wizards and little people where magic is real, but you won't need magic to solve it.
Puzzle: To the Far Shore
The Great Gray Mage and his two traveling companions, both halflings, needed to cross a bottomless and nameless river. They dared not swim it for fear of monsters rising from its murky depths. The mage's magic was losing its power, and the three were on a quest to discover why. Luckily, there was a small rowboat pulled up on the bank that the three could borrow to make the crossing. However, the boat was of a size that could not hold all three travelers at the same time since it could carry only the weight of the mage without sinking. Of course, the halflings each weighed half as much as the mage so the boat could carry both across. If the mage rowed the boat across the river, the halflings would be left behind; and if the halflings rowed across, then the mage would be left. The mage's powers were so weak that he could not use them to draw the empty boat back across the river, and it appeared that only one crossing could be made. How did the Great Gray Mage get himself and the two halflings across the river without using magic?7
First, the Great Gray Mage directed the halflings to row the boat to the opposite shore, and one of them got out on the opposite side while the other rowed the boat back to the shore on which the mage waited. Then, the mage changed places with the halfling in the boat, and rowed across to the other side of the river. The halfling on the far shore took the mage's place in the boat and rowed back across the river to where his fellow waited. Finally, both halflings climbed into the boat and rowed across to join the mage on the opposite shore. Success, and no magic needed!
- For previous entries in this series, see:
- This is a version of a puzzle that goes all the way back to Alcuin in the eighth century. It's usually presented as the story of a farmer who buys a cabbage, goat, and wolf (?) at a market, and has to cross a river in a small boat that holds only one of the three items at a time. See: Marcel Danesi, The Puzzle Instinct: The Meaning of Puzzles in Human Life (2002), pp. 153-155.
- See: Climbing Up that Hill, 7/5/2023.
- Notice that we solved the sub-problem of which object to deliver first by elimination; see: Solving a Problem by Elimination, 6/20/2023.
- You might wonder what happens to the three items after you leave them on the porch, but that's not your problem!
- Wayne A. Wickelgren, How to Solve Problems: Elements of a Theory of Problems and Problem Solving (1974), pp. 85-88.
- This is a simplified version of another classic puzzle from Alcuin: as it's usually presented there are two adults and two children, but the solution simply repeats twice the process for getting one adult across the river. See: William Harston, A Brief History of Puzzles: Baffling Brainteasers from the Sphinx to Sudoku (2019), Puzzle 2.