id int64 1 141k | title stringlengths 15 150 | body stringlengths 45 28.5k | tags stringlengths 1 102 | label int64 1 1 | text stringlengths 128 28.6k | source stringclasses 1
value |
|---|---|---|---|---|---|---|
18,209 | Can Euclidean TSP be exactly solved in time better than (sym)metric TSP? | <p>Symmetric/Metric TSP can be solved via the Held-Karp algorithm in $\mathcal O(n^2 2^n)$.</p>

<p>See <a href="http://epubs.siam.org/doi/abs/10.1137/0110015">A dynamic programming approach to sequencing problems</a> by Michael Held and Richard M. Karp, 1962.</p>

<p>In <a href="http://faculty.cs.tamu.... | graphs reference request time complexity np hard traveling salesman | 1 | Can Euclidean TSP be exactly solved in time better than (sym)metric TSP? -- (graphs reference request time complexity np hard traveling salesman)
<p>Symmetric/Metric TSP can be solved via the Held-Karp algorithm in $\mathcal O(n^2 2^n)$.</p>

<p>See <a href="http://epubs.siam.org/doi/abs/10.1137/0110015">A dyna... | habedi/stack-exchange-dataset |
18,211 | Maxima of diagonals in a column wise and row wise sorted matrix | <p>Let $\{a_i\}$ and $\{b_i\}$ be non-decreasing sequences of non-negative integers.</p>

<p>How fast can one find 
$$c_j=\max_{0 \leq i< j}\{a_i+b_{j-i-1}\}$$
for all $0\leq j\leq n-1$?</p>

<p>Naively, it takes $O(n^2)$ time, but I'm hoping monotonicity can help here.</p>

<p>It's e... | algorithms | 1 | Maxima of diagonals in a column wise and row wise sorted matrix -- (algorithms)
<p>Let $\{a_i\}$ and $\{b_i\}$ be non-decreasing sequences of non-negative integers.</p>

<p>How fast can one find 
$$c_j=\max_{0 \leq i< j}\{a_i+b_{j-i-1}\}$$
for all $0\leq j\leq n-1$?</p>

<p>Naively, it takes ... | habedi/stack-exchange-dataset |
18,224 | How do you obtain transition relation of a PDA? | <p>I know how to figure out the start state, accepting state, input alphabet, and all that stuff. But how do you develop the transition relation of a PDA? For an FSM, (q0,a),q1) means if you start at q0 and get an a, you transition to q1. But what does (S,a,e),(S,a) mean? (S is start state and e is epsilon)</p>
&#x... | pushdown automata | 1 | How do you obtain transition relation of a PDA? -- (pushdown automata)
<p>I know how to figure out the start state, accepting state, input alphabet, and all that stuff. But how do you develop the transition relation of a PDA? For an FSM, (q0,a),q1) means if you start at q0 and get an a, you transition to q1. But what d... | habedi/stack-exchange-dataset |
18,229 | What is "memory coalescing"? | <p>I came to know that the graphic processing unit have something called memory coalescing. On reading on it I was not clear on the topic. Is this any way related to Memory Level Parallelism.</p>

<p>I have searched in Google but was not able to obtain a satisfactory answer. </p>

<p>It would be helpful... | terminology reference request computer architecture memory management | 1 | What is "memory coalescing"? -- (terminology reference request computer architecture memory management)
<p>I came to know that the graphic processing unit have something called memory coalescing. On reading on it I was not clear on the topic. Is this any way related to Memory Level Parallelism.</p>

<p>I have s... | habedi/stack-exchange-dataset |
18,232 | What is the lower bound of the following computation | <p>I came across this question was I was browsing online</p>

<p>An operation OP has the following characteristics</p>

<pre><code> OP Latency = 7 clocks
 OP cycles/issue =2
</code></pre>

<p>Derive the minimum number of cycles required for the following computation:</p>

<... | computer architecture | 1 | What is the lower bound of the following computation -- (computer architecture)
<p>I came across this question was I was browsing online</p>

<p>An operation OP has the following characteristics</p>

<pre><code> OP Latency = 7 clocks
 OP cycles/issue =2
</code></pre>

<p>Derive the... | habedi/stack-exchange-dataset |
18,250 | Are there pseudorandom number generators (PRNG) with no finite period? | <blockquote>
 <p>The typical and widely used <a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator" rel="nofollow">PRNG</a>, the <a href="http://en.wikipedia.org/wiki/Linear_congruential_generator" rel="nofollow">linear congruential generator</a> always has a finite (though possibly "long") period. A... | reference request number theory pseudo random generators | 1 | Are there pseudorandom number generators (PRNG) with no finite period? -- (reference request number theory pseudo random generators)
<blockquote>
 <p>The typical and widely used <a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator" rel="nofollow">PRNG</a>, the <a href="http://en.wikipedia.org/wiki/L... | habedi/stack-exchange-dataset |
18,257 | LZW decoding process | <p>I'm trying to understand how <a href="http://en.wikipedia.org/wiki/Lempel-Ziv-Welch" rel="nofollow noreferrer">LZW</a> decodes a string.</p>
<p>For example suppose that we have a dictionary where:</p>
<ul>
<li>a=0</li>
<li>b=1</li>
</ul>
<p>and we have to encode the string "<strong>aabba... | information theory lempel ziv | 1 | LZW decoding process -- (information theory lempel ziv)
<p>I'm trying to understand how <a href="http://en.wikipedia.org/wiki/Lempel-Ziv-Welch" rel="nofollow noreferrer">LZW</a> decodes a string.</p>
<p>For example suppose that we have a dictionary where:</p>
<ul>
<li>a=0</li>
<li>b=1</li>
</ul>
... | habedi/stack-exchange-dataset |
18,262 | What classes of data structures can be made persistent? | <p><b><a href="http://en.wikipedia.org/wiki/Persistent_data_structure" rel="noreferrer">Persistent data structures</a></b> are immutable data structures. Operations on them return a new "copy" of the data structure, but altered by the operation; the old data structure remains unchanged though. Efficiency is g... | reference request data structures functional programming persistent data structure | 1 | What classes of data structures can be made persistent? -- (reference request data structures functional programming persistent data structure)
<p><b><a href="http://en.wikipedia.org/wiki/Persistent_data_structure" rel="noreferrer">Persistent data structures</a></b> are immutable data structures. Operations on them ret... | habedi/stack-exchange-dataset |
18,274 | Algorithm for wait-for graph | <p>During the process of deadlock detection, the wait-for graph can be obtained from the resource-allocation graph. To detect whether there is a deadlock using the wait-for graph, can topological sort be used? </p>

<p>By making a slight modification, i.e., instead of removing the source as done in usual topolo... | algorithms operating systems | 1 | Algorithm for wait-for graph -- (algorithms operating systems)
<p>During the process of deadlock detection, the wait-for graph can be obtained from the resource-allocation graph. To detect whether there is a deadlock using the wait-for graph, can topological sort be used? </p>

<p>By making a slight modificatio... | habedi/stack-exchange-dataset |
18,276 | How to determine the size of training data using VC dimension? | <p>I want to determine the size of training data ($m$) when I know the parameters $VC(H)$, $δ$ and $e$. As I know the $VC$ bound satisfy this equation:</p>

<p>$$ \mathrm{error}_{\mathrm{true}}(h) \le \mathrm{error}_{\mathrm{train}}(h) + \sqrt\frac{VC(H) \times \ln\left(\frac{2m}{VC(H)} + 1\right) + \ln(4δ)}m&#... | machine learning learning theory vc dimension | 1 | How to determine the size of training data using VC dimension? -- (machine learning learning theory vc dimension)
<p>I want to determine the size of training data ($m$) when I know the parameters $VC(H)$, $δ$ and $e$. As I know the $VC$ bound satisfy this equation:</p>

<p>$$ \mathrm{error}_{\mathrm{true}}(h) \... | habedi/stack-exchange-dataset |
18,278 | Maximum number of states in minimized DFA from NFA with $n$ states | <p>If an NFA with $n$ states is converted to an equivalent minimized DFA then what will be the maximum number of states in the DFA? Will it be $2^n$ or $2n$?</p>
 | automata finite automata nondeterminism | 1 | Maximum number of states in minimized DFA from NFA with $n$ states -- (automata finite automata nondeterminism)
<p>If an NFA with $n$ states is converted to an equivalent minimized DFA then what will be the maximum number of states in the DFA? Will it be $2^n$ or $2n$?</p>
 | habedi/stack-exchange-dataset |
18,283 | Finding growth of "inter-recursive" functions | <p>consider following code</p>
<pre><code>int f(int x)
{
 if(x<1) return 1;
 else return f(x-1)+g(x);
}
int g(int x)
{
 if(x<2) return 1;
 else return f(x-1)+g(x/2);
}
</code></pre>
<p><b>Questions:</b></p>
<blockquote>
<p>How do I find the growth of <co... | algorithm analysis recurrence relation recursion | 1 | Finding growth of "inter-recursive" functions -- (algorithm analysis recurrence relation recursion)
<p>consider following code</p>
<pre><code>int f(int x)
{
 if(x<1) return 1;
 else return f(x-1)+g(x);
}
int g(int x)
{
 if(x<2) return 1;
 else return f(x-1)+g(x/2);
}&#x... | habedi/stack-exchange-dataset |
18,284 | Do Kernel-Mode Windows Services Considered Part of Kernel? | <p>I learned that there are <a href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff554836%28v=vs.85%29.aspx" rel="nofollow">two</a> types of services in <a href="http://en.wikipedia.org/wiki/Architecture_of_Windows_NT" rel="nofollow">Windows</a> , one called -service- which is in <a href="http://en.wikiped... | operating systems | 1 | Do Kernel-Mode Windows Services Considered Part of Kernel? -- (operating systems)
<p>I learned that there are <a href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff554836%28v=vs.85%29.aspx" rel="nofollow">two</a> types of services in <a href="http://en.wikipedia.org/wiki/Architecture_of_Windows_NT" rel="n... | habedi/stack-exchange-dataset |
18,290 | Are all the NP-complete problems have strong reductions? | <p>Are all the <a href="http://en.wikipedia.org/wiki/NP-complete" rel="nofollow noreferrer">NP-complete</a> problems have strong reductions? If I find a polynomial solution to one <strong>NP-complete</strong> problem, can I state that <code>P = NP</code>?</p>
 | p vs np | 1 | Are all the NP-complete problems have strong reductions? -- (p vs np)
<p>Are all the <a href="http://en.wikipedia.org/wiki/NP-complete" rel="nofollow noreferrer">NP-complete</a> problems have strong reductions? If I find a polynomial solution to one <strong>NP-complete</strong> problem, can I state that <code>P = NP</c... | habedi/stack-exchange-dataset |
18,293 | Valid-invalid bit in a process page table | <p><strong>Valid-invalid</strong> bit is used to indicate whether a page in a process’s page table is valid or not. Why is it needed?</p>

<p>Does that mean that each page table has a certain minimum size, i.e. it can accommodate minimum of n references to pages and if the number of pages being referenced by th... | operating systems memory access | 1 | Valid-invalid bit in a process page table -- (operating systems memory access)
<p><strong>Valid-invalid</strong> bit is used to indicate whether a page in a process’s page table is valid or not. Why is it needed?</p>

<p>Does that mean that each page table has a certain minimum size, i.e. it can accommodate min... | habedi/stack-exchange-dataset |
18,312 | Algorithm for sorting with constraints | <p>I've got 30 elements which has to be grouped/sorted into 10 ordered 3-tuple. 
There are several rules and constraints about grouping/sorting.
For example: Element $A$ must not be in the same tuple same unit $B$. 
Element $C$ must not be right in front of element $A$, etc.</p>

<p>I am searching ... | algorithms sorting randomized algorithms greedy algorithms | 1 | Algorithm for sorting with constraints -- (algorithms sorting randomized algorithms greedy algorithms)
<p>I've got 30 elements which has to be grouped/sorted into 10 ordered 3-tuple. 
There are several rules and constraints about grouping/sorting.
For example: Element $A$ must not be in the same tuple same uni... | habedi/stack-exchange-dataset |
18,313 | How does a TLB and data cache work? | <p>I'm trying to study for an exam and I realized I'm confused about how the TLB and data cache work.</p>

<p>I understand that the TLB is essentially a cache of most recently used physical addresses. However, I was looking at a diagram in my textbook (shown below), and I don't understand what's going on in it.... | computer architecture cpu cache virtual memory | 1 | How does a TLB and data cache work? -- (computer architecture cpu cache virtual memory)
<p>I'm trying to study for an exam and I realized I'm confused about how the TLB and data cache work.</p>

<p>I understand that the TLB is essentially a cache of most recently used physical addresses. However, I was looking ... | habedi/stack-exchange-dataset |
18,321 | Chernoff bounds and Monte Carlo algorithms | <p>One of Wikipedia examples of use of Chernoff bounds is the one where an algorithm $A$ computes the correct value of function $f$ with probability $p > 1/2$. Basically, Chernoff bounds are used to bound the error probability of $A$ using repeated calls to $A$ and majority agreement.</p>

<p>I don't underst... | randomized algorithms randomness chernoff bounds | 1 | Chernoff bounds and Monte Carlo algorithms -- (randomized algorithms randomness chernoff bounds)
<p>One of Wikipedia examples of use of Chernoff bounds is the one where an algorithm $A$ computes the correct value of function $f$ with probability $p > 1/2$. Basically, Chernoff bounds are used to bound the error proba... | habedi/stack-exchange-dataset |
18,323 | Is it possible to mapping reduce either of these languages to the other? | <p>I have the following two languages, which are languages of TM descriptions:</p>

<p>$$INFINITE = \{ \langle M \rangle | \mbox{M is a TM and L(M) is infinite} \}$$</p>

<p>$$A_{ALL} = \{ \langle M \rangle | \mbox{M is a TM and } L(M) = \Sigma^* \}$$</p>

<p>Neither of these languages are decid... | computability reductions | 1 | Is it possible to mapping reduce either of these languages to the other? -- (computability reductions)
<p>I have the following two languages, which are languages of TM descriptions:</p>

<p>$$INFINITE = \{ \langle M \rangle | \mbox{M is a TM and L(M) is infinite} \}$$</p>

