retagged ago by
413 views
12 votes
12 votes

Many programming languages support a ternary conditional operator. For example, in $\text{C, C++},$ and $\text{Java}$, the expression $x ? y : z$ means “evaluate the boolean expression $x.$ If it's true, the entire expression evaluates to $y.$ If it's false, the entire expression evaluates to $z.$”

In the context of propositional logic, we can introduce a new ternary connective $?:$ such that $p ? q: r$ means “if $p$ is true, the connective evaluates to the truth value of $q,$ and otherwise it evaluates to the truth value of $r$.”

Let $p,q,r$ be three propositional variables. Which of the following is/are correct?

  1. Probability of $p ? q : r,$ being true is $\dfrac{1}{2}.$
  2. $p ? p : p$ is tautology.
  3. $p ? p : (\neg p)$ is tautology.
  4. $(\neg p) ? p : (\neg p)$ is tautology.
retagged ago by

1 Answer

2 votes
2 votes
  1. p?p:p

           There are two mutually exclusive cases here. We can translate as follows

           =  $(p\Lambda p )V({p}'\Lambda p)$

            P can take two values true and false. So, probability of p = probability of $p{}'$ = ½. 

            So, total probability is $\left ( \left ( 1/2 * 1/2 \right ) \right ) + \left ( \left ( 1/2 * 1/2 \right ) \right )$

            = 1/2

 

  1. p?p:p

           = $\left ( p \Lambda p\right ) V \left ( p{}' \Lambda p \right )$

           = $pVF = p$ ( not a tautology )

  1. p?p:$p{}'$

    = $\left (p  \Lambda p \right ) V \left ( p{}' \Lambda p{}'\right ) = p V p{}' = T$ ( tautology )
  1. $p{}' ? p:p{}'

    = \left ( p{}' \Lambda p \right ) V \left ( p \Lambda p{}' \right )

    = F V F = F$ ( not a tautology )

    So, correct options are A , C
Answer:

Related questions

5 votes
5 votes
1 answer
4