Consider truth assignments involving only the propositional variables x_0,x_1,x_2,x_3 and y_0,y_1,y_2,y_3. Every such truth assignment gives a value of 1 (representing true) or 0 (representing false) to each variable. We can therefore think of a truth assignment τ as determining a four-bit integer x_τ depending on the values given to x_0,x_1,x_2 and x_3, and a four-bit integer y_τ depending on the values given to y_0,y_1,y_2 and y_3.

Graham Beasley

Graham Beasley

Answered question

2022-07-17

Consider truth assignments involving only the propositional variables x 0 , x 1 , x 2 , x 3 and y 0 , y 1 , y 2 , y 3 .
Every such truth assignment gives a value of 1 (representing true) or 0 (representing false) to each variable. We can therefore think of a truth assignment τ as determining a four-bit integer x τ depending on the values given to x 0 , x 1 , x 2 and x 3 , and a four-bit integer x τ depending on the values given to y 0 , y 1 , y 2 and y 3 .
More precisely, with τ ( x i ) being the truth value assigned to x i , we can define the integers x τ = 2 3 τ ( x 3 ) + 2 2 τ ( x 2 ) + 2 1 τ ( x 1 ) + τ ( x 0 ) and y τ = 2 3 τ ( y 3 ) + 2 2 τ ( y 2 ) + 2 1 τ ( y 1 ) + τ ( y 0 )
Write a formula that is satisfied by exactly those truth assignments τ for which x τ > y τ . Your formula may use any of the Boolean connectives introduced so far. Explain how you obtained your formula, and justify its correctness
Am I right in assuming that I would need to construct a formula for every single possibility where x is the greater bit?

Answer & Explanation

Brienueentismvh

Brienueentismvh

Beginner2022-07-18Added 11 answers

Step 1
I'm just re-writing my answer from the comments section.
τ is a function that assigns the binary value 0 or 1 to a propositional variable, depending on whether that variable has the truth assignment FALSE or TRUE (respectively).
We then compute the 4-bit integers x τ and y τ as follows:
{ x τ = 2 3 τ ( x 3 ) + 2 2 τ ( x 2 ) + 2 1 τ ( x 1 ) + 2 0 τ ( x 0 ) y τ = 2 3 τ ( y 3 ) + 2 2 τ ( y 2 ) + 2 1 τ ( y 1 ) + 2 0 τ ( y 0 )
Therefore, the most trivial formula that satisfies x τ > y τ will assign:
{ x τ = 2 3 × 1 + 2 2 × 1 + 2 1 × 1 + 2 0 × 1 = 8 + 4 + 2 + 1 = 15 = b i n 1111 y τ = 2 3 × 0 + 2 2 × 0 + 2 1 × 0 + 2 0 × 0 = 0 + 0 + 0 + 0 = 0 = b i n 0000
In other words, we're looking for a logical formula that is true whenever the x i are true and the y i are false. Such a formula is given by:
x 0 x 1 x 2 x 3 ( ¬ y 0 ) ( ¬ y 1 ) ( ¬ y 2 ) ( ¬ y 3 )
where we have used the two Boolean connectives ∧ (AND) and ¬ (NOT). The AND connective yields TRUE if and only if both its arguments are TRUE. The NOT connective flips the truth-value of its argument, i.e. NOT TRUE=FALSE and NOT FALSE=TRUE.
Therefore, it can easily be seen that the formula above, where each element is connected by AND connectives, is true only when each element is TRUE. And in particular, the elements formed by NOT y i are true only when the y i are FALSE.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?