Archive:
In this section: Subtopics:
Comments disabled |
Tue, 26 Nov 2019 A chalupa is a fried tortilla that has been filled with meat, shredded cheese, or whatever. But it is also the name of the mayor of Prague from 2002–2011.
The boat-shaped food item is named after a kind of boat called a chalupa; I think the name is akin to English sloop. But in Czech a chalupa is neither a boat nor a comestible, but a cottage. [ Other people whose names are accidentally boats ] [ Addendum 20191201: I should probably mention that the two words are not pronounced the same; in Spanish, the “ch” is like in English “church”, and in Czech it is pronounced like in English “challah” or “loch”. To get the Spanish pronunciation in Czech you need to write “čalupa”, and this is indeed the way they spell the name of the fried-tortilla dish in Czech. ] [Other articles in category /lang/etym] permanent link Sun, 24 Nov 2019
The least common divisor and the greatest common multiple
One day Katara reported that her middle school math teacher had gone into a rage (whether real or facetious I don't know) about some kids’ use of the phrase “greatest common multiple”. “There is no greatest common multiple!” he shouted. But that got me thinking. There isn't a greatest common multiple, but there certainly is a least common divisor; the least common divisor of !!a!! and !!b!! is !!1!!, for any !!a!! and !!b!!. The least common multiple and greatest common divisor are beautifully dual, via the identity $$\operatorname{lcm}(a,b)\cdot\gcd(a,b) = ab,$$ so if there's a simple least common divisor I'd expect there would be a greatest common multiple also. I puzzled over this for a minute and realized what is going on. Contrary to Katara's math teacher, there is a greatest common multiple if you understand things properly. There are two important orderings on the positive integers. One is the familiar total ordering by magnitude: $$0 ≤ 1≤ 2≤ 3≤ 4≤ \ldots.$$ (The closely related !!\lt!! is nearly the same: !!a\lt b!! just means that !!a\le b!! and !!a\ne b!!.) But there is another important ordering, more relevant here, in which the numbers are ordered not by magnitude but by divisibility. We say that !!a\preceq b!! only when !!b!! is a multiple of !!a!!. This has many of the same familiar and comforting properties that !!\le!! enjoys. Like !!\le!!, it is reflexive. That is, !!a\preceq a!! for all !!a!!, because !!a!! is a multiple of itself; it's !!a\cdot 1!!. !!\preceq!! is also transitive: Whenever !!a\preceq b!! and !!b\preceq c!!, then also !!a\preceq c!!, because if !!b!! is a multiple of !!a!!, and !!c!! is a multiple of !!b!!, then !!c!! is a multiple of !!a!!. Like !!\le!!, the !!\preceq!! relation is also antisymmetric. We can have both !!a≤b!! and !!b≤a!!, but only if !!a=b!!. Similarly, we can have both !!a\preceq b!! and !!b\preceq a!! but only if !!a=b!!. But unlike the familiar ordering, !!\preceq!! is only a partial ordering. For any given !!a!! and !!b!! it must be the case that either !!a\le b!! or !!b \le a!!, with both occurring only in the case where !!a=b!!. !!\preceq!! does not enjoy this property. For any given !!a!! or !!b!!, it might be the case that !!a\preceq b!! or !!b\preceq a!!, or both (if !!a=b!!) or neither. For example, neither of !!15\preceq 10!! and !!10 \preceq 15!! holds, because neither of !!10!! and !!15!! is a multiple of the other. The total ordering !!≤!! lines up the numbers in an infinite queue, first !!0!!, then !!1!!, and so on to infinity, each one followed directly by its successor. The partial ordering !!\preceq!! is less rigid and more complex. It is not anything like an infinite queue, and it is much harder to draw. A fragment is shown below: The nodes here have been arranged so that each number is to the left of all the numbers it divides. The number !!1!!, which divides every other number, is leftmost. The next layer has all the prime numbers, each one with a single arrow pointing to its single divisor !!1!!, although I've omitted most of them from the picture. The second layer has all the numbers of the form !!p^2!! and !!pq!! where !!p!! and !!q!! are primes: !!4, 6, 9, 10, 14, \ldots!!, each one pointing to its prime divisors in the first layer. The third layer should have all the numbers of the form !!p^3, p^2q, !! and !!pqr!!, but I have shown only !!8, 12, 18, !! and !!20!!. The complete diagram would extend forever to the right. In this graph, “least” and “greatest” have a sort-of-geometric interpretation, “least” roughly corresponding to “leftmost”. But you have to understand “leftmost” in the correct way: it really means “leftmost along the arrows”. In the picture !!11!! is left of !!4!!, but that doesn't count because it's not left of 4 along an arrow path. In the !!\preceq!! ordering, !!11\not \preceq 4!! and !!4\not \preceq 11!!. Similarly “greatest” means “rightmost, but only along the arrows”. A divisor of a number !!n!! is exactly a node that can be reached from !!n!! by following the arrows leftward. A common divisor of !!n!! and !!m!! is a node that can be reached from both !!n!! and !!m!!. And the greatest common divisor is the rightmost such node. For example, the greatest common divisor of !!12!! and !!16!! is the rightmost node that can be reached by following arrows from both !!12!! and from !!16!!; that's !!4!!. The number !!8!! is right of !!4!! but can't be reached from !!12!!. The number !!12!! is right of !!4!! but can't be reached from !!16!!. The number !!2!! can be reached from both, but !!4!! is right of !!2!!. So the greatest common divisor is !!4!!. Is there a least common divisor of !!n!! and !!m!!? Sure there is, it's the leftmost node that can be reached from both !!n!! and !!m!!. Clearly, it's always !!1!!, regardless of what !!n!! and !!m!! are. Going in the other direction, a multiple of !!n!! is a node from which you can reach !!n!! by following the arrows. A common multiple of !!n!! and !!m!! is one from which you can reach both !!n!! and !!m!!, and the least common multiple of !!n!! and !!m!! is the leftmost such node. But what about the greatest common multiple, angrily denied by Katara's math teacher? It should be the rightmost node from which you can reach both !!n!! and !!m!!. The diagram extends infinitely far to the right, so surely there isn't a rightmost such node? Not so! There is a rightmost node! !!0!! is a multiple of !!n!! for every !!n!!, we have !!n \preceq 0!! for every !!n!!, and so zero is to the right of every other node. The diagram actually looks like this: where I left out an infinite number of nodes in between !!0!! and the rest of the diagram. It's a bit odd to think of !!0!! by itself there, all the way on the right, because in every other case, we have !!m \preceq n!! only when !!m≤ n!!. !!n=0!! is the only exception to that. But when you're thinking about divisibility, that's how you have to think about it: !!1!! is least, as you expect, not because it's smallest but because it's a divisor of every number. And dually, !!0!! is greatest, because it's a multiple of every number. So that's the answer. Consideration of the seemingly silly question of the greatest common multiple has led us to a better understanding of the multiplicative structure of the integers, and we see that there is a greatest common multiple, which is exactly dual to the least common divisor, just as the least common multiple is dual to the greatest common divisor. [Other articles in category /math] permanent link Thu, 14 Nov 2019Katara and I are in a virtuous cycle where she thinks of some food she wants to eat and then asks me to cook it, I scratch my head and say "Well, I never did, but I could try", and then I do, and she tells me it was really good. This time she suggested I should make soondubu jjigae (순두부찌개), which is a Korean stew that features very soft tofu. (“Dubu” (두부) is tofu, and “soon dubu” is soft tofu.) I did it and it came out good, everyone was happy and told me how great I am. Cooking for my family makes me feel like a good dad and husband. Hey, look, I am doing my job! I love when I do my job. I thought maybe soondubu would be one of those things where you can make it at home with endless toil but in the end you have a product that is almost as good as the $6.95 version you could get from the place downstairs. But it was actually pretty easy. Korean cuisine is often very straightforward and this was one of those times. I approximately followed this recipe but with several changes. (One of these days I'll write a blog article about how so many people stress out about the details of recipes.) The overall method is:
The recipe on that page called for beef but I used chicken meat in cubes because that was what Katara asked for. All the soondubu recipes I found call for kochugaru (red pepper flakes) instead of kochujang (red pepper soybean paste) but I didn't have any handy and so what? Somewhere in the world there is some food snob who will sneer and say that Real Soondubu is always made with kochugaru, and using kochujang is totally inauthentic. But somewhere else there is someone who will say “well, my grandmother always liked to use kojujang instead”, and Grandma outranks the food snob. Also I decided this year that the whole idea of “authentic” recipes is bullshit and I am going to forget about it. I used chicken broth out of a box. The recipe called for scallions but I think I didn't have any handy that time. The recipe called for anchovy paste but I left them out because Lorrie doesn't like the way they taste. But I put did in some thin slices of zucchini. We do have a nice Korean-style glazed earthenware pot which I cooked in and then transported directly to the table. Everyone in my family likes soondubu and it made me really happy that they considered my first one successful. [Other articles in category /food] permanent link Mon, 11 Nov 2019All programming languages are equally crappy, but some are more equally crappy than others. [Other articles in category /prog] permanent link Wed, 06 Nov 2019
Help me ask why you didn't just…
Regarding the phrase “why didn't you just…”, Mike Hoye has something to say that I've heard expressed similarly by several other people:
(Specifically, that you think they must be a blockhead for not thinking of this solution immediately.) I think this was first pointed out to me by Andy Lester. I think the problem here may be different than it seems. When someone says “Why don't you just (whatever)” there are at least two things they might intend:
Certainly the tech world is full of response 1. But I wonder how many people were trying to communicate response 2 and had it received as response 1 anyway? And I wonder how many times I was trying to communicate response 2 and had it received as response 1? Mike Hoye doesn't provide any alternative phrasings, which suggests to me that he assumes that all uses of “why didn't you just” are response 1, and are meant to imply contempt. I assure you, Gentle Reader, that that is not the case. Pondering this over the years, I have realized I honestly don't know how to express my question to make clear that I mean #2, without including a ridiculously long and pleading disclaimer before what should be a short question. Someone insecure enough to read contempt into my question will have no trouble reading it into a great many different phrasings of the question, or perhaps into any question at all. (Or so I imagine; maybe this is my own insecurities speaking.) Can we agree that the problem is not simply with the word “just”, and that merely leaving it out does not solve the basic problem? I am not asking a rhetorical question here; can we agree? To me,
seems to suffer from all the same objections as the “just”ful version and to be subject to all the same angry responses. Is it possible the whole issue is only over a difference in the connotations of “just” in different regional variations of English? I don't think it is and I'll continue with the article assuming that it isn't and that the solution isn't as simple as removing “just”. Let me try to ask the question in a better better way:
I think the sort of person who is going to be insulted by the original version of my question will have no trouble being insulted by any of those versions, maybe interpreting them as:
The more self-effacing I make it, the more I try to put in that I think the trouble is only in my own understanding, the more mocking and sarcastic it seems to me and the more likely I think it is to be misinterpreted. Our inner voices can be cruel. Mockery and contempt we receive once can echo again and again in our minds. It is very sad. So folks, please help me out here. This is a real problem in my life. Every week it happens that someone is telling me what they are working on. I think of what seems like a straightforward way to proceed. I assume there must be some aspect I do not appreciate, because the person I am talking to has thought about it a lot more than I have. Aha, I have an opportunity! Sometimes it's hard to identify what it is that I don't understand, but here the gap in my understanding is clear and glaring, ready to be filled. I want to ask them about it and gain the benefit of their expertise,
just because I am interested and curious, and perhaps even because the
knowledge might come in useful. But then I run into trouble. I want
to ask “Why didn't you just use I want to ask the question in a way that will make them smile, hold up
their index finger, and say “Aha! You might think that What if I were to say
Would that be safer? How about:
but again I think that suggests sarcasm. A colleague suggests:
What to do? I'm in despair. Andy, any thoughts? [Other articles in category /tech] permanent link Tue, 05 Nov 2019A while back a YouTube video was going around titled Octopus Intelligence Experiment Takes an Unexpected Turn. Someone put food in a baby bottle with a screw cap and a rubber nipple. There was a hole drilled in the bottle so that the octopus could reach in to taste the food, but it was not large enough for the food to come out or for the octopus to go in. The idea, I suppose, was that the octopus would figure out how to unscrew the cap. The “unpexected turn” was that instead of unscrewing the cap, the octopus just ripped the entire nipple out of the bottle. I have mentioned this before but it bears repeating: this outcome should not have been an unexpected turn:
(Martin Wells, Octopus: Physiology and Behaviour of an Advanced Invertebrate (Springer, 1978), page 241.) [Other articles in category /bio/octopus] permanent link Mon, 04 Nov 2019We have had two of these plastic thingies cluttering up our dish drainer for years. We didn't know what they were but we didn't want to throw them away because what if they are important? I got tired of them this weekend, and examined one more closely.
There wasn't any indication of what it had been part of, or what it
was for, but it did have the marking And the result was instantaneous and unequivocal: it belongs to my refrigerator. Specifically, it goes in the back of the freezer compartment to keep food from falling down into the back and blocking the drainage path. Truly, we live in an age of marvels. [Other articles in category /misc] permanent link Sun, 03 Nov 2019I suddenly wondered: was Andy Warhol ever a TV show guest star? So I asked the Goog, and the answer was better than I could have imagined: in October 1985, Andy Warhol was a guest star on The Love Boat. According to Wikipedia, one of the subpots of the episode was “a woman avoids Warhol, wanting to forget the time she was in one of his movies.” That is a lot more plausible than many Love Boat plots! Also starring in that episode were Milton Berle, Tom Bosley and Marion Ross, Andy Griffith, and Cloris Leachman. TV Guide named it one of the hundred greatest episodes of any TV show ever. Wow. [Other articles in category /misc] permanent link |