• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How many combinations I would require

ThrottleWorks

Excel Ninja
Hi,

I have one pair of two rows. Both the rows will have below mentioned columns.

Trade Date, Value Date, Buy Currency, Buy Amount, Sell Currency, Sell Amount, Rate.
These are 7 headers. If in any pair, if any of 6 parameters are matching then this is a pair.

For example,

  1. Trade Date, Value Date, Buy Currency, Buy Amount, Sell Currency, Sell Amount
  2. Trade Date, Value Date, Buy Currency, Buy Amount, Sell Currency, Rate.
These are two combinations I will consider for pairing. In any pair, if either combination one is match of combination two is match, I will consider this as a pair.

My doubt is, how many combinations I would require to consider.

This might look silly but I want to understand, is there any mathematical formula to get number of possible combinations.

So that, I will be sure that I need n number of combinations to consider all the possibilities.

For example, I have 7 headers but I need to match only 3 fields, so how many combinations I need to build.

At present, I am building concatenations for possible combinations but I am not sure I have covered all.

Can anyone please help me in this.
 
nPr = n! / (n - r)!

5040

Hi,

I have one pair of two rows. Both the rows will have below mentioned columns.

Trade Date, Value Date, Buy Currency, Buy Amount, Sell Currency, Sell Amount, Rate.
These are 7 headers. If in any pair, if any of 6 parameters are matching then this is a pair.

For example,

  1. Trade Date, Value Date, Buy Currency, Buy Amount, Sell Currency, Sell Amount
  2. Trade Date, Value Date, Buy Currency, Buy Amount, Sell Currency, Rate.
These are two combinations I will consider for pairing. In any pair, if either combination one is match of combination two is match, I will consider this as a pair.

My doubt is, how many combinations I would require to consider.

This might look silly but I want to understand, is there any mathematical formula to get number of possible combinations.

So that, I will be sure that I need n number of combinations to consider all the possibilities.

For example, I have 7 headers but I need to match only 3 fields, so how many combinations I need to build.

At present, I am building concatenations for possible combinations but I am not sure I have covered all.

Can anyone please help me in this.
 
Hi @xlstime sir, thanks for the help, however I am confused. Do you mean that I would require 5,040 combinations ! That will be next to impossible to build I guess.
 
Hi Sachin ,

You can work it out this way :

Suppose we wish to select one out of 2 ; there are 2 possibilities.

Suppose we wish to select 2 out of 3 ; we can have 3 possibilities.

Suppose we wish to select 3 out of 4 ; there are 4 possibilities.

Thus , to select 6 out of 7 , there are only 6 possibilities.

However , I think you need to look at all the 6 possibilities and decide whether all of them are realistic combinations.

Narayan
 
Hi Shrivallabha ,

Thanks for the correction ; my mistake in saying that there are 6 possibilities ; by extending the first few cases to generalise , 6 out of 7 would have given 7 possibilities.

Narayan
 
Hi Sachin ,

One more method of thinking through this , is to look at this way :

Suppose we would like to select , in the general case , n - 1 items out of n.

This can be done only if we omit exactly 1 item each time. For example , if we have the items A through G ( 7 items ) , and we wish to select 6 items each time , we can omit A and take the remaining 6 ; next we can omit B and take the remaining 6 , and so on.

Thus , there are exactly n items that we can omit ; therefore , the number of combinations possible is n.

Narayan
 
Back
Top