Combining Sets A and B Using If-Then Clause: AUB with C1 and C2

  • Level: High School 
  • Thread starter porums
  • Start date
  • Tags Tags
    Set
1 reply · 2K views · last reply
porums
Messages
27
Reaction score
0
Set A={1,2,3} B={5,6,7}
an if clause is created,
if C1
___then
_______if C2 then
_________AUB
else
___AUB

Someone could please help me simplify the if-then-else in one if-then clause ? :LOL:
Thanks
 
First, you'd have to tell us whether you mean
Code:
if C1 then {
    if C2 then {
        AUB
    }
} else {
    AUB 
}
which is implied by your spacing, or
Code:
if C1 then {
    if C2 then {
        AUB
    } else {
        AUB 
    }
}
which is what any C++ like compiler would execute given your (pseudo)code.

It's really not too hard to see, but if you can't figure it out by looking at the expression, you might want to make a "truth table":
Code:
        | C1 false  | C1 false | ...
        |  C2 false | C2 true  | ...
------------------------------------
  do:   |  nothing  |  AUB     | ...
and try to find a simpler expression involving C1 and C2 which gives the same result.