Monthly Archives: June 2009

Crossword Guy just doesn't get math

One of my pet peeves about people and math is that most
people don’t really have a clue of what math is. I’ve been writing
this blog for something over three years, and by the standards of
a lot of people, I’ve almost never written about math.

Yesterday, my son’s kindergarten class had a picnic. On my way home,
I was listening to the local NPR station, which was interviewing some
crossword puzzle writer whose name I cannot remember; I will therefore refer
to him as “crossword-boy”. (It was not Will Shortz; Shortz is much smarter than the
guy they were interviewing.) At one point, they asked him something about
Sudoku.

His response was a bit disjointed – he couldn’t decide whether to talk about
the history of Sudoku or about his opinion of it. His opinion is that it’s
incredibly dull and pointless, and that designing good Sudoku doesn’t require as
much creativity as designing good crosswords. (Just that much is annoying: I’m
a Sudoku addict, and I’ve definitely noticed dramatic differences in Sudokus
from different places. Will Shortz’s Sudoku books have great ones; most computerized
Sudoku games generate rather boring ones; the ones in most newspapers are
obviously computer generated.)

In the course of babbling about how uninteresting, non-creative, and
unsatisfying Sudoko puzzles are, he let loose with the real stupidity: “You know,
Sudoku doesn’t even have to use numbers, it can use any 9 symbols. It’s not a
mathematical puzzle at all.

Because it doesn’t rely on arithmetic, according to crossword-boy,
it’s not mathematical at all. He went on to say that it’s
just a logic puzzle, not a math puzzle at all.

Sorry pal, but logic is math.

Sudoku is an incredibly mathematical puzzle. It’s not an
arithmetic puzzle, but it’s a highly mathematical one.
In computer science terms, it’s a moderately
complex constraint-solving puzzle.

Math is more than arithmetic. It’s more than numbers. Math
is really the formal study of logic and structure. Numbers and arithmetic
are one kind of structured system described using logic which can be
studied and understood using math. But pretty much everything
with a precise, formal structure to it has at least an element of
mathematics. The structure of crossword-boy’s crossword puzzles
is fundamentally mathematical.

Mental Illness – a personal perspective.

This is an edited repost of something I wrote nearly three years ago. You can see the original post and comments here.

Over at Dr. Isis’s blog, there’s a post answering a reader’s question about whether to tell her postdoc advisor about her troubles with clinical depression. I agree with Isis’s advice – without knowing the advisor really well, you can’t be sure of how they’ll react. If the postdoc had become ill due to something like a diabetic episode, where the change in schedule and environment caused by taking a new job messed up the PDs control of their blood sugar – well, there wouldn’t be an issue. The PD would be able tell their advisor they had a medical issue without worrying too much about repercussions. But mental illness is different: the fact is that there is a very strong stigma attached to mental illness, which makes it different from other illnesses.

This is something that’s very important to me. I have people very close to me who have dealt with profound mental illness, and I’ve seen them suffer from the effects of the stigma associated with it. And I am mentally ill myself: I have clinical depression.

Continue reading

Friday Recipe: Duck with Port Wine and Mushrooms

About a month ago, I decided to make a nice special meal for my wife for mothers’ day. I asked her what she wanted, and she said duck. This made me happy, since I consider duck to be one of the most wonderful foods in the entire universe.

I decided that instead of making one of my regular duck dishes, I’d try something new. I had absolutely no idea what I was going to do: I just went to the store, and looked around to find something that appealed to me. I ended up creating a dish that’s a real winner: duck breast in a port wine and mushroom sauce.

Ingredients

  • 2 large duck breasts
  • 4 shallots
  • 1 clove garlic
  • 3 tablespoons butter.
  • 2 cups red wine.
  • 1/2 cup port wine.
  • 1 pound wild mushrooms, sliced.
  • 4 or 5 dried morels, rehydrated in water, then drained and sliced thinly.

