Find the recurrence relation

109 Views Asked by At

Assume that a must course lasts for $2$ hours while both a technical elective course and a free elective course lasts for $1$ hour. Find the recurrence relation for the number of ways to arrange these three types of courses in n hours such that no three electives courses (technical/free) can occur consecutively.

I have no idea about this question. I can't write any step

1

There are 1 best solutions below

5
On

HINT: this is asking for the sequences of n digits where we have A free curses, B technical curses and C must courses, where C appears in group of 2 and doesnt exist any subsequence with As and Bs longer than 2.

It means that we only can see blocks of even Cs separated by a block of the kind A, B, AA, BB, AB or BA.

Example: for $n=2$ the unique sequences are CC, AB, BA, AA or BB. For $n=3$ there are CCA, CCB, ACC or BCC.

Extra HINT: notice that any sequence with $n\ge4$ just can end with the subsequences -CCX, -CCXX and -CC, where X is A or B.