Problem Detail: I was wondering how to remove duplicate values from a linked list in $mathcal{O}(nlg n)$ time. I have an idea that by using merge sort when we want to compare elements for choosing the small one, if they are Read More …
Author: ignougroup
[Solved]: Kth largest subset for small K
Problem Detail: The $K$th Largest Subset problem is often given as an example of an NP-hard problem. However, the assumption is that $K$ is unconstrained, and can be as large as $2^n$. Clearly, if $K le 3$ the solution in $O(n)$ Read More …
[Solved]: Equivalence of Kolmogorov-Complexity definitions
Problem Detail: There are many ways to define the Kolmogorov-Complexity, and usually, all these definitions they are equivalent up to an additive constant. That is if $K_1$ and $K_2$ are kolmogorov complexity functions (defined via different languages or models), then there Read More …
[Solved]: Random algorithm with biggest sequence that never repeats
Problem Detail: I am going to attempt to write a random number generator using exisiting randomize algorithms. Can you suggest which algorithm has the biggest sequence that never repeats? I don’t care if they are fast or slow. Asked By : Piotr Read More …
[Solved]: Misunderstanding the Church-Rosser property
Problem Detail: I am contemplating the Church-Rosser property and I clearly misunderstand it, but I do not exactly know why. If $x$ and $y$ are such that $x overset{*}{leftrightarrow} y$, then $x overset{*}{rightarrow} y$ and since $y overset{*}{rightarrow} y$, we have Read More …
[Solved]: Find vectors with elements of finite fields that sum up to given value
Problem Detail: Given a universe $U$ consisting of k sets of vectors with each vector $vec{v} in {mathbb{F}_{p^m}}^n $. Given also another vector $vec{c} in {mathbb{F}_{p^m}}^n$. Now decide if there is a set $X$ with $|X| = |U|$ and $X_i in Read More …
[Solved]: A puzzle in Permutation
Problem Detail: There are two stacks A and B. A : a,b,c,d (‘a’ is on top and ‘d’ is at the bottom of the stack) B : (empty) There are two rules. If an element of A is popped, it must Read More …
[Solved]: Properties of polynomial time many-one reductions
Problem Detail: I’m working on old multiple choice exams and would like to know if the following statements are true or false: a) $L_1 le_p L_2 le_p L_3 Rightarrow L_1 le_p L_3$ b) If $L in mathsf{NP}$ and $U le_p L$ Read More …
[Solved]: Problem with implementing Brzozowski’s algorithm
Problem Detail: I’ve been trying to implement Brzozowski’s algorithm but I’ve just discovered that it creates suboptimal automata for a certain class of inputs, having one more state than what is really needed in the result. I can show it on Read More …
[Solved]: Analysing Space Complexity
Problem Detail: I have to compute the space complexity of this function: double foo(int n){ int i; double sum; if(n==0) return 1.0; else for(i=0;i<n;i++) sum+= foo(i); return sum } What I have done: When function is called, the activation record is Read More …