sachin.w Wrote:Would really wanna know how to generate a set that suits our requirement."the sum of these two sets(sets of consecutive integers) will be equal only when the sum is zero. " is incorrect.
Ex: Set S could be 5,6,7,8 & 9 while Set T could be 2,3,4,5.6.7 & 8 and these sets have equal sums.
There are umpteen other examples.
Well, I have Set S which has 5 consecutive integers, and Set T which has seven consecutive integers, but the SUM is equal. Hmm. Even though Set S only has 5 numbers, it is equal to a Set with 7 numbers. Well, I need to make S have higher numbers so it can counter-balance the extra numbers added in Set T. Then start trying possibilities. I might try to match up some of the numbers in both sets so I only have to worry about the ends. You can see that in the set you mentioned; both sets have 5, 6, 7, 8. S has a 9 and T has 2, 3, 4. 2+3+4=9 so these numbers work.