Moon pies, like mom used to make, only cheaper from Korea

by George Taniwaki

I love moon pies (apparently, I was a southerner in a past life). Surprisingly, they are big in another southern locale, South Korea. Who knew, for history see Wikipedia.

Incidentally, don’t confuse moon pies with moon cakes which are another Asian sweet (which I usually don’t like because of the salty egg flavor).

Anyway, today, I found a really cheap source of my favorite confection. Lotte brand is $3.50 for 335g or 29 cents a pie. Mysteriously, they are hidden next to weird spices in the international food aisle, not prominently displayed with the other cookies in the snack aisle. Perhaps it’s a form of American food protectionism by US cookie makers, Asian segregationist policy, or slotting fee redlining by the store, or the result of some other nativist conspiracy plot.

It’s crazy that a South Korean company can import all the ingredients, process them, ship them back to the U.S., and still be cheaper than US-made cookies. But I don’t care as long as I get my fix of graham cracker, marshmallow, and sugary goodness.

Still from video “A Better A&E. Image from Vimeo

by George Taniwaki

Patients are often frustrated and confused when navigating the healthcare system. Part of the problem is that if you are sick or hurt, it reduces your cognitive abilities. But it also because hospitals are busy places with little funding for improving the user experience. Often the layout of the rooms, the signage, the forms and instructions, and the language used by the staff are not tailored to the needs of patients who are unfamiliar with the system.

Design to reduce patient violence

A significant problem in hospital emergency medical departments (called A&E in Britain, ER in America) is abusive and violent patients. According to the National Audit Office, violence and aggression towards hospital staff costs the NHS at least £69 million a year in staff absence, loss of productivity and additional security.

Some other statistics from the Design Council report: More than 150 incidents of violence and aggression are reported each day within the NHS system. In 2010, the incidence rate of violence and aggression was about 1 per 1000 patients. In 2009, 21% of staff report bullying, harassment, and abuse by patients, 11% report physical attacks by patients.

Working with the National Health Service, a design firm called PearsonLloyd developed some low-cost methods to reduce the incidence of violence and aggression, increase patient satisfaction, improve staff morale, and reduce security costs. They call their program, A Better A&E. The program was pilot tested at St. George’s Hospital in London and Southampton General. For an introduction, see the video below.

Signage and brochure

The program consisted of three parts. First, improved signage was installed that included an estimated wait times along with a brochure that explained why a patient who arrived after you could be seen a doctor before you.

Figures 2a to 2d. Large screen monitor alternately shows how busy the A&E is and then how long the wait time is for different categories of patients; A page from brochure explaining why wait times differ among patients and what to expect at each station. Signage posted at each patient area keyed to the brochure. Images from Dezeen.com and Design Council report

Root cause analysis

The second part of the redesign was the introduction of program to capture information from doctors, nurses, and other staff about factors that led to violent and abusive behavior. The program included root cause analysis and a prominently posted Incident Tally Chart to record the “variables within the system that might hinder the ability of staff to deliver high quality care.”

Figure 3. Incident tally posted where staff can record any events during their shift. Images from Design Council Report

Toolkit and patterns

The final part of the program was to design a toolkit that would take the lessons from the A&E departments of the two pilot hospitals and generalize them so that they could be adopted by any hospital within the NHS system. The toolkit is presented as an easy to use website, http://www.abetteraande.com

Results

Surveys of patients and staff taken after the redesign indicated that both groups saw benefits.

  • 88% of patients felt the guidance solution was clear
  • 75% of patients felt the signage reduced their frustration during waiting times
  • Staff reported a 50% drop in threatening body language and aggressive behavior
  • NHS calculated that each £1 spent on design solutions resulted in £3 in benefits

Comment spam is a real problem for web admins. Image from captcha4wp.com

by George Taniwaki

About comment spam

Comment spam is a real problem. Most websites that allow comments (like mine) receive over 100 spam messages that link to unethical or fraudulent websites for each legitimate comment they receive.

Luckily, there are excellent spam filters that identify and remove these annoying click-bait messages. For instance, the service that hosts this blog, WordPress, uses a service called Akismet. These spam filters use pattern recognition to find suspicious messages based on characteristics like message content, sender email address, sender IP address, web page commented on, etc. Suspect messages are tagged as spam and moved to a junk comment folder.

