Computer Science, asked by kbisht31, 2 months ago

Number of ways to paint
Send Feedback
You have to paint a two dimensional fence of height 2
units and length 3 units. Please refer to the image
given to find the two dimensional fence to be painted.
3 units of
length
2 units of
height
You are given three colours (red, green and blue) and
you have to point each cell with the given colours such
that no adjacent cells have the same colour Two cells
are said to be adjacent, if they share a common edge
Or Side
You have to return the number of ways in which you
con paint the fence
lol

Answers

Answered by guptapranesh750
2

Answer:

The number of ways should be 54.

Explanation:

If you count for every block by considering every condition then you will get your answer. and another way to get answer, you can code and then you can get your answer.

Answered by amitnrw
1

Given : paint a two dimensional fence of height 2  units and length 3 units.   three colours (red, green and blue) and  you have to point each cell with the given colours such  that no adjacent cells have the same colour

To Find : Number of ways it can be painted

Solution:

Total Cells  = 2 x 3  = 6

Lets number them

 1        2             3

 4       5             6

1st can be colored in 3 ways

2nd and  4th can be colored in 4 ways

2 ways : 2nd and  4th  same  then 3rd & 5th can be in 4 ways

2 ways  3rd & 5th - same  6th can be in 2 ways

2 ways  3rd & 5th - Different 6th can be in 1 ways

= 3 x  2  x 2  x  2   + 3 x  2 x  2 x 1

= 24 + 12

= 36

2 ways  2nd and  4th different then 5th can be in 1 way and  

3rd and 6th in 3 ways

= 3 x 2 x 1 x 3

= 18  

36 + 18 = 54 Ways  

54 Ways

Learn More:

20160Determine the number of ways to arrange HACKEREARTH so ...

https://brainly.in/question/25814497

A sleeper coach in a train has 8 lower berths, and 10 upper berths ...

https://brainly.in/question/13468915

Find the number of ways of drawing 9 balls from a bag that has6 red ...

https://brainly.in/question/13094556

Similar questions