An Exciting Puzzle (Updated Sun 7/31)

Update Sept 3: Solution (to original version) is here

Update 7/31: The solution to this puzzle requires not much math at all, if you think about it the right way. I’m tempted to only award beer if someone gets the more complex version (at the end of post–that one also requires only minimal math), but I’ll stick to my word instead.

——————————————————————

I went running in the park today, and thought of the following puzzle: suppose you are going running in the park, and that there is one loop-shaped running path which you will run along for a total of 30 minutes. You have a friend who will be running along the loop for exactly the same 30 minutes as you (i.e. you start and end at the same time), and at exactly the same speed as you.

You have no idea where your friend will start his or her run along the loop, nor do you know what direction your friend will run in (clockwise our counterclockwise) but you do know that your friend will run in a single direction for the entire 30 minutes.

You want to maximize the probability that you will run into your friend while running. All that you have control over is which direction you are running in at any point in time along your run. So one possibile course of action is to run in one direction for the entire 30 minutes (either clockwise or counter). Another is to run in one direction for a certain period of time, and then (assuming you haven’t met) switch directions and finish the run in the other direction. Or you can switch directions multiple times, each after specified period of time.

So, what is the optimal course of action in order to maximize the probability of meeting? If there are multiple courses of action that give the equivalent, maximal, probability, what are they? The answer may depend on how much of the loop you cover in 30 minutes (but assume that you cover less than half the full loop–otherwise you can clearly guarantee a meeting)*. Assume that you are very nearsighted, so you only see your friend when you are actually crossing paths. And remember that you and your friend travel at the same speed, and you have no control over, or knowledge of, where you start in relation to your friend, or the direction of his/her run.

I will buy, for the first person who can solve this puzzle (i.e. give an answer and prove it), 2 beers at a bar.

For those of you who don’t like getting too deep into the weeds with puzzles like this: can you make any statements generally about the strategy you should employ (no beer awarded for such statements)?

More complex version: Modify the puzzle by specifying that you and your friend don’t travel at the same speed, but rather that the ratio of your speed to your friend’s speed is X.

*edited 7/31. if solution is provided based on original language, it’s ok as far as the beer award is concerned.

Posted in Uncategorized | Tagged , | 23 Comments

Illegality of Blackmail (a test)

I’ve finished Leo Katz’s book. The basic question of the book is “Why is blackmail illegal?” It seems odd that it is illegal — so odd that lawyers have coined the term “The Paradox of Blackmail.” Consider the standard case: I ask you to give me $20,000, and say that if you refuse, I will reveal your infidelities to your wife. It is odd that this is illegal because, each of the things I’ve done, in isolation, is legal: I am allowed to ask you for $20,000, and I am allowed to reveal your infidelities to your wife. Shouldn’t you, as the victim, prefer that I give you the option to prevent me from revealing your infidelities (for a cost), rather than just doing so without your permission? How can you be more wronged by act A (blackmail) which is identical to act B (revealing infidelities) except that act A gives you additional optionality?

I won’t tell you exactly what Katz’s explanation was. I’ll make it more fun by telling you the hypothetical situation which he thinks can be used to show why blackmail is wrong, and then you can try to determine on your own how the situation can be used to explain away the Paradox of Blackmail. The situation is: a burglar enters a person’s house, and finds a safe. He awakens the homeowner and demands the combination to the safe. The homeowner says he won’t give it; the safe has jewelry which, although cheap, has great sentimental value. The burglar says “Tell me the combination, or I’ll make you regret it.” The homeowner replies “Much as I fear physical violence, I’d rather you give me the savage beating than give up what’s inside that safe.” The burglar says “As you wish,” and severely beats up the homeowner. Katz also asks us to a version of this hypothetical where the burglar, in the course of interacting with the homeowner, actually finds a piece of paper with the safe combination, and ignores the homeowners wish to be beaten up rather than burglarized, instead taking the contents of the safe.

Katz thinks that the Paradox of Blackmail can be resolved by considering these 2 hypotheticals, and in particular by considering how the courts would treat the perpetrator of the first crime (who assaulted the homeowner) vs. the perpetrator of the 2nd crime (who followed through with the burglary).

Do you see why Katz thinks that? Do you agree?

Posted in Uncategorized | Tagged , , , , , | 4 Comments

Tea Partiers and Debt Ceiling: the Silver Lining

Some Republicans, including presidential candidate Michele Bachmann, say we should not raise the debt ceiling. Most others (including me) disagree: they believe that Timmy Geithner is telling the truth when he says we’d face a disaster if we failed to raise the ceiling. However, even those of us who believe Geithner should not fail to see that there would be one good thing to come out of a failure to raise the ceiling: it would present us with a rare case in politics where a politician’s prediction can be proved totally wrong only days after the prediction is made. Either sharply higher interest rates and general chaos would prove the tea-partiers totally wrong, or a cool and calm August 3rd would prove the rest of us wrong. Usually in politics, predictions are made about events that are far enough in the future that a) factors could change so much by the time the event occurs that the politicians can make effective excuses and b) the politicians could be out of office and not care anymore by the time the future event occurs. In this precious case, there would be total accountability for incorrect predictions.

Of course, if the tea partiers were proved wrong, they would make excuses. I predict they’d blame the Democrats for creating a self-fulfilling prophesy by emphasizing the potential dire consequences of a failure before the fact (“the only reason interest rates rose is that the Democrats’ spent so much time fearmongering!”). Another possibility is that they’d blame the market participants themselves (i.e. buyers of U.S. Treasuries and other financial instruments) for reacting irrationally, but that would be a dumber strategy.

If I were proved wrong, I’d blame Geithner for lying. Still, though, my credibility would take a deserved hit.

Posted in Uncategorized | Tagged , , | 2 Comments

Independent of what?

Glenn Greenwald attacks the “establishment” media outlet MSNBC for creating a corporate culture that forces its reporters to engage in “self-censorship” aimed at at avoiding any reporting that runs counter to the interest of the corporation. (What is “self-censorship?” The act of forcing oneself to say something that is consistent with one’s own self-interest? It certainly would be interesting to find someone who did not engage in this as a matter of standard procedure.)

Greenwald approvingly quotes from an exchange between Bill Moyers and Rachel Maddow in which they fawningly describe the independence of the Guardian newspaper in London:

The journalists who have been dogging this story for the last six years worked for “The Guardian,” which is one of the great newspapers in the western world. “The Guardian” is run by a trust —

MADDOW: Public trust.

MOYERS: — a public trust, set up by the founding family to make sure that “The Guardian” would always be commercially and editorially independent.

Wouldn’t you have liked to have been in the editorial room at “The Guardian,” when they decide — they knew what they had — they had the evidence, they would not have gone this way if they had not had the evidence. And they knew they were taking on the most powerful media baron in the world, the Berlusconi of England and the United States, but they did it because they were independent.

We have been reminded that in the end, democracy depends upon maybe even just a few independent voices, free of any party or commercial allegiance.

The Guardian is run by a “public trust”! Moyers and Maddow’s excitement over this fact makes you wonder whether they think that this means that the Guardian is not run by people: greedy, biased, misinformed, and sloppy people, just like the rest of us. Only the belief that the Guardian is not run by members of that species—combined with ignorance of the Guardian‘s reliance “on cross-subsidisation from profitable companies within the [media] group, including Auto Trader”—could justify Moyers’ idiotically repeated claim that the Guardian is “independent.”

I confess to having no idea what the term “public trust” means, although I am somewhat surprised to find that it can be used to describe an organization whose objective is:

To secure the financial and editorial independence of The Guardian in perpetuity: as a quality national newspaper without party affiliation; remaining faithful to liberal tradition; as a profit-seeking enterprise managed in an efficient and cost-effective manner.

Apparently, if you want to call your organization a “public trust,” you don’t even have to pretend not to be profit-seeking. Nor do you have to hide the fact that you are “faithful to liberal tradition.” Liberals will argue that this use of the term “liberal” is not used in a partisan sense, but rather that it is meant to convey an affinity for freethinking. Even so, fundamentalist Jews, Christians, and Muslims would argue that liberalism, even in this sense, constitutes a type of “allegiance,” one that they do not adhere to. And they would be correct, no matter what you think about their religious beliefs.

Given the Guardian‘s profit-seeking nature (and its reliance on transfer payments from Auto Trader), one really has to wonder what the Guardian is so laudably independent of.

But more importantly, what, in Glenn Greenwald and Bill Moyers’ world, should a media outfit be independent of in order to be considered reliable? Advertising? Paid consumers of any kind? Must a media outlet be funded purely by the owner’s own trust fund, with no revenue at all, to be credible?

In my opinion, the most important thing to do in order to determine whether an account is biased is to try to determine whether the person relaying the account is biased (or rather, how biased; probably everyone is biased somewhat). To make that determination would require learning quite a bit about the person, much more than could be determined by reading his employer’s Compliance procedures, or even its mission statement. Knowledge that the person works for an organization that calls itself a “public trust” gets you nowhere.

To secure the financial and editorial independence of The Guardian in perpetuity: as a quality national newspaper without party affiliation; remaining faithful to liberal tradition; as a profit-seeking enterprise managed in an efficient and cost-effective manner.
Posted in Uncategorized | Leave a comment

Bill Clinton Wrong on 14th Amendment

Bill Clinton says he’d solve the debt ceiling problem by invoking the 14th amendment (which establishes that the “validity of the public debt… cannot be questioned”) the U.S. from defaulting if an agreement couldn’t be reached: “‘I think the Constitution is clear and I think this idea that the Congress gets to vote twice on whether to pay for [expenditures] it has appropriated is crazy.'”

Clinton makes 2 separate claims here: 1) that the Constitution is clear (presumably he means clear in its agreement with his position) and 2) that it would be “crazy” if he were wrong anyway.

Clinton is wrong for the reason Lawrence Tribe noted a couple of weeks ago (and David Frum noted before him):

In theory, Congress could pay debts not only by borrowing more money, but also by exercising its powers to impose taxes, to coin money or to sell federal property. If the president could usurp the congressional power to borrow, what would stop him from taking over all these other powers, as well?

Obviously the president cannot say “oops, it looks like we have bought more stuff than we can afford, I’m just going to bypass congress and impose new taxes to pay for the stuff.” Why, then, does Clinton think the president can bypass Congress to borrow more money to achieve the same purpose? My guess is that the 2nd reason he cited (that it would be “crazy” if he were wrong) is clouding his ability to see that his 1st reason (the only substantive one) is bogus.

Posted in Uncategorized | Tagged , , | Leave a comment

Typing Puzzle (Updated Thurs July 21)

Note: This is reposted due to my update with a hint and solution, and due to the (relatively) low quality of my post about politicians and animals.

John Derbyshire has posted is a puzzle that I’ve never come across before, which I think ranks in my top 20 all time favorites:

For this month’s puzzle you will need to be in Microsoft Word or some other app — Notepad, for example — that uses standard editing keys.

I shall use the word “keystroke” to mean one of the following:

● a (i.e. you just hit the letter “a” on your keyboard)

● Ctrl-a (which does “select all” on whatever text is in your document)

● Ctrl-c (copy selected text to clipboard)

● Ctrl-v (paste selected text from clipboard to cursor location in document)

Starting from a blank document you execute N keystrokes (as defined). What is the maximum number of a’s you could end up with?

Note (added July 18): Assume that you can “deselect” text without using up any keystrokes. Thanks to commenter A for raising this issue.

I believe I have the answer, but it is not totally satisfying for 2 reasons: 1) I haven’t actually proven it and 2) Another reason which I won’t describe since it might serve as a hint (and it is not as important a reason as 1 anyway).

Feel free to post a solution in the comments if you’d like.

Update Thurs 6pm (SPOILER – DON’T READ IF YOU DON’T WANT A HINT):

First, a hint: If you type a sequence consisting of x1 “a”s, followed by a select and copy, then x2 “v”s, then a select and copy, then x3 “v”‘s, and so on, how many “a”‘s will be on the page?

———————————————————————————————————

Now, here is my answer (this method actually is not directly related to the hint at all, although you can solve the problem using an alternative method that is based on the hint). Let me know by in comments or by email if you think I’m wrong.

Update July 20: The closed form answer, for N = 11 or more, is f(N) = 4^(floor(N/5)+1)*(3/4)^(N-Nmod5)

where floor(x) gives the highest integer less than or equal to x, and where Nmod5 is N modulus 5.

This answer can be seen to be correct if you run the code I’ve posted below (typing2.txt) and look at the pattern.

An alternative way to the answer is to use the hint i’ve posted above, see that the # of a’s is equal to G = x1*(x2+1)*…*(xk+1) and also see that the # of strokes you’ve used is N = x1+x2+…+xk+2*(k-1)

Then, maximize G subject to N, and you’ll get the answer I believe. I did not actually do this though.

(explanation of recursive method, pre-July 20 update): My answer is expressed as a recursive relation as follows, where f(x) represents the # of letters you can type with N keystrokes:

f(N) = N if N < 7

otherwise:

f(N) = max{f(a)*f(b)}[where the max is taken over all combinations of positive integers a and b that satisfy the relation a+b = N-1]

The logic is that for any # of keystrokes N, you will generate b* groups of a* keystrokes, where b* and a* are integers. This is done by:

1) Generating a* keystrokes

2) Typing control-a, then control-c

3) Generating b* – 1 more groups of a* keystrokes (so there will be b* total, including the one from step 1)

Assume it takes a keystrokes to accomplish step 1, and b-1 keystrokes to accomplish step 3. Then a total of a+b+1 keystrokes are used. So to get f(N), we take the max over all combinations of a and b where a+b=N-1.

Enclosed is some Python code that generates the results using this method (all macs have Python):
typing.txt

Update (July 18): Here’s some more efficient (although less cool) code that generates the results, including representations of the actual sequences of keystrokes. 1st column is # of keystrokes, 2nd is # of a’s you can get, and 3rd is representation of keystroke sequence – the representations are sequences of numbers, each of which represents the # of pastes you should use prior to the next select/copy sequence (or, in the case of the very beginning, the # of “a” keystrokes prior to the first select/copy sequence)
typing2.txt

Update (July 21): Here’s the code if we assume that you are not allowed to deselect text for free, i.e. if, every time you paste, you have to paste over what you’ve currently got. Representation (3rd column) uses same convention as described above.
typing3.txt

Posted in Uncategorized | Tagged , | 3 Comments

Is what a politician does with his animals his own business?

Some people (for convenience, I’ll use the word “liberals” to refer to those people) argued in the wake of the Weiner scandal that politicians’ personal lives should not be our concern. They can’t really believe that, though.

Suppose a politician is found to have murdered his wife rather than simply cheated on her. The politician’s act of murder is part of his personal life rather than his political life — would liberals encourage us to ignore the act of murder when deciding whether to vote for the politician?

Maybe liberals would argue that murder, since it is a criminal act, is a sort of “public” act since it forces the politician to be engaged with by the state, and thus it is of public concern. That argument can easily be refuted by considering a case where the politician, instead of murdering his wife, took to the high seas in an unflagged sailboat with a bunch of animals and tortured the animals to death. In this case, since the animals cannot file suit (both because they are animals and because they are dead), and since the act took place outside of U.S. jurisdiction, there would (I believe) be no engagement of the politician by the state. This act of torture would truly reside firmly in the politician’s personal life. Would liberals encourage us to ignore the torture when deciding whether to vote for the politician?

No. When liberals say “ignore a politician’s personal life,” what they really mean is “ignore a politician’s marital life.”

And, lastly: some people argue that since Anthony Weiner “wasn’t a hypocrite” with regard to his marital infidelity, we shouldn’t be as harsh on him as we are on, say, Republican lawmakers who both preach family values and are found to have cheated on their wives. This argument is totally bogus for 2 reasons: 1) Most politicians preach honesty; thus, when they cheat on their wives and then lie to the press, they are being hypocritical with respect to the action of being honest. And 2) Who decided that hypocrisy is the big-ticket sin anyway (rather than, say, plain old dishonesty)?

Posted in Uncategorized | Tagged , , , , | 6 Comments

Matthew Yglesias on Paul Ryan’s Taste for Wine

Matthew Yglesias has an interesting post about why Paul Ryan’s recent sipping of expensive wine actually can be related to a substantive policy issue. Yglesias’ argument is as follows (I critique the argument below the summary):

————————

1. Paul Ryan wants to enhance the welfare of the wealthy by giving them tax cuts at the expense of the least fortunate.

2.  The wealthy do a lot of their spending on “supply-constrained commodities,” i.e. commodities such as expensive wine and beachfront property. When the wealthy get extra money in their pockets, they will continue to spend it on these commodities.

3. When the wealthy spend more money on supply-constrained commodities, they don’t actually get more of them (since they’re supply-constrained). Instead the main consequence is that these commodities get more expensive (Yglesias says, “If you move to Hollywood and become a rich movie star, you’ll suddenly be able to buy beachfront property in Malibu. But if movie stars as a whole get richer, this doesn’t change the fact that there’s only so much beach in Malibu. All that happens is it gets more expensive.”)

4. Tax cuts for the rich, while not expected to help the wealthy very much, will hurt the middle class as a result of the increased prices:

But the same token, if every rich Manhattanite gets a tax cut from Paul Ryan there will be some increased overall consumption by rich Manhattanites. But you may find that there’s surprisingly little. You’re going to see an awful lot of bidding up of the price of supply-constrained commodities. Suddenly, the same bottle of wine is selling for $425. The main real world consequence of this is going to be to make it more difficult for middle class families to engage in the occasional splurge purchase. Like most people, I every once in a while go out and do something expensive that someone richer than me might do frequently. If the rich people all get richer, then they’ll bid up the price of those rich guys activities and put them further out of the reach of the middle class.

————————

It seems to me that the flaw in Yglesias’ argument is that the “surprisingly little” modifier he uses to describe how much more consumption rich Manhattanites will get to engage in (due to tax cuts) must just as accurately describe how much less consumption (“occasional” to begin with) middle-class people will get to engage in1. Yglesias has chosen to restrict the discussion to “supply-constrained” commodities. Then he conveniently ignores the fact that that restriction guarantees the zero-sum nature of the tradeoff between the rich and the non-rich. And this is quite an important fact to ignore, given that the entire point of the post seems to be that the tradeoff is not zero-sum.

 

1I suppose it’s not up to me (nor to Yglesias) to decide how “surprising” each of these changes in consumption is, but the important point is that the actual magnitudes of these changes must be equal (and opposite).

Posted in Uncategorized | Tagged , , , | Leave a comment

Quick Blackmail / Hostage situation update

Paul Krugman says:

Think about it. There’s a significant chance that failing to raise the debt limit could provoke a renewed financial crisis — and Republicans would rather take that chance than allow a reduction in tax breaks on corporate jets.

The rationale is that one of the issues being debated by Republicans and Democrats is whether to alter the tax treatment of corporate jets in the bill that raises the debt limit – Republicans are presumably threatening to not vote for a bill that does contain such an alteration, while Democrats are presumably threatening to not vote for a bill that does not contain such an alteration.

I’ll just point out the symmetry that Krugman is failing to see (or at least mention). He could just as well have written:

Think about it. There’s a significant chance that failing to raise the debt limit could provoke a renewed financial crisis — and Democrats would rather take that chance than allow there to continue to be tax breaks on corporate jets.

Krugman then accuses Republicans of blackmail. Before I says who I think is blackmailing whom (if anyone), I’m going to finish Leo Katz’s book.

One quick point, though: unlike the last time Krugman accused Republicans of being hostage-takers because they demanded tax cuts for the wealthy in order to extend tax cuts for the middle-class, in this case, it is the Republicans who are advocating for the status quo (i.e. no change to the tax code as it relates to corporate jets), and the Democrats who are demanding a change. So if the critical determinant of which party is the hostage-taker / blackmailer is which side is demanding a change (i.e. if that party which demands a change to the status quo in order to vote for something that both sides agree is necessary should be deemed the hostage-taker / blackmailer), it was Republicans last time and Democrats this time. Thus Krugman would be 1 for 2.

Posted in Uncategorized | Tagged , , , | 18 Comments

Military Planners OUT at The New York Times!

From the New York Times editorial yesterday, opining on Obama’s speech about Afghanistan troop withdrawal plans:

He said that 10,000 of the 33,000 troops from the “surge” would come home before the end of this year, with the rest out by next summer. He vowed that reductions would continue “at a steady pace” after that, and that “the Afghan people will be responsible for their own security” by sometime in 2014.

We are not military planners, so we won’t play the too big/too small numbers game.

Where did the military planners go?!? They were definitely still there as of 7 years ago (from November 2004 editorial):

So if Mr. Bush intends to keep American troops in Iraq until his stated aims are achieved, he must face up to the compelling need to increase their strength, and to commit the resources needed to give present policies at least some chance of success. That would require a minimum of two additional combat divisions, or nearly 40,000 more American troops, beyond the just over 140,000 currently planned for the Iraqi election period.

The cynical interpretation is that the New York Times editorial board fired its military planners when Obama took office, figuring they’d no longer be necessary now that the best military planner of them all is the Commander-in-Chief. A more generous interpretation is that they just resigned.

Unfortunately for us readers, the lack of military planners makes for much less interesting editorials – now all the editorial board can muster is a critique of the speech Obama made (it was too short!, they complained), rather than a critique of the strategy outlined in the speech.

I certainly hope the editorial board’s health care planners, immigration planners, and tax planners manage to keep their jobs, otherwise the editorial board soon won’t be able to express opinions about anything anymore!

Posted in Uncategorized | Tagged , , , | 2 Comments