What is the cardinality of the set of strings of 0s and 1s t
What is the cardinality of the set of strings of 0\'s and 1\'s that have length exaclty n? What is the cardinality of the set of strings of 0\'s and 1\'s that have length equal or less than 1? Please provide me with your thought process and explanations!
Solution
Cardinality is number of elements in the set.
so .
a string of 0 and 1 having exactly n length will total no permutation of 2n.
so total no of strings = 2n
and also counting the Null string cardinality of the set of strings of 0\'s and 1\'s that have length exaclty n=2n+1
Then, cardinality of the set of strings of 0\'s and 1\'s that have length 1=21+1=3
And
no of strings possible of zero length=0
so we know that
cardinality of empty string is zero as we dont count Null string here.
cardinality of the set of strings of 0\'s and 1\'s that have length less than 1or zero length or empty string=0
