TITLE: Minimum number of marked squares on $n × n$ board
QUESTION [6 upvotes]: Came across this question:
Consider an $n × n$ square board, where $n$ is a fixed even positive integer. The board is divided into $n^2$ unit squares. We say that two different squares on the board are adjacent if they have a common side.
$N$ unit squares on the board are marked in such a way that every square (marked
or unmarked) on the board is adjacent to at least one marked square. Determine the smallest possible value of $N$.
I've found an upper bound of $N = \frac {n^2}2$. But is this the smallest possible value of $N$? If so, how can I prove it?
I've included an illustration of my upper bound for $n=2$ and $n=4$ below.

Edit
@jwsiegel has linked to the supposed solution here: http://www.cs.cornell.edu/~asdas/imo/imo/isoln/isoln993.html
It gives the solution
$$N = \frac{n(n+2)}{4}$$
I don't understand how this solution is correct. The instructions for marking squares is given as:

Color alternate squares black and white (like a chess board). 
Look first at the odd-length white diagonals. In every other such diagonal, mark alternate squares (starting from the border each time, so that r+1 squares are marked in a diagonal length 2r+1). 

That's it. I have followed these instructions (as I understand them) for $n=4$ and $n=6$ below, using an X to indicate a marked square:

The number of marked squares fits the given solution, i.e. $N = 6$ for $n = 4$ and $N = 12$ for $n = 6$, but NO marked square is adjacent to any other marked square! How then is this a valid solution?
I can only see 3 possibilities:

I have marked incorrectly, or
The people who made this solution count a common corner as a common side between 2 squares, or
The solution is incorrect.

Please explain what I'm missing.

REPLY [2 votes]: jwsiegel has already provided both an asymptotic answer to the original question, and a link to a closed-form solution. I will address the Juan's question in the comments on jwsiegel's answer and Jens's follow-up question in the original post.
In answer to Juan's question, "For even n, this is better, but does this work if n is odd?":
Nothing in jwsiegel's asymptotic result makes any assumption on the parity of $n$. His answer provides a covering of the infinite plane which satisfies the rules given in the original post. When this marking is restricted to an $n \times n$ board, you get a marking of the board in which every interior square is adjacent to a marked board, with roughly a forth of the squares marked (exactly 1/4 if $n$ is a multiple of 4). To then cover the boundary as well, you need to add no more than $4(n-1)$ additional squares. When $n$ approaches infinity, this contribution becomes negligible, so we get that, for $n$ large, his covering of the board requires about a quarter of the squares to be marked. Since each square is adjacent to at most 4 other squares, it follows that this result is asymptotically optimal.
It is, in principle, possible to precisely calculate how many squares are marked by this procedure, but there is no reason to expect that it will be optimal for any fixed $n$. What the asymptotic solution does do is provide guidance for what a closed-form solution must satisfy, namely, that $$\lim_{n \to \infty} \frac{N}{n^2} = \frac{1}{4}.$$
Now, for OP's question. You forgot this part: "In every other such diagonal..." With that in mind, here are the cases you wrote up, corrected. Let the upper-left hand corner be white, as in your pictures. I've indicated the black squares using an ascii box; hopefully that should make it pretty clear.
$n=4$:
 X | ■ |   | ■ 
---------------
 ■ |   | ■ | X 
---------------
   | ■ |   | ■ 
---------------
 ■ | X | ■ |   

$n=6$:
 X | ■ |   | ■ | X | ■ 
-----------------------
 ■ |   | ■ |   | ■ |   
-----------------------
   | ■ | X | ■ |   | ■ 
-----------------------
 ■ |   | ■ |   | ■ | X 
-----------------------
 X | ■ |   | ■ |   | ■ 
-----------------------
 ■ |   | ■ | X | ■ |   

Observe that every black square is adjacent to exactly one marked white square. Now, as you observed, of course, no white square is adjacent to any marked square. But if we apply the exact same procedure to mark the black squares, then we obtain a marking of the entire board such that every square is adjacent to exactly one marked square. Then the claims are that (1) this board has $n(n+2)/4$ marked squares, and (2) this number of marked squares is optimal. Note that this closed form solution absolutely does depend on assuming that $n$ is even.