Problem Detail: Basically, is the following statement true? $A leq_p B$ $rightarrow$ $B leq_p A$ Asked By : robowolverine Answered By : Sasho Nikolov Short answer: No. For one example, take $A$ to be the language $A = {0, 1}^*$, i.e. the language Read More …
Blog
[Solved]: Automated optimization of 0-1 matrix vector multiplication
Problem Detail: Question: Is there established procedure or theory for generating code that efficiently applies a matrix-vector multiplication, when the matrix is dense and filled with only zeros and ones? Ideally, the optimized code would make systematic use of previously computed Read More …
[Solved]: Paxos: Accepting Proposals With Different Values and Consensus in Paxos
Problem Detail: I have a number of questions about Paxos which I can’t answer in full confidence from reading the paper (Paxos Made Simple). My questions are loosely based around the following quote: In Paxos, a value is chosen when a Read More …
[Solved]: Getting minimum DFA for regular expression (11)*+(111)*
Problem Detail: (sorry beforehand I know putting scanned diagrams may seem not-so-professional but this problem is sticking for long and its interesting too) The language corresponding to given regex seems to accepts all strings of 1’s with length in multiple of Read More …
[Solved]: How to prove P$neq$NP?
Problem Detail: I am aware that this seems a very stupid (or too obvious to state) question. However, I am confused at some point. We can show that P $=$ NP if and only if we can design an algorithm that Read More …
[Solved]: How to find the element of the Digit Sum sequence efficiently?
Problem Detail: Just out of interest I tried to solve a problem from “Recent” category of Project Euler ( Digit Sum sequence ). But I am unable to think of a way to solve the problem efficiently. The problem is as Read More …
[Solved]: Nth number in a infinite sequence of numbers
Problem Detail: This was interview question. When the input is a infinite sequence of numbers starting from 1, what is the nth digit? e.g.) 123456789101112131415161718192021….. here 28th digit is 1. Asked By : Sungguk Lim Answered By : wvxvw Just to add a Read More …
[Solved]: Set cover problem and the existence of such cover
Problem Detail: In the set cover problem we want to find in the $mathbb{S} subset 2^mathbb{U}$ the subset ${s_i}_{1..k}$, such that $cup s_i = mathbb{U}$ for given $K$, where $k le K$. But how to reduce the set cover problem to Read More …
[Solved]: Why not to take the unary representation of numbers in numeric algorithms?
Problem Detail: A pseudo-polynomial time algorithm is an algorithm that has polynomial running time on input value (magnitude) but exponential running time on input size(number of bits). For example testing whether a number $n$ is prime or not, requires a loop Read More …
[Solved]: Computing FOLLOW sets for LL(1) grammar. Stuck on question
Problem Detail: Calculate the FOLLOW sets for all the non terminals: $S rightarrow bEx mid Db mid b mid F$ $D rightarrow EDc mid Y$ $E rightarrow dED mid dDY$ $Y rightarrow ab mid aDx mid varepsilon$ So I know Read More …