edited by
17,195 views
51 51 votes

A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it, counting repetitions.

  1. What is the number of multisets of size $4$ that can be constructed from n distinct elements so that at least one element occurs exactly twice?
  2. How many multisets can be constructed from n distinct elements? 

8 Answers

0 0 votes

a.
no of the multiset of length 4 such that at least one element is repeated.
n^4 - n(n-1)(n-2)(n-3)
 
b.
length 0 :nC0
length 1 : nC1
lenth 2 : nC1+nC2
.
.
.
lenth n :nC1+nC2+........  nCn

total = 1+(n)nC1+(n-1)nC2+..........+nCn
        

0 0 votes

For question a)

 

Case 1: Exactly ONE element occurs exactly twice

This creates a multiset that looks like $\{a, a, b, c\}$.

  • Choose 1 element out of $n$ to be the one that repeats twice: $\binom{n}{1}$

  • Choose 2 elements out of the remaining $n-1$ to appear once each: $\binom{n-1}{2}$

  • Ways for Case 1: $\binom{n}{1} \times \binom{n-1}{2}$

 
 

Case 2: Exactly TWO elements occur exactly twice (The Correction)

This creates a multiset that looks like $\{a, a, b, b\}$.

  • Choose 2 elements out of $n$ to repeat twice: $\binom{n}{2}$

  • Ways for Case 2: $\binom{n}{2}$
     

Note : We cannot we use the approach of picking one element and then another $\binom{n}{1} \times \binom{n-1}{1}$ , because it overcounts 
example: Suppose we pick first element as 1 and second element as 2 which gives {1,1,2,2,} but since order dosent matter in a multiset if we pick first element as 2 and second element as 1 then it overcounts the same set {1,1,2,2} 

For question b)

Answer is infinite.

Take a single element {A} then possible multisets are 
  • {A}

  • {A, A}

  • {A, A, A}

  • {A, A, A, A}

  • ...and so on, forever.

Position:
Show:

Related questions

51 51 votes
6 answers 6 answers
13.4k
13.4k views
Misbah Ghaya asked Nov 29, 2016
13,440 views
How many substrings (of all lengths inclusive) can be formed from a character string of length $n$? Assume all characters to be distinct, prove your answer.
43 43 votes
6 answers 6 answers
16.7k
16.7k views
Kathleen asked Sep 23, 2014
16,730 views
The number of binary strings of $n$ zeros and $k$ ones in which no two ones are adjacent is$^{n-1}C_k$$^nC_k$$^nC_{k+1}$None of the above
13 13 votes
2 2 answers
4.3k
4.3k views
Kathleen asked Sep 14, 2014
4,347 views
Consider a bank database with only one relation transaction (transno, acctno, date, amount)The amount attribute value is positive for deposits and negative for withdrawa...
20 20 votes
2 2 answers
7.2k
7.2k views
Kathleen asked Sep 14, 2014
7,194 views
(a) Suppose you are given an empty $B^+$ tree where each node (leaf and internal) can store up to $5$ key values. Suppose values $1, 2,\ldots 10$ are inserted, in order, ...