From: ·············@gmail.com
Subject: logically equivalent clause problem
Date: 
Message-ID: <cc41ad76-d442-4337-b737-270175961c83@a35g2000prf.googlegroups.com>
Write code that will output a logically equivalent clause
or clauses, given a sentence of the form M --> N, where M
is a pure conjunction or disjunction and N is also a pure conjunction
or disjunction. The output in CNF should be equivalent to M --> N.

There are 4 cases like the ones below:

(1) (a AND b AND c) --> (m OR n)
(2) (a AND b AND c) --> (m AND n)
(3) (a OR b OR c) --> (m OR n)
(4) (a OR b OR c) --> (m AND n)

First your code should check which case does the input belong to
and do the right thing. You can write 4 auxiliary functions for these
4 cases.

Can I get some help with this? Can someone point me in the right
direction? Pseudocode will help
From: Alan Crowe
Subject: Re: logically equivalent clause problem
Date: 
Message-ID: <86r6ib4ch7.fsf@cawtech.freeserve.co.uk>
·············@gmail.com writes:

> Write code that will output a logically equivalent clause
> or clauses, given a sentence of the form M --> N, where M
> is a pure conjunction or disjunction and N is also a pure conjunction
> or disjunction. The output in CNF should be equivalent to M --> N.
> 
> There are 4 cases like the ones below:
> 
> (1) (a AND b AND c) --> (m OR n)
> (2) (a AND b AND c) --> (m AND n)
> (3) (a OR b OR c) --> (m OR n)
> (4) (a OR b OR c) --> (m AND n)
> 
> First your code should check which case does the input belong to
> and do the right thing. You can write 4 auxiliary functions for these
> 4 cases.
> 
> Can I get some help with this? Can someone point me in the right
> direction? Pseudocode will help

You have two problems.

1)What should the code actually do?

2)How do you code it?

You must solve 1 first. Handcrank some small examples eg
turn a --> b into conjuctive normal form, and work up
(a and b) --> c, a --> (b or c)

Coding might turn out to be the easy part :-)

Alan Crowe
Edinburgh
Scotland