## anonymous 4 years ago Fool's problem of the day, A tiled floor has dimensions $$m \times m$$ sq.m. The dimensions of the tile used are $$n\times n$$ sq.m. All the tiles used are green tiles except the diagonals tiles which are red. After some years some green tiles are replaced by red tiles to form an alternate red and green tile pattern.If $$m \neq n$$ and total number of tiles are odd then how many green tiles are removed?

1. anonymous

PS: http://finance.groups.yahoo.com/group/ascent4cat/message/2900 http://finance.groups.yahoo.com/group/ascent4cat/message/2915 These solutions are incorrect.

2. anonymous

I am not so sure. is it $$\large m(\frac{m}{n*2} - \frac{3}{2})$$

3. anonymous

I am sorry Ishaan :(

4. anonymous

Umm m is the dimension of the tiled floor, n the dimension of a tile. So, total number of tiles in a column or row (since it's a square) must be $$\frac{m}{n}$$. Hmm then we have boundary of red tiles and we wish to create an alternate pattern of Red and Green (Horrible color combination btw). The number of red tiles would be always 1 greater than Green ones after the completion of alternate pattern.(initially we have two tiles in red of each row or column) So, in one row $$\large\frac{\frac{m}{n} -2 -1}{2}$$ must be green. We have m-2 column not m sorry. Hence, the answer should be $$\large \frac{\frac{m}{n} - 3}{2} (m-2)$$ Am I doing it right?

5. anonymous

Oh Wait.. I did something again umm It should be $\left(\frac{\frac{m}{n} -1}{2}\right) ( m-2)$

6. anonymous

Oh no I did something again $\frac{\frac{m}{n} - 1}{2}, \text{ is the number of green tiles} \implies \text{number of red tiles must be } \frac{m}{n}- 2 - \frac{m}{2n} - \frac{1}{2}$ $\frac{m}{n}- 2 - \frac{m}{2n} - \frac{1}{2} = \frac{m}{2n} - \frac{3}{2}$ So number of tiles to be replaced are $$\left( \frac{m}{2n} - \frac{3}{2} \right) (m-2)$$

7. anonymous

I can't believe I took so much time to solve a CAT question and still don't know if it's right

8. anonymous

Sorry again it's not what I got, I am getting confused again and again $\left( \frac{m}{2n} - \frac{3}{2} \right) (\frac{m}{n}-2)$ Because m/n is the number of rows and column not m

9. anonymous

Doesn't seem correct, if you want I can give you the answer.

10. anonymous

Impossibru I checked my logic for even number of rows and column

11. anonymous

Hmm lemme check again

12. anonymous

For Odd this time

13. anonymous

Mere working for small m,n doesn't mean a conclusive proof.

14. anonymous

The correct answer is $$\frac{1}{2} n^2 \left((m-2 n)^2-n^2\right)$$

15. anonymous

$\left( \frac{m}{2n} - \frac{1}{2} \right) (\frac{m}{n}-2)$ Umm but you don't have n in the denominator? How do you get rows and column?

16. anonymous

$\frac{1}{2}* \frac{1}{n^2} (m-n)(m-2n) = \frac{1}{2n^2} ( m^2 - 2mn -nm + 2n^2)$This is all I am getting umm looks like I will have to check again

17. anonymous

$\left( \frac{m}{2n} - \frac{3}{2} \right) (\frac{m}{n}-2)$ $\frac{1}{2}\left( \frac{m}{n} - \frac{3}{1} \right) (\frac{m}{n}-2)=\frac{1}{2}* \frac{1}{n^2} (m-3n)(m-2n) = \frac{1}{2n^2} ( m^2 - 2mn -3nm + 6n^2)$ Lets take the case of a floor where m = 99 and n = 1, total rows = columns = 99. 97 tiles in each row are green, 2 are red. We need an alternate pattern which consists of 50 red tiles and 49 green. Since 2 were already red 48 tiles were replaced in each row and there are 99-2 columns on the floor (first and last columns are completely red so no replacement). total tiles to be replaced = 48* (99-2) = 48*97 By my formula I get the same $\frac{1}{2}(99-3)(99 -2) = 48*97=4656$ And with yours (foolformath's solution) $$\frac{1}{2} n^2 \left((m-2 n)^2-n^2\right)$$, I am getting $\frac{1}{2}* 1* ((99-2)^2 - 1) = 4704$ What did I miss? Please tell me where I am wrong?

18. anonymous

Oh I get it Diagnol's tiles are red, I thought the floor was bounded by red tiles. Silly me I should learn to read questions properly

19. anonymous

$f(tiles)= \left\{\begin{array}{r}\left( \frac{1}{2}\right)\left( \frac{m}{2n} - 3 \right) \left(\frac{m}{n}-2\right) + \frac{m}{2n} -\frac{3}{2}, \text{if} &\frac{m}{n} \in \{(4k-3), k \in \mathbb{N}\} \\ \left(\frac{1}{2}\right)\left( \frac{m}{2n} - 3 \right) \left(\frac{m}{n}-2\right) + \frac{m}{2n} - \frac{1}{2}, \text{if}& \frac{m}{n} \in \{(4k -1), k \in \mathbb{N}\} \end{array} \right.$ $$f(tiles)$$ is the function for number of tiles lol I know I have made it so complicated but it works! :-D lol

20. anonymous

I can't stop laughing lol I made it so bad and yet it works.

21. anonymous

Nah it doesn't works I committed some error again I will check out this problem later

22. anonymous

work*

23. anonymous

$f(tiles)= \left\{\begin{array}{r}\left( \frac{1}{2}\right)\left( \frac{m}{n} - 3 \right) \left(\frac{m}{n}-2\right) + \frac{m}{2n} -\frac{3}{2}, \text{if} &\frac{m}{n} \in \{(4k-3), k \in \mathbb{N}\} \\ \left(\frac{1}{2}\right)\left( \frac{m}{n} - 3 \right) \left(\frac{m}{n}-2\right) + \frac{m}{2n} - \frac{1}{2}, \text{if}& \frac{m}{n} \in \{(4k -1), k \in \mathbb{N}\} \end{array} \right.$ Correction* Note. I am testing it

24. anonymous

I have it FINALLY! $\frac{1}{2} \left(\left(\frac{m}{n}-2\right)\left(\frac{m}{n}-3\right) + \frac{m}{n} -3\right) = \frac{1}{2} \left(\frac{m}{n} -3\right) \left( \frac{m}{n} -1\right)$

25. anonymous

Yay! I got it! The closed form! Yay!

26. anonymous

Took me time, pathetic :-/

27. anonymous

Hehe, should i post my solution?

28. anonymous

Yeah, you should

29. anonymous

Okay, after few hours :)

30. anonymous

Done! :-)