[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Union and intersection

Posted on 2011-09-03
16
Medium Priority
?
387 Views
Last Modified: 2012-05-12
I dont know how to calculate the dash also did i calculate right the A U B
needs help

A=1,2,3,4
B=3,4,5,6
U=1,2,3,4,5,6,7,8,9

(AUB)'
(AUB)=1,2,3,4
0
Comment
Question by:mustish1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 36478623
Here is a good starting point to learn union (set theory) (Wikipedia).
0
 

Author Comment

by:mustish1
ID: 36478631
so (AUB)=1,2,3,4,5,6,7,8,9

but how to calculate the dash
(AUB)'
0
 
LVL 32

Expert Comment

by:phoffric
ID: 36478792
from the wiki link:
"The union of two sets A and B is the collection of points which are in A or in B (or in both)"

>> so (AUB)=1,2,3,4,5,6,7,8,9
No.

>> A=1,2,3,4
>> B=3,4,5,6
>> U=1,2,3,4,5,6,7,8,9

A consists of 4 elements.
B consists of 4 elements.

I take it that by U, you mean the Universe of elements that you are considering, of which A and B are subsets of the Universe. Is that your understanding also?

If the elements in A were distinct from the elements in B, then at most AUB would have 8 distinct elements. Do you see that? Somehow, your union of AUB has 9 elements, so you should immediately raise a flag that something is wrong. Here is an example of X and Y having mutually distinct elements, and their resultant union.
   X             Y
---------    ----------
 1 2 3 4      5 6 7 8
---------    ----------

 XUY (has only 8 elements)
--------------------------
 1 2 3 4      5 6 7 8
--------------------------

Open in new window

Now, try to draw and post the sets A and B, and then draw the union of A and B.


0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 32

Expert Comment

by:phoffric
ID: 36478795
Also, provide a definition from your text of the dash. (You drew a tick; and there is a dash, '-', defined; but you are not showing it.) Provide a definition of tick also.
0
 

Author Comment

by:mustish1
ID: 36478803
    A                             B
----------------         --------------
1 23 4                      3 4 5 6
-----------------        --------------

sorry A U B=1,2,3,4,5,6

NOW how to calculate (A U B)'
0
 
LVL 32

Expert Comment

by:phoffric
ID: 36478818
Provide a definition from your text of the dash. (You drew a tick; and there is a dash, '-', defined; but you are not showing it.) Provide a definition of tick also; and we'll take it from there.

Then, please explain what in the definition are you having problems with.
0
 

Author Comment

by:mustish1
ID: 36478845
it says in the book
calculate (A U B)'
(A' U B')

0
 
LVL 32

Expert Comment

by:phoffric
ID: 36478859
>> calculate (A U B)'
>> calculate (A' U B')

Those are the problems. In order to solve set theory problems, you have to first start with definitions and work with them. So, look up the definitions and post them; and I'll try to help you understand them to work out the problem.
0
 

Author Comment

by:mustish1
ID: 36478872
x belongs to (A U B)' <==> not(x belongs A U B)  Definition of '
                                 <==> not[(x belongs A) V (x belongs B)]     Definition of U
                                 <==> not(x belongs A) ^ not(x belongs B) De Morgan's law
                                 <==> (x belongs A') ^ (x belongs B') Definition of '
                                 <==> x belongs A' intersect B'   Definition of intersection

Therefore the sets (A U B)' and A' intersect B' are equal


0
 
LVL 32

Expert Comment

by:phoffric
ID: 36478892
  X             Y
---------    ----------
 1 2 3 4      5 6 7 8
---------    ----------
XUY (has only 8 elements)
--------------------------
 1 2 3 4      5 6 7 8
--------------------------

Now, suppose U = {0 1 2 3 4 5 6 7 8 9 10 11}

>> Definition of ':  x belongs to (X U Y)' <==> not(x belongs X U Y)

x belongs X U Y ==> x is an element in { 1 2 3 4 5 6 7 8 }

>> not(x belongs X U Y) means the elements, x, that do not belong to X U Y
So, in this example, x cannot be any of { 1 2 3 4 5 6 7 8 }.

So what is left in the universe, U = {0 1 2 3 4 5 6 7 8 9 10 11}, that is not in X U Y in this example?
0
 
LVL 32

Expert Comment

by:phoffric
ID: 36478954
I just saw that you wrote:
>> Definition of U:  not[(x belongs A) V (x belongs B)]

So, in your other notation, U = not( AUB ), which means that if x is an element of U, then x is not an element of A and x is not an element of B.

In your OP:
>> U=1,2,3,4,5,6,7,8,9
But here, U has elements that are in A as well as B

So, for clarication, could you double-check the definition of U, and, possibly, write down the text's written description of its meaning. I was originally taking U to be the Universe of all elements that you are concerned with.
0
 
LVL 9

Assisted Solution

by:user_n
user_n earned 400 total points
ID: 36480168
A=1,2,3,4
B=3,4,5,6


union of A and B are the elements of A and B together in one  set (1,2,3,4,5,6)
intersection are the common elemenets of A and B in one set (3,4)
0
 
LVL 32

Expert Comment

by:phoffric
ID: 36481362
>> intersection are the common elements of A and B in one set (3,4)
That's true. In your notation:
A^B = {3,4}

From your title, it might appear that you are interested in the intersection. However, your question is related to the tick operation:
    (A U B)'

Getting an answer in set theory is nice, but not as important as understanding the definitions and notation.

Take your conclusion, for example:
(A U B)'  <==> x belongs A' intersect B'   Definition of intersection

What is A' ? Here is a picture illustrating the complement of A (taken from http://en.wikipedia.org/wiki/Complement_(set_theory) ). The outer rectangle is the entire Universe, U; and the red color is the complement of A, A'.
 complement of A in universe, UWhat is B' ?

If you know A' and B', then you easily figure out A' ^ B'
However, you should also compute (A U B)'  and verify that they are the same.
If you have problems getting the results identical, let us know where, and we will try to help.
=============
Rather than just deal with symbols, it is easier to visualize the sets in a diagram.
A=1,2,3,4
B=3,4,5,6
U=1,2,3,4,5,6,7,8,9

Open in new window


In below figure, you see three sets: U, A, and B. A and B intersect, where A^B = {3,4}

U-------------------\
|                   |
|    A--------\     |
|    |   1 2  |     |
|    |        |     |
|  B-+--------+-\   |
|  | |   3 4  | |   |
|  | \--------/ |   |
|  |            |   |
|  |   5  6     |   |
|  |            |   |
|  \------------/   |
|     7   8   9     |
\-------------------/

Open in new window

0
 

Author Comment

by:mustish1
ID: 36481515
A' I think U -A
B' U - B

A U B=1,2,3,4,5,6

U=1,2,3,...9
(A U B)' = 1,2,3,4,5,6 - U

(A U B)' = 7,8,9
Is this is correct
0
 
LVL 32

Accepted Solution

by:
phoffric earned 1600 total points
ID: 36481761
>> (A U B)' = 7,8,9     Is this is correct
That looks good.

>> (A U B)' = {1,2,3,4,5,6} - U
Should be:
     (A U B)' = U - {1,2,3,4,5,6}

>> B' U - B
I think you mean:
     B' =  U - B
0
 
LVL 32

Expert Comment

by:phoffric
ID: 36481763
Now, try checking your work by computing:
    A' ^ B'
and see if the result is the same.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Progress
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question