Talk:Zebra puzzle: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
== FormulaOne == |
== 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: |
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 |
// 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. |
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 (to be added on the Content Page). |