Consider the set L x Element a b c x has length four and co
Consider the set L = {x Element {a, b, c}*: x has length four and contains at least one a and one b. This is a subset of the set of strings of length our containing letters a, b, and c. How many elements are there in L?
Solution
Answer:
All strings of length 4 from {a, b, c} = 4^n Strings containing 0 \'a\' = 2^n Similarly strings containing 0 \'b\' = 2^n Strings containing 0 \'a\' and 0 \'b\' = 1 (cccc) So final ans = 4^n - (2 * 2^n + 1) = 81 - 33 = 48
