Puzzles modulo math

I am not impressed with the math puzzle in the Times today.  (Background: the “Wordplay” blog that the Times hosts to discuss crossword puzzles occasionally does “Numberplay” instead; that is, math puzzles.)  Here’s the statement:

Player 1 writes a sequence of eight positive integers. Player 2 then writes a + or – sign in each of the seven spaces between the integers. If the final numeric result is odd, player 1 wins. If even, player 2 wins. Who should win this game?

What if Player 2 can use a × sign?

I thought about this for all of thirty seconds and realized that it has no depth.  If you know what modular arithmetic is you can answer it; if you don’t, you will be stuck with a boring case-by-case analysis and presumably doomed to argue with math skeptics in the comments section for the rest of the week.

The thirty-second solution: mod 2, player 1 is just choosing a sequence of 0’s and 1’s, and player 2 is doing nothing at all (without multiplication) since + and – are the same.  So player 1 has only to choose an odd number of 1’s (that is, odd numbers), and therefore wins.  If multiplication is allowed, then player 2 can multiply everything if there is at least one even number, and add everything if all the numbers are odd, and therefore wins.

On the other hand, the linked puzzle (the “Five Pirates Puzzle”) from earlier used to be a favorite of mine.  Of course, I heard it as the “Hundred Pirates Puzzle”, and the answer gets very strange once you have more than 100 pirates.

Posted in Math, Puzzles | Leave a comment

The last WWI veteran is dead

I’ve been waiting for this for a while: the last WWI veteran just died.  She was apparently a waitress with the Royal Air Force (the last combat veteran died last May; he was also British.  Since the US didn’t even enter the war until the end, statistically speaking, you can’t expect its veterans to have been among the last surviving).

Why have I been waiting?  Because I have long been of the opinion that WWI is completely remote from the present time and largely forgotten.  It has almost no cultural memes: high school students forget about Archduke Ferdinand, dogfighters were last seen in Peanuts (whose author died years ago), “shell shocked” is un-PC and therefore banned in favor of PTSD, and I’m looking forward to the creative misinterpretations that will be surrounding “entrenched” now that no one knows what a trench was.  There is still “no-man’s land”, I guess.  And the Maginot line (or is that just the Times crossword puzzle?).

More seriously: every now and then I would hear something about one of the last few survivors of WWI.  They would be trotted out as a sort of reassurance that we are in touch with our heritage (or something like that) or have not forgotten the sacrifices of our ancestors.  Well, they’re dead now, we’re out of touch, and we’ve forgotten.

I doubt very much that anyone has any idea what the world was like then, what kind of psychology must have been common in order for the war to have come about and been carried out as it was.  How people lived, and what changed later.

For that matter, no one can imagine what it was like after the war; I believe that everything before the 50s is purely incomprehensible to people today.  I can only wonder what that waitress, Florence Green, was thinking when she said in the article, “It seems like such a long time ago now”.

Posted in Uncategorized | Leave a comment

TeX is a terrible programming language

Recently, on the TeX Q&A site, there was a question about whether learning TeX is helpful for learning other programming languages.  You (gentle reader) may not know that I am a serious TeXpert: it is by far the language with which I am most proficient.  I think this gives me the right to say that TeX is a terrible programming language.  (This is a blatant attempt to drum up a few more votes on that answer, not that it really needs them.  Who knew that, on a site devoted to TeX aficionados, so many people would agree?)

On a related subject, the votes on my answers are now beginning to conform to Zipf’s law, at least in the two highest.  I don’t know if I can write an answer worth 80 votes, though.

Posted in Computers, Programming, TeX | Leave a comment

A stinging comeback

I must be in the mood to comment on politics this week!  Just now I found in the Times that Turkey is furious with France for criminalizing the denial of the Armenian genocide, an atrocity so indisputably documented that even Wikipedia writes (in the lede!) that it was the “systematic destruction of the Armenian population of the Ottoman Empire”.  Turkey has a long history of denying this, of course, since it is almost a century old now and still unacknowledged.  So this news is to be expected.  The official response speaks in Turkey’s defense:

