Most Popular

1500 questions
12
votes
2 answers

Good snapshottable data structure for an in-memory index

I'm designing an in-memory object database for a very specific use case. It is single writer, but must support efficient concurrent reads. Reads must be isolated. There is no query language, the database only supports: get object/-s by…
dm3
  • 223
  • 1
  • 6
12
votes
2 answers

How much bigger can an LR(1) automaton for a language be than the corresponding LR(0) automaton?

In an LR(0) parser, each state consists of a collection of LR(0) items, which are productions annotated with a position. In an LR(1) parser, each state consists of a collection of LR(1) items, which are productions annotated with a position and a…
templatetypedef
  • 9,102
  • 1
  • 30
  • 60
12
votes
1 answer

Are there any known AM-complete problems/is AM-complete well defined?

I'm curious about whether there are any complete problems in the Arthur-Merlin complexity class. Graph Non-Isomorphism (GNI) seems to be the canonical example of a problem in AM, but it's probably not a complete one. I suppose I'm also wondering if…
Linear
  • 223
  • 1
  • 6
12
votes
2 answers

Why in a min priority queue (heap based) it is called "decrease-key" and not just "set-key"?

When you call decrease-key in a min priority queue, you are basically setting the key, you can accidentally put a higher key, right? so why isn't it called "set-key" or "update-key"? why (according to Wikipedia and other sources) a min priority…
Eran Medan
  • 431
  • 1
  • 4
  • 12
12
votes
5 answers

Undecidable problems limit physical theories

Does the existence of undecidable problems immediately imply the non-predictability of physical systems? Let us consider the halting problem, first we construct a physical UTM, say using the usual circuit based construction. Then there can be no…
user2663116
  • 129
  • 3
12
votes
3 answers

Why does Schaefer's theorem not prove that P=NP?

This is probably a stupid question, but I just don't understand. In another question they came up with Schaefer's dichotomy theorem. To me it looks like it proves that every CSP problem is either in P or in NP-complete, but not in between. Since…
Albert Hendriks
  • 2,521
  • 15
  • 35
12
votes
1 answer

What is the use of finding minimum number of straight lines to cover a set of points?

There is that popular problem [1] [2] in the computer science that is finding minimum number of straight lines that covers a given set of points in 2D. Even though I have scanned many papers, none of them has a clear motivation for the problem. What…
padawan
  • 1,435
  • 1
  • 12
  • 30
12
votes
1 answer

If $L$ is a regular language then so is $\sqrt{L}=\{w:ww\in L\}$

I am interested in proving that $\sqrt{L}=\{w:ww\in L\}$ is regular if $L$ is regular but I don't seem to be getting anywhere. If possible I was hoping for a hint to get me going in the right direction. Thank you for your help. My idea for…
user99163
  • 121
  • 1
  • 4
12
votes
2 answers

What is a lay explanation for universal search?

I am reading a book on a computer science topic but lack some of the prerequisite background. Normally when I run into terms I don't understand I simply look them up, but for Universal Search I simply haven't been able to find an explanation…
quant
  • 253
  • 1
  • 7
12
votes
2 answers

Standard constructive definitions of integers, rationals, and reals?

Natural numbers are defined inductively as (using Coq syntax as an example) Inductive nat: Set := | O: nat | S: nat -> nat. Is there a standard way to define integers (and maybe other sets like rationals and reals) constructively?
Alex
  • 263
  • 1
  • 5
12
votes
4 answers

Compression of Random Data is Impossible?

A few days ago this appeared on HN http://www.patrickcraig.co.uk/other/compression.htm. This refers to a challenge from 2001 - where someone was offering a prize of \$5000 for any kind of reduction to the size of randomly generated data (the…
user3467349
  • 387
  • 2
  • 12
12
votes
2 answers

What do we gain by having "dependent types"?

I thought I understood dependent typing (DT) properly, but the answer to this question: https://cstheory.stackexchange.com/questions/30651/why-was-there-a-need-for-martin-l%C3%B6f-to-create-intuitionistic-type-theory has had me thinking…
PhD
  • 337
  • 1
  • 6
12
votes
3 answers

How are hash table's values stored physically in memory?

Question: How are hash table's values stored in memory such that space if efficiently used and values don't have to be relocated often? My current understanding (could be wrong): Let's say I have 3 objects stored in a hash table. Their hash…
Pwner
  • 221
  • 1
  • 2
  • 3
12
votes
3 answers

Does the proof of undecidability of the Halting Problem cheat by reversing results?

I have trouble understanding Turing's halting problem. His proof assumes that there exists a magical machine $H$ which could determine whether a computer would halt or loop forever for a given input. Then we attach another machine that reverses the…
user27819
  • 131
  • 1
  • 4
12
votes
2 answers

Time Complexity proof for Segment Tree implementation of the ranged sum problem

I understand that segment trees can be used to find the sum of sub array of $A$. And that this can done in $\mathcal{O}(\log n)$ time according to the tutorial here. However I'm not able to prove that the querying time is indeed $\mathcal{O}(\log…