Jump to content

Talk:Zebra puzzle: Difference between revisions

no edit summary
No edit summary
Line 1:
== Who has the zebra, indeed? ==
f
 
Firstly, I can't find a solution as stated. The closed I got sastified all but one condition. It could be logic error on my part, but it would help if a list of all properties of all house as solved can be listed here for doublechecking.
: This is an old problem and I've done it by hand. The version I recall was identical except that the missing pet was fish. I had started some time ago to write a task for this as an elaboration of the Dinesman solution and then I put it aside and forgot it - oh well. So I suspect you've missed something. If I recall when I did it by hand I used a matrix to solve it. --[[User:Dgamey|Dgamey]] 04:31, 5 December 2011 (UTC)
Line 19:
The C# code has lines 190+ chars long. -- [[User:Bearophile|Bearophile]] 18:52, 31 May 2012
:I added the "lines too long" template to the C# code. [[User:Dchapes|Dchapes]] ([[User talk:Dchapes|talk]]) 18:31, 2 August 2014 (UTC)
 
== FormulaOne ==
A new addition, but an effective one. A typical characteristic of FormulaOne is the ease with which one can transpose the literal (English) text of the constraints into code:
// The Englishman lives in the red house and the Swede has a dog and the Dane drinks tea
houseColour(Englishman) = Red & pet(Swede) = Dog & drinks(Dane) = Tea
Not many (?) languages know this ease of coding. This is chiefly due to the implementation in FormulaOne of the (mathematical) injection -- represented by an indexed array with distinctive elements, the use of relations, and the use of unknown indices. Cf. Example 2.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.