[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-27 Thread Rupesh Bhochhibhoya
Dave, this is not homework neither any class work. I am just trying to find whether there is any pattern in the number of solution for such expression, so that the solution can be expressed with general formula. BTW thanks for the link, seems to me my problem is much related to partition problem

[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-27 Thread Dave
Hints: see http://www.research.att.com/~njas/sequences/A41, which relates the solution of your problem to the Partition Problem. Then see http://en.wikipedia.org/wiki/Partition_function_%28number_theory%29, which gives a recursion for calculating the Partition Function. Put the two together an

[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-27 Thread Rupesh Bhochhibhoya
I have come up with the solution but still this is not the for the general case. I would like to make my problem clear once again. The problem is to find total number of solutions for the following expression. if k=1, the expression is like this: 1*x1=1, so number of solution is 1, i.e. x1=1.

[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-24 Thread Rupesh Bhochhi
Thank you! I guess you understood the question now. Consider K and X >=0, non-negative. On Nov 24, 2007 10:41 PM, Nat Padmanabhan <[EMAIL PROTECTED]> wrote: > > 0 is not a positive numberyour problem statement is wrong then > > On Nov 24, 2007 10:56 PM, Rupesh Bhochhi <[EMAIL PROTECTED]> wrot

[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-24 Thread Nat Padmanabhan
0 is not a positive numberyour problem statement is wrong then On Nov 24, 2007 10:56 PM, Rupesh Bhochhi <[EMAIL PROTECTED]> wrote: > ok for instance, if K=2 then we will will have: 1.x1 + 2.x2 = 2. > Here the possible number of solution will be 2, namely: x1=2, x2=0 or x1=0, > x2=1. Please l

[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-24 Thread Rupesh Bhochhi
ok for instance, if K=2 then we will will have: 1.x1 + 2.x2 = 2. Here the possible number of solution will be 2, namely: x1=2, x2=0 or x1=0, x2=1. Please let me know if any confusion.. On Nov 24, 2007 9:50 PM, Nat Padmanabhan <[EMAIL PROTECTED]> wrote: > > I am not sure I understand the problem,

[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-24 Thread Nat Padmanabhan
I am not sure I understand the problem, x1=1, x2=1/2, x3=1/3xk = 1/k is a trivial solution On Nov 24, 2007 10:41 PM, Rupesh Bhochhibhoya <[EMAIL PROTECTED]> wrote: > > Hello Geeks, > > Is there any efficient algorithm for finding number of possible > combination of X variables for the given

[algogeeks] Re: 1.X1 + 2.X2 + 3.X3 + ......+ K.Xk = K

2007-11-24 Thread Rupesh Bhochhi
The expression is as below 1.X1 + 2.X2 + 3.X3 + ..+ K.Xk = K On Nov 24, 2007 9:41 PM, Rupesh Bhochhibhoya <[EMAIL PROTECTED]> wrote: > > Hello Geeks, > > Is there any efficient algorithm for finding number of possible > combination of X variables for the given value of K? where all X and K >