Timeline for answer to How to efficiently get all combinations where the sum is 10 or below in Python by Tony
Current License: CC BY-SA 3.0
Post Revisions
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 23, 2017 at 12:16 | history | edited | URL Rewriter Bot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
| Aug 26, 2015 at 18:51 | comment | added | Bill Bell | Aaron Williams algorithm is now available in Python at github.com/ekg/multipermute. | |
| Dec 21, 2014 at 17:37 | comment | added | PascalVKooten | Nice effort, impressive result in the end! I'm posting timings. +1 | |
| Dec 21, 2014 at 9:14 | history | edited | Tony | CC BY-SA 3.0 |
added 4 characters in body
|
| Dec 21, 2014 at 9:08 | comment | added | Tony | Edited in response to @falsetru comments and Pascal's desire to have ordering matter. | |
| Dec 21, 2014 at 9:07 | history | undeleted | Tony | ||
| Dec 21, 2014 at 9:07 | history | edited | Tony | CC BY-SA 3.0 |
added 2944 characters in body
|
| Dec 21, 2014 at 4:08 | history | deleted | Tony | via Vote | |
| Dec 21, 2014 at 4:07 | comment | added | Tony | @falsetru. Quite right. I hadn't sorted that out. Will shortly remove my response, and think about it again. | |
| Dec 21, 2014 at 4:05 | comment | added | PascalVKooten |
@falsetru My bad, I'm mixing up t and n myself.
|
|
| Dec 21, 2014 at 4:02 | comment | added | falsetru |
@PascalvKooten, What about t=5? (over some number of territories (e.g. t=5) in the questino)
|
|
| Dec 21, 2014 at 4:02 | comment | added | PascalVKooten | @falsetru That's a valid result. | |
| Dec 21, 2014 at 4:00 | comment | added | falsetru |
This can yield [1, 1, 1, 1, 1, 1, 1, 1, 1, 1].
|
|
| Dec 21, 2014 at 3:53 | comment | added | Tony | @jterrace is right. Given the unique results above, you can generate the distinct permutations of each. It will probably be faster to do that than to use any other approach. There are other posts which show how to get distinct permutations. | |
| Dec 21, 2014 at 3:50 | comment | added | PascalVKooten | Zero is indeed permitted. Also, this regards all "territories" to be exactly the same (ordering does not matter) while in fact for my application it does. That's why I believe it to be a bit of a different problem? Other than that, it is very efficient indeed :-) | |
| Dec 21, 2014 at 3:46 | history | answered | Tony | CC BY-SA 3.0 |