[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 >

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

2007-11-24 Thread Rupesh Bhochhibhoya
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 are positive integers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

[algogeeks] Re: Revamp of the old Big o question:

2007-11-24 Thread Nat Padmanabhan
Bubblesort -> n -> k1 * n^2 -> x secs Quicksort -> n -> k2 * nlogn -> x * k*(nlogn / n^2) = x * k * (log n / n) where k = k2/k1 You will have to run it on input sets before you can agree on a k. On Nov 24, 2007 4:18 PM, Sherry <[EMAIL PROTECTED]> wrote: > > I calculated times taken to calcula

[algogeeks] Revamp of the old Big o question:

2007-11-24 Thread Sherry
I calculated times taken to calculate a variety of n values with the bubble, selection and quick sort. I know that the bubble, selection are both O(n^2) sorts and that the Quicksort is O(nlogn). But how could I predict the time taken for these sorts when I know n? here is my table for the bubble

[algogeeks] Re: How is the Big O actually calculated, time wise?

2007-11-24 Thread Sherry
Well actually, let me recorrect my question: I calculated times taken to calculate a variety of n values with the bubble, selection and quick sort. I know that the bubble, selection are both O(n^2) sorts and that the Quicksort is O(nlogn). But how could I predict the time taken for these sorts whe

[algogeeks] Re: How is the Big O actually calculated, time wise?

2007-11-24 Thread James Fang
As far as I am concerned, it depends on your implementaton, rather than the big O. You can optimize your program and count the instruction lines in assembly. Each processer has an approximate MIPS consumption stastistics. Your Instructions/( MIPS /10^6 ) is the actual microseconds your program n