44.7k views
0 votes
) Cars are parked in line as they come off the assembly lines. There are three models: red cars which take up 2 spaces, blue cars which also take up 2 spaces, and green cars which take up only 1 space. Let an be the number of ways of filling the first n parking spaces with red, blue and green cars.

1 Answer

4 votes

Answer:

Hello your question has some missing information below is the complete question

answer :


a_(n) = a_(n-2) + a_(n-2) + a_(n-1)

Explanation:

Red car and Blue car take up 2 spaces each

Green cars take up 1 space

lets determine the number of ways of filling up the parking spaces

i) First lets assume the last space is filled by Green car then there will be
n^(th) space occupied hence there will be ( n - 1 ) spaces left to be filled in
a_(n-1) ways

ii) lets assume the last space is filled by either a Red car or a Blue car then there will be
n^(th) + ( n -1 )^(st) parking space occupied hence there will be

( n - 2 ) spaces left to be filled in
a_(n-2) ways

Hence A closed formula for
a_(n)


a_(n) = a_(n-2) + a_(n-2) + a_(n-1)

where : a1 = 1 way , a2 = 3 ways

) Cars are parked in line as they come off the assembly lines. There are three models-example-1
User Lilan Silva
by
3.9k points