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 …
Category: Uncategorized
[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]: 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 …
[Solved]: How can I translate this quantified logical expression into english
Problem Detail: I was reading chapter-1 The Foundations: Logic and Proofs from this book. The chapter gives example of translating English sentence : “There is a woman who has taken a flight on every airline in the world.” as follows: Introducing Read More …
[Solved]: construct a dfa that accepts odd consecutive number of 0’s and 1’s
Problem Detail: this dfa should accept only consecutive odd number of both 0’s and 1’s. example: 10001,1110001,10,01,011101. How can I draw its diagram? Asked By : user49697 Answered By : Rick Decker Here are a couple of hints to get you started. Could Read More …
[Solved]: Longest Common Subsequence Via Dynamic Programming
Problem Detail: I read the wikipedia page on the Longest Common Subsequence problem to understand the LCS Table approach, but it seems to result in different solutions given different orders of the original sequences. For example, the traceback table generated here Read More …