TITLE: Must a Set's size be a natural number, and would the contrary invalidate a solution?
QUESTION [6 upvotes]: I came up with a way of solving this counting problem that's not in my textbook and I am wondering if it is still valid because in one of the intermediate steps I calculate the number of elements in a subset and I often get a non-integer answer like $9.5849\dots$
The questions is
How many subsets of $S = \{1,2,....n\}$ contain at least one of the 
    elements $\{1,2\}$ and at least $2$ of the elements $\{3,4,5\}?$
First I got the number of subsets which have at least one of the elements $\{1,2\}$ by using the subtraction principle and by using powers of two. For each element in the set I ask 'is this in the set?' and there are two options, yes or no. So the total number of subsets is $2^{n}.$ And finally I use subtraction because the number of subsets with at least one element from $\{1,2\}$ is the same as the total minus the number of subsets with nothing from $\{1,2\}:$
$$m = 2^{n} - 2^{n-2}$$
Next, I tried something different. I tried to imagine that I was starting the problem all over again but this time the original set is smaller. Now
$S = \{1,2....k\}$ 
    where $k = log_{2}(m)$ 
I figured this was sound because if I had 10 element I would have $2^{10} = 1024$ possible subsets and $log_{2}(1024)$ gives me the number of elements in the set which is $10.$
Now I just have answer the simpler question:
How many subsets of $S = \{1,2,....k\},$ where $k = log_{2}(m),$ 
    contain at least $2$ of the elements $\{3,4,5\}?$
And the answer to this is 
$4 * 2^{k-3}$
I multiply by 4 because there are $3$ ways of of appending $2$ or more elements from $\{3,4,5\}$ back into to $S$ which has had $\{3,4,5\}$ taken away from it. They are $\{3,4\},\{3,5\},\{4,5\},\{3,4,5\}.$
What I find unusual about this approach is that the $log_{2}(m)$ is not always an integer. And I can't imagine going through each item in a set asking the question 'are you in the subset? if one of the elements is only a fraction of an element like $0.5849\dots$ 
For example, if $n = 10,$ then 
$m = 2^{10} - 2^{8} 
  = 768.$ 
Then 
$k = log_{2}(m)
  = 9.584962\dots$
It feels wrong to ask how many subsets are in a set with $9.58\dots$ elements.
And yet I get the correct answer:
$4 * 2^{9.5849... - 3} = 384$ exactly!

REPLY [2 votes]: The reason this works is that the two conditions (i): at least one from $\{1,2\}$, and (ii): at least two from $\{3,4,5\}$, are independent when $n\geq5$. The probability that (i) is satisfied is $3/2^2$, and the probability that (ii) is satisfied is $4/2^3$. It follows that ${3\over8}$ of all $2^n$ subsets satisfy both conditions. Taking logarithms at the second step was a  detour of yours that Shannon might have liked $\ldots$.