Predicting reaction among compounds
I think your question relates to the field of combinatorial chemistry. This is an important area especially for pharmaceutical companies that want to try out lots of different structures to see if they have therapeutic potential.

Lets talk specifics. In the case of known chemistry - e.g. formation of esters from alcohols and carboxylic acids, you can identify the possible reactions. Start with a system where A, B, C, and D are different alcohols and E, F, G, and H are different carboxylic acids. Under the right conditions (acid catalyzed dehydration), the alcohols can combine with the acids all possible ways to give 16 different esters (AE, AF, AG, ... etc.). But A (an alcohol) will not combine with the other alcohols B, C, or D -- and acid E will not combine with acids F, G, or H. Under more harsh conditions, however, they could be induced to react within each group (to form ethers or acid anhydrides).

If you are talking about a random selection of compounds - especially ones with more complex structures and more functional groups, and a variety of reaction conditions, the outcome would be much less predictable.