Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14358
| From | Dana DeLouis <dana01@icloud.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: combinations problem |
| Date | 2013-04-30 08:17 +0000 |
| Message-ID | <klnun4$g03$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
On Sunday, April 28, 2013 5:17:32 AM UTC-4, Ray Koopman wrote:
> I want to select 6 combinations from numbers 1 to 49 with condition that its sum equal 152,
> Timing@Length@Select[IntegerPartitions[152,{6},Range@49],Unequal@@#&]
>
> {1.86, 165490}
>
Hi. Just an interesting way to confirm the number of solutions:
Timing[Coefficient[Expand[Coefficient[
Product[k*t^n + 1, {n, 49}], k, 6]], t, 152]]
{0.079659,165490}
= = = = = = = = = =
HTH :>)
Dana DeLouis
Mac & Mathematica 9
= = = = = = = = = =
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: combinations problem Dana DeLouis <dana01@icloud.com> - 2013-04-30 08:17 +0000
csiph-web