My Math Forum  

Go Back   My Math Forum > College Math Forum > Applied Math

Applied Math Applied Math Forum


Thanks Tree6Thanks
Reply
 
LinkBack Thread Tools Display Modes
April 24th, 2017, 05:29 PM   #21
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: Southern California, USA

Posts: 1,413
Thanks: 717

Quote:
Originally Posted by Denis View Post
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
romsek is offline  
 
April 24th, 2017, 05:42 PM   #22
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 10,485
Thanks: 693

Quote:
Originally Posted by romsek View Post
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
Denis is offline  
April 24th, 2017, 05:59 PM   #23
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: Southern California, USA

Posts: 1,413
Thanks: 717

Quote:
Originally Posted by Denis View Post
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?
romsek is offline  
April 24th, 2017, 06:08 PM   #24
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 10,485
Thanks: 693

Quote:
Originally Posted by romsek View Post
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....
Denis is offline  
April 24th, 2017, 07:41 PM   #25
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: Southern California, USA

Posts: 1,413
Thanks: 717

Quote:
Originally Posted by Denis View Post
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.
romsek is offline  
April 24th, 2017, 08:01 PM   #26
Math Team
 
Joined: Oct 2011
From: Ottawa Ontario, Canada

Posts: 10,485
Thanks: 693

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.
Denis is offline  
Reply

  My Math Forum > College Math Forum > Applied Math

Tags
combinations, line, sequences, weights



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unequal Weights mathmaniac Physics 24 February 1st, 2013 04:09 PM
Geometry or weights? mydisguise08 Geometry 2 September 2nd, 2009 04:07 PM
Find previous weights from current weights & percent change billiboy Applied Math 4 June 15th, 2009 11:26 PM
keyword relativity datatype weights and algorithm totus Applied Math 4 February 28th, 2009 09:08 PM





Copyright © 2017 My Math Forum. All rights reserved.