Problem Detail: A recent puzzle blog post about finding three evenly spaced ones lead me to a stackoverflow question with a top answer that claims to do it in O(n lg n) time. The interesting part is that the solution involves Read More …
Category: Uncategorized
[Solved]: Prove REGULAR_TM is undecidable
Problem Detail: I am studying the proof of the following theorem: Given the language $mathit{REGULAR}_mathit{TM} = {langle M rangle | M $ is a turing machine and $mathit{Accept}(M)$ is regular$}$ $mathit{REGULAR}_mathit{TM}$ is undecidable. The proof given in Sipser shows that if Read More …
[Solved]: If one-way functions exist are we definitely using them?
Problem Detail: I know that if one-way functions exist then there are certain universal one-way functions that exist, but to my knowledge they are too impractical to implement (which is the main reason why they are not being used in modern Read More …
[Solved]: minimum subset of dominating 2D points
Problem Detail: From an initial set $S$ of 2D points, how to efficiently compute a minimum(-size) dominating subset $M$ ? $M$ is a dominating subset of $S$ if for any $(x,y)$ in $S$ there is at least one point (a,b) in Read More …
[Solved]: Transform unstructured flow charts into structured ones
Problem Detail: Has anyone studied the problem of converting a generic flowchart to a semantically equivalent “structured flowchart” (i.e. one that only uses the ‘if’ and ‘while’ block structure)? I can see this may be relevant to code generation and optimization Read More …
[Solved]: Prove NP-completeness for union of NP-complete language and language in P
Problem Detail: Given disjoint languages $X$ and $Y$, where $X$ is NP-complete and $Yin P$ , how do I prove that $Xcup Y$ is NP-complete? My idea is to prove that $(Xcup Y)in NP$ and then prove that $Xcup Y$ is Read More …
[Solved]: Find all pairs of strings in a set with Levenshtein distance < d
Problem Detail: I have a set of $n = $ 100 million strings of length $l = 20$, and for each string in the set, I would like to find all the other strings in the set with Levenshtein distance $le Read More …
[Solved]: Shortest path from that passes through a set of edges once
Problem Detail: Given a graph with weighted edges. How to find the shortest path from vertex $A$ to vertex $B$ that passes through a set of edges $X$ at most once? $X$ can be big. Slow solution: Finding shortest path from Read More …
[Solved]: Algorithm to extract the subgraph of all nodes with degree at least four
Problem Detail: I have an undirected graph represented by a list of nodes and a list of edges. What I need to produce from this is a list of nodes and edges representing a new graph containing only the nodes which Read More …
[Solved]: How to compare the time-complexity of an optimized algorithm with that of the original?
Problem Detail: I had an algorithm with time-complexity of $O(htimes w)$, knowing $h$ is the height and $w$ is the width of an image being processed (or a simple matrix of size $htimes w$). I managed to reduce the range that Read More …