Google Answers Logo
View Question
Q: Logic ( No Answer,   2 Comments )
Subject: Logic
Category: Science > Math
Asked by: dave29-ga
List Price: $14.50
Posted: 18 Jul 2006 08:21 PDT
Expires: 17 Aug 2006 08:21 PDT
Question ID: 747361
I have a well formed proposition logic formula in disjuntive normal
form (DNF). The original formula uses only OR + AND.

Example: (a&b)|(c&d&e)|(f&g&h&i&j)|(k&l) ...

I am looking for a fast algorithm, that transforms big formulas (maybe
hundreds of clauses) into conjunctive normal form (CNF). It must be possible
to realize it in Java. A ready-for-action-solution in Java is favored.
There is no answer at this time.

Subject: Re: Logic
From: eiffel-ga on 18 Jul 2006 08:32 PDT
Hi dave29-ga,

It's not a direct answer to your question (because it's written in
Eiffel rather than in Java), but you could take a look at

   Kniffel: First Order Predicate Logic Converter

It's an online application which I find works well, and it's also an
open-source Eiffel application that you could translate to Java.

Subject: Re: Logic
From: berkeleychocolate-ga on 23 Jul 2006 21:24 PDT
It seems to me that the CNF is obvious but has a tremendous number of
clauses. Say the original DNF is
(a1&a2&...&an)or(b1&b2& Then the CNF is
the "&" of all clauses of the form: ai or bj or ck or ... as the i's
vary from 1 to n and the j's vary from 1 to m, the k's vary from 1 to
p, etc. So the number of clauses to "&" in the CNF would be n*m*p*....

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy