Problem Detail: I’d really love your help with the following: For any fixed $L_2$ I need to decide whether there is closure under the following operators: $A_r(L)={x mid exists y in L_2 : xy in L}$ $A_l(L)={x mid exists y in Read More …
Blog
[Solved]: Fast algorithm for interpolating data from polar coordinates to cartesian coordinates
Problem Detail: I have a set of solution nodes generated over a polar grid. I would like to convert / interpolate these solution nodes onto a Cartesian grid: That is, using the image above, for each node in the Cartesian grid Read More …
[Solved]: Can we make a problem harder than NP and coNP if they are not equal?
Problem Detail: Let us assume that $mathsf{NP} neq mathsf{coNP}$. Consider the graph 3-colorability problem. Since $mathsf{NP} neq mathsf{coNP}$ implies $mathsf{P} neq mathsf{NP}$ and 3-coloribility is $mathsf{NP}$-complete and its complement is $mathsf{coNP}$-complete , we have: 3-coloribility is not in $mathsf{P}$, i.e. there Read More …
[Solved]: Algorithm for wait-for graph
Problem Detail: During the process of deadlock detection, the wait-for graph can be obtained from the resource-allocation graph. To detect whether there is a deadlock using the wait-for graph, can topological sort be used? By making a slight modification, i.e., instead Read More …
[Solved]: Can a Turing Machine decide if an NFA accepts a string of prime length?
Problem Detail: I want to know if the following problem is decidable: Instance: An NFA A with n states Question: Does there exist some prime number p such that A accepts some string of length p. My belief is that this Read More …
[Solved]: CFG for ${a^i b^j : 2 i<j}$
Problem Detail: So I have a question: Give a CFG for ${a^i b^j : 2 i<j}$ And this is my approach: $Sto AB$ $Ato aAbmid varepsilon$ $Bto b mid bB$ A confirmation, or correction, along with how you tested(and tips for Read More …
[Solved]: Recursive definition of sum of two numbers in terms of the successor function
Problem Detail: This is a question from the book Data structures using C and C++ by Tenenbaum. Not a homework problem but self-study. Recursive definition of a+b, where a and b are non-negative integers, in terms of successor function succ defined Read More …
[Solved]: Automatic Downcasting by Inferring the Type
Problem Detail: In java, you must explicitly cast in order to downcast a variable public class Fruit{} // parent class public class Apple extends Fruit{} // child class public static void main(String args[]) { // An implicit upcast Fruit parent = Read More …
[Solved]: What are some problems which are easily solved by human brain but which would take more time computers?
Problem Detail: Are there any problems which can be solved by human brain in a very less time but a computer may take a lot of time or a computer could never solve it ? Asked By : avi Answered By : vzn Read More …
[Solved]: Running time of a nested loop with $sum i log i$ term
Problem Detail: So I have the following pseudo-code: Function(n): for (i = 4 to n^2): for (j = 5 to floor(3ilog(i))): // Some math that executes in constant time So far, I know that to find this i will be calculating Read More …