400 Foundations of Semantic Web Technologies
We now assign to each of the squares a variable name, say from ?F11 to
?F44. Finally, we nee d to formulate all conditions which constrain p ossible
solutions:
• Every variable gets assigned one of the allowed numbers.
• Variables standing for table slots which are already filled in must get
the corresponding value assigned.
• No two variables within the same row get assigned the same value.
• No two variables within the same column get assigned the same value.
• No two variables within the same marked 2 × 2 square get ass igned the
same value.
A possible solution now looks as follows.
PREFIX ex: <http://example.org/>
SELECT ?F11 ?F12 ?F13 ?F14
?F21 ?F22 ?F23 ?F24
?F31 ?F32 ?F33 ?F34
?F41 ?F42 ?F43 ?F44
WHERE
{