Problem Detail: If I have a sorted array of size $n$, can I build a Red Black tree out of it in $O(n)$ time in a different algorithm rather than splitting the tree in half every time or the straightforward way Read More …
Category: Uncategorized
[Solved]: Intuition behind Relativization
Problem Detail: I take course on Computational Complexity. My problem is I don’t understand Relativization method. I tried to find a bit of intuition in many textbooks, unfortunately, so far with no success. I will appreciate if someone could shed the Read More …
[Solved]: Problems Implementing Closures in Non-functional Settings
Problem Detail: In programming languages, closures are a popular and often desired feature. Wikipedia says (emphasis mine): In computer science, a closure (…) is a function together with a referencing environment for the non-local variables of that function. A closure allows Read More …
[Solved]: LALR(1) parsers and the epsilon transition
Problem Detail: I am having trouble getting my head wrapped around epsilon transitions while creating an LALR(1) parse table. Here’s a grammar that recognizes any number of ‘a’ followed by a ‘b’. ‘S’ is an artificial start state. ‘$’ is an Read More …
[Solved]: How to find the asymptotic runtime of these nested loops?
Problem Detail: i=n; while(i>0) { k=1; for(j=1;j<=n:j+=k) k++; i=i/2; } The while loop has the complexity of $lg(n)$ the j value of inner loop runs 1,3,6,10,15… increase like 2,3,4,5,… But how to find the overall complexity ? Asked By : Xax Read More …
[Solved]: What makes lambda calculus relevant to study?
Problem Detail: I’m starting an undergraduate computer science course next fall, but I can’t really understand λ-calculus in the context of functional programming. I may be misinterpreting this completely, but based on this definition from the Stanford Encyclopedia of Philosophy, it’s Read More …
[Solved]: Chomsky normal form: epsilon rule
Problem Detail: I have pretty simple question, but still can’t find an answer just googling it. I’m trying to understand Chomsky Normal Form (CNF). There are three production rules: $A to BC$ $A to alpha$ $S to epsilon$ First two I Read More …
[Solved]: What is the fastest online sorting algorithm?
Problem Detail: Quoting Online algorithm from Wikipedia: In computer science, an online algorithm[1] is one that can process its input piece-by-piece in a serial fashion, i.e., in the order that the input is fed to the algorithm, without having the entire Read More …
[Solved]: Can we show that non-determinism adds no power, for some specific running time?
Problem Detail: $NP = cup_{k in mathbb{N}} NTIME(n^k)$ $P = cup_{k in mathbb{N}} TIME(n^k)$ Can we show that $NTIME(n^k) = TIME(n^k)$ for a specific $k$? For how large of a $k$ can we show the above statement to be true? Asked Read More …
[Solved]: Easy to state open problems in computability theory
Problem Detail: I was searching for interesting and easy to state open problems in computability (understandable by undergraduate students taking their first course in computability) to give examples of open problems (and obviously I want the students to be able to Read More …