Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.6 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.6 KB

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