Ask your own question, for FREE!
Mathematics 17 Online
OpenStudy (anonymous):

Let n1

OpenStudy (ikram002p):

like u wanna find these numbers ?

OpenStudy (ikram002p):

very interesting question xD

OpenStudy (ikram002p):

1+2+3+4+10 2+3+4+5+6 hmm

OpenStudy (ikram002p):

@ganeshie8 check this question :O

OpenStudy (loser66):

@ikram002p this problem is very interesting and it is not that simple. we need method.

OpenStudy (ikram002p):

ikr :P i was just thinking only

OpenStudy (anonymous):

There is a method. Look up something called "Stars and Bars". This is a very well known combinatorics problem.

OpenStudy (anonymous):

If we were looking at $$n_1+n_2+n_3+n_4+n_5=20$$where the \(n_i\ge 0\) (or non-negative, not exactly what our problem says, but close), then the way to see the answer is as follows. Consider the 20 as ones just standing next to each other: $$11111111111111111111.$$Now I'm going to place 4 \(+\)'s into the ones anywhere I want. One example is: $$1111+11111+1+11+11111111=4+5+1+2+8$$This is one particular solution to the equation. Another solutions is: $$+++11111+111111111111111=0+0+0+5+15$$This is another solution. You can probably see from here that every solution to the equation can be represented by counting how many ways there are to rearrange the 20 ones and 4 plus signs.

OpenStudy (ikram002p):

but see conditions , they are ordered u cant take 0+0+0+5+15

OpenStudy (anonymous):

Right, thats why we have to tweak the technique of stars and bars a little.

OpenStudy (ikram002p):

oh go ahead keep going :)

OpenStudy (dan815):

hmm not sure how stars and bars really helps here

OpenStudy (anonymous):

Maybe it doesn't =/

OpenStudy (dan815):

lets do it for 2 and 8 and see if get something

OpenStudy (ikram002p):

well maybe we can started like this 0+1+2+3+14 0+1+2+4+13 0+1+2+5+12 0+1+2+6+11 0+1+2+7+10 0+1+2+8+9 0+1+3+4+12 0+1+3+5+11 0+1+3+6+10 0+1+3+7+9 0+1+4+5+10 0+1+4+6+9 0+1+4+7+8 lol long list -.-

OpenStudy (ikram002p):

@nerdguy2535 continue with star and bar :O

OpenStudy (dan815):

okay

OpenStudy (ikram002p):

does that mean the answer should be 2^5 ?

OpenStudy (anonymous):

I think you are right. Stars and bars might be too hard to tweak to the setting \(n_1<n_2<n_3<n_4<n_5.\) I'm looking in my combinatorics book atm. There is a formula for this problem, but its based on generating functions, and because 20 is so large its a little rough to actually get the answer.

OpenStudy (ikram002p):

hmm ok im gonna try to give all combination i think only 36 if im lucky enough xD

OpenStudy (zarkon):

1+2+3+4+10 1+2+3+5+9 1+2+3+6+8 1+2+4+5+8 1+2+4+6+7 1+3+4+5+7 2+3+4+5+6

OpenStudy (dan815):

i see like a decreasing sequence pattern

OpenStudy (dan815):

shud be some kind of summing series problem in the end we shud get a concise form for how its decreasing

OpenStudy (dan815):

the biggest constraint is the min value like ikky start with 0

OpenStudy (zarkon):

" be positive integers"

OpenStudy (dan815):

see how for eve its 6, then odd its 4 then 3 notice the 4 came up instead of 5 because 8,8 spit was not possible

OpenStudy (zarkon):

there are 7...I listed them

OpenStudy (ikram002p):

oh so we should start from 1 ?

OpenStudy (dan815):

there shud be a pattern emerging like for starting at 1, maybe its everything -1

OpenStudy (dan815):

or -2 in some cases dependning on dd or even change

OpenStudy (dan815):

have to work out for a smaller problem or a couple more numbers just to see it all i dont have paper or anything sooo -.-

OpenStudy (ikram002p):

nvm lol its start from 1 :) so only 7 xD

OpenStudy (dan815):

ok thats the patternn

OpenStudy (anonymous):

i wish they had this fancy internet when i was a wee lad i would have 7 PhDs by now see #51 for a worked out solution

OpenStudy (dan815):

ya lol xD kinda silly shudda seen once u put in 2 its too much

ganeshie8 (ganeshie8):

so it seems the #of solutions for below 3 equations is same : \[\large n_1 + n_2 + n_3 + n_4 + n_5 = 20 \tag{1}\] \[\large n_1 + n_2 + n_3 + n_4 + n_5 = 10 \tag{2}\] \[\large n_1 + n_2 + n_3 + n_4 + n_5 = 5 \tag{3}\]

OpenStudy (ikram002p):

nice :) so its 7 xD

OpenStudy (dan815):

now lets write a matlab code for this

OpenStudy (dan815):

to solve for 10 partitions and 1000 sum

OpenStudy (dan815):

ill race you >_>

OpenStudy (ikram002p):

i dont have the program on my laptop :'( i would be faster than u xd

OpenStudy (dan815):

suureee

OpenStudy (zarkon):

then use scilab or octave

OpenStudy (zarkon):

or java, c++, c#.... ;)

OpenStudy (dan815):

oh ya ikky there is matlab excecutor right here

OpenStudy (ikram002p):

wait c++ i think i have borland or something gimme link dan

TheSmartOne (thesmartone):

This question is puzzling even the best on OS...

OpenStudy (preetha):

I'll wait to see if it actually gets solved....(-:

OpenStudy (dan815):

it has been solved for a while now

OpenStudy (dan815):

just writing a code

OpenStudy (dan815):

ramananjuns solution though is O_O

OpenStudy (dan815):

really pretty

ganeshie8 (ganeshie8):

yeah not possible to bruteforce dan, you need to use/invent some sensible algorithm im getting avagadro number for your problem : sum=1000,partitions=10 http://www.wolframalpha.com/input/?i=1000+choose+10

OpenStudy (ikram002p):

why ?

OpenStudy (ikram002p):

how do u know they are ordered :O

OpenStudy (dan815):

its not 1000 choose 10 though

ganeshie8 (ganeshie8):

ordering is not a problem because you can always sort a given a list of 10 distinct integers. \(\large \binom{1000}{10}\) is the number of ways of picking 10 distinct intgers from the first 1000 positive integers. we fail miserably if we try to brute force this because no computer can ever finish executingyour program

OpenStudy (dan815):

http://prntscr.com/51yc4e look at this we are to reduce to this form with 1000 and 10 parttions now

OpenStudy (dan815):

do u get how simplfied the problem to be partitions like this

OpenStudy (ikram002p):

lol i had problem with excuting this though xD

ganeshie8 (ganeshie8):

we can reduce 1000 to 965 further it reduces to 955. thats the end.

OpenStudy (dan815):

oh

ganeshie8 (ganeshie8):

i don't think we can deal 955 choose 10

OpenStudy (dan815):

i see a more realistic problem would be 10 and 50 then? or better reducton with 100 and 500

ganeshie8 (ganeshie8):

100 = partitions, 500 = sum right ?

OpenStudy (dan815):

yes

OpenStudy (dan815):

sorry not possible !

OpenStudy (dan815):

xD

ganeshie8 (ganeshie8):

100 and 500 is easy 0 solutions :)

OpenStudy (dan815):

ya haha

OpenStudy (dan815):

umm (100*101)/2 + 500 then

OpenStudy (dan815):

wait that is also no good thats only 1 solution i think

OpenStudy (dan815):

okay wait, can we talk about his steps though, how did he reduce this problem to

OpenStudy (dan815):

those 7 tuples in the end

OpenStudy (dan815):

(5), (1,4) ,( 2,3)....(1,1,1,1,1)

ganeshie8 (ganeshie8):

he created a bijection between sequences of "Strictly increasing positive integers" and "monotonically increasing positive integers"

