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
0
votes
0 answers

prolog end of file error

brand(_AbbottHill). brand(_Manzarita). brand(_Graffetz). brand(_Williford). size(4). size(5). size(6). size(7). solve:- brand(AbbottHill), brand(Manzarita), brand(Graffetz), brand(Williford), all_different([AbbottHill, Manzarita, Graffetz,…
Tommy Li
  • 1
  • 1
0
votes
1 answer

Interpreters riddle in prolog

Here's a riddle's info Six interpreters: Fran French, Geraldine German, Dudley Dutch, Spike Spanish, Polly Polish and Romanian Ron. Everyone speaks two languages, among them indicating their surnames, namely French (French), Deutsch (German), Dutch…
0
votes
1 answer

solving simple musicians logic puzzle in prolog

Hello guys I'm still newbie, I still don't know how to solve this puzzle with Prolog, I did some try and seems wrong and incomplete and this is the question: At a musical recital five students (John, Kate, Larry, Mary and Nick) performed five…
Dell Watson
  • 367
  • 1
  • 3
  • 13
0
votes
0 answers

Prolog logical task with pigs

There are four pigs (a,b,c,d); they are from four different countries (australia,germany,france,ireland); and they eat different meals (grass,vegies,eggs,chestnuts). the pig b is from Germany. The Australian pig eats vegies. The Irish pig doesn't…
SonOfAGun
  • 69
  • 9
0
votes
1 answer

Prolog - Einstein Riddle

I'm trying to solve the Einstein Riddle using Prolog. I'm sorry for my English. The task is: In the block of flats is 5 flats. (ground floor a 1., 2., 3., 4. floor) Family Mullerovi have 4 children. An administrator lives on the middle floor. Mrs.…
user3637775
  • 499
  • 4
  • 20
0
votes
0 answers

Mapping predicates and propositions in DLV/Prolog

I'm having trouble understanding how to go about something Imagine i have 3 donkeys, and each donkey has a favorite cloth, and plays at its favorite playground. If i give these donkeys constraints on which playground could be its favorite playground…
0
votes
1 answer

Four Professions prolog puzzle

I am trying to solve a puzzle in prolog and i made only a part of it, i can't figure out how to finish it. This is the problem: Consider four men with last names of Baker, Carpenter, Miller, and Farmer. Assume that the four professions represented…
Eleanordum
  • 125
  • 1
  • 3
  • 10
0
votes
1 answer

Prolog riddle solving

The statement : Four couples in all Attended a costume ball. 2 The lady dressed as a cat Arrived with her husband Matt. 3 Two couples were already there, One man dressed like a bear. 4 First to arrive wasn't Vince, But he got there before the…
0
votes
2 answers

How to model Einstein's ships puzzle in Prover9 (first order logic)

I need to model the folowing puzzle in Prover9 There are 5 ships in a port: The Greek ship leaves at six and carries coffee. The Ship in the middle has a black chimney. The English ship leaves at nine. The French ship with blue chimney is to the…
0
votes
3 answers

Bertrand Russell Puzzle

Solve the following Caliban problem, translating each clue 'loyally' into Prolog, i.e. as loyally as possible. As a simple exercise in abstraction suppose that four meaningless symbols a, b, c, and d correspond in one order or another to the …
abc
  • 153
  • 2
  • 12
0
votes
1 answer

Solving Einstein Riddle with SWI Prolog

So I tried solving another Einstein Puzzle by using tutorial that I learned myself from this site. But, I dont seem to get the answer. When I make the query,it only returns true when I want to know which couple likes Violet. exist(A,…
0
votes
2 answers

seating constraint program prolog - symmetry

I am looking for guidance on why there are an even number of solutions to this problem: An eccentric has his own personal collection of wild animals that include a bear, a lion, a tiger, an elephant, a wolverine, a rhino and a dingo. These 7 animals…
CompilerSaysNo
  • 415
  • 3
  • 14
0
votes
1 answer

Clingo: assert partial constraints

I am trying to implement a program in clingo that solves one of those classic riddles where you have a series of assertions of facts and constraints and you have to deduce other facts. Here goes the problem: Five men of different nationalities live…
Andrea Aloi
  • 971
  • 1
  • 17
  • 37
0
votes
5 answers

Prolog Logic/Einstein Puzzle

The problem is Brown, Clark, Jones and Smith are four substantial citizens who serve the community as architect, banker, doctor and lawyer, though not necessarily respectively. Brown who is more conservative than Jones but more liberal than Smith,…
user2616744
  • 41
  • 1
  • 7
0
votes
1 answer

How to code this on Prolog?

Please can you explain what will i do to code this thing up on Prolog? Mason, Alex, Steve, and Simon arc standing in a police lineup. One of them is blond, handsome, and unscarred. Two of them who are not blond are standing on either side of Mason.…