Problem Detail: I mathematically understand $f(n) in O(g(n))$ : $f(n)$ does not grow faster than $g(n)$. More formally, $exists c, n_0$ s.t. $f(n) leq cg(n) forall n geq n_0$. Similarly, $f(n) in Theta(g(n))$ means that $f(n)$ grows approximately as fast as Read More …
Author: ignougroup
[Solved]: Why is Oracle Turing Machine important?
Problem Detail: As you know, an Oracle Turing Machine (OTM) is a “black box” which somehow can tell us whether a given Turing machine with a given input eventually halts. By Church’s Thesis it is impossible to design an algorithm which Read More …
[Solved]: Binary tree traversals reversed
Problem Detail: Am I correct in saying that traverse(node): if node is null, return print node traverse(node’s right subtree) traverse(node’s left subtree) would produce output that is the reverse of post-order traversal? post-order(node): if node is null, return post-order(node’s left subtree) Read More …
[Solved]: What is the advantage of Day-Stout-Warren algorithm for balancing BST?
Problem Detail: While reading about Day–Stout–Warren algorithm for balancing BST which takes any BST and transforms it into a balanced BST in O(n) time. In my opinion I can achieve absolutely the same with these simple steps: convert BST into array Read More …
[Solved]: String of minimum length in ${a, b}^*$ not in a regular expression
Problem Detail: I’m doing an exercise in my book, the question is to find a string of minimum length in ${a, b}^*$ not in the language corresponding to the given regular expression. a. $b^*(ab)^*a^*$ My answer: $aab$ b. $(a^* + b^*)(a^* Read More …
[Solved]: Find longest common substring using a rolling hash
Problem Detail: The longest common substring (LCS) of two input strings $s,t$ is a common substring (in both of them) of maximum length. We can relax the constraints to generalize the problem: find a common substring of length $k$. We can Read More …
[Solved]: Richard Karp’s 21 NP-Hard problems, the meaning of his research?
Problem Detail: In Richard Karp’s paper “Reducability among combinatorial problems” he lists 21 NP-Hard problems. Though I can somewhat understand the ideas and motivation behind the paper I am searching for some clarity. From what I know and understand this paper Read More …
[Solved]: Round-robin scheduling: allow listing a process multiple times?
Problem Detail: In a round-robin scheduler, adding a process multiple times to the process list is a cheap way to give it higher priority. I wonder how practical an approach this might be. What benefit does it have over other techniques Read More …
[Solved]: Jamming signal useless in CSMA / CD?
Problem Detail: I’m looking at collision detection in communication protocols, in particular Carrier sense multiple access with collision detection (CSMA/CD). According to what I’ve read on Wikipedia, a collision seems to cause the wave of the outgoing signal and the wave Read More …
[Solved]: Finding the $k$th largest element in an evolving query data structure
Problem Detail: Basically, the problem I am solving is this. Initially, the array $A$ is empty. Then I am given data to fill the array and at any time I have to make a query to print the $|A|/3$-th largest element Read More …