Instructions

  1. Prepare the duck breasts: Take your duck breasts, trim off any excess fat or gristle, and cut a cross-hatch pattern into the skin on the breasts. (This will both help the marinade penetrate, and make the fat in the skins render more cleanly.)
  2. Make the marinade: Put 2 shallots into a food processor, and mince them. Then add the red wine, and a generous dose of salt.
  3. Put the duck in the marinade, and let it sit for an hour or two.
  4. Sear the duck breasts:
    • Heat an unoiled pan till it’s good and hot.
    • Take the duck breasts from the marinade, and pat them dry, ten sprinkle lightly with salt and pepper.
    • Put the duck breasts into the pan, skin side down. Reduce the heat to medium, and cook them skin side down for 3 minutes. Then turn them over, and cook for another three minutes on the other side.
    • Then remove them from the pan, and let them rest for five minutes. (You can go ahead and start the sauce while they rest.)
    • Slice the breasts into medium-thick slices. You want them sliced a bit more thickly than is typical for a seared duck breast, because they’re going to cook a little bit in the sauce, and you still want the centers to be nice and rare.
  5. Make the sauce:
    • Slice the second two shallots as thinly as possible.
    • Melt 2 tablespoons of butter in a pan. Add sliced shallots and the minced garlic, and cook until the shallots are transparent.
    • Add the mushrooms, and some salt. Cook until the mushrooms are done. (How long that’ll take will depend on the mushrooms you picked; fresh chanterelles will cook in seconds; portobellos will take a few minutes.)
    • Add the port wine, and let the sauce reduce until most of the liquid from the wine is gone. Taste it now, and add salt and pepper.
    • Remove from the heat, and add another pat of butter, and stir it around until it melts.
  6. Put it all together:
    • Add the sliced duck breast to the hot sauce, and toss it so that the duck is well coated.
    • Serve – arrange the duck slices on the plate, and cover with a generous helping of the mushrooms.

I served this with some slow-cooked collard greens, and a nice bottle of 1997 Australian Shiraz.

Friday Recipe: Pasticcio

I do all of the cooking in my house; my wife amazing at baking, but she’s just totally lost when it comes to cooking. But given my commute, it’s hard to start making a nice dinner when I get home, and have it done in time to be able to eat, and have some time with my kids before they go to bed. So I like to make large dishes on the weekend, so that we’ve got a couple of days during the week when we just need to heat something up. So casseroles are a great thing.

Unfortunately, I don’t know a lot of casseroles. So a few weekends ago, I tried something new: pasticcio. Pasticcio is sort of like greek lasagna; it’s layers of pasta alternated with a meat sauce, and topped with béchamel sauce. I’ve had pasticcio in lots of Greek restaurants, but I never tried making it myself. It turned out really good.

The big secret to it is spices: in my experience, the difference between a really good pasticcio, and a bland boring one is the spices in the meat. The flavor of the good ones comes largely from a very nice middle-eastern spice blend called “ras el hanout”. Ras el hanout can be a bit hard to find, but it’s worth the trouble of searching for. It’s got a lot of ingredients, and the exact combination is very individual. So you want to either find a recipe and make your own blend, or else find someplace that makes a good one. It’s typically got things like cloves, cinammon, cardamom, mace, paprica, black pepper, and dried rosebuds(!). I’ve found a ras that I really like from the spice house.

Ingredients

  • Meat Sauce:
    • 2 lbs ground beef.
    • 1 1/2 teaspoons ras el hanout.
    • 1 minced onion.
    • 2 large cloves garlic, minced.
    • 2 teaspoons salt.
    • 1 can diced tomatoes.
    • 1/2 teaspoon oregano.
    • 1/4 cup dry sherry.
    • 2 egg whites.
  • Bechamel:
    • 1/4 cup butter.
    • 1/3 cup flour.
    • 2 cups milk.
    • 2 eggs + 2 egg yolks.
    • 1/4 cup parmesan cheese.
    • 1 teaspoon salt.
  • Pasta:
    • 1 1/2 lbs pasta.
    • 1 tablespoon butter.
    • 1 pinch salt.

