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 |
|---|---|---|---|---|---|---|
66,396 | Multi modal learning from separate modal datasets | <p>Let's say I'm trying to learn emotion given multi-modal sources. In this case, video and audio. However, I only have one dataset for video emotions and one dataset for audio. Is it possible to train a Deep Learning classifier on each dataset separately? One way I can imagine doing this is creating some sort of share... | reference request neural networks | 1 | Multi modal learning from separate modal datasets -- (reference request neural networks)
<p>Let's say I'm trying to learn emotion given multi-modal sources. In this case, video and audio. However, I only have one dataset for video emotions and one dataset for audio. Is it possible to train a Deep Learning classifier on... | habedi/stack-exchange-dataset |
66,398 | strong reduction of $\lambda$-terms, useful? | <p>As we know many programming languages and systems don't implement the strong reduction of $\lambda$-terms, instead they do weak reduction (no reduction under abstraction).</p>

<p>I recently experimented several tests on $\lambda$-terms. I applied strong reduction and call by value reduction on them. </p>&#... | lambda calculus functional programming | 1 | strong reduction of $\lambda$-terms, useful? -- (lambda calculus functional programming)
<p>As we know many programming languages and systems don't implement the strong reduction of $\lambda$-terms, instead they do weak reduction (no reduction under abstraction).</p>

