840 views
0 votes
0 votes
Find a recurrence relation for the number of ways to lay out a walkway with slate tiles if the
tiles are red, green, or gray so that no two red tiles are adjacent and tiles of the same color
are considered indistinguishable

1 Answer

Best answer
1 votes
1 votes

We assume that the walkway is one tile in width and n tiles long, from start to finish. Let an be the number of ways to lay out a walkway with n tiles. Consider that the first tile is green, then there are an−1 ways to lay out the remaining walkway with n − 1 tiles without adjacent red tiles. Also, if the first tile is gray, then it also follows that there are an−1 ways to lay out the remaining walkway with n − 1 tiles. We can also consider the first tile is red followed by a green tile, then there are an−2 ways to lay out the remaining walkway with n − 2 tiles. Continuing from before, red followed by gray would also leave us to lay out the rest of the walkway with n − 2 tiles. This would mean that our recurrence relation is an = an−1 + an−1 + an−2 + an−2. Simplified, an = 2an−1 + 2an−2, for n ≥ 2.

 

See For Reference:-http://courses.ics.hawaii.edu/ReviewICS241/morea/counting/RecurrenceRelations-QA.pdf  8.1 pg.512#27

selected by

Related questions

0 votes
0 votes
1 answer
2
Ayush Upadhyaya asked Jun 24, 2018
255 views
How many ways are there for a horse race with three horses to finish if ties are possible.(Two or three horses may tie).
0 votes
0 votes
0 answers
3
1 votes
1 votes
0 answers
4
Ayush Upadhyaya asked Dec 20, 2017
569 views
How many positive integers less than 1,000,000 have the sum of their digits equal to 19?