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 |
|---|---|---|---|---|---|---|
19,409 | Is Knapsack Feasibility and Knapsack with Unit Values NP-Hard? | <p>It is well known that the maximization problem of Knapsack if NP-hard. How about just finding a feasible solution i.e. objective is set to zero? </p>

<p>And also if we set the <a href="http://en.wikipedia.org/wiki/Knapsack_problem" rel="nofollow">values</a> to all one (not the weights) in the objective of t... | complexity theory | 1 | Is Knapsack Feasibility and Knapsack with Unit Values NP-Hard? -- (complexity theory)
<p>It is well known that the maximization problem of Knapsack if NP-hard. How about just finding a feasible solution i.e. objective is set to zero? </p>

<p>And also if we set the <a href="http://en.wikipedia.org/wiki/Knapsack... | habedi/stack-exchange-dataset |
19,411 | Scheduling Algorithm with limitations | <p>I have a list of webpages and I must download them frequently, each webpage got a different download frequency. Based on this frequency we group the webpages in 5 groups:</p>

<pre><code>Items in group 1 are downloaded once per 1 hour
items in group 2 once per 2 hours
items in group 3 once per 3 hour... | algorithms | 1 | Scheduling Algorithm with limitations -- (algorithms)
<p>I have a list of webpages and I must download them frequently, each webpage got a different download frequency. Based on this frequency we group the webpages in 5 groups:</p>

<pre><code>Items in group 1 are downloaded once per 1 hour
items in group 2... | habedi/stack-exchange-dataset |
19,412 | NP-complete decision problems - how close can we come to a solution? | <p>After we prove that a certain <strong>optimization</strong> problem is NP-hard, the natural next step is to look for a polynomial algorithm that comes close to the optimal solution - preferrably with a constant approximation factor.</p>

<p>After we prove that a certain <strong>decision</strong> problem is N... | np complete approximation randomized algorithms | 1 | NP-complete decision problems - how close can we come to a solution? -- (np complete approximation randomized algorithms)
<p>After we prove that a certain <strong>optimization</strong> problem is NP-hard, the natural next step is to look for a polynomial algorithm that comes close to the optimal solution - preferrably ... | habedi/stack-exchange-dataset |
19,413 | Non intersecting paths in a graph | <p>I'm trying to come up with a good algorithm for the following decision problem:</p>

<p>Let $G=(V,A)$ be a directed graph and let $s,t \in V$. Are there at-least 2 non-intersecting paths from $s$ to $t$?</p>

<p>By non-intersecting I mean that if $P_1$ and $P_2$ are non-intersecting paths from $s$ to... | algorithms graphs shortest path | 1 | Non intersecting paths in a graph -- (algorithms graphs shortest path)
<p>I'm trying to come up with a good algorithm for the following decision problem:</p>

<p>Let $G=(V,A)$ be a directed graph and let $s,t \in V$. Are there at-least 2 non-intersecting paths from $s$ to $t$?</p>

<p>By non-intersectin... | habedi/stack-exchange-dataset |
19,421 | What's the problem of using the clock to generate random numbers? | <p>If the clock shows 14:15:36.909302, why not just use the fractions of a second part (09302) as a kind of random number? </p>

<p>What is wrong with this form of generating random numbers?</p>

<p>I am aware that obtaining truly random numbers is a difficult task, so I am assuming that there is someth... | randomness random number generator | 1 | What's the problem of using the clock to generate random numbers? -- (randomness random number generator)
<p>If the clock shows 14:15:36.909302, why not just use the fractions of a second part (09302) as a kind of random number? </p>

<p>What is wrong with this form of generating random numbers?</p>

<p... | habedi/stack-exchange-dataset |
19,427 | Does two languages being in P imply reduction to each other? | <p>Given two languages $L_1$ and $L_2$ that are in $\mathsf{P}$, can it be proven that there is a polynomial time reduction from $L_1$ to $L_2$ and vice versa? If so, how?</p>

<p>I noticed that if $L_1$ is the empty language, and $L_2$ is the "full language" $\{ 0,1 \}^*$, there does not seem to be a reduction... | complexity theory reductions polynomial time | 1 | Does two languages being in P imply reduction to each other? -- (complexity theory reductions polynomial time)
<p>Given two languages $L_1$ and $L_2$ that are in $\mathsf{P}$, can it be proven that there is a polynomial time reduction from $L_1$ to $L_2$ and vice versa? If so, how?</p>

<p>I noticed that if $L_... | habedi/stack-exchange-dataset |
19,430 | Why will the Hindley-Milner algorithm never yield a type like t1 -> t2? | <p>I'm reading about <a href="http://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system" rel="nofollow noreferrer">the Hindley-Milner typing algorithm</a> while writing an implementation, and see that, as long as every variable is bound, you'll always get either atomic types or types where the arguments will dete... | lambda calculus type theory typing type inference | 1 | Why will the Hindley-Milner algorithm never yield a type like t1 -> t2? -- (lambda calculus type theory typing type inference)
<p>I'm reading about <a href="http://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system" rel="nofollow noreferrer">the Hindley-Milner typing algorithm</a> while writing an implementation,... | habedi/stack-exchange-dataset |
19,452 | Queue, moving the element at the tail to the head | <p>Suppose I have a queue where I pull from left and push to the right, and suppose I have the contents in the queue as $a b c @ d e$ (from left to right, left is head, right is tail).</p>

<p>Is there a simple algorithm that doesn't require extra structures that makes $e$ at the head? meaning to get us to the ... | data structures queues | 1 | Queue, moving the element at the tail to the head -- (data structures queues)
<p>Suppose I have a queue where I pull from left and push to the right, and suppose I have the contents in the queue as $a b c @ d e$ (from left to right, left is head, right is tail).</p>

<p>Is there a simple algorithm that doesn't ... | habedi/stack-exchange-dataset |
19,453 | Decrypting transposition ciphers | <p>How do I see if the following ciphertext <code>eaeairtntrnaeemtve</code> is a transposition cipher, using letter frequency?</p>

<p><a href="http://en.wikipedia.org/wiki/Transposition_cipher" rel="nofollow">This</a> article suggest how to detect by using letter frequency detection and cryptanalysis but I am ... | cryptography | 1 | Decrypting transposition ciphers -- (cryptography)
<p>How do I see if the following ciphertext <code>eaeairtntrnaeemtve</code> is a transposition cipher, using letter frequency?</p>

<p><a href="http://en.wikipedia.org/wiki/Transposition_cipher" rel="nofollow">This</a> article suggest how to detect by using let... | habedi/stack-exchange-dataset |
19,468 | What circuit depth is required to add? | <p>If we suppose that we are given two numbers $a$ and $b$ to add, what circuit depth do we require to add them?</p>

<p>I'm wondering if $a$ and $b$ are $O(n)$, and thus the amount of bits required to store $a$ and $b$ are $O(\log_2(n))$, how much time and/or space we must require to add them. </p>

<... | circuits binary arithmetic | 1 | What circuit depth is required to add? -- (circuits binary arithmetic)
<p>If we suppose that we are given two numbers $a$ and $b$ to add, what circuit depth do we require to add them?</p>

<p>I'm wondering if $a$ and $b$ are $O(n)$, and thus the amount of bits required to store $a$ and $b$ are $O(\log_2(n))$, h... | habedi/stack-exchange-dataset |
19,480 | How to find the asymptotic runtime of these nested loops? | <pre><code>i=n; 
while(i>0) {
 k=1;
 for(j=1;j<=n:j+=k)
 k++;
 i=i/2;
}
</code></pre>

<p>The while loop has the complexity of $\lg(n)$ the j value of inner loop runs 1,3,6,10,15...
increase like 2,3,4,5,...</p>

<p>But how to find the overall complexity ?</p>... | algorithms algorithm analysis runtime analysis | 1 | How to find the asymptotic runtime of these nested loops? -- (algorithms algorithm analysis runtime analysis)
<pre><code>i=n; 
while(i>0) {
 k=1;
 for(j=1;j<=n:j+=k)
 k++;
 i=i/2;
}
</code></pre>

<p>The while loop has the complexity of $\lg(n)$ the j value of inner loop ... | habedi/stack-exchange-dataset |
19,482 | Why is deciding regularity of a context-free language undecidable? | <p>As I have studied, deciding regularity of context-free languages is undecidable.</p>

<p>However, we can test for regularity using the Myhill–Nerode theorem which provides a necessary and sufficient condition. So the problem should be decidable.</p>

<p>Where is my mistake?</p>
 | formal languages computability regular languages undecidability | 1 | Why is deciding regularity of a context-free language undecidable? -- (formal languages computability regular languages undecidability)
<p>As I have studied, deciding regularity of context-free languages is undecidable.</p>

