My Math Forum How many combinations of 4 weights on a line?

 Applied Math Applied Math Forum

April 24th, 2017, 05:29 PM   #21
Senior Member

Joined: Sep 2015
From: USA

Posts: 1,977
Thanks: 1026

Quote:
 Originally Posted by Denis Yer assuming correctly...just as I CLEARLY stated 994?! How in heck did mathematica come up with that... There are a total of 9^6 = 531441 combinations. Of those, 129157 have digits that add up <26. 1: 111111 2: 111112 3: 111113 ... 129155: 993121 129156: 993211 129157: 994111 Sooo....where did you goof?!
I think you're double counting a whole lot of sequences

April 24th, 2017, 05:42 PM   #22
Math Team

Joined: Oct 2011

Posts: 12,612
Thanks: 845

Quote:
 Originally Posted by romsek I think you're double counting a whole lot of sequences
No I'm not: order does not matter; like 111113 is NOT same as:
111131
111311
113111
131111
311111

April 24th, 2017, 05:59 PM   #23
Senior Member

Joined: Sep 2015
From: USA

Posts: 1,977
Thanks: 1026

Quote:
 Originally Posted by Denis No I'm not: order does not matter; like 111113 is NOT same as: 111131 111311 113111 131111 311111
why aren't they all the same?

April 24th, 2017, 06:08 PM   #24
Math Team

Joined: Oct 2011

Posts: 12,612
Thanks: 845

Quote:
 Originally Posted by romsek why aren't they all the same?
Who cares?
Thought I made that clear in my original post.
I did it that way to get more candidates:
too see how Mathematica performs timewise....

April 24th, 2017, 07:41 PM   #25
Senior Member

Joined: Sep 2015
From: USA

Posts: 1,977
Thanks: 1026

Quote:
 Originally Posted by Denis Who cares? Thought I made that clear in my original post. I did it that way to get more candidates: too see how Mathematica performs timewise....
gotcha,

Small mod gets me 129157 in 1.55 seconds

this is very dumb code though. It's testing whole ranges of combos it doesn't need to.

 April 24th, 2017, 08:01 PM #26 Math Team   Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 12,612 Thanks: 845 Thanks. UBasic takes under 1 second; so pretty much the same. Takes ~5.4 seconds if each is screen-printed. Loops 6 variables from 1 to 9, adds them, skips count if > 25.

 Tags combinations, line, sequences, weights

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post mathmaniac Physics 24 February 1st, 2013 04:09 PM mydisguise08 Geometry 2 September 2nd, 2009 04:07 PM billiboy Applied Math 4 June 15th, 2009 11:26 PM totus Applied Math 4 February 28th, 2009 09:08 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top