4
$\begingroup$

In essence, how many unique ways can I choose a subset of N people such that there exist 3 people in the subset who are adjacent in the original set.

e.g. N = 4 Lets label the people {1,2,3,4} I can choose {1,2,3} , {2,3,4} , { 1,2,3,4} making a total of 3 ways.

Here I assume that {1,2,3} = {3,2,1} etc. are the same

Is there any general formula I can derive for calculating this?

  • 0
    It seems this question has been picked up from currently running contest, which is against rules! http://www.codechef.com/SEP12/problems/CROWD Admin Please verify the same. I don't have enough reputation to comment otherwise I would have done that. :(2012-09-10
  • 0
    Yes, it is based on the above mentioned problem. I was not aware that this was against math.stackexchange rules. I was just trying to find a simple way to solve this.2012-09-10

1 Answers 1