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

XOR of 2 sets ?

  1. Mar 12, 2004 #1
    XOR of 2 sets ????

    i have two sets :
    A{a,b,c,d,e,f,l}
    B{a,b,i,k,l}
    A XOR B result?????
    Help me plz.
    Thanks
     
  2. jcsd
  3. Mar 12, 2004 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Who's asking you to take XOR of sets? Can I shout at them please?

    I think you want symmetric difference:

    [tex]x \in A\triangle B[/tex] iff x is in exactly one of A or B.

    Equivlently it is [tex](A^c\cap B)\cup(A\cap B^c)[/tex]

    assuming you're ok with taking complements.
     
    Last edited: Mar 12, 2004
  4. Mar 12, 2004 #3
    I get this problem in Matching algorithm,
     

    Attached Files:

    • a.jpg
      a.jpg
      File size:
      2.9 KB
      Views:
      82
  5. Mar 12, 2004 #4
  6. Mar 12, 2004 #5
    A XOR B = (A OR B) - (A AND B)
     
  7. Mar 12, 2004 #6

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Stop using logical symbols such as AND, OR etc when you mean set symbols such as intersction etc!

    OR is not the same as union, despite the similarities in their behaviour.

    And if you want us to know what's going on then you need to tell us.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: XOR of 2 sets ?
  1. -2 ^ 2 (Replies: 9)

  2. ∞/2= ∞? (Replies: 4)

  3. Set of all finite sets (Replies: 12)

Loading...