OpenStudy (dan815):

4, 10 (6-1) 5 9 (1 , 5-1) 6, 8 (2, 4-1) 4, 5 , 8 (1,1,3)

OpenStudy (dan815):

what is a bijection

OpenStudy (dan815):

so suppose the sum was 21 instead itd be 6 1 5 2 4 3 3 1 2 3 1 1 1 3 1 1 2 2 1 1 1 2 1 1 1 1 1 9 arrangements?

ganeshie8 (ganeshie8):

bijection associates each solution for sum=20 with a unique solution for sum=10

ganeshie8 (ganeshie8):

however sum=20 is strictly increasing and sum=10 is just nondecreasing

OpenStudy (dan815):

cuz the other one is already based off differences right

OpenStudy (dan815):

as long as equal or greater difference exists we are fine, when there is an even separation there must be a strictly decreasing when its odd separation it can be equal

ganeshie8 (ganeshie8):

yes i think you're right. consider strictly increasing sequence : 1, 5, 6 after subtracting you get : 1, 4, 4

OpenStudy (asnaseer):

This is the way I thought of solving this - since the terms are increasing, then we can write the 5 terms as:\[d_0,d_0+d_1,d_0+d_1+d_2,d_0+d_1+d_2+d_3,d_0+d_1+d_2+d_3+d_4\]where \(d_i\gt0\). Then using the restriction on the sum of these numbers we get:\[5d_0+4d_1+3d_2+2d_3+d_4=20\]The minimum value for \(d_1\), \(d_2\), \(d_3\) and \(d_4\) is \(1\), which implies the maximum value for \(d_0\) is \(2\). We therefore end up with two equations:\[5.2+4d_1+3d_2+2d_3+d_4=20\tag{1}\]\[5.1+4d_1+3d_2+2d_3+d_4=20\tag{2}\]For equation (1), the only solution is where each unknown is equal to \(1\), i.e.:\[5.1+4.1+3.1+2.1+1=20\]For equation (2) we first set \(d_1\), \(d_2\) and \(d_3\) to their minimum value of \(1\) to get \(d_4=6\), i.e.:\[5.1+4.1+3.1+2.1+6=20\]Now we just need to distribute this \(6\) amongst \(d_1\), \(d_2\) and \(d_3\) to get:\[5.1+4.1+3.1+2.2+4=20\]\[5.1+4.1+3.1+2.3+2=20\]\[5.1+4.1+3.2+2.1+3=20\]\[5.1+4.1+3.2+2.2+1=20\]\[5.1+4.2+3.1+2.1+2=20\]That gives us \(7\) solutions in total.

OpenStudy (asnaseer):

I don't know if this is a strict solution or not or even if it is the correct solution but I thought I'd put down my thoughts on this.

OpenStudy (zarkon):

"so suppose the sum was 21 instead itd be 6 1 5 2 4 3 3 1 2 3 1 1 1 3 1 1 2 2 1 1 1 2 1 1 1 1 1 9 arrangements?" 1 1 4

OpenStudy (dan815):

ah right

OpenStudy (zarkon):

I do not believe there is a closed form solution to this problem

OpenStudy (zarkon):

*this type of problem

OpenStudy (asnaseer):

@Zarkon - what method did you use to get the solution?

OpenStudy (zarkon):

I just listed the possible sums 1+2+3+4+10 1+2+3+5+9 1+2+3+6+8 1+2+4+5+8 1+2+4+6+7 1+3+4+5+7 2+3+4+5+6

OpenStudy (zarkon):

then I counted ;) there are 7 :)

OpenStudy (asnaseer):

fair enough :)

OpenStudy (zarkon):

if it was much larger one would probably need to write some computer code

OpenStudy (ikram002p):

i tried to code dan question xD but seems i had dumb code , dint execute my idea was like this 1- give all possibles values for each number from 1 to 1000 2- finding sum for all different combination 3- check if values are distance + sum =1000 4- give count of match + output them xD

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!