Turkey contends that Armenians were not the victims of systematic killings and argues that no more than 500,000 Armenians died, noting that many Turks also perished during those years of war.

I myself have (almost literally) a graduate-level degree in splitting verbal hairs, not only from doing math but also from reading Robert Jordan.  Thus I can say with confidence that Turkey has declared that:

  • They (or rather the Ottoman Empire of which they were the principal part) killed Armenians, though not necessarily systematically.
  • They killed half a million Armenians (as compared to the recognized total of two to three times that many).

It should also perhaps be noted that the Armenian population would, if allowed, have been part of the Ottoman army, but in fact, all the deaths were civilians.  Thus even the number of 500,000 that Turkey considers to be acceptably low is atrocious, even if the Ottomans themselves did not kill these people and instead “merely” allowed them to die somehow as a result of warfare.

Not what I would call a stinging comeback.

Posted in Black humor, News, Politics | Leave a comment

A politics post?

Seriously, I can’t believe I actually want to write a politics post.  I’m not even registered to vote in California, because I don’t know how long I’ll be here and there’s no Democratic primary anyway this year.  But I keep reading about the other party in the news and…well, the problem is that it’s “the other party” that’s in the news.  It’s strange that I haven’t heard any recent complaining about our choiceless two-party system, because the structure of the Republican primary contest has some relevance for the question in a way that it did not before this year.  And so I’ve been thinking about what the actual effect of unlimited campaign spending is on our politics.

Continue reading

Posted in News, Politics | 2 Comments

The personal touch

I am now in the midst of applying for postdocs…again.  It is embarrassing to think that this is actually the third year in a row I’ve done this, and while I think it was probably a good thing that I didn’t get anything the first time (as my thesis was nowhere near ready back then, despite what I thought) I was, mildly put, really frustrated this spring when nothing came up a second time.

I blamed the economy, of course, and so did Dennis.  I also blamed Dennis, since I felt he should have done something to promote my applications.  Not everyone agrees on the role of the advisor in this kind of professional development, though, and so I had room to blame myself as well.  I felt regret for not attending conferences where people might hear about me, and for not publishing more or having a more ambitious research program so that I could get an NSF fellowship (future rant: NSF).  I also felt angry at myself for turning down the only offer I did get, to work with Ivan Fesenko at Nottingham, because I didn’t want to make the change in direction (physically or mathematically) that it would require.  However, I reserve the right to maintain some kind of preferences in my job search, and I did not actually apply to Nottingham because I did not apply to any location outside the US (except one place in Australia, at Dennis’ urging).  I wish to remain here, and if that is insufficient devotion to my career, then I will also pay the price (currently, the price seems to be about $40,000 for the year).

However, none of these things is really the reason I didn’t get a job.  The reason is that my application strategy was doomed to failure because I did not write to people.  It sounds silly: I already submitted an application.  An application that says Harvard on it, no less.  I’m sure they’ll at least look at it, so why write?  Well, Greta wrote to people, mostly people she’d never met, and got spectacular results.  Igor Pak says with absolute assurance that this is a necessary step just for you to make it onto individual faculty’s personal short lists so that your application will even be read carefully.

And so this year, I’m writing to people.  Not just a few people, and not just at places like Harvard (to which I am not applying because it’s pointless).  I think I’ve written more letters than the total number of applications I submitted my first time.  About a third of them get some kind of response, and maybe half a dozen have been very nice responses.  Today I received this (I’m not saying from where):

Thank you for bringing your application to my attention. Our department would be very lucky to have you here. Our system is (now) based on recommendations by individual faculty for people who are actually close to said faculty member(s).  Therefore, my advice is to contact X and Y

The author is not actually really in my field, but I thought he would be interested in some of my current projects.  I did write to X, by the way (not Y).  But see what he said: our system is based on recommendations by individual faculty: if I hadn’t written, my application would probably just have been thrown out!  I can’t imagine how many other schools I wasted my opportunity with in previous years by not doing this.

Let me say that again: this is not a networking exercise, it’s not to “grease the wheels” or “get to the interview”.  It’s part of the application: you can’t get a job without writing someone you’re going to work with.  You don’t have to know them (I don’t know this guy, and I don’t know X either), and everyone knows that they’re going to be getting lots of these secondary application emails from lots of unknown graduate students.  It’s not rude, or pushy, or even exceptional.  It’s just not mentioned in the job ad.

I suppose that lots of people would read this and say “of course!”.  My father for one has been preaching that I shouldn’t just “throw my application over the wall”.  Anyone who’s gotten a job already knows this.  But you know who does not know this?  Graduate students who got into their programs on the basis of sealed recommendation letters and fixed transcripts covered in A’s, combined with some form of secret negotiations between your sponsor and their chair.  I literally didn’t have to do anything to get into grad school other than hit up a few people who liked me to write letters to that effect.  I did not go to “work with” anyone in particular, and although I was paid from Dennis’ grant, my stipend was assured and I’m pretty sure that if he didn’t have one I’d have gotten money from somewhere else without having to struggle for it.  This is a situation that, I think, is unique in top-tier mathematics programs; certainly people in the sciences join a specific lab for a specific reason.

Entitlement much, perhaps?  I’m not saying I should have been given the same easy treatment for job applications, though I certainly thought so two years ago.  I don’t even know what I’m angry at.  I’m just angry, and on this blog, that’s enough.

Posted in Academia, Jobs | Leave a comment

Cinnamon-vanilla chocolate pudding

I mentioned in this old post that I had a particular recipe for cinnamon-vanilla chocolate pudding with some unusual taste properties.  At the risk of precipitating the degeneration of this journal into a food blog, let me talk about it.

Once, maybe two or three years ago, I remembered how I used to love making chocolate pudding from a powder; not the instant stuff, which is vile, but the kind you have to boil in milk until it thickens.  I think it’s the Jello variety that’s pretty good.  But my mother always made faint noises about how she and her mother used to make chocolate pudding from scratch, and I was always curious.

It’s not hard; actually, it’s really quite the same.  You just have to formulate the right powder, which is done with some combination of sugar, powdered cocoa, and cornstarch.  If you get the numbers right, it comes out pretty good, and of course it can be varied: I found one recipe on Simply Recipes (a much better place for recipes than here) that produces a really rich pudding by using egg yolks.  Perhaps it’s my Jello upbringing, but I like the cornstarch version better.

The recipe I found was on Allrecipes, which is actually not bad (unlike Cooks.com, which should be disregarded out of hand): it’s here.  Don’t follow it exactly, but read the comments: the basic recipe suffers from many minor flaws.  Too much cornstarch and too much sugar are the obvious ones.  Let me contribute another, subtler one: vanilla extract.

Okay, I love vanilla.  I have a 16oz bottle of the stuff that I got for some price I would have thought was a fantasy (the kind that’s escapism for me, not for the store) from someone else and I can never possibly use it all.  Up until now, I would have thought it to be a fine substitute for the even more fantastically expensive vanilla beans, but it turns out to be second-rate even when pure.  The genuine item is really something else.

Using a vanilla bean is actually a bit of an art.  You can’t just throw it in at the end, since you have to get that flavor out, and you can’t simmer it with everything else since it takes a while to do that.  I actually only learned the trick when I was in Israel preparing part of a Thanksgiving dinner for the rest of the math program, specifically the dessert part, which was a persimmon “pudding” (unlike the puddings considered here, this one was actually a cake) with a cinnamon crème anglaise.  (Should I have italicized that?  Snobby insert-French always is.)

The instructions for such a sauce are very simple: flavor the milk, and then temper in some egg yolks to thicken it.  The flavoring was accomplished by letting a cinnamon stick float in scalded (but not boiled) milk for about an hour first, thus creating a tea of sorts.   After I got back home, the first time I wanted chocolate pudding I also simultaneously wanted Mexican chocolate, but I don’t know where to get my hands on that for a reasonable price (there is something called Taza that does it, but it’s like one million dollars for an ounce).  Of course, Mexican chocolate is primarily chocolate with cinnamon in it (also chile, but I wasn’t about to do that), and I remembered that dinner….

Thus was born the cinnamon-vanilla chocolate pudding.  I had some leftover half-used vanilla beans from Greta’s birthday last year, when I made souffles, and they are good for several soakings, so I had just washed them off and dried them again.  I threw one in with a cinnamon stick and let it steep in the milk for an hour, then proceeded as usual with the pudding.  The result?

Well, I’ve made this pudding a few times, and it’s always fooled people.  They guess that it has nutmeg in it, or they claim they don’t know what the spice is.  I also can’t really tell; I can discern the cinnamon and of course, the chocolate, but not the vanilla, and neither of them really tastes like it usually does.  It’s a new taste (and not like nutmeg, either).  It’s best fresh, and it’s best with a lot of sugar, which it mitigates surprisingly well.  Somehow the sweetness amplifies the spice, whereas usually it is a little sickening.

Back to the vanilla extract: this just doesn’t work with extract.  Maybe it’s because you add it at the end, but you can’t add it at the beginning because it will vanish.  And you can’t use cinnamon powder because it doesn’t really dissolve like chocolate (cinnamon is basically wood).  Maybe the steeping extracts the tastes differently than simply inserting an alcohol solution would (certainly that is the case for cinnamon sticks versus cinnamon powder).  Maybe it just doesn’t have enough taste.  Either way, the time I tried this without the vanilla bean it just tasted like cinnamon-flavored chocolate pudding, which was tasty, but not that good.

Here’s the recipe, at least as I remember it.  I never mark my changes on the printout I have so I have to figure out what my usual decisions are.

Ingredients

1/2 vanilla bean, seeded (I don’t know what to do with the seeds.  Cook something else with them.)
4in cinnamon stick
3/4 cup white sugar (1/2 cup if you like)
1/4 cup and 1 tablespoon unsweetened cocoa powder (that’s 5 tablespoons)
1/8 cup and 1 tablespoon cornstarch (that’s 3 tablespoons, and half what Allrecipes wants)
1/4 teaspoon salt (it actually says 1/8, but I don’t do such small increments)
1 quart milk
3 tablespoons butter (this is a dessert, don’t skimp)

Equipment

A small mixing bowl
A medium-sized pot
A whisk, or at least a wooden spoon

Directions

  1. Scald the milk: heat it on low until steam begins to rise off the surface, and until the surface itself appears to form a faint skin.  This is the point just before it begins to simmer.  By raising it just to this temperature you will avoid changing the physical properties of milk, but we need it to be hot.
  2. Turn off the heat and throw in the vanilla bean and the cinnamon stick.  Cover the pot and let it steep for an hour or more.  No one will complain if it goes longer and the milk will stay warm for quite some time.
  3. While it’s steeping, mix up the powders in the bowl and thoroughly stir them together with the whisk or spoon.  They have a tendency to form little clumps when added to the liquid and it would be nice if, at least, those clumps were homogeneous.
  4. After the milk is done, mix in the powders and put the temperature on medium.  Break up those clumps if they form, and keep stirring.
  5. Keep stirring.
  6. Stir until the pudding is boiling. Just because it gets a tiny bit thicker doesn’t mean it’s even close to done; if you don’t make it boil, then it will taste like cornstarch.
  7. Turn off the heat, mix in the butter.  It helps a bit if you cut it into little centimeter-long cubes first.
  8. Let it cool.  You want to prevent a skin from forming (really, you do), so you want to lay some plastic wrap directly on the surface of the pudding.  Don’t worry; it’s not hot enough to melt the plastic.  If you are worried, or you want to clean the pot, put it all in a big storage dish like you use for leftovers and put the plastic on there. Any part of the pudding that’s not flush with the plastic will become skin.

I find that about four soup spoons’ worth of pudding is enough for anyone at any one time.  This will last two people like a week if they eat it religiously after dinner.

Posted in Cooking, Food | 2 Comments