edited by
14,607 views
62 votes
62 votes

"If $X$ then $Y$ unless $Z$" is represented by which of the following formulas in propositional logic? ("$\neg$" is negation, "$\land$" is conjunction, and "$\rightarrow$" is implication)

  1. $(X\land \neg Z) \rightarrow Y$
  2. $(X \land Y) \rightarrow \neg Z$
  3. $X \rightarrow(Y\land \neg Z)$
  4. $(X \rightarrow Y)\land \neg Z$
edited by

10 Answers

1 votes
1 votes

refer @varsha394 comment for knowing about exportation law. Now let's see its application in programming.

//(if X then Y) unless Z 
//(if X then Y) if not Z
//(if X then Y) if ~Z
//if ~Z then(if X then Y)

if(Z is not true)
{
    if(X is true)
    {
        print("Y is true") //Y is true
    }
}

//if X then (Y unless Z)
//if X then (Y if not Z)
//if X then (Y if ~Z)
//if X then (if ~Z then Y)

if(X is true)
{
    if(Z is not true)
    {
        print("Y is true") //Y is true
    }
}

//By Exportation law,we can write
//if X^~Z then Y
// X^~Z -> Y
if(X is true and Z is not true)
{
    print("Y is true")//Y is true
}

 

edited by
0 votes
0 votes

😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊

Answer:

Related questions

18 votes
18 votes
2 answers
1
57 votes
57 votes
4 answers
3
30 votes
30 votes
3 answers
4
Kathleen asked Sep 15, 2014
9,210 views
In $2's$ complement addition, overflowis flagged whenever there is carry from sign bit additioncannot occur when a positive value is added to a negative valueis flagged w...