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 himgta asked Mar 3, 2019 himgta 840 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
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 vipul2097 answered Mar 3, 2019 • selected Mar 3, 2019 by srestha vipul2097 comment Share Follow See all 2 Comments See all 2 2 Comments reply himgta commented Mar 3, 2019 reply Follow Share I have already visited that link, my doubt is we have checked red followed by green, red followed by gray but we have not checked green followed by red and gray followed by red, I think they should be the separate cases...Right?? 0 votes 0 votes srestha commented Mar 3, 2019 reply Follow Share No, they are not separate cases they are already considered because, green can be followed by anything red or gray It can do it in $a_{n-1}$ ways 1 votes 1 votes Please log in or register to add a comment.