Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14348

combinations problem

From eros olmi <erosolmiz@hotmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject combinations problem
Date 2013-04-28 04:58 +0000
Message-ID <klia8o$s8q$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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&]

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

combinations problem eros olmi <erosolmiz@hotmail.com> - 2013-04-28 04:58 +0000
  Re: combinations problem totarefugium <mtaktikos@t-online.de> - 2013-05-06 06:25 +0000

csiph-web