I need to solve this problem with induction k in natural numbers
So how I write this problem in wolfram Engine ?
I wonder if it is correct. Does the leading point mean something?
Related
Can someone help me with (b) and (c). I really don't know how to solve it, whether using substitution or recurrence tree method. Master theorem doesn't seem to work here either. Thanks.
I solved several dynamic programming problems but i don't know how to come up with defining a subproblem. For problem max sum even length subarray, why they define dp[i] = the maximum sum of an even length subarray starting at i.
Do you have any tips or theorem about that?
thanks in advance.
I don't think there is any theorem about it. It is simply, a matter of training. You should continue doing examples and it will come.
I've made a backtracking algorithm.
I've been asked to say what is the complexity of this Algo.
I know that the equation is T(n) = 2T(n-1) + 3(n_hat), where n_hat is the initial n. Meaning it doesn't decrease in each step.
The thing is that I'm getting quite lost on calculating this thing. I believe it's around 2**n * something. But my calculations are a bit confusing. Can you help me please? Thanks!
Let's expand this formula repeatedly by substituting into itself:
Sorry for the simple question but I'm going through some algorithms homework and for true/false problems like...
n^n = O(2^n)
Is it always possible to just graph the two and see which one is bigger? In this case n^n is so I think the answer is false. Thanks in advance!
Look at the graph of 1000000n and n^2 for n up to some really large number, say n = 10,000. What looks bigger on the graph?
Should I use a tree to solve this ? Or is there an easiest way to solve it?
I think it is n! right?
Thank you.
Using recurrence relations, you may do this: