Famoue problem by Eric Emmett
"Robert Onslow" <[email protected]> Fri, 9 Sep 2011 22:00:42 +0100
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Organization | XLegal Limited |
| Message-ID | <FA34FFF86DE74359B345CC31DA4441FA@ThinkPadR61> |
This is a multi-part message in MIME format. --===============1495728790== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0002_01CC6F3B.EB197710" This is a multi-part message in MIME format. ------=_NextPart_000_0002_01CC6F3B.EB197710 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear All. I am trying Powerloom to solve the following famous problem by Eric = Emmett: Alf, Bert, Charlie, Doug, Ernie and Fred have their birthdays on = consecutive days, but not necessarily in that order. Doug=E2=80=99s birthday is as many days before Alf=E2=80=99s as it is = after Fred=E2=80=99s. Charlie=E2=80=99s birthday is as many days before = Freds as Berts is after Freds. This year, Ernie=E2=80=99s birthday is on = a Saturday, On what days of the week do the birthdays of the other 5 = men fall this year? I have got (defconcept person) (deffunction birthday ((?p person)) :- > (?n integer)) (assert (and (person a) (person b) (person c) (person d) (person e))) (assert (=3D (- (birthday a) (birthday d)) (- (birthday d) (birthday = f))) (assert (=3D (- (birthday f) (birthday c)) (- (birthday b) (birthday = f))) (assert (birthday e 6) What is the best way to assert that the set of birthday values is = mutually disjoint and drawn from a list of integers from 1 to 7. I = can=E2=80=99t seem to do it in a way which yields solutions. Can anyone help? I have solved this problem in Mozart and Prover/Mace = and would like to do the same in Powerloom, which I feel will be the = most intuitive solution. Thanks Robert ------=_NextPart_000_0002_01CC6F3B.EB197710 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <HTML><HEAD></HEAD> <BODY dir=3Dltr> <DIV dir=3Dltr> <DIV style=3D"FONT-FAMILY: 'Arial'; COLOR: #000000; FONT-SIZE: 10pt"> <DIV>Dear All.</DIV> <DIV> </DIV> <DIV>I am trying Powerloom to solve the following famous problem by Eric = Emmett:</DIV> <DIV> </DIV> <DIV>Alf, Bert, Charlie, Doug, Ernie and Fred have their birthdays on=20 consecutive days, but not necessarily in that order.</DIV> <DIV>Doug=E2=80=99s birthday is as many days before Alf=E2=80=99s as it = is after Fred=E2=80=99s.=20 Charlie=E2=80=99s birthday is as many days before Freds as Berts is = after Freds. This=20 year, Ernie=E2=80=99s birthday is on a Saturday, On what days of = the week do the=20 birthdays of the other 5 men fall this year?</DIV> <DIV> </DIV> <DIV> </DIV> <DIV>I have got</DIV> <DIV>(defconcept person)</DIV> <DIV>(deffunction birthday ((?p person)) :- > (?n integer))</DIV> <DIV>(assert (and (person a) (person b) (person c) (person d) (person = e)))</DIV> <DIV>(assert (=3D (- (birthday a) (birthday d)) (- (birthday d) = (birthday=20 f)))</DIV> <DIV>(assert (=3D (- (birthday f) (birthday c)) (- (birthday b) = (birthday=20 f)))</DIV> <DIV>(assert (birthday e 6)</DIV> <DIV> </DIV> <DIV>What is the best way to assert that the set of birthday values is = mutually=20 disjoint and drawn from a list of integers from 1 to 7. I can=E2=80=99t = seem to do it in=20 a way which yields solutions.</DIV> <DIV>Can anyone help? I have solved this problem in Mozart and = Prover/Mace and=20 would like to do the same in Powerloom, which I feel will be the most = intuitive=20 solution.</DIV> <DIV> </DIV> <DIV>Thanks</DIV> <DIV>Robert</DIV> <DIV><FONT face=3DCalibri><FONT=20 color=3D#2c5e8e></FONT></FONT> </DIV></DIV></DIV></BODY></HTML> ------=_NextPart_000_0002_01CC6F3B.EB197710-- --===============1495728790== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ powerloom-forum mailing list [email protected] http://mailman.isi.edu/mailman/listinfo/powerloom-forum --===============1495728790==--