Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Difficult set

  1. Aug 14, 2008 #1
    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
     
  2. jcsd
  3. Aug 15, 2008 #2

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    First, you'd have to tell us whether you mean
    Code (Text):
    if C1 then {
        if C2 then {
            AUB
        }
    } else {
        AUB
    }
     
    which is implied by your spacing, or
    Code (Text):
    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 (Text):

            | 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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Difficult set
  1. Difficult expectation (Replies: 13)

  2. Sets within sets (Replies: 8)

Loading...