Problem Detail: Here is a definition from the functions section in my discrete math textbook (Discrete Mathematics and its Applications 7e, Rosen 2012): Let $f$ be a function from $A$ to $B$, and let $S$ be a subset of $A$. The Read More …
Author: ignougroup
[Solved]: How does insertion work in an AVL tree?
Problem Detail: From the above image, while trying to maintain an AVL tree data structure, how would the tree look after inserting the value 10? Also, if anyone has any suggestions or simple method of rotating, feel free to share. Read More …
[Solved]: How to prove that $n(log_3(n))^5 = O(n^{1.2})$?
Problem Detail: This a homework question from Udi Manber’s book. Any hint would be nice 🙂 I must show that: $n(log_3(n))^5 = O(n^{1.2})$ I tried using Theorem 3.1 of book: $f(n)^c = O(a^{f(n)})$ (for $c > 0$, $a > 1$) Substituing: Read More …
[Solved]: What is the notation for bounding running time in worst case with concrete example resulting in that worst case running time
Problem Detail: I know that Big O is used to bound worst case running time. So an algorithm with running time $O(n^5)$ means its running time in worse case is less than $n^5$ asymptotically. Similarly, one can say that for example Read More …
[Solved]: Approximating NP-complete problems
Problem Detail: Say that for a particular problem, e.g., the independent set problem, it has been shown that no polynomial-time algorithm exists to solve it. Could we get around this by finding an algorithm which approximates the solution to a certain Read More …
[Solved]: How does the runtime of the Ukkonen’s algorithm depend on the alphabet size?
Problem Detail: I am concerned with the question of the asymptotic running time of the Ukkonen’s algorithm, perhaps the most popular algorithm for constructing suffix trees in linear (?) time. Here is a citation from the book “Algorithms on strings, trees Read More …
[Solved]: Need help with ER diagram
Problem Detail: I am making database on Disaster Management. There are four tables. DisasterEvent (eventid, name, glideID, status, description, date_occurred, date_ended, disaster_type) People(eventid, num_deaths, num_injuries, num_affected) Homes (eventid, num_homes_destroyed, num_homes_damaged, total_insured_loss, total_uninsured_loss) Place (place_id, city, state, country, postal_code) In my design, Read More …
[Solved]: standard sequential algorithm with polylog runtime?
Problem Detail: At the Wikipedia article on time complexity, only a PRAM example is given for polylogarithmic time. Let $T(n)$ denote the largest number of steps used by a machine to reach a final state on any input with size $n$ Read More …
[Solved]: How can repeated addition/multiplication be done in polynomial time?
Problem Detail: I can see how adding 2 unsigned four-bit values is $O(n)$. We just go from the rightmost digits to the leftmost digits and add the digits up sequentially. We can also perform multiplication in polynomial time ($O(n^2)$) via the Read More …
[Solved]: Computational complexity of finding the roots of a polyomial
Problem Detail: I’m currently dealing with a problem for which I could show that an exact algorithm would imply a general algorithm for finding the real (but not complex) roots of an arbitrary univariate polynomial with real coefficients. Now, what exactly Read More …