Instructions:

  1. Cook the pasta. (to be authentic, it should be long hollow noodles – like uncut penne; I just used penne). When its done, toss it with just enough butter to stop it from sticking together, and a pinch of salt.
  2. On high heat, brown the meat. While it’s cooking, add most of the salt, and half the ras el hanout.
  3. Remove the meat from the pan. Deglaze with the sherry, and dump the liquid into the meat.
  4. Add some olive oil to the pan on medium heat.
  5. Add the onions and the garlic, and sautee them until they’re translucent.
  6. Add the meat back to the pan.
  7. Add the can of tomatoes, any remaining sherry, the remaining ras el hanout, and the oregano. When it comes to a boil, reduce the heat, and simmer until most of the liquid has evaporated. Remove from heat, and set aside to cool.
  8. When it’s cooled a little bit, mix in the egg whites. It should be cooled enough that the eggs don’t just cook when they hit the meat. They’re there to act as a binder, to get the meat to hold together in the casserole, so you don’t want them to bind until the casserole is cooked.
  9. Melt the butter on medium heat. When it’s all melted, add the flour, and cook until the flour starts to turn golden. Then add the milk and salt. Cook it until it thickens – it should turn very thick.
  10. Once it’s thickened, remove it from the heat, and add in the grated cheese and the eggs, and mix thoroughly.
  11. In a rectangular casserole, put half of the pasta on the bottom of the pan. Cover it with half of the meat. Then add the other half of the pasta, and the remaining meat.
  12. Spoon the bechamel sauce over the top of the casserole, to form an even layer.
  13. Cover lightly with foil, and bake at 350 for 30 minutes.
  14. Remove the foil cover, and bake for another 20 minutes, until the bechamel on top starts to brown.

Defining Dynamical Systems

In my first chaos post, I kept talking about dynamical systems without bothering to define them. Most people who read this blog probably have at least an informal idea of what a dynamical system is. But today I’m going to do a quick walkthrough of what a dynamical system is, and what the basic relation of dynamical systems is to chaos theory.

The formal definitions of dynamical systems are dependent on the notion of phase space. But before going all formal, we can walk through the basic concept informally.

The basic idea is pretty simple. A dynamical system is a system that changes
over time, and whose behavior can be (in theory) described a function that takes
time as a parameter. So, for example, if you have a gravitational system which
has three bodies interacting gravitationally, that’s a dynamical system. If you
know the initial masses, positions, and velocities of the planets, the positions of all three bodies at any future point in time is a function of the time.

Continue reading

Chaos

strange_attractors-0086.jpg.jpeg

One mathematical topic that I find fascinating, but which I’ve never had a chance to study formally is chaos. I’ve been sort of non-motivated about blog-writing lately due to so many demands on my time, which has left me feeling somewhat guilty towards those of you who follow this blog. So I decided to take this topic about which I know very little, and use the blog as an excuse to learn something about it. That gives you something interesting to read, and it gives me something to motivate me to write.

I’ll start off with a non-mathematical reason for why it interests me. Chaos is a very simple idea with very complex implications. The simplicity of the concept makes it incredibly ripe for idiots like Michael Crichton to believe that he understands it, even though he doesn’t have a clue. There’s an astonishingly huge quantity of totally bogus rubbish out there, where the authors are clueless folks who sincerely believe that their stuff is based on chaos theory – because they’ve heard the basic idea, and believed that they understood it. It’s a wonderful example of my old mantra: the worst math is no math. If you take a simple mathematical concept, and render it into informal non-mathematical words, and then try to reason from the informal stuff, what you get is garbage.

So, speaking mathematically, what is chaos?

To paraphrase something my book-editor recently mentioned: in math, the vast majority of everything is bad. Most functions are non-continuous. Most topologies are non-differentiable. Most numbers are irrational. Most irrational numbers are undescribable. And most complex systems are completely unstable.

Modern math students have, to a great degree, internalized this basic idea. We pretty much expect badness, so the implications of badness don’t surprise us. We’ve grown up mathematically knowing that there are many, many interesting things that we would really like to be able to do, but that can’t be done. That realization, that there are things that we can’t even hope to do, is a huge change from the historical attitudes of mathematicians and scientists – and it’s a very recent one. A hundred years ago, people believed that we could work out simple, predictable, closed-form solutions to all interesting mathematical problems. They expected that it might be very difficult to find a solution; and they expected that it might take a very long time, but they believed that it was always possible.

For one example that has a major influence on the study of chaos: John Von Neumann believed that he could build a nearly perfect weather prediction computer: it was just a matter of collecting enough data, and figuring out the right equations. In fact, he expected to be able to do more than that: he expected to be able to control the weather. He thought that the weather was likely to be a system where there were unstable points, and that by introducing small changes at the unstable points, that weather managers would be able to push the weather in a desired direction.

Of course, Von Neumann knew that you could never gather enough data to perfectly predict the weather. But most systems that people had studied could be approximated. If you could get measurements that were correct to within, say, 0.1%, you could use those measurements to make predictions that would be extremely close to correct – within some multiple of the precision of the basic measurements. Small measurement errors would mean small changes in the results of a prediction. So using reasonably precise but far from exact or complete measurements, you could make very accurate predictions.