<p>I recently experimented several tests o... | habedi/stack-exchange-dataset |
66,403 | What makes a language "optimized" for a specific task? | <p>Often there are programming languages that are specialized for specific tasks. Some programming languages are excellent at array arithmetic (such as matrices and the use of multidimensional arrays), yet some are much better at higher-level mathematics that is hard to reproduce in other languages (yet still possible ... | programming languages | 1 | What makes a language "optimized" for a specific task? -- (programming languages)
<p>Often there are programming languages that are specialized for specific tasks. Some programming languages are excellent at array arithmetic (such as matrices and the use of multidimensional arrays), yet some are much better at higher-l... | habedi/stack-exchange-dataset |
66,412 | Alternatives to Defunctionalization | <p><a href="https://en.wikipedia.org/wiki/Defunctionalization" rel="noreferrer">Defunctionalization</a> is a transformation first described 1972 by John C. Reynolds to eliminate higher-order functions. Are there alternative transformations (more efficient?) to eliminate higher-order functions?</p>
 | programming languages functional programming | 1 | Alternatives to Defunctionalization -- (programming languages functional programming)
<p><a href="https://en.wikipedia.org/wiki/Defunctionalization" rel="noreferrer">Defunctionalization</a> is a transformation first described 1972 by John C. Reynolds to eliminate higher-order functions. Are there alternative transforma... | habedi/stack-exchange-dataset |
66,459 | Trying to figure out if a modern computer is capable of manipulating arbitrarily large pointers | <p>I was just thinking about Turing-completeness and its relationship with modern computers. I've always thought that a real computer is not technically Turing-complete. It is equivalent to a linear-bounded automaton; a Turing machine has infinite memory, whereas a real computer has only finite memory.</p>

<... | arithmetic turing completeness | 1 | Trying to figure out if a modern computer is capable of manipulating arbitrarily large pointers -- (arithmetic turing completeness)
<p>I was just thinking about Turing-completeness and its relationship with modern computers. I've always thought that a real computer is not technically Turing-complete. It is equivalent... | habedi/stack-exchange-dataset |
66,463 | What is the time complexity in big-O notation of Algorithm X? | <p><em><a href="https://en.wikipedia.org/wiki/Knuth's_Algorithm_X" rel="nofollow noreferrer">Knuth's Algorithm X</a> is a recursive, nondeterministic, depth-first, backtracking algorithm</em> that solves the NP-complete problem exact cover (EC). (It actually finds all solutions to EC.)</p>

<p>I do not unde... | algorithms algorithm analysis time complexity | 1 | What is the time complexity in big-O notation of Algorithm X? -- (algorithms algorithm analysis time complexity)
<p><em><a href="https://en.wikipedia.org/wiki/Knuth's_Algorithm_X" rel="nofollow noreferrer">Knuth's Algorithm X</a> is a recursive, nondeterministic, depth-first, backtracking algorithm</em> that solves... | habedi/stack-exchange-dataset |
66,475 | Language Classification + AWS ML: what am I doing wrong? | <p>I'm evaluating Amazon's machine learning platform, and thought that I would give it a "simple" classification problem first. As a disclaimer, I am quite new to machine learning (hence my interest in an ML platform).</p>

<p>The classification problem is language detection. Given a list of 20k words, and th... | machine learning neural networks classification | 1 | Language Classification + AWS ML: what am I doing wrong? -- (machine learning neural networks classification)
<p>I'm evaluating Amazon's machine learning platform, and thought that I would give it a "simple" classification problem first. As a disclaimer, I am quite new to machine learning (hence my interest in an ML p... | habedi/stack-exchange-dataset |
66,494 | What is a final state? | <p>I am studying DFA's, but I've been struggling to find an explanation of what does the final state mean? I know that it is indicated by double circle on the graph, but what does it imply?</p>
 | formal languages finite automata | 1 | What is a final state? -- (formal languages finite automata)
<p>I am studying DFA's, but I've been struggling to find an explanation of what does the final state mean? I know that it is indicated by double circle on the graph, but what does it imply?</p>
 | habedi/stack-exchange-dataset |
66,498 | Prim's algorithm on graph with weights of only $1$ and $2$ on each edge | <p>I have this version of <a href="https://en.wikipedia.org/wiki/Prim's_algorithm" rel="nofollow noreferrer">Prim's algorithm</a></p>

<p>Prim$(G=(V,E),s\in V,w)\\
1.\ d(s)\leftarrow 0;\forall u \neq s:d(u)\leftarrow \infty\quad \color{red}{O(|V|)}\\
2.\ \forall u \in V:p(u)\leftarrow \text{null}\... | algorithms time complexity spanning trees minimum spanning tree prims algorithm | 1 | Prim's algorithm on graph with weights of only $1$ and $2$ on each edge -- (algorithms time complexity spanning trees minimum spanning tree prims algorithm)
<p>I have this version of <a href="https://en.wikipedia.org/wiki/Prim's_algorithm" rel="nofollow noreferrer">Prim's algorithm</a></p>

<p>Prim$(G=(V,E... | habedi/stack-exchange-dataset |
66,501 | What is the purpose of interpreting elements in the proof of reduction of PCP to validity decidability problem of predicate logic? | <p>Since my question relates directly to a part of the text from a 2004 book, <em>Logic in Computer Science: Modelling and Reasoning about Systems (2nd Edition) by Michael Huth and Mark Ryan</em>, in order to provide context for the following discussion, I'm partially quoting the book verbatim:</p>

<blockquote... | reductions logic proof techniques undecidability | 1 | What is the purpose of interpreting elements in the proof of reduction of PCP to validity decidability problem of predicate logic? -- (reductions logic proof techniques undecidability)
<p>Since my question relates directly to a part of the text from a 2004 book, <em>Logic in Computer Science: Modelling and Reasoning ab... | habedi/stack-exchange-dataset |
66,508 | Proving tautology with coq | <p>Currently I have to learn Coq and don't know how to deal with an <code>or</code> : </p>

<p>As an example, as simple as it is, I don't see how to prove:</p>

<pre><code>Theorem T0: x \/ ~x.
</code></pre>

<p>I would really appreciate it, if someone could help me. </p>

<p>For refe... | logic coq | 1 | Proving tautology with coq -- (logic coq)
<p>Currently I have to learn Coq and don't know how to deal with an <code>or</code> : </p>

<p>As an example, as simple as it is, I don't see how to prove:</p>

<pre><code>Theorem T0: x \/ ~x.
</code></pre>

<p>I would really appreciate it, if someon... | habedi/stack-exchange-dataset |
66,529 | How do you read this context-free language? | <p><a href="https://i.stack.imgur.com/OiuSj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OiuSj.png" alt="enter image description here"></a></p>

<p>say you want to make a Pushdown Automaton to recognize this language.</p>

<p>What exactly does the +1 mean? I see in the example it j... | context free pushdown automata | 1 | How do you read this context-free language? -- (context free pushdown automata)
<p><a href="https://i.stack.imgur.com/OiuSj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OiuSj.png" alt="enter image description here"></a></p>

<p>say you want to make a Pushdown Automaton to recognize this la... | habedi/stack-exchange-dataset |
66,535 | deterministic finite automaton for "does contain substring $w$" is of linear size | <p>A (non-deterministic) finite state automaton for "all strings that contain substring $w$" is very simple. Just make the path for $w$ and add looped transitions for all letters at the first initial state and the last final state.</p>

<p>When asked to make a deterministic automaton in general we might expect ... | finite automata nondeterminism pattern recognition | 1 | deterministic finite automaton for "does contain substring $w$" is of linear size -- (finite automata nondeterminism pattern recognition)
<p>A (non-deterministic) finite state automaton for "all strings that contain substring $w$" is very simple. Just make the path for $w$ and add looped transitions for all letters at ... | habedi/stack-exchange-dataset |
66,536 | Proving the undecidability of a language knowing the language of polynomials evaluating to 0 is undecidable | <p>Knowing
<strong>D={p|p is a polynomial evaluating to 0 for some assignment of integers to its variables}</strong> is not decidable, how can I prove that <strong>E={p|p is a polynomial evaluating to a prime for some assignment of integers to its variables}</strong> is not decidable?</p>

<p>Proving that... | turing machines reductions undecidability | 1 | Proving the undecidability of a language knowing the language of polynomials evaluating to 0 is undecidable -- (turing machines reductions undecidability)
<p>Knowing
<strong>D={p|p is a polynomial evaluating to 0 for some assignment of integers to its variables}</strong> is not decidable, how can I prove that <str... | habedi/stack-exchange-dataset |
66,540 | How to define an approximation algorithm when it fails? | <p>I have an NP-hard problem P where we are trying to minimize some objective function subject to some constraints. Problem P is very hard in the sense that even finding <em>a feasible solution</em> is NP-hard! (i.e., finding a solution that satisfies the constraints is NP-hard).</p>

<p>Let OPT denotes the opt... | algorithms approximation | 1 | How to define an approximation algorithm when it fails? -- (algorithms approximation)
<p>I have an NP-hard problem P where we are trying to minimize some objective function subject to some constraints. Problem P is very hard in the sense that even finding <em>a feasible solution</em> is NP-hard! (i.e., finding a soluti... | habedi/stack-exchange-dataset |
66,541 | what is the need for valid/invalid bit in paged memory technique? | <p>How is the valid/invalid bit in paged memory useful? 
I am not able to understand the significance.
Is it also somehow used to share the processes among different users.</p>
 | operating systems memory management | 1 | what is the need for valid/invalid bit in paged memory technique? -- (operating systems memory management)
<p>How is the valid/invalid bit in paged memory useful? 
I am not able to understand the significance.
Is it also somehow used to share the processes among different users.</p>
 | habedi/stack-exchange-dataset |
66,543 | Branch and bound for minimum linear arrangement | <p>I am trying to solve this branch and bound problem but I could not come up with any approximate cost function which is better than the cost.</p>

<p>Let's say $G$ is a graph of $n$ nodes $\{1, 2, 3, \ldots , n\}$. For a permutation $f$ of the nodes of $G$, the weight of each edge $(x,y)$ will be $|f(x)-f... | algorithms graphs optimization backtracking branch and bound | 1 | Branch and bound for minimum linear arrangement -- (algorithms graphs optimization backtracking branch and bound)
<p>I am trying to solve this branch and bound problem but I could not come up with any approximate cost function which is better than the cost.</p>

<p>Let's say $G$ is a graph of $n$ nodes $\{1, 2,... | habedi/stack-exchange-dataset |
66,546 | Is there an algorithm for converting a CFG in Greibach Normal Form into a CFG in strong GNF? | <p>A CFG is in strong GNF when all rewrite rules are in the following form:</p>

<p>$A \rightarrow aA_1...A_n$</p>

<p>where $n \leq 2$.</p>
 | formal languages context free formal grammars normal forms | 1 | Is there an algorithm for converting a CFG in Greibach Normal Form into a CFG in strong GNF? -- (formal languages context free formal grammars normal forms)
<p>A CFG is in strong GNF when all rewrite rules are in the following form:</p>

<p>$A \rightarrow aA_1...A_n$</p>

<p>where $n \leq 2$.</p>
 | habedi/stack-exchange-dataset |
66,555 | center star alignment induces optimal alignments on pairs with the center string? | <p>I'm trying to follow <a href="https://courses.cs.washington.edu/courses/cse527/00wi/lectures/lect06.pdf" rel="nofollow noreferrer">the center star algorithm error analysis - section 6.5.3</a>. They claim that for the center string $S_1$ the distance induced by the algorithm $d(1, j)$ is always equal the optimal alig... | approximation strings bioinformatics | 1 | center star alignment induces optimal alignments on pairs with the center string? -- (approximation strings bioinformatics)
<p>I'm trying to follow <a href="https://courses.cs.washington.edu/courses/cse527/00wi/lectures/lect06.pdf" rel="nofollow noreferrer">the center star algorithm error analysis - section 6.5.3</a>. ... | habedi/stack-exchange-dataset |
66,558 | How does literals in compiled languages differ from literals in interpreted languages? | <p>A <strong>literal</strong> is a piece of data which gets its value at compile time.</p>

<p>Means: Becomes set at compile time and afterward the value is fixed incorporated into the machine code as a code consisting out of 0s and 1s. </p>

<p><strong>What are literals in interpreted languages like fo... | compilers interpreters | 1 | How does literals in compiled languages differ from literals in interpreted languages? -- (compilers interpreters)
<p>A <strong>literal</strong> is a piece of data which gets its value at compile time.</p>

<p>Means: Becomes set at compile time and afterward the value is fixed incorporated into the machine code... | habedi/stack-exchange-dataset |
66,560 | Decide the set of all Turing machines with $L(M)=\left\{\langle M\rangle\right\}$ | <p>How can I prove that the language $L=\left\{\langle M\rangle\mid L(M)=\left\{\langle M\rangle\right\}\right\}$ is not decidable?</p>

<p>When trying to use a diagonal argument, I cannot conclude from $L(M)\ne\left\{\langle M\rangle\right\}$ that $\langle M\rangle\not\in L(M)$.</p>

<p>Also, it seems ... | turing machines reductions rice theorem | 1 | Decide the set of all Turing machines with $L(M)=\left\{\langle M\rangle\right\}$ -- (turing machines reductions rice theorem)
<p>How can I prove that the language $L=\left\{\langle M\rangle\mid L(M)=\left\{\langle M\rangle\right\}\right\}$ is not decidable?</p>

<p>When trying to use a diagonal argument, I can... | habedi/stack-exchange-dataset |
66,565 | "P may collapse" vs. Time hierarchy theorem | <p><a href="https://en.wikipedia.org/wiki/P_versus_NP_problem" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/P_versus_NP_problem</a> states:</p>

<blockquote>
 <p>If graph isomorphism is NP-complete, the polynomial time hierarchy
 collapses to its second level.</p>
</blockquote>

... | complexity theory polynomial time p vs np | 1 | "P may collapse" vs. Time hierarchy theorem -- (complexity theory polynomial time p vs np)
<p><a href="https://en.wikipedia.org/wiki/P_versus_NP_problem" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/P_versus_NP_problem</a> states:</p>

<blockquote>
 <p>If graph isomorphism is NP-complete, the po... | habedi/stack-exchange-dataset |
66,573 | Why quicksort instead of a B-tree construction? | <p>As far as I know (despite some variations which provide empirical average-case improvements) quick-sort is worst case $O(n^2)$ with the original <a href="https://en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme" rel="nofollow noreferrer">Hoare partition scheme</a> having a particularly bad behavior for already... | algorithms sorting efficiency | 1 | Why quicksort instead of a B-tree construction? -- (algorithms sorting efficiency)
<p>As far as I know (despite some variations which provide empirical average-case improvements) quick-sort is worst case $O(n^2)$ with the original <a href="https://en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme" rel="nofollow no... | habedi/stack-exchange-dataset |
66,586 | Is there an NP-complete problem, such that the decision version of its counting problem is not PP-complete? | <p>Once we fix a polynomial time deterministic verifier V(input, certificate), its corresponding NP problem is the question: For this input, does a (polynomial size) certificate exist such that V(input, certificate) returns True?</p>

<p>The associated counting problem (#P class) is: How many certificates exist... | complexity theory | 1 | Is there an NP-complete problem, such that the decision version of its counting problem is not PP-complete? -- (complexity theory)
<p>Once we fix a polynomial time deterministic verifier V(input, certificate), its corresponding NP problem is the question: For this input, does a (polynomial size) certificate exist such ... | habedi/stack-exchange-dataset |
66,587 | Is a set of TM deciding specific length of language reducible? | <p>For instance, if we know a language $L_1 = \{ \langle M \rangle \mid ~ \lvert L(M) \rvert = n \} $ is decidable, can we prove that $ L_2 = \{ \langle M \rangle \mid ~ \lvert L(M) \rvert = n-1 \}$ is also decidable? In other words, prove $L_2$ reduces to $L_1$.</p>
 | turing machines reductions | 1 | Is a set of TM deciding specific length of language reducible? -- (turing machines reductions)
<p>For instance, if we know a language $L_1 = \{ \langle M \rangle \mid ~ \lvert L(M) \rvert = n \} $ is decidable, can we prove that $ L_2 = \{ \langle M \rangle \mid ~ \lvert L(M) \rvert = n-1 \}$ is also decidable? In ot... | habedi/stack-exchange-dataset |
66,603 | Proof Complexity of a Proof or Disproof of P = NP | <p>Has there been any research on the proof complexity of a resolution to the P=NP problem? If not, given the lack of progress on the problem, would it be unreasonable to conjecture that any proof that resolves the P=NP problem will require a super-polynomial number of steps?</p>
 | complexity theory np | 1 | Proof Complexity of a Proof or Disproof of P = NP -- (complexity theory np)
<p>Has there been any research on the proof complexity of a resolution to the P=NP problem? If not, given the lack of progress on the problem, would it be unreasonable to conjecture that any proof that resolves the P=NP problem will require a ... | habedi/stack-exchange-dataset |
66,617 | Number of different binary search trees storing n distinct keys? | <p>How many different binary search trees are possible that store the values 1,2,...,n ?</p>

<p>So far I found a recursive formula for the number (by case distinction what's at the root):</p>

<p>$ T(n) = 2T(n-1) + \sum_{i=2}^{n-1}T(i-1)T(n-i), n > 1 $ and $ T(1) = 1 $</p>

<p>But I have no ... | binary trees recursion search trees | 1 | Number of different binary search trees storing n distinct keys? -- (binary trees recursion search trees)
<p>How many different binary search trees are possible that store the values 1,2,...,n ?</p>

<p>So far I found a recursive formula for the number (by case distinction what's at the root):</p>

<p>$... | habedi/stack-exchange-dataset |
66,627 | Is it decidable whether a Turing machine will ever leave the start state on any input? | <p>Is $L=\{ M | M\text{ leaves the start state on every input}\}$ decidable?</p>

<p>I have an intuition that the following language is undecidable, since the complement $L^C$ seems to not be recursively enumerable. Some TM might remain on the start state for $k$ steps, but then leave at $k+1$ steps, so we can'... | turing machines reductions undecidability | 1 | Is it decidable whether a Turing machine will ever leave the start state on any input? -- (turing machines reductions undecidability)
<p>Is $L=\{ M | M\text{ leaves the start state on every input}\}$ decidable?</p>

<p>I have an intuition that the following language is undecidable, since the complement $L^C$ se... | habedi/stack-exchange-dataset |
66,628 | Performance gain by implementing streamlined simplex | <p>I have to solve linear transportation problems for a research project. Ideally, I should design an application that will recieve the problem data as an input and then show some results. The size of the problems are in the order of N=10.000 sources and N=10.000 destinations, and 2N=20.000 restrictions of equality, on... | optimization linear programming | 1 | Performance gain by implementing streamlined simplex -- (optimization linear programming)
<p>I have to solve linear transportation problems for a research project. Ideally, I should design an application that will recieve the problem data as an input and then show some results. The size of the problems are in the order... | habedi/stack-exchange-dataset |
66,629 | Asymptotic estimate for $\sum_{k=1}^{N} {\frac{1}{k^2 H_k}}$ | <p>I am working on finding the asymptotic estimate for $$ \sum_{k=1}^{N} {\frac{1}{k^2 H_k}}.$$
All I know is that ${\frac{1}{k^2 H_k}}$ is convergent because $${\frac{1}{k^2 H_k}}<\frac{1}{k^2}$$ and $\frac{1}{k^2}$ is convergent.</p>

<p>Am I right to conclude that the asymptotic estimate for this is $... | asymptotics | 1 | Asymptotic estimate for $\sum_{k=1}^{N} {\frac{1}{k^2 H_k}}$ -- (asymptotics)
<p>I am working on finding the asymptotic estimate for $$ \sum_{k=1}^{N} {\frac{1}{k^2 H_k}}.$$
All I know is that ${\frac{1}{k^2 H_k}}$ is convergent because $${\frac{1}{k^2 H_k}}<\frac{1}{k^2}$$ and $\frac{1}{k^2}$ is convergent.</p>... | habedi/stack-exchange-dataset |
66,641 | If $A \le _m B$, then $A$ decidable $\not\Rightarrow B$ decidable | <p>I'm currently reading up a bit on Turing decidability reductions as I'll take a more in-depth course about the topic next semester. While reading up on some older course material I asked myself the following question which leaves me a bit puzzled:</p>

<p>Let $A, B$ be languages, and $\le_m$ be the <a href="... | turing machines reductions undecidability | 1 | If $A \le _m B$, then $A$ decidable $\not\Rightarrow B$ decidable -- (turing machines reductions undecidability)
<p>I'm currently reading up a bit on Turing decidability reductions as I'll take a more in-depth course about the topic next semester. While reading up on some older course material I asked myself the follow... | habedi/stack-exchange-dataset |
66,646 | Church-Rosser on an example | <p>In lambda calculus, starting from $KII$ we can get by a single $\beta$-reduction to either</p>

<p>$\lambda y.II$</p>

<p>or $KI$</p>

<p>Now, according to Church-Rosser, these should be reducing into a common normal form. But the first reduces to $I$ and the second to $\lambda y.\lambda z.z$... | lambda calculus | 1 | Church-Rosser on an example -- (lambda calculus)
<p>In lambda calculus, starting from $KII$ we can get by a single $\beta$-reduction to either</p>

<p>$\lambda y.II$</p>

<p>or $KI$</p>

<p>Now, according to Church-Rosser, these should be reducing into a common normal form. But the first reduces... | habedi/stack-exchange-dataset |
66,652 | Write the conjunctive or disjunctive normal form of an expression $f$ | <p>Write the conjunctive or disjunctive normal form of an expression $f$ that is true if the number $t=(xyz)_2$ is a zero of the following polynomial:</p>

<p>$$p(t)=(t-6)(t-5)(t-4)(t-2)t(t+1)(t+3)(t+7)$$</p>

<p>The zeros of this polynomial are $-7,-3,-1,0,2,4,5,6$. So $t$ has to be $(000)_2$ or $(010... | normal forms | 1 | Write the conjunctive or disjunctive normal form of an expression $f$ -- (normal forms)
<p>Write the conjunctive or disjunctive normal form of an expression $f$ that is true if the number $t=(xyz)_2$ is a zero of the following polynomial:</p>

<p>$$p(t)=(t-6)(t-5)(t-4)(t-2)t(t+1)(t+3)(t+7)$$</p>

<p>Th... | habedi/stack-exchange-dataset |
66,658 | Domino and Tromino Combined Tiling | <p>If I have a nx2 grid which I need to fill using 2x1 dominoes and L shaped trominoes in any combination, how many different combinations are possible?</p>

<p>I am aware that when only 2x1 dominoes are used then the cell definition using dynamic programming is:
$$
f\left [ 0 \right ]= 0
$$
$$&... | algorithms dynamic programming tiling | 1 | Domino and Tromino Combined Tiling -- (algorithms dynamic programming tiling)
<p>If I have a nx2 grid which I need to fill using 2x1 dominoes and L shaped trominoes in any combination, how many different combinations are possible?</p>

<p>I am aware that when only 2x1 dominoes are used then the cell definition ... | habedi/stack-exchange-dataset |
66,659 | Does a multi-agent system have to have a synchronous component in order for the agents to cooperate? | <p>During my programming assignments in multi-agent systems, I noticed that it feels impossible to get distributed agents to cooperate without a synchronous component. Let me explain what I mean by these terms:</p>

<p><strong>Cooperation</strong>: I would loosely define this as any process which a single agent... | distributed systems concurrency synchronization | 1 | Does a multi-agent system have to have a synchronous component in order for the agents to cooperate? -- (distributed systems concurrency synchronization)
<p>During my programming assignments in multi-agent systems, I noticed that it feels impossible to get distributed agents to cooperate without a synchronous component... | habedi/stack-exchange-dataset |
66,662 | sequence of problems that take $\Theta(n^k)$ for increasing $k$? | <p>Do we know an infinite sequence of decision problems where the most efficient algorithm for each problem takes $\Theta(n^k)$ time, where $k$ increases unboundedly?</p>

<p>Suppose for example that we would know that finding a k-clique takes $\Theta(n^k)$, then this sequence could be {1-clique, 2-clique, 3-cl... | complexity theory decision problem polynomial time | 1 | sequence of problems that take $\Theta(n^k)$ for increasing $k$? -- (complexity theory decision problem polynomial time)
<p>Do we know an infinite sequence of decision problems where the most efficient algorithm for each problem takes $\Theta(n^k)$ time, where $k$ increases unboundedly?</p>

<p>Suppose for exam... | habedi/stack-exchange-dataset |
66,675 | Proving using Beta Reductions (Lambda Calculus) | <p>I am working on proving something by using Lambda Calculus and Beta Reductions, and I was following along a tutorial on another problem and attempted to carry over the knowledge onto a different problem and I am a little confused on the last step.</p>

<p>The problem is to prove $\textbf{or true false}$.</p>... | lambda calculus | 1 | Proving using Beta Reductions (Lambda Calculus) -- (lambda calculus)
<p>I am working on proving something by using Lambda Calculus and Beta Reductions, and I was following along a tutorial on another problem and attempted to carry over the knowledge onto a different problem and I am a little confused on the last step.<... | habedi/stack-exchange-dataset |
66,684 | Running time of naive primality tester | <p>A naive approach to checking if $n$ is prime is:</p>

<pre><code>Prime(n):
 for i=2, 3, ..., sqrt(n):
 if i divides n then return "composite"
 return "prime!"
</code></pre>

<p>I remember something about how measuring the complexity of this algorithm must be done in terms... | algorithms complexity theory time complexity | 1 | Running time of naive primality tester -- (algorithms complexity theory time complexity)
<p>A naive approach to checking if $n$ is prime is:</p>

<pre><code>Prime(n):
 for i=2, 3, ..., sqrt(n):
 if i divides n then return "composite"
 return "prime!"
</code></pre>

<p>I reme... | habedi/stack-exchange-dataset |
66,686 | Is the Backus-Naur Form a type 2 grammar? If So why? | <p>I understand that the Backus-Naur Form is utilized to assess and specify type 2 grammar, but is it in itself a form of type 2 grammar? </p>
 | formal grammars discrete mathematics | 1 | Is the Backus-Naur Form a type 2 grammar? If So why? -- (formal grammars discrete mathematics)
<p>I understand that the Backus-Naur Form is utilized to assess and specify type 2 grammar, but is it in itself a form of type 2 grammar? </p>
 | habedi/stack-exchange-dataset |
66,696 | optimal lifted phylogenetic alignment - how to improve time complexity? | <p><a href="http://www.cs.tau.ac.il/~rshamir/algmb/98/scribe/html/lec05/node7.html" rel="nofollow noreferrer">optimal lifted alignment</a> - is a dynamic programming algorithm. Its input is a tree $T$ with $k$ strings assigned to its leaf nodes (their length is $n$). </p>

<p>The algorithm then assigns strings ... | algorithms time complexity trees strings bioinformatics | 1 | optimal lifted phylogenetic alignment - how to improve time complexity? -- (algorithms time complexity trees strings bioinformatics)
<p><a href="http://www.cs.tau.ac.il/~rshamir/algmb/98/scribe/html/lec05/node7.html" rel="nofollow noreferrer">optimal lifted alignment</a> - is a dynamic programming algorithm. Its input ... | habedi/stack-exchange-dataset |
66,706 | How do you know if a language accepted by a DFA is $Σ^*$? | <p>I know that a language that is input into a DFA (call it $X$) is regular just by being accepted by it, but given that it is accepted, how can one figure out that $L = Σ^*$? In other words, what does a DFA that accepts anything from $Σ^*$ even look like? When I learnt about DFAs, it was always under the context that ... | finite automata decision problem | 1 | How do you know if a language accepted by a DFA is $Σ^*$? -- (finite automata decision problem)
<p>I know that a language that is input into a DFA (call it $X$) is regular just by being accepted by it, but given that it is accepted, how can one figure out that $L = Σ^*$? In other words, what does a DFA that accepts any... | habedi/stack-exchange-dataset |
66,713 | CFG to generate $L = \{a^{2n}b^n\} \bigcup \{a^mb^{2m}\}$ | <p>I've been struggling to find the grammar to generate the language</p>

<p>$$L = \{a^{2n}b^n : n \text{ is natural}\} \cup \{a^mb^{2m} : m \text{ is natural}\}.$$</p>

<p>I've considered </p>

<p>$$S \to aS|Sb|ab,$$</p>

<p>which works in some cases, but not all (we can derive $a^{k}b$... | formal languages context free formal grammars | 1 | CFG to generate $L = \{a^{2n}b^n\} \bigcup \{a^mb^{2m}\}$ -- (formal languages context free formal grammars)
<p>I've been struggling to find the grammar to generate the language</p>

<p>$$L = \{a^{2n}b^n : n \text{ is natural}\} \cup \{a^mb^{2m} : m \text{ is natural}\}.$$</p>

<p>I've considered </p>&#... | habedi/stack-exchange-dataset |
66,716 | Are "method" and "function" synonyms? | <p>Would saying "Call the printf function" be the same as "Call the printf method"?</p>
 | terminology | 1 | Are "method" and "function" synonyms? -- (terminology)
<p>Would saying "Call the printf function" be the same as "Call the printf method"?</p>
 | habedi/stack-exchange-dataset |
66,762 | Determine the smallest $3$ numbers in a set using comparisons | <p>Given a set of $n$ distinct numbers, we would like to determine the smallest $3$ numbers in this set using comparisons. The elements can be determined using $n+O(\log n)$ comparisons.</p>

<p>This was the answer given in a multiple choice question. Now, we can easily do this using $3n\in O(n)$ comparisons. ... | algorithms complexity theory sorting | 1 | Determine the smallest $3$ numbers in a set using comparisons -- (algorithms complexity theory sorting)
<p>Given a set of $n$ distinct numbers, we would like to determine the smallest $3$ numbers in this set using comparisons. The elements can be determined using $n+O(\log n)$ comparisons.</p>

<p>This was the... | habedi/stack-exchange-dataset |
66,766 | Reduce $SAT$ to $3SAT$ | <p>I was reading <a href="https://users.fit.cvut.cz/~belohja4/MI-PAA/cv4_SAT-3SAT-and-other-red.pdf" rel="nofollow noreferrer">this</a> that details a polynomial reduction from $SAT$ to $3SAT$.</p>

<p>In case $k = 1$ or $k = 2$, why don't we just replace those clauses with $C_i' = \{{z_1, y_{i, 1}, y_{i, 2}}\}... | np complete reductions polynomial time | 1 | Reduce $SAT$ to $3SAT$ -- (np complete reductions polynomial time)
<p>I was reading <a href="https://users.fit.cvut.cz/~belohja4/MI-PAA/cv4_SAT-3SAT-and-other-red.pdf" rel="nofollow noreferrer">this</a> that details a polynomial reduction from $SAT$ to $3SAT$.</p>

<p>In case $k = 1$ or $k = 2$, why don't we ju... | habedi/stack-exchange-dataset |
66,769 | Semi-Thue system, which terminates | <p>I <a href="https://cloud.sagemath.com/projects/ac090066-c320-4a13-9dd5-cb2067ea9427/files/thu1.sagews" rel="nofollow noreferrer">observed</a> that with rewrite rules:</p>

<p>$abb \rightarrow bab $</p>

<p>$baa \rightarrow aba $</p>

<p>Every derivation ends, moreover, if there is same amount... | term rewriting | 1 | Semi-Thue system, which terminates -- (term rewriting)
<p>I <a href="https://cloud.sagemath.com/projects/ac090066-c320-4a13-9dd5-cb2067ea9427/files/thu1.sagews" rel="nofollow noreferrer">observed</a> that with rewrite rules:</p>

<p>$abb \rightarrow bab $</p>

<p>$baa \rightarrow aba $</p>

<p>E... | habedi/stack-exchange-dataset |
66,776 | Is there a name for this graph transformation (remove a 'thru' node) | <p>I have a directed graph, eg:</p>

<p>$$A\to B\to C$$</p>

<p>$A$ and $C$ may have multiple in- and out-edges, but B has exactly one in- and one out-edge.</p>

<p>I want to remove node $B$ and replace the edges $(A,B)$ and $(B,C)$ with a single edge $(A,C)$.</p>

<p>Is there a name for... | graphs | 1 | Is there a name for this graph transformation (remove a 'thru' node) -- (graphs)
<p>I have a directed graph, eg:</p>

<p>$$A\to B\to C$$</p>

<p>$A$ and $C$ may have multiple in- and out-edges, but B has exactly one in- and one out-edge.</p>

<p>I want to remove node $B$ and replace the edges $(... | habedi/stack-exchange-dataset |
66,783 | How can image processing neural networks be effectively trained? | <p>I was just thinking about image processing neural networks and how to effectively train them in regard of the available dataset.</p>

<p>Let's say you'd want to build a neural network which can distinguish between pictures showing a cat or a dog. I do not have much experience in the field, but I think it wou... | artificial intelligence neural networks | 1 | How can image processing neural networks be effectively trained? -- (artificial intelligence neural networks)
<p>I was just thinking about image processing neural networks and how to effectively train them in regard of the available dataset.</p>

<p>Let's say you'd want to build a neural network which can disti... | habedi/stack-exchange-dataset |
66,796 | Does linear programming admit a strongly polynomial-time algorithm? | <p>The linear programming problem: find a strongly-polynomial time algorithm which for given matrix A ∈ Rm×n and b ∈ Rm decides whether there exists x ∈ Rn with Ax ≥ b.</p>

<p>I know that Steve Smale's lists some of the unsolved problems in mathematics. But such a linear programming problem is it until now not... | algorithms polynomial time linear programming | 1 | Does linear programming admit a strongly polynomial-time algorithm? -- (algorithms polynomial time linear programming)
<p>The linear programming problem: find a strongly-polynomial time algorithm which for given matrix A ∈ Rm×n and b ∈ Rm decides whether there exists x ∈ Rn with Ax ≥ b.</p>

<p>I know that Stev... | habedi/stack-exchange-dataset |
66,798 | Solving or estimating the recurrence $T(n) = x + T(n-\log_2 n)$ | <p>I am trying to either solve or find a tight bound $\Theta$ for the following recurrence relation:</p>

<p>$$T(n) = x + T(n-\log_2 n)\,.$$</p>

<p>For some nonzero constant $x$ (we can suppose it to be 1, for simplicity). Thus far, I have been able to prove the following:</p>

<p>\begin{align*... | asymptotics recurrence relation | 1 | Solving or estimating the recurrence $T(n) = x + T(n-\log_2 n)$ -- (asymptotics recurrence relation)
<p>I am trying to either solve or find a tight bound $\Theta$ for the following recurrence relation:</p>

<p>$$T(n) = x + T(n-\log_2 n)\,.$$</p>

<p>For some nonzero constant $x$ (we can suppose it to be... | habedi/stack-exchange-dataset |
66,808 | Two labelled transition systems feeding each other | <p>Assume we have two LTSs, say DFA with labels over the transitions (though the question can be generalized to more sophisticated automatons), define the input to each system to be as usual just the input word, and define the output of each system to be the sequence of labels of visited transitions.</p>

<p>No... | automata | 1 | Two labelled transition systems feeding each other -- (automata)
<p>Assume we have two LTSs, say DFA with labels over the transitions (though the question can be generalized to more sophisticated automatons), define the input to each system to be as usual just the input word, and define the output of each system to be ... | habedi/stack-exchange-dataset |
66,815 | does cpu time reflect BigO time complexity | <h2>QUESTION</h2>
<p><strong>does CPU time reflect Big O time complexity?</strong></p>
<h3>WHAT I MADE</h3>
<p>I implemented two Fibonacci functions in C programming language. The former has recursive behaviour while the latter has iterative behaviour.</p>
<p>I found out that the worst case scenario for... | algorithm analysis asymptotics runtime analysis experimental analysis | 1 | does cpu time reflect BigO time complexity -- (algorithm analysis asymptotics runtime analysis experimental analysis)
<h2>QUESTION</h2>
<p><strong>does CPU time reflect Big O time complexity?</strong></p>
<h3>WHAT I MADE</h3>
<p>I implemented two Fibonacci functions in C programming language. The former has... | habedi/stack-exchange-dataset |
66,826 | Determine whether a TM visits each of its states exactly once during computation | <blockquote>
 <p>(Decidable or not?) Formulate the following problem as a language:
 Given a Turing machine $M$ and a string $w$, determine whether $M$ visits each of its states exactly once during the computation with input string $w$. Prove your answer. </p>
</blockquote>

<p>So the problem abov... | turing machines undecidability decision problem | 1 | Determine whether a TM visits each of its states exactly once during computation -- (turing machines undecidability decision problem)
<blockquote>
 <p>(Decidable or not?) Formulate the following problem as a language:
 Given a Turing machine $M$ and a string $w$, determine whether $M$ visits each of its state... | habedi/stack-exchange-dataset |
66,834 | Contingent sentences can always be true | <p>I have a question about contingent sentences. To my knowledge, contingent sentences are sentences that are neither tautologies nor contradictions.</p>

<p>In a textbook I read that a sentence might always be true and still be contingent.</p>

<p>The example given was as follows: If there never were a... | logic propositional logic logical validity | 1 | Contingent sentences can always be true -- (logic propositional logic logical validity)
<p>I have a question about contingent sentences. To my knowledge, contingent sentences are sentences that are neither tautologies nor contradictions.</p>

<p>In a textbook I read that a sentence might always be true and stil... | habedi/stack-exchange-dataset |
66,835 | Reducing "multiple satisfiability" to normal SAT | <p>I have to prove the NP-completeness of the following set:
QUADRUPLE-SAT:={F is Formula in CNF|F has at least 4 satisfying interpretations}</p>

<p>My idea so far has been to reduce the problem to the normal SAT by constructing a new formula, copying the original formula 4 times and using a new set of lit... | complexity theory logic satisfiability | 1 | Reducing "multiple satisfiability" to normal SAT -- (complexity theory logic satisfiability)
<p>I have to prove the NP-completeness of the following set:
QUADRUPLE-SAT:={F is Formula in CNF|F has at least 4 satisfying interpretations}</p>

<p>My idea so far has been to reduce the problem to the normal SAT b... | habedi/stack-exchange-dataset |
66,839 | Is Graph 2-Coloring NP-Complete? | <p>I know there is a polynomial time algorithm for 2-coloring. But should the answer be "No" or should it be "Maybe"?
Since 2-coloring is in NP and we dont know if there is a reduction of any NP-complete to 2-color.</p>
 | graphs np complete np colorings | 1 | Is Graph 2-Coloring NP-Complete? -- (graphs np complete np colorings)
<p>I know there is a polynomial time algorithm for 2-coloring. But should the answer be "No" or should it be "Maybe"?
Since 2-coloring is in NP and we dont know if there is a reduction of any NP-complete to 2-color.</p>
 | habedi/stack-exchange-dataset |
66,843 | NP-completeness of the exact distance problem | <p>I am currently learning about NP-complete problems and I want to make sure my understanding is correct.</p>

<p>Here is a problem I am working on currently:</p>

<blockquote>
 <p>The exact distance problem is, given an edge-weighted graph $G = (V,E)$, vertices $v_1,v_k$, and a distance $D$, is t... | np complete np hamiltonian path | 1 | NP-completeness of the exact distance problem -- (np complete np hamiltonian path)
<p>I am currently learning about NP-complete problems and I want to make sure my understanding is correct.</p>

<p>Here is a problem I am working on currently:</p>

<blockquote>
 <p>The exact distance problem is, giv... | habedi/stack-exchange-dataset |
66,845 | what is weak extensionality in $\lambda$-calculus? | <p>I was reading the book <a href="https://global.oup.com/academic/product/lambda-calculi-9780198538400?lang=en&cc=jp" rel="nofollow noreferrer">lambda calculi </a>, encountered an equality theory called "the rule of weak extensionality", which is shown as follows.</p>

<p>$\frac{M \, = \, N}{\lambda x.M \... | lambda calculus | 1 | what is weak extensionality in $\lambda$-calculus? -- (lambda calculus)
<p>I was reading the book <a href="https://global.oup.com/academic/product/lambda-calculi-9780198538400?lang=en&cc=jp" rel="nofollow noreferrer">lambda calculi </a>, encountered an equality theory called "the rule of weak extensionality", whic... | habedi/stack-exchange-dataset |
66,846 | Definition of integers needs explaining | <p>Zero and one are defined by the successor function.</p>

<p>$$
\begin{align*}
&0 ≡ λsz.z \\
&1 ≡ λsz.s(z)
\end{align*}
$$</p>

<p>But why? $λsz.z$ is irreducible to a value. If I call this function on some value, I get back $z$, which is merely a variable in itself. If I c... | lambda calculus | 1 | Definition of integers needs explaining -- (lambda calculus)
<p>Zero and one are defined by the successor function.</p>

<p>$$
\begin{align*}
&0 ≡ λsz.z \\
&1 ≡ λsz.s(z)
\end{align*}
$$</p>

<p>But why? $λsz.z$ is irreducible to a value. If I call this function on some value,... | habedi/stack-exchange-dataset |
66,849 | Lambda calculus didn't seem abstract. And I can't see the point of it | <p><strong>The underlying question:</strong> </p>

<p>What does <a href="https://en.wikipedia.org/wiki/Lambda_calculus">lambda calculus</a> do for us that we can't do with the basic function properties and notation generally learned in middle school algebra?</p>

<p>First of all, what does abstract mean... | lambda calculus programming paradigms | 1 | Lambda calculus didn't seem abstract. And I can't see the point of it -- (lambda calculus programming paradigms)
<p><strong>The underlying question:</strong> </p>

<p>What does <a href="https://en.wikipedia.org/wiki/Lambda_calculus">lambda calculus</a> do for us that we can't do with the basic function properti... | habedi/stack-exchange-dataset |
66,884 | Why does this grammar derive into $\beta \alpha ^*$ instead of $\alpha ^* \beta$? | <p>In <a href="https://youtu.be/3_VCoBfrt9c?t=62" rel="nofollow noreferrer">this video clip</a> the teacher presents a grammar $A \rightarrow A \alpha | \beta$ and after providing the parse tree explains that the regular expression for the language generated is represented as $\beta \alpha ^*$.</p>

<p>Why isn'... | formal languages context free formal grammars | 1 | Why does this grammar derive into $\beta \alpha ^*$ instead of $\alpha ^* \beta$? -- (formal languages context free formal grammars)
<p>In <a href="https://youtu.be/3_VCoBfrt9c?t=62" rel="nofollow noreferrer">this video clip</a> the teacher presents a grammar $A \rightarrow A \alpha | \beta$ and after providing the par... | habedi/stack-exchange-dataset |
66,890 | Random Walk on the Integer Line | <p>Suppose we are doing a random walk on the infinite integer line and that we take $2n$ total steps. At every step of this walk, the position of the walker is an integer point on this line. For the next step of this walk, the walker moves to one of the two adjacent/neighboring integer points with equal probability (as... | probability theory random walks | 1 | Random Walk on the Integer Line -- (probability theory random walks)
<p>Suppose we are doing a random walk on the infinite integer line and that we take $2n$ total steps. At every step of this walk, the position of the walker is an integer point on this line. For the next step of this walk, the walker moves to one of t... | habedi/stack-exchange-dataset |
66,894 | Determine what is the best order for running filters on a dataset | <p>I'm trying to figure out what is the optimal order for running a sequence of tasks in a pipeline.</p>

<p>Each task filters a percentage of the dataset.</p>

<p>Assuming I got the tasks <em>t1, t2, t3, ..., ti</em> and a dataset. Each task have an execution time per item in the dataset denoted as <em... | algorithms | 1 | Determine what is the best order for running filters on a dataset -- (algorithms)
<p>I'm trying to figure out what is the optimal order for running a sequence of tasks in a pipeline.</p>

<p>Each task filters a percentage of the dataset.</p>

<p>Assuming I got the tasks <em>t1, t2, t3, ..., ti</em> and ... | habedi/stack-exchange-dataset |
66,897 | Total number of bits of storage for direct mapped cache | <p>I have a homework assignment dealing with caches. We are asked to compute the total number of bits of storage required for the cache, including tags and valid bits. Then compute the overhead for the cache incurred by the tags and valid bits.</p>

<p>Info given: Consider a direct-mapped cache with 16KBytes of... | cpu cache | 1 | Total number of bits of storage for direct mapped cache -- (cpu cache)
<p>I have a homework assignment dealing with caches. We are asked to compute the total number of bits of storage required for the cache, including tags and valid bits. Then compute the overhead for the cache incurred by the tags and valid bits.</p>&... | habedi/stack-exchange-dataset |
66,906 | Associativity vs blocks per set in fixed size caches | <p>I am trying to understand the following claim:</p>

<blockquote>
 <p>For a fixed size cache, each increase by a factor of two
 in associativity doubles the number of blocks per set
 (i.e., the number or ways) and halves the number of
 sets – decreases the size of the index by 1 bit and&#x... | computer architecture cpu cache | 1 | Associativity vs blocks per set in fixed size caches -- (computer architecture cpu cache)
<p>I am trying to understand the following claim:</p>

<blockquote>
 <p>For a fixed size cache, each increase by a factor of two
 in associativity doubles the number of blocks per set
 (i.e., the number or w... | habedi/stack-exchange-dataset |
66,910 | Why can useless states in TMs not be found by traversing the state graph? | <p>Can anyone explain why can't we use a Turing machine's transition diagram? 
For e.g.
The definition of a USELESS<sub>TM</sub> is as follow:</p>

<blockquote>
 <p>A useless state in a TM is one that is never entered on any input string. </p>
 
 <blockquote>
 <p>USELESS<sub>TM</su... | computability turing machines undecidability | 1 | Why can useless states in TMs not be found by traversing the state graph? -- (computability turing machines undecidability)
<p>Can anyone explain why can't we use a Turing machine's transition diagram? 
For e.g.
The definition of a USELESS<sub>TM</sub> is as follow:</p>

<blockquote>
 <p>A useless ... | habedi/stack-exchange-dataset |
66,919 | Mathematical conjectures equivalent to the halting of a Turing machine | <p>This question is about whether every mathematical theorem can be reduced to the question of whether a single Turing machine halts. In particular, I'm interested in conjectures that are currently unproven.</p>

<p>For example: Wikipedia <a href="https://en.wikipedia.org/wiki/Perfect_number" rel="noreferrer">s... | formal languages computability mathematical foundations | 1 | Mathematical conjectures equivalent to the halting of a Turing machine -- (formal languages computability mathematical foundations)
<p>This question is about whether every mathematical theorem can be reduced to the question of whether a single Turing machine halts. In particular, I'm interested in conjectures that are ... | habedi/stack-exchange-dataset |
66,931 | Information on Tavori and Dreizin ranged hash function? | <p>While doing some digging around in the GNU implementation of the C++ standard library I came across a section in <code>bits/hashtabe.h</code> that refers to a hash function "in the terminology of Tavori and Dreizin" (see below). I have tried without success to find information on these people, in the hopes of learni... | hash | 1 | Information on Tavori and Dreizin ranged hash function? -- (hash)
<p>While doing some digging around in the GNU implementation of the C++ standard library I came across a section in <code>bits/hashtabe.h</code> that refers to a hash function "in the terminology of Tavori and Dreizin" (see below). I have tried without s... | habedi/stack-exchange-dataset |
66,936 | Upper bounding randomized k-SAT solver | <p><em>Problem</em>:</p>

<p>Consider a k-SAT solver that assigns values independently uniformly at random to all the variables. Given the formula has $m$ clauses provide an upper bound for the probability of a random assignment to be unsatisfiable. </p>

<hr>

<p>The issue is that I have no clu... | satisfiability upper bound | 1 | Upper bounding randomized k-SAT solver -- (satisfiability upper bound)
<p><em>Problem</em>:</p>

<p>Consider a k-SAT solver that assigns values independently uniformly at random to all the variables. Given the formula has $m$ clauses provide an upper bound for the probability of a random assignment to be unsati... | habedi/stack-exchange-dataset |
66,947 | Decidability of language containing strings of length equal to that of some substring of 1s in $\pi$? | <p>I read that the following language is decidable.</p>

<p>$\{w | w \in \{0, 1\}^* \text{ and } 1^{|w|} \text{ is a substring in binary expansion of } \pi \}$</p>

<p>The proof has been given by considering the two possible cases</p>

<ul>
<li><p>Suppose it is true that there exists a minim... | turing machines undecidability | 1 | Decidability of language containing strings of length equal to that of some substring of 1s in $\pi$? -- (turing machines undecidability)
<p>I read that the following language is decidable.</p>

<p>$\{w | w \in \{0, 1\}^* \text{ and } 1^{|w|} \text{ is a substring in binary expansion of } \pi \}$</p>

<... | habedi/stack-exchange-dataset |
66,951 | What are some real world examples of nearly sorted lists | <p>I found that sorting algorithms such as Insertion Sort and Djikstra's Smoothsort approach O(n) complexity when the list is nearly sorted. What are some real world scenarios where a list is nearly sorted?</p>
 | algorithms sorting | 1 | What are some real world examples of nearly sorted lists -- (algorithms sorting)
<p>I found that sorting algorithms such as Insertion Sort and Djikstra's Smoothsort approach O(n) complexity when the list is nearly sorted. What are some real world scenarios where a list is nearly sorted?</p>
 | habedi/stack-exchange-dataset |
66,954 | Equivalence rules for LTL - Getting stuck working with $ \square \lozenge $ & Until ($\textsf{ U}$ ) operators | <h2>Need to prove equivalence for (or disprove equivalence for):</h2>

<p>$
\hspace{1cm}\square ϕ → \lozenge ψ ≡ ϕ\textsf{ U }(ψ ∨ ¬ϕ) \\
$</p>

<p>My current attempt using the LTL equivalnce rules to determine equivalence:</p>

<p>$
\square ϕ → \lozenge ψ \\
≡\
¬\square ϕ \l... | logic linear temporal logic temporal logic | 1 | Equivalence rules for LTL - Getting stuck working with $ \square \lozenge $ & Until ($\textsf{ U}$ ) operators -- (logic linear temporal logic temporal logic)
<h2>Need to prove equivalence for (or disprove equivalence for):</h2>

<p>$
\hspace{1cm}\square ϕ → \lozenge ψ ≡ ϕ\textsf{ U }(ψ ∨ ¬ϕ) \\
$</p>&#... | habedi/stack-exchange-dataset |
66,959 | Data Structure with multiple indexes | <p>Apologies if a duplicate. New to this community and did try to search.</p>

<p>I want to create a mapping document that equates defect severity levels together so it looks like</p>

<pre><code>|| System 1 || System 2 || System 3 || 
| level1-1 | level1-2 | level1-3 | 
| level2-1 | level2... | data structures | 1 | Data Structure with multiple indexes -- (data structures)
<p>Apologies if a duplicate. New to this community and did try to search.</p>

<p>I want to create a mapping document that equates defect severity levels together so it looks like</p>

<pre><code>|| System 1 || System 2 || System 3 || 
| l... | habedi/stack-exchange-dataset |
66,970 | Show that the following algorithm doesn't always find the optimal matching | <p>Consider the following algorithm for the maximum matching problem:</p>

<ol>
<li>Sort all nodes by their $\deg(v)$</li>
<li>Take the node with minimal $\deg(v)$</li>
<li>Take a random edge $(u,v)$ $\in$ $E$</li>
<li>Add $(u,v)$ to $M$</li>
<li>Delete all edges of $u$ and $v$ in $E$</li>&#... | graphs matching | 1 | Show that the following algorithm doesn't always find the optimal matching -- (graphs matching)
<p>Consider the following algorithm for the maximum matching problem:</p>

<ol>
<li>Sort all nodes by their $\deg(v)$</li>
<li>Take the node with minimal $\deg(v)$</li>
<li>Take a random edge $(u,v)$ $\in... | habedi/stack-exchange-dataset |
66,980 | Implement Context-Free Grammar for $L=\{a^n b^m \mid n \neq 2m\}$ | <p>I am trying to implement a context-free grammar for $L=\{a^n b^m \mid n \neq 2m\}$.</p>

<p>I have a difficulty trying to implement it because I don't know how to ensure that $n \neq 2m$.</p>

<p>I can easily implement $n=2m$ but the other way around doesn't seem intuitive. How can I approach this pr... | context free | 1 | Implement Context-Free Grammar for $L=\{a^n b^m \mid n \neq 2m\}$ -- (context free)
<p>I am trying to implement a context-free grammar for $L=\{a^n b^m \mid n \neq 2m\}$.</p>

<p>I have a difficulty trying to implement it because I don't know how to ensure that $n \neq 2m$.</p>

<p>I can easily implemen... | habedi/stack-exchange-dataset |
66,981 | If a language is m-reducible to a regular language, does it mean that this language is also necessarily a regular language? | <p>I've been going back and forth with this for a dew days, can't quite be sure. </p>

<p>When I look at the pumping lemma method, I think a context-free language could possibly be reduced to a regular language. </p>
 | complexity theory formal languages reductions | 1 | If a language is m-reducible to a regular language, does it mean that this language is also necessarily a regular language? -- (complexity theory formal languages reductions)
<p>I've been going back and forth with this for a dew days, can't quite be sure. </p>

<p>When I look at the pumping lemma method, I thin... | habedi/stack-exchange-dataset |
67,005 | Does mutual exclusion hold in this case? | <p>I entered into a discussion with a friend on the following question, which asks if mutual exclusion holds:</p>
<p>Consider two processes:</p>
<blockquote>
<p><span class="math-container">$s_1$</span> and <span class="math-container">$s_2$</span> are two variables, set equal initially.</p>
<p>P1:</p>&... | operating systems concurrency propositional logic mutual exclusion | 1 | Does mutual exclusion hold in this case? -- (operating systems concurrency propositional logic mutual exclusion)
<p>I entered into a discussion with a friend on the following question, which asks if mutual exclusion holds:</p>
<p>Consider two processes:</p>
<blockquote>
<p><span class="math-container">$s_1$... | habedi/stack-exchange-dataset |
67,013 | Why deadlock in cigarette smokers problem | <p>"The Little Book of Semaphores" (2nd Ed. by Allen B. Downey, section 4.5.1) as well as Wiki (<a href="https://en.wikipedia.org/wiki/Cigarette_smokers_problem" rel="nofollow noreferrer">link</a>) mentioned that a trivial solution (as shown below) to the 'Cigarette smokers problem' will cause a deadlock. Somehow I cou... | concurrency deadlocks | 1 | Why deadlock in cigarette smokers problem -- (concurrency deadlocks)
<p>"The Little Book of Semaphores" (2nd Ed. by Allen B. Downey, section 4.5.1) as well as Wiki (<a href="https://en.wikipedia.org/wiki/Cigarette_smokers_problem" rel="nofollow noreferrer">link</a>) mentioned that a trivial solution (as shown below) to... | habedi/stack-exchange-dataset |
67,018 | Optimal way for the remainder | <p>I want to know if for any base the most significant digit is 1 or not.
Here is the code:</p>

<pre><code>for(int i=3;i<=a;i++)
 {
 int x = i;
 int r = a;
 while(r/x)
 {
 r = r/x;
 }
 int rem = r%x;
 if(r==1)
 {
 count++;&#x... | algorithms discrete mathematics number theory base conversion | 1 | Optimal way for the remainder -- (algorithms discrete mathematics number theory base conversion)
<p>I want to know if for any base the most significant digit is 1 or not.
Here is the code:</p>

<pre><code>for(int i=3;i<=a;i++)
 {
 int x = i;
 int r = a;
 while(r/x)
 {
... | habedi/stack-exchange-dataset |
67,022 | Could we write $(a+b)^* = (\epsilon + a + b)^+$? | <p>I have read that $L^* = L^+ - \epsilon$, but if we write $(\epsilon + a + b)^+$, is it equivalent to $(a+b)^*$?</p>
 | formal languages regular languages regular expressions | 1 | Could we write $(a+b)^* = (\epsilon + a + b)^+$? -- (formal languages regular languages regular expressions)
<p>I have read that $L^* = L^+ - \epsilon$, but if we write $(\epsilon + a + b)^+$, is it equivalent to $(a+b)^*$?</p>
 | habedi/stack-exchange-dataset |
67,044 | Determining if a digraph has any vertex-disjoint cycle cover | <blockquote>
 <p>Given a digraph, determine if the graph has any vertex-disjoint cycle cover.</p>
</blockquote>

<p>I understand that the permanent of the adjacency matrix will give me the number of cycle covers for the graph, which is 0 if there are no cycle covers. But is it possible to check the abo... | graphs adjacency matrix | 1 | Determining if a digraph has any vertex-disjoint cycle cover -- (graphs adjacency matrix)
<blockquote>
 <p>Given a digraph, determine if the graph has any vertex-disjoint cycle cover.</p>
</blockquote>

<p>I understand that the permanent of the adjacency matrix will give me the number of cycle covers f... | habedi/stack-exchange-dataset |
67,045 | Is finding arbitrary length cycles in a graph NP-Hard? | <p>My intuition says yes. I think so because if we could find arbitrary length cycles, couldn't we just look for an n length cycle and then solve <strong>HAM-CYCLE</strong>? But I saw a <a href="https://mathoverflow.net/questions/16393/finding-a-cycle-of-fixed-length">post</a> that seems to suggest a polynomial time me... | graphs np | 1 | Is finding arbitrary length cycles in a graph NP-Hard? -- (graphs np)
<p>My intuition says yes. I think so because if we could find arbitrary length cycles, couldn't we just look for an n length cycle and then solve <strong>HAM-CYCLE</strong>? But I saw a <a href="https://mathoverflow.net/questions/16393/finding-a-cycl... | habedi/stack-exchange-dataset |
67,062 | How to model a set of categorical values in the input of a neural network | <p>One of the inputs to my neural network is a set. I have a set $S = \{s_0, s_1, ..., s_n\}$ in which all values $s_i$ are constant. An example of such a set could be the set of French wines (Beaujolais, Languedoc-Rousillon, Champagne) or the set of players in a sports event (Player A, Player B, ...). The input to th... | artificial intelligence neural networks neural computing | 1 | How to model a set of categorical values in the input of a neural network -- (artificial intelligence neural networks neural computing)
<p>One of the inputs to my neural network is a set. I have a set $S = \{s_0, s_1, ..., s_n\}$ in which all values $s_i$ are constant. An example of such a set could be the set of Fren... | habedi/stack-exchange-dataset |
67,063 | Mean and median distance in unweighted graph | <p>I have a very large graph of ~7 million vertices and ~100 million edges. One dfs run in my current implementation runs in 30 seconds. The graph is an unweighted directed strongly connected graph.</p>

<p>I need to find the mean and median distances of the graph (median and mean distances over all shortest-... | algorithms graphs shortest path | 1 | Mean and median distance in unweighted graph -- (algorithms graphs shortest path)
<p>I have a very large graph of ~7 million vertices and ~100 million edges. One dfs run in my current implementation runs in 30 seconds. The graph is an unweighted directed strongly connected graph.</p>

<p>I need to find the me... | habedi/stack-exchange-dataset |
67,066 | reduction from MAX-CUT to MAX-3-CUT | <p>MAX-3-CUT gets a graph and a number $k$, and determines whether three sets of vertices can be found within that graph, where at least $k$ edges are in the cut.
We define the cut as all edges $(u,v)$ where $u$ and $v$ are in a different set.</p>

<p><a href="https://en.wikipedia.org/wiki/Maximum_cut" rel=... | complexity theory time complexity np complete reductions | 1 | reduction from MAX-CUT to MAX-3-CUT -- (complexity theory time complexity np complete reductions)
<p>MAX-3-CUT gets a graph and a number $k$, and determines whether three sets of vertices can be found within that graph, where at least $k$ edges are in the cut.
We define the cut as all edges $(u,v)$ where $u$ and $v... | habedi/stack-exchange-dataset |
67,070 | Deadlock not possible? | <blockquote>
<p>System is in safe state if there exists a safe sequence of all processes.</p>
<p>Sequence <span class="math-container">$[P_1, P_2 …P_n]$</span> is safe, if for each <span class="math-container">$P_i$</span> the resources that can still request can be satisfied by <span class="math-container">$P... | concurrency deadlocks | 1 | Deadlock not possible? -- (concurrency deadlocks)
<blockquote>
<p>System is in safe state if there exists a safe sequence of all processes.</p>
<p>Sequence <span class="math-container">$[P_1, P_2 …P_n]$</span> is safe, if for each <span class="math-container">$P_i$</span> the resources that can still request c... | habedi/stack-exchange-dataset |
67,073 | Meaning of $\triangleright$ in programming language semantics | <p>What does the symbol "$\triangleright$" mean programming language semantics? I've seen it in the context of datatypes in and the evaluation of expressions in environments.</p>

<p>For example :</p>

<p>$$tenv \triangleright erht \implies tval $$</p>

<p>or</p>

<p>$$tenv[tval/x]\tria... | terminology logic semantics | 1 | Meaning of $\triangleright$ in programming language semantics -- (terminology logic semantics)
<p>What does the symbol "$\triangleright$" mean programming language semantics? I've seen it in the context of datatypes in and the evaluation of expressions in environments.</p>

<p>For example :</p>

<p>$$t... | habedi/stack-exchange-dataset |
67,080 | Reasoning on Efficiency (2) | <p>Two algorithms to solve a particular problem can have theur efficiency compared using the $O$ and $o$ notation. However, this is very crude method, and tells us no information on how more effective one is than the other.</p>

<p>Is there a yard stick that can be applied to <em>ALL</em> algorithms, with <em>A... | algorithms algorithm analysis time complexity asymptotics | 1 | Reasoning on Efficiency (2) -- (algorithms algorithm analysis time complexity asymptotics)
<p>Two algorithms to solve a particular problem can have theur efficiency compared using the $O$ and $o$ notation. However, this is very crude method, and tells us no information on how more effective one is than the other.</p>&#... | habedi/stack-exchange-dataset |
67,082 | Does the order in which qubits are measured matter in quantum computing? | <p>I’ll define my question more specifically:</p>

<p>Lets suppose we have an $n$ bit quantum computer, with qubits labelled $q_{1},…,q_{n}$, and let $b$ be any bit string of length $n$ (let’s assume we’ve labelled each qubits’ states $0$ and $1$ so that we obtain an $n$ bit bit string when we measure the qubit... | quantum computing | 1 | Does the order in which qubits are measured matter in quantum computing? -- (quantum computing)
<p>I’ll define my question more specifically:</p>

<p>Lets suppose we have an $n$ bit quantum computer, with qubits labelled $q_{1},…,q_{n}$, and let $b$ be any bit string of length $n$ (let’s assume we’ve labelled e... | habedi/stack-exchange-dataset |
67,087 | How best to statistically verify random numbers? | <p>Lets say I have 1000 bytes that are supposedly random. I want to verify to a certain certainty that they are indeed random and evenly distributed across all byte values. Aside from calculating the standard deviation and mean value, what are my options for a robust verification process?</p>
 | randomness statistics entropy | 1 | How best to statistically verify random numbers? -- (randomness statistics entropy)
<p>Lets say I have 1000 bytes that are supposedly random. I want to verify to a certain certainty that they are indeed random and evenly distributed across all byte values. Aside from calculating the standard deviation and mean value, w... | habedi/stack-exchange-dataset |
67,095 | Min-max the component-wise sum of two sets | <p>When I was trying to prove a problem at hand to be NP-complete, I coined the following problem:</p>

<blockquote>
 <p>Given two integer sets $A = \{ a_1, \cdots, a_n \}$ and $B = \{ b_1, \cdots, b_n \}$.
 We know that there are $n!$ bijections between $A$ and $B$. 
 For a bijection $f\colon A ... | algorithms algorithm analysis optimization | 1 | Min-max the component-wise sum of two sets -- (algorithms algorithm analysis optimization)
<p>When I was trying to prove a problem at hand to be NP-complete, I coined the following problem:</p>

<blockquote>
 <p>Given two integer sets $A = \{ a_1, \cdots, a_n \}$ and $B = \{ b_1, \cdots, b_n \}$.
 We ... | habedi/stack-exchange-dataset |
67,120 | Constructing a Pixel Image from Rectangles and Row or Column Rotations | <p>The most recent challenge on <a href="http://adventofcode.com/2016/day/8" rel="nofollow noreferrer">Advent of Code</a> involves constructing an image in a binary pixel array from a sequence of instructions:</p>

<ol>
<li><strong>rect AxB</strong>, which sets all of the pixels in a rectangle A pixels wide... | algorithms graphics | 1 | Constructing a Pixel Image from Rectangles and Row or Column Rotations -- (algorithms graphics)
<p>The most recent challenge on <a href="http://adventofcode.com/2016/day/8" rel="nofollow noreferrer">Advent of Code</a> involves constructing an image in a binary pixel array from a sequence of instructions:</p>

<... | habedi/stack-exchange-dataset |
67,124 | Using analog values with Algebraic Normal Form? | <p>Algebraic normal form (ANF) is a way of describing digital circuits made up of AND and XOR gates.</p>

<p>The below is an example of an ANF expression which evaluates to true if two or more of it's three inputs are true ($\oplus$ being XOR, implicit multiplication being AND)</p>

<p>$x_0x_1 \oplus x_... | computation models digital circuits | 1 | Using analog values with Algebraic Normal Form? -- (computation models digital circuits)
<p>Algebraic normal form (ANF) is a way of describing digital circuits made up of AND and XOR gates.</p>

<p>The below is an example of an ANF expression which evaluates to true if two or more of it's three inputs are true ... | habedi/stack-exchange-dataset |
67,125 | In a DAG, does there exist a sink for all vertices in the DAG? | <p>The following statement is considered true: </p>

<blockquote>
 <p>In a DAG, for every vertex $v$, there exists a sink $s$ such that
 there is a path from $v$ to $s$.</p>
</blockquote>

<p>However, my counter example to this is a binary search tree. The leaf nodes in a binary tree do no... | graphs | 1 | In a DAG, does there exist a sink for all vertices in the DAG? -- (graphs)
<p>The following statement is considered true: </p>

<blockquote>
 <p>In a DAG, for every vertex $v$, there exists a sink $s$ such that
 there is a path from $v$ to $s$.</p>
</blockquote>

<p>However, my counter exa... | habedi/stack-exchange-dataset |
67,133 | How are similar bits separated? | <p>A 1 is an "on" signal, and a 0 is an "off" signal. How does a computer know 01110 is different from 010? Does the computer wait between signals?</p>
 | arithmetic signal processing | 1 | How are similar bits separated? -- (arithmetic signal processing)
<p>A 1 is an "on" signal, and a 0 is an "off" signal. How does a computer know 01110 is different from 010? Does the computer wait between signals?</p>
 | habedi/stack-exchange-dataset |
67,135 | What is a "contradiction" in constructive logic? | <p>In <em>Practical Foundations for Programming Languages</em>, Robert Harper says</p>

<blockquote>
 <p>If for a proposition to be true means to have a proof of it, what does it mean for a proposition to be false? It means that we have a <em>refutation</em> of it, showing that it cannot be proved. That is... | logic | 1 | What is a "contradiction" in constructive logic? -- (logic)
<p>In <em>Practical Foundations for Programming Languages</em>, Robert Harper says</p>

<blockquote>
 <p>If for a proposition to be true means to have a proof of it, what does it mean for a proposition to be false? It means that we have a <em>refu... | habedi/stack-exchange-dataset |
67,138 | Less used data (1 byte) in memory address holding 4 bytes | <p>I need to store two distinct variables of 1 byte size in memory. </p>

<p>My memory system stores 4 bytes at one address; therefore, you cannot address byte 3 directly, and you have to logically access it after all 4 bytes are fetched of that address (correct me if I'm wrong please).</p>

<p>So, if I... | memory hardware memory allocation | 1 | Less used data (1 byte) in memory address holding 4 bytes -- (memory hardware memory allocation)
<p>I need to store two distinct variables of 1 byte size in memory. </p>

<p>My memory system stores 4 bytes at one address; therefore, you cannot address byte 3 directly, and you have to logically access it after a... | habedi/stack-exchange-dataset |
67,141 | byte addressing memory and 32 bit bus | <p>Say I have total 4 bytes on 1 byte addressable memory, with a 32 bit bus.</p>

<p>If I move value at 0'th address to one of the registers will system grab all 32 bits (all 4 bytes) through bus from memory, reprocess it to extract 0'th address value behind the scenes? </p>

<p>Or will it get exactly o... | memory management memory access | 1 | byte addressing memory and 32 bit bus -- (memory management memory access)
<p>Say I have total 4 bytes on 1 byte addressable memory, with a 32 bit bus.</p>

<p>If I move value at 0'th address to one of the registers will system grab all 32 bits (all 4 bytes) through bus from memory, reprocess it to extract 0'th... | habedi/stack-exchange-dataset |
67,142 | Which is the best data structure for searching under these conditions | <p>I have a system with some factors, say A, B, C, and D.
There can be different values of all these factors.
Let us consider few values to have a better understanding.</p>

<p>Let's say A has 4 different values, A<sub>1</sub>, A<sub>2</sub>, A<sub>3</sub>, A<sub>4</sub>.
B may have 3 or 5(anything,... | algorithms data structures java | 1 | Which is the best data structure for searching under these conditions -- (algorithms data structures java)
<p>I have a system with some factors, say A, B, C, and D.
There can be different values of all these factors.
Let us consider few values to have a better understanding.</p>

<p>Let's say A has 4 di... | habedi/stack-exchange-dataset |
67,153 | Infinite regular language | <p>Let $M$ be a DFA.</p>

<p>I would like to prove that $L(M)$ is infinite if and only if there exists a string $w \in L$ such that $|Q| \leq |w| \leq 2 \cdot |Q| $.</p>

<p>My idea was to use the fact that the shortest string in $L(M)$ is of size at most $|Q|$, but I am not sure precisely how I should ... | regular languages finite automata | 1 | Infinite regular language -- (regular languages finite automata)
<p>Let $M$ be a DFA.</p>

<p>I would like to prove that $L(M)$ is infinite if and only if there exists a string $w \in L$ such that $|Q| \leq |w| \leq 2 \cdot |Q| $.</p>

<p>My idea was to use the fact that the shortest string in $L(M)$ is... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.