The Barber Paradox

October 31, 2011

I recently listened to the Radiolab podcast on Loops that has a segment on The Barber’s Paradox:

The barber shaves only those men in town who do not shave themselves.

Who shaves the barber?

Apparently this paradox was a big issue for set theory. The following SQL works quite nicely to describe the statement “all people either shave themselves, are shaved by someone else, or don’t shave at all”:

shavedBy VARCHAR(40) REFERENCES Person(name)

INSERT INTO Person(name, shavedBy) VALUES(‘Floyd’, ‘Floyd’);
INSERT INTO Person(name, shavedBy) VALUES(‘Andy’, ‘Floyd’);
INSERT INTO Person(name, shavedBy) VALUES(‘Goober’, ‘Floyd’);
INSERT INTO Person(name, shavedBy) VALUES(‘Gomer’, ‘Gomer’);
INSERT INTO Person(name, shavedBy) VALUES(‘Opie’, NULL);

SELECT DISTINCT shavedBy AS barber FROM Person
AND shavedBy != name;

The result is:


The relational model defines Entities and Attributes on those Entities. So is the issue with the Barber’s Paradox that the language does not make a distinction between Entities and Attributes or is the self-referencing part problematic? Creating a Barber TABLE to go with the Person TABLE is the wrong approach but I think it is only wrong if a self-referencing Attribute exists. We could define a patient-doctor relationship with either a doctor Attribute or a Doctor Entity and both approaches would work fine.

The SQL solution to the Barber Paradox nicely handles additional cases like a new barber moves to Mayberry or Aunt Bee shaves some men in her spare time.


The Brother’s Keeper Bill

October 30, 2011

Bryan Caplan on the EconLog blog writes:

Suppose someone proposed a “Brother’s Keeper Bill.” According to this BKB, people earning at least double the poverty line would be financially obliged to give 20% of their income to any sibling earning less than the poverty line.

Caplan doubts that many people would support this bill and provides several potential responses that fall into the following nine types: 1) atomic individualist, 2) libertarian, 3) moral hazard, 4) donor incentive, 5) work ethic, 6) meritocratic, 7) Puritanical, 8) evasive, and 9) debt.

You wouldn’t want to pay 20% to your brother who you know so why would you pay 20% to a total stranger? The answer is that you are not paying “a” stranger, you are entering into an agreement with a very large group of strangers. It is the same idea behind car/home insurance but applied to income.

The issue with Caplan’s argument is that it equates Responsibility-for-an-Individual with Obligations-to-a-Collective.

I think it is perfectly valid to question whether it is the role of government to provide income insurance but “The Brother’s Keeper Bill” is a sophism.

Pelagic Larval Stage

September 3, 2011

I love this video of baby giant octopi (5mm long) at the Vancouver Aquarium:

The CBC has an article about the event  and states that it is unlikely that any of the 300 hatchlings will survive:

Chances of survival are very low because giant Pacific octopuses have a seven to ten month long pelagic larval stage. To further our knowledge of octopus reproduction, we will attempt to feed and maintain some the larvae for as long as possible.

Pelagic means open water, think deep blue (i.e. no bottom) vs. a reef. I first read about pelagic larval stages in the book Reef Fish Behavior and was blown away at how profoundly different this mechanism is compared to anything I’m used to in the animal world.

I have a built-in assumption that parents and offspring share the same habitat (think Finding Nemo). With most reef fish, not only do the babies never see their parents again, they most likely will never see the same reef their parents inhabit. There is no nepotism on the reef.

How cool is that? And the giant Pacific octopus larvae can’t survive without this stage, or at least no one has figured out what is missing in an aquarium environment (yet).

Nurturing Tiger Moms

February 2, 2011

Bryan Caplan discusses Tiger Mother Amy Chua and I’m completely on-board until he says the following:

But hasn’t all the musical practice indelibly shaped Chua’s children’s characters?  Highly unlikely.  Behavioral genetics finds roughly zero effect of parents on personality.

I think this is a misinterpretation of The Nurture Assumption. The theory states that a large part of a child’s personality is environmental, that is, “nurture” but that this influence is mostly from peers rather than parents or teachers. What I think Caplan forgets is that parents can have an impact on children by indirectly influencing who their peers will be.

For instance, parents can influence their children’s personalities indirectly by the neighbourhood they choose to live in. If I remember correctly, Judith Rich Harris claims that the age of the parent(s) and whether a child is raised by a single parent has zero impact on child personality once you correct for the neighbourhood influence.

In her WSJ article, Chua says the following:

Here are some things my daughters, Sophia and Louisa, were never allowed to do:

• attend a sleepover

• have a playdate

• be in a school play

• complain about not being in a school play

• watch TV or play computer games

• choose their own extracurricular activities

• get any grade less than an A

• not be the No. 1 student in every subject except gym and drama

• play any instrument other than the piano or violin

• not play the piano or violin.

How many of these rules do you think will significantly affect the relationship these children have with their peers? I’m guessing it is non-zero and possibly as important as neighbourhood/school choice.

Kitchen Stagnation

January 31, 2011

Paul Krugman and Tyler Cowen argue that the pace of innovation in the kitchen has stagnated over the last 50 years or so.

