David Brooks seems to make a logical error

David Brooks, in his latest column, says of Obama’s decision to wage war in Libya, “President Obama took this decision, I’m told, fully aware that there was no political upside while there were enormous political risks.”

Obama couldn’t have possibly been “aware” that there was no political upside. There was at least one political upside: Brooks, who is NYTimes’ token “conservative” columnist, is a full-throated supporter of Obama’s action, as he reveals in the rest of his column.

(Any time someone praises a politician for making a decision without regard for the political consequences, we should suspect that the politician made the decision partially because he expected to be praised for having made a decision without regard for the political consequences. But there is an additional reason in this case: the person praising the politician is not only praising him for making a decision without regards for political consequences, he is also praising him on the substance.)

Posted in Uncategorized | Tagged | 1 Comment

A Puzzle about the Halting Problem

(updated at end)

I was reading about the halting problem recently, and in trying to understand it, I thought of a question that I can’t figure out the answer to (it is one of these cases where it feels like I am thinking myself into a knot). I am hoping one of my readers can answer the question for me. First, a little background on the halting problem:

The halting problem is the problem of determining whether, for a particular computer program (X), and a particular input to that computer program (Y), the program will ever “halt” (finish computing) or, alternatively, whether it will run forever (an example of a computer program that runs forever is: (while(TRUE) print “still going”).

(In all of the below, “halt” and “stop” mean the same thing: just that the computer program finishes computing in finite time.)

Alan Turing proved that the halting problem is not computable, i.e. that no computer program can take, as inputs, program X and input (to program X) Y, and determine whether X will halt.

Wikipedia summarizes the proof here, and Craig Kaplan summarizes it here.

Here is my quick summary (I am mostly using Craig’s line of reasoning, although Wikipedia’s is equivalent):

*******

Suppose you make a program called A, which takes program X and input Y, and which solves the halting problem, i.e. which tells you whether X would stop with an input of Y (it outputs TRUE if yes, FALSE if no). Note that X and Y are input to A as strings, and that X can take any string as an input. Construct a new program B, which takes one input, X, and is defined as: B(X)=A(X,X). That means that B tells you whether the program X would terminate if the input to X were the text of the program X itself (since X can take any string as an input, it can take the string representing itself as an input).

Now make a program C which takes 1 input, X, and is designed as follows:

if B(X) = TRUE then C just loops forever; if B(X) = FALSE then C outputs TRUE and halts.

The contradiction is as follows: Suppose you run C(C). If C(C) runs forever, the interpretation is that B(C)=TRUE, which means that A(C,C) = TRUE, which means that C, if run on itself, would stop. That sentence can be shortened into “If C(C) runs forever, C(C) would stop.” Conversely, if C(C) gives TRUE and halts, the interpretation is that B(C)= FALSE, which means that A(C,C) = FALSE, which means that C, if run on itself, would not stop. That sentence can be shortened into “if C(C) halts, then C(C) would not halt.” Notice that C(C) can neither run forever, nor stop, without a contradiction. Thus there can be no program A that gives TRUE if X halts with input Y, and gives FALSE if it does not halt.

*******

Suppose we tweak the programs A, B, and C above, and defined slightly different programs A’, B’, and C’. Program A’ is defined not such that it gives TRUE if X halts on Y and FALSE otherwise, but such that it gives TRUE if X halts on Y within 5 seconds and gives FALSE if X either a) halts after more than 5 seconds or b) never halts.

Note that, unlike the original halting problem solver A, we actually can create this program A’ – it would simply be coded to actually run program X with Y as an input and wait 5 seconds. If X halted within that timeframe, A’ should output TRUE, if not, FALSE. (If you tried to create A to simply run X with input Y, you could potentially wait forever, but you’d never know that you’d be waiting forever, so it doesn’t work.)

Given this tweaked version of A, A’, what would be the interpretation of C’, which is defined to be an analogy to C?

In order to get B’ and C’, we just tweak the above discussion slightly so that B’ and C’ are defined in terms of A’, which tells you whether the program “halts within 5 seconds” rather than whether it “halts” (ever): B'(X) (= A'(X,X)) gives TRUE  if X halts on itself within 5 seconds, and FALSE otherwise. C'(X) runs forever if B'(X) gives TRUE, and outputs TRUE and halts (though not necessarily in 5 seconds) if B'(X) gives FALSE. Then, consider 3 possibilities: 1) If C'(C’) runs forever, the interpretation is that B'(C’) gives TRUE, which means that C’, if run on itself, would halt within 5 seconds (a contradiction). 2) If C'(C’) stops within 5 seconds, the interpretation is that B'(C’) gives FALSE, which means that C’, if run on itself, would not halt within 5 seconds. 3) If C'(C’) stops, but after 5 seconds, the interpretation is also that B'(C’) gives FALSE (C’ is not guaranteed to stop within 5 seconds if B’ gives FALSE), and thus C’, if run on itself, would not stop within 5 seconds (not a contradiction!).

Note that the only non-contradiction is possibility 3. Does that mean that C'(C’) must halt, but after 5 seconds elapse?

That would seem like an odd constraint for a computer program – how could we know that a computer program with a given specification should definitely halt, but not in less than 5 seconds? As we get faster and faster computers, 5 seconds gets you more and more, and it simply can’t be that we could say now that a given computer program, which halts, will never halt in < 5 seconds.

There seems to be a flaw in my reasoning. Where is it?

UPDATE (March 31): My friend Mark Mixer has pointed out my point of confusion. In order to allow my readers the pleasure of figuring out where I went wrong for themselves, and in order not to embarrass myself too much, I’ll leave it at that.

Posted in Uncategorized | Tagged , , | Leave a comment

What makes established religions so special?

The Justice Dept. is intervening in a case of a Muslim teacher outside Chicago who quit her job because her school would not let her take 3 weeks off at the end of the semester to go to Mecca. The story is here.

The suit argued that the district violated the Civil Rights Act by failing to accommodate Khan’s religious beliefs. By “compelling” Khan to choose between her job and religion, the lawsuit says, the district forced her discharge. The government is seeking back pay, damages and reinstatement for Khan, and a court order requiring Berkeley schools to find ways to accommodate religious practices.

By forbidding the school from compelling Khan to choose between her job and her religious belief, the Justice Department is compelling people like me (atheists) to choose between the worldview we have (materialism) and the worldview which we’d need to fake (theism) in order to get a 3 week leave of absence.

But maybe the Justice Department only rewards true believers – would they back me up if I took 3 weeks off to go on a pilgrimage to Bethlehem with my Church, but then found me estranged from my Church group and drinking in bar in Las Vegas after 2.5 weeks?

Posted in Uncategorized | Tagged , | 8 Comments

First Question

Why doesn’t the forcing of Wisconsin’s public employees to join the union violate (in spirit) Article 20, point 2 of the UN’s Universal Declaration of Human Rights, “No one may be compelled to belong to an association”?

You could argue that no one has to be a public employee. However, Article 20.2 seems pretty weak if a simple loophole is for the government to define broad classes of people (e.g. public employees) who are compelled to belong to a separate association, rather than to compel all people to do so.

Posted in Uncategorized | Tagged | 5 Comments