Count the number of strings of length 8...

In summary, the question asks to count the number of strings of length 8 over the set $A = \{w, x, y, z\}$, starting with either $w$ or $y$ and containing at least one $x$. The answer is 28,394.
  • #1
shamieh
539
0
Count the number of strings of length $8$ over $A = \{w, x, y, z\}$ that begins with either $w$ or $y$
and have at least one $x$


I don't understand this question at all. First of all, this is a set A that contains 4 elements $w,x,y,z$ correct? They are asking me to count the number of strings of length 8? None of these are length 8, what are they asking me? Also wouldn't this be:

$A = \{ wxyz, wzxy, wyxz, ... \}$ I mean I'm going to have a lot of different combinations right? Also, every single group contained in the set is going to have at least one $x$.. I am so confused here.
 
Physics news on Phys.org
  • #2
Wait.. am I making this harder than it is? Is that just $4^8$
 
  • #3
|Ok I think I've figured it out.. Can someone check my work? Sorry to be a pest with the triple posts...

$A = \{w,x,y,z\}$

$U = \{w,y\} * A^7$

$S = \{w,y\} * \{w,y,z\}^7$

$|U - S| = |U| - |S|$

$= |\{w,y\} * A^7| - |\{w,y\} * \{w,y,z\}^7|$

$= |\{w,y\}||A|^7 - |\{w,y\}||\{w,y,z\}|^7$

$= 2(4^7) - 2(3^7) = 28,394$
 

Similar threads

Back
Top