Hello Raul;
Just in case...
er, isn't Monday the answer? Anna lied on Fri Sat and Sun, and Bjorn on
Tue Wed Thu and Sun. They both lied on Sunday, which was yesterday on
Monday... unless I am missing something.
Raul Miller wrote:
On Sun, Oct 26, 2008 at 11:16 AM, Björn Helgason <[EMAIL PROTECTED]> wrote:
Another experiment
We have two people Anna and Björn
They tell the truth on following days
annas=. 'Monday';'Tuesday';'Wednesday';'Thursday'
bjorns=.'Sunday';'Monday';'Friday';'Saturday'
Did you tell a lie yesterday?
What day did they both answer yes?
days=:;:'Sunday Monday Tuesday Wednesday Thursday Friday Saturday'
cool=: #&days :.(days&e.)
warm=: days&e. :.(#&days)
annas=: cool 0 1 1 1 1 0 0
bjorns=:cool 1 1 0 0 0 1 1
admit=: (~: _1&|.)&.warm
annas *.&.warm&(admit) bjorns
+------+
|Friday|
+------+
Note that my expressions for defining annas and bjorns look
different from yours but produce the same results. You could
replace mine with yours, if you prefer.
--
------------------------------------------------------------------------
|\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram)
|/\| ramacd <at> nbnet.nb.ca |
|\ | | The only real problem with APL is that
BSc(Math) UNBF'83 | it is "still ahead of its time."
Sapere Aude | - Morten Kromberg
Natural Born APL'er |
-----------------------------------------------------(INTP)----{ gnat }-
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm