asked 65.4k views
2 votes
How many strings of length 5 are there over the alphabet { x , y , z } that either begin with z or end with z ?

1 Answer

6 votes

Answer: 135

Explanation:

Given : The total number of alphabets { x , y , z } = 3

The number of possible strings when the first place is occupied by z:_


1*3*3*3*3=3^4=81

The number of possible strings when the last place is occupied by z:_


3*3*3*3*1=3^4=81

The number of possible strings when the first and the last place is occupied by z:_


1*3*3*3*1=3^3=27

Now, the number of possible strings where either begin with z or end with z:-


81+81-27=135

Hence, the number of strings of length 5 are there over the alphabet { x , y , z } that either begin with z or end with z =135

answered
User Shnatsel
by
8.3k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.