Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

## Post a reply

Write your message and submit
|
Options

## Topic review (newest first)

bobbym
2012-12-29 06:05:47

Hi;

Enjoy your solitude then. We will talk then.

Agnishom
2012-12-28 21:33:23

I will talk about that once I return home. I am back to that remote village where its tough to get connected.

bobbym
2012-12-27 19:03:23

How have you come with your date and days of the week?

Agnishom
2012-12-27 14:18:52

Thanks for the links

bobbym
2012-12-24 06:18:53

Hi;

Seems like a good error. There is a prolog program that can be found.

http://en.literateprograms.org/index.ph … ldid=18673

http://en.literateprograms.org/Zebra_Pu … 8Prolog%29

Here are implementations in several languages.

http://rosettacode.org/wiki/Zebra_puzzle

muxdemux
2012-12-24 06:02:44

I think the Zebra puzzle can be formulated as a constraint satisfaction problem and solved that way.

It can also be solved very easily using logic programming. If you search for "Prolog zebra puzzle" (or similar) in Google, you should be able to find a 15-liner to solve it. Prolog's special trick is to use something called "backtracking," though that's a separate topic.

Edit: My bad. There's a 15-line Sudoku solver. I was about to post in a different thread about a Sudoku solver and got confused.

bobbym
2012-09-07 01:09:58

Hi Agnishom;

When I find the paper I will post how he does a simple logic problem. Then maybe someone will figure out a way.

Agnishom
2012-09-07 01:07:04

Sorry, I mean it is done very fast

bobbym
2012-09-06 23:51:33

I am not sure you can say that it is done easily. It just is a method that can be done by a computer.

Agnishom
2012-09-06 23:43:42

Which guy?

By the way, how does constraint programming do it so easily?

bobbym
2012-09-06 19:31:30

Hi Agnishom;

How can I do that with them?

I do not know how to apply the idea to a larger problem or even a smaller one. I never really understood what the guy was doing.

Agnishom
2012-09-06 14:43:34

But I am talking about Zebra Puzzles which have so many possible permutations.

How can I do that with them?

bobbym
2012-09-05 22:15:18

Hi;

Since the variables are of type boolean they can only take two values of 0 and 1. You should adjust your loops for 0 to 1.

Agnishom
2012-09-05 21:31:41

Hmm I decided to do it with loops
.
.
Then I wrote the full code
.
.
Then I found the program is taking a loooooong time
.
.
Then I remembered that there are 24883200000 possible permutations. So it will take forever -_-"

However, there are some constraint programming solutions to this one

bobbym
2012-09-04 00:33:45

Hi Agnishom;

What about these ones?

I never worked on one that big with that method.

#### anonimnystefy wrote:

What would be the input form?

Input form?

I only remember the technique from having read a paper on it in a journal. I could copy their results and two problems and maybe one of you guys can apply it to a larger problem...