Grid Coloring

Logic Level 2

Find the number to color a 3 by 3 grid using 6 distinct colors, such that at least one cell of each row is colored. A coloring is considered different if it contains different color in at least one cell. You must use all 6 colors, no color can be used more than once.

Here are some possible valid colorings(all of these are different ways):


The answer is 58320.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Jaber Ahmed
May 4, 2021

First let's select cells to color. This can be done in 9C6-3 ways (there are three cases where a row is empty). Now arrange colors in these 6 cells in 6! way. So answer is (9C6-3)*6! = 58320

Shadman Tabib
May 4, 2021

(9!/3!)-6!*3

Having 6 different colors and 3 same color(blank) can be arranged in 9!/3! ways...Then we have to deduct the number of permutations which bear 3 blank colors at each row.And it will be 6! * 3(as there are 3 rows).. Finally we get (9!/3!)-(6!*3) That's it!!

I have found another solution...
There are 2 cases... The rows will be 1,2,3(colored) or 2,2,2(colored) configuration
1st case:6C1 * 5C2 * 3C3 * 3P1 * 3P2 * 3P3 * 3!
2nd case:6C2 * 4C2 * 2C2 * 3P2 * 3P2 * 3P2
By adding these-58320



Azim Sikder - 1 month, 1 week ago

Log in to reply

this was the intended solution tbh, doing casework as contraint is small :D

Jaber Ahmed - 1 month, 1 week ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...