Problem Detail: My intuition is telling me that this is not the case. But I am having trouble formulating a proof for this.How do I prove it ? Asked By : user3714205 Answered By : babou Take the language $L= {a^{2^p}mid pgeq 1}$. Read More …
Blog
[Solved]: Is the following extension of finite state automata studied?
Problem Detail: Consider a finite state machine as usual, but every transition, it can also update an integer counter by adding or subtracting a number. Say, a transition function of the form $delta(q,a) = (p,k)$ moves to the new state $p$, Read More …
[Solved]: Need for an augmented grammar
Problem Detail: The question is under the concept of LR parser. Suppose the original grammar is S->AA A->aA|b Is it necessary to add an additional rule S’->S to make it as augmented grammar? In short, I want to know the use Read More …
[Solved]: $O(frac{log n}{log log n})$ algorithm for the prefix parity problem
Problem Detail: The prefix parity problem can be defined as follows. You are given a string $S$ of length $n$ and initially every character is $0$. Then you want to build a data structure that can support updates such as follows. Read More …
[Solved]: Operator overloading: Java vs. Python
Problem Detail: Why operator overloading was included in Python and not in Java? How does one decide to include or exclude operator overloading in a programming language? It is said here that operator overloading is excluded from Java to make the Read More …
[Solved]: Why is this function computable in $O(n^{1.5})$ time?
Problem Detail: My textbook says: “We define the function $fcolon mathbb{N}tomathbb{N}$ as follows: $f(1)=2$ and $f(i+1)=2^{f(i)^{1.2}}$. Note that given $n$, we can easily find in $O(n^{1.5})$ time the number $i$ such that $n$ is sandwiched between $f(i)$ and $f(i+1)$.” How can Read More …
[Solved]: For a Turing Machine $M_1$, how is the set of machines $M_2$ which are “shorter” than $M_1$ and which accept the same language decidable?
Problem Detail: I wonder how come that the following language is in $mathrm R$. $L_{M_1}=Bigl{langle M_2rangle ;Big|;; M_2 text{ is a TM, and } L(M_1)=L(M_2), text{ and } |langle M_1rangle| > | langle M_2 rangle| Bigr} $ (I know that it’s Read More …
[Solved]: Why is this $f(n) leq 6n^3 + n^2 log n in O(n^3)$ for all $n geq 1$?
Problem Detail: I’m currently studying for an algorithms midterm in about 2 days and am reading from the beginning of the course, and stumbled upon this when I actually looked at the examples. The question equation: $f(n) = 6n^3 + n^2log Read More …
[Solved]: Size of the universe for van Emde Boas Trees
Problem Detail: In order to achieve the time complexity of $O(log log u)$ for van Emde Boas trees I read in this lecture that the the universe size $u$ is chosen as $u = 2^{2^k}$ for some integer $k$ for van Read More …
[Solved]: Are there any problems in $APX – PTAS$ that are not $APX$-complete?
Problem Detail: I have a question about the structure of the complexity class $APX$. Obviously, unless $P=NP$, no problem in the class $PTAS$ can be $APX$-complete (under the AP-reduction). However, what about the rest of problems in $APX$? Are there any Read More …