Hi!
I need help with the following question:
How many possible combinations are there to tile a road with n stones, colored red, blue, and yellow,
so that there will be no sequence of two stones of the same color?
What I did: the first stone can be either blue, red, or yellow, so it has 3 options. From the second stone onwards, there are only 2 options per stone,
because a stone cannot have the same color as the one before it. So in total, I have 3* 2n-1 combinations.
I was wondering about the possibility that n=0, and that led me to think that maybe a recursive formula is necessary here.
I would be happy to hear your thoughts about this!
thanks
I need help with the following question:
How many possible combinations are there to tile a road with n stones, colored red, blue, and yellow,
so that there will be no sequence of two stones of the same color?
What I did: the first stone can be either blue, red, or yellow, so it has 3 options. From the second stone onwards, there are only 2 options per stone,
because a stone cannot have the same color as the one before it. So in total, I have 3* 2n-1 combinations.
I was wondering about the possibility that n=0, and that led me to think that maybe a recursive formula is necessary here.
I would be happy to hear your thoughts about this!
thanks