<p>However, we can test for regularity using the Myhill–Nerode theorem which provides a... | habedi/stack-exchange-dataset |
19,503 | Weighted Set covering problem with a fixed number of colors | <p>I have a set of elements U = {1, 2, .... , n} and a set S of k sets whose union form the whole universe. Each of these sets is associated with a cost.</p>

<p>I have a fixed number of colors, C = {1 , 2, ... , m}. Some of the sets mentioned above interfere with each other. I cannot assign same color to both ... | algorithms graphs optimization | 1 | Weighted Set covering problem with a fixed number of colors -- (algorithms graphs optimization)
<p>I have a set of elements U = {1, 2, .... , n} and a set S of k sets whose union form the whole universe. Each of these sets is associated with a cost.</p>

<p>I have a fixed number of colors, C = {1 , 2, ... , m}.... | habedi/stack-exchange-dataset |
19,506 | Differences between the Actor Model and Communicating Sequential Processes (CSP) | <p>When we look at the <a href="http://en.wikipedia.org/wiki/Actor_model">Actor Model</a> and <a href="http://en.wikipedia.org/wiki/Communicating_sequential_processes">Communicating Sequential Processes</a> we see that they are both trying to do <a href="http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29">... | concurrency message passing | 1 | Differences between the Actor Model and Communicating Sequential Processes (CSP) -- (concurrency message passing)
<p>When we look at the <a href="http://en.wikipedia.org/wiki/Actor_model">Actor Model</a> and <a href="http://en.wikipedia.org/wiki/Communicating_sequential_processes">Communicating Sequential Processes</a>... | habedi/stack-exchange-dataset |
19,507 | Normal order sequencing vs applicative order sequencing | <p>I'm trying to understand <a href="http://www.cs.rpi.edu/academics/courses/spring11/proglang/handouts/lambda-calculus-chapter.pdf" rel="nofollow">this</a> lecture, section 2.7. Why would the normal order sequencing print out <code>"hello" "world"</code> and not <code>"world" "hello"</code>? I may be misinterpreting t... | logic lambda calculus | 1 | Normal order sequencing vs applicative order sequencing -- (logic lambda calculus)
<p>I'm trying to understand <a href="http://www.cs.rpi.edu/academics/courses/spring11/proglang/handouts/lambda-calculus-chapter.pdf" rel="nofollow">this</a> lecture, section 2.7. Why would the normal order sequencing print out <code>"hel... | habedi/stack-exchange-dataset |
19,519 | Simple explanation of Simon's Problem | <p>I just read the <a href="https://en.wikipedia.org/wiki/Simon%27s_problem" rel="nofollow">Wiki article for Simon's Problem</a> but I don't fully understand it because I don't follow the symbolic notation used to describe functions (I am not a computer scientist). </p>

<p>Can someone just briefly explain it i... | algorithms quantum computing | 1 | Simple explanation of Simon's Problem -- (algorithms quantum computing)
<p>I just read the <a href="https://en.wikipedia.org/wiki/Simon%27s_problem" rel="nofollow">Wiki article for Simon's Problem</a> but I don't fully understand it because I don't follow the symbolic notation used to describe functions (I am not a com... | habedi/stack-exchange-dataset |
19,520 | Transform values of hash functions like MD5 into numbers | <p>I have read about the hash function MD5. I found an online calculator which counts the value of MD5 for different data. But the MD5 function returns as result strings like <code>735b90b4568125ed6c3f678819b6e058</code>, so I can't apply any numerical operation to this value, e.g. <code>mod</code>.</p>

<p>How... | algorithms hash | 1 | Transform values of hash functions like MD5 into numbers -- (algorithms hash)
<p>I have read about the hash function MD5. I found an online calculator which counts the value of MD5 for different data. But the MD5 function returns as result strings like <code>735b90b4568125ed6c3f678819b6e058</code>, so I can't apply any... | habedi/stack-exchange-dataset |
19,525 | How to represent circles in x-y coordinates | <p>I would like to be able to represent circles in x-y coordinates.</p>

<p>Each circle contains an x and y coordinates and radius in double data type.</p>

<p>My goal is to compare circles with each other whether they are partially or completely overlapping.</p>

<p>I am looking for efficient i... | algorithms computational geometry modelling | 1 | How to represent circles in x-y coordinates -- (algorithms computational geometry modelling)
<p>I would like to be able to represent circles in x-y coordinates.</p>

<p>Each circle contains an x and y coordinates and radius in double data type.</p>

<p>My goal is to compare circles with each other wheth... | habedi/stack-exchange-dataset |
19,527 | If a one-way functions (OWF) exist, then there exits a OWF that is computable in quadratic running time by a padding argument | <p>I believe this question should be extremely easy but I am having a (embarrassing) hard time figuring out why its true if there exist OWF (computable in polynomial time) then there exits a OWF that is computed in $O(n^2)$.</p>

<p>This is what I have/tried.</p>

<p>Let $ \ f(x)$ be a OWF that can be c... | asymptotics cryptography one way functions | 1 | If a one-way functions (OWF) exist, then there exits a OWF that is computable in quadratic running time by a padding argument -- (asymptotics cryptography one way functions)
<p>I believe this question should be extremely easy but I am having a (embarrassing) hard time figuring out why its true if there exist OWF (compu... | habedi/stack-exchange-dataset |
19,536 | Rice Theorem - What is non-trivial property? | <p>Every nontrivial property of the recursively enumerable languages is undecidable.</p>

<p>What exactly is nontrivial property?</p>
 | turing machines undecidability rice theorem | 1 | Rice Theorem - What is non-trivial property? -- (turing machines undecidability rice theorem)
<p>Every nontrivial property of the recursively enumerable languages is undecidable.</p>

<p>What exactly is nontrivial property?</p>
 | habedi/stack-exchange-dataset |
19,541 | Can one reduce a problem of unknown complexity to a hard problem to show hardness? | <p>In <a href="http://www.dece.nctu.edu.tw/files/writing/7180_8835b76e.pdf" rel="nofollow">this</a> paper (page 3 Theorem 1) the authors want to prove that their problem is NP-complete. Their method is as follows. Let their problem be known as $P$. They show that their problem can be written as a $0\text{-}1$ integer p... | complexity theory reductions | 1 | Can one reduce a problem of unknown complexity to a hard problem to show hardness? -- (complexity theory reductions)
<p>In <a href="http://www.dece.nctu.edu.tw/files/writing/7180_8835b76e.pdf" rel="nofollow">this</a> paper (page 3 Theorem 1) the authors want to prove that their problem is NP-complete. Their method is a... | habedi/stack-exchange-dataset |
19,542 | Counting elements that are greater than the median of medians | <p>Short version: I want to know where the $-2$ comes from in the formula on p. 221 of <a href="https://mitpress.mit.edu/books/introduction-algorithms" rel="nofollow">CLRS 3rd edition</a>.</p>

<p>Long version: CLRS (3rd ed.) give an algorithm for $O(n)$ worst case arbitrary order statistic of $n$ distinct numb... | algorithm analysis combinatorics discrete mathematics | 1 | Counting elements that are greater than the median of medians -- (algorithm analysis combinatorics discrete mathematics)
<p>Short version: I want to know where the $-2$ comes from in the formula on p. 221 of <a href="https://mitpress.mit.edu/books/introduction-algorithms" rel="nofollow">CLRS 3rd edition</a>.</p>
&#... | habedi/stack-exchange-dataset |
19,543 | Existence of NP problems with complexity intermediate between P and NP-hard | <p>Assuming P!=NP, there is a result that there are decision problems intermediate between P and NP-complete. That is, the class NP cannot be a union of two disjoint subsets: P and NP-complete.</p>

<p>I could never quite understand the proof of the above result. The proof I saw in a textbook was starting with ... | complexity theory reference request np p vs np | 1 | Existence of NP problems with complexity intermediate between P and NP-hard -- (complexity theory reference request np p vs np)
<p>Assuming P!=NP, there is a result that there are decision problems intermediate between P and NP-complete. That is, the class NP cannot be a union of two disjoint subsets: P and NP-complete... | habedi/stack-exchange-dataset |
19,545 | Is safety-critical software a subset of real-time software? | <p>I would like to refute my hypothesis that all safety-critical software (that is, software where errors can have catastrophical consequences, either in terms of human lives or high material costs) is a real-time software (where tasks have timing constraints) by finding interesting counterexamples: systems without tim... | programming languages software engineering | 1 | Is safety-critical software a subset of real-time software? -- (programming languages software engineering)
<p>I would like to refute my hypothesis that all safety-critical software (that is, software where errors can have catastrophical consequences, either in terms of human lives or high material costs) is a real-tim... | habedi/stack-exchange-dataset |
19,562 | Turing Machine 'marking' specific portion of encoding | <p>Given a turing machine $T$ that receives an encoding of another turing machine and a word $<M><w>$, can $T$ 'run' through the encoding and 'mark' specific transitions/states?</p>

<p>For example, if I want to show that the language $L = \{<M><w>\}$ such that when we run $w$ in $M$ we ... | computability undecidability | 1 | Turing Machine 'marking' specific portion of encoding -- (computability undecidability)
<p>Given a turing machine $T$ that receives an encoding of another turing machine and a word $<M><w>$, can $T$ 'run' through the encoding and 'mark' specific transitions/states?</p>

<p>For example, if I want to ... | habedi/stack-exchange-dataset |
19,564 | Complexity analysis of while loop with two conditions | <p>I am curious how to do a line by line analysis of this piece of code using the "Big O" notation.</p>

<pre><code>i = 0;
j = 0;

while ( ( i < n ) && ( j < m ) )
{
 //do something
 i++;
 j++;
}
</code></pre>

<p>How I should represent nu... | algorithm analysis runtime analysis | 1 | Complexity analysis of while loop with two conditions -- (algorithm analysis runtime analysis)
<p>I am curious how to do a line by line analysis of this piece of code using the "Big O" notation.</p>

<pre><code>i = 0;
j = 0;

while ( ( i < n ) && ( j < m ) )
{
 //do someth... | habedi/stack-exchange-dataset |
19,577 | What can Idris not do by giving up Turing completeness? | <p>I know that <a href="https://en.wikipedia.org/wiki/Idris_%28programming_language%29">Idris</a> has dependent types but isn't turing complete. What can it not do by giving up Turing completeness, and is this related to having dependent types?</p>

<p>I guess this is quite a specific question, but I don't know... | computability programming languages type theory dependent types | 1 | What can Idris not do by giving up Turing completeness? -- (computability programming languages type theory dependent types)
<p>I know that <a href="https://en.wikipedia.org/wiki/Idris_%28programming_language%29">Idris</a> has dependent types but isn't turing complete. What can it not do by giving up Turing completenes... | habedi/stack-exchange-dataset |
19,578 | What is the order of the Pancake graph in Given example & what are the properties of Pancake graph? | <p>Pancake graph have least diameter & degree (log n/ log log n)</p>

<p>pancake Graph with order-2 will be one single line with two nodes, labeled with permutation of node {12, 21}.</p>

<p>pancake Graph with order-3 will be one single line with one hexagonal, labeled with permutation of node {123,... | graphs graph traversal | 1 | What is the order of the Pancake graph in Given example & what are the properties of Pancake graph? -- (graphs graph traversal)
<p>Pancake graph have least diameter & degree (log n/ log log n)</p>

<p>pancake Graph with order-2 will be one single line with two nodes, labeled with permutation of node {12, 21... | habedi/stack-exchange-dataset |
19,582 | 3-SAT problem with number of clauses equal to number of variables | <p>Consider the 3-SAT problem where the formula is in conjunctive normal form and we restrict the Boolean formulas such that the number of clauses in the formula is equal to the number of variables. Is this problem still NP-hard?</p>

<p>For example, this formula has $3$ variables and has $3$ clauses $(\lnot x_... | complexity theory np hard satisfiability | 1 | 3-SAT problem with number of clauses equal to number of variables -- (complexity theory np hard satisfiability)
<p>Consider the 3-SAT problem where the formula is in conjunctive normal form and we restrict the Boolean formulas such that the number of clauses in the formula is equal to the number of variables. Is this p... | habedi/stack-exchange-dataset |
19,591 | What makes PROLOG Turing-complete? | <p>I know that it can be proven PROLOG is Turing-complete by constructing a program that simulates a Turing machine like this:</p>

<pre><code>turing(Tape0, Tape) :-
 perform(q0, [], Ls, Tape0, Rs),
 reverse(Ls, Ls1),
 append(Ls1, Rs, Tape).

perform(qf, Ls, Ls, Rs, Rs) :- !.
pe... | programming languages turing completeness logic programming prolog | 1 | What makes PROLOG Turing-complete? -- (programming languages turing completeness logic programming prolog)
<p>I know that it can be proven PROLOG is Turing-complete by constructing a program that simulates a Turing machine like this:</p>

<pre><code>turing(Tape0, Tape) :-
 perform(q0, [], Ls, Tape0, Rs),... | habedi/stack-exchange-dataset |
19,598 | Can parameters be contra- or covariant in Python? | <p>I've just now studied about covariance and contravariance in static languages (more specifically C#). This concept is rather clear to me, however I'm in doubt on how this applies to dynamic languages like Python.</p>

<p>Since Python is duck typed (or structural typed) it seems to me that there is not even a... | programming languages type theory | 1 | Can parameters be contra- or covariant in Python? -- (programming languages type theory)
<p>I've just now studied about covariance and contravariance in static languages (more specifically C#). This concept is rather clear to me, however I'm in doubt on how this applies to dynamic languages like Python.</p>

<p... | habedi/stack-exchange-dataset |
19,599 | Reduction between $\Sigma^*$ and $\emptyset$ | <p>Throughout the subject of reductions, I was wondering:</p>

<blockquote>
 <p>If we take $L_1 = \Sigma^* $ and $L_2 = \emptyset$, is $L_1 \leq L_2$? is $L_2 \leq L_1$?</p>
</blockquote>

<p>What I mean is, Is there some sort of reduction between any of the two with the other one? </p>
&#x... | reductions | 1 | Reduction between $\Sigma^*$ and $\emptyset$ -- (reductions)
<p>Throughout the subject of reductions, I was wondering:</p>

<blockquote>
 <p>If we take $L_1 = \Sigma^* $ and $L_2 = \emptyset$, is $L_1 \leq L_2$? is $L_2 \leq L_1$?</p>
</blockquote>

<p>What I mean is, Is there some sort of redu... | habedi/stack-exchange-dataset |
19,616 | How do we know that all NP problems reduce to NP-hard problems? | <p>For example, how is it proven that any NP problem can reduce to subset sum, circuit satisfiability, etc.? Or could you link to a proof?</p>
 | complexity theory np complete np hard | 1 | How do we know that all NP problems reduce to NP-hard problems? -- (complexity theory np complete np hard)
<p>For example, how is it proven that any NP problem can reduce to subset sum, circuit satisfiability, etc.? Or could you link to a proof?</p>
 | habedi/stack-exchange-dataset |
19,619 | How to determine the maximum RAM capacity for an operating system? | <p>I was curious to know what limits the max RAM capacity for an OS while reading about microprocessors being 32-bit and 64-bit. I know that limit for 32-bit OS is 4GB and for 64-bit OS is 16 Exabytes, but my question is how do we get there? I found this calculation:</p>

<p>$\qquad 2^{32} = 4\,294\,967\,296$</... | computer architecture operating systems memory access | 1 | How to determine the maximum RAM capacity for an operating system? -- (computer architecture operating systems memory access)
<p>I was curious to know what limits the max RAM capacity for an OS while reading about microprocessors being 32-bit and 64-bit. I know that limit for 32-bit OS is 4GB and for 64-bit OS is 16 Ex... | habedi/stack-exchange-dataset |
19,625 | Local search: Problem with neighborhood definition | <p>I have question on understanding the following neighborhood relation within a local-search approximation scheme. 
Let $M$ be a legal matching on any bipartite graph. 
Let $U_k$ be the neighborhood defined as follows:
$$U_k := \{M' : |(M' \backslash M) \cup (M \backslash M')| \leq k\}$$</p>

<p>Ca... | optimization approximation heuristics bipartite matching | 1 | Local search: Problem with neighborhood definition -- (optimization approximation heuristics bipartite matching)
<p>I have question on understanding the following neighborhood relation within a local-search approximation scheme. 
Let $M$ be a legal matching on any bipartite graph. 
Let $U_k$ be the neighborhood... | habedi/stack-exchange-dataset |
19,628 | Can $\emptyset$ be reducible to any other language? | <p>While solving some question, that involved the empty set $\emptyset$, I was really wondering, is $\emptyset$ reducible to <em>any</em> other language, i.e., $\emptyset \leq A$ such that $A$ is a language over a given alphabet $\Sigma^*$?</p>

<p>I mean, one can never take $x \in \emptyset$, right? or am I mi... | computability reductions | 1 | Can $\emptyset$ be reducible to any other language? -- (computability reductions)
<p>While solving some question, that involved the empty set $\emptyset$, I was really wondering, is $\emptyset$ reducible to <em>any</em> other language, i.e., $\emptyset \leq A$ such that $A$ is a language over a given alphabet $\Sigma^*... | habedi/stack-exchange-dataset |
19,634 | Is there a shell between the kernel and hardware | <p>First and foremost, i know what a shell, kernel is. Now the dilemma.</p>

<p>Today i had my systems viva in college. The examiner asked me is there a shell between the hardware and the kernel. Obviously, i said no, and the gave the usual explanation that the shell is an interpreter, it takes the user input, ... | operating systems os kernel | 1 | Is there a shell between the kernel and hardware -- (operating systems os kernel)
<p>First and foremost, i know what a shell, kernel is. Now the dilemma.</p>

<p>Today i had my systems viva in college. The examiner asked me is there a shell between the hardware and the kernel. Obviously, i said no, and the gave... | habedi/stack-exchange-dataset |
19,636 | Classes and Algebras: Which begat which? | <p>Way back in the day I took a course on discrete structures and learned about how the mathematical notion of an algebra is akin to the class data type. </p>

<p>But I didn't know enough at the time to ask whether algebras are used to model classes or whether classes are actually derived from algebras (histori... | object oriented | 1 | Classes and Algebras: Which begat which? -- (object oriented)
<p>Way back in the day I took a course on discrete structures and learned about how the mathematical notion of an algebra is akin to the class data type. </p>

<p>But I didn't know enough at the time to ask whether algebras are used to model classes ... | habedi/stack-exchange-dataset |
19,641 | Can a semi-decidable problem be also decidable? | <p>As far as I understand, a <code>semi-decidable (recursively enumerable)</code> problem could be: </p>

<blockquote>
 <ol>
 <li>decidable (recursive) or </li>
 <li>undecidable (nonrecursively enumerable)</li>
 </ol>
</blockquote>

<p>This <a href="https://stackoverflow.com/ques... | terminology computability undecidability semi decidability | 1 | Can a semi-decidable problem be also decidable? -- (terminology computability undecidability semi decidability)
<p>As far as I understand, a <code>semi-decidable (recursively enumerable)</code> problem could be: </p>

<blockquote>
 <ol>
 <li>decidable (recursive) or </li>
 <li>undecidable (nonrec... | habedi/stack-exchange-dataset |
19,643 | Which algorithms can not be parallelized? | <p>Is there any algorithm which is very difficult to parallelize or the research is still active?</p>

<p>I wanted to know about any algorithm or any research field in parallel computing.</p>

<p>Anything, I searched for, has a 'parallel' implementation done. Just want to do some study on any unexplored... | algorithms parallel computing | 1 | Which algorithms can not be parallelized? -- (algorithms parallel computing)
<p>Is there any algorithm which is very difficult to parallelize or the research is still active?</p>

<p>I wanted to know about any algorithm or any research field in parallel computing.</p>

<p>Anything, I searched for, has a... | habedi/stack-exchange-dataset |
19,649 | How is this formula for dynamic array reached? | <p>I am reading through Skiena's "The Algorithm Design Manual". He analyses the number of copy operations performed in a dynamic array.</p>

<blockquote>
 <p>"Suppose we start with an array of size 1, and double its size from $m$ to $2m$ each time we run out of space. This doubling process involves allocat... | algorithms | 1 | How is this formula for dynamic array reached? -- (algorithms)
<p>I am reading through Skiena's "The Algorithm Design Manual". He analyses the number of copy operations performed in a dynamic array.</p>

<blockquote>
 <p>"Suppose we start with an array of size 1, and double its size from $m$ to $2m$ each t... | habedi/stack-exchange-dataset |
19,651 | Minimum number that cannot be formed by any subset of an array | <p>We have an array of Integers, $A[]$ and we have to find the minimum number that is not the sum of a subset of array using the elements from $L$ to $R$ indices. I was thinking of using coin change DP approach, and outputing the min number with value infinity. But the problem is that the sum of ranges can be as large ... | data structures dynamic programming | 1 | Minimum number that cannot be formed by any subset of an array -- (data structures dynamic programming)
<p>We have an array of Integers, $A[]$ and we have to find the minimum number that is not the sum of a subset of array using the elements from $L$ to $R$ indices. I was thinking of using coin change DP approach, and ... | habedi/stack-exchange-dataset |
19,663 | What program will derive the underlying algorithm in these question-answer pairs (updated)? | <p>Given this set of question-answer pairs, what program will derive the underlying algorithm and provide the correct answer for any question of the same format.</p>

<p><strong>Question-Answer Pairs (training set):</strong></p>

<pre><code>B:BA
BA:BB
BB:BAA
BAA:BAB
BAB:BBA
BBA:BBB&#... | machine learning artificial intelligence | 1 | What program will derive the underlying algorithm in these question-answer pairs (updated)? -- (machine learning artificial intelligence)
<p>Given this set of question-answer pairs, what program will derive the underlying algorithm and provide the correct answer for any question of the same format.</p>

<p><str... | habedi/stack-exchange-dataset |
19,664 | C(++) library for DFAs - free for academic use | <p>(I'm aware that software questions are better suited for stackoverflow, but since DFAs are not something that software developers usually care about, I hope it's alright if I ask here.)</p>

<p>I'm currently working on a project to do with regular overapproximations for context free languages. For this purpo... | reference request automata finite automata mathematical software | 1 | C(++) library for DFAs - free for academic use -- (reference request automata finite automata mathematical software)
<p>(I'm aware that software questions are better suited for stackoverflow, but since DFAs are not something that software developers usually care about, I hope it's alright if I ask here.)</p>

<... | habedi/stack-exchange-dataset |
19,667 | Is any language that can express its own compiler Turing-complete? | <p><a href="https://tex.stackexchange.com/questions/128454/are-there-any-open-research-problems-in-the-world-of-tex/153131?noredirect=1#comment289410_128464">A comment over on tex.SE</a> made me wonder. The statement is essentially:</p>

<blockquote>
 <p>If I can write a compiler for language X in language... | computability turing completeness | 1 | Is any language that can express its own compiler Turing-complete? -- (computability turing completeness)
<p><a href="https://tex.stackexchange.com/questions/128454/are-there-any-open-research-problems-in-the-world-of-tex/153131?noredirect=1#comment289410_128464">A comment over on tex.SE</a> made me wonder. The stateme... | habedi/stack-exchange-dataset |
19,668 | Difference between memory access and write-back in RISC pipeline | <p>I'm a little confused about the difference of the memory access and the write-back stage in a <code>RISC pipeline</code>.</p>

<p>We learned in class these following assumptions:</p>

<pre><code>arithmetic & logic: IF, OF, EX, WB
load: IF, OF, EX, MA, WB
store: IF, OF, EX, MA
branch: ... | computer architecture cpu pipelines | 1 | Difference between memory access and write-back in RISC pipeline -- (computer architecture cpu pipelines)
<p>I'm a little confused about the difference of the memory access and the write-back stage in a <code>RISC pipeline</code>.</p>

<p>We learned in class these following assumptions:</p>

<pre><code>... | habedi/stack-exchange-dataset |
19,672 | use of unconditional transfer of control instruction | <p>I did not understand why unconditional transfer of control instruction is used in cpu.So if we already know we have to jump to an instruction and skip some instruction irrespective of any condition then why do we not avoid writing those instruction as they will not be executed and replace them with instruction that... | computer architecture | 1 | use of unconditional transfer of control instruction -- (computer architecture)
<p>I did not understand why unconditional transfer of control instruction is used in cpu.So if we already know we have to jump to an instruction and skip some instruction irrespective of any condition then why do we not avoid writing those... | habedi/stack-exchange-dataset |
19,676 | How close are common programming languages to not being Turing complete? | <p>The term "Turing completeness" has been discussed in several of the Computer Science classes that I've taken. However, I've never gotten an intuitive feel for what Turing completeness actually requires. I found <a href="https://cs.stackexchange.com/questions/991/are-there-minimum-criteria-for-a-programming-language-... | programming languages turing completeness | 1 | How close are common programming languages to not being Turing complete? -- (programming languages turing completeness)
<p>The term "Turing completeness" has been discussed in several of the Computer Science classes that I've taken. However, I've never gotten an intuitive feel for what Turing completeness actually requ... | habedi/stack-exchange-dataset |
19,686 | Is regex golf NP-Complete? | <p>As seen in <a href="http://xkcd.com/1313/">this recent XKCD strip</a> and <a href="http://nbviewer.ipython.org/url/norvig.com/ipython/xkcd1313.ipynb">this recent blog post</a> from Peter Norvig (and a Slashdot story featuring the latter), "regex golf" (which might better be called the regular expression separation p... | complexity theory np complete regular expressions | 1 | Is regex golf NP-Complete? -- (complexity theory np complete regular expressions)
<p>As seen in <a href="http://xkcd.com/1313/">this recent XKCD strip</a> and <a href="http://nbviewer.ipython.org/url/norvig.com/ipython/xkcd1313.ipynb">this recent blog post</a> from Peter Norvig (and a Slashdot story featuring the latte... | habedi/stack-exchange-dataset |
19,687 | Smallest DFA that accepts given strings and rejects other given strings | <p>Given two sets $A,B$ of strings over alphabet $\Sigma$, can we compute the smallest deterministic finite-state automaton (DFA) $M$ such that $A \subseteq L(M)$ and $L(M) \subseteq \Sigma^*\setminus B$?</p>

<p>In other words, $A$ represents a set of positive examples. Every string in $A$ needs to be accepte... | regular languages automata finite automata machine learning | 1 | Smallest DFA that accepts given strings and rejects other given strings -- (regular languages automata finite automata machine learning)
<p>Given two sets $A,B$ of strings over alphabet $\Sigma$, can we compute the smallest deterministic finite-state automaton (DFA) $M$ such that $A \subseteq L(M)$ and $L(M) \subseteq ... | habedi/stack-exchange-dataset |
19,690 | Is this language context free? | <p>In a recent test, I was asked to recognize if the below language is context free:</p>

<p>$\qquad\displaystyle L = \{0^{n+m}1^{n+m}0^m \mid n,m \geq 0\}$ </p>

<p>I think it is context free, and can be accepted by below context free grammar, where $S$ is the start symbol and $Y$ is a non-terminal:</... | formal languages context free formal grammars | 1 | Is this language context free? -- (formal languages context free formal grammars)
<p>In a recent test, I was asked to recognize if the below language is context free:</p>

<p>$\qquad\displaystyle L = \{0^{n+m}1^{n+m}0^m \mid n,m \geq 0\}$ </p>

<p>I think it is context free, and can be accepted by belo... | habedi/stack-exchange-dataset |
19,716 | 0/1 Integer Programming and Karp's Reduction | <p>I have been reading Karp's famous paper on the NP-Completeness of different problems, <em>Reducibility among combinatorial problems</em>, and I have a question on the reduction from <em>SAT</em> to <em>0/1 Integer Programming</em> defined there.</p>

<p>The problem <em>0/1 Integer Programming</em> is defined... | np complete reductions | 1 | 0/1 Integer Programming and Karp's Reduction -- (np complete reductions)
<p>I have been reading Karp's famous paper on the NP-Completeness of different problems, <em>Reducibility among combinatorial problems</em>, and I have a question on the reduction from <em>SAT</em> to <em>0/1 Integer Programming</em> defined there... | habedi/stack-exchange-dataset |
19,717 | Solving the recurrency $T(n) = 2T(\sqrt{n}) + O(1)$ | <p>I need to solve the following recurrency: $T(n) = 2T(\sqrt{n}) + O(1)$. It's for a simple undergrad problem that a student asked me, but I really couldn't solve it. Since it is for an undergrad question, it would be nice to solve it only with algebraic manipulation and reduction to a well known recurrence, or in the... | asymptotics | 1 | Solving the recurrency $T(n) = 2T(\sqrt{n}) + O(1)$ -- (asymptotics)
<p>I need to solve the following recurrency: $T(n) = 2T(\sqrt{n}) + O(1)$. It's for a simple undergrad problem that a student asked me, but I really couldn't solve it. Since it is for an undergrad question, it would be nice to solve it only with algeb... | habedi/stack-exchange-dataset |
19,732 | Is the image of a total, non-decreasing function decidable? | <p>This is an exercise I've been struggling with for a while: </p>

<blockquote>
 <p>Let $g : \mathbb{N} \to \mathbb{N}$ be a total, non-decreasing function, i.e. $\forall x > y.\ g(x) \geq g(y)$. Is the image $I_g$ of $g$ a recursive set?</p>
</blockquote>

<p>Intuitively, I know that the i... | formal languages computability undecidability | 1 | Is the image of a total, non-decreasing function decidable? -- (formal languages computability undecidability)
<p>This is an exercise I've been struggling with for a while: </p>

<blockquote>
 <p>Let $g : \mathbb{N} \to \mathbb{N}$ be a total, non-decreasing function, i.e. $\forall x > y.\ g(x) \geq g(y... | habedi/stack-exchange-dataset |
19,736 | DFA for exactly two of a and one or more of b | <p>I'm totally new to DFA's and automaton in general -- this is the first week or two of class that I've actually seen this -- and I'm curious as to a pattern to match the following: </p>

<p>"Match the set of all strings on the alphabet {a, b} that have at least one b and exactly 2 a's" </p>

<p>I've t... | automata finite automata | 1 | DFA for exactly two of a and one or more of b -- (automata finite automata)
<p>I'm totally new to DFA's and automaton in general -- this is the first week or two of class that I've actually seen this -- and I'm curious as to a pattern to match the following: </p>

<p>"Match the set of all strings on the alphabe... | habedi/stack-exchange-dataset |
19,744 | Converting a digraph to an undirected graph in a reversible way | <p>I am looking for an algorithm to convert a digraph (directed graph) to an undirected graph in a reversible way, ie the digraph should be reconstructable if we are given the undirected graph. I understand that this will come in expense of the undirected graph having more vertices but I do not mind.</p>

<p>Do... | algorithms graphs | 1 | Converting a digraph to an undirected graph in a reversible way -- (algorithms graphs)
<p>I am looking for an algorithm to convert a digraph (directed graph) to an undirected graph in a reversible way, ie the digraph should be reconstructable if we are given the undirected graph. I understand that this will come in exp... | habedi/stack-exchange-dataset |
19,755 | Most common subset of size $k$ | <p>I'm trying to write an algorithm that detects the most common subset of at least size $k$, from a collection of sets. If there are ties for the most common subset, I want the one of them whose size is as large as possible.</p>

<p>For example if I have:</p>

<pre><code>s1 = {A, B, C }
s2 = {A,... | algorithms graphs sets data mining | 1 | Most common subset of size $k$ -- (algorithms graphs sets data mining)
<p>I'm trying to write an algorithm that detects the most common subset of at least size $k$, from a collection of sets. If there are ties for the most common subset, I want the one of them whose size is as large as possible.</p>

<p>For ex... | habedi/stack-exchange-dataset |
19,756 | Lower bound on running time for solving 3-SAT if P = NP | <p>Is there a lower bound on the running time for solving 3-SAT if P = NP. For instance, is it known that 3-SAT can't be solved in linear time? What about quadratic?</p>
 | complexity theory satisfiability lower bounds | 1 | Lower bound on running time for solving 3-SAT if P = NP -- (complexity theory satisfiability lower bounds)
<p>Is there a lower bound on the running time for solving 3-SAT if P = NP. For instance, is it known that 3-SAT can't be solved in linear time? What about quadratic?</p>
 | habedi/stack-exchange-dataset |
19,769 | Is regularity of the language accepted by a given Turing machine a semi-decidable property? | <p>Given is the definition of a general problem: $\{ \langle M, S\rangle \mid M \text{ is a } TM, L_M \in S\}$. In words: Given a TM M, does M decide a language that is an element of the given set of languages S?</p>

<p>I'm stuck with the following instance of that problem: $L = \{ \langle M \rangle \mid M \t... | formal languages computability turing machines semi decidability | 1 | Is regularity of the language accepted by a given Turing machine a semi-decidable property? -- (formal languages computability turing machines semi decidability)
<p>Given is the definition of a general problem: $\{ \langle M, S\rangle \mid M \text{ is a } TM, L_M \in S\}$. In words: Given a TM M, does M decide a langu... | habedi/stack-exchange-dataset |
19,771 | Why does Dijkstra's algorithm fail on a negative weighted graphs? | <p>I know this is probably very basic, I just can't wrap my head around it.<br>
We recently studied about Dijkstra's algorithm for finding the shortest path between two vertices on a weighted graph.</p>

<p>My professor said this algorithm will not work on a graph with negative edges, so I tried to figure o... | algorithms graphs shortest path weighted graphs | 1 | Why does Dijkstra's algorithm fail on a negative weighted graphs? -- (algorithms graphs shortest path weighted graphs)
<p>I know this is probably very basic, I just can't wrap my head around it.<br>
We recently studied about Dijkstra's algorithm for finding the shortest path between two vertices on a weighted graph... | habedi/stack-exchange-dataset |
19,776 | Is the set of Gödel numbers of computable constant functions recursively enumerable? | <p>I've been working on the following exercise:</p>

<blockquote>
 <p>$S = \{ x | f_x \text{ is constant} \}$. Is $S$ recursively enumerable?</p>
</blockquote>

<p>Here, $fx$ is the function computed by the $\text{x-th TM}$. So it is a computable function.</p>

<hr>

<p><strong... | computability semi decidability | 1 | Is the set of Gödel numbers of computable constant functions recursively enumerable? -- (computability semi decidability)
<p>I've been working on the following exercise:</p>

<blockquote>
 <p>$S = \{ x | f_x \text{ is constant} \}$. Is $S$ recursively enumerable?</p>
</blockquote>

<p>Here, $f... | habedi/stack-exchange-dataset |
19,777 | Transition systems that satisfy LTL but not CTL, and vice versa | <p>I am learning about temporal logic and model checking systems. One conceptual exercise that I am struggling with is how to create a transition system which satisfies only <em>one</em> of two given properties, when one is in LTL and one is in CTL. For example:</p>

<ul>
<li>Find a transition system that s... | logic model checking linear temporal logic computation tree logic | 1 | Transition systems that satisfy LTL but not CTL, and vice versa -- (logic model checking linear temporal logic computation tree logic)
<p>I am learning about temporal logic and model checking systems. One conceptual exercise that I am struggling with is how to create a transition system which satisfies only <em>one</em... | habedi/stack-exchange-dataset |
19,786 | Finite Automata Input Confusion | <p>I am looking at the following non-deterministic finite automata which accepts all strings that end with at least 2 bs. I am wondering what would happen when you have the input string 'abba' with this automata:</p>

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

<p>The possibl... | formal languages automata finite automata | 1 | Finite Automata Input Confusion -- (formal languages automata finite automata)
<p>I am looking at the following non-deterministic finite automata which accepts all strings that end with at least 2 bs. I am wondering what would happen when you have the input string 'abba' with this automata:</p>

<p><img src="h... | habedi/stack-exchange-dataset |
19,788 | Understanding a proof for the existance of a non-computable function | <p>For school, we have a proof that some functions are not Turing computable.
The example is:
$$ G(k) = \begin{cases} f_k(k) + 1 & \text{ if $f_k(k)$ is defined}, \\ 1 & \text{ otherwise}.\end{cases} $$</p>

<p>Claim: $G$ is non computable.</p>

<p>Proof: In view of obtaining a contradic... | computability turing machines undecidability | 1 | Understanding a proof for the existance of a non-computable function -- (computability turing machines undecidability)
<p>For school, we have a proof that some functions are not Turing computable.
The example is:
$$ G(k) = \begin{cases} f_k(k) + 1 & \text{ if $f_k(k)$ is defined}, \\ 1 & \text{ otherwis... | habedi/stack-exchange-dataset |
19,789 | How is a type system related to a progam? | <p>In another <a href="https://cs.stackexchange.com/q/19767/268">question</a> about Lambda Calculus, Andrej Bauer made the comment:</p>

<blockquote>
 <p>Lambda calculi of various forms are formal systems. They consist of
 abstract syntax (for terms and for types, if present), judgments
 (typing ... | programming languages type theory typing type checking | 1 | How is a type system related to a progam? -- (programming languages type theory typing type checking)
<p>In another <a href="https://cs.stackexchange.com/q/19767/268">question</a> about Lambda Calculus, Andrej Bauer made the comment:</p>

<blockquote>
 <p>Lambda calculi of various forms are formal systems.... | habedi/stack-exchange-dataset |
19,792 | Decomposing the search problem into several small problems | <p>I am looking for papers/methods (or at least problem examples) where the original search problem $P$ can be solved by either:</p>

<ol>
<li>Searching through the original graph. or</li>
<li>By decomposing it into several subset of problems $P_1,P_2, \dots,P_n$.</li>
</ol>

<p>Ideally $sol... | graphs reference request search algorithms search problem | 1 | Decomposing the search problem into several small problems -- (graphs reference request search algorithms search problem)
<p>I am looking for papers/methods (or at least problem examples) where the original search problem $P$ can be solved by either:</p>

<ol>
<li>Searching through the original graph. or</l... | habedi/stack-exchange-dataset |
19,794 | Is DSPACE properly contained in NSPACE? | <p>It may be a dumb question, but is $\mathsf{DSPACE}(f(n)) \subset \mathsf{NSPACE}(f(n))$ or is $\mathsf{DSPACE}(f(n)) \subseteq \mathsf{NSPACE}(f(n))$? In other words, is the containment relation proper or not? Wikipedia says the first one, while the ComplexityZoo says the other one.</p>
 | complexity theory complexity classes space complexity | 1 | Is DSPACE properly contained in NSPACE? -- (complexity theory complexity classes space complexity)
<p>It may be a dumb question, but is $\mathsf{DSPACE}(f(n)) \subset \mathsf{NSPACE}(f(n))$ or is $\mathsf{DSPACE}(f(n)) \subseteq \mathsf{NSPACE}(f(n))$? In other words, is the containment relation proper or not? Wikipe... | habedi/stack-exchange-dataset |
19,800 | Calculating eigenvalue gap of a torus graph | <p>Consider a two-dimensional grid with wrap-around edges (a doughnut-shaped graph). I need to calculate the second-largest eigenvalue of the adjacency matrix. Is there a faster way of computing it for such a special graph than a general method such as the "eigs" function in MATLAB?</p>
 | graphs linear algebra | 1 | Calculating eigenvalue gap of a torus graph -- (graphs linear algebra)
<p>Consider a two-dimensional grid with wrap-around edges (a doughnut-shaped graph). I need to calculate the second-largest eigenvalue of the adjacency matrix. Is there a faster way of computing it for such a special graph than a general method such... | habedi/stack-exchange-dataset |
19,807 | Is the following language context-free? $L= \{a^nb^m| m\geq2^n\}$ | <p>Is $L=\{a^nb^m|m\geq2^n\}$ a context-free language?</p>
 | formal languages context free pumping lemma | 1 | Is the following language context-free? $L= \{a^nb^m| m\geq2^n\}$ -- (formal languages context free pumping lemma)
<p>Is $L=\{a^nb^m|m\geq2^n\}$ a context-free language?</p>
 | habedi/stack-exchange-dataset |
19,808 | How does the 3-opt algorithm for TSP work? | <p>I understand that the 3-Opt Heuristic for solving the Traveling Salesman problem involves removing three edges from a graph and adding three more to recomplete the tour. However, I've seen many papers that mention that when three edges are removed, there remain only 2 possible ways to recombine the tour - this doesn... | algorithms optimization heuristics traveling salesman | 1 | How does the 3-opt algorithm for TSP work? -- (algorithms optimization heuristics traveling salesman)
<p>I understand that the 3-Opt Heuristic for solving the Traveling Salesman problem involves removing three edges from a graph and adding three more to recomplete the tour. However, I've seen many papers that mention t... | habedi/stack-exchange-dataset |
19,811 | Decidable languages kleene star closure - question on a proof | <p>I read a proof on the closure of decidable languages under kleene star. It begins by saying that the turing machine we want to find would non-determistically split the input string and then use the original decider of the language to approve the partition of each branch.</p>

<p>My question is, I can't under... | computability turing machines closure properties nondeterminism | 1 | Decidable languages kleene star closure - question on a proof -- (computability turing machines closure properties nondeterminism)
<p>I read a proof on the closure of decidable languages under kleene star. It begins by saying that the turing machine we want to find would non-determistically split the input string and t... | habedi/stack-exchange-dataset |
19,820 | Prove that A* is the smallest reflexive and transitive set containing A | <p>I'm trying to learn automata theory on my own and I am running into an issue with the second part of the question:</p>

<p>We say B is transitive if $BB\subseteq B$ and reflexive if $\epsilon \in B$</p>

<blockquote>
 <p>Show that A* is a reflexive and transitive set containing A and if B is any... | formal languages closure properties | 1 | Prove that A* is the smallest reflexive and transitive set containing A -- (formal languages closure properties)
<p>I'm trying to learn automata theory on my own and I am running into an issue with the second part of the question:</p>

<p>We say B is transitive if $BB\subseteq B$ and reflexive if $\epsilon \in ... | habedi/stack-exchange-dataset |
19,834 | If $L$ is CFL and $\overline{L}$ is CFL, then is L regular? | <p>I've seen in previous exams that professors marked the theory as correct:</p>

<blockquote>
 <p>If $L$ is CFL and $\overline{L}$ is CFL, then L is regular.</p>
</blockquote>

<p>I just don't see how this would work. How would we prove such a thing? I also can't come up with contradicting lan... | formal languages context free closure properties | 1 | If $L$ is CFL and $\overline{L}$ is CFL, then is L regular? -- (formal languages context free closure properties)
<p>I've seen in previous exams that professors marked the theory as correct:</p>

<blockquote>
 <p>If $L$ is CFL and $\overline{L}$ is CFL, then L is regular.</p>
</blockquote>

<p>... | habedi/stack-exchange-dataset |
19,844 | Number of different output labels in Local Binary Pattern | <p>I'm studying about Local Binary Pattern and I'm having trouble understanding the following part about the number of output labels for binary patterns from <em>Computer Vision using Local Binary Patterns</em>, by Pietikäinen et al. (2011):</p>

<blockquote>
 <p>Another extension to the original operator ... | image processing binary arithmetic | 1 | Number of different output labels in Local Binary Pattern -- (image processing binary arithmetic)
<p>I'm studying about Local Binary Pattern and I'm having trouble understanding the following part about the number of output labels for binary patterns from <em>Computer Vision using Local Binary Patterns</em>, by Pietikä... | habedi/stack-exchange-dataset |
19,848 | Word- or byte-addressable? Correct terminology | <p>Seemingly, a byte has established itself to be 8bit (is that correct?). RAM and NOR-flash can be normally accessed on a quite granular level, but it is up to the system architecture to determine if the smallest addressable unit is 8bit, 16bit or any other power of two bit number. Would the correct terminology be to ... | terminology computer architecture memory management memory access | 1 | Word- or byte-addressable? Correct terminology -- (terminology computer architecture memory management memory access)
<p>Seemingly, a byte has established itself to be 8bit (is that correct?). RAM and NOR-flash can be normally accessed on a quite granular level, but it is up to the system architecture to determine if t... | habedi/stack-exchange-dataset |
19,876 | Is it possible to prove EQTM is undecidable by the Rice theorem? | <p>Given the problem $EQ_{TM} = \{ \langle M_1, M_2\rangle \mid M_1 \text{ and } M_2 \text{ are } TM, L_{M_1} = L_{M_2}\}$, is it possible to prove that this is undecidable by using (a variant of) Rice theorem?</p>

<p>I have proven this problem by reduction to $E_{TM}$, but was wondering if it was easier to d... | computability turing machines undecidability | 1 | Is it possible to prove EQTM is undecidable by the Rice theorem? -- (computability turing machines undecidability)
<p>Given the problem $EQ_{TM} = \{ \langle M_1, M_2\rangle \mid M_1 \text{ and } M_2 \text{ are } TM, L_{M_1} = L_{M_2}\}$, is it possible to prove that this is undecidable by using (a variant of) Rice th... | habedi/stack-exchange-dataset |
19,880 | Turing Machine states | <p>When defining a Turing Machine formally, you enumerate its states. But I don't understand what states a TM can be in. Reading, Writing, and moving the head are the only ones that come to mind.</p>

<p>Specifically, the turing I am trying to describe behaves like this:</p>

<pre><code> WHILE the sy... | terminology turing machines | 1 | Turing Machine states -- (terminology turing machines)
<p>When defining a Turing Machine formally, you enumerate its states. But I don't understand what states a TM can be in. Reading, Writing, and moving the head are the only ones that come to mind.</p>

<p>Specifically, the turing I am trying to describe beha... | habedi/stack-exchange-dataset |
19,885 | Simulating a TM with a 2-head, right moving TM | <p>Is it possible to simulate a regular Turing Machine with a TM with the following specs?</p>

<ol>
<li>There are two heads, one of which can read, one of which can write</li>
<li>Both heads can only move right</li>
<li>When a head reads (or it writes) it moves right</li>
</ol>

<p>I kn... | turing machines turing completeness simulation | 1 | Simulating a TM with a 2-head, right moving TM -- (turing machines turing completeness simulation)
<p>Is it possible to simulate a regular Turing Machine with a TM with the following specs?</p>

<ol>
<li>There are two heads, one of which can read, one of which can write</li>
<li>Both heads can only move... | habedi/stack-exchange-dataset |
19,892 | Are references of any use without updating? | <p>Almost all type-theoretical treatments of references that I've studied introduce references as accompanied with at least three operations (sometimes including the fourth):</p>

<ol>
<li>Construction (allocation): $ \text{ref } e $</li>
<li>Elimination (dereferencing): $ !e $</li>
<li>Updating: $ ... | programming languages type theory | 1 | Are references of any use without updating? -- (programming languages type theory)
<p>Almost all type-theoretical treatments of references that I've studied introduce references as accompanied with at least three operations (sometimes including the fourth):</p>

<ol>
<li>Construction (allocation): $ \text{r... | habedi/stack-exchange-dataset |
19,898 | How feasible is it for a non-distributed web crawler running on consumer hardware to search the internet? | <p>I am looking for an automated way to answer the question: what are the URLs on the world wide web that contain at least two strings from a set of strings. </p>

<p>So if I have a set of strings {"A", "B" and "C"} -- I want to know, what pages on the world wide web contain "A" and B", "A" and "C", "B" and "C"... | algorithm analysis search problem searching | 1 | How feasible is it for a non-distributed web crawler running on consumer hardware to search the internet? -- (algorithm analysis search problem searching)
<p>I am looking for an automated way to answer the question: what are the URLs on the world wide web that contain at least two strings from a set of strings. </p>&#x... | habedi/stack-exchange-dataset |
19,901 | How can an extended linearizable history G be equivalent to sequential history S? | <p>I am undertaking a module in Concurrent Programming where some of the new content this year covers linearizability, the Java Memory Model, and sequential consistency. Our class slides are companion slides to <strong>The Art Of Multiprocessor Programming.</strong></p>

<p>I have been doing OK with linearizabi... | concurrency | 1 | How can an extended linearizable history G be equivalent to sequential history S? -- (concurrency)
<p>I am undertaking a module in Concurrent Programming where some of the new content this year covers linearizability, the Java Memory Model, and sequential consistency. Our class slides are companion slides to <strong>Th... | habedi/stack-exchange-dataset |
19,908 | Efficient Median Algorithm With Very Constrained Operators | <p>What is the most efficient algorithm for finding the median of an array when the available operations are limited to Max(), Min(), Multiply, Add, and no conditionals are allowed. Pivots and sorts are not allowed. The algorithm I have come up with so far seems very inefficient and goes like so:</p>

<ol>
... | algorithms search algorithms | 1 | Efficient Median Algorithm With Very Constrained Operators -- (algorithms search algorithms)
<p>What is the most efficient algorithm for finding the median of an array when the available operations are limited to Max(), Min(), Multiply, Add, and no conditionals are allowed. Pivots and sorts are not allowed. The algorit... | habedi/stack-exchange-dataset |
19,911 | Exponential averaging for SJF CPU scheduling | <blockquote>
 <p>Calculate the exponential averaging with $T_1 = 10$, $\alpha=0.5$ and the algorithm is SJF with previous runs as $8,7,4,16$.</p>
 
 <ol>
 <li>9 </li>
 <li>8 </li>
 <li>7.5 </li>
 <li>None</li>
 </ol>
</blockquote>

<p>I am getting 4. None as the answe... | operating systems process scheduling | 1 | Exponential averaging for SJF CPU scheduling -- (operating systems process scheduling)
<blockquote>
 <p>Calculate the exponential averaging with $T_1 = 10$, $\alpha=0.5$ and the algorithm is SJF with previous runs as $8,7,4,16$.</p>
 
 <ol>
 <li>9 </li>
 <li>8 </li>
 <li>7.5 </li>
 <l... | habedi/stack-exchange-dataset |
19,916 | Why have additional symbols on a Turing machine? | <p>What is the point of non-binary printed letters on a turing machine? I understand that these need to be omitted to get a computable number, but why are they used in the first place?</p>
 | computability turing machines | 1 | Why have additional symbols on a Turing machine? -- (computability turing machines)
<p>What is the point of non-binary printed letters on a turing machine? I understand that these need to be omitted to get a computable number, but why are they used in the first place?</p>
 | habedi/stack-exchange-dataset |
19,917 | Is there a way to compute time without system clock | <p>I was thinking about any method where we can use RAM I/O speed, to calculate time, let's say for example:
RAM transfer rate is 1000 MB/s, so when it's half full (about 500 M Bytes written), by dividing 500 by 1000 we get the time which is epoch + 0.5 seconds
so all in all we have three routines:</p>

... | operating systems clocks | 1 | Is there a way to compute time without system clock -- (operating systems clocks)
<p>I was thinking about any method where we can use RAM I/O speed, to calculate time, let's say for example:
RAM transfer rate is 1000 MB/s, so when it's half full (about 500 M Bytes written), by dividing 500 by 1000 we get the time w... | habedi/stack-exchange-dataset |
19,924 | Counting and finding all perfect/maximum matchings in general graphs | <p>Recently i've been dealing with a problem that led me to the following questions:</p>

<ul>
<li>Is there a good algorithm to enumerate all maximum/perfect matchings in a general graph?</li>
<li>Is there a good algorithm for finding all maximum/perfect matchings in a general graph?</li>
<li>Are th... | algorithms complexity theory graphs reference request matching | 1 | Counting and finding all perfect/maximum matchings in general graphs -- (algorithms complexity theory graphs reference request matching)
<p>Recently i've been dealing with a problem that led me to the following questions:</p>

<ul>
<li>Is there a good algorithm to enumerate all maximum/perfect matchings in ... | habedi/stack-exchange-dataset |
19,928 | Big-O in computer Science | <p>As the title states, I am asking for how the big-O in asymptotic analysis is used in theoretical computer science. It would be helpful if an example would be given.</p>
 | asymptotics | 1 | Big-O in computer Science -- (asymptotics)
<p>As the title states, I am asking for how the big-O in asymptotic analysis is used in theoretical computer science. It would be helpful if an example would be given.</p>
 | habedi/stack-exchange-dataset |
19,932 | Interpreting probabilistic time turning machines | <p>I was trying to understand better the definition of a strong PSRG and I came across this expression which I am trying to understand better:</p>

<p>$$ Pr_{r \in \{0,1\}^l}[A(r) = \text{"yes"}]$$</p>

<p>Where r is a truly random bit string and A is a polynomial time deterministic machine.
I've be... | terminology probability theory randomized algorithms randomness | 1 | Interpreting probabilistic time turning machines -- (terminology probability theory randomized algorithms randomness)
<p>I was trying to understand better the definition of a strong PSRG and I came across this expression which I am trying to understand better:</p>

<p>$$ Pr_{r \in \{0,1\}^l}[A(r) = \text{"yes"}... | habedi/stack-exchange-dataset |
19,944 | How do I apply patch sized features to larger images? | <p>I've been trying to teach myself some machine learning, and I wanted to ask what seems a simple question, but I've not been able to find any resources that explain the next step.</p>

<p>Let's say I am doing semi-supervised learning, and have a few hundred sparsely distributed feature extractors, trained on ... | machine learning image processing pattern recognition | 1 | How do I apply patch sized features to larger images? -- (machine learning image processing pattern recognition)
<p>I've been trying to teach myself some machine learning, and I wanted to ask what seems a simple question, but I've not been able to find any resources that explain the next step.</p>

<p>Let's say... | habedi/stack-exchange-dataset |
19,950 | $L \in RE/R$ such that $L^R \cup L \in R$ | <blockquote>
 <p>Prove/disprove: $\exists L \in RE/R$ such that $L^R \cup L \in R$</p>
</blockquote>

<p>Where in my context, $R$ is the turing decidable, and $RE$ is the recursively enurmable. I tried to find such an $L$ but couldn't. What I know for sure is that I need a language in $RE/R$ such that ... | formal languages computability | 1 | $L \in RE/R$ such that $L^R \cup L \in R$ -- (formal languages computability)
<blockquote>
 <p>Prove/disprove: $\exists L \in RE/R$ such that $L^R \cup L \in R$</p>
</blockquote>

<p>Where in my context, $R$ is the turing decidable, and $RE$ is the recursively enurmable. I tried to find such an $L$ but... | habedi/stack-exchange-dataset |
19,960 | Is it possible to encode an arbitrary computation as a series of NP complete problem instances? | <p>For example, can I make a compiler that transforms a C program (Turing complete language) into a bunch of SAT instances.</p>

<p>This encoding would be motivated as a way for specifying a problem piecemeal, where work on each piece could be verified in polynomial time.</p>
 | complexity theory computability np complete | 1 | Is it possible to encode an arbitrary computation as a series of NP complete problem instances? -- (complexity theory computability np complete)
<p>For example, can I make a compiler that transforms a C program (Turing complete language) into a bunch of SAT instances.</p>

<p>This encoding would be motivated as... | habedi/stack-exchange-dataset |
19,970 | Find the centre of a circle given two points lying on it and its radius | <p>We have been given 2 points on a circle and its radius. Now I want to find out the centre point of such a circle. How can I code this efficiently without solving the quadratic equations?</p>
 | algorithms computational geometry | 1 | Find the centre of a circle given two points lying on it and its radius -- (algorithms computational geometry)
<p>We have been given 2 points on a circle and its radius. Now I want to find out the centre point of such a circle. How can I code this efficiently without solving the quadratic equations?</p>
 | habedi/stack-exchange-dataset |
19,975 | Pick parameter function that minimises whole function | <p>I have a recursive algorithm defined by the following recursion.</p>

<p>$$T(n) = T(n/f(n)) + O(\log f(n)).$$</p>

<p>I want to find the function $f$ that minimizes $T(n)$. If $f$ is a constant then $T(n) = \Theta(\log n)$. If $f = O(n)$ then $T(n) = \Theta(\log n)$. Is this true for all functions $f... | asymptotics recurrence relation | 1 | Pick parameter function that minimises whole function -- (asymptotics recurrence relation)
<p>I have a recursive algorithm defined by the following recursion.</p>

<p>$$T(n) = T(n/f(n)) + O(\log f(n)).$$</p>

<p>I want to find the function $f$ that minimizes $T(n)$. If $f$ is a constant then $T(n) = \Th... | habedi/stack-exchange-dataset |
19,984 | Data Structure For Closest Pair Problem | <p>Suppose I have a list of distinct integers. I'm looking for a data structure that will support the operations <code>search</code>, <code>insert</code>, <code>delete</code> and <code>closest_pair</code> in $O(\log n)$ time. </p>

<p>I know that a sorted array supports <code>search</code>, <code>insert</code> ... | data structures search algorithms | 1 | Data Structure For Closest Pair Problem -- (data structures search algorithms)
<p>Suppose I have a list of distinct integers. I'm looking for a data structure that will support the operations <code>search</code>, <code>insert</code>, <code>delete</code> and <code>closest_pair</code> in $O(\log n)$ time. </p>

<... | habedi/stack-exchange-dataset |
20,014 | How to measure processing power of a quantum computer? | <p>Is there any way to get an equivalent of computing power of quantum computers in terms of computing power of common computers? I mean, how many teraflops (or so) can a quantum computer compute? How can I calculate that equivalence? I think it depends on the architecture, like a x64 in common computer, and a 512-qubi... | terminology quantum computing | 1 | How to measure processing power of a quantum computer? -- (terminology quantum computing)
<p>Is there any way to get an equivalent of computing power of quantum computers in terms of computing power of common computers? I mean, how many teraflops (or so) can a quantum computer compute? How can I calculate that equivale... | habedi/stack-exchange-dataset |
20,016 | Which is the equivalent processing of human brain in terms of computer processing? | <p>How many flops my brain can process, or how many GHz is a human brain capable of?
Is it valid to think that each celular brain is like a small cpu? (like cuda architecture). Our brains works in parallel, right?</p>
 | terminology human computing computer vs human | 1 | Which is the equivalent processing of human brain in terms of computer processing? -- (terminology human computing computer vs human)
<p>How many flops my brain can process, or how many GHz is a human brain capable of?
Is it valid to think that each celular brain is like a small cpu? (like cuda architecture). Our b... | habedi/stack-exchange-dataset |
20,017 | Solving AlienTiles with an A* heuristic | <p>Hello I am trying to solve the AlienTiles problem described at <a href="http://www.alientiles.com" rel="nofollow">alientiles.com</a> using the A* algorithm but I cannot find any good heuristic function so far.</p>

<p>In AlienTiles you have a board with $N \times N$ tiles, all coloured red. By clicking on a ... | algorithms search algorithms heuristics board games | 1 | Solving AlienTiles with an A* heuristic -- (algorithms search algorithms heuristics board games)
<p>Hello I am trying to solve the AlienTiles problem described at <a href="http://www.alientiles.com" rel="nofollow">alientiles.com</a> using the A* algorithm but I cannot find any good heuristic function so far.</p>
&#... | habedi/stack-exchange-dataset |
20,035 | What is a clairvoyant algorithm? | <p>When talking about general data structure design, my lecture notes talk about one of the concerns being cost of operations. As well as the individual cost, it mentions amortized cost. But then it goes on to say:</p>

<blockquote>
 <p>Amortized cost can be:</p>
 
 <ul>
 <li>absolute (e.g. ... | algorithms terminology data structures amortized analysis | 1 | What is a clairvoyant algorithm? -- (algorithms terminology data structures amortized analysis)
<p>When talking about general data structure design, my lecture notes talk about one of the concerns being cost of operations. As well as the individual cost, it mentions amortized cost. But then it goes on to say:</p>
&... | habedi/stack-exchange-dataset |
20,039 | detect closed shapes formed by points | <p>I plot several arrays containing xy-coordinates of points (using plot(x,y)) and obtain a plot with some curves. The curves form some very distinctive closed shapes (that is, the points describing the curves lie close to each other).</p>

<p>Now I need to find the (possibly approximate) centers of the closed ... | algorithms computational geometry | 1 | detect closed shapes formed by points -- (algorithms computational geometry)
<p>I plot several arrays containing xy-coordinates of points (using plot(x,y)) and obtain a plot with some curves. The curves form some very distinctive closed shapes (that is, the points describing the curves lie close to each other).</p>
... | habedi/stack-exchange-dataset |
20,042 | Direct construction of NFA for the difference of regular languages | <p>Let $A$ and $B$ be regular languages. Let $C$ be their difference, i.e $C = B \setminus A$.</p>

<p>Given NFAs for $A$ and $B$, is it possible to directly construct an NFA for $C$ without (implicitly or explicitly) converting them to DFAs first?</p>
 | automata finite automata | 1 | Direct construction of NFA for the difference of regular languages -- (automata finite automata)
<p>Let $A$ and $B$ be regular languages. Let $C$ be their difference, i.e $C = B \setminus A$.</p>

<p>Given NFAs for $A$ and $B$, is it possible to directly construct an NFA for $C$ without (implicitly or explicitl... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.