Entropy of a random message chosen by an adversary from a subdomain Assume we have a set of random bit strings: $S=\{s_1,...,s_n\}$, where each of them is of length $\lambda$ ($s_i\leftarrow\{0,1\}^{\lambda}$).

We give the set $S$ to an adversary who picks one of the set elements at will and outputs it. Let's $s'\in S$ be the adversary's choice.

Question: What is the entropy of $s'$?
You did not define what the probability that $s_i = s^\prime$ for each $i$. Therefore entropy is undefined.

The definition of (Shannon) entropy is:

$$H = - \sum_{i} p_i \log_2 p_i$$

When you determine every non-zero probability $p_i$ then come back and enter those numbers into the formula.

Knowledge of $|S|$, the elements of $S$, or $\lambda$ is insufficient for calculation purposes. In different contexts (even if $S$ and $\lambda$ are the same), the probability of each message can follow a different distribution. The entropy depends only on what that distribution is. Therefore, the entropy of $s^\prime$ can be different depending on context.



Examples of the different contexts:


We care about the adversary's ability to guess $s^\prime$. This is trivial. The adversary picked the number. The adversary is certain what that number is. Certainty means one outcome has a probability of exactly one. The only non-zero $p$ is one. Entropy is zero because the log of one is zero.
A first party ("us") sends the set $S$ to a second party. The second party picks an element of that set. The first party wants to guess it before the adversary reveals it. The entropy can be at least zero bits and at most $\log_2 {|S|}$ bits. Exactly what value that entropy is depends on what the probability distribution is that describes which element the adversary picks.
The above scenario, except the first party tries to guess the number after the the second party reveals it to them. The entropy is zero. The first party is certain what that value is. $p = 1$
The first party chooses a set. A second party chooses an element of that set. A third party is supposed to guess what element was chosen with no knowledge of what choices the first or second party made. The entropy, $H$ satisfies, $0 \leq H \leq \log_2{|S|} \leq \log_2 (2^\lambda)$ The exact value depends both on the distribution of possible $S$ values the first party may choose and the distribution describing which element the second party may choose from any given set. See "joint entropy".