This is an improved version of the answer. The previous version (answering Q1 and Q2) is saved below.

We show now that Q2b is **equivalent** to the question whether a finite set of *translational* Wang tiles may have an irrational supremum density of occurences of some tile in a tiling of the plane. By a *translational* Wang tiles we mean Wang tiles which can be only translated but neither rotated nor reflected. (Thus usual Wang tiles are a partial case.)

$\underline{\Rightarrow}$. Assume that an irrational supremum density in our question may appear. Let $M$ be larger than the diameter of any prohibiting pattern. Cut the optimal arrangement into $M\times M$ squares, and call a $2M\times 2M$ square consisting of four such squares a *tile* (so neighboring tiles overlap by an $2M\times M$, $M\times 2M$, or $M\times M$ rectangle). Then any arrangement of tiles leads to a valid coloring iff the obvious rules how these tiles should be neighbored are satisfied; these rules simply tell which two tiles can be neighbors in which direction. One can easily see that such rules can be modelled by translational Wnag tiles (if needed, I may put more details, but I hope this is known). Finally, it is clear that some of these tiles should have an irrational density, if the total density is irrational.

$\underline{\Leftarrow}$. Conversely, to each system of translational Wang tiles where sime tile may appear with an irrational maximal densiry we put into correspondence the set of patterns in a following manner. We want to construct a corresponding set of patterns.

First of all, by a standard application of Koenig's lemma, it suffices to find arbitrarily large squares which may be colored with the density close enough to irrational $d$, and that no coloring has a density larger than $d$. To prove the lattter, we will use the Wang tiles condition.

Choose a $k$ much larger than the maximal size of a pattern, an even $n$ much larger than $k$, and an even $N$ much larger than $n$. To each pattern, biject some $n\times n$ square so that (i) each square used contains either $d$ or $d+1$ black squares, and it contains all boundary cells; (ii) this square contains $d+1$ black cells if it is of a distinguished type; (iii) any two squares used differ, even if we delete at most $k$ black squares from each. Call the corresponding squares *complete*.

Prohibit any $n\times n$ square which is not a subsquare of a shifted complete square.

For a $(N+n)\times (N+n)$ square one of whose $n\times n$ corners contains a black cell, only its $(2n-1)\times (2n-1)$ corner squares may also contain something black.

These restrictions yield that black cells group into clusters fitting into $n\times n$ squares, and such clusters are sufficiently far apart.

- Finally, put the restrictions on the neighboring $n\times n$ tiles at distance $N$ apart (meaning that the position of the second $n\times n$ square is obtained from that of the first one by the shift by $N$). That is --- prohibit some $n\times (n+N)% and $(n+N)\times n$ arrangements where the bordering complete squares are of types which cannot be neighbors in this way. (Recall here that we enumerate all
*translational* types, so rotation of a Wang tile changes its type!)

**END_OF_CONSTRUCTION**

Now, an aperiodic Wang tiling with irrational maximal possible density of a disinguished tile provides an arrangement which we want to prove to be optimal. Let $\alpha$ be its density.

Consider some optimal arrangement. We claim that it contains arbitrarily large squares which are organized as if they correspond to some lagre piece of a Wang tiling. Take any $ND\times ND$ square $Q$, where $D$ is large, and $Q$ has a density at least $\alpha$. Then, even if its clusters are arranged not that regularly, the restrictions we have yield that there exists a large subregion of $Q$ where they are arranged regularly, and the density is still large. This is what we needed (recall Koenig's lemma).

**OLD VERSION.** It seems that one may encode, say, Wang tiles by this type of restrictions. E.g. it answers Q2 (and Q1 in its present form) in the affirmative.

Proceed as follows. Assume you have $\leq n!$ translational types of yiles. Choose $N$ much larger than $n$.

Prohibit two black cells in one row or column of an $n\times n$ square.

Tell that all black cells in a $N\times N$ square should lie in some $n\times n$ square.

After that, the density is bounded by $n/N^2$, and we would like to reach this bound. For that, if we want a periodic arrangement of such density, each $N\times N$ square should contain exactly $n$ black cells in an $n\times n$ square, all in different rows and columns (we say that such $n\times n$ square is *complete*). We biject some of complete squares to the elements of a chosen set of Wang tiles and prohibit the rest.

- Tell that in an $(n+N)\times (n+N)$ square, if one $n\times n$ corner contains $n$ cells, then only the other corners of size $n\times n$ may contain black cells.

This shows that the positions of complete squares in a periodic arrangement form a lattice generated by $(0,N)$ and $(N,0)$.

- Finally, impose the restrictions on the neighboring tiles as you wish. That is --- prohibit some $n\times (n+N)$ and $(n+N)\times n$ arrangements where the bordering complete squares are of types which cannot be neighbors in this way. (Recall here that we enumerate all
*translational* types, so rotation of a Wang tile changes its type!)

Now, since we know that there exists a set of Wang tiles admitting non-periodic tilings only, this shows that the maximal density arrangement can indeed be aperiodic.