Problem Detail: There are $n$ bins, the $i$th bin contain $a_i$ balls. The balls has $n$ colors, there are $a_i$ balls of color $i$. Let $m=sum_{i=1}^n a_i$. A swap is take a ball from one bin and swap with a ball Read More …
Author: ignougroup
[Solved]: Definition of $Theta$ for negative functions
Problem Detail: I’m working out of the 3rd edition CLRS Algorithms textbook and in Chapter 3 a discussion begins about asymptotic notation which starts with $Theta$ notation. I understood the beginning definition of: $$Theta(g(n)) = { f(n),|, exists, c_1, c_2 > Read More …
[Solved]: Non-regular Languages?
Problem Detail: Possible Duplicate: How to prove that a language is not regular? Why $L_a$ and $L_b$ are not reguluar? $L_a = { e^i f^{n-i} g^j h^{n-j} : n in N, 1 leq i, j leq n }$. $L_b= {nm^{i_1} Read More …
[Solved]: Is it possible to decide if a given algorithm is asymptotically optimal?
Problem Detail: Is there an algorithm for the following problem: Given a Turing machine $M_1$ that decides a language $L$, Is there a Turing machine $M_2$ deciding $L$ such that $t_2(n) = o(t_1(n))$? The functions $t_1$ and $t_2$ are the worst-case Read More …
[Solved]: How can we design an efficient warehouse management program?
Problem Detail: Assume that we want to develop a warehouse management system, which picks up plastic boxes and stacks them on a pallet. A pallet has a maximum of 5 vertical box stacks and the maximum height of a box stack Read More …
[Solved]: Minimal size of contracting a DAG into a new DAG
Problem Detail: We have a DAG. We have a function on the nodes $Fcolon Vto mathbb N$ (loosely speaking, we number the nodes). We would like to create a new directed graph with these rules: Only nodes with the same number Read More …
[Solved]: Is it allowed to do a binary search with an oracle when proving NP-completeness?
Problem Detail: In http://cs.stackexchange.com/a/45524/28999, they do a binary search using an oracle for an NP-Complete problem. They show that the original problem can be reduced to that NP-Complete problem, implying that the original problem is in NP. Why is that allowed? Read More …
[Solved]: What is the difference between a problem and an algorithm?
Problem Detail: I can say that $x * y$ is a problem, but also I can say that $x * y$ is an algorithm for finding the area of rectangle. I been reading Wikipedia about an algorithm and a problem, but Read More …
[Solved]: Partition an infinite regular language into 2 disjoint infinite regular languages
Problem Detail: Given any infinite regular language $L$, how can I prove that $L$ can be partitioned into 2 disjoint infinite regular languages $L_1, L_2$? That is: $L_1 cup L_2 = L$, $L_1 cap L_2 = varnothing$, and $L_1$ and $L_2$ Read More …
[Solved]: Name of Bomberman algorithm?
Problem Detail: Last couple of days I’ve been pulling my hair trying to find the name of a bomberman-esque algorithm which finds solutions to the question of where to place a single bomb so as to blow all targets up, either Read More …