Count the number of strings of length 8...

Click For Summary
SUMMARY

The discussion focuses on counting the number of strings of length 8 over the set A = {w, x, y, z} that begin with either 'w' or 'y' and contain at least one 'x'. The solution involves defining two sets: U, which includes all valid strings starting with 'w' or 'y', and S, which excludes strings without 'x'. The final calculation yields 28,394 valid strings, derived from the formula |U| - |S| = 2(4^7) - 2(3^7).

PREREQUISITES
  • Understanding of combinatorial counting principles
  • Familiarity with set notation and operations
  • Knowledge of string formation from a defined set
  • Basic algebra for manipulating exponential expressions
NEXT STEPS
  • Study combinatorial counting techniques using the principle of inclusion-exclusion
  • Learn about generating functions in combinatorics
  • Explore advanced topics in discrete mathematics related to string theory
  • Practice problems involving permutations and combinations with constraints
USEFUL FOR

Mathematicians, computer scientists, and students studying combinatorics or discrete mathematics who are interested in string counting problems and set theory applications.

shamieh
Messages
538
Reaction score
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
Wait.. am I making this harder than it is? Is that just $4^8$
 
|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

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 66 ·
3
Replies
66
Views
7K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
993
  • · Replies 5 ·
Replies
5
Views
2K
Replies
11
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
4
Views
7K