Question: C++ test to see whether or not if two Well formed formula's (wff's) are equivalent by creating truth tables. ONLY C++ NO Structs , Classes

C++ test to see whether or not if two Well formed formula's (wff's) are equivalent by creating truth tables.

ONLY C++

NO Structs , Classes or Pointers can be used.

You MUST use arrays, The problem can be achieved with three one dimensional arrays or two two deminsional arrays, or you can do a combination of two and one deminsional arrays.

C++ test to see whether or not if two Well formed formula's(wff's) are equivalent by creating truth tables. ONLY C++ NO Structs ,

The purpose of this program is to test whether or not the alternative expression for the circuit is equivalent to the original expression for the circuit. This problem boils down to testing whether ornot two wffs are equivalent by creating truth tables. To simplify the problem, I will guarantee that the right side of any sub-expression of the overall expression will be a variable or the negation of the variable. For example, the following are acceptable expressions: PA Q PAQ->R. (PVQOAR P following would not be acceptable: PA (QAR) P- QR (PVQ) A (P VR)- P Further simplifications are as follows: 1. There will be no more than three variables P, Q, and R(always assume exactly 3) 2. The only operators will be A (for and), O (for or), I(for implication), N (for not), and E (for end of expression) 3. The input will be in postfix notation. That means, the operator follows its operand(s). For example: PAQ would be written POAE would be written PQARIE PAQ->R. P VQ R would be written PNQNORIE (P VQ) AR P would be written PQORAPIE Postfix is nice because the order of operations is no longer a problem, and it easily implemented on a stack. However, the simplifications are such that a stack is not necessary for this program. Your program should ask for the first expression. You must enter the entire expression on one line. (Note: The program doesn't need to read the entire expression at one time, but the user shouldn't be asked to enter the expression or any part of it more than one time.) The program will read each of the characters and perform the appropriate operations. The program will then ask for the second expression, read it, and perform the operations Finally, the program will The purpose of this program is to test whether or not the alternative expression for the circuit is equivalent to the original expression for the circuit. This problem boils down to testing whether ornot two wffs are equivalent by creating truth tables. To simplify the problem, I will guarantee that the right side of any sub-expression of the overall expression will be a variable or the negation of the variable. For example, the following are acceptable expressions: PA Q PAQ->R. (PVQOAR P following would not be acceptable: PA (QAR) P- QR (PVQ) A (P VR)- P Further simplifications are as follows: 1. There will be no more than three variables P, Q, and R(always assume exactly 3) 2. The only operators will be A (for and), O (for or), I(for implication), N (for not), and E (for end of expression) 3. The input will be in postfix notation. That means, the operator follows its operand(s). For example: PAQ would be written POAE would be written PQARIE PAQ->R. P VQ R would be written PNQNORIE (P VQ) AR P would be written PQORAPIE Postfix is nice because the order of operations is no longer a problem, and it easily implemented on a stack. However, the simplifications are such that a stack is not necessary for this program. Your program should ask for the first expression. You must enter the entire expression on one line. (Note: The program doesn't need to read the entire expression at one time, but the user shouldn't be asked to enter the expression or any part of it more than one time.) The program will read each of the characters and perform the appropriate operations. The program will then ask for the second expression, read it, and perform the operations Finally, the program will

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!