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

d) Consider the sequence Dn, where Dn describes the number of ways to paint the

ID: 3199072 • Letter: D

Question

d) Consider the sequence Dn, where Dn describes the number of ways to paint the floors on an n-story building where each floor is painted yellow or blue and no two adjacent floors can be blue (although adjacent floors can be yellow). For example, a 3-story building can be painted in the following ways (each column represents a different way): MODULE CODE& TITLE: MB5014 Problem Solving and Mathematical Modelling 3rd Floor Y Y Y B B 2nd Floor Y Y BY Y 1st FloorY B Y B Y (i) Determine the values of the initial conditions D and D2 from the above information (ii) Write down the second order iterative equation which models the situation in the question. Explain why this is the correct equation

Explanation / Answer

i) D1=2 since there are two options Y or B.

D2=3 since there are 3 options {YY},{YB},{BY}

ii) In Dn the nth floor can be coloured with Y or B.If it is coloured with Y the remaining n-1 floors can be coloured in Dn-1 ways . If nth floor is coloured B then n-1th floor must be coloured Y. The remaining n-2 floors can be coloured in Dn-2 ways . Therefore the n floors can be coloured in Dn-1 +Dn-2 ways since both the cases are mutually exclusive and exhaustive.

hence Dn =  Dn-1 +Dn-2

This is the required second order iterative equation.