Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In Dijkstra's paper "Humble Programmer", he mentions that he gave some volunteers a problem to solve:

“I have run a little programming experiment with really experienced volunteers, but something quite unintended and quite unexpected turned up. None of my volunteers found the obvious and most elegant solution. Upon closer analysis this turned out to have a common source: their notion of repetition was so tightly connected to the idea of an associated controlled variable to be stepped up, that they were mentally blocked from seeing the obvious. Their solutions were less efficient, needlessly hard to understand, and it took them a very long time to find them.”

What was the problem Dijkstra gave to the volunteers? What were the solutions?

share|improve this question
3  
I'd bet on something recursive. EWD654 "In honor of Fibonacci" seems to be a good candidate –  gnat Oct 11 '11 at 21:04
    
This question could be fine as long as people don't use this as an opportunity to guess or speculate: it may be difficult to find out, but it has an answer and historical questions are on-topic here. –  user8 Oct 14 '11 at 19:12
9  
That quote came from EWD340 "Very Humble Programmers". I wasn't able to find an exact description of what the experiment was, but here is a link to the transcript of his full talk. cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html –  Tyler Ferraro Oct 15 '11 at 2:43
1  
Can anyone find a Dijkstra quote which is complimentary about anything? My favorite quote about him is "arrogance in computer science is measured in nano-Dijkstras" -- Alan Kay –  James Anderson Oct 25 '11 at 6:21
    
We must be very careful when we give advice to younger people: sometimes they follow it! ... heh :-) source : en.wikiquote.org/wiki/Edsger_W._Dijkstra –  Robert French Oct 26 '11 at 23:03

1 Answer 1

The "Dining philosophers problem" was the problem presented.

Basically there are 5 philosophers that need to eat. (imagine a plate of never ending food in front of each philosopher), between each plate is a fork (5 plates, 5 forks, 5 philosophers).

A philosopher can only eat if he is holding both the fork to the right and the fork to the left. (only two philosophers can eat at any given time).

A fork may be picked up anytime it is available and put down if it is being held. Each fork must be picked up interdependently. (one at a time).

While a philosopher is not eating, they are thinking (the need to alternate states is what drives the problem).

How do you allow each of them to eat and alternate thinking (so the others can eat) without creating a deadlocked system (where one philosopher is holding one fork and waiting for the other, preventing another philosopher from eating).

This has its roots in concurrent systems and is a typical university question presented when discussing Concurrency.

I believe that 4 or 5 "official" algorithms have been developed to solve the problem but a quick search on google for "Dining philosophers problem" will get you a vareity of results.

If you read the original version of the paper in the footnotes on page 866 it states: "Proceedings of the IFIP Congress 1965, 213-217. " Solutions of a problem in concurrent programming control."

The problem in concurrency and shared resources is the "Dining Philosophers Problem". :-)

Hope that helps.

share|improve this answer
5  
Since this is mainly a historical question, any sources? –  Yannis Rizos Oct 26 '11 at 21:48
1  
Actually no, the sources you provide don't seem to reference the Dining philosophers problem as the one Dijkstra gave to the volunteers. Am I missing something? What I'm looking for is credible sources to support your The "Dining philosophers problem" was the problem presented claim, not descriptions of the problem itself (although your links are highly informative and interesting). –  Yannis Rizos Oct 26 '11 at 23:10
    
@Robert Thanks for the links. :) (don't remove them, they might be useful to others) I am looking forward whether it was the problem he gave. –  user712092 Oct 26 '11 at 23:18
4  
@RobertFrench What we are looking for is what was the specific problem Dijkstra mentions in the quote in the question, and sources that prove it, not just any problem Dijkstra formulated. There is nothing in the quote that even suggests it was one of his own problems, it could be any problem really. Of course the Dining philosophers is one of Dijkstra's originals (with some help from CAR Hoare), noone is debating that, but that has nothing to do with the question. –  Yannis Rizos Oct 26 '11 at 23:48
4  
This is just plain wrong. "Solutions of a problem in concurrent programming control" is the Dining Philosophers Problem, and it is referenced in the Humble Programmer as one of Dijkstra's earlier works in the citation, but claiming that it's also the problem in the quote is unverifiable. –  Yannis Rizos Oct 27 '11 at 14:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.