cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

interesting programming problem

tararu
1-Visitor

interesting programming problem

hi
i have the following problem and i was wondering if there is any one who could help me in programming it. the problem is the following:

suppose i have a group of variables "Si" where i goes from 0 to 99. each variable Si has a numerical value Ai. these A's are diffrent but their sum is equal to 1000 for example.
now i want to divide the Si's into 4 groups with 25 five Ai in each, in a such a way that the sum of the A's in each group is 1000/4=250. now the thing is i don't really know if these A's can be divided in this way or not, but i want a program to check it and let me know if i can do this division and if so give me the four groups with the 25 corresponding A's for each gropu or just tell me it can't be done.
any help will be highly appreciated
thanks a lot
yours

Talal Ghannam
3 REPLIES 3

If it would be feasible, the case would be unique for the A's values and the length of A. Just try to generate a vector of random values and imagine if you can apply your idea ! ???
Don't think so .

jmG

hi
thank you for your reply.. but i still don't get it.. i am nto that good in programming. so could give me a hint ??
thanks
Talal Ghannam

On 10/20/2009 7:50:21 AM, tararu wrote:
>hi
>thank you for your reply.. but
>i still don't get it.. i am
>nto that good in programming.
>so could give me a hint ??
>thanks
>Talal Ghannam
_____________________________

There is no programming involved. Just figure if your problem is algebraically valid or not. It may be for particular data collection, but it has no interest if no applications in view. If you had some home work, then post the work sheet to capture the interest of the community. Who is going to invent that puzzle in the book ? and solve it for no applied purpose ?

jmG



Announcements

Top Tags