Skip to content

Determines which boolean-values must be given to a formula to make it pass.

Notifications You must be signed in to change notification settings

KristofferK/ConjunctiveNormalForm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

ConjunctiveNormalForm

Determines which boolean-values must be given to a formula to make it satisfiable.

Example

To test the algorithm, we'll be using the following four formulas

  • Formula 1
  • Formula 2
  • Formula 3
  • Formula 4

There are three solutions for the first one:

  • A = false, B = false, C = true
  • A = false, B = true, C = false
  • A = false, B = true, C = true

We'd like the output of the algorithm to be:

["001", "010", "011"]

Actual output

Given the formula Formula 1 we'll get the following output

Output of formula 1

Given the formula Formula 2 we'll get the following output

Output of formula 2

In the pictures, there is a typo. It reads "formumla" instead of formula. This has been fixed.

Installation

You must first transpile the .ts files to .js, using tsc. Afterwards you can run the project using node runner.js

About

Determines which boolean-values must be given to a formula to make it pass.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published