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 |
|---|---|---|---|---|---|---|
40,222 | Given the "programs as proofs" isomorphism, how do we know that the program isn't lying? | <p>I've been studying <a href="http://en.wikipedia.org/wiki/Intuitionistic_type_theory" rel="noreferrer">constructive type theory</a> (CTT) and one of the things that I'm not clear on is the proof part: Proving the correctness of a program in a form of a proof that's nothing but the program itself (<a href="http://en.... | type theory correctness proof intuition proof assistants curry howard | 1 | Given the "programs as proofs" isomorphism, how do we know that the program isn't lying? -- (type theory correctness proof intuition proof assistants curry howard)
<p>I've been studying <a href="http://en.wikipedia.org/wiki/Intuitionistic_type_theory" rel="noreferrer">constructive type theory</a> (CTT) and one of the t... | habedi/stack-exchange-dataset |
40,231 | How can I quickly guess if L is context-free or det. context-free? | <p>I have a language, for example </p>

<ul>
<li>$\{a^m b^n c^n \mid m, n \in \mathbb{N}, m = 2n\}$ </li>
<li>$\{a^l b^m \mid l, m \in \mathbb{N}, l=4^m\}$</li>
</ul>

<p>How can I see <strong>at a glance</strong> whether the language is deterministic context-free, context-free or not contex... | formal languages context free nondeterminism | 1 | How can I quickly guess if L is context-free or det. context-free? -- (formal languages context free nondeterminism)
<p>I have a language, for example </p>

<ul>
<li>$\{a^m b^n c^n \mid m, n \in \mathbb{N}, m = 2n\}$ </li>
<li>$\{a^l b^m \mid l, m \in \mathbb{N}, l=4^m\}$</li>
</ul>

<p>How ... | habedi/stack-exchange-dataset |
40,232 | What does the language {a, b, c}* exactly mean? How will the automaton for this look like? | <p>What does the language {a, b, c}* exactly mean?</p>
 | formal languages automata formal grammars | 1 | What does the language {a, b, c}* exactly mean? How will the automaton for this look like? -- (formal languages automata formal grammars)
<p>What does the language {a, b, c}* exactly mean?</p>
 | habedi/stack-exchange-dataset |
40,233 | Is the Wall-Follower Algorithm in P? | <p>Is the <a href="http://en.wikipedia.org/wiki/Maze_solving_algorithm" rel="nofollow">wall-follower</a> algorithm a poly-time algorithm (for Perfect Mazes)?</p>

<p>In particular, are there poly time algorithms for solving the Perfect Maze problems?</p>

<p>A perfect maze has the following properties:<... | algorithm analysis runtime analysis | 1 | Is the Wall-Follower Algorithm in P? -- (algorithm analysis runtime analysis)
<p>Is the <a href="http://en.wikipedia.org/wiki/Maze_solving_algorithm" rel="nofollow">wall-follower</a> algorithm a poly-time algorithm (for Perfect Mazes)?</p>

<p>In particular, are there poly time algorithms for solving the Perfec... | habedi/stack-exchange-dataset |
40,234 | Reccurence of recursive function with unequal sizes of subproblems | <p>Given pseudocode:</p>

<pre><code>X is an array

function FUN(X)
 l = length(X)
 if l <= 1 then
 PRINT("Hello")
 return
 end if
 p = l / 3
 FUN(X[1...p])
 FUN(X[(l-p+1)...l])
end function
</code></pre>

<p>I now want t... | runtime analysis recursion master theorem | 1 | Reccurence of recursive function with unequal sizes of subproblems -- (runtime analysis recursion master theorem)
<p>Given pseudocode:</p>

<pre><code>X is an array

function FUN(X)
 l = length(X)
 if l <= 1 then
 PRINT("Hello")
 return
 end if
 p = l... | habedi/stack-exchange-dataset |
40,236 | How can I build a DFA for ${a^m b a^n | m+n \equiv 1 mod 3}$? | <p>I have a language $\{a^m b a^n | m+n \equiv 1 mod 3\}$</p>

<ul>
<li>$m+n$ can be 1, 4, 7, 10, 13, 16, 19, 22, ...</li>
<li>$m+n$ is the number of all $a$'s in the word</li>
</ul>

<p>How can I build a DFA for this language? </p>
 | formal languages finite automata | 1 | How can I build a DFA for ${a^m b a^n | m+n \equiv 1 mod 3}$? -- (formal languages finite automata)
<p>I have a language $\{a^m b a^n | m+n \equiv 1 mod 3\}$</p>

<ul>
<li>$m+n$ can be 1, 4, 7, 10, 13, 16, 19, 22, ...</li>
<li>$m+n$ is the number of all $a$'s in the word</li>
</ul>

<p>How... | habedi/stack-exchange-dataset |
40,239 | Compression of Random Data is Impossible? | <p>A few days ago this appeared on HN <a href="http://www.patrickcraig.co.uk/other/compression.htm" rel="noreferrer">http://www.patrickcraig.co.uk/other/compression.htm</a>. This refers to a challenge from 2001 - where someone was offering a prize of \$5000 for any kind of reduction to the size of randomly generated da... | information theory data compression entropy | 1 | Compression of Random Data is Impossible? -- (information theory data compression entropy)
<p>A few days ago this appeared on HN <a href="http://www.patrickcraig.co.uk/other/compression.htm" rel="noreferrer">http://www.patrickcraig.co.uk/other/compression.htm</a>. This refers to a challenge from 2001 - where someone wa... | habedi/stack-exchange-dataset |
40,276 | Are there any open source SAT solvers with UNSAT core extraction algorithm built in? | <p>Just like the title says. I need to use a SAT solver on a series of CNF formulas but not only do I need an answer of the type satisfiable/unsatisfiable but also some subset of clauses whose conjunction is still unsatisfiable (the unsatisfiability core). </p>

<p>I have read somewhere that it is possible to h... | reference request satisfiability sat solvers | 1 | Are there any open source SAT solvers with UNSAT core extraction algorithm built in? -- (reference request satisfiability sat solvers)
<p>Just like the title says. I need to use a SAT solver on a series of CNF formulas but not only do I need an answer of the type satisfiable/unsatisfiable but also some subset of clause... | habedi/stack-exchange-dataset |
40,283 | Why can't we solve the Halting Problem by using Artificial Intelligence? | <p>Yesterday I was reading about Computability and they mention the Halting Problem. It got stuck in mind all day until I remember that some weeks ago, when learning Java, the IDE (Netbeans) show me a warning saying that my code was going to result in an infinite loop. 
<img src="https://i.stack.imgur.com/2Ff70.png... | computability artificial intelligence halting problem | 1 | Why can't we solve the Halting Problem by using Artificial Intelligence? -- (computability artificial intelligence halting problem)
<p>Yesterday I was reading about Computability and they mention the Halting Problem. It got stuck in mind all day until I remember that some weeks ago, when learning Java, the IDE (Netbean... | habedi/stack-exchange-dataset |
40,290 | When is the big-O relation preserved under exponentiation? | <p>Suppose that $f, g$ are functions from the positive integers to the positive reals. Under what circumstances will $\log f(n)=O(\log g(n))$ imply $f(n)=O(g(n))$?</p>

<hr>

<p>It's easy to see that this isn't always true: If $f(n)=3^n$ and $g(n)=2^n$ then we know that $3^n\notin O(2^n)$, but taking lo... | asymptotics landau notation | 1 | When is the big-O relation preserved under exponentiation? -- (asymptotics landau notation)
<p>Suppose that $f, g$ are functions from the positive integers to the positive reals. Under what circumstances will $\log f(n)=O(\log g(n))$ imply $f(n)=O(g(n))$?</p>

<hr>

<p>It's easy to see that this isn't a... | habedi/stack-exchange-dataset |
40,296 | How many permutations in a trainset? | <p>If I have the following pieces to a train set:</p>

<ul>
<li>(12) Curve</li>
<li>(4) Straight</li>
</ul>

<p>Such as this <a href="http://www.ikea.com/ca/en/catalog/products/30064359/" rel="nofollow noreferrer">train set.</a></p>

<p>I'm looking for an algorithm (to which I can wr... | combinatorics permutations | 1 | How many permutations in a trainset? -- (combinatorics permutations)
<p>If I have the following pieces to a train set:</p>

<ul>
<li>(12) Curve</li>
<li>(4) Straight</li>
</ul>

<p>Such as this <a href="http://www.ikea.com/ca/en/catalog/products/30064359/" rel="nofollow noreferrer">train set... | habedi/stack-exchange-dataset |
40,297 | Prove that regular expression is unambiguous | <p>I've got following definition:</p>

<p>Function $f$ is a <em>valid mapping</em> of word $w$ to regular expression $R$, if any of following conditions is true:</p>

<ol>
<li>$R = w$ and $f$ is the identity or $R = \epsilon$ and $w = \epsilon$;</li>
<li>$R = R_1 + R_2$ and $f$ is a valid mappin... | formal languages proof techniques regular expressions ambiguity | 1 | Prove that regular expression is unambiguous -- (formal languages proof techniques regular expressions ambiguity)
<p>I've got following definition:</p>

<p>Function $f$ is a <em>valid mapping</em> of word $w$ to regular expression $R$, if any of following conditions is true:</p>

<ol>
<li>$R = w$ an... | habedi/stack-exchange-dataset |
40,303 | Are device drivers state machines? | <p>I know that device drivers are attached to device controllers, which have their own registers and some local buffer storage. I'm wondering if I can think of device drivers as little state machines -- i.e. do they read and write to memory, or not?</p>
 | finite automata operating systems computation models applied theory | 1 | Are device drivers state machines? -- (finite automata operating systems computation models applied theory)
<p>I know that device drivers are attached to device controllers, which have their own registers and some local buffer storage. I'm wondering if I can think of device drivers as little state machines -- i.e. do t... | habedi/stack-exchange-dataset |
40,311 | How to create an LR($k$) grammar for a given language? | <p>How can I construct an LR($k$) grammar (which $k$ is not really of interest for now) for a given language, say:</p>

<p>$$L=\left\{w \in \{a, b\}^\star \ | \ \exists u \in \{a, b\}, v \in \{a, b\}^\star: w = vu \wedge |w|_u \operatorname{mod} 2 = 0\right\}$$</p>

<p>($|w|_u$ denotes the number of $u$... | formal grammars parsers lr k | 1 | How to create an LR($k$) grammar for a given language? -- (formal grammars parsers lr k)
<p>How can I construct an LR($k$) grammar (which $k$ is not really of interest for now) for a given language, say:</p>

<p>$$L=\left\{w \in \{a, b\}^\star \ | \ \exists u \in \{a, b\}, v \in \{a, b\}^\star: w = vu \wedge |w... | habedi/stack-exchange-dataset |
40,326 | Is radix sort really O(n) for sorting 32 bit integers? | <p>I was trying to analyze radix sort in terms of time and space. Assume that we are given $n$ 32-bit integers which we would want to sort by looking at the least significant digits first.</p>

<p>$k$ is the total amount of bits that you will be working with at every step. So at first you look at the first $k$ ... | algorithms algorithm analysis radix sort | 1 | Is radix sort really O(n) for sorting 32 bit integers? -- (algorithms algorithm analysis radix sort)
<p>I was trying to analyze radix sort in terms of time and space. Assume that we are given $n$ 32-bit integers which we would want to sort by looking at the least significant digits first.</p>

<p>$k$ is the tot... | habedi/stack-exchange-dataset |
40,337 | Lower bound the difference between distinct values of a function over a discrete domain? | <p>I have a function $f: X \to \mathbb{R}$ where the domain $X$ is a (small) discrete set, such as $X = \mathbb{Z}^d \cap [-10,10]^d$ (i.e., the set of $d$-dimensional integer vectors all of whose coordinates are in the range $-10..10$, inclusive).</p>

<p>I'm interested in computing a non-trivial lower bound o... | algorithms optimization discrete mathematics finite sets | 1 | Lower bound the difference between distinct values of a function over a discrete domain? -- (algorithms optimization discrete mathematics finite sets)
<p>I have a function $f: X \to \mathbb{R}$ where the domain $X$ is a (small) discrete set, such as $X = \mathbb{Z}^d \cap [-10,10]^d$ (i.e., the set of $d$-dimensional i... | habedi/stack-exchange-dataset |
40,338 | What data size is sent to and read from physical RAM? | <p>When you have a cache mis, you need to fetch a block from RAM. If said block is 64 bytes big, do you need to have buses that are 512 bits (= 64 bytes) wide to transfer data from the RAM to the cache? And when writing to RAM do you write to the whole 64 byte block?</p>
 | computer architecture | 1 | What data size is sent to and read from physical RAM? -- (computer architecture)
<p>When you have a cache mis, you need to fetch a block from RAM. If said block is 64 bytes big, do you need to have buses that are 512 bits (= 64 bytes) wide to transfer data from the RAM to the cache? And when writing to RAM do you write... | habedi/stack-exchange-dataset |
40,355 | Checking whether all integers appear exactly once | <p>Let $\texttt{a[]}$ be a finite array. We want to check whether every number between $\texttt {min(a[])}$ and $\texttt {max(a[])}$ appears exactly once. </p>

<p>An obvious solution is sorting the array in time $O(n\log(n))$ and go through the sorted array in linear time and check that $\texttt{a[k+1] == a[k]... | algorithm analysis | 1 | Checking whether all integers appear exactly once -- (algorithm analysis)
<p>Let $\texttt{a[]}$ be a finite array. We want to check whether every number between $\texttt {min(a[])}$ and $\texttt {max(a[])}$ appears exactly once. </p>

<p>An obvious solution is sorting the array in time $O(n\log(n))$ and go thro... | habedi/stack-exchange-dataset |
40,361 | Construction of fair teams | <p>let's say we have a set of players that we want to match into teams of aproximatly same strength, so that no team is much stronger than another team.</p>

<p>Each team consists of two players. One player is taking a defense position, another player is taking an offense position. The teams can decide for them... | algorithms optimization | 1 | Construction of fair teams -- (algorithms optimization)
<p>let's say we have a set of players that we want to match into teams of aproximatly same strength, so that no team is much stronger than another team.</p>

<p>Each team consists of two players. One player is taking a defense position, another player is t... | habedi/stack-exchange-dataset |
40,364 | I can not see why MSD radix sort is theoretically as efficient as LSD radix sort | <p>Here is the pseudocode for LSD radix sort from <a href="http://www.cs.princeton.edu/~rs/AlgsDS07/18RadixSort.pdf" rel="nofollow noreferrer">http://www.cs.princeton.edu/~rs/AlgsDS07/18RadixSort.pdf</a></p>

<pre><code> public static void lsd(String[] a)
 {
 int N = a.length;
 int... | algorithms algorithm analysis sorting performance radix sort | 1 | I can not see why MSD radix sort is theoretically as efficient as LSD radix sort -- (algorithms algorithm analysis sorting performance radix sort)
<p>Here is the pseudocode for LSD radix sort from <a href="http://www.cs.princeton.edu/~rs/AlgsDS07/18RadixSort.pdf" rel="nofollow noreferrer">http://www.cs.princeton.edu/~r... | habedi/stack-exchange-dataset |
40,366 | Why is linear programming in P but integer programming NP-hard? | <p>Linear programming (LP) is in P and integer programming (IP) is NP-hard. But since computers can only manipulate numbers with finite precision, in practice a computer is using integers for linear programming. Because of this, shouldn't LP and IP be in the same complexity class? </p>
 | complexity theory polynomial time | 1 | Why is linear programming in P but integer programming NP-hard? -- (complexity theory polynomial time)
<p>Linear programming (LP) is in P and integer programming (IP) is NP-hard. But since computers can only manipulate numbers with finite precision, in practice a computer is using integers for linear programming. Becau... | habedi/stack-exchange-dataset |
40,369 | Analysis of very simple algorithm | <p>I need to find the time complexity of the following simple algorithm.</p>
<blockquote>
<p>Calculate the time complexity of the following algorithm:</p>
<pre><code>void f(int n) {
 int i, x;

 for (i = 1; i <= n; i++)
 if (i % 2 == 1)
 x++
}
</code></pre>
</blo... | algorithm analysis time complexity | 1 | Analysis of very simple algorithm -- (algorithm analysis time complexity)
<p>I need to find the time complexity of the following simple algorithm.</p>
<blockquote>
<p>Calculate the time complexity of the following algorithm:</p>
<pre><code>void f(int n) {
 int i, x;

 for (i = 1; i <= n; i+... | habedi/stack-exchange-dataset |
40,390 | The relation between 2SAT and 3SAT | <blockquote>
 <p>Show that proving 2SAT is <strong>not</strong> NP-Complete would prove that 3SAT is
 <strong>not</strong> in P.</p>
</blockquote>

<p>Or eqivalently - </p>

<blockquote>
 <p>Show that proving 3SAT is in P would prove that 2SAT is NP-Complete.</p>
</blockquote>
... | np complete reductions satisfiability 3 sat | 1 | The relation between 2SAT and 3SAT -- (np complete reductions satisfiability 3 sat)
<blockquote>
 <p>Show that proving 2SAT is <strong>not</strong> NP-Complete would prove that 3SAT is
 <strong>not</strong> in P.</p>
</blockquote>

<p>Or eqivalently - </p>

<blockquote>
 <p>Show that ... | habedi/stack-exchange-dataset |
40,400 | What determines the "speed" of a programming language? | <p>Suppose a program was written in two distinct languages, let them be language X and language Y, if their compilers generate the same byte code, why I should use language X instead of the language Y? What defines that one language is faster than other?</p>

<p>I ask this because often you see people say thing... | programming languages compilers | 1 | What determines the "speed" of a programming language? -- (programming languages compilers)
<p>Suppose a program was written in two distinct languages, let them be language X and language Y, if their compilers generate the same byte code, why I should use language X instead of the language Y? What defines that one lang... | habedi/stack-exchange-dataset |
40,417 | How can TSP be an NP-optimization problem, when a feasible solution $s$ must be polynomial bounded in the instance size $|I|$? | <p>How can TSP be an NP-optimization problem ?</p>

<p>The definition of an NP-optimization problem $\Pi$ states that for each instance $I \in \Pi$ , the set of feasible solutions $S_\Pi(I)$ is non-empty and that the size of each $s \in S_\Pi(I)$ is polynomial bounded in $|I|$, where $|I|$ denote the size of $I... | complexity theory optimization np traveling salesman | 1 | How can TSP be an NP-optimization problem, when a feasible solution $s$ must be polynomial bounded in the instance size $|I|$? -- (complexity theory optimization np traveling salesman)
<p>How can TSP be an NP-optimization problem ?</p>

<p>The definition of an NP-optimization problem $\Pi$ states that for each ... | habedi/stack-exchange-dataset |
40,424 | Efficient (sublinear) approximation algorithms for matrix-vector multiplication? | <p>Given a matrix $A \in \mathbb{R}^{n \times p}$ and a vector $x \in \mathbb{R}^p$, I am interested in computing the value of the <em>mean</em> matrix-vector product:</p>

<p>$$v = \frac{1}{n} Ax$$</p>

<p>If I did this using standard matrix-vector multiplication, then it would take $O(np)$ operations.... | algorithms matrices multiplication numerical algorithms | 1 | Efficient (sublinear) approximation algorithms for matrix-vector multiplication? -- (algorithms matrices multiplication numerical algorithms)
<p>Given a matrix $A \in \mathbb{R}^{n \times p}$ and a vector $x \in \mathbb{R}^p$, I am interested in computing the value of the <em>mean</em> matrix-vector product:</p>
&#... | habedi/stack-exchange-dataset |
40,429 | Why can't fibers utilize multiple processors? | <p>It seems that the distinction between fibers and threads is that fibers are cooperatively scheduled, whereas threads are preemptively scheduled. The point of the scheduler seems like a way to make an otherwise serial processor resource act in a parallel way, by "time-sharing" the CPU. However, on a dual-core proce... | parallel computing threads multi tasking | 1 | Why can't fibers utilize multiple processors? -- (parallel computing threads multi tasking)
<p>It seems that the distinction between fibers and threads is that fibers are cooperatively scheduled, whereas threads are preemptively scheduled. The point of the scheduler seems like a way to make an otherwise serial process... | habedi/stack-exchange-dataset |
40,430 | Can sampling remove the limitations in greedy algorithm? | <p>Given the limitations of greedy (i.e., not always finding the optimal solution), does sampling the data space in a randomized manner or some structured manner reduce or remove the limitations of greedy algorithm?</p>

<p>I understand the answer to this is problem-specific, but given a problem that shows the ... | algorithms greedy algorithms sampling | 1 | Can sampling remove the limitations in greedy algorithm? -- (algorithms greedy algorithms sampling)
<p>Given the limitations of greedy (i.e., not always finding the optimal solution), does sampling the data space in a randomized manner or some structured manner reduce or remove the limitations of greedy algorithm?</p>&... | habedi/stack-exchange-dataset |
40,441 | Some inference about NP | <p>this is my first question on this site. </p>

<p>I recently, study on NP. I have some confusion about this Topic, and want to propose my inference and some one verify me.</p>

<blockquote>
 <p>I) each NP problem can be solved in Exponential Time. </p>
 
 <p>II) if P=NP then NP=NP-Comp... | complexity theory np complete | 1 | Some inference about NP -- (complexity theory np complete)
<p>this is my first question on this site. </p>

<p>I recently, study on NP. I have some confusion about this Topic, and want to propose my inference and some one verify me.</p>

<blockquote>
 <p>I) each NP problem can be solved in Exponen... | habedi/stack-exchange-dataset |
40,451 | Sliding window protocol when number of packets is equivalent to the window size | <p>I am currently taking a course in computer networking and I am curious about the following situation:</p>

<p>Given $n$ packets and a window size of $n$ (i.e., the number of packets is equivalent to the window size), what would happen in the following scenario?:</p>

<p>Packet 1 is sent by Host A and... | computer networks protocols | 1 | Sliding window protocol when number of packets is equivalent to the window size -- (computer networks protocols)
<p>I am currently taking a course in computer networking and I am curious about the following situation:</p>

<p>Given $n$ packets and a window size of $n$ (i.e., the number of packets is equivalent ... | habedi/stack-exchange-dataset |
40,464 | Markov Chain w/ non-stochastic matrix | <p>I've come across a problem which at first appeared to be a markov process however the transition matrix of the graph is non-stochastic. That is, the probabilities among edges <em>leaving</em> a node do not sum to 1. However,the probabilities on edges <em>entering</em> the node do sum to 1. Therefore the transpose of... | probability theory markov chains | 1 | Markov Chain w/ non-stochastic matrix -- (probability theory markov chains)
<p>I've come across a problem which at first appeared to be a markov process however the transition matrix of the graph is non-stochastic. That is, the probabilities among edges <em>leaving</em> a node do not sum to 1. However,the probabilities... | habedi/stack-exchange-dataset |
40,472 | Is the weighted transitive reduction problem NP-hard? | <p>The transitive reduction problem is to find the graph with the smallest number of edges such that $G^t = (V,E^t)$ has the same reachability as $G=(V,E)$.</p>

<p>When $E^t \subseteq E$ it is NP-complete. When $E^t \subseteq V\times V$ but not necessarily of $E$, this problem is polynomial time solvable. I am... | complexity theory graphs np complete np hard | 1 | Is the weighted transitive reduction problem NP-hard? -- (complexity theory graphs np complete np hard)
<p>The transitive reduction problem is to find the graph with the smallest number of edges such that $G^t = (V,E^t)$ has the same reachability as $G=(V,E)$.</p>

<p>When $E^t \subseteq E$ it is NP-complete. W... | habedi/stack-exchange-dataset |
40,475 | Lower bounding the minimum equivalent graph | <p>The transitive reduction $G^t = (V,E^t)$ of a graph $G=(V,E)$ is the smallest graph with the same reachability as $G$ with the property $E^t \subseteq V \times V$.</p>

<p>The minimum equivalent graph $G' = (V,E')$ is the smallest graph with the same reachability as $G$ with the property $E' \subseteq E$.</p... | graphs np complete np hard hamiltonian path | 1 | Lower bounding the minimum equivalent graph -- (graphs np complete np hard hamiltonian path)
<p>The transitive reduction $G^t = (V,E^t)$ of a graph $G=(V,E)$ is the smallest graph with the same reachability as $G$ with the property $E^t \subseteq V \times V$.</p>

<p>The minimum equivalent graph $G' = (V,E')$ i... | habedi/stack-exchange-dataset |
40,479 | Standard constructive definitions of integers, rationals, and reals? | <p>Natural numbers are defined inductively as (using Coq syntax as an example)</p>

<pre><code>Inductive nat: Set :=
| O: nat
| S: nat -> nat.
</code></pre>

<p>Is there a standard way to define integers (and maybe other sets like rationals and reals) constructively?</p>
 | arithmetic dependent types coq | 1 | Standard constructive definitions of integers, rationals, and reals? -- (arithmetic dependent types coq)
<p>Natural numbers are defined inductively as (using Coq syntax as an example)</p>

<pre><code>Inductive nat: Set :=
| O: nat
| S: nat -> nat.
</code></pre>

<p>Is there a standard way... | habedi/stack-exchange-dataset |
40,500 | Shortcut for "in the worst-case, with high probability"? | <p>I am writing a paper in which the worst-case analysis of a certain randomized algorithm is correct with probability $1-1/n$ (where $n$ is the size of the problem). I find myself writing, time after time, the following sentence: </p>

<blockquote>
 <p>"With high probability, in the worst case, the perfor... | terminology | 1 | Shortcut for "in the worst-case, with high probability"? -- (terminology)
<p>I am writing a paper in which the worst-case analysis of a certain randomized algorithm is correct with probability $1-1/n$ (where $n$ is the size of the problem). I find myself writing, time after time, the following sentence: </p>

<... | habedi/stack-exchange-dataset |
40,502 | Christofides algorithm: why must an MST have even number of odd-degree vertices? | <p>This question is not necessarily related to <a href="http://en.wikipedia.org/wiki/Christofides_algorithm" rel="nofollow">Christofides algorithm</a> per se, I just ran into it when reading about it.</p>

<p>I assume that a minimum spanning tree must have an even number of odd-degree vertices, since Christofid... | graphs minimum spanning tree | 1 | Christofides algorithm: why must an MST have even number of odd-degree vertices? -- (graphs minimum spanning tree)
<p>This question is not necessarily related to <a href="http://en.wikipedia.org/wiki/Christofides_algorithm" rel="nofollow">Christofides algorithm</a> per se, I just ran into it when reading about it.</p>&... | habedi/stack-exchange-dataset |
40,505 | Memory cells (addresses) read into a cache | <p>How does one determine what memory cells (addresses) are being read into a cache?</p>

<p>For example if we read at adress "C000EAFCH", which memory cells will be read into the cache if the cache is 64 byte and each cacheline is 8 byte?</p>

<p>If we use direct mapping, would one say that there are t... | cpu cache | 1 | Memory cells (addresses) read into a cache -- (cpu cache)
<p>How does one determine what memory cells (addresses) are being read into a cache?</p>

<p>For example if we read at adress "C000EAFCH", which memory cells will be read into the cache if the cache is 64 byte and each cacheline is 8 byte?</p>

<... | habedi/stack-exchange-dataset |
40,507 | Can finding a witness be NP-hard even if we already know there is one? | <p>The common examples of NP-hard problems (clique, 3-SAT, vertex cover, etc.) are of the type where we don't know whether the answer is "yes" or "no" beforehand.</p>

<p>Suppose that we have a problem in which the we know the answer is yes, furthermore we can verify a witness in polynomial time.</p>

<... | complexity theory np hard search problem | 1 | Can finding a witness be NP-hard even if we already know there is one? -- (complexity theory np hard search problem)
<p>The common examples of NP-hard problems (clique, 3-SAT, vertex cover, etc.) are of the type where we don't know whether the answer is "yes" or "no" beforehand.</p>

<p>Suppose that we have a p... | habedi/stack-exchange-dataset |
40,528 | What is the optimal solution of the 1962 Procter and Gamble's TSP Contest? | <p>In 1962, you could win a prize of \$ 10 000 (about \$ 80 000 in today's money) if you found the solution to an Euclidean travelling salesman problem defined on 33 cities.</p>

<p><a href="http://www.math.uwaterloo.ca/tsp/history/pictorial/car54.html">http://www.math.uwaterloo.ca/tsp/history/pictorial/car54.h... | optimization traveling salesman | 1 | What is the optimal solution of the 1962 Procter and Gamble's TSP Contest? -- (optimization traveling salesman)
<p>In 1962, you could win a prize of \$ 10 000 (about \$ 80 000 in today's money) if you found the solution to an Euclidean travelling salesman problem defined on 33 cities.</p>

<p><a href="http://ww... | habedi/stack-exchange-dataset |
40,530 | What makes a metaheuristic meta? | <p>According to <a href="https://en.wikipedia.org/wiki/Metaheuristic" rel="nofollow noreferrer">Wikipedia</a>:</p>

<blockquote>
 <p>...metaheuristic is a higher-level procedure or heuristic designed to
 find, generate, or select a lower-level procedure or heuristic
 (partial search algorithm) th... | algorithms terminology heuristics evolutionary computing | 1 | What makes a metaheuristic meta? -- (algorithms terminology heuristics evolutionary computing)
<p>According to <a href="https://en.wikipedia.org/wiki/Metaheuristic" rel="nofollow noreferrer">Wikipedia</a>:</p>

<blockquote>
 <p>...metaheuristic is a higher-level procedure or heuristic designed to
 fin... | habedi/stack-exchange-dataset |
40,531 | DFA that recognizes 0 in every odd position | <p>I had a question that asked for the DFA that accepts the following language:</p>

<pre><code>{w | every odd position of w is a 0 }
</code></pre>

<p>Should this DFA accept the empty string, since it doesn't have an odd position?</p>
 | automata finite automata | 1 | DFA that recognizes 0 in every odd position -- (automata finite automata)
<p>I had a question that asked for the DFA that accepts the following language:</p>

<pre><code>{w | every odd position of w is a 0 }
</code></pre>

<p>Should this DFA accept the empty string, since it doesn't have an odd posi... | habedi/stack-exchange-dataset |
40,551 | Misunderstanding the Church-Rosser property | <p>I am contemplating the Church-Rosser property and I clearly misunderstand it, but I do not exactly know why. If $x$ and $y$ are such that $x \overset{*}{\leftrightarrow} y$, then $x \overset{*}{\rightarrow} y$ and since $y \overset{*}{\rightarrow} y$, we have that both $x$ and $y$ reduce to $y$ (or $x$, for that mat... | term rewriting | 1 | Misunderstanding the Church-Rosser property -- (term rewriting)
<p>I am contemplating the Church-Rosser property and I clearly misunderstand it, but I do not exactly know why. If $x$ and $y$ are such that $x \overset{*}{\leftrightarrow} y$, then $x \overset{*}{\rightarrow} y$ and since $y \overset{*}{\rightarrow} y$, w... | habedi/stack-exchange-dataset |
40,556 | Kernels in parameterized complexity | <p>Can anyone explain me what (problem-)kernels are and what's the use of them? My slides say: </p>

<p>The kernel of a parameterized problem $L$ is a transformation $(x,k) \mapsto (x',k')$ such that: </p>

<ul>
<li>$(x,k) \in L \Leftrightarrow (x',k') \in L$</li>
<li>$|x'| \leq f(k)$ for some ... | parameterized complexity algorithm design | 1 | Kernels in parameterized complexity -- (parameterized complexity algorithm design)
<p>Can anyone explain me what (problem-)kernels are and what's the use of them? My slides say: </p>

<p>The kernel of a parameterized problem $L$ is a transformation $(x,k) \mapsto (x',k')$ such that: </p>

<ul>
<li>$... | habedi/stack-exchange-dataset |
40,558 | How long would it take a computer with twice the processing power to solve a polynomial time problem? | <p>Say I have some problem of $O\left(n^k\right)$ complexity.</p>

<p>If I were to solve the problem on a computer $x$, it would take time $t$.</p>

<p>Now I have a new computer $x'$, which has <strong>double</strong> the computing power of $x$.</p>

<p>How long would it take $x'$ to solve the s... | algorithm analysis asymptotics runtime analysis applied theory | 1 | How long would it take a computer with twice the processing power to solve a polynomial time problem? -- (algorithm analysis asymptotics runtime analysis applied theory)
<p>Say I have some problem of $O\left(n^k\right)$ complexity.</p>

<p>If I were to solve the problem on a computer $x$, it would take time $t$... | habedi/stack-exchange-dataset |
40,571 | New Assembler in compiler | <p>I'm currently developing my degree thesis, and the lab's idea is to design a new micro architecture, and then, be able to compile stuff for this architecture. So the question is, how do you instruct a compiler to generate your new assembler???
The general idea is to be able to compile with gcc and run netbsd or ... | computer architecture compilers | 1 | New Assembler in compiler -- (computer architecture compilers)
<p>I'm currently developing my degree thesis, and the lab's idea is to design a new micro architecture, and then, be able to compile stuff for this architecture. So the question is, how do you instruct a compiler to generate your new assembler???
The ge... | habedi/stack-exchange-dataset |
40,583 | Can nodes in red-black trees have one nil child and one non-nil child? | <p>I don't recall hearing that nodes in red-black trees can't have one nil child and one non-nil child. However, I did hear that red-black trees have a worst-case height of $2log_2(n + 1)$, where n is the number of nodes, and I don't see how this could be the case if nodes can have one nil and one non-nil child, as a t... | data structures binary trees search trees | 1 | Can nodes in red-black trees have one nil child and one non-nil child? -- (data structures binary trees search trees)
<p>I don't recall hearing that nodes in red-black trees can't have one nil child and one non-nil child. However, I did hear that red-black trees have a worst-case height of $2log_2(n + 1)$, where n is t... | habedi/stack-exchange-dataset |
40,585 | What is the complement of ACFG | <p>What is the complement of $\mathrm{ACFG} = \{ G \mid G \text{ is a CFG and }L(G) = \Sigma^* \}$?</p>

<p>I think it is $\mathrm{ECFG} = \{ G \mid G\text{ is a CFG and }L(G) = \emptyset \}$.</p>

<p>It makes sense to me because the complement of the empty language is the universal language?</p>
&#... | context free formal grammars sets | 1 | What is the complement of ACFG -- (context free formal grammars sets)
<p>What is the complement of $\mathrm{ACFG} = \{ G \mid G \text{ is a CFG and }L(G) = \Sigma^* \}$?</p>

<p>I think it is $\mathrm{ECFG} = \{ G \mid G\text{ is a CFG and }L(G) = \emptyset \}$.</p>

<p>It makes sense to me because the ... | habedi/stack-exchange-dataset |
40,605 | Why is Oracle Turing Machine important? | <p>As you know, an <em>Oracle Turing Machine</em> (OTM) is a "black box" which somehow can tell us whether a given Turing machine with a given input eventually halts. By Church's Thesis it is impossible to design an algorithm which is able to solve such a problem. </p>

<p>If we will never get such a <em>black ... | complexity theory computability oracle machines church turing thesis | 1 | Why is Oracle Turing Machine important? -- (complexity theory computability oracle machines church turing thesis)
<p>As you know, an <em>Oracle Turing Machine</em> (OTM) is a "black box" which somehow can tell us whether a given Turing machine with a given input eventually halts. By Church's Thesis it is impossible to ... | habedi/stack-exchange-dataset |
40,620 | Correctness of splitting an undirected tree into a forest of trees with even number of children | <p>Given an undirected tree (i.e. a tree without any designated root) of even number of nodes.
The task is <em>to remove as many edges from the tree as possible</em> to obtain a forest of trees,
where each such tree contains even number of nodes.
And return/output number of removed edges as an output/answer... | algorithms trees graph traversal | 1 | Correctness of splitting an undirected tree into a forest of trees with even number of children -- (algorithms trees graph traversal)
<p>Given an undirected tree (i.e. a tree without any designated root) of even number of nodes.
The task is <em>to remove as many edges from the tree as possible</em> to obtain a fore... | habedi/stack-exchange-dataset |
40,624 | Skienna's recursive algorithm for edit distance | <p>I'm having some trouble understanding part of Skienna's algorithm for edit distance presented in his Algorithm Design Manual. I'm posting the recursive version, prior to when he applies dynamic programming to the problem, but my question still stands in that version too I think.</p>

<p>He provides the follo... | algorithms edit distance | 1 | Skienna's recursive algorithm for edit distance -- (algorithms edit distance)
<p>I'm having some trouble understanding part of Skienna's algorithm for edit distance presented in his Algorithm Design Manual. I'm posting the recursive version, prior to when he applies dynamic programming to the problem, but my question s... | habedi/stack-exchange-dataset |
40,625 | Efficient computation of traces of all primitive elements in field extensions of GF(2) | <p>Let $n > 1$ and let $\mathbb{F}_{2^n}$ be the finite field with $2^n$ elements. The trace function $T(x) = x + x^2 + x^{2^2} + \cdots + x^{2^{n-1}}$ is an onto linear transformation from $\mathbb{F}_{2^n}$ to $\mathbb{F}_2$. There are $\phi(2^n-1)$ primitive elements in $\mathbb{F}_{2^n}$ (generators of the cycli... | algorithms discrete mathematics number theory | 1 | Efficient computation of traces of all primitive elements in field extensions of GF(2) -- (algorithms discrete mathematics number theory)
<p>Let $n > 1$ and let $\mathbb{F}_{2^n}$ be the finite field with $2^n$ elements. The trace function $T(x) = x + x^2 + x^{2^2} + \cdots + x^{2^{n-1}}$ is an onto linear transform... | habedi/stack-exchange-dataset |
40,633 | Matrix Multiplication Algorithms for Non-Square Matrices | <p>I'm interested in learning about some of the algorithms available for multiplying non-square matrices, yet despite exhaustive Googling efforts I have been unable to find any discussions of such algorithms except for a couple of extremely general pieces of pseudocode that I found on Wikipedia and MIT OCW.</p>
&#x... | algorithms algorithm analysis mathematical programming | 1 | Matrix Multiplication Algorithms for Non-Square Matrices -- (algorithms algorithm analysis mathematical programming)
<p>I'm interested in learning about some of the algorithms available for multiplying non-square matrices, yet despite exhaustive Googling efforts I have been unable to find any discussions of such algori... | habedi/stack-exchange-dataset |
40,636 | What exactly is Symbolic Model Checking? | <p>I know that Symbolic Model Checking is state space traversal based on representations of states sets and transition relations as formulas like in CTL using models like Kripke Model. I know the theory. But I'm finding it hard to understand the actual application. Where exactly is it used? What exactly does it do and ... | formal methods model checking software verification | 1 | What exactly is Symbolic Model Checking? -- (formal methods model checking software verification)
<p>I know that Symbolic Model Checking is state space traversal based on representations of states sets and transition relations as formulas like in CTL using models like Kripke Model. I know the theory. But I'm finding it... | habedi/stack-exchange-dataset |
40,637 | Why is $\{a^n b^m c^p: n\neq m\} \cup \{a^n b^m c^p: m\neq p\}$ an inherently ambiguous language? | <p>I came across a very hard interview question in last month’s Ph.D. entrance exam. It was asking which one of the languages is inherently ambiguous. Short answer says 2). Why is the language in 2) an inherently ambiguous language?</p>

<p>1) $L = \{a^n b^{2n} c: n\geq 0\} \cup \{a^{2n} b^n d: n\geq 0\}$</p>&#... | formal languages regular languages context free pushdown automata ambiguity | 1 | Why is $\{a^n b^m c^p: n\neq m\} \cup \{a^n b^m c^p: m\neq p\}$ an inherently ambiguous language? -- (formal languages regular languages context free pushdown automata ambiguity)
<p>I came across a very hard interview question in last month’s Ph.D. entrance exam. It was asking which one of the languages is inherently a... | habedi/stack-exchange-dataset |
40,638 | What is a lay explanation for universal search? | <p>I am reading a book on a computer science topic but lack some of the prerequisite background. Normally when I run into terms I don't understand I simply look them up, but for <em>Universal Search</em> I simply haven't been able to find an explanation suitable for a reader without a background in statistics/computer ... | algorithms terminology search algorithms | 1 | What is a lay explanation for universal search? -- (algorithms terminology search algorithms)
<p>I am reading a book on a computer science topic but lack some of the prerequisite background. Normally when I run into terms I don't understand I simply look them up, but for <em>Universal Search</em> I simply haven't been ... | habedi/stack-exchange-dataset |
40,643 | Are finitely many statements resp. variables sufficient to compute every function? | <p>I prepare for local complexity contest and review some old Interview questions banks. I get stuck in one problem and no idea how we can solve it. please share your idea or help with this question:</p>

<blockquote>
 <p>Suppose $C$ is a set of all one-variable computable functions,
 $C^{(n)}$ is a s... | computability computation models | 1 | Are finitely many statements resp. variables sufficient to compute every function? -- (computability computation models)
<p>I prepare for local complexity contest and review some old Interview questions banks. I get stuck in one problem and no idea how we can solve it. please share your idea or help with this question:... | habedi/stack-exchange-dataset |
40,648 | Complexity of recognizing whether two $\omega$-regular expressions represent the same language | <p>If the complexity of recognizing whether two regular expressions represent different languages is <strong>EXPSPACE-complete</strong>, then what can be said for the complexity of recognizing whether two $\omega$-regular expressions represent different languages?</p>
 | complexity theory space complexity buchi automata | 1 | Complexity of recognizing whether two $\omega$-regular expressions represent the same language -- (complexity theory space complexity buchi automata)
<p>If the complexity of recognizing whether two regular expressions represent different languages is <strong>EXPSPACE-complete</strong>, then what can be said for the com... | habedi/stack-exchange-dataset |
40,652 | Abstract algebra and programming languages | <p>Quite often, I stumble upon abstract algebra concepts like initial algebra, free algebra, and similar while reading papers on programming languages. For instance, in papers on algebraic data types, monads, separation logic, models of polymorphic lambda calculus, etc. </p>

<p>Where can I find materials that ... | reference request programming languages logic computer algebra | 1 | Abstract algebra and programming languages -- (reference request programming languages logic computer algebra)
<p>Quite often, I stumble upon abstract algebra concepts like initial algebra, free algebra, and similar while reading papers on programming languages. For instance, in papers on algebraic data types, monads, ... | habedi/stack-exchange-dataset |
40,655 | Why can no task have a utilization rate greater than one? | <blockquote>
 <p><img src="https://i.stack.imgur.com/5TIXk.png" alt="enter image description here">
 Let $C_i$ be the execution time for task i, $T_i$ be the task period and utilization rate $U = \frac{C_i}{T_i}$</p>
 
 <p>Then $U$ must be less or equal to $1$ for the task to be schedulable</p>
... | optimization scheduling | 1 | Why can no task have a utilization rate greater than one? -- (optimization scheduling)
<blockquote>
 <p><img src="https://i.stack.imgur.com/5TIXk.png" alt="enter image description here">
 Let $C_i$ be the execution time for task i, $T_i$ be the task period and utilization rate $U = \frac{C_i}{T_i}$</p>
 ... | habedi/stack-exchange-dataset |
40,657 | Does Church-Turing thesis also apply to artificial intelligence? | <p>By Church-Turing's thesis, it is impossible to design an algorithm to decide the halting problem. </p>

<p>Does the word algorithm in this context include artificial 
intelligence or not, that is, does Church-Turing thesis also apply to artificial intelligence? </p>

<p>Is it possible to design a... | computability artificial intelligence halting problem church turing thesis | 1 | Does Church-Turing thesis also apply to artificial intelligence? -- (computability artificial intelligence halting problem church turing thesis)
<p>By Church-Turing's thesis, it is impossible to design an algorithm to decide the halting problem. </p>

<p>Does the word algorithm in this context include artificia... | habedi/stack-exchange-dataset |
40,667 | Splitting permutations into transpositions | <p>Suppose we are given an array $\texttt{a[]}$ of $n$ non-negative integers. The algorithm should give back $\texttt{-1}$ if an integer appears more than once in $\texttt{a[]}$. </p>

<p>Otherwise we interpret $\texttt{a[]}$ as a permutation $\pi:\{0,\ldots, \texttt{max(a[])}\} \to \{0,\ldots, \texttt{max(a[])... | algorithms algorithm analysis | 1 | Splitting permutations into transpositions -- (algorithms algorithm analysis)
<p>Suppose we are given an array $\texttt{a[]}$ of $n$ non-negative integers. The algorithm should give back $\texttt{-1}$ if an integer appears more than once in $\texttt{a[]}$. </p>

<p>Otherwise we interpret $\texttt{a[]}$ as a per... | habedi/stack-exchange-dataset |
40,672 | Are there name and literature for this SAT-like problem? | <p>Given $f : \{0,1\}^* \to \{0,1\}$ and $n \in \mathbb{N}$,
we define $\textsf{Prob}(f,n)$ as the following problem:</p>

<blockquote>
 <p>Find an $x \in \{0,1\}^n$ such that $f(x) = 1$.</p>
</blockquote>

<p>A machine solving $\textsf{Prob}(f,n)$
would have $f$ encoded as a bit-string... | complexity theory reference request satisfiability search problem | 1 | Are there name and literature for this SAT-like problem? -- (complexity theory reference request satisfiability search problem)
<p>Given $f : \{0,1\}^* \to \{0,1\}$ and $n \in \mathbb{N}$,
we define $\textsf{Prob}(f,n)$ as the following problem:</p>

<blockquote>
 <p>Find an $x \in \{0,1\}^n$ such that... | habedi/stack-exchange-dataset |
40,679 | Prove correctness of DFA ending with ab | <p>I have the following deterministic finite automaton and I am need to prove correctness of the claim that this automata accepts $\{wab \mid w\in \{a,b\}^*\}$</p>

<p><img src="https://i.stack.imgur.com/VrES5.png" alt="DFA"></p>

<p>I know that I need to prove by induction on the length of the word but... | automata finite automata induction | 1 | Prove correctness of DFA ending with ab -- (automata finite automata induction)
<p>I have the following deterministic finite automaton and I am need to prove correctness of the claim that this automata accepts $\{wab \mid w\in \{a,b\}^*\}$</p>

<p><img src="https://i.stack.imgur.com/VrES5.png" alt="DFA"></p>&#x... | habedi/stack-exchange-dataset |
40,683 | Finding the values for a particular bucket in a list | <p>I have a list of <code>n</code> items. I need to find the items that will be present in a given range, if the list were to be sorted. Sorting the entire list is not required and not desired, the buckets can be evenly spaced, but if an approach can handle a particular bucket starting at index <code>i</code> and endin... | algorithms | 1 | Finding the values for a particular bucket in a list -- (algorithms)
<p>I have a list of <code>n</code> items. I need to find the items that will be present in a given range, if the list were to be sorted. Sorting the entire list is not required and not desired, the buckets can be evenly spaced, but if an approach can ... | habedi/stack-exchange-dataset |
40,684 | Compression functions are only practical because "The bit strings which occur in practice are far from random"? | <p>I would have made a comment, as this pertains to Andrej Bauer's answer in this <a href="https://cs.stackexchange.com/questions/7531/no-compression-algorithm-can-compress-all-input-messages">thread</a>; however, I believe it is worth a question. </p>

<p>Andrej explains that given the set of all bit strings o... | information theory data compression | 1 | Compression functions are only practical because "The bit strings which occur in practice are far from random"? -- (information theory data compression)
<p>I would have made a comment, as this pertains to Andrej Bauer's answer in this <a href="https://cs.stackexchange.com/questions/7531/no-compression-algorithm-can-com... | habedi/stack-exchange-dataset |
40,689 | What are Markov chains? | <p>I'm currently reading some papers about Markov chain lumping and I'm failing to see the difference between a Markov chain and a plain directed weighted graph.</p>

<p>For example in the article <a href="http://www.sciencedirect.com/science/article/pii/S0020019003003430" rel="nofollow">Optimal state-space lum... | probability theory weighted graphs mathematical foundations markov chains | 1 | What are Markov chains? -- (probability theory weighted graphs mathematical foundations markov chains)
<p>I'm currently reading some papers about Markov chain lumping and I'm failing to see the difference between a Markov chain and a plain directed weighted graph.</p>

<p>For example in the article <a href="htt... | habedi/stack-exchange-dataset |
40,690 | Shortest path in a matrix | <p>I am trying to solve this problem, and i have tried multiple methods, but i must be missing something, here is the problem:
Given a matrix MxN. Find the shortest path from (1,1) to (M,N), where each number in the matrix represents the costs and one can only move horizontal and vertical:</p>

<p>e.g. </p>... | shortest path dynamic programming matrices | 1 | Shortest path in a matrix -- (shortest path dynamic programming matrices)
<p>I am trying to solve this problem, and i have tried multiple methods, but i must be missing something, here is the problem:
Given a matrix MxN. Find the shortest path from (1,1) to (M,N), where each number in the matrix represents the cost... | habedi/stack-exchange-dataset |
40,694 | Terminology for describing a kind of server | <p>What is the adjective used to describe the fact that a server keep track of queries made by a user. I take the example of a database server.</p>
 | terminology databases | 1 | Terminology for describing a kind of server -- (terminology databases)
<p>What is the adjective used to describe the fact that a server keep track of queries made by a user. I take the example of a database server.</p>
 | habedi/stack-exchange-dataset |
40,695 | What is the name of the property where $f(A) \supseteq f(B)$ when $A\supseteq B$? | <p>Suppose I have a function $f$ on sets. </p>

<p>What is the property of $f$ called when, </p>

<p>for all sets $x$, $y$: $f(x)$ is a superset of $f(y)$ when $x$ is a superset of $y$</p>

<p>i.e.</p>

<p>$$\forall x,y : x\supseteq y \Rightarrow f(x) \supseteq f(y)$$</p>
 | terminology sets partial order | 1 | What is the name of the property where $f(A) \supseteq f(B)$ when $A\supseteq B$? -- (terminology sets partial order)
<p>Suppose I have a function $f$ on sets. </p>

<p>What is the property of $f$ called when, </p>

<p>for all sets $x$, $y$: $f(x)$ is a superset of $f(y)$ when $x$ is a superset of $y$</... | habedi/stack-exchange-dataset |
40,699 | Creating a single layer perceptron for the OR problem | <p>I am working on the following problem</p>

<p>Find the linear least squares unit weights for the `OR' problem, ie.
$v_1^T = (0,0), v_2^T = (1,0), v_3^T = (0,1), v_4^T = (1,1)$ and $u_1 = 0, u_2 = u_3 = u_4 = 1$.</p>

<p>Here $v$ represent inputs and $u$ outputs. For problems like this I usually f... | neural networks linear algebra boolean algebra | 1 | Creating a single layer perceptron for the OR problem -- (neural networks linear algebra boolean algebra)
<p>I am working on the following problem</p>

<p>Find the linear least squares unit weights for the `OR' problem, ie.
$v_1^T = (0,0), v_2^T = (1,0), v_3^T = (0,1), v_4^T = (1,1)$ and $u_1 = 0, u_2 = u_3... | habedi/stack-exchange-dataset |
40,703 | Heaviest planar subgraph | <p>Consider the following problem.</p>

<p>Given: A complete graph with real non-negative weights on the edges. </p>

<p>Task: Find a planar subgraph of maximum weight. ("Maximum" among all possible planar subgraphs.)</p>

<p>Note: The maximum-weight subgraph will be a triangulation; if the comp... | algorithms graphs optimization combinatorics | 1 | Heaviest planar subgraph -- (algorithms graphs optimization combinatorics)
<p>Consider the following problem.</p>

<p>Given: A complete graph with real non-negative weights on the edges. </p>

<p>Task: Find a planar subgraph of maximum weight. ("Maximum" among all possible planar subgraphs.)</p>
&#x... | habedi/stack-exchange-dataset |
40,712 | Possessive Kleene star operator | <p>Has anyone studied the consequences of the Kleene star in regular expressions to always be "possessive"?</p>

<p>In other words, if <code>*</code> would always match as much as possible and no backtracking is allowed, would I still be able to express any regular language?</p>

<p>Let's say that <code... | formal languages regular languages regular expressions | 1 | Possessive Kleene star operator -- (formal languages regular languages regular expressions)
<p>Has anyone studied the consequences of the Kleene star in regular expressions to always be "possessive"?</p>

<p>In other words, if <code>*</code> would always match as much as possible and no backtracking is allowed,... | habedi/stack-exchange-dataset |
40,715 | What is an $NP^{NP}$-complete problem? | <p>So in this paper I'm reading (<a href="https://adamsmith.as/papers/fdg2013_shortcuts.pdf" rel="noreferrer">https://adamsmith.as/papers/fdg2013_shortcuts.pdf</a>), the authors talk about an $NP^{NP}$-complete problem, in relation to Answer Set Programming. I know what P, NP, etc. are but I don't unerstand what they m... | complexity classes np answer set programming | 1 | What is an $NP^{NP}$-complete problem? -- (complexity classes np answer set programming)
<p>So in this paper I'm reading (<a href="https://adamsmith.as/papers/fdg2013_shortcuts.pdf" rel="noreferrer">https://adamsmith.as/papers/fdg2013_shortcuts.pdf</a>), the authors talk about an $NP^{NP}$-complete problem, in relation... | habedi/stack-exchange-dataset |
40,727 | What is a sufficiently complex system? | <p>I have been reading about the AI approaches, and I came across the <a href="http://www.theregister.co.uk/2013/05/17/google_ai_hogwash/" rel="nofollow">AI emergent approach</a> that has the following definition:</p>

<p><strong>That is, the appearance of an entity with a sense of its own identity and agency w... | complexity theory artificial intelligence | 1 | What is a sufficiently complex system? -- (complexity theory artificial intelligence)
<p>I have been reading about the AI approaches, and I came across the <a href="http://www.theregister.co.uk/2013/05/17/google_ai_hogwash/" rel="nofollow">AI emergent approach</a> that has the following definition:</p>

<p><str... | habedi/stack-exchange-dataset |
40,728 | How can I see which language type will result from the union or intersection of different language types? | <p>I have to decide which language type will result from the union of a type-2 (context-free) and a type-3 (regular) language.</p>

<p>Is there a way or rule to decide this for all language types?</p>
 | formal languages regular languages | 1 | How can I see which language type will result from the union or intersection of different language types? -- (formal languages regular languages)
<p>I have to decide which language type will result from the union of a type-2 (context-free) and a type-3 (regular) language.</p>

<p>Is there a way or rule to decid... | habedi/stack-exchange-dataset |
40,733 | Unreachable Real Numbers - Randomness & Computability | <p>I've recently read that there were many real numbers that would never be reachable by humanity. The explanation itself says that we can write as many programs as integers which is infinite, but there are infinite real numbers between two integers so Real numbers infinity is bigger than integer numbers. </p>

... | computability integers randomness real numbers | 1 | Unreachable Real Numbers - Randomness & Computability -- (computability integers randomness real numbers)
<p>I've recently read that there were many real numbers that would never be reachable by humanity. The explanation itself says that we can write as many programs as integers which is infinite, but there are infinit... | habedi/stack-exchange-dataset |
40,747 | Is a partial function Turing-computable? | <p>From my understanding for a function to be considered Turing-computable the Turing machine which computes it must terminate for all inputs (according to this <a href="http://planetmath.org/turingcomputable" rel="nofollow">http://planetmath.org/turingcomputable</a> and various other sources I've read).</p>

<... | computability turing machines church turing thesis | 1 | Is a partial function Turing-computable? -- (computability turing machines church turing thesis)
<p>From my understanding for a function to be considered Turing-computable the Turing machine which computes it must terminate for all inputs (according to this <a href="http://planetmath.org/turingcomputable" rel="nofollow... | habedi/stack-exchange-dataset |
40,761 | Pi Calculus: Restriction necessary for molecular (atomic) action? | <p>In "A Calculus of Mobile Processes, Part 1" [1], Milner et al. give an example for transmitting a pair of values $(u,v)$ from the process $P$ to either $R$ or $Q$ (see page 13). All three processes are assumed to run in parallel.</p>

<p>They present following solution:</p>

<p>$$
\begin{align}&#... | algorithms computation models pi calculus | 1 | Pi Calculus: Restriction necessary for molecular (atomic) action? -- (algorithms computation models pi calculus)
<p>In "A Calculus of Mobile Processes, Part 1" [1], Milner et al. give an example for transmitting a pair of values $(u,v)$ from the process $P$ to either $R$ or $Q$ (see page 13). All three processes are as... | habedi/stack-exchange-dataset |
40,764 | Greedy algorithm for Set Cover problem - need help with approximation | <p>I want to approximate how close is the greedy algorithm to the optimal solution for the <a href="http://en.wikipedia.org/wiki/Set_cover_problem" rel="nofollow">Set Cover Problem</a>, which I'm sure most of you are familiar with, but just in case, you can visit the link above.<br>
The problem is NP-Hard, and I'm ... | algorithms approximation set cover | 1 | Greedy algorithm for Set Cover problem - need help with approximation -- (algorithms approximation set cover)
<p>I want to approximate how close is the greedy algorithm to the optimal solution for the <a href="http://en.wikipedia.org/wiki/Set_cover_problem" rel="nofollow">Set Cover Problem</a>, which I'm sure most of y... | habedi/stack-exchange-dataset |
40,776 | Going deeper with pseudo-polynomial time algorithm for set partitioning | <p>If I have a set of (edit) <strong>positive</strong> integers, and I'm sure that the <a href="https://en.wikipedia.org/wiki/Partition_problem#Pseudo-polynomial_time_algorithm" rel="nofollow noreferrer">pseudo-polynomial time algorithm</a> for partitioning the problem will not give me an answer - what would I do next?... | algorithms dynamic programming greedy algorithms partitions | 1 | Going deeper with pseudo-polynomial time algorithm for set partitioning -- (algorithms dynamic programming greedy algorithms partitions)
<p>If I have a set of (edit) <strong>positive</strong> integers, and I'm sure that the <a href="https://en.wikipedia.org/wiki/Partition_problem#Pseudo-polynomial_time_algorithm" rel="... | habedi/stack-exchange-dataset |
40,779 | Term rewrite system is non-confluent, but cannot find different normal forms of term | <p>I wrote a simple TRS that I believe is non-confluent, but I'm not able to find a term with two normal forms for it.</p>

<p>The TRS is defined on the signature $\mathcal F=\{f,\ l,\ s,\ o\}$ and the rewrite rules $\mathcal R$ are defined as follows:</p>

<ul>
<li>$l\to s(o)$</li>
<li>$t(x,\ l... | normal forms term rewriting | 1 | Term rewrite system is non-confluent, but cannot find different normal forms of term -- (normal forms term rewriting)
<p>I wrote a simple TRS that I believe is non-confluent, but I'm not able to find a term with two normal forms for it.</p>

<p>The TRS is defined on the signature $\mathcal F=\{f,\ l,\ s,\ o\}$ ... | habedi/stack-exchange-dataset |
40,787 | Unprovable Post correspondence problem instance | <p>Since there is no algorithm for the post correspondence problem, there exists an instance of this problem such that we can neither prove that the instance is positive nor prove that the instance is negative, i.e. an unprovable instance of this problem. Otherwise, for each instance, a proof that the instance is posit... | computability undecidability | 1 | Unprovable Post correspondence problem instance -- (computability undecidability)
<p>Since there is no algorithm for the post correspondence problem, there exists an instance of this problem such that we can neither prove that the instance is positive nor prove that the instance is negative, i.e. an unprovable instance... | habedi/stack-exchange-dataset |
40,791 | Proving that any CF language over a 1 letter alphabet is regular | <p>I would like to prove that any context free language over a 1 letter alphabet is regular. I understand there is Parikh's theorem but I want to prove this using the work I have done so far:</p>

<p>Let <span class="math-container">$L$</span> be a context free language. So, <span class="math-container">$L$</sp... | formal languages regular languages context free | 1 | Proving that any CF language over a 1 letter alphabet is regular -- (formal languages regular languages context free)
<p>I would like to prove that any context free language over a 1 letter alphabet is regular. I understand there is Parikh's theorem but I want to prove this using the work I have done so far:</p>
&#... | habedi/stack-exchange-dataset |
40,793 | What's the difference between declarative syntax and encapsulation? | <p>I had been first introduced to the idea of declarative syntax when using Angular JS. From what I understand, the idea is that you say, "do this" instead of "in order to do this, do this, this and this". You don't care how it's done, you just want it done, and you pass it off to some lower level of abstraction to do.... | programming languages object oriented api design design patterns | 1 | What's the difference between declarative syntax and encapsulation? -- (programming languages object oriented api design design patterns)
<p>I had been first introduced to the idea of declarative syntax when using Angular JS. From what I understand, the idea is that you say, "do this" instead of "in order to do this, d... | habedi/stack-exchange-dataset |
40,795 | Recursive algorithm to compute a sum of product like function | <p>I am working on a recursive formula associated with discrete mathematics which seems very difficult to compute. 
The formula is as follows</p>

<p>$F_{i,j}(m)=\sum_{t=j}^{m}\left [ x_{ij}.\sum_{k=1}^{m}\sum_{l=j-1}^{m} F_{k,l}(m-ij) \right ]$</p>

<p>It's given that $F_{i,j}(m)=0$ for $m<0$.</... | algorithms computability recursion | 1 | Recursive algorithm to compute a sum of product like function -- (algorithms computability recursion)
<p>I am working on a recursive formula associated with discrete mathematics which seems very difficult to compute. 
The formula is as follows</p>

<p>$F_{i,j}(m)=\sum_{t=j}^{m}\left [ x_{ij}.\sum_{k=1}^{m}\... | habedi/stack-exchange-dataset |
40,800 | In which pipeline stage are exceptions detected? | <p>Do you immediatly handle an exception when it occurs (for example an overflow exception in the EX stage) or do you wait until the final pipeline stage and then check whether any interrupts had occured?</p>
 | computer architecture | 1 | In which pipeline stage are exceptions detected? -- (computer architecture)
<p>Do you immediatly handle an exception when it occurs (for example an overflow exception in the EX stage) or do you wait until the final pipeline stage and then check whether any interrupts had occured?</p>
 | habedi/stack-exchange-dataset |
40,806 | Poly-time reduction: D and D Comp | <p>Looking at the Independent Set problem and its complement, I want to show that IS is poly-time reducible to its complement, however I am struggling on coming up with the reduction function.</p>

<p>I will define its complement for further clarity, does every subset such that its size is at least $k$ in $V$ c... | complexity theory np complete reductions decision problem | 1 | Poly-time reduction: D and D Comp -- (complexity theory np complete reductions decision problem)
<p>Looking at the Independent Set problem and its complement, I want to show that IS is poly-time reducible to its complement, however I am struggling on coming up with the reduction function.</p>

<p>I will define ... | habedi/stack-exchange-dataset |
40,808 | Relationship between Independent Set and Vertex Cover | <p>Directly from Wikipedia, a set of vertices $X \subseteq V(G)$ of a graph $G$ is independent if and only if its complement $V(G) \setminus X$ is a vertex cover.</p>

<p>Does this imply that the complement of the independent set problem is the vertex cover problem?</p>
 | graphs np complete | 1 | Relationship between Independent Set and Vertex Cover -- (graphs np complete)
<p>Directly from Wikipedia, a set of vertices $X \subseteq V(G)$ of a graph $G$ is independent if and only if its complement $V(G) \setminus X$ is a vertex cover.</p>

<p>Does this imply that the complement of the independent set prob... | habedi/stack-exchange-dataset |
40,809 | A logic function that is true iff the first operand is less than the second operand | <p>In my computer organization class I have been given a series of problems. One I'm stuck on currently is below:</p>
<blockquote>
<p>Assume that <span class="math-container">$X$</span> consists of 4 bits, <span class="math-container">$x_3 x_2 x_1 x_0$</span>, and <span class="math-container">$Y$</span> consist... | logic boolean algebra | 1 | A logic function that is true iff the first operand is less than the second operand -- (logic boolean algebra)
<p>In my computer organization class I have been given a series of problems. One I'm stuck on currently is below:</p>
<blockquote>
<p>Assume that <span class="math-container">$X$</span> consists of 4 b... | habedi/stack-exchange-dataset |
40,810 | What can I deduce if an NP-complete problem is reducible to its complement? | <p>Let's say I have a decision problem $D$ and its complement $D'$. I know D is poly-time reducible to $D'$ (its complement). Furthermore, I know $D$ is NP-complete. What is the strongest statement I could possibly make about this kind of relationship?</p>
 | complexity theory np complete decision problem | 1 | What can I deduce if an NP-complete problem is reducible to its complement? -- (complexity theory np complete decision problem)
<p>Let's say I have a decision problem $D$ and its complement $D'$. I know D is poly-time reducible to $D'$ (its complement). Furthermore, I know $D$ is NP-complete. What is the strongest stat... | habedi/stack-exchange-dataset |
40,811 | Tallest Person Average Memory Updating? | <p>We ran into a problem that was mentioned in an interview 2 days ago. Can you help us with any idea or hint?</p>

<p>A sequence of $n$ people, $\langle\,p_1,p_2,\dotsc p_n\,\rangle$ enter a room. We want to find the index, $i$, of the tallest person in the room. We have one variable for saving that index, wh... | algorithms algorithm analysis data structures runtime analysis discrete mathematics | 1 | Tallest Person Average Memory Updating? -- (algorithms algorithm analysis data structures runtime analysis discrete mathematics)
<p>We ran into a problem that was mentioned in an interview 2 days ago. Can you help us with any idea or hint?</p>

<p>A sequence of $n$ people, $\langle\,p_1,p_2,\dotsc p_n\,\rangle$... | habedi/stack-exchange-dataset |
40,813 | How to prove that these two languages are regular, or not regular? | <p>I have these two languages</p>

<p>$L_1={\{a^n b^m,n≥m+5,m>0}\}$ Where $∑=(a,b)$</p>

<p>$L_2={\{a^n b^m,n≥m+5,m≤5}\}$ Where $∑=(a,b)$</p>

<p>As you can see that there is only one difference, the condition of <code>m</code> is different. </p>

<p>My question is to determine whethe... | formal languages regular languages automata pumping lemma | 1 | How to prove that these two languages are regular, or not regular? -- (formal languages regular languages automata pumping lemma)
<p>I have these two languages</p>

<p>$L_1={\{a^n b^m,n≥m+5,m>0}\}$ Where $∑=(a,b)$</p>

<p>$L_2={\{a^n b^m,n≥m+5,m≤5}\}$ Where $∑=(a,b)$</p>

<p>As you can see th... | habedi/stack-exchange-dataset |
40,818 | Help with understanding Simulated Annealing algorithm | <p>I'm trying to wrap my head around it, but no matter what I read, I still can't fully understand it.<br>
I tried to read a little bit about the annealing process in physics, but I have no background whatsoever in physics, let alone in thermodynamics, so I couldn't understand what is it exactly, and how it fits in... | constraint satisfaction | 1 | Help with understanding Simulated Annealing algorithm -- (constraint satisfaction)
<p>I'm trying to wrap my head around it, but no matter what I read, I still can't fully understand it.<br>
I tried to read a little bit about the annealing process in physics, but I have no background whatsoever in physics, let alone... | habedi/stack-exchange-dataset |
40,826 | Why is this sequence not acceptable for this DFA? | <p>Why is the sequence 1100101 not acceptable for this DFA? Is it because once it reaches the final state 'q3' it can't go back to 'q1'?<img src="https://i.stack.imgur.com/1RdlP.png" alt="enter image description here"></p>
 | automata finite automata | 1 | Why is this sequence not acceptable for this DFA? -- (automata finite automata)
<p>Why is the sequence 1100101 not acceptable for this DFA? Is it because once it reaches the final state 'q3' it can't go back to 'q1'?<img src="https://i.stack.imgur.com/1RdlP.png" alt="enter image description here"></p>
 | habedi/stack-exchange-dataset |
40,831 | Can each VLIW sub-instruction execute any instruction? | <p>say that you have a 128 bit (32*4) VLIW word. Can each 32 bit sub-word contain any operation (ADD,CALL,BRANCH,...) if there are no hazards or can each sub-word only specify one functional unit (so if the BRANCH functional unit doesn't get used, that sub-word becomes a NOP)?</p>
 | computer architecture | 1 | Can each VLIW sub-instruction execute any instruction? -- (computer architecture)
<p>say that you have a 128 bit (32*4) VLIW word. Can each 32 bit sub-word contain any operation (ADD,CALL,BRANCH,...) if there are no hazards or can each sub-word only specify one functional unit (so if the BRANCH functional unit doesn't ... | habedi/stack-exchange-dataset |
40,834 | Algorithm to compute a recursive function on a given set | <p>I am working on a property of a given set of natural numbers and it seems difficult to compute. There is a function 'fun' which takes two inputs, one is the cardinal value and another is the set. If the set is empty then fun should return 0 because fun depends on the product of the set and fun on all subsets of the ... | algorithms computability recurrence relation dynamic programming recursion | 1 | Algorithm to compute a recursive function on a given set -- (algorithms computability recurrence relation dynamic programming recursion)
<p>I am working on a property of a given set of natural numbers and it seems difficult to compute. There is a function 'fun' which takes two inputs, one is the cardinal value and anot... | habedi/stack-exchange-dataset |
40,840 | Distribution of Ones in a Psuedorandom Sequence | <p>Let S be a string in the set (0,1) produced by taking the AND of the output of two maximal length linear feedback shift registers of large period (say 128 bits). It's easy to see from the truth table of the AND gate that you will end up with a string consisting of (approximately) 75% zeroes and 25% ones with the one... | combinatorics probability theory pseudo random generators | 1 | Distribution of Ones in a Psuedorandom Sequence -- (combinatorics probability theory pseudo random generators)
<p>Let S be a string in the set (0,1) produced by taking the AND of the output of two maximal length linear feedback shift registers of large period (say 128 bits). It's easy to see from the truth table of the... | habedi/stack-exchange-dataset |
40,843 | What's the difference between physically based rendering and global illumination? | <p>I know that Physically based rendering means we try to simulate how light actually works in real world and global illumination is bouncing back of light when it strikes a surface. But what's actual difference between them and how are they related?</p>
 | algorithms | 1 | What's the difference between physically based rendering and global illumination? -- (algorithms)
<p>I know that Physically based rendering means we try to simulate how light actually works in real world and global illumination is bouncing back of light when it strikes a surface. But what's actual difference between th... | habedi/stack-exchange-dataset |
40,845 | I think I have a regular expression for a non-regular language | <p>Let $W = \{a^n b^m \mid n\ge m+5,m\le 5\}$, where $\Sigma=\{a, b\}$.</p>

<p>I have proved that this language is irregular through pumping Lemma. But through regular expression it is proving that the language is regular.
Can anyone please tell me that what should I consider it as. And does that happens?<... | regular languages automata regular expressions pumping lemma | 1 | I think I have a regular expression for a non-regular language -- (regular languages automata regular expressions pumping lemma)
<p>Let $W = \{a^n b^m \mid n\ge m+5,m\le 5\}$, where $\Sigma=\{a, b\}$.</p>

<p>I have proved that this language is irregular through pumping Lemma. But through regular expression it ... | habedi/stack-exchange-dataset |
40,848 | Bellman-Ford Termination when there is no change on vertex weights? | <p>We know the bellman-ford algorithms check all edges in each step, and for each edge if,</p>

<blockquote>
 <p>d(v)>d(u)+w(u,v)</p>
</blockquote>

<p>then d(v) being updated such that w(u,v) is the weight of edge (u, v) and d(u) is the length of best finding path for vertex <code>u</code>. if... | algorithms graphs shortest path | 1 | Bellman-Ford Termination when there is no change on vertex weights? -- (algorithms graphs shortest path)
<p>We know the bellman-ford algorithms check all edges in each step, and for each edge if,</p>

<blockquote>
 <p>d(v)>d(u)+w(u,v)</p>
</blockquote>

<p>then d(v) being updated such that w(u,... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.