In: Advanced Math
Let an denote the number of different ways to color the walls of a five-sided room with n colors if you insist that two walls that meet at a corner must be assigned different colors.
(i) compute a1, a2 and a3 directly
(ii) Find the formula for an
Assume there are 5 walls in the room naming A, B, C, D and E in the order.
(i)
For n=1, there is only 1 color present.
If we paint first wall then, there is no other color left for another wall. So,
number of ways=0
a1=0
For n=2, there are 2 colors, C1 and C2 are present.
If we paint wall A with color C1 then its surrounding walls, B and E must be of another color C2.
So, C should be of color C1.
Wall D cannot be of color C2 because of wall E nor of color C1 because of wall C.
So,
Number of ways=0
a2=0
For n=3, there are 3 colors, C1, C2 and C3 are present.
If we paint wall A with color C1 (out of 3 options) then its surrounding walls, B and E must be of another color C2 (out of 2 options each).
So, C could be of color C1 and C3 (2 options).
Wall D cannot be of color C2 because of wall E. If wall C is of C1 color then wall D will be of C3 color and if wall C is of C3 color then wall D will be of C1 color.
Thus, 1 option.
So,
number of ways= (options of coloring wall A) (options of coloring wall B) (options of coloring wall C)(options of coloring wall D) (options of coloring wall E
a3=(3)(2)(2)(2)(1)
=24
(ii)
For any number n, there are n colors, C1, C2 ,C3… Cn are present.
If we paint wall A with color C1 (out of n options) then its surrounding walls, B and E must be of another color C2 (out of n-1 options each).
So, C could be of color C1 and C3 (n-1 options).
Wall D cannot be of color C2 because of wall E. If wall C is of C1 color then wall D will be of C3 color and if wall C is of C3 color then wall D will be of C1 color.
Thus, n-2 option.
So,
number of ways= (options of coloring wall A) (options of coloring wall B) (options of coloring wall C) (options of coloring wall D) (options of coloring wall E)
an=(n)(n-1)(n-1)(n-1)(n-2)