Problem Detail: I’m thinking about the optimal algorithm for the following problem: Input data: a text, say it’s an article about 5-50 pages. a set of ngrams (ngram strings, n>2), of arbitrary length, could be more than 20k n-grams. The algorithm Read More …
Category: Uncategorized
[Solved]: Constrainted Optimization Problem in Matrix Entropy
Problem Detail: I have a constrainted optimization problem in the (Shannon) matrix entropy $mathtt{(sum(entr(eig(A))))}$. The matrix $A$ can be written as the sum of rank 1 matrices of the form $[v_i,v_i^T]$ where $v_i$ is a given normalized vector. The coefficients of Read More …
[Solved]: Time complexity of Dynamic Array via repeated doubling
Problem Detail: When we implement dynamic array via repeated doubling (if the current array is full) we simply create a new array that is double the current array size and copy the previous elements and then add the new one? Correct? Read More …
[Solved]: How does this non-deterministic algorithm to find if a Hamiltonian path exists work?
Problem Detail: I have read of an algorithm that a non-deterministic Turing machine $N$ can run to determine whether a given graph $G$ has a Hamiltonian path from the start node $s$ to a certain node $n$: Write a list of Read More …
[Solved]: Would creating a complete computer simulation of the human brain prove the Church-Turing thesis?
Problem Detail: According to Wikipedia, the Church-Turing thesis “states that a function on the natural numbers is computable by a human being ignoring resource limitations if and only if it is computable by a Turing machine.” If we made a complete Read More …
[Solved]: Are all context-sensitive languages decidable?
Problem Detail: I was going through the Wikipedia definition of context-sensitive language and I found this: Each category of languages is a proper subset of the category directly above it. Any automaton and any grammar in each category has an equivalent Read More …
[Solved]: What do f(x) and g(x) represent in Big O notation?
Problem Detail: I have been reading about Big O notation. People writing about Big O often use the terms $f(x)$ and $g(x)$. For instance, I often see people write things like $f(x) = O(g(x))$ or $f(x) in O(g(x))$. Obviously $f(x)$ is Read More …
[Solved]: Tighter analysis of modified Borůvka’s algorithm
Problem Detail: Borůvka’s algorithm is one of the standard algorithms for calculating the minimum spanning tree for a graph $G = (V,E)$, with $|V| = n, |E| = m$. The pseudo-code is: MST T = empty tree Begin with each vertex Read More …
[Solved]: Nested Big O-notation
Problem Detail: Let’s say I have a graph $|G|$ with $|E|=O(V^2)$ edges. I want to run BFS on $G$ which has a running time of $O(V+E)$. It feels natural to write that the running time on this graph would be $O(O(V^2)+V)$ Read More …
[Solved]: Is log(n) in complexity class P?
Problem Detail: $log(n)$ is not polynomial; is a problem solvable in $mathcal{O}(log n)$ time in P? $ntimes log(n)$ is also not polynomial; is a problem solvable in $mathcal{O}(ntimes log n)$ time in P? If not, what complexity classes contain those problems? Read More …