-

2011年8月4日星期四

Hello help me to do a source code u see below, using C++ language,?

-1. Union-the union of the sets A&B is the smallest set consisting of the members/elements of both set A & B.



AUB={x|x is in A or X is in B}



2. Intersection- the intersection of sets A & B is the smallest set consisting of the elements common in both set A & B.



A B={x|x is in A and x is B}



3. Complement the complement of set B with respect to A is denoted as:

A-B={x|x is in A and x is not in B }



Facts: AUB=BUA

A B=B A

A-B B-A

A-A=empty set



4. Symmetric-the symmetric difference of A and B is denoted as A+B



A+B={x|x is in A but not in B or x is in B but not in A}



A+B=(A-B)U(B-A)



For example:



A={1,5,7,9}



B={3,1,7,4,2}



1. Union

AUB={1,5,7,9,3,4,2}



2. Intersection

A B={1,7}



3. complement

A-B={5,9}

B-A{3,4,2}



4. symmetric

A+B={5,9,3,4,2}Homework is not to be done by others:)

it should be done by yourself:)

good luck!!

没有评论:

发表评论