Problem Detail: Please consider the following Divide-And-Conquer Problem: You’re consulting for a small computation-intensive investment company, and they have the following type of problem that they want to solve over and over. A typical instance of the problem is the following. Read More …
Blog
[Solved]: Finding median of three sorted array (the same length)
Problem Detail: I think about following problem: There are given three sorted arrays $A,B,C$ (each of them is length $n$). Every array has distinct elements. Find median of union $A,B,C$. I consider following approach: Let’s consider $A_i, B_i, C_i$, where $i=n/2$. Read More …
[Solved]: Is this language Context-Free?
Problem Detail: Is the language $$L = {a,b}^* setminus {(a^nb^n)^nmid n geq1 }$$ context-free? I believe that the answer is that it is not a CFL, but I can’t prove it by Ogden’s lemma or Pumping lemma. Asked By : Andrés Felipe Read More …
[Solved]: Dynamic Programming Travel Planning Problem
Problem Detail: You want to visit n cities: $0 → 1 → 2 → · · · → n$. For traveling between city $i$ and $i + 1$ $(0 ≤ i < n) $ you need to choose between two modes Read More …
[Solved]: minimizing the summed cardinality of set unions
Problem Detail: this optimization problem, I am working on, is kind of making me crazy. 😉 Given is a list o of sets (with finite cardinality) of strictly positive integer values (Z>0), e.g.: o_without_sizes = [ {1, 2, 3, 4} , Read More …
[Solved]: If the universe were predetermined, would non-deterministic automata still make sense?
Problem Detail: If the universe were governed by predeterminism (i.e. some deity decided in advance how everything, ever, would play out), would the notion of non-deterministic automata make sense? Or would it not, but we wouldn’t know it? Asked By : JesseTG Read More …
[Solved]: Point Location Problem in Polygon in Repetitive Mode for a Simple Polygon
Problem Detail: I consider Point Location Problem in Polygon in repetitive mode in the case of simple polygon. In computational geometry,Point Location Problem in Polygon problem asks whether a given point in the plane lies inside, outside, or on the boundary Read More …
[Solved]: A “natural” decidable problem not in $mathsf{NP}$?
Problem Detail: Are there any “natural” examples of decidable problems that are definitively known not to be in NP? The decidable languages I know of that are not contained in NP are usually derived from the time hierarchy theorem, which produces Read More …
[Solved]: Online generation of uniform samples
Problem Detail: A source provides a stream of items $x_1, x_2,dots$ . At each step $n$ we want to save a random sample $S_n subseteq { (x_i, i)|1 le i le n}$ of size $k$, i.e. $S_n$ should be a uniformly Read More …
[Solved]: Dijkstra algorithm: equal number of shortest paths
Problem Detail: If I had a Dijkstra graph with the number shortest paths from Node A to O being 1, would it be correct to say: the equal number of shortest paths from A to O is 1 and not 0, Read More …