Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a question regarding recurrence relations problem....If I have a hallway with length '1 by n' and 4 types of carpet: Red, Blue, Green,

I have a question regarding recurrence relations problem....If I have a hallway with length '1 by n' and 4 types of carpet: Red, Blue, Green, and Purple with sizes 1 by 5, 1 by 2, 1 by 1, and 1 by 1 respectively. There are some conditions as well, all green/purple carpets should appear AFTER red/blue carpets. Also, I cannot have green carpet AFTER purple. For example, an INCORRECT combination for a 1 by 10 hallway is 1 red carpet, 1 green carpet, 1 purple carpet, 1 green carpet, and 1 blue carpet is not allowed for the 2 reasons stated above. Because a green carpet is after a purple carpet and also the blue carpet is after green/purple. One CORRECT combination would be for the 1 by 10 hallway 1 red carpet, 1 blue carpet, 2 green carpets, and 1 purple carpet. I need to find the recurrent relation for this problem. I managed to solve most of it and came up with this so far: an= an-1 + (an-1 - an-2). However this recurrence relation does not take into account hallways that are made up of ONLY of RED and BLUE carpet. So the example I gave above would be counted in this recurrence relation because it has purple/green in the hallway. I am not sure how to count hallways with only Red/Blue carpet. Please explain how I can correct my recurrence relation to also count Red/Blue hallways. Here are some initial conditions: a0 = 1, a1 = 2, a2=4, a3=6, a4=9,a5=13, a6=18. So to clarify a6=a5+(a5-a4)+(ONLY RED/BLUE HALLWAYS) Thanks.

image text in transcribed
Part 1: You are laying out carpet on a 1 meter by n meter hallway. You have available two different swatches of carpet: 1x5 red carpet and 1x2 blue carpet. Red Construct a recurrence with appropriate initial conditions for the number of ways to carpet a hallway of length n. - Justify your solution. Use as many initial condltions as you need, but no more. Blue Two different solutlons of length 12 No, can't overlap; this is bad No, can't go outside the lines; this is bad - No, can't leave gaps; this is bad Part 3: I I Same as part 1, except now we have green and purple swatches, each of which are 1x1. These can only appear Green Purple after all the red and blue swatches, and any greens must appear before any purples. No, can't have a blue swatch after green I purple No, can't have a green swatch after purple Three valid solutions of length 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Colouring And Applications

Authors: Pierre Hansen ,Odile Marcotte

1st Edition

0821819550, 978-0821819555

More Books

Students also viewed these Mathematics questions

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago