Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8254
| From | root <NoEMail@home.org> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: Looking for simple brute force solution |
| Date | 2018-01-04 10:14 +0000 |
| Organization | Linux Advocacy |
| Message-ID | <p2kuq1$hjp$1@dont-email.me> (permalink) |
| References | <p2jobe$48s$1@news.albasani.net> <7c7ab511-b4db-47ac-8720-9005d345b271@googlegroups.com> <e03b1053-de0c-488b-b1f3-266755f14760@googlegroups.com> |
fir <profesor.fir@gmail.com> wrote: >> >> in fact i think it is badny described, >> put it presisely give some example etc > > specifically i dont ger what is running sum (maybe becouse my weak english) A running sum of a sequence of numbers is the sum of all preceding numbers. For the sequence of numbers 1,2,3,4,... the running sums would be 1, 3, 6, 10,.... In a Statement Of Income, it is common for some items to be stated individually and then be followed by a sum of those items: cost of materials 100. cost of assembly 45. cost of item 145. cost of shipping 11. total cost 156. In this list it is easy to see that we can take the first, second, and fourth items to account for the total cost. We have to ignore the intermediate term 145. > > soeme ide i got as fat as i managed to understood this problem (i understood the problem isyou gave say 50 doubles with some random values > and you gor soem double named it S and you wnat chose some subes form this set of 50 which by combinations of additions of subtractions will be closest to S) I'm sorry, I don't understand what you are saying here. > > I dont know, though it seem like pureli mathematical task, probably well solved by mathematicians I agree that the problem falls into the category of integer programming. However I don't have an integer programming package and for the number of times I need to solve this problem I thought a simple brute force method would be more efficient of my time. > > some idea i only got would be sort those numbers by value, then by chosing the combinations you will not need to tray all but only those that will be close to expected summ - that would > spare checking a lot of combinations There might be some efficiency in that approach. In my example above sorting the numbers into 11, 45, 100, 145 we could eliminate any sums that included both 100 and 145. > > also there maybe is possible to make tables of sum of differences, make soem higher ranks of it > too, sort it by value - this sortig then can spare checking all values becouse there will only need to be checked those closed to expected values, i think sorting may spare blind checking all with another all > besides that prbablu matematicians resolved that
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-03 23:18 +0000
Re: Looking for simple brute force solution fir <profesor.fir@gmail.com> - 2018-01-03 16:49 -0800
Re: Looking for simple brute force solution fir <profesor.fir@gmail.com> - 2018-01-03 17:11 -0800
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 10:14 +0000
Re: Looking for simple brute force solution Richard Damon <Richard@Damon-Family.org> - 2018-01-04 10:52 -0500
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 16:46 +0000
Re: Looking for simple brute force solution Richard Damon <Richard@Damon-Family.org> - 2018-01-04 12:37 -0500
Re: Looking for simple brute force solution Richard Damon <Richard@Damon-Family.org> - 2018-01-03 21:28 -0500
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 09:42 +0000
Re: Looking for simple brute force solution Richard Damon <Richard@Damon-Family.org> - 2018-01-04 10:16 -0500
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 17:26 +0000
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 21:19 +0000
Re: Looking for simple brute force solution Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-01-04 02:29 +0000
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 09:55 +0000
Re: Looking for simple brute force solution Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-01-04 14:29 +0000
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 16:55 +0000
Re: Looking for simple brute force solution Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-01-04 20:36 +0000
Re: Looking for simple brute force solution Robert Wessel <robertwessel2@yahoo.com> - 2018-01-04 12:03 -0600
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 21:28 +0000
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 21:50 +0000
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-04 23:06 +0000
Re: Looking for simple brute force solution Richard Damon <Richard@Damon-Family.org> - 2018-01-04 21:35 -0500
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-05 05:59 +0000
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-05 16:48 +0000
Re: Looking for simple brute force solution Richard Damon <Richard@Damon-Family.org> - 2018-01-06 08:50 -0500
Re: Looking for simple brute force solution root <NoEMail@home.org> - 2018-01-06 16:47 +0000
csiph-web