Problem Detail: I have been told than $n^{1000001} = O(1.000001^n)$. If that’s the case, there must be some value $n$ at which $1.000001^n$ exceeds $n^{1000001}$. However, when I consult Wolfram Alpha, I get a negative value for when that occurs. http://www.wolframalpha.com/input/?i=1.000001%5Ex+%3D+x%5E1000001 Read More …
Category: Uncategorized
[Solved]: Complexity of dynamic programming algorithm for Knapsack
Problem Detail: Dynamic programming algorithm for Knapsack is stated to have complexity $mathcal O (nW)$. However, I’ve also seen the complexity stated as $mathcal O (n^2V)$, where $V=max v_i$. (Here $n$ is the number of items and $W$ the weight limit). Read More …
[Solved]: Give a grammar to show whether a language is regular or context-free
Problem Detail: I have to generate a grammar for the language $L = { w in { a, b}^* mid |w| in 2mathbb{N}, w neq w^R}$ and give the type of the language. I’ve generated the grammar $qquad begin{align} S &to Read More …
[Solved]: How was the ALU implemented in the first computer (i.e., Babbage’s analytical engine)?
Problem Detail: I’ve seen circuit level implementations of ALU’s before, but how are NOT/AND/ADD performed mechanically? Asked By : Wuschelbeutel Kartoffelhuhn Answered By : slebetman Babbage’s arithmetic unit (ALU) for the Analytical Engine was originally called the mill. It wasn’t constructed out of Read More …
[Solved]: Find k maximum numbers from a heap of size n in O(klog(k)) time
Problem Detail: I have a binary heap with $n$ elements. I want to get the $k$ largest elements in this heap, in $O(k log k)$ time. How do I do it? (Calling deletemax $k$ times yields a $O(k log n)$ complexity. Read More …
[Solved]: On “The Average Height of Planted Plane Trees” by Knuth, de Bruijn and Rice (1972)
Problem Detail: I am trying to derive the classic paper in the title only by elementary means (no generating functions, no complex analysis, no Fourier analysis) although with much less precision. In short, I “only” want to prove that the average Read More …
[Solved]: Restricted version of the Clique problem?
Problem Detail: Consider the following version of the Clique problem where the input is of size $n$ and we’re asked to find a clique of size $k$. The restriction is that the decision procedure cannot change the input graph into any Read More …
[Solved]: What if a formal grammar cannot be terminated?
Problem Detail: I’m currently in a class on Computability and we just finished looking at formal grammars before moving onto finite automata. We were given an several examples of a formal grammar, and one stuck out in particular: V: { S, Read More …
[Solved]: How to write CFG for languages
Problem Detail: How do you write the CFG for the following language: {ax by c ax+y} Is there some formula or rules I need to follow? An explanation will be so appreciated. What I tried is: First I broke ax+y into Read More …
[Solved]: Research on evaluating the performance of cache-obliviousness in practice
Problem Detail: Cache-oblivious algorithms and data structures are a rather new thing, introduced by Frigo et al. in Cache-oblivious algorithms, 1999. Prokop’s thesis from the same year introduces the early ideas as well. The paper by Frigo et al. present some Read More …