Problem Detail: it is possible to implement insertion sort for sorting linked lists ? will it have the same O(n^2) efficiency as the array version ? Asked By : ghostloops Answered By : David Richerby This question is fully answered by the Wikipedia Read More …
Category: Uncategorized
[Solved]: Free and bound variables
Problem Detail: I am familiar with free and bound variables theory , but while learning I somewhere saw this lambda expression ((lambda var ((fn1 var) & (fn2 var))) argument) From what I have learned it seems to me as var is Read More …
[Solved]: What is a brief but complete explanation of a pure/dependent type system?
Problem Detail: If something is simple, then it should be completely explainable with a few words. This can be done for the λ-calculus: The λ-calculus is a syntactical grammar (basically, a structure) with a reduction rule (which means a search/replace procedure Read More …
[Solved]: Name of an Exact Cover by 3 sets variant
Problem Detail: Exact cover by 3-sets is $sf{NP}$-complete: Instance: Given a finite set $X = { x_1,x_2,…,x_{3n}}$ of $3n$ elements and a collection $C = { ( x_{i_1}, x_{i_2}, x_{i_3}) } $ of $m$ 3-elements subsets of $X$; Question: Find a Read More …
[Solved]: Range majority queries – most freqent element in range
Problem Detail: Given N numbers and M range queries (starting and ending points), I need to compute majority (most frequent element, if it exists) in these ranges. I’m looking for an algorithm that would answer queries in logarithmic or even constant Read More …
[Solved]: Find subset with minimal sum under constraints
Problem Detail: Let $M$ be a finite set of even cardinality. Define $C={{a,b}:a,b in M, a neq b}$ the set of all pairs over $M$. Let $w:C rightarrow mathbb{R}^+_0$ be a function. Now find $C’ subset C$ with the following constraints: Read More …
[Solved]: How optimal is Lempel-Ziv at reaching the Shannon limit?
Problem Detail: I find this a bit difficult to describe, but I am interested in the following idea : The LZ algorithm factors (verb) an input stream into adjacent factors, these are by definition the maximal prefixes of the piece of Read More …
[Solved]: Kolmogorov complexity of string concatenation
Problem Detail: If $K(s)$ is the Kolmogorov complexity of the string $s in {0,1}^*$, Can we prove (or disprove) the following statement: “Every string $s$ is a prefix of an incompressible string; i.e. for every string $s$ there exists a string Read More …
[Solved]: An interesting metric space related to Turing machines
Problem Detail: In this question we only consider Turing machines that halt on all inputs. If $k in mathbb{N}$ then by $T_k$ we denote the Turing machine whose code is $k$. Consider the following function $$s(x,y) = min{k mid |L(T_k) cap Read More …
[Solved]: Proving that if $mathrm{NTime}(n^{100}) subseteq mathrm{DTime}(n^{1000})$ then $mathrm{P}=mathrm{NP}$
Problem Detail: I’d really like your help with proving the following. If $mathrm{NTime}(n^{100}) subseteq mathrm{DTime}(n^{1000})$ then $mathrm{P}=mathrm{NP}$. Here, $mathrm{NTime}(n^{100})$ is the class of all languages which can be decided by nondeterministic Turing machine in polynomial time of $O(n^{100})$ and $mathrm{DTime}(n^{1000})$ is Read More …