Skip to content

Java code to convert every logical formula to conjunctive normal form and disjunctive normal form

Notifications You must be signed in to change notification settings

Mehrab-Kalantari/CNF-DNF-Convertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

CNF-DNF-Convertor

Java code to convert every logical formula to conjunctive normal form and disjunctive normal form

Java code

Use simple names for variables like p, q, r.

Use the following characters for operators

  • and: &
  • or: |
  • negation: ~
  • implication: ->
  • equivalence: <->

Remember to put parentheses around each formula

Correct samples: ((p->q)&p) - (~(p->q))|(p&(~q))

Wrong samples: (p->q)&p - ~(p->q) - p&(~q) - (p&~q)

About

Java code to convert every logical formula to conjunctive normal form and disjunctive normal form

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages