Home / Expert Answers / Computer Science / determine-whether-each-of-the-following-logic-expressions-is-a-tautology-a-contingency-or-a-contra-pa440

(Solved): Determine whether each of the following logic expressions is a tautology, a contingency, or a contra ...



Determine whether each of the following logic expressions is a tautology, a contingency, or a contradiction:

1. (???? ? ????) ? (¬???? ? ¬????))

2. (???? ? ????) ? (¬???? ? ¬????)

3. (???? ? ????) ? (¬???? ? r) ? (???? ? ????)

4. ((???? ? ????) ? ????) ? (???? ? (???? ? ????))

Your program must compute the truth values based on the operators and build a truth table for each expression. The expressions can be hard-coded in your program, but the key is you need to use the right operators in C++ to get the right result that is consistent with the original logic expression. Regarding how to find the right operators, you can find some hints in the Output Specification section below.

Let Math be the title for mathematical symbols and let \( \operatorname{Prog} \) be title for the symbols that are used for d

Let Math be the title for mathematical symbols and let \( \operatorname{Prog} \) be title for the symbols that are used for display by this project. (1). You don't need to list all the intermediate results for all the operators. But at least the columns for single variables and the final expression should be there. Please reference the "Sample Output" section: the first, the second and the fifth column are required, and the other columns are optional but can be helpful for debugging. (2). After the calculation of the truth table, please also make a conclusion whether this expression is a contingency, a contradiction or a tautology, by analyzing the truth table (not hard-coded conclusions). (3). Please use the right notation defined above to display the expressions. You can use any methods to compute the truth values, e.g. use Boolean values or integers for the variables, use \&\& and || for Boolean operators or use \( * \) and \( + \) for arithmetic operators depending on the value type for the variables. (4). You don't need to parse the expressions, instead you can just hard code them in your program (manual translation), using the right notations/operators to replace the original symbols as discussed above. After the replacement, your program can recognize the expressions and conduct the computation. Pay attention: to display the expressions, you need to follow the symbols defined in the table above, but in your calculation, you can make you own design to choose the proper data types and operators. For example, in your calculation for \( p \rightarrow q \), you can put \( ! p \| q \) in the program to get the result (hint: \( p \rightarrow q \equiv \neg p \vee q \) ), and display the title of this part as \( p->q \).


We have an Answer from Expert

View Expert Answer

Expert Answer


If you are like m
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe