Talk:Dinesman's multiple-dwelling problem

Why stated like that?

Remember those maths essay problems from school? Remember your teacher saying "It's not just getting the right answer that is important - it's how you got to it that gets the full marks"? Well this, I hope, is that kind of problem.
The idea is for examples to be able to vary names, numbers, constraints; and for the example's problem statement and answers to be easy to recognise from the task's problem description (or variants of).
If someone wants to implement natural language processing, be my guest. If someone wants to use a syntax more familiar to constraint programmers then that can be done too, (but think of the likely audience). --Paddy3118 08:37, 25 June 2011 (UTC)

This is one of the few tasks that I have set where I don't have a canned answer in Python before setting the task. Well, not really; Pythons solution in Amb#Python is easilly adapted. --Paddy3118 08:42, 25 June 2011 (UTC)

Heh there's no way to reliably parse English text, unless the text is restricted to be following some syntax rules. The question is rather, are you more interested in seeing how people provide methods for flexible input, or how people solve the dwelling problem? Which is the emphasis of this task? --Ledrug 08:46, 25 June 2011 (UTC)
I thought finding a solution is no problem - brute force it if you must. The emphasis should be on stating the problem and presenting the resultw.r.t. the problem as stated. I tried to give hints that parsing the text of the problem statement allowing for variability, as well as stating what that variability is, is an avenue one might want to follow. The right answer is expected. How you get to it is very important. --Paddy3118 17:20, 25 June 2011 (UTC)


About the python solution: parsing natural language is FUTILE unless you specify a clear subset of English language you are going to use. Is your program able to parse "A lives somewhere below B"? Or "A's floor is no higher than 4"? Or if one of the characters involved is in fact named "Mr. Floor?" I don't think one should go on writing a parser without a clear spec of what text might be involved. --Ledrug 00:47, 26 June 2011 (UTC)
Hmm futile? I think not. But I did recognise a need to state the extent of the language recognised but chose, out of expediency, to instead state some of the variations allowed and give a single extra example. The type of variation allowed and showed in the Python example, such as not relying on fixed names is more than that shown in some other examples. --Paddy3118 01:13, 26 June 2011 (UTC)
A proper task needs to specify what's allowed and what's not in the input text. The "variation" the python script can cope with are really not much variation at all, consider "Fletcher lives on a floor not adjacent to Miller's, but rather Smith's". Parse that, just the name part, then consider how many other ways that can be expressed in. Writing a parser for a known string isn't really all that useful --
And we haven't gotten to the part of optimizing the code itself yet: what happens when there are twenty tenents? J code runs out of memory, every other one takes eaons to complete, if at all. But that's another can of worms. --Ledrug 01:26, 26 June 2011 (UTC)
Re-read my first submission on this talk page, written before your C example. It is the very nature of this task to permit "artistic license" and to encourage, but not limit the solutions to examples that parse the problem statement - that is why it is mentioned both here and in the task statement. The task asks for allowing some variation and to show how "easy" it is to vary.
I too found it difficult, at first, to give much more than the right answer to maths essay problems. --Paddy3118 06:10, 26 June 2011 (UTC)
Maybe it's just me failing to understand why anyone would want to write a program that can only deal with some text already known, and can't be reasonably expected to work on much of anything else with a similar nature--kind of defeating the purpose of programming. But if you find it fun, good for you. --Ledrug 06:26, 26 June 2011 (UTC)
Return to "Dinesman's multiple-dwelling problem" page.