# Formula to compute number of groups from given points with overlap

1. Feb 1, 2012

### veda87

The problem is kind of easy to understand.

Given is some points, say 10 points. (I am using numbering for understanding)

0 1 2 3 4 5 6 7 8 9

Now group these such that the group size is 5 and there is no overlap
so, there can be 2 groups. the groups are (0 1 2 3 4) & (5 6 7 8 9)

Now group the above given points such that the group size is 5 and overlap is 1
so, there can be 3 groups. the groups are (0 1 2 3 4) & (4 5 6 7 8) & (8 9) //Note: don't worry that (8 9) group has only 2 points

Now group the above given points such that the group size is 5 and overlap is 3
so, there can be 3 groups. the groups are (0 1 2 3 4) & (3 4 5 6 7 ) & (6 7 8 9)

Similarly.....

group size | overlap size | number of groups
5 | 0 | 2
5 | 1 | 3
5 | 2 | 3
5 | 3 | 4
5 | 4 | 6

I am looking for some generalized formula to compute the number of groups

So, given the group size and overlap size, find the number of groups. Can anyone help me with finding a generalized formula