Naturally, in the spam arms race, the creators of spam campaigns need tools to rapidly create comments, ideally a unique one for every blog post, so as to avoid being detected.

The message

I recently received a comment on this blog that reveals how comment spammers create messages. The comment was actually not the intended comment. Rather, the spammer sent me over 300 lines of code they used to create custom-looking comments. Phrases that could be customized were enclosed in curly braces {}. The options for the words in a phrase were separated by vertical pipes |. The curly braces could be nested to allow multiple levels of customization. In fact, the entire comment starts with a curly brace so that different versions of the message could be sent. The spam message generator is partially reproduced below.

Note in particular how many of the characters (highlighted in yellow) are accented or Unicode homoglyphs, meaning they form words that look like English, but will not appear in any dictionary that might be used by a spam filter to detect phrases often used in spam messages. Of special note is that words used multiple times will often have a different glyph replacement in each instance.

{

{ӏ have|I’ve} bеen {surfing|browsing} online mοrе thаn {three|3|2|4} hours todaу, ƴet I
never found any іnteresting article like
yours. {It’s|It іs} pretty worth enoսgh for me. {Іn mу opinion|Personally|In my view}, іf
ɑll {webmasters|site owners|website owners|web owners} аnd
bloggers mаde gooԁ content as ƴou dіd, tҺe {internet|net|web} will bе {much moгe|a lot more} useful than ever beforе.|
I {couldn’t|could not} {resist|refrain fгom} commenting.

{Very wеll|Perfectly|Well|Exceptionally well} written!|
{ӏ wіll|І’ll} {rіght awaʏ|immeԀiately} {tɑke
hold of|grab|clutch|grasp|seize|snatch} уoսr {rss|rss feed} ɑs I {can not|ϲаn’t} {іn finding|fіnd|to find} yοur {email|е-mail} subscription {link|hyperlink} օr
{newsletter|e-newsletter} service. Ɗo {yoս ɦave|yoս’ve} any?
{Please|Kindly} {аllow|permit|lеt} me {realize|recognize|understand|recognise|кnow}
{sߋ tɦat|in orԁer that} I {may juѕt|may|cοuld} subscribe.
Ҭhanks.|

The string of faux-fawning gibberish continues for another 290 lines or so and finally ends with this heart-felt closing.

Thɑnks fоr {greɑt|wonderful|fantastic|magnificent|excellent} {іnformation|info} ӏ wɑs looking for thіs {informatіon|info} for my mission.|
{Hi|Hello}, i tɦink that і saw you visited my {blog|weblog|website|web site|site} {ѕo|thus}
i сame to “return the favor”.{I аm|I’m} {trying to|attempting tߋ} find thіngs to {improve|enhance}
mʏ {website|site|web site}!І suppose its ok to use {some of|a fеw of} уօur ideas!\

I’m somewhat surprised the code above can confuse a spam filter. A pattern recognition algorithm could be designed to detect which forms of phrases, misspellings, and glyph substitutions are most commonly seen in spam rather than in messages typed by honest but error-prone humans.

Anyway, I want to thank this incompetent spammer for providing me with content for this blog post. And of course, thanks for the {kind|wonderful|supporting} message.

For examples of actual blog spam that prey on people who might be persuaded to sell a kidney, see this previous blog post.

Kidney for Sale t-shirt, not the recommended way to organize a kidney market. Image from zazzle.com

by George Taniwaki

There is an ongoing argument regarding whether we as a society should pay people to donate a kidney. These arguments, both pro and con, revolve around two issues, whether such payments are the right thing to do (ethics) and whether they would increase the number of available organs (economics). This blog post will describe the economic effects of payments.

Organized markets

Before analyzing the effect of payments on the supply of donors, I want to assure readers that payments can be regulated. For instance, nearly all the blood, plasma, and platelets in the U.S. is collected from unpaid donors. Yet at the same time, there is also an active government regulated market for plasma. Similarly, family members and friends are a common source of donor eggs, donor sperm, and surrogates to allow individuals to have a child. But there is an active market for these as well.

An organized market for donor organs would not likely include person-to-person transactions. Rather, it would involve highly regulated, non-profit entities that would act as intermediaries between donors and patients, similar to the existing network of organ procurement organization (OPO) that recover and distribute organs from deceased donors. In other words, ignore the image at the top of this post.

One of the arguments against paying donors for organs is that it will favor wealthy patients who can afford the price. That is not necessarily so. Laws can still be written to prohibit individuals or hospitals from making payments to donors. The payments can be regulated to only allow insurance companies and other government sanctioned groups to make payments. Similarly, the organs collected from donors need not be transplanted to patients based on ability to pay for the organ. They can be allocated by whatever method is deemed medically and ethically justified.

More patients could benefit from transplants

Many kidney disease researchers, ethicists, and economist agree that under the right circumstances, increasing transplant rates would be a good thing. First, transplants improve medical outcomes. Second, transplants save money.

Studies have shown that patients with end-stage renal disease (ESRD) who receive transplant therapy live longer than those who receive dialysis therapy (U.S. Renal Data System 2013 Report). This is true even after adjusting for the fact that transplant patients are healthier on average than the overall kidney patient population (R. Wolfe, et al., New Engl J Med, Dec 1999).

The data also shows patients who receive transplant therapy report a better quality of life than those who receive dialysis therapy (W. Fiebiger, et al., Health and Qual Life Outcomes, Feb 2004).

More transplants would save money

In addition to being better for the patient, transplants can save money. Dialysis therapy costs about $75,000 per year per patient. Transplant therapy costs about $150,000 for the first year (evaluation, surgery, recovery, and follow-up) and then $15,000 per year thereafter (antirejection medication, infection control, and monitoring). Over the lifetime of the graft, a living unrelated donor can save society $94,000 compared to dialysis (A.J. Matas and M. Schnitzler Amer J Transpl, Feb 2004). Adding the value of the additional 3.5 quality-adjusted life years for the patient increases the social benefit to $269,000.

A recent paper by B. Manns et al. (Clin J Amer Soc Nephr, Dec 2013) indicates that even a 5% increase in the number of donors would justify a payment of $10,000 each by providing an incremental cost-savings of $340 and a gain of 0.11 quality-adjusted life years.

There is a shortage of suitable organs

The reasons more kidney patients don’t pursue and receive transplant therapy are not fully understood. One thing is certain though. The number of viable organs that become available each year is significantly lower than the number of patients newly diagnosed with ESRD. Thus, the expected wait time for a transplant continues to get longer (up to 8 years in California).

About 15% of patients on the waiting list die each year, so the proportion of patients who die without ever getting a transplant increases as the wait gets longer (over 50% in California). This long wait may deter some patients (and their doctors) from even starting the transplant evaluation process. As of this writing, there are 98,935 people in the U.S. waiting for a kidney transplant.

According to the U.S. Renal Data System, there were 115,643 people newly diagnosed with ERSD in 2011, the latest year data is available. This includes 2,855 who received a preemptive transplant (meaning they received a transplant before having to go on dialysis). In contrast, the Organ Procurement and Transplantation Network (OPTN), shows there were only 16,814 transplants performed in the U.S. in 2011. The breakdown by donor type is shown in the table below.

Living directed donor  3,761
Living exchange donor      575
Living nondirected donor      157
Deceased directed donor      123*
Deceased nondirected donor12,198
Total16,814
Table 1. Number of transplants in US in 2011 by donor source

*Assumes that 1% of deceased donor transplants are directed (OPTN 2009)

Of the total, 3,761 came from living directed donors, meaning the donor and the recipient knew each other. 575 came from exchange donors, meaning the donor knew the intended recipient but was incompatible so donated to a stranger who was in the same position and they swapped kidneys (for details see Mar 2010 blog post).  157 came from living anonymous or nondirected donors, meaning the donor did not have an intended recipient (similar to most blood donations). Finally, 12,321 came from deceased donors (of which all but about 123 are nondirected).

Costs to becoming a live kidney donor are high

For now, we will ignore the impact of paying for deceased donor organs and focus on a possible market for live donors. Further, we will ignore the ethics and legality of paying people to become live kidney donors. We will cover these issues in a future blog post. For now, we will explore the economics of paying for live donors.

Being a living donor can be expensive. The evaluation and surgery are paid for by the recipient’s insurance. However, there are lots of out-of-pocket costs such as travel to and from the transplant hospital for evaluation. In some cases, there can be multiple trips and may require a hotel stay for out-of-town donors. There are also opportunity costs, such as lost wages (or foregone billings for the self-employed) for the time spent in evaluation, surgery, and recovery. The time spent at home after surgery can vary from a few days to over a month, so this is a real burden for people who don’t receive sick pay or disability insurance from an employer. I estimate the total out-of-pocket and opportunity costs for a typical donor to be about $2000.

Usually, all of these costs are borne by the donor, meaning most donors are wealthy. Sometimes, the recipient will pick up some of these costs, especially if they are wealthy. Sometimes the donor and recipient conduct a fund-raiser to pay these costs. Finally, there are several charities that provide reimbursement if the donor or the recipient cannot afford the financial burden of paying for a living donor transplant. The best known of these is the National Living Donor Assistance Center.

Supply curves for nonaltruistic, nondirected donors

To analyze the effect of payments for kidney donors, we will use the basic technique used by economists called a supply curve. The supply curve shows the quantity (Q) of organs supplied for any price (P). We will look at the impact of paying for kidneys on three groups of living donors.

The first group is the nonaltruistic, nondirected (NAND) donors. This consists of the population of people who are aware of the existence of people who need a kidney transplant but don’t know anyone personally who needs a kidney. Further, they may be willing to donate a kidney, but have no desire to donate a kidney for altruistic reasons.

Figure 1 shows a hypothetical supply curve for kidneys from this population. At the current offering price today (Pcur), the quantity of kidneys offered by NAND donors is zero. Note that Pcur is negative and reflects the costs associated with  being a donor.

Raising the offer price will not result in any donors appearing until an offer of PNANDmin is made and the first donor will step forward. This initial price may be quite high due to what is called the repugnance factor by economist Alvin Roth (J Econ Perspectives, Summer 2007). (Repugnance will be discussed again when we explore the moral and legal issues surrounding payments to donors.)

As the price rises, more donors appear. However, at some point there may be some proportion of these potential donors who will be very reluctant to volunteer, regardless of the amount of money offered (perhaps because of very high repugnance, fear, or dislike of pain). At this point the supply curve will rise steeply, until you reach the last person in the population (QNANDmax) where a very large sum of money must be offered before they will be willing to undergo kidney donor surgery.

Figure 1. Supply curve for nonaltruistic, nondirected donors

Note that I made a simplification in the supply curves shown above and below. I assume the out-of-pocket costs and opportunity costs for all donors is the same and equal to Pcur. Actually, this is not true and these costs can vary widely. However, allowing for varying costs makes the analysis much more complex without adding any new insights.

As an aside, behavioral research shows that people’s preferences are not stable, called the endowment effect. For instance, many people may say they would not donate a kidney for $20,000. But imagine what would happen if we gave those people the $20,000 first and ask them to consider what they could do with that money. Then we wait a few minutes and ask them if they would rather give the money back or donate a kidney. At that point, many may decide donating the kidney is their preferred choice.

Supply curve for directed donors

The second group we want to look at is potential directed donors. These are people who know someone who needs a kidney transplant and may be willing to donate to that person. The reasons may be altruistic, self-interest (not wanting to lose a relative or friend), or perhaps even coercion by the recipient or family members. Regardless of the reason, we can draw a supply curve like the one shown in Figure 2.

This curve looks very similar to the one in Figure 2 except it is shifted down. That is, once a potential donor develops a connection to the recipient, the minimum reservation price drops. That’s because the act of donation generates utility for the donor. At the current price of Pcur there are QDDcur donors.

Figure 2. Supply curve for directed donors

Raising the price offered to this group should increase supply, even if the offered price is below PNANDmin. Just reimbursing every donor’s out-of-pocket and opportunity costs could have a significant impact on supply. However, the supply is limited to QDDmax based on the total number of people who know someone who needs a transplant.

Supply curve for altruistic nondirected donors

The third group we want to look at is altruistic nondirected (AND) donors. Even though these donors do not know the recipient, and in fact often will never know the recipient, the supply curve for this group looks very similar to that of the directed donors. The utility an AND donor derives from her donation is not from helping a known person. Perhaps, it comes from imagining that the donation is helping a deserving person, or helping society as a whole, or the donation represents an act of altruistic sacrifice. At the current price of Pcur there are QANDcur donors.

Similar to the case for directed donors, just reimbursing every donor’s out-of-pocket and opportunity costs could have a significant impact on supply. Offering a payment (which a truly altruistic donor could decline and donate to charity) may increase the supply as well. However, it is not likely to have a large effect. I suspect the supply of altruistic donors is inelastic. I also believe the total number of people who would be willing to donate to a stranger QANDmax is limited as well, though probably significantly larger than the current 150 per year.

There is an alternative response to raising the offering price to AND donors. Since the utility the AND donor receives is dependent on psychological reward, any action that reduces the value of that reward may shift the supply curve upward. At the limit, the AND donors will become a NAND donors. In the worst case, the former AND donors may have a higher reservation price than the NAND donors causing the supply curve to be above the curve for the NAND donors, dashed brown curve S’ in Figure 3.

Figure 3. Supply curve for altruistic, nondirected donors

Shifting the supply curve

If this supply curve shift occurs, then paying donors could have the perverse effect of reducing the total number of donors until price PNANDmin is exceeded and NAND donors begin to appear.

Conversely, a well-crafted marketing effort to encourage more people to become AND donors can keep the AND curve from shifting upwards. It can also convince some NAND donors to reconsider their position and become AND donors, causing the total number of NAND donors to shrink and the number of AND donors to rise (shifting QNANDmax to the left and QANDmax to the right).

Add it all up

Combining the three supply curves would create an overall supply curve that would look similar to the solid line in Figure 4. At the current price Pcur, the number of donors is QDD+ANDcur. When the price reaches PNANDmin, the NAND donors will begin to enter the market.

If making payments causes all the AND donors to become NAND donors, then the supply curve shifts to upward as shown by the dashed line S’.  At the current price Pcur, the number of donors falls to QDDcur. When the price reaches PNANDmin, the NAND donors will begin to enter the market. When the price reaches P’ANDmin, the former AND donors will enter the market. Note that even if all the AND donors become NAND donors, there will still be a market price somewhere above PNANDmin that will result in more donors than are currently available at the current price of Pcur.

Figure 4. Cumulative supply curve for all donors

More resources

For more on the economic analysis of organ markets, see the following papers.

A. Tabarrok. (Library Econ Liberty, Aug 2009). Discusses payment for deceased donor organs.

Scott Halpern, et al. (Annals of Int Med, Mar 2010). 342 participants were asked whether they would donate a kidney with varying payments of $0, $10,000 and $100,000. The possibility of payments nearly doubled the number of participants in the study who said they would donate a kidney to a stranger. Payment did not influence those with low income levels more than those with high incomes.

Gary Becker and J.J. Elias. (J. Econ Perspectives, Summer 2007). A thorough analysis of the cost and number of transplant performed if payments were allowed for the donation of both live and deceased donor kidneys. It also counters the arguments against payments.

Citations for Ball Brown (1968). Image from Microsoft Research

by George Taniwaki

While in school, we often learn about a particular subject through textbooks that make it seem that the body of knowledge for that area is neat and tidy and always has been. As students we may take for granted that the ideas presented by our instructors and textbooks are static, or at least follow a linear progression of always increasing. Rarely is it ever discussed how ideas change over time, the controversies, errors, and long lead time for new information to be incorporated into the body of knowledge.

Even in graduate school, where critical analysis is considered an important skill to teach, very little time is spent on the historical context in which important ideas were formed. Very little time is spent describing how radical new ideas are vetted and if found useful, replace entrenched older ones, a process called a paradigm shift. The term comes from the excellent book by the philosopher Thomas Kuhn entitled The Structure of Scientific Revolutions (1962).

Even rarer than a historical description of how a new idea replaces an old one is a description written by the very people who were responsible for the paradigm shift. That’s why I was interested to read a paper entitled Ball and Brown (1968): A Retrospective. written by Ray Ball and Philip Brown.

Mr. Ball and Mr. Brown were PhD students at the University of Chicago in the 1960s. They were the first researchers to show that on the day that accounting information (like earnings) is released, it will affect stock prices. This seems obvious today and nearly all researchers believe it is true and base their own research on the assumption that it is true. Today this belief even has a well-recognized name, called the semi-strong form of the efficient market hypothesis. But in 1968 the idea was considered radical and many experts dismissed the paper.

The paper was groundbreaking in another respect. The basis of their paper was not theoretical, it was experimental. The authors looked at actual companies and conducted a statistical analysis of the historical stock price data on the days before and after each “event”, in this case the company’s release of accounting information. (This technique was championed by Eugene Fama, also of the U. of Chicago.) Again, this seems obvious today, but was radical in 1968. The story of how they came  to write the paper is quite interesting. (Or it is to me or anyone else interested in the history of economic theory.)

Their original paper is entitled “An empirical evaluation of accounting income numbers” and appeared in J. Acct. Res. 1968. To give you an idea of how important this paper is, below is a citation graph for this paper. It has been cited a total of 941 times since it was published 45 years ago, with the number of citations growing almost every year (the drop at the end is likely due to recent papers not yet indexed).

Much thanks to my wife, Susan Wolcott, for sharing this paper with me. Her PhD dissertation in accounting is based on a test of the semi-strong form of the efficient market hypothesis.

* * * *

As a follow-up to a recent blog post marking the passing of the Nobel prize-winning economist Ronald Coase, I want to feature two fine obituaries.

The first is by the Economist,  in an article entitled “The man who showed why firms exist”.

Coase is dead, long live the firm. Photo from U. of Chicago

Another tribute was published by UChicago News, an official publication of Mr. Coase’s employer. The article has a link to a YouTube video that includes short excerpts (3:40) of a longer interview of Ronald Coase from 2012.

Accidental Economist. Video from YouTube

Ronald Coase was active until his death. In 2012, he published a book with a U. of Chicago PhD graduate named Ning Wang. The book entitled How China Became Capitalist describes the economic transformation in China over the past 35 years. It argues that the credit for this change belongs to individual entrepreneurs, not to the central government. China’s new economic freedom has not been matched by the free flow of ideas. Until that changes, China will never reach its full potential.

A short (3:30) discussion of the ideas behind the book by its two authors is posted on YouTube. It is from the same interview from the video described above.

Coase and Wang discuss their book. Video from YouTube

Disclosure: George Taniwaki is a graduate of University of Chicago’s Booth School of Business. The opinions expressed in this blog post are his own and do not reflect those of any organization.

The original unusable chart. From The Fiscal Times

by George Taniwaki

In a Dec 2011 blog post, I critiqued an article in The Fiscal Times that compared the cost of eating a meal at home against dining out at a restaurant. The article purported to show that eating at a restaurant was cheaper. I pointed out the errors in the analysis.

One of the errors was in the way data for expenditures for grocers and restaurants were shown in a line graph. The two lines were at different scales and aligned to different baselines making comparisons difficult. The original chart is shown above and corrected version shown in Figure 1 below. Correcting the baseline makes it clear that restaurant expenditures are significantly lower than for groceries. Correcting the scale shows that restaurant expenditures are not significantly more volatile than for groceries.

Figure 1. Corrected version of same chart

Another error in the article I pointed out was that the lower inflation rate of meals at restaurants compared to meals at home should not favor eating more meals at restaurants. I didn’t give an explanation why. I will do so here.

Consider an office worker who needs to decide today whether to make a sandwich for lunch or to buy a hamburger at a restaurant. Let’s say she knows that the price of bread and lunch meat has doubled over the past year (100% inflation rate) while the cost of a hamburger has not changed (0% inflation rate). Which should she buy?

The answer is, she doesn’t have enough information to decide. The inflation rate over the past year is irrelevant to her decision today, or at least it should be. What is relevant is the actual costs and utilities today.

Let’s say she likes shopping, making sandwiches, and cleaning up, so the opportunity cost for the sandwich option is zero. Let’s also say she likes sandwiches and hamburgers equally and values them equally and doesn’t value variety. Now, if the price today for lunch meat and bread for a single sandwich is 50 cents while a hamburger is 75 cents, then she should make a sandwich. Next year if inflation continues as before, making a sandwich will cost $1.00 while a hamburger remains 75 cents. In that case, she should buy a hamburger. But that decision is in the future.

Let’s consider an extreme case where inflation rates may affect purchase decisions today. What if the price of sandwich fixings are 50 cents today but inflation is expected to be 100% during the work week (so prices will be $.57, $.66, $.76, and $.87 over the next four days) . Such high inflation rates are called hyperinflation and can lead to severe economic distortions.

Let’s also assume hamburgers are 75 cents today and will remain fixed at that price by law. (Arbitrary but stringent price controls are another common feature of an economy experiencing hyperinflation.) Further, let’s assume that sandwich fixings can be stored in the refrigerator for a week for future use but hamburgers cannot be bought and stored for future consumption.

Finally, let’s assume it is early Monday and our office worker has no sandwich fixings or hamburgers but has $5 available for lunches for the upcoming week. What should she buy each day?

I would recommend trying to buy $3.75 in sandwich fixings today (enough for 5 sandwiches). Here’s why. During a period of hyperinflation, you want to get rid of money as fast as possible because cash loses its value every day you hold it. Thus, buying as much food as possible today is a good investment (called a price hedge).

Ah, you say. Why not make sandwiches the first two days of the week and then switch to the relatively cheaper hamburgers for the last three days? That is unlikely to work because the restaurant is caught between paying rising prices for the food it buys while getting a fixed price for what it sells. Long lines will form as customers seek cheap food. The restaurant will either run out of food, go bankrupt, or close its doors. Regardless, our office worker shouldn’t rely on her ability to buy cheap hamburgers later in the week.

****
So why am I updating a blog post from almost two years ago? Well, it’s because I noticed a big spike in traffic  landing on it last week. It turns out my wife, Susan Wolcott, assigned it as a reading for a class she is teaching to undergraduate business students at Aalto University School of Business, in Mikkeli, Finland. (The school was formerly known as the Helsinki School of Economics.)

Normally, this blog receives about 30 page views a day. On days that I post an entry on kidney disease or organ donation (pet topics of mine) traffic goes up. Of a typical day’s 30 hits, I presume about half of that traffic is not human. It is from web crawlers looking for sites to send spam to (I receive about 15 spam comments a day on this blog).

But check out the big spike in page views for my blog on the day my wife assigned the reading. This blog received 264 page views from 91 unique visitors. That’s the kind of traffic social media experts die for. Maybe I’ve hit upon an idea for generating lots of traffic to a website, convince college professors to assign it as required reading for a class.

Figure 2. Web traffic statistics for this blog

Naturally, I expect another big spike of traffic again today when my wife tells her students about this new blog post.

Typical mirror maze or hall of mirrors. Image from Pinterest

by George Taniwaki

Back when I was in high school, every summer my friends and I would go to the amusement park. One of the attractions we visited was the hall of mirrors. Ten points worth of tickets allowed you to go through the hall once. The goal is to go in through the entrance and find the exit before you starved to death. (I’ve been told that there are numerous bodies of lost patrons still stuck inside the hall, but I digress.)

The hall of mirrors consists of a room with a series of tracks on the floor and ceiling laid out in an equilateral triangular array, called an isohedral tiling pattern (Fig 1).

Figure 1. Isohedral tiling. Image from Wikipedia.org

Each triangular cell is about 3-foot to a side. The tracks on some of the sides have a floor-to-ceiling partition inserted in them. The partitions form walls creating a maze with a single entrance, a single exit, and exactly one path between them. Solving a maze of this type is a great mathematics problem.

The maze is called a hall of mirrors because the partitions are not just solid opaque panels. Instead, they are all of one of two types, either mirrored on both sides or clear plastic.

I had never been in the hall of mirrors. While waiting in line, one of my friends urged us to go twice. The first time would be figuring the maze out. The second time we would race through. He then bet me he could get through it faster than me both the first and second times.

I eagerly accepted because I knew a trick for solving simple mazes called the wall follower algorithm. In the wall follower algorithm, you place one hand (say your left hand) on the wall as you enter the maze and never take it off. As you move through the maze, if you reach an intersection, keep your left hand on the wall, meaning you take the leftmost turn. If you reach a dead-end, keep your left hand on the wall, meaning you will return to the intersection and take the next path. Eventually, you will reach the exit.

If you remember the series of correct paths you took, the next time you enter the maze, you will not need to keep you hand on the wall. You just need to remember the turns you took at each intersection. For example, left, right, straight, right, right, left, straight, right.

Seeing how eager I was, all my other friends also made the same bet and I accepted. After giving our tickets to the operator, my friends ran into the maze. I was surprised that they would dash off without caution. I was determined to show them that I could beat them and solve the maze faster by simply walking through the maze using my logical skills.

What I didn’t know were three facts. First, because of the mirrors and clear walls, as you stepped into each triangular cell, you couldn’t be sure which direction would lead you to an adjacent open cell and which led you into a wall. Using the wall follower algorithm by placing your hand on the wall definitely helped, but it was slow going moving around.

Second, the maze was crowded. There were lots of other people who were moving around, sometimes in the opposite direction as me, and it was difficult to navigate around them. To do so, I often had to take my hand off the wall and as I was getting jostled, I couldn’t be sure I placed my hand back on the same wall. Similarly, it was difficult for me to remember if I had returned to the same point as before. This meant I couldn’t memorize which turn I should make at each intersection.

After a few minutes of trying to solve the maze, I noticed that all of my friends were already outside the maze watching me. I began to panic and became disoriented. Eventually, feeling sorry for me, they began shouting and pointing the directions for me to take. Finally, with their help, I reached the exit of the maze and stepped out to be with them. Except, I wasn’t quite at the exit yet and bam, I walked right into a clear wall mashing my eyeglasses into my face. So much for my superior maze solving skills.

Upon exiting the maze, I learned the third fact. My friends had all been to the amusement park previously that summer and had memorized the path through the hall of mirrors.

As we agreed, we went through the hall a second time. I did a lot better but still made several wrong turns and became disoriented a couple of times. I was the last one out of the maze again. I had to pay off on two losing bets with each of my friends that day.

However, I did learn an important lessons about gambling (and investing in the market too). First, don’t place a bet on a game of skill simply because you know something your opponent doesn’t (like the algorithm to solve a maze). Only place a bet if you have actual experience winning the game you are betting on (like having run through the maze before). Second, if someone challenges you to a contest (who can run through the maze fastest), they probably already have the skills needed to win and you should avoid the bet.

****

Solving a maze using pencil and paper is another interesting problem. And is one that should not induce panic attacks about getting lost. One way to study a maze is to first identify the walls. A maze with a single entrance and single exit must have at least two separate walls as shown on the left of Figure 2.

In the case of a maze with exactly two walls, you can solve it using the wall follower algorithm described earlier. But a faster solution exists. Notice that any path where the wall on both sides is the same color ends in a dead-end. By following the path that has one wall of each color on each side you will quickly find the solution. Notice that this technique is faster only if the walls are already color coded.

Figure 2. Three simple mazes with two walls (left), three walls adjacent to each other (center) and three walls where one is enclosed (right). Image by George Taniwaki

A maze may have more than two walls. If there is only one entrance and exit, there will still be only two exterior walls. Any additional walls will be totally enclosed within the exterior walls. If an interior wall is at any point adjacent to two walls that are part of a solution, then a path following this wall will also add a solution. A wall that is adjacent to only a single wall (is totally enclosed within a wall) will not add another solution. An interior wall that is adjacent to one or fewer walls that is part of a solution will not add another solution either.

In Figure 2 above, the center maze has three walls and has two solutions. You can turn either left or right at the blue wall. The right maze has three walls but only a single solution since the blue wall is totally surrounded by the red wall.

For a more complex example, consider a maze (Fig 3a) that is included in a recent advertisement for Dropbox, a cloud file sharing service.

Figure 3a. Dropbox print ad. Image from Dropbox

It is hard to see the solution to this maze just by inspection. But if we color code all the walls we will discover there are four separate walls (Fig 3b, to save time I only added color at the turns and intersections). The two interior walls (in blue near the top of the puzzle) are both completely contained within a single wall (in red), so they do not add any new solutions, so there is only one solution. The solution is the path that stays between the two exterior walls (green and red). The solution is easy to recognize when the walls are color coded (assuming you do not have red/green color deficient vision). Try it and see how easy it is.

Figure 3b. Dropbox print ad with color coded walls and enclosed paths highlighted. The solution is the path that keeps walls of different colors on each side.

Notice that there are two errors in the maze. There are two paths (filled in yellow) that are completely enclosed, meaning they are not connected to the entrance or exit and so cannot be reached. Despite the errors, this is a nice maze. A good maze has the following attributes:

  1. The path for the solution is quite long and traverses all four quadrants of the grid, meaning that finding the solution path is not obvious if the walls are not color coded
  2. There are many branches off the solution path, meaning that there are many potential places to make an error
  3. Many of the dead-end branches are long and also have branches, meaning that discovering whether a path is a dead-end branch or part of the solution takes a long time