Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following proposition with n variables: p1 p2 p3 ... pn (1) Let n be the quantity of the pi and let x be

Consider the following proposition with n variables: p1 p2 p3 ... pn

(1) Let n be the quantity of the pi and let x be the number of the pi that are true. You want to find a simple formula to evaluate the truth value of (1) in terms of n and x.

Recall that biconditional implication is associative, that is: p (q r) (p q) r so that it makes sense to write such a proposition without parentheses, i.e. p (q r) (p q) r p q r Please note that (1) is NOT intended to mean that p1, p2, p3, ... pn all have the same truth value. Regrettably, on page 88 of the Rosen textbook, the author uses (1) as special "shorthand" notation to mean this - the truth value of (1) is T if and only if x = n or x = 0 (i.e., if all the pi are true, or all the pi are false).

Assignment

1. Use a truth table to show that the propositions p q r and (p q) (q r) are not logically equivalent.

2. Write JAVA program to generate truth table for the compound expression in

(1). Your program should accept as input a positive integer n indicating the number of variables pi and print the resulting truth table to a file. Each row of the output truth table should contain the truth values of the pi, the truth value of the compound proposition (1), and the number x of the pi in that row that are true.

3. Run your program many times for different values of n, inspect the output for patterns, and conjecture a formula for the truth value of the compound expression (1) in terms of n and x.

4. Use induction to prove that your formula is correct for all positive integer n (i.e., for any number of variables pi).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions