instruction stringlengths 0 29.8k ⌀ |
|---|
This is a big subject, but there are two basic schools of thought on how to model real-life computers (which I assume you mean -- the CPU is only one part of a computer) with mathematical automata, and they lead to two different theoretical areas -- (a) finite-state automata; (b) infinite-state automata with various re... |
It means more something like
> if P was true before C then Q will be true after that.
There are time considerations because usually C will change the environment.
Think of this example: $C=(x := 42)$ and $P=(x > 10)$. Then the instance of your rule makes sense.
EDIT: time considerations are important. Here,... |
This is a big subject, but there are two basic schools of thought on how to model real-life computers (which I assume you mean -- the CPU is only one part of a computer) with mathematical automata, and they lead to two different theoretical areas -- (a) finite-state automata; (b) infinite-state automata with various re... |
I am trying to understand Hoare logic presented at Wikipedia,
[Hoare logic at Wikipedia][1]
Apparently, if I understand correctly, a Hoare triple $$\{P\}~ C ~\{Q\}$$ means
> if P just before C, then Q holds immediately after C, as long as C terminates. (A)
However, the assignment axiom schema seems to be inter... |
Brzozowski's DFA minimization algorithm builds a minimal DFA for DFA $G$ by:
1. reversing all the edges in $G$ to get an NFA $N'$ for the reverse language,
2. using powerset construction to get $G'$ for the reverse language,
3. reversing the edges in $G'$ to get an NFA $N$ for the original language, and then
4.... |
Parametrized run time for Brzozowski's algorithm for DFA minimization |
|algorithms|finite-automata|runtime-analysis| |
Notice that what Wikipedia is saying is that
> The assignment axiom means that the truth of $\{P[x/E]\}$ is equivalent to the **after-assignment truth** of $\{P\}$.
In other words, ($P$ holds after the execution of $x:= E$) if ($P[x/E]$ holds before the execution). This is equivalent to the definition $A$ you pro... |
Another perspective on problem-hardness comes from the game and puzzle community, where the rule of thumb is that 'problems are as hard as they possibly can be' (and the exceptions come from hidden structures in the problem - Massimo's example of the determinant in comments is a good instance of this); the trick then c... |
Brzozowski's DFA minimization algorithm builds a minimal DFA for DFA $G$ by:
1. reversing all the edges in $G$, making the initial state an accept state, and the accept states initial, to get an NFA $N'$ for the reverse language,
2. using powerset construction to get $G'$ for the reverse language,
3. reversing t... |
Brzozowski's algorithm for DFA minimization |
It seems that the wording of the Wikipedia text is flakey to some extent:
> The assignment axiom means that the truth of {P[x/E]} is *equivalent* to the after-assignment truth of {P}.
The assignment axiom does not mean that. It only means that the truth of {P[x/E]} *implies* the after-assignment truth of {P}. I... |
null |
|logic|programming-languages|semantics|hoare-logic|software-verification| |
> **Possible Duplicate:**
> [How to prove that a language is not regular?](http://cs.stackexchange.com/questions/1031/how-to-prove-that-a-language-is-not-regular)
<!-- End of automatically inserted text -->
Why is the language
$ L = \{ 0^n 1^n | n \geq 1 \} $, or $ \{ 01, 0011, 000111, \ldots \} $ not a r... |
As partially answered above by Syzygy, for labelled binary trees, it is $n!C_n$, where $C_n$ being the Catalan number. Generalized this to labelled $k$-ary trees, it is $n!C^k_n$ where $C^k_n$ is the Fuzz-Catalan number
$
\begin{equation}
C^k_n= \binom{kn}{n}\frac{1}{(k-1)n+1}
\end{equation}
$
|
|probability-theory|markov-chains| |
|algorithms|complexity-theory|algorithm-analysis| |
I'm a graduate student taking a course in theory of computation and I'm having serious trouble producing content once I'm asked to. I'm able to follow the textbook ( Introduction to the Theory of Computation by Michael Sipser ) and lectures; however when asked to prove something or come up with a formal description of ... |
Resources about theory of computation, to keep up with a graduate course |
|computability|reference-request|education| |
{"Voters":[{"Id":39,"DisplayName":"Gilles"}]} |
|education| |
> **Possible Duplicate:**
> [How to prove that a language is not regular?](http://cs.stackexchange.com/questions/1031/how-to-prove-that-a-language-is-not-regular)
<!-- End of automatically inserted text -->
I'm looking for intuition about when a language is regular and when it is not. For example, consider:
... |
|formal-languages|regular-languages|intuition| |
<sup>This is supposed to become a reference question, so please excuse its terse- and broadness.</sup>
There are lots of attempts at proving either $\mathsf{P} = \mathsf{NP} $ or $\mathsf{P} \neq \mathsf{NP}$, and naturally many people think about the question, having ideas for proving either direction.
I know th... |
Now not to solve P=NP? |
|complexity-theory|reference-request|np-complete|history|p-vs-np| |
Let $a \neq b$ be two integers from the interval $[1, 2^n].$ Let $p$ be a random prime with $ 1 \le p \le n^c.$ Prove that
$$\text{prob}(a \equiv b \pmod{p}) \le c \ln(n)/(n^{c-1}).$$
Hint: As a consequence of the prime number theorem, exactly $n/ \ln(n) \pm O(n/\ln(n))$ many numbers from $\{ 1, \ldots, n \}$ are ... |
Prove fingerprinting |
|randomness| |
> **Possible Duplicate:**
> [Prove fingerprinting](http://cs.stackexchange.com/questions/1692/prove-fingerprinting)
<!-- End of automatically inserted text -->
Let $a \neq b$ be two integers from the interval $[1, 2^n].$ Let $p$ be a random prime with $ 1 \le p \le n^c.$ Prove that
$$\text{prob}(a \equiv b \pmo... |
{"OriginalQuestionIds":[1692],"Voters":[{"Id":39,"DisplayName":"Gilles"}]} |
How not to solve P=NP? |
> **Possible Duplicate:**
> [How to prove that a language is not regular?](http://cs.stackexchange.com/questions/1031/how-to-prove-that-a-language-is-not-regular)
<!-- End of automatically inserted text -->
I'm looking for intuition about when a language is regular and when it is not. For example, consider:
... |
maybe the most common technique that cannot be used is [relativization](https://en.wikipedia.org/wiki/Relativization), that is, having TM with oracle access.
The impossibility follows from a paper by [Theodore Baker, John Gill, Robert Solovay](http://dx.doi.org/10.1137/0204037) who show the existence of two oracles ... |
There is [The P-versus-NP page][1] which has a list of claims. Such claims are posted on [arXiv][2] regularly.
Scott Aaronson has [a list of criteria](http://www.technologyreview.com/blog/post.aspx?bid=349&bpid=25616) that one should check before considering a paper claiming to solve the problem seriously.
Polym... |
null |
There is [The P-versus-NP page][1] which has a list of such claims. Articles claiming to resolve the question are regularly posted on [arXiv][2].
Scott Aaronson has [a list of criteria](http://www.technologyreview.com/blog/post.aspx?bid=349&bpid=25616) that one should check before considering a paper claiming to sol... |
I'd say the most well known barriers to solving $P=NP$ are
1. Relativization (as mentioned by Ran G.)
2. Natural Proofs - under certain cryptographic assumptions, Rudich and Razborov proved that we cannot prove $P\neq NP$ using a class of proofs called natural proofs.
3. Algebrization - by Scott Aaronson and A... |
null |
null |
I'd suggest reading this [site][1] and its comments by one of a people who claims he showed that $P=NP$, this could help anyone:
>1. So You Think You Settled P verus NP You are wrong. Figure it out. Sometimes you can still salvage something interesting out of your flawed proof.
>2. You believe the proof is correct.... |
I'd suggest reading this [site][1] and its comments by one of a people who claims he showed that $P=NP$, this could help anyone:
>1. So You Think You Settled P verus NP You are wrong. Figure it out. Sometimes you can still salvage something interesting out of your flawed proof.
>2. You believe the proof is correct.... |
Given a degree distribution, how fast can we construct a graph that follows the given degree distribution? A link or algorithm sketch would be good. The algorithm should report a "no" incase no graph can be constructed and any one example if multiple graphs can be constructed. |
Reconstructing Graphs from Degree Distribution |
|algorithms|graphs| |
If the degree distribution is given as a list of degree, then you can do the following, given $n$ nodes with degrees $d_1, ... ,d_n$:
Create a complete graph $K_n$ on $n$-vertices. For each vertex $v_i$ in $K_n$, split it into $d_i$ copies. Split here means, create a number of copies with edges to every vertex $v_i$... |
If the degree distribution is given as a list of degree, then you can do the following, given $n$ nodes with degrees $d_1, ... ,d_n$:
Create a complete graph $K_n$ on $n$-vertices. For each vertex $v_i$ in $K_n$, split it into $d_i$ copies. Split here means, create a number of copies with edges to every vertex $v_i$... |
If the degree distribution is given as a list of degree, then you can do the following, given $n$ nodes with degrees $d_1, ... ,d_n$:
Create a complete graph $K_n$ on $n$-vertices. For each vertex $v_i$ in $K_n$, split it into $d_i$ copies. Split here means, create a number of copies with edges to every vertex $v_i$... |
null |
If you mean how to construct such a simple graph (no self loops and no parallel edges), maybe Havel-Hakimi theorem is what you are looking for. You can google it yourself, and the wikipedia page [Degree (graph theory)][1] is also helpful.
[1]: http://en.wikipedia.org/wiki/Degree_%28graph_theory%29#Degree_sequenc... |
I'd say the most well known barriers to solving $P=NP$ are
1. Relativization (as mentioned by Ran G.)
2. Natural Proofs - under certain cryptographic assumptions, Rudich and Razborov proved that we cannot prove $P\neq NP$ using a class of proofs called natural proofs.
3. Algebrization - by Scott Aaronson and A... |
I'm am stuck solving the next exercise:
Argue that if L1 is context-free and R is regular, then L1 /R (the right quotient) is context-free.
I know that there should exist a PDA that accepts L1 and a DFA that accepts R. I'm know trying to combine this automata to a PDA that accepts the right quotient. If I can bui... |
Argue that if L1 is context-free and R is regular, then L1 /R is context-free? |
|regular-languages|context-free|finite-automata|pushdown-automata| |
I'm am stuck solving the next exercise:
Argue that if $L_1$ is context-free and $R$ is regular, then $L_1 / R$ (the [right quotient](https://en.wikipedia.org/wiki/Right_quotient)) is context-free.
I know that there should exist a PDA that accepts $L_1$ and a DFA that accepts $R$. I'm now trying to combine these a... |
If $L_1$ is context-free and $R$ is regular, then $L_1 / R$ is context-free? |
|formal-languages|context-free|finite-automata|closure-properties|pushdown-automata| |
I'm am stuck solving the next exercise:
Argue that if $L$ is context-free and $R$ is regular, then $L / R = \{ w | \exists x \in R \;\text{s.t}\; wx \in L\} $ (i.e. the [right quotient](https://en.wikipedia.org/wiki/Right_quotient)) is context-free.
I know that there should exist a PDA that accepts $L$ and a DFA ... |
If $L$ is context-free and $R$ is regular, then $L / R$ is context-free? |
Well, clearly the answer is no; if there were, then we'd know that P != NP. However, according to [Wikipedia][1]:
> NP is the set of all decision problems for which the instances where the answer is "yes" have [.. proofs that are] verifiable in polynomial time by a deterministic Turing machine.
>
> [...]
>
> A ... |
Are there undecidable problems in NP? |
|undecidability|decision-problem| |
I think you misunderstood what it means to solve a diophantine equation, and [Matiyasevich's indecidability theorem](http://en.wikipedia.org/wiki/Matiyasevich%27s_theorem#Matiyasevich.27s_theorem).
Matiyasevich proved that for every RE set $S$ there is a diophentine equation $f(n;x_1,...,x_k)$ such that $n \in S$ on... |
I think you misunderstood what it means to solve a diophantine equation, and [Matiyasevich's indecidability theorem](http://en.wikipedia.org/wiki/Matiyasevich%27s_theorem#Matiyasevich.27s_theorem).
Matiyasevich proved that for every RE set $S$ there is a diophentine equation $f(n;x_1,...,x_k)$ such that $n \in S$ on... |
Another perspective on problem-hardness comes from the game and puzzle community, where the rule of thumb is that 'problems are as hard as they possibly can be' (and the exceptions come from hidden structures in the problem - Massimo's example of the determinant in comments is a good instance of this); the trick then c... |
null |
You should have scrolled down to the [formal definition](http://en.wikipedia.org/wiki/NP_%28complexity%29#Formal_definition):
> A language $L$ is in NP if and only if there exist polynomials $p$ and $q$, and a deterministic Turing machine $M$, such that
> * For all $x$ and y, the machine $M$ runs in time $p(|x|)$... |
Clearly there aren't any undecidable problems in NP *(if there were, we'd know, for example, that P != NP)*. However, according to [Wikipedia][1]:
> NP is the set of all decision problems for which the instances where the answer is "yes" have [.. proofs that are] verifiable in polynomial time by a deterministic Tur... |
Why isn't this undecidable problem in NP? |
I'm am stuck solving the next exercise:
Argue that if $L$ is context-free and $R$ is regular, then $L / R = \{ w | \exists x \in R \;\text{s.t}\; wx \in L\} $ (i.e. the [right quotient](https://en.wikipedia.org/wiki/Right_quotient)) is context-free.
I know that there should exist a PDA that accepts $L$ and a DFA ... |
I'm am stuck solving the next exercise:
Argue that if $L$ is context-free and $R$ is regular, then $L / R = \{ w \mid \exists x \in R \;\text{s.t}\; wx \in L\} $ (i.e. the [right quotient](https://en.wikipedia.org/wiki/Right_quotient)) is context-free.
I know that there should exist a PDA that accepts $L$ and a D... |
Here is a hint.
You need your machine to initially accept part of a word from $L$, consuming the tape as it goes. Then, without consuming anything, you need to find some word from $R$ that will push the machine into a final state. The chosen word from $R$ plays the role of the input word for the second half of the c... |
I am not sure what you are getting at with the cartesian product; this simulates both automata in parallel, which will give you the intersection. But you want it to identify all words in $L$ that have a suffix from $R$! On an intuitive level, that is.
Assume our input is $w \in \Sigma^*$. Obviously, we can not check... |
I'm am stuck solving the next exercise:
Argue that if $L$ is context-free and $R$ is regular, then $L / R = \{ w \mid \exists x \in R \;\text{s.t}\; wx \in L\} $ (i.e. the [right quotient](https://en.wikipedia.org/wiki/Right_quotient)) is context-free.
I know that there should exist a PDA that accepts $L$ and a D... |
Questions that ask for help building intuition for formal or complex concepts. |
Questions that address the challenges of storing data in digital form such that they remain accessible in the future. |
Questions about algorithms that deterministically generate sequences of numbers that have stochastic properties of random sequences. |
|complexity-theory|computability|undecidability|decision-problem| |
I recommend to use Raphael's way, which is much easier to understand, but here is an alternative one, using only closure properties:
>! Let $L \subseteq A^{\ast}$ be a language. We want to read a word $w$, but ask $L$ whether $w x$ is in the language. So we want to "erase" $x$. We can do it using a homomorphism, bu... |
I recommend to use Raphael's answer, which is much easier to understand, but here is an alternative one, using closure properties instead of automata:
>! Let $L \subseteq A^{\ast}$ be a language. We want to read a word $w$, but ask $L$ whether $w x$ is in the language. So we want to create a new language from $L$ wh... |
I recommend to use Raphael's answer, which is much easier to understand, but here is an alternative one, using closure properties instead of automata:
>! Let $L \subseteq A^{\ast}$ be a language. We want to read a word $w$, but ask $L$ whether $w x$ is in the language. So we want to create a new language from $L$ wh... |
The way people analyze algorithms in the real world is vastly different from academia. While in academia the goal is to find a provably-correct upper bound on the running time, in real life the goal is to understand how the algorithm works, and what tweaks can improve the running time. There are two main methods that a... |
First of all, note that by definition
* $\delta(q,a) = \sigma_P(P_{0,q}\cdot a) =: s_1$ and
* $\delta(\pi_P(q),a) = \sigma_P(P_{0,\pi_P(q)}\cdot a) =: s_2$.
Let us investigate $s_1$ and $s_2$ in a sketch:
![sketch][1]
<sup>[[source](http://verrech.net/sefiles/cs_1669.tikz)]</sup>
Now assume $s_2 > s_1... |
Let $A_P = (Q,\Sigma,\delta,0,\{m\})$ the *string matching automaton* for pattern $P \in \Sigma^m$, that is
* $Q = \{0,1,\dots,m\}$
* $\delta(q,a) = \sigma_P(P_{0,q}\cdot a)$ for all $q\in Q$ and $a\in \Sigma$
with $\sigma_P(w)$ the length of the longest prefix of $P$ that is a Suffix of $w$, that is
$\qqu... |
null |
The identities used in multiplication algorithms by
* [Karatsuba][1] (integers)
* [Gauss][2] (complex numbers)
* [Strassen][3] (matrices)
seem very closely related. Is there a common abstract framework/generalization?
[1]: http://en.wikipedia.org/wiki/Karatsuba_algorithm#The_basic_step
[2]: http:/... |
Common idea in Karatsuba, Gauss and Strassen multiplication |
|algorithms| |
An equivalent definition of NP is that it consists of all problems that are *decidable* (not just verifiable) in polynomial time by a non-deterministic Turing machine. NTMs are known to be no more powerful than TMs in the sense the set of problems decidable by NTMs is identical to the set of problems decidable by TMs, ... |
Is there any way to estimate how much data is added to the Internet each second? Are there any studies about this? |
What is the growth rate of the Internet? |
|computer-networks| |
I am learning A* algorithm on 8-puzzle problem.
I don't have questions about A*, but have some for the heuristic score - Nilsson's sequence score.
[Justin Heyes-Jones web pages - A* Algorithm][1] explains A* very clearly. It has a picture for Nilsson's sequence scores.
![Nilsson's sequence scores][2]
It ex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.