Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a java program to convert the propositional logic statements to conjunctiv

ID: 646476 • Letter: W

Question

Write a java program to convert the propositional logic statements to conjunctive normal form.The input is a text file which has the statements. The output must be clauses in Conjunctive niormal form

example1 txt file:

A_Witch
Made_of_Wood => A_Witch
Weighs_Same_as_Duck && Floats_on_Water => Made_of_Wood
Turned_Me_into_a_Newt && Weighs_Same_as_Duck => Floats_on_Water
Has_a_Wart && Made_of_Wood => Weighs_Same_as_Duck
Has_a_Wart && Turned_Me_into_a_Newt => Weighs_Same_as_Duck
Has_a_Wart
Turned_Me_into_a_Newt

example 2:

Youd_Like_to_be_a_Pepper_too
Im_a_Pepper && Shes_a_Pepper => Were_All_Peppers
I_Drink_Dr_Pepper && Im_Proud => Im_a_Pepper
Hes_a_Pepper && Were_All_Peppers => Youd_Like_to_be_a_Pepper_too
Shes_a_Pepper
I_Drink_Dr_Pepper
~Im_Proud
Hes_a_Pepper

Explanation / Answer

io.h

walksat.cpp

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote