satisfiabilityApplet.algorithmsAndKBase
Class BruteForceAlgorithm

java.lang.Object
  extended bysatisfiabilityApplet.algorithmsAndKBase.BruteForceAlgorithm
All Implemented Interfaces:
SatisfiableAlgorithm

public class BruteForceAlgorithm
extends java.lang.Object
implements SatisfiableAlgorithm

by Catherine Block id# 6319 Date: Sep 18, 2004 Time: 12:15:54 PM CS 180H Checks a Conjunctive Normal Form sentence for satisfiability and validity using brute force.


Constructor Summary
BruteForceAlgorithm(java.util.List list)
          Constructor takse a clauseList of Conjunctions to check.
 
Method Summary
 boolean alwaysTrue()
          Determines if a clauseList of cnfs are always true.
 boolean isSatisfiable()
          Checks if a conjunction of clauses is satisfiable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BruteForceAlgorithm

public BruteForceAlgorithm(java.util.List list)
Constructor takse a clauseList of Conjunctions to check.

Parameters:
list - - A clauseList of Conjunctions
Method Detail

isSatisfiable

public boolean isSatisfiable()
                      throws UnsupportedTypeError
Checks if a conjunction of clauses is satisfiable

Specified by:
isSatisfiable in interface SatisfiableAlgorithm
Returns:
if conjunciton of clauses is satisfiable
Throws:
UnsupportedTypeError

alwaysTrue

public boolean alwaysTrue()
                   throws java.lang.Exception
Determines if a clauseList of cnfs are always true.

Returns:
Throws:
java.lang.Exception