Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Suppose that I am given n consecutive dates for buying and selling shares . So what are the number of ways of choosing a pair of buy date and sell date such that buy date always precede sale date ?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Pick any two distinct dates. There are $\binom{n}{2}=\frac{n(n-1)}{2}$ ways to do this. Label the earlier one buy, the later one sell.

I have interpreted "earlier" as meaning different. It is always possible to buy one day and sell later the same day. With that interpretation, there are $n$ additional possibilities.

share|improve this answer
    
Can you explain how is it n(n−1)/2? What is the term inside the brackets called ? –  Geek Aug 1 '12 at 7:36
    
This is a binomial coefficient. One high school notation for the same thing is ${}_n\text{C}_2$, often pronounced in english "$n$ choose $2$." There are other notations, like $C(n,2)$, or $C_2^n$. To see that there are $\frac{n(n-1)}{2}$ ways to do this, write down one date. There are $n$ ways to do this. For each choice, there are $n-1$ ways to write a different date, for a total of $n(n-1)$. For half these choices, the first date chosen will be later than the second date chosen.So the number of pairs $(a,b)$ such that $a$ is earlier than $b$ is $\frac{n(n-1)}{2}$. –  André Nicolas Aug 1 '12 at 7:43

I think it's just (n choose 2). You just need the number of ways to pick two distinct dates. The earlier one is the buy date. The later is the sell date.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.