For example, people studied the motion of the planets. Using the kinds of measurements that we can make using fairly crude instruments, people have been able to predict solar eclipses with great precision for hundreds of years. With better precision, measuring only the positions of the planets, we can predict all of the eclipses and alignments for the next thousand years – even though the computations will leave out the effects of everything but the 8 main planets and the sun.

Mathematicians largely assumed that most real systems would be similar: once you worked out what was involved, what equations described the system you wanted to study, you could predict that system with arbitrary precision, provided you could collect enough data.

Unfortunately, reality isn’t anywhere near that simple.

Our universe is effectively finite – so many of the places where things break seem like they shouldn’t affect us. There are no irrational numbers in real experience. Nothing that we can observe has a property whose value is an indescribable number. But even simple things break down.

Many complex systems have the property that they’re easy to describe – but where small changes have large effects. That’s the basic idea of chaos theory: that in complex dynamical systems, making a minute change to a measurement will produce huge, dramatic changes after a relatively short period of time.

For example, we compute weather predictions with the Navier-Stokes equations. N-S are a relatively simple set of equations that describe how fluids move and interact. We don’t have a closed-form solution to the N-S equations – meaning that given a particular point in a system, we can’t compute the way fluid will flow around it without also computing separately how fluid will flow around the points close to it, and we can’t compute those without computing the points around them, and so on.

So when we make weather predictions, we create a massive grid of points, and use the N-S equations to predict flows at every single point. Then we use the aggregate of that to make weather predictions. Using this, short-term predictions are generally pretty good towards the center of the grid.

But if you try to extend the predictions out in time, what you find is that they become unstable. Make a tiny, tiny change – alter the flow at one point by 1% – and suddenly, the prediction for the weather a week later is dramatically different. A difference of one percent in one out of a million cells can, over the space of a month, be responsible for the difference between a beautiful calm summer day and a cat-5 hurricane.

That basic bit is called sensitivity to initial conditions is a big part of what defines chaos – but it’s only a part. And that’s where the crackpots go wrong. Just understanding the sensitivity and divergence isn’t enough to define chaos – but to people like Crichton, understanding that piece is understanding the whole thing.

To really get the full picture, you need to dive in to topology. Chaotic systems have a property called topological mixing. Topological mixing is an idea which isn’t too complex informally, but which can take a lot of effort to describe and explain formally. The basic idea of it is that no matter where you start in a space, given enough time, you can wind up anywhere at all.

To get that notion formally, you need to look at the phase space of the system. You can define a dynamical system using a topological space called the phase space of the system. Speaking very loosely, the phase space P of a system is a topological space of points where each point p∈P corresponds to one possible state of the system, and the topological neighborhoods of p are the system states reachable on some path from p.

So – image that you have a neighborhood of points, G in a phase space. From each point in G, you traverse all possible forward paths through the phase space. At any given moment t, G will have evolved to form a new neighborhood of points, Gt. For the phase space to be chaotic, it has to have the property that for any arbitrary pair of neighborhoods G and H in the space, no matter how small they are, no matter how far apart they are, there will be a time t such that Gt and Ht will overlap.

But sensitivity to initial conditions and topological mixing together still aren’t sufficient to define chaos.

Chaotic systems must also have a property called dense periodic orbits. What that means is that Chaotic systems are approximately cyclic in a particular way. The phase space has the property that if the system passes through a point p in the neighborhood P, then after some finite period of time, the system will pass through another point in P. That’s not to say that it will repeat exactly: if it did, then you would have a repeating system, which would not be chaotic! But it will come arbitrarily close to repeating. And that almost-repetition has to have a specific property: the union of the set of all of those almost-cyclic paths must be equivalent to the entire phase-space itself. (We say, again speaking very loosely, that the set of almost-cycles is dense in the phase space.)

That’s complicated stuff. Don’t worry if you don’t understand it yet. It’ll take a lot of posts to even get close to making that comprehensible. But that’s what chaos really is: a dynamical system with all three properties: sensitivity to initial conditions, overlaps in neighborhood evolution, and dense periodic orbits.

In subsequent posts, I’ll spend some more time talking about each of the three key properties, and showing you examples of interesting chaotic systems.