Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Determine how many strings of n lowercase letters from the English alphabet c

ID: 3753164 • Letter: 1

Question

1. Determine how many strings of n lowercase letters from the English alphabet contain

(a) the letter a.

(b) the letters a and b.

(c) the letters a and b in consecutive positions with a preceding b, with all letters of the string distinct.

(d) the letters a and b, where a is somewhere to the left of b in the string, with all letters distinct.

2. Five rooms of a house are to be painted in such a way that rooms with an interconnecting door have different colors. If there are n colors available, how many different color schemes are possible when the rooms in the house are arranged in the following way?

(a) Connected rooms form a linear order with one door interconnecting two adjacent rooms.

(b) Connected rooms form a linear order with one door interconnecting two adjacent rooms. The first and last rooms must be colored differently.

(c) Connected rooms form a circular order with one door interconnecting two adjacent rooms.

Explanation / Answer

1. Determine how many strings of n lowercase letters from the English alphabet contain

lowercase letters strings =n

(a) the letter a.

no of strings = total no of strings without restriction- strings that do not contain letter a

no of strings = 26n - 25n

---------------------------------------------------------------------------------------------------------------------------------------

(b) the letters a and b.

Here  Inclusion-Exclusion Principle will be applicable

no of strings = 26n - 2*25n + 24n

---------------------------------------------------------------------------------------------------------------------------------------

(c) the letters a and b in consecutive positions with a preceding b, with all letters of the string distinct.

Now ab is a block and we left with 24 other letters.

the string consists of n lowercase letters, there are (n-1) positions for ab

example: abx1x2x3....xn-2, x1abx2x3...xn-2

remaining all letters are distinct n=24 and r=24

P(24,24) = 24!/0! =24!

using product rule: 24!*(n-1)

---------------------------------------------------------------------------------------------------------------------------------------

(d) the letters a and b, where a is somewhere to the left of b in the string, with all letters distinct.

we need 2 positions out of n : P(n,2)

Exactly half will have a proceeding b =  P(n,2)/2

remaining all letters are distinct n=24 and r=24

P(24,24) = 24!/0! =24!

using product rule: 24!*P(n,2)/2

---------------------------------------------------------------------------------------------------------------------------------------