SeventhSigma said:
I'm not trying to build sets; I'm trying to count valid subsets.
The main set, call it S, is a list from 1 to N (N can be anything).
I am trying to figure out a good approach/formula for counting valid subsets of S. A valid subset is one where the largest element of the subset is less than the sum of the rest of the subset.
The way to begin is to start by computing the sets by hand for n = 1, 2, etc. After a while you'll either see a pattern or realize that the combinatorics are too complicated for you to figure out.
The other thing to do as you go through these exercises is to develop some notation and start to gain familiarity with how the sets work.
So let's take n = 1.
We only have two possible subsets, \emptyset and {1}.
\emptyset has no largest element so there's nothing we can say about it. From now on we won't consider the empty set.
The largest element of {1} is 1. Let's denote this as L({1}) = 1. For any set, L(A) is the largest element of the set.
What's the sum of the remaining elements? Well the set of remaining elements other than 1 is empty. The empty sum is zero. Let's denote this as S({1}) = 0. In other words for any set A, S(A) is the sum of the elements in A excluding L(A).
Now there are three possibilities for any set A:
* S(A) < L(A). In this case we'll call A an "L-set," for "less than."
* S(A) = L(A). In this case we'll call A an "E-set," for "equal."
* S(A) > L(A). In this case we'll call A a "G-set," for "greater than." These are the ones you're interested in. My notation is backward from your description, my apologies. This seemed natural to me because if you arrange the elements in order, the largest is on the right and the sum of the rest of them is on the left. So S is to the left of L in my mind. You see that a key part of the process is developing your own mental model of the problem.
With this notation, let's just bang out a bunch of examples and see what we see.
Also note that your problem has a constraint that makes it much easier than it could be. For each n we only have to consider subsets of {1, 2, 3, ...n}. In other words we don't have to deal with arbitrary subsets of the natural numbers such as {47, 100, 148}, which is an L-set. But we aren't considering those types of arbitrary sets. For us, the only possible 3-element set is {1,2,3}, which happens to be an E-set. So your problem is a special case of a much harder problem.
Ok for n = 1 we already saw that we have an enumeration of the subsets:
{1}: L
For n = 2 we have:
{1} : L
{2} : L
{1, 2} : L
We now make a couple of handy observations. Every singleton is an L-set. And every 2-element set is an L-set. Handy to know, saves us some thinking as we go. You see the point of these warmup exercises is to start to become familiar with the problem space.
For n = 3 we have
{1} : L
{2} : L
{3} : L -- remember we don't even have to think about singletons, we know they're L's.
{1,2} : L
{1,3} : L
{2,3} : L -- likewise the 2-elt sets are L's.
{1,2,3} : E -- Ok we finally saw something interesting. Our first E-set.
Also note that your table always has 2
n - 1 entries. That's the number of nonempty sets in the power set of an n-element set.
Now I won't write out the entire table for n = 4. There are 15 nonempty subsets. Four are singletons, six are 2-elt sets ({1,2}; {1,3}; {1,4}; {2,3}; {2,4}; {3,4)}. All of these are L-sets.
When we get to the 3-elt sets we have
{1,2,3} : E
{1,2,4} : L
{1,3,4} : E
{2,3,4} : G -- Hooray, our first G-set, which is the type you are interested in.
And finally the 4-banger.
{1,2,3,4} : G -- Our second G-set.
So if G(n) is the number of G-sets for n, we have G(1) = G(2) = G(3) = 0; and G(4) = 2.
I'll leave the rest to you. Clearly n = 5 is tedious and n = 6 more tedious still. But at some point you might see the pattern by which G-sets are formed.
I hope I provided an answer to the question, How do we start a problem like this?
What we do is start computing the objects of interest by hand for n = 1, 2, ...
As we go, we are forced to confront some conceptual issues such as remembering that an empty sum is zero. We also develop some notation to serve as a shorthand for ideas that we're using over and over. And as we go, we start to develop some skill at manipulating the objects of interest. We know without having to think that singletons and 2-bangers are L-sets. We know that the smallest G-set is {2,3,4}, and so on.
I think that this is going to get combinatorially tricky as the numbers get larger. But this is how to get started. Roll up your sleeves and look at examples.
ps -- If you know a programming language, this is the kind of problem that would be straightforward to program. The benefit of that approach is that you can produce a table for G(n) for much larger values of n than you could do by hand. However there is also some virtue to writing out a lot of cases by hand so you develop intuition for the problem.