This question is about an extension of the variational principle in thermodynamical formalism when one adds linear constraints to the measures.

Consider the one-sided shift $\sigma:\mathcal{A}^\mathbb{N}$ where $\mathcal{A}$ is a finite alphabet ($\{0,1\}$ say). Consider a test function $\varphi:\mathcal{A}^\mathbb{N}\to \mathbb{R}$, of Hölder regularity with respect to a usual metric, $d(x,y) = 2^{-\min\{i,x_i\neq y_i\}}$ say, and assume that $0$ is in the interior of the interval of values taken by $\int\varphi \,d\mu$ when $\mu$ runs over shift-invariant probability measures.

Consider the following question:

How to find a shift invariant probability measure $\mu$ such that $\int\varphi \,d\mu=0$ and which maximizes the metric entropy $h(\sigma,\mu)$ under this constraint?

Together with collaborators we developed tools about the thermodynamical formalism which allow us to answer such a question. What I would like to know is whether this should be considered a mere illustration of our methods or a true application.

My question:Is the answer to the above question known? If yes, could you give a reference? How difficult is it? If no, do you know a reference where this kind of question is explicitly asked?

In fact, we can deal with multiple constraints of the same form, and optimize pressure $h(\sigma,\mu) + \int A \,d\mu$ of yet another function $A$, and we can deal with more general dynamical systems (we mostly need a spectral gap for the Ruelle operator).

Just to examplify the above, let me give the answer in two cases, using $\mathcal{A}=\{0,1\}$ in denoting by $w*$ the cylinder defined by a finite word $w$.

**Example 1:** among shift-invariant measures $\mu$ such that $\mu(0*) =
.9$, the Bernoulli measure of parameter .9 (i.e. the law of the word
$\alpha_1\alpha_2\dots$ where the $\alpha_j$ are i.i.d. random variables taking the value $0$ with probability .9) maximizes entropy.

**Example 2:** Among shift-invariant measures $\mu$ such that
$\mu(01*) = 2\mu(11*)$, the Markov measure associated
to the transition probabilities
\begin{align*}
\mathbb{P}(0\to 0) &= 1-a & \mathbb{P}(0\to1) &= a \\
\mathbb{P}(1\to0) &= \frac23 & \mathbb{P}(1\to1) &= \frac13
\end{align*}
where $a$ is the only real solution to
$$(1-a)^5=\frac{4}{27} a^2 \qquad (a\simeq 0.487803)$$
maximizes entropy.

The first example feels quite obvious (but I do not know if there is a really easy way to prove it) while the second surprised me quite a bot (hoping that I did not messed up the computations).