How can I find the number of possible states of this complex system? I have a fairly complex system that I would like to analyze and be able to figure out how many possible states exist for it.
Here is the system:
Say I have a group of n cells.  This group is essentially a circuit board, or breadboard.  Each cell can be connected with any number of other cells, in any possible connection.  How many possible states exist for values of n?
Increasing Values of n
Say that each cell is assigned a letter.  For n = 1, there is only cell A so there is obviously 1 possible state.
For n = 2, the states are {A/B}, or {AB}.  The / represents different groups of connections, so there are always n number of possible groups as well.
Now for n = 3, there are {A/B/C}, {ABC}, {A/BC}, {B/AC}, or {C/AB}, so 5 states.
Things quickly become exceedingly complex.
You can tell it quickly becomes far more difficult, because the number of cell increases, the number of "groupings" increases (1 group, 2 groups, 3 groups..up to n), and also the number of way to form a group increases (for instance if n = 5, for 3 groups, there are combinations of (1, 1, 3) cells or (1, 2, 2) cells.
I haven't a clue of figuring out how to calculate the number of states, so any help is appreciated.
Just to summarize, this basically boils down to how many possible ways can I connect a grid of n x n cells, if the cells can be connected in any way to any number of other cells, and there is no limit to the number of cell groupings except obviously up to n, the number of cells?
I've hand calculated the values for n = 1 to 6, they are 1, 2, 5, 11, 42, and 147.  Which obviously doesn't correspond to a simple sequence.  
 A: You've got n nodes, say 2, each node can connect to any other node, and all connections are 2 ways. thus A can connect to B. 1 connection. but the connection can either be on or off, thus 2 states of the system.
So we take the number of nodes (n) and run it through this to get the maximum number of connections the system can have. n*(n-1)/2 the n-1 is because it can't connect to itself, the /2 is because each connection is a 2 way connection (a-b is the same a b-a).
That gives us number of connections (c). Since every connection can either be on or off the connections themselves can be thought of as bits. And to get the number of states of the system you take the number of states for each bit (or connection - which is 2, on or off) to the number of bits in the system (c).
Thus number of states in the system is:
2^(c) = s
which is:
2^(n*(n-1)/2) = s
n    |    c    |    s

1          0         1
2          1         2
3          3        8
4          6
        64
5          10
      1024
6          15
      32,768
7          21
       2,097,152
8          28
      268,435,456
9          36
      68,719,476,736
10        45
      35,184,372,088,832
You may have noticed that by your estimation 3 nodes should have 5 states. By my estimation you're wrong.
Let's say there are 3 nodes: 1, 2, and 3. We'll call connections between 1 and 2 A, connections between 2 and 3 B, connections between 1 and 3 C. So number of connections is c = 3.
the following states are possible:


*

*(blank, no connections are on)

*A (connection A is on, so 1 is connected to 2)

*B (2-3)

*C (1-3)

*AB (1-2,2-3)

*AC (1-2,1-3)

*BC (2-3,1-3)

*ABC (1-2,2-3,1-3) (all possible connections exist)

