Problem Detail: I can’t answer this question. It seems simple but I really don’t know how to approach it. Here it is: A priority queue is said to be stable if deletions of items with equal priority value occur in the Read More …
Author: ignougroup
[Solved]: How is this problem related to the study of algorithms and big O notation?
Problem Detail: I’m taking a graduate computer science course on algorithms and analysis. The current subject is big O notation and recursion. How is the following problem related to the study of algorithms, recursion, and big O notation? I know and Read More …
[Solved]: Arbitrary precision integer square root algorithm?
Problem Detail: Are there any known subquadratic algorithms for calculating the floor of the square root of an n bit integer? The naive algorithm would be something like def sqrt(x): r = 0 i = x.bit_length() // 2 while i >= Read More …
[Solved]: Are Java and C# also purely interpreted languages?
Problem Detail: I was wondering about the nature of these managed languages i-e since c# and java both are converted into intermediate language and byte code respectively, and are interpreted by their respective runtime(s). So if they are somehow pure interpreted Read More …
[Solved]: Creating a Self Ordering Binary Tree
Problem Detail: I have an assignment where I need to make use a binary search tree and alter it to self order itself such that items that are accessed the most (have a higher priority) are at the top of the Read More …
[Solved]: Complexity of multiplication
Problem Detail: I’ve been reading around the area of complexity and arithmetic operations using logic gates; one thing that is confusing me is that begin{equation} Theta (n^{2}) end{equation} is quoted as being the complexity for multiplication for iterative adition. But addition Read More …
[Solved]: Infer number of comets, based upon observations of their periodic visits to Earth
Problem Detail: Can we algorithmically infer the number of comets that orbit the Earth, based upon periodic observations of them, if we cannot tell the comets apart? In more detail: The problem There is an unknown, fixed number of comets, numComets Read More …
[Solved]: ML function of type ‘a -> ‘b
Problem Detail: Our professor asked us to think of a function in OCaml that has the type ‘a -> ‘b i.e. a function of one argument that could be anything, and that can return a different anything. I thought of using Read More …
[Solved]: Are two non-Turing-recognizable languages closed under union?
Problem Detail: If I have two languages that aren’t Turing-recognizable, is the union between them always not T-recognizable? Why? Asked By : RobotMan Answered By : jmite No, sometimes you can recognize their union. As an example, take a language where it and Read More …
[Solved]: Why are all problems in FPTAS also in FPT?
Problem Detail: According to the Wikipedia article on polynomial-time approximation schemes: All problems in FPTAS are fixed-parameter tractable. This result surprises me – these classes seem to be totally different from one another. FPTAS characterizes problems by how easy they are Read More …