Problem Detail: So, let’s say we have two languages $L$ (which is any context-free language) and $M$ which is the basic CFL ${0^n1^n: ngeq 0}$. Can $L le_p M$ ? Why or why not? How do polynomial time reductions even work Read More …
Category: Uncategorized
[Solved]: Data structure for range-value-sum
Problem Detail: I have to be able to perform insert, delete, range-value-sum, and range-2-max-values with a data structure. Range-value-sum(xl,xr): with a range [xl,xr] (for a range query), it reports the sum of values of all elements whose keys are in the Read More …
[Solved]: Is it more effective to vote for a woman?
Problem Detail: A certain political party wants to encourage women to participate in their primary elections, so they decide, that the 4th position is reserved for a woman. That is, if there is no woman in the top 4 positions, then Read More …
[Solved]: Why don’t we emphasize “length of input string” when considering time complexity of sorting algorithms?
Problem Detail: The knapsack problem is $O(c,n)$ where $c$ is the capacity of knapsack and $n$ is the number of items. Yet it’s exponential because the size of the input is $log(c)$. However, why don’t we emphasize length of input in Read More …
[Solved]: Selecting random points at general position
Problem Detail: How will you find a random collection of $n$ points in the plane, all with integer coordinates in a specified range (e.g. -1000 to 1000), such that no 3 of them are on the same line? The following algorithm Read More …
[Solved]: Partition points in a plane with a straigth line
Problem Detail: Given are a 2D plane and a array of points in this plane, with every point having an integer value assigned. Is there an algorithm which, when given a ratio a/b, divides the plane with a straight line, so Read More …
[Solved]: How to prove “The power set of a countable set must be uncountable”?
Problem Detail: I’m not sure if this statement is correct, but my friend said so. The problem arose from this T/F question: Let $F={f: f$ be a primitive recursive function from $mathbb{N}$ to $mathbb{N}}$, then $2^F$ (Power set of $F$) is Read More …
[Solved]: Simple Pushdown Automaton
Problem Detail: I’m currently learning about PDAs and their power when constructing them from Context-Free Grammars, however I’m still unsure of how to properly construct a CFG, and then a PDA from that CFG. In the book, Formal Languages, Automata, and Read More …
[Solved]: Are there some real-world optimization problems with very cheap objective functions?
Problem Detail: Many real world optimization tasks (especially black box optimization) have objective functions, which are quite expensive to evaluate. For example to find the optimal shape of an airplane wing, a computer model of the wing needs to be constructed Read More …
[Solved]: Is it theoretically exist a computer that never affected by computer virus?
Problem Detail: Is it theoretically exist a computer that never affected by computer virus? just wonder if there could be a revolution on the computer? Asked By : Victor Answered By : babou Do you mean “that cannot be affected” or “that was Read More …