Problem Detail: I’ve been thinking about ways of measuring code, and, quite frankly, I can’t think of truly objective, semi-universal ways of evaluating the quality or “strength” of code to say, “Yes, this is better than that based on X, Y, Read More …
Author: ignougroup
[Solved]: Efficiently finding $k$ smallest elements of Cartesian product
Problem Detail: Given lists $A_1, A_2, dots, A_n$ of non-negative numbers, I want to find the $k$ smallest elements of the Cartesian product $A_1 times A_2 times dots times A_n$ ordered by the value $x_1 + x_2 + dots + x_n$, Read More …
[Solved]: Automatic translation between formal languages
Problem Detail: There are parser generators (some of which are limited to certain classes of grammars) which, given a grammar, automatically generate a parser for that grammar. Would it be possible to make a general-purpose translator generator to automatically translate from Read More …
[Solved]: Proving the lower bound of compares in comparison based sorting
Problem Detail: I’m reading Sedgewick and Wayne’s book of Algorithm. When I read the following proof in the attached picture, I don’t understand why it assumed the comparison number is lg(number of leaves). Any help is appreciated! Asked By : addego Answered Read More …
[Solved]: Designing context free grammar for a language with range restriction on repetition of alphabets
Problem Detail: I am having issue with designing contex free grammar for the following language: $L = {0^n 1^m , | , 2n leq m leq 3n }$ I can design for the individual cases i.e. for $m geq 2n$ and Read More …
[Solved]: Why does a polynomial-time language have a polynomial-sized circuit?
Problem Detail: I wish to understand why P is a subset of PSCPACE, that is why a polynomial-time langauge does have a polynomial-sized circuit. I read many proofs like this one here on page 2-3, but all the proofs use the Read More …
[Solved]: Closure against the operator $A(L)={ww^Rw mid w in L wedge |w| lt 2007}$
Problem Detail: I would like your help with the following question: Let $L$ be a language, and operator $A(L)={,ww^Rw mid w in L wedge |w| lt 2007,}$ where $x^R$ is the reversed string of $x$. Which of the following statements are Read More …
[Solved]: Is it possible to use plants as a medium to store data? By what data structure?
Problem Detail: my question is simple. Is it possible to use plants as a medium to store data? My opinion is: Possible, but we need to solve, how to distinguish 2 states. Duplication and CRC of stored DATA is quiet simple. Read More …
[Solved]: Hardness and directions of reductions
Problem Detail: Let us say we know that problem A is hard, then we reduce A to the unknown problem B to prove B is also hard. As an example: we know 3-coloring is hard. Then we reduce 3-coloring to 4-coloring. Read More …
[Solved]: Quick union and heuristic by size
Problem Detail: Studying Quick-Find and Quick-Union heuristic I’ve found clear that: with quick find trees and a union based on the size of the trees we can make a union in $T_{am}(n)=O(log(n))$ with quick find trees and a union based on Read More …