**Theorem**: Let be $f$ a homeomorphism of a compact metric space $X$, then 
$$
h\_{top}(f)=\sup\_{\mu\in \mathcal{M}\_{f}}~ h \_\mu (f)
$$


**Question:** The above theorem is the famous variational principle for compact spaces, I'm looking for an example to see that the hypothesis $ f $ be a homeomorphism is really necessary.


Another known theorem is


**Theorem**: Expansive transformations of compact metric spaces have a measure with maximal entropy.


**Question**: This measure is unique?


Thank you in advance.



Variational Principle for the Entropy
The theorem is true not only for homeomorphisms but also for continuous maps that are not necessarily invertible.


For discontinuous maps $f$, I'm not sure if there's any problem beyond the fact that the definition of topological entropy is generally made under the assumption that $f$ is continuous, and so one needs to check that the definition still makes sense. I believe it does, but one should be careful that there are several definitions (spanning sets, separated sets, open covers are the three most common) which are proved to be equivalent, and it needs to be checked whether or not this proof of equivalence uses continuity. I saw a paper where if I recall correctly, it was claimed that the definitions work and the whole theorem goes through without any assumptions on continuity of $f$ -- Michaela Ciklova, ``Dynamical systems generated by functions with connected $G\_\delta$ graphs'', *Real Analysis Exchange* **30**(2), 2004/2005, pp. 617-638 -- I haven't looked closely through the argument though.


As for your second question, about uniqueness, here you need some stronger hypotheses. One easy way to get non-uniqueness is to let $(X,f)$ and $(Y,g)$ be two expansive systems with equal topological entropy, then consider their disjoint union. The mme for $(X,f)$ and the mme for $(Y,g)$ are both mmes for this new system, so you get non-uniqueness.


A more interesting question is how you get non-uniqueness in the presence of topological transitivity or other ``connectedness'' properties. This was addressed in a couple other MO questions:


[A topologically mixing subshift with multiple measures of maximal entropy](https://mathoverflow.net/questions/26094/a-topologically-mixing-subshift-with-multiple-measures-of-maximal-entropy)


[Transitive shifts with multiple fully supported MMEs](https://mathoverflow.net/questions/43564/transitive-shifts-with-multiple-fully-supported-mmes)


There are various criteria under which you get uniqueness, and that's a broad theory that I could say more about if you want, but I think this answers the question you asked so I'll leave it here for now.