<p>$$A_{ALL} = \{ \langle M \r... | habedi/stack-exchange-dataset |
18,330 | $O(n^{k-1}$) algorithm for K-clique problem | <p>Clique problem is a well known $NP$-complete problem where the size of the required clique is part of the input. However, k-clique problem has a trivial polynomial time algorithm ($O(n^k)$ when $k$ is constant). I'm interested in the best known upper bounds when k is constant. </p>

<blockquote>
 <p>Is ... | complexity theory graphs | 1 | $O(n^{k-1}$) algorithm for K-clique problem -- (complexity theory graphs)
<p>Clique problem is a well known $NP$-complete problem where the size of the required clique is part of the input. However, k-clique problem has a trivial polynomial time algorithm ($O(n^k)$ when $k$ is constant). I'm interested in the best know... | habedi/stack-exchange-dataset |
18,335 | Proof that the existence of a Hamilton Path in a bipartite graph is NP-complete | <p>I tried to solve the above NP-completeness exercise by making a bipartite graph from a general one (undirected) by inserting a vertice in the middle of every edge of the first (general) graph. This generates problems as suggested here: <a href="https://cs.stackexchange.com/questions/1527/finding-the-flaw-in-a-reduct... | graphs np complete | 1 | Proof that the existence of a Hamilton Path in a bipartite graph is NP-complete -- (graphs np complete)
<p>I tried to solve the above NP-completeness exercise by making a bipartite graph from a general one (undirected) by inserting a vertice in the middle of every edge of the first (general) graph. This generates probl... | habedi/stack-exchange-dataset |
18,337 | Context free language and the complement of it | <p>Given the language $L_1 = \{a^i b^j c^k \mid i \neq j \vee i \neq k\}$, I need to determine whether it is context-free by using the pumping lemma. I must do the same for the complement of this language.</p>

<p>I started off by breaking $L_1$ into two parts, $L_1 = L_2 \cup L_3$, where $L_2 = \{a^i b^j c^k \... | formal languages context free pumping lemma | 1 | Context free language and the complement of it -- (formal languages context free pumping lemma)
<p>Given the language $L_1 = \{a^i b^j c^k \mid i \neq j \vee i \neq k\}$, I need to determine whether it is context-free by using the pumping lemma. I must do the same for the complement of this language.</p>

<p>I ... | habedi/stack-exchange-dataset |
18,339 | Finding a function which is a mapping reduction of A to B | <p>How do I precisely define the function which is a mapping reduction of A to B for the following examples?</p>

<p>What is the process of figuring this out?</p>

<p>Given: A and B are languages over the alphabet {0,1}.</p>

<p>Examples:</p>

<ul>
<li>A is the language described by ... | computability turing machines reductions | 1 | Finding a function which is a mapping reduction of A to B -- (computability turing machines reductions)
<p>How do I precisely define the function which is a mapping reduction of A to B for the following examples?</p>

<p>What is the process of figuring this out?</p>

<p>Given: A and B are languages over... | habedi/stack-exchange-dataset |
18,346 | More efficient algorithm for determining if one list is a sublist of another list | <p>I'm trying to build an algorithm which takes two lists of natural numbers and finds if every element of the first list is displayed at least once in the second list.</p>

<p>What if the list is sorted? </p>

<p>An algorithm that can do this is by comparing every element of the first list with every e... | algorithms data structures sorting lists comparison | 1 | More efficient algorithm for determining if one list is a sublist of another list -- (algorithms data structures sorting lists comparison)
<p>I'm trying to build an algorithm which takes two lists of natural numbers and finds if every element of the first list is displayed at least once in the second list.</p>

... | habedi/stack-exchange-dataset |
18,355 | Design a DFA which accepts words with sorted letters | <p>I have just started learning Theory of Computation and have come across a question which I am not able to solve.</p>

<p>The question is as follows:</p>

<pre><code>Design a DFA that reads a word (character strings) and decides whether the letters
of the word are in sorted order.
For example:... | automata finite automata | 1 | Design a DFA which accepts words with sorted letters -- (automata finite automata)
<p>I have just started learning Theory of Computation and have come across a question which I am not able to solve.</p>

<p>The question is as follows:</p>

<pre><code>Design a DFA that reads a word (character strings) an... | habedi/stack-exchange-dataset |
18,358 | For how large graphs can we still check for isomorphism? | <p>Let $G_1,$ $G_2$ be two arbitrary graphs with $n$ vertices and we want to check if they are isomorphic.</p>

<p><strong>Question 1.</strong> For what maximal value of $n$ we can actually perform such verification? </p>

<p><strong>Question 2.</strong>
Is there any result like as a list of al... | algorithms graph algorithms | 1 | For how large graphs can we still check for isomorphism? -- (algorithms graph algorithms)
<p>Let $G_1,$ $G_2$ be two arbitrary graphs with $n$ vertices and we want to check if they are isomorphic.</p>

<p><strong>Question 1.</strong> For what maximal value of $n$ we can actually perform such verification? <... | habedi/stack-exchange-dataset |
18,365 | Implement Mathematica's capability of rationalizing machine reals | <p>If I have a variable <code>x</code> bound to a machine precision real in <em>Mathematica</em>, I can use</p>

<pre><code> y = FromDigits[RealDigits[x]]
</code></pre>

<p>then y is bound to a <em>completely equivalent</em> rational number which has <em>infinite precision</em>.</p>

<p>What... | number theory arithmetic real numbers | 1 | Implement Mathematica's capability of rationalizing machine reals -- (number theory arithmetic real numbers)
<p>If I have a variable <code>x</code> bound to a machine precision real in <em>Mathematica</em>, I can use</p>

<pre><code> y = FromDigits[RealDigits[x]]
</code></pre>

<p>then y is bound to... | habedi/stack-exchange-dataset |
18,384 | What is the difference between storage media and storage devices | <p>I am having a rather distressing confusion about whether <code>storage media</code> and <code>storage devices</code> are the same terms. I found on <a href="http://answers.yahoo.com/question/index?qid=20120206233945AA4EgT2" rel="nofollow noreferrer">this yahoo answers</a> page that there is a subtle difference but v... | storage | 1 | What is the difference between storage media and storage devices -- (storage)
<p>I am having a rather distressing confusion about whether <code>storage media</code> and <code>storage devices</code> are the same terms. I found on <a href="http://answers.yahoo.com/question/index?qid=20120206233945AA4EgT2" rel="nofollow n... | habedi/stack-exchange-dataset |
18,389 | Can Floyd-Warshall be used to solve an APSP problem without copying the matrix? | <p>According to CLRS, each iteration of the outermost loop (on $k$) makes a new copy of the adjacency matrix. Is it safe not to copy the matrix on every iteration?</p>

<p>What I mean is, according to CLRS:</p>

<p>$d_{ij}^K = \min(d_{ij}^{K-1}, d_{ik}^{K-1} + d_{kj}^{K-1})$</p>

<p>Is the follo... | algorithms graphs shortest path | 1 | Can Floyd-Warshall be used to solve an APSP problem without copying the matrix? -- (algorithms graphs shortest path)
<p>According to CLRS, each iteration of the outermost loop (on $k$) makes a new copy of the adjacency matrix. Is it safe not to copy the matrix on every iteration?</p>

<p>What I mean is, accordi... | habedi/stack-exchange-dataset |
18,399 | Having trouble proving a language is NP-complete | <p>I'm asked to prove that, if P=NP, that 0*1* is NP-complete, but I'm having trouble going about doing it. I know it's fairly easy to prove it's NP by creating a TM to verify an input (which can be done in O(n) time, and that's polynomial). </p>

<p>But then I now have to reduce an NP-complete problem to 0*1* ... | complexity theory np complete np hard np | 1 | Having trouble proving a language is NP-complete -- (complexity theory np complete np hard np)
<p>I'm asked to prove that, if P=NP, that 0*1* is NP-complete, but I'm having trouble going about doing it. I know it's fairly easy to prove it's NP by creating a TM to verify an input (which can be done in O(n) time, and tha... | habedi/stack-exchange-dataset |
18,402 | Proving $ \{ \langle D_1, ... ,D_K \rangle : \text{ where } D_i \text{ are DFAs and } {\bigcap}_{i=1}^k L(D_i) = \emptyset \} $ is NP-Hard | <p>The question (Prove L is NP-hard) was about proving that the following language is NP-hard:
$$ L = \{ \langle D_1, D_2, ... ,D_K \rangle : k \in {N}\text{, the } D_i \text{ are DFAs and } {\bigcap}_{i=1}^k L(D_i) = \emptyset \} $$</p>

<p>That got me thinking about the related problem:</p>

<p>$$... | complexity theory np hard | 1 | Proving $ \{ \langle D_1, ... ,D_K \rangle : \text{ where } D_i \text{ are DFAs and } {\bigcap}_{i=1}^k L(D_i) = \emptyset \} $ is NP-Hard -- (complexity theory np hard)
<p>The question (Prove L is NP-hard) was about proving that the following language is NP-hard:
$$ L = \{ \langle D_1, D_2, ... ,D_K \rangle : k \i... | habedi/stack-exchange-dataset |
18,409 | Formulas for which any equivalent CNF formula has exponential length | <p>I read a claim that</p>

<blockquote>
 <p>there are formulas for which any equivalent CNF has exponential length.</p>
</blockquote>

<p>Can you show me an example for such a boolean formula? I have been trying to build it myself and failed.</p>
 | satisfiability | 1 | Formulas for which any equivalent CNF formula has exponential length -- (satisfiability)
<p>I read a claim that</p>

<blockquote>
 <p>there are formulas for which any equivalent CNF has exponential length.</p>
</blockquote>

<p>Can you show me an example for such a boolean formula? I have been ... | habedi/stack-exchange-dataset |
18,415 | NFA to DFA convertion explanation | <p>I've converted this NFA to a DFA and I get a similar soultion automata but I'm not sure if I really understand everything. </p>

<p>Please correct me if I'm explaining it wrong, I would love some feedback.</p>

<p>From the state 0 we only have the set {0} since there doesn't exist any ε-transition.&#... | automata finite automata nondeterminism | 1 | NFA to DFA convertion explanation -- (automata finite automata nondeterminism)
<p>I've converted this NFA to a DFA and I get a similar soultion automata but I'm not sure if I really understand everything. </p>

<p>Please correct me if I'm explaining it wrong, I would love some feedback.</p>

<p>From the... | habedi/stack-exchange-dataset |
18,424 | Is there a TM that halts on all inputs but that property is not provable? | <blockquote>
 <p>Does there exist a Turing machine that halts on all inputs but that property is not provable for some reason?</p>
</blockquote>

<p>I am wondering if this question has been studied. Note, "unprovable" could mean a "limited" proof system (which in the weak sense think the answer must be... | computability reference request turing machines halting problem | 1 | Is there a TM that halts on all inputs but that property is not provable? -- (computability reference request turing machines halting problem)
<blockquote>
 <p>Does there exist a Turing machine that halts on all inputs but that property is not provable for some reason?</p>
</blockquote>

<p>I am wonder... | habedi/stack-exchange-dataset |
18,426 | Prove that $TQBF \notin SPACE(n^{\frac{1}{3}})$ | <p>I would like some hints on how to approach this problem, I know for instance that $TQBF$ is $PSPACE$-$Complete$, so it can solved in poly space and any other $PSPACE$-$Complete$ problems can be log spaced reduced to $TQBF$. I believe that I need to employ the space hierarchy theorem in some way but I am not sure how... | complexity theory space complexity | 1 | Prove that $TQBF \notin SPACE(n^{\frac{1}{3}})$ -- (complexity theory space complexity)
<p>I would like some hints on how to approach this problem, I know for instance that $TQBF$ is $PSPACE$-$Complete$, so it can solved in poly space and any other $PSPACE$-$Complete$ problems can be log spaced reduced to $TQBF$. I bel... | habedi/stack-exchange-dataset |
18,431 | Range of CRC-32 | <p>What is the range of “the” CRC-32, the one used by <a href="http://pubs.opengroup.org/onlinepubs/009695299/utilities/cksum.html" rel="nofollow">Unix</a>, Ethernet, zip, and many other industrial standards?</p>

<p>Mathematically, a <a href="http://en.wikipedia.org/wiki/CRC" rel="nofollow">CRC</a> is defined ... | arithmetic error correcting codes crc | 1 | Range of CRC-32 -- (arithmetic error correcting codes crc)
<p>What is the range of “the” CRC-32, the one used by <a href="http://pubs.opengroup.org/onlinepubs/009695299/utilities/cksum.html" rel="nofollow">Unix</a>, Ethernet, zip, and many other industrial standards?</p>

<p>Mathematically, a <a href="http://en... | habedi/stack-exchange-dataset |
18,446 | Is it possible to support .(any symbol) or \d, \w, \W in DFA | <p>Is it possible to build DFA that support \d, \w, .(any symbol)? 
I understand that we can add each symbol from [0-9] as a separate edge for some of the symbols, but what about the others? for example .(any symbol)? or \S (not white space)?</p>

<p>In other words, can we build equivalent DFA for this NFA<... | automata finite automata | 1 | Is it possible to support .(any symbol) or \d, \w, \W in DFA -- (automata finite automata)
<p>Is it possible to build DFA that support \d, \w, .(any symbol)? 
I understand that we can add each symbol from [0-9] as a separate edge for some of the symbols, but what about the others? for example .(any symbol)? or \S (... | habedi/stack-exchange-dataset |
18,452 | Turing machine with possible transitions to the final state | <p><img src="https://i.stack.imgur.com/aRAVI.png" alt="enter image description here"></p>

<p>Let's say we want to draw the transition graph of a Turing Machine that accepts that language L and then write the sequence of moves done by the TM when the input sequence is $w = abbcbba$ so I had some thoughts on how... | formal languages turing machines automata | 1 | Turing machine with possible transitions to the final state -- (formal languages turing machines automata)
<p><img src="https://i.stack.imgur.com/aRAVI.png" alt="enter image description here"></p>

<p>Let's say we want to draw the transition graph of a Turing Machine that accepts that language L and then write ... | habedi/stack-exchange-dataset |
18,455 | Bounded occurrence 3D matching problem | <p>It is NP-hard to approximate <a href="http://link.springer.com/chapter/10.1007/3-540-44849-7_21" rel="nofollow">maximum 3D matching problem</a> even if each element occurs exactly in two triples. I'm interested in the following decision version of 3D matching. </p>

<p>Informally, Given a set of triples $F$ ... | algorithms complexity theory | 1 | Bounded occurrence 3D matching problem -- (algorithms complexity theory)
<p>It is NP-hard to approximate <a href="http://link.springer.com/chapter/10.1007/3-540-44849-7_21" rel="nofollow">maximum 3D matching problem</a> even if each element occurs exactly in two triples. I'm interested in the following decision version... | habedi/stack-exchange-dataset |
18,464 | help with the probability of acceptance of a Nondeterministic Pushdown automata | <p>I have this nondeterministic pda:
$$\Sigma= \{a,b,c\}$$</p>

<p>and </p>

<p>$$
L=\{\omega\ \epsilon\ \Sigma^*\ |\ \omega\ = \alpha\beta\beta^R\gamma\ and\ \alpha,\beta,\gamma\ \epsilon\ \Sigma^*\ and\ |\beta|\ >3 \}
$$</p>

<p>So once i have create the NPDA, i have to calcul... | context free probability theory pushdown automata nondeterminism | 1 | help with the probability of acceptance of a Nondeterministic Pushdown automata -- (context free probability theory pushdown automata nondeterminism)
<p>I have this nondeterministic pda:
$$\Sigma= \{a,b,c\}$$</p>

<p>and </p>

<p>$$
L=\{\omega\ \epsilon\ \Sigma^*\ |\ \omega\ = \alpha\beta\beta... | habedi/stack-exchange-dataset |
18,467 | Non-uniform random distribution: How do I get a random between 100 and 180 that is on average close to 120? (like in a Gaussian distribution) | <p>Presume I have the following case:</p>

<ul>
<li>int value <code>a</code></li>
<li>int value <code>b</code>, for which <code>a < b</code></li>
<li>int value i, for which <code>a <= i < b</code></li>
<li>I need an int value <code>x</code>, for which <code>a <= x < b</code>, rand... | randomness | 1 | Non-uniform random distribution: How do I get a random between 100 and 180 that is on average close to 120? (like in a Gaussian distribution) -- (randomness)
<p>Presume I have the following case:</p>

<ul>
<li>int value <code>a</code></li>
<li>int value <code>b</code>, for which <code>a < b</code></l... | habedi/stack-exchange-dataset |
18,492 | Variant of the knapsack problem | <p>How would you approach the knapsack problem in a dynamic programming situation if you now have to limit the number of item in the knapsack by a constant $p$ ? This is the same problem (max weight of $W$, every item have a value $v$ and weight $w$) but you can only add $p$ item(s) to the knapsack and obviously need t... | algorithms optimization dynamic programming knapsack problems | 1 | Variant of the knapsack problem -- (algorithms optimization dynamic programming knapsack problems)
<p>How would you approach the knapsack problem in a dynamic programming situation if you now have to limit the number of item in the knapsack by a constant $p$ ? This is the same problem (max weight of $W$, every item hav... | habedi/stack-exchange-dataset |
18,493 | Peer grading design - choosing a graph, to get accurate rankings/ratings | <p><strong>Background.</strong> I am writing some code for semi-automated grading, using peer grading as part of the grading process. Students are given pairs of essays at a time, and the students have a slider to choose which is better and how much better it is. e.g., the slider might look something like this:</p>&#x... | algorithms graphs modelling | 1 | Peer grading design - choosing a graph, to get accurate rankings/ratings -- (algorithms graphs modelling)
<p><strong>Background.</strong> I am writing some code for semi-automated grading, using peer grading as part of the grading process. Students are given pairs of essays at a time, and the students have a slider to ... | habedi/stack-exchange-dataset |
18,496 | What happens when time slices are too short or too long? | <p>What bad things can occur when the lengths of the time slices in a multitasking system are too small? What can happen when they are too big? How should the length of the time slice be chosen?</p>
 | operating systems process scheduling | 1 | What happens when time slices are too short or too long? -- (operating systems process scheduling)
<p>What bad things can occur when the lengths of the time slices in a multitasking system are too small? What can happen when they are too big? How should the length of the time slice be chosen?</p>
 | habedi/stack-exchange-dataset |
18,503 | Regular Grammar and Regular Language | <p>My doubt is based on the relation between regular grammar and regular languges </p>

<p>$S \to Sa\ |\ a$ produces the regular language $a^+$ but this grammar is not type-3 grammar of Chomsky classification. So am I correct in stating that this is not a regular grammar even when it produces regular language?<... | regular languages | 1 | Regular Grammar and Regular Language -- (regular languages)
<p>My doubt is based on the relation between regular grammar and regular languges </p>

<p>$S \to Sa\ |\ a$ produces the regular language $a^+$ but this grammar is not type-3 grammar of Chomsky classification. So am I correct in stating that this is no... | habedi/stack-exchange-dataset |
18,506 | Decidability of the language that accepts a universal turing machine | <p>Is the language $L_{universal} = \{ \left \langle M \right \rangle | M \textrm{is a universal turing machine} \}$ decidable? </p>

<p>I'm guessing it is decidable according to the definition of a UTM, that a UTM must be able to calculate every recursive function. Since the set of recursive languages and the ... | computability turing machines undecidability | 1 | Decidability of the language that accepts a universal turing machine -- (computability turing machines undecidability)
<p>Is the language $L_{universal} = \{ \left \langle M \right \rangle | M \textrm{is a universal turing machine} \}$ decidable? </p>

<p>I'm guessing it is decidable according to the definition... | habedi/stack-exchange-dataset |
18,515 | Modifying Dijkstra’s algorithm to favor the path with least amount of edges | <p>I need to modify the Dijkstra's algorithm to get the shortest path in a directed graph and get the one with the least amount of edges if there are equal paths. </p>

<p>I am thinking to add another data field to count the number of edges from start and compare them in same way as weights. Would that work?</p... | algorithms graphs | 1 | Modifying Dijkstra’s algorithm to favor the path with least amount of edges -- (algorithms graphs)
<p>I need to modify the Dijkstra's algorithm to get the shortest path in a directed graph and get the one with the least amount of edges if there are equal paths. </p>

<p>I am thinking to add another data field t... | habedi/stack-exchange-dataset |
18,517 | Pumping Lemma for regular language | <p>I have a question to find out that L = {a^(2k)|k>=1} is regular. I know that it is regular set but I was looking to find out if pumping lemma is satisfying or not. So I tried it as -</p>

<pre><code>Let # of states in the FA be n & I select the string w = a^2n
Now let xyz = w
xy = a^n
y = a^m... | regular languages pumping lemma | 1 | Pumping Lemma for regular language -- (regular languages pumping lemma)
<p>I have a question to find out that L = {a^(2k)|k>=1} is regular. I know that it is regular set but I was looking to find out if pumping lemma is satisfying or not. So I tried it as -</p>

<pre><code>Let # of states in the FA be n & I... | habedi/stack-exchange-dataset |
18,522 | Widest path algorithm steps | <p>I need to compute the bottleneck shortest paths from s to all vertices of a graph by modifying the Dijkstra’s algorithm. I found this explanation on Wikipedia(<a href="http://en.wikipedia.org/wiki/Widest_path_problem" rel="nofollow" title="Link">Link to Wikipedia</a>) but I would appreciate if you can elaborate it a... | algorithms graphs | 1 | Widest path algorithm steps -- (algorithms graphs)
<p>I need to compute the bottleneck shortest paths from s to all vertices of a graph by modifying the Dijkstra’s algorithm. I found this explanation on Wikipedia(<a href="http://en.wikipedia.org/wiki/Widest_path_problem" rel="nofollow" title="Link">Link to Wikipedia</a... | habedi/stack-exchange-dataset |
18,534 | Is an $\mathcal{O}(n\times \text{Number of clusters})$ clustering algorithm useful? | <p>I am a physicist, with little formal training in computer science - please don't assume I know even obvious things about computer science! </p>

<p>Within the context of data analysis, I was interested in identifying clusters within a $d$-dimensional list of $n$ data-points, for which the dimensionality $d$ ... | algorithms complexity theory cluster | 1 | Is an $\mathcal{O}(n\times \text{Number of clusters})$ clustering algorithm useful? -- (algorithms complexity theory cluster)
<p>I am a physicist, with little formal training in computer science - please don't assume I know even obvious things about computer science! </p>

<p>Within the context of data analysis... | habedi/stack-exchange-dataset |
18,535 | On the minimum order of a maximal independent set in cycle graphs and path graphs | <p>I can see from <a href="https://math.stackexchange.com/questions/421233/turans-theorem-clique-free-graph-and-minimum-independent-set-size">this</a> question that a $K_{r + 1}$-free graph with $n$ vertices and $e$ edges contains an independent set of order at least
$$\frac{n}{2e/n + 1} \tag{1} $$
Since for a ... | graphs | 1 | On the minimum order of a maximal independent set in cycle graphs and path graphs -- (graphs)
<p>I can see from <a href="https://math.stackexchange.com/questions/421233/turans-theorem-clique-free-graph-and-minimum-independent-set-size">this</a> question that a $K_{r + 1}$-free graph with $n$ vertices and $e$ edges cont... | habedi/stack-exchange-dataset |
18,536 | What is a the fastest sorting algorithm for an array of integers? | <p>I have come across many sorting algorithms during my high school studies. However, I never know which is the fastest (for a random array of integers). So my questions are:</p>

<ul>
<li>Which is the fastest currently known sorting algorithm?</li>
<li>Theoretically, is it possible that there are even ... | algorithms time complexity optimization sorting | 1 | What is a the fastest sorting algorithm for an array of integers? -- (algorithms time complexity optimization sorting)
<p>I have come across many sorting algorithms during my high school studies. However, I never know which is the fastest (for a random array of integers). So my questions are:</p>

<ul>
<li>... | habedi/stack-exchange-dataset |
18,537 | Describing a Turing machine that computes $\lceil\log_{2}(n)\rceil$ | <p>I need to describing a Turing machine that computes $\lceil\log_{2}(n)\rceil$ I know that:</p>

<p>n = 1, 2, 3, 4, 5, 6, 7, 8, ... <br>
f(n) = 0, 1, 2, 2, 3, 3, 3, 3, ...</p>

<p>So I'm thinking of putting $n$ on the tape. Then keeping a count of how many times I multiply 2*2 until it is greater ... | complexity theory turing machines automata | 1 | Describing a Turing machine that computes $\lceil\log_{2}(n)\rceil$ -- (complexity theory turing machines automata)
<p>I need to describing a Turing machine that computes $\lceil\log_{2}(n)\rceil$ I know that:</p>

<p>n = 1, 2, 3, 4, 5, 6, 7, 8, ... <br>
f(n) = 0, 1, 2, 2, 3, 3, 3, 3, ...</p>

<p>So... | habedi/stack-exchange-dataset |
18,552 | Counting the number of N-dimensional coprime integer vectors | <p>I am looking for an efficient way to count the number of coprime vectors in a finite and bounded set of integer vectors.</p>

<p>The vectors in my set are $N$-dimensional integer vectors whose components are bounded on the top and bottom by an arbitrary value $K$. Let $x = [x_1,x_2,\ldots,x_N]$ denote a vect... | discrete mathematics counting primes | 1 | Counting the number of N-dimensional coprime integer vectors -- (discrete mathematics counting primes)
<p>I am looking for an efficient way to count the number of coprime vectors in a finite and bounded set of integer vectors.</p>

<p>The vectors in my set are $N$-dimensional integer vectors whose components ar... | habedi/stack-exchange-dataset |
18,559 | Mistake in Karp's paper on NP-Complete problems? | <p>I read <a href="http://blog.computationalcomplexity.org/2011/10/if-you-find-mistake-in-someone-elses.html" rel="nofollow">on a blog</a> that there are mistakes in Karp's paper where he proved that 0-1 programming is NP-Complete, but I couldn't find it, can anyone explain? And I doubt that there are also mistakes whe... | complexity theory np complete reductions | 1 | Mistake in Karp's paper on NP-Complete problems? -- (complexity theory np complete reductions)
<p>I read <a href="http://blog.computationalcomplexity.org/2011/10/if-you-find-mistake-in-someone-elses.html" rel="nofollow">on a blog</a> that there are mistakes in Karp's paper where he proved that 0-1 programming is NP-Com... | habedi/stack-exchange-dataset |
18,570 | Isn't Functional Programming just Imperative Programming in disguise? | <p>A <a href="http://www.youtube.com/watch?v=sqV3pL5x8PI" rel="noreferrer">YouTube video</a> I was watching explained the differences between Imperative and Functional programming by demonstrating how the numbers from <code>1</code> to <code>10</code> are summed up in Java and in Haskell respectively. </p>

<p>... | programming languages functional programming programming paradigms imperative programming | 1 | Isn't Functional Programming just Imperative Programming in disguise? -- (programming languages functional programming programming paradigms imperative programming)
<p>A <a href="http://www.youtube.com/watch?v=sqV3pL5x8PI" rel="noreferrer">YouTube video</a> I was watching explained the differences between Imperative an... | habedi/stack-exchange-dataset |
18,575 | "Unusual" coupling between a decision problem and a corresponding optimization problem | <p>There seems to usually be a tight connection between <a href="http://en.wikipedia.org/wiki/Decision_problem" rel="nofollow noreferrer">decision problems</a> and (corresponding) <a href="http://en.wikipedia.org/wiki/Optimization_problem" rel="nofollow noreferrer">optimization problems</a> in general. However, is this... | complexity theory reference request optimization decision problem | 1 | "Unusual" coupling between a decision problem and a corresponding optimization problem -- (complexity theory reference request optimization decision problem)
<p>There seems to usually be a tight connection between <a href="http://en.wikipedia.org/wiki/Decision_problem" rel="nofollow noreferrer">decision problems</a> an... | habedi/stack-exchange-dataset |
18,577 | does a DFA converted from NFA always contain 2^Q states? | <p>when converting an NFA to DFA, we create sub-sets of states in the NFA.
does it mean that every DFA-converted-from-NFA contain 2^Q states? or if some sub-sets are unreachable then they are not included in it?</p>
 | automata finite automata | 1 | does a DFA converted from NFA always contain 2^Q states? -- (automata finite automata)
<p>when converting an NFA to DFA, we create sub-sets of states in the NFA.
does it mean that every DFA-converted-from-NFA contain 2^Q states? or if some sub-sets are unreachable then they are not included in it?</p>
 | habedi/stack-exchange-dataset |
18,581 | Complexity of Double-Horn-SAT? | <p>On one hand, <a href="http://en.wikipedia.org/wiki/Horn-satisfiability" rel="nofollow noreferrer">Horn-SAT</a> is known to be tractable in linear time - where Horn-SAT is the problem of deciding whether a given set of propositional Horn clauses (with at most one positive literal) is satisfiable or not.
On the ot... | complexity theory np complete satisfiability complexity classes | 1 | Complexity of Double-Horn-SAT? -- (complexity theory np complete satisfiability complexity classes)
<p>On one hand, <a href="http://en.wikipedia.org/wiki/Horn-satisfiability" rel="nofollow noreferrer">Horn-SAT</a> is known to be tractable in linear time - where Horn-SAT is the problem of deciding whether a given set of... | habedi/stack-exchange-dataset |
18,582 | Clarification on Tabu Search | <p>I need some help in understanding the '<em>Tabu Search</em>' Algorithm. (<a href="http://en.wikipedia.org/wiki/Tabu_search" rel="nofollow">Wikipedia</a>)</p>

<p>I miss a simple explanation to Tabu Search. Anyway, I'm trying to refer to available resources and build an understanding. </p>

<p><em><st... | optimization artificial intelligence search algorithms | 1 | Clarification on Tabu Search -- (optimization artificial intelligence search algorithms)
<p>I need some help in understanding the '<em>Tabu Search</em>' Algorithm. (<a href="http://en.wikipedia.org/wiki/Tabu_search" rel="nofollow">Wikipedia</a>)</p>

<p>I miss a simple explanation to Tabu Search. Anyway, I'm tr... | habedi/stack-exchange-dataset |
18,583 | Where can I find rules for source to source transformation optimization rules? | <p>Upon reading <a href="https://stackoverflow.com/q/20356678/1243762">Do source code optimizers exist?</a> I knew that such programs existed but the ones I have worked with use a set of rules to drive a transformation algorithm. <a href="https://stackoverflow.com/users/120163/ira-baxter">Ira Baxter</a> provided a lin... | reference request term rewriting | 1 | Where can I find rules for source to source transformation optimization rules? -- (reference request term rewriting)
<p>Upon reading <a href="https://stackoverflow.com/q/20356678/1243762">Do source code optimizers exist?</a> I knew that such programs existed but the ones I have worked with use a set of rules to drive ... | habedi/stack-exchange-dataset |
18,589 | Algorithm to use for a TSP variant | <p>What type of algorithm would you suggest me to use for this problem? I want to implement an algorithm that minimize the total distance in a graph (TSP) but for only X nodes. Also, we can go as many times we want on every vertices and/or edges. Let's say, on my graph, that I want the minimum distance for visiting eve... | algorithms graphs heuristics traveling salesman | 1 | Algorithm to use for a TSP variant -- (algorithms graphs heuristics traveling salesman)
<p>What type of algorithm would you suggest me to use for this problem? I want to implement an algorithm that minimize the total distance in a graph (TSP) but for only X nodes. Also, we can go as many times we want on every vertices... | habedi/stack-exchange-dataset |
18,596 | Visualize Graph Clusters | <p>I am working on my thesis which involves using ant based techniques for graph clustering. I am testing the algorithm currently and I was wondering if there is a way that I can visualize the clusters of a given graph.</p>

<p>In this case, I have the graph as a file and another file corresponding to the clust... | graphs cluster | 1 | Visualize Graph Clusters -- (graphs cluster)
<p>I am working on my thesis which involves using ant based techniques for graph clustering. I am testing the algorithm currently and I was wondering if there is a way that I can visualize the clusters of a given graph.</p>

<p>In this case, I have the graph as a fil... | habedi/stack-exchange-dataset |
18,603 | Ball Break Point Problem | <p>I came across following question:</p>

<p>There is a building with N floors. We have a balls of same property and have a breaking point of X floor. i.e, If ball dropped from X+1 floor then the ball will break. if ball is dropped from X or less than X then it wont break. Now design an algorithm to find X if N... | algorithms | 1 | Ball Break Point Problem -- (algorithms)
<p>I came across following question:</p>

<p>There is a building with N floors. We have a balls of same property and have a breaking point of X floor. i.e, If ball dropped from X+1 floor then the ball will break. if ball is dropped from X or less than X then it wont brea... | habedi/stack-exchange-dataset |
18,610 | Partition an infinite regular language into 2 disjoint infinite regular languages | <p>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$ are both both infinite and regular.</p>

<p>So far, I thought of:</p>

<ol>
<l... | formal languages regular languages finite automata | 1 | Partition an infinite regular language into 2 disjoint infinite regular languages -- (formal languages regular languages finite automata)
<p>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 ... | habedi/stack-exchange-dataset |
18,624 | Why is this not a regular language | <p>So I recently had a problem where I had to create a regular language. After consulting my professor on my solution he told me it was close to correct but to check my definition of a regular language. I am somewhat lost on why my solution is not regular?</p>

<p><img src="https://i.stack.imgur.com/CTosd.png" ... | regular languages context free automata | 1 | Why is this not a regular language -- (regular languages context free automata)
<p>So I recently had a problem where I had to create a regular language. After consulting my professor on my solution he told me it was close to correct but to check my definition of a regular language. I am somewhat lost on why my solution... | habedi/stack-exchange-dataset |
18,626 | array with a twist | <p>Imagine that we have an array like structure A with n elements all of which are initially 0.
($A[i]=0$)</p>

<p>What is a data structure that supports the following operations:</p>

<p>1) Given an element A[i]=0 set A[i] to 1 in <strong>O(1) worst case</strong></p>

<p>2) Given the index ... | amortized analysis | 1 | array with a twist -- (amortized analysis)
<p>Imagine that we have an array like structure A with n elements all of which are initially 0.
($A[i]=0$)</p>

<p>What is a data structure that supports the following operations:</p>

<p>1) Given an element A[i]=0 set A[i] to 1 in <strong>O(1) worst case</... | habedi/stack-exchange-dataset |
18,630 | What does the symbol # mean when it comes to languages | <p>Given the following:</p>

<p>$$\{ w\#x \mid w^R \text{ is a substring of $x$, with $x$ and $w \in \Sigma^*$} \}$$</p>

<p>What does $w\#x$ denote?</p>
 | formal languages terminology context free automata | 1 | What does the symbol # mean when it comes to languages -- (formal languages terminology context free automata)
<p>Given the following:</p>

<p>$$\{ w\#x \mid w^R \text{ is a substring of $x$, with $x$ and $w \in \Sigma^*$} \}$$</p>

<p>What does $w\#x$ denote?</p>
 | habedi/stack-exchange-dataset |
18,639 | Right moving turing machine | <p>I am interested in simulating any turing machine with a turing machine that is allowed only to move right. I guess that it should be pretty standard material and likely it is trivial (or known to be false). Does anyone have a pointer to a reference?</p>
 | computability turing machines computation models simulation | 1 | Right moving turing machine -- (computability turing machines computation models simulation)
<p>I am interested in simulating any turing machine with a turing machine that is allowed only to move right. I guess that it should be pretty standard material and likely it is trivial (or known to be false). Does anyone have ... | habedi/stack-exchange-dataset |
18,642 | Intersection of context free with regular languages | <p>The intersection of a context free language L with a regular language M, is said to be always context free. I understood the cross product construction proof, but I still don't get why it is context free but not regular.</p>

<p>The language generated by such an intersection has strings that are accepted bo... | regular languages context free finite automata formal grammars | 1 | Intersection of context free with regular languages -- (regular languages context free finite automata formal grammars)
<p>The intersection of a context free language L with a regular language M, is said to be always context free. I understood the cross product construction proof, but I still don't get why it is conte... | habedi/stack-exchange-dataset |
18,646 | Prove the existence of regular $C$ so that: $A \prec C \prec B $ | <p>Given $A,B$ regular languages with $A \prec B$. Prove the existence of $C\in L_{\text{regular}}$ so that: $A \prec C \prec B$.</p>

<p>Here, $A\prec B$ stands for: $A\subset B $ and $B\setminus A $ is infinite. </p>

<p>I tried to go for: $C=\overline{B} \cup A$ and some other options but it didn't ... | formal languages regular languages closure properties | 1 | Prove the existence of regular $C$ so that: $A \prec C \prec B $ -- (formal languages regular languages closure properties)
<p>Given $A,B$ regular languages with $A \prec B$. Prove the existence of $C\in L_{\text{regular}}$ so that: $A \prec C \prec B$.</p>

<p>Here, $A\prec B$ stands for: $A\subset B $ and $B\... | habedi/stack-exchange-dataset |
18,648 | Is there a DFA with $k+2$ states which its reverse has $2^k$ states | <p>I am trying to figure out if there exists a DFA $M$ with $k+2$ states (for every $k\in \mathbb{N}$ ) so that every automaton which accepts $L(M)^R$ has at least $2^k$ states.<br>
I am trying to find an example of such a DFA, any help?</p>
 | regular languages automata finite automata | 1 | Is there a DFA with $k+2$ states which its reverse has $2^k$ states -- (regular languages automata finite automata)
<p>I am trying to figure out if there exists a DFA $M$ with $k+2$ states (for every $k\in \mathbb{N}$ ) so that every automaton which accepts $L(M)^R$ has at least $2^k$ states.<br>
I am trying to fin... | habedi/stack-exchange-dataset |
18,657 | In cache-oblivious algorithms, how is recursive reduction of data performed? | <p>From <a href="http://en.wikipedia.org/wiki/Cache-oblivious_algorithm" rel="nofollow">wikipedia</a>:</p>

<p>"Typically, a cache-oblivious algorithm works by a recursive divide and conquer algorithm, where the problem is divided into smaller and smaller subproblems. Eventually, one reaches a subproblem size t... | cpu cache | 1 | In cache-oblivious algorithms, how is recursive reduction of data performed? -- (cpu cache)
<p>From <a href="http://en.wikipedia.org/wiki/Cache-oblivious_algorithm" rel="nofollow">wikipedia</a>:</p>

<p>"Typically, a cache-oblivious algorithm works by a recursive divide and conquer algorithm, where the problem ... | habedi/stack-exchange-dataset |
18,664 | Converting English into Logic | <p>I'm learning about Logic; I've devised a few sentences to convert into logic to test myself and see if i've grasped the topic. It would be of great help if you could tell me if i'm doing it right!</p>

<ul>
<li>Every student who likes chocolate is smart:</li>
</ul>

<p>(Every student) (who li... | formal languages logic | 1 | Converting English into Logic -- (formal languages logic)
<p>I'm learning about Logic; I've devised a few sentences to convert into logic to test myself and see if i've grasped the topic. It would be of great help if you could tell me if i'm doing it right!</p>

<ul>
<li>Every student who likes chocolate is... | habedi/stack-exchange-dataset |
18,677 | Is there such a thing as partial reduction? | <p>I am trying to reduce <code>3-sat</code> to <code>2-sat</code>. With my reduction, I can find one assignment that satisfies them both, but there are some assignments that satisfy only the <code>3-sat</code>.</p>
<p>Does it make my reduction invalid? Is <code>3-sat</code> required to be equal-satisfiable to <code... | satisfiability 3 sat | 1 | Is there such a thing as partial reduction? -- (satisfiability 3 sat)
<p>I am trying to reduce <code>3-sat</code> to <code>2-sat</code>. With my reduction, I can find one assignment that satisfies them both, but there are some assignments that satisfy only the <code>3-sat</code>.</p>
<p>Does it make my reduction in... | habedi/stack-exchange-dataset |
18,678 | PSPACE and NP complexity | <p>I'm reading a definition of PSPACE and say: are the decision problems solvable in polynomial space on a Deterministic Turing Machine. My question is: Why NP is in PSPACE?. I have a doubt beccause for example a SAT problem is solvable in Non-Deterministic Turing Machine and SAT $\in NP$ and not in $P$.</p>
 | complexity theory | 1 | PSPACE and NP complexity -- (complexity theory)
<p>I'm reading a definition of PSPACE and say: are the decision problems solvable in polynomial space on a Deterministic Turing Machine. My question is: Why NP is in PSPACE?. I have a doubt beccause for example a SAT problem is solvable in Non-Deterministic Turing Machine... | habedi/stack-exchange-dataset |
18,681 | Undergraduate Computer Science Textbooks | <p>What books would you recommend for someone starting B.Sc in Computer Science? </p>

<p>My Personal Info:<br>
I am currently looking at B.Sc in Computer Science (Games), which is computer science, accept for the last year which is tailored more towards game dev.</p>

<p>I have a fair bit of progra... | books | 1 | Undergraduate Computer Science Textbooks -- (books)
<p>What books would you recommend for someone starting B.Sc in Computer Science? </p>

<p>My Personal Info:<br>
I am currently looking at B.Sc in Computer Science (Games), which is computer science, accept for the last year which is tailored more towards g... | habedi/stack-exchange-dataset |
18,683 | Monte-Carlo algorithm for clustering | <p>I have written an algorithm for clustering data-points with their nearest neighbours with a Euclidean distance metric. I estimate its complexity to be $\mathcal{O}(n \times k)$ for $n$ data-points with $k$ genuine clusters. The dimension $d$ of the data results in $\mathcal{O}(e^d)$ complexity, though I believe this... | algorithms | 1 | Monte-Carlo algorithm for clustering -- (algorithms)
<p>I have written an algorithm for clustering data-points with their nearest neighbours with a Euclidean distance metric. I estimate its complexity to be $\mathcal{O}(n \times k)$ for $n$ data-points with $k$ genuine clusters. The dimension $d$ of the data results in... | habedi/stack-exchange-dataset |
18,692 | Synchronizing sequence and Synchronizable DFA | <p>I am trying to prove problem 1.59 in Sipser's book: <em>Introduction to the theory of computation , 2nd Edition.</em></p>
<blockquote>
<p>Let <span class="math-container">$M=(Q,\Sigma,\delta,q_0,A)$</span> be a DFA and let <span class="math-container">$q'$</span> be a state of <span class="math-container">$M... | regular languages automata finite automata | 1 | Synchronizing sequence and Synchronizable DFA -- (regular languages automata finite automata)
<p>I am trying to prove problem 1.59 in Sipser's book: <em>Introduction to the theory of computation , 2nd Edition.</em></p>
<blockquote>
<p>Let <span class="math-container">$M=(Q,\Sigma,\delta,q_0,A)$</span> be a DFA ... | habedi/stack-exchange-dataset |
18,701 | Regex for the language over $\{a,b,c\}$ that contain at least two $a$'s but no two consecutive $b$'s | <p>Like the title says, we have the alphabet $\Sigma = \{a,b,c\}$ and the question is asking for the regular expression of the language $L$ that has the property that all strings in $L$ have at least two consecutive $a$'s but no consecutive $b$'s. </p>

<p>By attempt at a solution was this, where $aaa^+$ stands... | regular languages regular expressions | 1 | Regex for the language over $\{a,b,c\}$ that contain at least two $a$'s but no two consecutive $b$'s -- (regular languages regular expressions)
<p>Like the title says, we have the alphabet $\Sigma = \{a,b,c\}$ and the question is asking for the regular expression of the language $L$ that has the property that all strin... | habedi/stack-exchange-dataset |
18,709 | Task Manager Performance tab in windows | <p>I do not understand the following options in windows. Could any one explain
<img src="https://i.stack.imgur.com/S011N.png" alt="enter image description here"></p>
 | operating systems performance | 1 | Task Manager Performance tab in windows -- (operating systems performance)
<p>I do not understand the following options in windows. Could any one explain
<img src="https://i.stack.imgur.com/S011N.png" alt="enter image description here"></p>
 | habedi/stack-exchange-dataset |
18,711 | Are Algebraic types just the combination of case classes and pattern matching? | <p>On <a href="http://en.wikipedia.org/wiki/Pizza_%28programming_language%29" rel="nofollow">this page describing the precursor to the Scala language</a> - the pizza language - they refer to it having both case classes and <a href="http://en.wikipedia.org/wiki/Pattern_matching" rel="nofollow">pattern matching</a> - and... | type theory pattern recognition abstract data types | 1 | Are Algebraic types just the combination of case classes and pattern matching? -- (type theory pattern recognition abstract data types)
<p>On <a href="http://en.wikipedia.org/wiki/Pizza_%28programming_language%29" rel="nofollow">this page describing the precursor to the Scala language</a> - the pizza language - they re... | habedi/stack-exchange-dataset |
18,717 | What is the difference between a problem and an algorithm? | <p>I can say that <span class="math-container">$x * y$</span> is a problem, but I can also say that <span class="math-container">$x * y$</span> is an algorithm for finding a rectangle area.</p>
<p>I have been reading Wikipedia about an <a href="http://en.wikipedia.org/wiki/Algorithm" rel="nofollow noreferrer">algor... | algorithms terminology | 1 | What is the difference between a problem and an algorithm? -- (algorithms terminology)
<p>I can say that <span class="math-container">$x * y$</span> is a problem, but I can also say that <span class="math-container">$x * y$</span> is an algorithm for finding a rectangle area.</p>
<p>I have been reading Wikipedia ab... | habedi/stack-exchange-dataset |
18,728 | Difference between multitasking, multithreading and multiprogramming | <p>I was a little confused between these three terms Multitasking, Multithreading and Multiprogramming</p>

<p>Although every one means executing different lines of codes, and for every one we need something like Task State Segment or context to store data for that particular thread/task. </p>

<p>I am ... | terminology operating systems concurrency | 1 | Difference between multitasking, multithreading and multiprogramming -- (terminology operating systems concurrency)
<p>I was a little confused between these three terms Multitasking, Multithreading and Multiprogramming</p>

<p>Although every one means executing different lines of codes, and for every one we nee... | habedi/stack-exchange-dataset |
18,732 | How can I analyze the time complexity of this Dynamic Time Warping algorithm implemented in MATLAB? | <p>I have a rough idea that the time complexity is O(mn) where m and n are based on the length of signals, as per this <a href="http://en.wikipedia.org/wiki/Dynamic_time_warping" rel="nofollow">http://en.wikipedia.org/wiki/Dynamic_time_warping</a>. </p>

<p>How can I determine the time complexity of the followi... | algorithms algorithm analysis time complexity | 1 | How can I analyze the time complexity of this Dynamic Time Warping algorithm implemented in MATLAB? -- (algorithms algorithm analysis time complexity)
<p>I have a rough idea that the time complexity is O(mn) where m and n are based on the length of signals, as per this <a href="http://en.wikipedia.org/wiki/Dynamic_time... | habedi/stack-exchange-dataset |
18,734 | Questions on the definition of polynomial time | <p>I been reading Wikipedia for <a href="http://en.wikipedia.org/wiki/Polynomial_time#Polynomial_time" rel="nofollow">polynomial time</a>, and it says:</p>

<blockquote>
 <p>An algorithm is said to be of polynomial time if its running time is
 upper bounded by a <a href="http://en.wikipedia.org/wiki/P... | time complexity | 1 | Questions on the definition of polynomial time -- (time complexity)
<p>I been reading Wikipedia for <a href="http://en.wikipedia.org/wiki/Polynomial_time#Polynomial_time" rel="nofollow">polynomial time</a>, and it says:</p>

<blockquote>
 <p>An algorithm is said to be of polynomial time if its running time... | habedi/stack-exchange-dataset |
18,736 | Equivalence of independent set and set packing | <p>According to Wikipedia, the <a href="http://en.wikipedia.org/wiki/Independent_set_%28graph_theory%29">Independent Set</a> problem is a special case of the <a href="http://en.wikipedia.org/wiki/Set_packing">Set Packing</a> problem. But, it seems to me that these problems are equivalent.</p>

<p>The <a href="h... | algorithms graphs sets packing | 1 | Equivalence of independent set and set packing -- (algorithms graphs sets packing)
<p>According to Wikipedia, the <a href="http://en.wikipedia.org/wiki/Independent_set_%28graph_theory%29">Independent Set</a> problem is a special case of the <a href="http://en.wikipedia.org/wiki/Set_packing">Set Packing</a> problem. But... | habedi/stack-exchange-dataset |
18,737 | Set packing variant | <pre><code>There are n collections of M sets.
Pick a single set from each collection,
such that all n picked sets are pairwise disjoint.
</code></pre>

<p>This problem can be converted to the standard <a href="http://en.wikipedia.org/wiki/Set_packing" rel="nofollow">Set Packing</a> problem in the fo... | algorithms np complete sets packing | 1 | Set packing variant -- (algorithms np complete sets packing)
<pre><code>There are n collections of M sets.
Pick a single set from each collection,
such that all n picked sets are pairwise disjoint.
</code></pre>

<p>This problem can be converted to the standard <a href="http://en.wikipedia.org/wiki/... | habedi/stack-exchange-dataset |
18,744 | Exponential time algorithms | <p>Wiki define <a href="http://en.wikipedia.org/wiki/Polynomial_time#Polynomial_time" rel="nofollow noreferrer">Polynomial time</a> as fallow:</p>

<blockquote>
 <p>An algorithm is said to be of polynomial time if its running time is
 upper bounded by a <a href="http://en.wikipedia.org/wiki/Polynomial... | time complexity | 1 | Exponential time algorithms -- (time complexity)
<p>Wiki define <a href="http://en.wikipedia.org/wiki/Polynomial_time#Polynomial_time" rel="nofollow noreferrer">Polynomial time</a> as fallow:</p>

<blockquote>
 <p>An algorithm is said to be of polynomial time if its running time is
 upper bounded by a... | habedi/stack-exchange-dataset |
18,749 | Mastermind (board game) - Five-guess algorithm | <p>The algorithm (from <a href="http://en.wikipedia.org/wiki/Mastermind_%28board_game%29" rel="nofollow">here</a>) - </p>

<blockquote>
 <ol>
 <li><p>Create a set S of remaining possibilities (at this point there are 1296). The first guess is aabb.</p></li>
 <li><p>Remove all possibilities from S... | algorithms board games | 1 | Mastermind (board game) - Five-guess algorithm -- (algorithms board games)
<p>The algorithm (from <a href="http://en.wikipedia.org/wiki/Mastermind_%28board_game%29" rel="nofollow">here</a>) - </p>

<blockquote>
 <ol>
 <li><p>Create a set S of remaining possibilities (at this point there are 1296). The... | habedi/stack-exchange-dataset |
18,750 | EXPTIME vs Super-polynomial time | <p>It is proven by <a href="https://en.wikipedia.org/wiki/Time_hierarchy_theorem" rel="nofollow">Time hierarchy theorem</a> that <a href="https://en.wikipedia.org/wiki/EXPTIME-complete" rel="nofollow">EXPTIME-complete</a> do not belong to P even if we do not know if NP belong to P.</p>

<p>Before I read wiki, I... | time complexity | 1 | EXPTIME vs Super-polynomial time -- (time complexity)
<p>It is proven by <a href="https://en.wikipedia.org/wiki/Time_hierarchy_theorem" rel="nofollow">Time hierarchy theorem</a> that <a href="https://en.wikipedia.org/wiki/EXPTIME-complete" rel="nofollow">EXPTIME-complete</a> do not belong to P even if we do not know if... | habedi/stack-exchange-dataset |
18,754 | Hard computational problem on special class of bipartite graphs | <p>I am interested in the properties of a class of bipartite graphs $G(X \cup Y, E)$ where all nodes in $X$ are 3-regular, all nodes in $Y$ are 2-regular, and $|X|=|2Y/3|$. First, Is this a well known class of graphs? Secondly,</p>

<blockquote>
 <p>Is there an example of intractable computational problem ... | complexity theory graphs | 1 | Hard computational problem on special class of bipartite graphs -- (complexity theory graphs)
<p>I am interested in the properties of a class of bipartite graphs $G(X \cup Y, E)$ where all nodes in $X$ are 3-regular, all nodes in $Y$ are 2-regular, and $|X|=|2Y/3|$. First, Is this a well known class of graphs? Secondly... | habedi/stack-exchange-dataset |
18,757 | Process Types and names | <p>There seems to be a classification of processes in IT. For example, "business process" refers to the collection of tasks done by organization members / software systems to achieve a goal.</p>

<p>If a process is completely automated and carried out by software (no people involved) what is the process called?... | software engineering | 1 | Process Types and names -- (software engineering)
<p>There seems to be a classification of processes in IT. For example, "business process" refers to the collection of tasks done by organization members / software systems to achieve a goal.</p>

<p>If a process is completely automated and carried out by softwar... | habedi/stack-exchange-dataset |
18,765 | Theorem Proofs in Coq | <h1>Background</h1>

<p>I am learning assistance, Coq, on my own. So far, I have completed reading Yves Bertot's <em>Coq in a Hurry</em>. Now, my goal is to prove some basic results concerning the natural numbers, culminating with the so-called division algorithm. However, I have encountered some setbacks on my... | automated theorem proving proof assistants mathematical programming coq | 1 | Theorem Proofs in Coq -- (automated theorem proving proof assistants mathematical programming coq)
<h1>Background</h1>

<p>I am learning assistance, Coq, on my own. So far, I have completed reading Yves Bertot's <em>Coq in a Hurry</em>. Now, my goal is to prove some basic results concerning the natural numbers,... | habedi/stack-exchange-dataset |
18,767 | Time complexity of languages that are polynomial time reducible to NP complete languages | <p>I am wondering if given the time complexity of an NP-Complete problem or at least some information about it for example if $ SAT\in Time(2^{sqrt(n)})$ (hypothetically) could I assume that all languages in NP (which are clearly polynomial time reducible to SAT) are also $\in Time(2^{sqrt(n)})$</p>

<p>I belie... | time complexity np complete polynomial time | 1 | Time complexity of languages that are polynomial time reducible to NP complete languages -- (time complexity np complete polynomial time)
<p>I am wondering if given the time complexity of an NP-Complete problem or at least some information about it for example if $ SAT\in Time(2^{sqrt(n)})$ (hypothetically) could I ass... | habedi/stack-exchange-dataset |
18,774 | Is the language of all ucv with u ≠ v context-free? | <p>Is $L = \{w_1cw_2 : w_1, w_2 \in \{a, b\}^* , w_1 \neq w_2 \}$ a CFL?</p>

<p>In my opinion it is not since if we want to know the inequality of $w_1$ and $w_2$ we must be aware of their equality and that is not a $CFG$.</p>
 | formal languages context free | 1 | Is the language of all ucv with u ≠ v context-free? -- (formal languages context free)
<p>Is $L = \{w_1cw_2 : w_1, w_2 \in \{a, b\}^* , w_1 \neq w_2 \}$ a CFL?</p>

<p>In my opinion it is not since if we want to know the inequality of $w_1$ and $w_2$ we must be aware of their equality and that is not a $CFG$.</... | habedi/stack-exchange-dataset |
18,786 | Metagame Paradox: what is wrong with this explanation? | <p>Today I've heard about fascinating metagame paradox. I tried to come up with an explanation via Turing Machines formalization (below). Do you know what is the solution to the paradox? (the post content: definition - proposed solution - conclusion)</p>

<p>Something is a game iff:</p>

<pre><code>G1. ... | computability turing machines game theory | 1 | Metagame Paradox: what is wrong with this explanation? -- (computability turing machines game theory)
<p>Today I've heard about fascinating metagame paradox. I tried to come up with an explanation via Turing Machines formalization (below). Do you know what is the solution to the paradox? (the post content: definition -... | habedi/stack-exchange-dataset |
18,793 | CNF SAT conversions | <p>I am interested in reductions from 3-CNF boolean expressions to similar restricted forms. For example, I am interested in knowing how to reduce a 3-CNF formula to another 3-CNF formula where each variable appears in at most $b$ clauses. I observed this is used in MAX-SAT so I am interested in knowing such reductions... | complexity theory reductions satisfiability | 1 | CNF SAT conversions -- (complexity theory reductions satisfiability)
<p>I am interested in reductions from 3-CNF boolean expressions to similar restricted forms. For example, I am interested in knowing how to reduce a 3-CNF formula to another 3-CNF formula where each variable appears in at most $b$ clauses. I observed ... | habedi/stack-exchange-dataset |
18,794 | Big O Notation - Find a Function That Represents the Statement | <p>There's an <code>f(n)</code> such that <code>f(n) != O(f(n/2))</code></p>

<p>so by the definition of big O notation:<br>
for <code>f(n) = n^2</code> the statement is false, because there is a constant c such that <code>n^2 = c*(n^2/2)</code></p>

<p>Which f(n) will work?<br>
My guess is f(n)... | complexity theory asymptotics | 1 | Big O Notation - Find a Function That Represents the Statement -- (complexity theory asymptotics)
<p>There's an <code>f(n)</code> such that <code>f(n) != O(f(n/2))</code></p>

<p>so by the definition of big O notation:<br>
for <code>f(n) = n^2</code> the statement is false, because there is a constant c suc... | habedi/stack-exchange-dataset |
18,796 | Why are bytes treated like the base unit? | <p>If bits are the base unit of information, why are bytes treated like the base unit? </p>

<p>For example, usually values are expressed in Mega/Giga/Tera/Exa bytes instead of bits. I am aware that bits are sometimes used (e.g. sometimes for internet speed), but generally to me it seems like bytes are used as ... | information theory | 1 | Why are bytes treated like the base unit? -- (information theory)
<p>If bits are the base unit of information, why are bytes treated like the base unit? </p>

<p>For example, usually values are expressed in Mega/Giga/Tera/Exa bytes instead of bits. I am aware that bits are sometimes used (e.g. sometimes for int... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.