## Algorithm New Question

• ### Time Complexity Solution

Help me solve this recurrence relationT(n) = 8T(n/2) + qn , n > 1= p , n = 1Answer is : n^3Please solve by back substitution method.The following is my attempt for the question....

• ### Calculate the time complexicity of the recurrence

I'm having problems calculating the complexity of the following recurrence equation.It's quite difficult for me to solve it. Could anyone help me to solve this problem? Thanks in advance....

• ### How can I solve this recurrence equation? Example

How can I solve this recurrence problem. I included a an example from my class but I am very lost in this area. My teacher wants me to In solving the problems to use the domain and range ......

• ### How to find the base case of recurrence equation g

If I know then recurrence equation and the complexity of the recurrence. please suggest an example...

• ### O(n*logn) — Not able to understand the prefi

I am confused with the below explanation in one of the google searches for merge sortT(n) = 2T(n/2) + (n-1) This left side equation, if you solve, will resolve to n*log(n)Here 2T(n/2) is right, ......

• ### What is the complexity of the following function a

What is the complexity of the following function as a recurrence relation procedure? Can you please explain the steps?void test(int x){ if(x <=0) return; System.out.println(x); test(x/......

• ### How to solve T(n) = T(n-1) + n^2 with recursion tr

I'm having trouble solving this T(n)=T(n-1)+n^2 with a recursion tree, can anyone help me with a pic so I can understand easily?thx....

• ### Recurrence relation for Huffman coding

Suppose we recursively implement Huffman’s algorithm. Assume the input to the algorithm is a binary min-heap, where each node of the heap stores a character along with its associated probability. ......

• ### Huffman code with very large variety of elements

I am trying to implement the Huffman algorithm, as taught in my math class. However, I noticed that in the worst-case scenario, the produced code would be larger than the actual charset encoding.......

• ### Is there a simple(-ish) algorithm for drawing forc

I'm trying to write a little graph visualizer in P5js but I can't find a simple(-ish) algorithm to follow.I've found ways to do it with D3 and I've found some dense textbook snippets (like this) but ......

• ### Optimize event seat assignments with Corona restri

Problem:Given a set of group registrations, each for a varying number of people (1-7),and a set of seating groups (immutable, at least 2m apart) varying from 1-4 seats,I'd like to find the optimal ......

• ### Greedy algorithm - Criteria for a coin system to b

Given a coin system, what are the conditions that can be used to figure out whether the coin system is canonical. I did read a few papers but nothing solid came off from them.I know that greedy ......

• ### Ordered Knapsack Problem Correctness/Proof

A thief is given the choice of n objects to steal, but only has one knapsack with a capacity oftaking M weight. Each object i has weight w_i, and profit p_i. Suppose he also knows the following:the ......

• ### knapsack problem variation with almost no constrai

I have this variation of knapsack with very few constraints, and the lack of contraints does that i really don't know where to start.Given a set S of positive integers. could be:1 2 3 4 5 6 7 8 9 10 ......

• ### Moving items between multiple knapsacks

I have an algorithmic problem similar to knapsack problem or bin packing problem, but not quite the same:There are multiple knapsacks. Each knapsack already has some items. One item should be put ......