Most Popular

1500 questions
14
votes
1 answer

Is there a context free, non-regular language $L$, for which $L^*$ is regular?

I know that there are non-regular languages, so that $L^*$ is regular, but all examples I can find are context-sensitive but not context free. In case there are none how do you prove it?
Simon S
  • 593
  • 3
  • 14
14
votes
1 answer

Coverage problem (transmitter and receiver)

I try to solve the following coverage problem. There are $n$ transmitters with coverage area of 1km and $n$ receivers. Decide in $O(n\log n)$ that all receivers are covered by any transmitter. All reveivers and transmiters are represented by their…
com
  • 3,199
  • 3
  • 27
  • 39
14
votes
2 answers

When can I use dynamic programming to reduce the time complexity of my recursive algorithm?

Dynamic programming can reduce the time needed to perform a recursive algorithm. I know that dynamic programming can help reduce the time complexity of algorithms. Are the general conditions such that if satisfied by a recursive algorithm would…
14
votes
1 answer

Why will the Hindley-Milner algorithm never yield a type like t1 -> t2?

I'm reading about the Hindley-Milner typing algorithm while writing an implementation, and see that, as long as every variable is bound, you'll always get either atomic types or types where the arguments will determine the final type, such as t1 ->…
Juan
  • 755
  • 4
  • 16
14
votes
4 answers

Deleting in Bloom Filters

I know that standard Bloom Filters only have operations like inserting elements and checking if an element belongs to filter, but are also some modification of Bloom filters which enable a delete operation--for example: counting Bloom filters. I…
14
votes
2 answers

Does every NP problem have a poly-sized ILP formulation?

Since Integer Linear Programming is NP-complete, there is a Karp reduction from any problem in NP to it. I thought this implied that there is always a polynomial-sized ILP formulation for any problem in NP. But I've seen papers on specific NP…
14
votes
3 answers

Complexity of the Kitten Adoption problem

This came up while I was trying to answer this question on Wiring Length Minimization. I was going to call this the "polygamous marriage" problem, but the internet, so kittens. Yay! Suppose we have $M$ kittens that need to be adopted by $N$…
Wandering Logic
  • 17,863
  • 1
  • 46
  • 87
14
votes
4 answers

Computing set difference between two large sets

I have two large sets of integers $A$ and $B$. Each set has about a million entries, and each entry is a positive integer that is at most 10 digits long. What is the best algorithm to compute $A\setminus B$ and $B\setminus A$? In other words, how…
user917279
  • 241
  • 1
  • 2
  • 5
14
votes
3 answers

Efficiently sampling shortest $s$-$t$ paths uniformly and independently at random

Let $G$ be a graph, and let $s$ and $t$ be two vertices of $G$. Can we efficiently sample a shortest $s$-$t$ path uniformly and independently at random from the set of all shortest paths between $s$ and $t$? For simplicity, we can assume $G$ is…
Juho
  • 22,905
  • 7
  • 63
  • 117
14
votes
4 answers

Dijsktra's algorithm applied to travelling salesman problem

I am a novice(total newbie to computational complexity theory) and I have a question. Lets say we have 'Traveling Salesman Problem' ,will the following application of Dijkstra's Algorithms solve it? From a start point we compute the shortest…
Kamaal
14
votes
2 answers

Organisation and Architecture of Quantum Computers

What are devices and their interconnections used alongwith Quantum Processors? Are they compatible with hardware devices like Cache, RAM, Disks of current computers?
check123
  • 530
  • 3
  • 11
14
votes
2 answers

Is this graph problem NP-hard?

Given a bipartite graph G with bipartition $G = A \cup B$, and weights $w(v)$ for nodes of G such that $w(v)>0$ for $v \in A$ and $w(v)<0$ for $v \in B$. Let $V(G) = \{ v_1,v_2,..,v_n \}$. Call an ordering $v_1,v_2,.., v_n$ permissible if for each…
Hao S
  • 135
  • 1
  • 10
14
votes
3 answers

Why are search problems assumed to have the structure of "find a path in a graph"?

I have skimmed a few introductions to "search problems", and I have noticed that: Stated informally search problems are defined as "find an object y inside a larger space/object X" But when defining exact algorithms, search problems are thought of…
user56834
  • 4,244
  • 5
  • 21
  • 35
14
votes
1 answer

Reachable state space of an 8-puzzle

I've just began studying Artificial Intelligence and am wondering why the reachable state space of an 8-puzzle is $9!/2$. I see that the number of permutations of the tiles is $9!$ but it is not immediately obvious why half the possible states of…
Cam
  • 263
  • 1
  • 3
  • 7
14
votes
2 answers

Does coNP-completeness imply NP-hardness?

Does coNP-completeness imply NP-hardness? In particular, I have a problem that I have shown to be coNP-complete. Can I claim that it is NP-hard? I realize that I can claim coNP-hardness, but I am not sure if that terminology is standard. I am…
Austin Buchanan
  • 679
  • 6
  • 15