Most Popular

1500 questions
13
votes
2 answers

Interactive Proofs for coNP

I am trying to understand interactive proof systems and tried the following problem as an exercise. We know that $PH \subseteq PSPACE$ and $IP=PSPACE$, so come up with (easy to understand) interactive proof systems for $PH$? An interactive proof…
Shitikanth
  • 696
  • 1
  • 4
  • 13
13
votes
1 answer

Use minimum number of swaps so each bin contains balls of the same color

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 from another bin. We want minimum number of swaps…
Chao Xu
  • 3,103
  • 19
  • 34
13
votes
3 answers

Computation of busy beaver function

The busy beaver max shifts function, $S(n)$, has known values for $n\leq4$. Is there some basic, structural reason why it's inconceivable that we will ever find $S(n)$ for $n>4$? What is so different about $n=4$ than $n=5$? Or $n=6$? Somewhere…
PeteyPabPro
  • 271
  • 1
  • 7
13
votes
5 answers

Does it make sense to say Big Theta of 1? Or should we just use Big O?

Does saying $f(x) = \Theta(1)$ provide any extra information over saying $f(x) = O(1)$? Intuitively, nothing grows more slowly than a constant, so there should be no extra information in specifying Big Theta over Big O in this case.
MattCochrane
  • 259
  • 2
  • 5
13
votes
4 answers

Water Jug Problem in AI

In AI we can classify a problem in 3 classes, ignorable, recoverable or irrecoverable problems. Now while reading Water jug Problem I am wondering in which of these 3 class it should fall? It should reside under recoverable right? As we can go…
Turing101
  • 1,230
  • 2
  • 16
  • 32
13
votes
1 answer

Choosing taps for Linear Feedback Shift Register

I am confused about how taps are chosen for Linear Feedback Shift Registers. I have a diagram which shows a LFSR with connection polynomial $C(X) = X^5 + X^2 + 1$. The five stages are labelled: $R4, R3, R2, R1$ and $R0$ and the taps come out of $R0$…
sam
  • 357
  • 2
  • 7
13
votes
2 answers

Can any NP-Complete Problem be solved using at most polynomial space (but while using exponential time?)

I read about NPC and its relationship to PSPACE and I wish to know whether NPC problems can be deterministicly solved using an algorithm with worst case polynomial space requirement, but potentially taking exponential time (2^P(n) where P is…
Shlomi Fish
  • 233
  • 2
  • 6
13
votes
1 answer

Is the IO monad technically incorrect?

On the haskell wiki there is the following example of conditional usage of the IO monad (see here). when :: Bool -> IO () -> IO () when condition action world = if condition then action world else ((), world) Note that in this…
Lasse
  • 233
  • 1
  • 6
13
votes
3 answers

Which other programming languages apart from Python and predecessor are out there using indentation to define code blocks?

Python quite famously uses indentation to syntactically define blocks of code. (See Compound statements in the Python Language Reference). After years of using Python I'm still intrigued by and very fond of this syntax feature. But I wonder: Apart…
halloleo
  • 257
  • 2
  • 5
13
votes
4 answers

Getting started with Program Analysis

I'm looking for resources on getting started with program analysis. The only book I've found on the topic is the Nielson & Nielson book. Other than that, it seems like there are only "compiler" books where "program analysis" would be a chapter, or…
abeln
  • 263
  • 1
  • 7
13
votes
2 answers

Difference between Lamport timestamps and Vector clocks

Lamport timestamps and vector clocks sound like almost the same thing. Both are used to determine the order of events in a distributed system. What are their key differences?
bkoodaa
  • 377
  • 2
  • 3
  • 13
13
votes
5 answers

Machine Learning vs System Identification?

Could anyone explain to me the differences & similarities between machine learning and system identifications? Are these just two names of the same thing? In this page, they say: Machine learning and system identification communities are faced…
CherryQu
  • 231
  • 1
  • 2
  • 5
13
votes
3 answers

How does 'deforestation' remove 'trees' from a program?

I think understand how deforestation consumes and produces a list at the same time (from a fold and an unfold function -- see this good answer on CodeReview here), but when I compared that with the wikipedia entry on the technique it talked about…
13
votes
4 answers

Why is there no permutation in Regexes? (Even if regular languages seem to be able to do this)

The Problem There is no easy way to get a permutation with a regex. Permutation: Getting a word $$w=x_1…x_n$$ ("aabc") to another order, without changing number or kind of letters. Regex: Regular expression. For verification: "Regex permutations…
13
votes
2 answers

If $L$ is a subset of $\{0\}^*$, then how can we show that $L^*$ is regular?

Say, $L \subseteq \{0\}^*$. Then how can we prove that $L^*$ is regular? If $L$ is regular, then of course $L^*$ is also regular. If $L$ is finite, then it is regular and again $L^*$ is regular. Also I have noticed that, for $L = \{0^p \mid p \text{…
ChesterX
  • 249
  • 3
  • 7