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

Construct the recurrence and initial conditions. No uppercase letters. An az is

ID: 3783831 • Letter: C

Question

Construct the recurrence and initial conditions. No uppercase letters.

An az is a string of lower case English letters which follows the rule that all the a's in the string must precede all the z's in the string. (There are 26 unique English letters) These strings are azzes: azo aazz alcatraz alabama puppies xyzzy induction amazon paparazzi These strings are not azzes: zoa azaz arizona zyzzyva zynga pizazz pizzeria Construct a recurrence and appropriate initial conditions for the number of azzes of length n, for n greaterthanorequalto 0.

Explanation / Answer

All a’s in the string must precede all z’s in the string.

Pn=Number of azzess length.

So

Pn =0;

                There can be 26 char so total number is 26.

P1=26   

Two char is in out string so all possible combination is (26C1*26C1) and combination where z will precede a is only one (1C1*1C1) e.i.   za.

So P2 = (26*26) – (1)

Three char is present in our string so all possible combination is (26*26*26) and combination where z come before a is (1C1.1C1.26C1)*3

So P3 = (26*26*26) – 3*(26)

Four char is present in our string so all possible combination is (26*26*26*26) and combination where z come before a is (1C1.1C1.26C1.26C1)*4

So P4 = (26*26*26*26) – 4*(26*26)

From above terms can find nth term

Pn    =    (26)^n – (n)(26)^(n-2)   for all n > 2

P0   =    0

P1    =   26

P2   =   26*26 – 1 = 675

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote