Multiset and operations on multisets(union, intersection, addition, difference), solved problems

A multiset is a set of elements in which every element can occur more than once. This is the different property of multiset from the sets. a set in which the occurrence of an element can be more than one or can be 0.

The multiplicity of the element is the occurrence of the element in the multiset. the multiplicity of an element can be 1 or more than one or can be 0.

the size of the multiset is the sum of all the multiplicities of all the elements. 

for example:

A= {1,1,1,1,2,2,3,4,4,5}

The multiplicity of element '1' in multiset A is 4.

The multiplicity of element '2' in multiset A is 2.

The multiplicity of element '3' in multiset A is 1.

The multiplicity of element '4' in multiset A is 2.

The multiplicity of element '5' in multiset A is 1.

the size of the multiset A is 10

In sets, the cardinality of the set is the multiplicity of the set.

and rest all things the representation of a set and multiset is similar.

in multisets

A={1,1,1,1,2,2,3,4,4,5}  and B={1,1,1,2,2,3,4,4,5}

A and B are different

Operations on Multisets

Union  of multisets:

union of multisets is represented by ''

the union of a multiset is a multiset of the maximum multiplicity of elements present in one of the given sets.

for example:

1. C={a,a,a,a,b,b,c,d,d,d} and V={a,a,b,b,b,b,c,c,c,d,e,e}

the maximum multiplicity of element 'a' is present in multiset 'C' that is '4'and multiplicity in a  multiset V is '2' 

the maximum multiplicity of element 'b' is present in multiset 'V' that is '4' and multiplicity in a multiset 'C' is '2' 

the maximum multiplicity of element 'c' is present in multiset 'V' that is '3' and multiplicity in a multiset 'C' is '1' 

the maximum multiplicity of element 'd' is present in multiset 'C' that is '3' and multiplicity in a multiset 'V' is '1' 

the maximum multiplicity of element 'e' is present in multiset 'V' that is '2' and multiplicity in a multiset 'C' is '0' 

so, C∪V={a,a,a,a,b,b,b,b,c,c,c,d,d,d,e,e}

The intersection of Multisets: The intersection of the multisets is the multiset of the minimum multiplicity of the elements in the given multisets.

The intersection of the multisets is represented by '∩'

For example:

1. C={a,a,a,a,b,b,c,d,d,d} and V={a,a,b,b,b,b,c,c,c,d,e,e}

the minimum multiplicity of element 'a' is present in multiset 'V' that is '2'and multiplicity in a  multiset 'C' is '4' 

the minimum multiplicity of element 'b' is present in multiset 'C' that is '2'and multiplicity in a  multiset 'C' is '4' 

the minimum multiplicity of element 'c' is present in multiset 'C' that is '1'and multiplicity in a  multiset 'V' is '3'

the minimum multiplicity of element 'd' is present in multiset 'V' that is '1'and multiplicity in a  multiset 'C' is '3' 

the minimum multiplicity of element 'e' is present in multiset 'C' that is '0'and multiplicity in a  multiset 'V' is '2' 

A∩B = {a,a,b,c,d}

Difference of multiset: the difference of multiset is a multiset of the difference of multiplicity of the elements present in the given multisets.

the difference of multisets is represented by '-' means for example A-B

for example:

1.C={a,a,a,a,b,b,c,d,d,d} and V={a,a,b,b,b,b,c,c,c,d,e,e}

C-V={a,a,d,d}

V-C={b,b,c,c,e,e}

the multiplicity of a in multiset 'C' is 4 and in multiset 'V' is 2 so in C-V multiplicity of 'a' is 2(4-2=2) amd in V-C is '0'.(2-4 becomes negative so it is taken as 0 ) and same with all other elements.

Addition of multisets: addition of multisets is a multiset of the addition of all multiplicity of each element in each set.

It is represented by '+' that is A+B

For example:

C={a,a,a,a,b,b,c,d,d,d} and V={a,a,b,b,b,b,c,c,c,d,e,e}

C+V=V+C={a,a,a,a,a,a,b,b,b,b,b,b,c,c,c,c,d,d,d,d,e,e}

the multiplicity of element 'a' in multiset 'C' is 4 and in 'V' is 2 so addition is 6 so it comes 6 times in addition multiset. and same for all elements.

Properties of  multiset operation:

  • A∪B=B∪A
  • A∩B=B∩A
  • A+B=B+A
  • A-B ≠ B-A
Examples on multisets:
Perform all four operations union, intersection, difference and addition on the following multisets: A={a,a,b,b,c,c,d,d,e,e} and B={a,a,a,b,b,b,c,c,c,d,d,d}
solution:
A∪B={a,a,a,b,b,b,c,c,c,d,d,d,e,e}
A⋂B={a,a,b,b,c,c,d,d}
A+B={a,a,a,a,a,b,b,b,b,b,c,c,c,c,c,d,d,d,d,d,d,e,e}
A-B={}
B-A={a,b,c,d,e,e}














Comments

Popular posts from this blog

Inclusion and Exclusion principle, Venn diagram, examples with solutions, set theory , Mathematics

Preposition and logical connectivities in Discrete Mathematics