Let $\Omega$ be the set of all infinite binary sequences $(x\_i)\_{i\ge 0}$ endowed with the product topology coming from discrete topology on $\{0,1\}$.
Consider $0<\alpha<1$ and let $$K\_\alpha=\{(x\_i)\in\Omega:\lim\_{n\to\infty}\frac{1}{n}\sum\_{i=0}^{n-1}x\_i=\alpha\}.$$
Let $\mathcal{M}\_\sigma(\Omega)$ stand for the family of all shift invariant Borel probability measures on $\Omega$. For $\mu\in\mathcal{M}\_\sigma(\Omega)$ we write $h(\mu)$ for the Kolmogorov-Sinai (metric) entropy of $\mu$. Let $M\_\alpha$ be the set of shift invaraint measures concentrated on $K\_\alpha$, that is, $M\_\alpha=
\{\mu\in\mathcal{M}\_\sigma(\Omega):\mu(K\_\alpha)=1\}$.
It is easy to see that $M\_\alpha$ is a closed subset of $\mathcal{M}\_\sigma(\Omega)$ equipped with the weak$^\*$ topology. 
What can be said about the number $\eta=\sup\{h(\mu):
\mu\in M\_\alpha\}$?


It is clear that the supremum is achieved by some ergodic measure, because $\mu\mapsto h(\mu)$ is upper semicontinous on $\mathcal{M}\_\sigma(\Omega)$. But is a measure achieving that maximum unique? 


Uniqueness is true for $\alpha=1/2$, where the Bernoulli measure attains the maximum.


A similar (but I am not sure if equivalent question) is the following:


Let $K\_\alpha'$ be the set of all numbers in the unit interval whose binary expansion belongs to $K\_\alpha$. What is the Hausdorff dimension of $K'\_\alpha$?



Measures maximizing entropy in a set of measures with fixed average for some observable
In the setting you describe, for each $\alpha \in (0,1)$ the $(1-\alpha,\alpha)$-Bernoulli measure is the unique measure achieving the maximum. The function $\alpha \mapsto \eta(\alpha)$ is the Legendre transform of the function $t\mapsto P(t\phi)$ where $\phi(x) = x\_0$ and $P$ is topological pressure. This is all part of the "multifractal analysis" of the system: see [this other question](https://mathoverflow.net/q/207570/5701) and my answer there for some references and some more explanation.


As for the Hausdorff dimension of $K\_\alpha'$, it's given by $\eta /\log 2$, since $\log 2$ is the Lyapunov exponent of the doubling map $f$, and binary expansions are codings of trajectories under $f$. Informally this follows from the relationship dimension = entropy / exponent; to make this a little more precise you can consider Bowen's equation, which gives Hausdorff dimension of a set $E$ as the unique root of $t\mapsto P\_E(t\phi)$, where $P\_E$ is topological pressure, but this time defined for sets that need not be compact or invariant, using the definition of Pesin-Pitskel (following Bowen's noncompact entropy definition); see [this other question](https://mathoverflow.net/q/34415/5701) for some more details and references.


