Questions tagged [zebra-puzzle]

A Zebra-puzzle is a combinatorial logic puzzle. Also known as Einstein's riddle, Caliban's problem, Five Houses Puzzle.

A Zebra-puzzle is a combinatorial logic puzzle. Also known as Einstein's riddle, Caliban's problem, Five Houses Puzzle.

112 questions
-1
votes
1 answer

BigQuery calculation to count how many unique combinations of 4 items there are across 6 columns

I have the following table (I have covered up the current_holder column for privacy reasons): For each row, I want to find the number of times we could pull 4 unique objects out of a bag (the objects being keys, skulls, gems, coins, daggers and…
locket
  • 729
  • 2
  • 13
-1
votes
3 answers

Solve riddle in prolog

I want to solve this riddle in prolog: The students Lily, Jack and Daisy go to the same university. All of them come from a different country and have different hobbies. They all go to a university in the USA, where one of them is living. Lily has…
zer0kai
  • 239
  • 1
  • 4
  • 12
-1
votes
1 answer

Solving ship puzzle using prolog

I need to solve the following problem using prolog. These are the facts provided. 1. The Greek ship leaves at six and carries coffee. 2. The Ship in the middle has a black chimney. 3. The English ship leaves at nine. 4. The French ship with blue…
Punuth
  • 417
  • 3
  • 6
  • 19
-1
votes
1 answer

Puzzle in Prolog

Anybody solve this Puzzle : Figure out the first name, wine, entree, and price for each person using the clues given. Below are all categories and options used in this puzzle. First names: Lynda, Nick, Robin, Virginia Wines: bordeaux, chianti,…
Nik
  • 59
  • 2
  • 11
-1
votes
1 answer

error in Prolog code - undefined procedure: unique/1

%three variants of actions. I have 3 animals and it can drive on plane, car or miss the %step. I know, that on the first step monkey ride on plane, wolf ride on car. On the second %step wolf ride on plane. We need to know accordance that remain. And…
Zakhar
  • 9
-1
votes
1 answer

Using SWI-Prolog, syntax,singleton errors

I'm need to use SWI-prolog to solve a logic puzzle for homework, but I find the syntax and meaning very cumbersome even with my programming background. The problem I'm facing are error about singleton variables and the puzzle return false. This is…
Friso Kluitenberg
  • 1,157
  • 1
  • 14
  • 34
-2
votes
2 answers

Somebody could help me with this little program in prolog?

When I run my program with this sentence: | ?- constraints(C). and the result is: C = [espacio(chuck,brenda,lewis,cafe,treintayuno), espacio(bill,mary,tread,rojo,veinteynueve), espacio(steve,cindy,branch,negra,cuarentaytres), …
1 2 3 4 5 6 7
8