The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Re: combinations problem
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Ray Koopman

Posts: 3,383
Registered: 12/7/04
Re: combinations problem
Posted: Apr 28, 2013 5:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


{211.15, 165490}


{1.86, 165490}

On Sat, Apr 27, 2013 @ 09:58 PM, eros olmi <> wrote:
> Hi
> i want to select 6 combinations from numbers 1 to 49 with condition that its sum equal 152, the following code works but its timing is 157 seconds on windows xp mathematica v 8. can we make this timing shorter ?
> Select[Subsets[Range[49],{6}],Total[#]==152&]

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.