The same can be said for one of my favorite technologies, the canoe. The modern day canoe is based on the Aboriginal birchbark canoe. The original design is hundreds of years old and remains unchanged though the materials used in the construction of the modern canoe have changed over time. The birchbark was first replaced by canvas in the 19th century followed by modern composites like fiberglass and Kevlar about 50 years ago. There have been no significant improvements in canoe technology since then.

Is the lack of canoe innovation a sign that we are doomed to technological stagnation?

For me, the canoe is an example of a perfected technology. Within its problem space, it is done. It is complete. It represents the fruits of a long and arduous process, the engineering end-game. It makes me happy. It is the high bar for anything I create.

I admit that kitchen appliances do not give me the same sense of engineering perfection or completeness that the canoe does. They do, however, represent another common engineering measure, that of being “good enough”. It is a waste of time and money to try to improve a technology that is “good enough”. Perhaps that is the definition. A technology is “good enough” when additional engineering resources applied to the problem space result in negligible technological improvement.

One would think that economists preoccupied with the allocation of resources would have a special place in their heart for technology that is either “done” or “good enough” rather than seeing it as a harbinger of middle-class decline.

G20 and Civil Rights

June 26, 2010

The New York Times has an article about the apparent erosion of civil liberties in Toronto during the G20 summit:

Canadians discovered Friday that the Group of 20 summit meeting in Toronto has brought not only world leaders but also a temporary suspension of some of their own civil rights, at least in the core of downtown Toronto.

This post is not about whether the police powers have gone too far. Unfortunately, whenever I hear about the protests all I can think about is the patients and their families at the hospitals just south of Queen’s Park (Princess Margaret, Toronto General, Mount Sinai, and Sick Kids) and the impact the protests have on them:

As a precaution, UHN has cancelled many of our outpatient clinics on Friday, June 25, 2010, except for the following: dialysis at Toronto General Hospital; radiation therapy and chemotherapy at Princess Margaret Hospital; medical imaging at all UHN sites. These clinics will remain open for our patients on Friday, June 25, 2010

For me, civil liberties is all about the Golden Rule and they only extend to the point where your rights begin to impinge on the rights of others.

This is a fine balance but it seems like modern-day protestors are no longer just trying to have their voice heard but they are also trying to force their message on an unwilling audience.

iPad Outdoors

June 5, 2010

This is my second weekend with my new iPad. The iPad was released internationally (I live in Canada) on may 28th. The device is pretty much what I expected but there have been a few notable surprises.

By far the happiest for me is that it works pretty well outdoors even in direct sunlight. It is on par with the first generation iPod Touch I own. The finger prints standout more in direct sunlight but a little bit of elbow grease resolves that. Mind you it is no Kindle. The e-ink screen on the Kindle and other eReaders is gorgeous in direct sunlight.

My second test outdoors with the iPad was a disappointment. Outdoors is one thing but outdoors with sunglasses is another. I wear polarized sunglasses and many screens washout through a polarizer. The Kindle is not impacted at all. The iPod Touch is fine in portrait mode but suffers a bit in landscape mode. Through my polarized sunglasses the iPad is nothing but black in portrait mode. So sad.

This weekend as I sit outside overlooking the lake, I decided to try it again. Notta in portrait mode but to my surprise it’s fine outdoors with polarized sunglasses in landscape mode. WooHoo!!!

Maybe outdoor posts is the only way to get me to blog in the summer.

Megan McArdle has started a meme posting the details of her first Amazon purchase.

Amazon did not launch in Canada until 2002. My first purchase from was Good to Great made Aug 14, 2002. I remember that I loved the business anecdotes in the book but that I hated the analysis of what makes companies great.

I certainly did not remember what book was in my first order but I certainly remember my first order from I had been ordering books online from for several years at that point and I was much happier with the overall process with Amazon than I was with Chapters.

My first purchase was From Naked Ape to Superspecies by David Suzuki made Nov 18, 1999. I don’t remember anything specific from this book but I do currently have a strong dislike for Suzuki’s brand of eco-nihilism. I suspect I disliked his point of view then too.


February 23, 2010

The Daily Shoot assignment #100

Monochrome photos don’t have to be the result of processing or desaturation. Find a monochrome composition and shoot it.


Fragile State

February 17, 2010

The Daily Shoot assignment #94

Fragility conveys tension. Make a photo today of a person or object in a fragile state.

Fragile State

Odd Watches

February 13, 2010

The Daily Shoot assignment #90

Odd or even: Compose an image with an odd or even number of subjects today, and make a photo.

Odd Watches

Checklist Manifesto

February 12, 2010

The Daily Shoot assignment #89

Continuing the Friday fun theme, make a photo that goes with the title of a book you’ve read.

I have recently read The Checklist Manifesto by Atul Gawande as well as his other two books “Better” and “Complications”. The two older books are compilations of his pieces in the New Yorker while the new book expands on the medical checklist theme which he and others have written about recently. Highly recommended.

Checklist Manifesto

Wide Up

February 11, 2010

The Daily Shoot assignment #88

We often get stuck in a rut of always zooming to the longest focal length. Break out today by making a wide-angle photo.

Wide Up