Problem Detail: A (now closed) question on SO made me think about the following problem: Given an arbirtary number of points (2D), draw a path that consists of straight lines between points, visits each point exactly once and does not intersect Read More …
Blog
[Solved]: Sort array of 5 integers with a max of 7 compares
Problem Detail: How can I sort a list of 5 integers such that in the worst case it takes 7 compares? I don’t care about how many other operations are performed. I don’t know anything particular about the integers. I’ve tried Read More …
[Solved]: Given two total Turing machines, is it undecidable problem to detect whether they give the same output on all inputs?
Problem Detail: See title. And by all inputs I mean providing the functions with the same input and checking whether they give the same output for each case. EDIT If it can be reduced to Halting problem, then how? EDIT 2 Read More …
[Solved]: Can an intersection of two context-free languages be an undecidable language?
Problem Detail: I’m trying to prove that $exists L_1, L_2 : L_1$ and $L_2$ are context-free languages $land;L_1 cap L_2 = L_3$ is an undecidable language. I know that context-free languages are not closed under intersection. This means that I can Read More …
[Solved]: What is meant by Category theory doesn’t yet know how to deal with higher-order functions?
Problem Detail: In reading Uday Reddy’s answer to What is the relation between functors in SML and Category theory? Uday states Category theory doesn’t yet know how to deal with higher-order functions. Some day, it will. As I thought Category theory Read More …
[Solved]: Polynomial time reducibility
Problem Detail: $L_1$ and $L_2$ are two languages defined on the alphabet $sum$. $L_1$ is reducible to $L_2$ in polynomial time. Which of the following cannot be true? $L_1 in P$ and $L_2$ is finite $L_1 in NP$ and $L_2 Read More …
[Solved]: Difference between 1* + 0* and (1 + 0)*
Problem Detail: I know that (1 + 0)* is the set of all bit strings; but isn’t 1* + 0* the same thing? Asked By : O.A. Answered By : Yuval Filmus The set $1^*+0^*$ is composed of two parts: $1^*$ and $0^*$. Read More …
[Solved]: Minimize the maximum component of a sum of vectors
Problem Detail: I’d like to learn something about this optimization problem: For given non-negative whole numbers $a_{i,j,k}$, find a function $f$ minimizing the expression $$max_k sum_i a_{i,f(i),k}$$ An example using a different formulation might make it clearer: You’re given a set Read More …
[Solved]: Data Structure For Closest Pair Problem
Problem Detail: Suppose I have a list of distinct integers. I’m looking for a data structure that will support the operations search, insert, delete and closest_pair in $O(log n)$ time. I know that a sorted array supports search, insert and delete Read More …
[Solved]: circle packing algorithm used by Percolator
Problem Detail: I was admiring this rendition of the Mona Lisa from quasimondo‘s Flickr account. He says: Combining circle packing with data visualization. The pie charts show the distribution of the dominant colors under the circle area. The circle packing technique Read More …