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
vote
1 answer

Age comparsion for Zebra Riddle

I'm trying to solve a logic riddle similar to the Einstein riddle with ECLiPSe Prolog via CLP: A band has 6 jazz-musicians, no one is younger than 70 years old. Every artist has written a different song. The used instruments are: a piano at…
Patrick
  • 168
  • 8
1
vote
0 answers

How does `next` predicate work, making two opposite choices?

I'm making the Einstein's Riddle, I have a solution but I don't understand how works one specific statement, here is the code: zebra_owner(Owner) :- houses(Hs), member(h(Owner,zebra,_,_,_), Hs). water_drinker(Drinker) :- houses(Hs), …
1
vote
2 answers

Is there a way to extend Einstein's Riddle in Prolog?

First off, thank you for dropping by my question. On to the question, I have been working on a Prolog code to model Einstein's riddle. I think it's a pretty elegant solution, it's basically a list of tuples with certain fields such as house color,…
1
vote
3 answers

Solving a puzzle in Prolog about time constraints

Stuck on a Prolog problem. I know the answer (because I did it on paper first), but I cannot figure out how to get Prolog to come up with the answer. Problem: Bill eats a snack every night, having a different fruit and different nuts each night.…
user12957754
1
vote
2 answers

Prolog Logic with adjacent rooms

Here is my question: Hunter, Laura, Addiley (jack), Ramey(Sally), and Arnie(Jim) all live in the same dorm with five adjacent bedrooms. Hunter doesn’t sleep in the 5th bedroom and Laura doesn’t sleep in the first bedroom. Arnie doesn’t…
JoeShmoe
  • 13
  • 3
1
vote
0 answers

Instantiation issue when solving this Prolog Caliban problem

I am trying to solve the following Caliban problem using Prolog: Brown, Clark, Jones and Smith are 4 substantial citizens who serve their community as achitect, banker, doctor and lawyer, though not necessarily respectively. Brown, who…
1
vote
1 answer

Make rule out of a hint in prolog

I have interpreters and…
1
vote
2 answers

How to get individual results while solving Einstein's riddle with OWL in Protégé?

I would like to better understand ontologies and reasoning. There is an interesting puzzle called Einstein's riddle on the net that can be solved with the help of ontologies and reasoning. I downloaded the OWL ontology from that site and imported…
rmv
  • 3,195
  • 4
  • 26
  • 29
1
vote
1 answer

Solving a puzzle in Prolog

I am new to prolog and I am trying to solve this puzzle problem. I did a couple tutorials on youtube on the basics of prolog, but I need some help solving the puzzle below. Two weeks ago, four enthusiasts made sightings of objects in the sky in…
Micheal C.
  • 101
  • 3
  • 11
1
vote
1 answer

Swi-prolog two-way clause/fact

I need help describing the following facts in Swi-Prolog: Clark and Jones live in the same house and play chess together. and The manager and the architect live in the same house, no other employees live in that house. I have a structure like…
Tarps
  • 1,928
  • 1
  • 11
  • 27
1
vote
1 answer

Einstein puzzle in Prolog

I'm trying to solve the Einstein riddle using Prolog. Task is The Norwegian lives in the first house . The English lives in the Red House . The Swedish HAS Dogs As pets . The Danish drinks tea . The Green House is on the left of the White…
1
vote
1 answer

Prolog Jobs Puzzle

I'm new to prolog and have to complete this assignment. I'm very confused on how to make relationships with the facts that I have and the conclusions I have made on my own. In the code section of this question, you will find a list of given…
KatieRose1029
  • 185
  • 1
  • 2
  • 9
1
vote
2 answers

A "Building" Riddle in Prolog

I'm trying to solve a riddle in Prolog. the riddle is: There are two buildings, each one has tree apartments (apartment per floor): one apartment of 3 rooms,one of 4 rooms and one of 5 rooms. Dana,Joni and Noah lives in building 1. Ron,Gale and Aron…
nofar mishraki
  • 526
  • 1
  • 4
  • 15
1
vote
2 answers

Solve Einstein's riddle with Stardog reasoner?

Is it possible to solve Einstein's riddle (aka Zebra puzzle) with the Stardog reasoner? I.e. the following query does not yield the expected result einsteins_riddle_en:Old_Gold stardog query myDatabase --reasoning "SELECT ?o WHERE…
rmv
  • 3,195
  • 4
  • 26
  • 29
1
vote
2 answers

Prolog: Solving a Puzzle

I am new to prolog and I am trying to solve the following question. I am having difficulty trying to understand the logic to solve the problem. I know its similar to zebra problem but, I am unsure how to approach. Any help would be greatly…
mayak
  • 21
  • 3