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
41,427
Are all NP-complete languages log-space reducible to each other?
<p>NP-complete languages are reducible to each other in polynomial time. Does this mean that they are also log-space reducible to each other?</p>&#xA;&#xA;<p>It seems as if this is true because in log-space, we can have polynomially many computations. </p>&#xA;
complexity theory np complete
1
Are all NP-complete languages log-space reducible to each other? -- (complexity theory np complete) <p>NP-complete languages are reducible to each other in polynomial time. Does this mean that they are also log-space reducible to each other?</p>&#xA;&#xA;<p>It seems as if this is true because in log-space, we can have ...
habedi/stack-exchange-dataset
41,439
If O(f) = O(g), why also Θ(f) = Θ(g)?
<p>How we can prove that if $O(f(x))=O(g(x))$ then $Θ(f(x))=Θ(g(x))$?</p>&#xA;
time complexity
1
If O(f) = O(g), why also Θ(f) = Θ(g)? -- (time complexity) <p>How we can prove that if $O(f(x))=O(g(x))$ then $Θ(f(x))=Θ(g(x))$?</p>&#xA;
habedi/stack-exchange-dataset
41,452
phrase searches and vector space model
<p>Consider a system that indexes documents based on vector space model and a simple query, such as <code>qwe asd</code>. When searching we assign weights to both words <code>qwe</code> and <code>asd</code> based on how often they appear in the index. The idea being that if word exists in larger number of documents the...
information retrieval
1
phrase searches and vector space model -- (information retrieval) <p>Consider a system that indexes documents based on vector space model and a simple query, such as <code>qwe asd</code>. When searching we assign weights to both words <code>qwe</code> and <code>asd</code> based on how often they appear in the index. Th...
habedi/stack-exchange-dataset
41,465
PAC learning model definition
<p>The probably approximately correct (PAC) learning model is defined as:</p>&#xA;&#xA;<p>A concept class $C$ is said to be PAC-learnable if there exists an algorithm $A$ and a polynomial function $poly(·,·,·,·)$ such that for any $ε>0$ and $δ>0$, for all distributions $D$ on $X$ and for any target concept $c∈C$, the f...
machine learning
1
PAC learning model definition -- (machine learning) <p>The probably approximately correct (PAC) learning model is defined as:</p>&#xA;&#xA;<p>A concept class $C$ is said to be PAC-learnable if there exists an algorithm $A$ and a polynomial function $poly(·,·,·,·)$ such that for any $ε>0$ and $δ>0$, for all distribution...
habedi/stack-exchange-dataset
41,473
A median of an AVL. How to take advantage of the AVL?
<p>Here is <a href="http://www.careercup.com/question?id=5756589822705664" rel="noreferrer">the source of my question.</a></p>&#xA;&#xA;<blockquote>&#xA; <p>Given a self-balancing tree (AVL), code a method that returns the&#xA; median.</p>&#xA; &#xA; <p>(Median: the numerical value separating the higher half of a d...
data structures search trees selection problem balanced search trees
1
A median of an AVL. How to take advantage of the AVL? -- (data structures search trees selection problem balanced search trees) <p>Here is <a href="http://www.careercup.com/question?id=5756589822705664" rel="noreferrer">the source of my question.</a></p>&#xA;&#xA;<blockquote>&#xA; <p>Given a self-balancing tree (AVL),...
habedi/stack-exchange-dataset
41,476
What do we know about $NP \cap co-NP$?
<ul>&#xA;<li>What do we need about the intersection of $NP$ and $co-NP$ apart from the fact that $P$ is a subset of it? </li>&#xA;</ul>&#xA;&#xA;<p>(beyond what these answers here say, <a href="https://cs.stackexchange.com/questions/38248/what-do-we-know-about-np-%E2%88%A9-co-np-and-its-relation-to-npi">What do we know...
complexity theory np complete probability theory probabilistic algorithms
1
What do we know about $NP \cap co-NP$? -- (complexity theory np complete probability theory probabilistic algorithms) <ul>&#xA;<li>What do we need about the intersection of $NP$ and $co-NP$ apart from the fact that $P$ is a subset of it? </li>&#xA;</ul>&#xA;&#xA;<p>(beyond what these answers here say, <a href="https://...
habedi/stack-exchange-dataset
41,477
If the language $A$ is decidable and the language $B$ is recognizable, then the language $A \cap B$ is recognizable?
<p>I am discussing with a friend the following question:</p>&#xA;&#xA;<p>If the language $A$ is decidable and the language $B$ is recognizable, Then the language $A \cap B$ is recognizable?</p>&#xA;&#xA;<p>I believe it is.&#xA;My point is that if the machine that recognizes B never halt in some string, so the bigger ma...
formal languages computability
1
If the language $A$ is decidable and the language $B$ is recognizable, then the language $A \cap B$ is recognizable? -- (formal languages computability) <p>I am discussing with a friend the following question:</p>&#xA;&#xA;<p>If the language $A$ is decidable and the language $B$ is recognizable, Then the language $A \c...
habedi/stack-exchange-dataset
41,479
What is the worst case running time for an algorithm that combines insertionsort and mergesort?
<p>Suppose that we have an algorithm "combination" that uses insertionsort for $n &lt; 100$ and mergesort for $n \geq 100$. Is the worst case running time of "combination" then $n^2$ or $n\log n$?</p>&#xA;&#xA;<p>I was thinking that it's simply $n^2$, since the algorithm "combination" allows inputs larger than 100, in ...
algorithms time complexity runtime analysis sorting
1
What is the worst case running time for an algorithm that combines insertionsort and mergesort? -- (algorithms time complexity runtime analysis sorting) <p>Suppose that we have an algorithm "combination" that uses insertionsort for $n &lt; 100$ and mergesort for $n \geq 100$. Is the worst case running time of "combinat...
habedi/stack-exchange-dataset
41,482
Find the minimum range
<p>Given a list of numbers as <code>L</code>, how do you find the minimum value <code>m</code> such that <code>L</code> can be made into a strictly ascending list by adding or subtracting values from <code>[0,m]</code> from each element of <code>L</code> except the last? (Strictly ascending means the new list can't hav...
algorithms integers
1
Find the minimum range -- (algorithms integers) <p>Given a list of numbers as <code>L</code>, how do you find the minimum value <code>m</code> such that <code>L</code> can be made into a strictly ascending list by adding or subtracting values from <code>[0,m]</code> from each element of <code>L</code> except the last? ...
habedi/stack-exchange-dataset
41,483
Oracle for an inverse function
<p>A. Let $F$ be a monotonically increasing real function from $[0,1]$ onto $[0,1]$. Given an oracle to $F$ and a number $y$, is there a way to calculate the inverse function $F^{-1}(y)$ in a finite number of calls to the oracle?</p>&#xA;&#xA;<p>I think the answer is no, because of a simple counting argument: there are...
complexity theory oracle machines
1
Oracle for an inverse function -- (complexity theory oracle machines) <p>A. Let $F$ be a monotonically increasing real function from $[0,1]$ onto $[0,1]$. Given an oracle to $F$ and a number $y$, is there a way to calculate the inverse function $F^{-1}(y)$ in a finite number of calls to the oracle?</p>&#xA;&#xA;<p>I th...
habedi/stack-exchange-dataset
41,489
Question about 'Software Transactional Memory' by Shavit and Touitou
<p>I've been reading the paper <a href="http://groups.csail.mit.edu/tds/papers/Shavit/ShavitTouitou.pdf" rel="nofollow"><code>Software Transactional Memory</code> by Shavit and Touitou</a>. I understand how STM works in general but I need to understand this paper as it is the founding paper of the concept. However, I'm...
concurrency
1
Question about 'Software Transactional Memory' by Shavit and Touitou -- (concurrency) <p>I've been reading the paper <a href="http://groups.csail.mit.edu/tds/papers/Shavit/ShavitTouitou.pdf" rel="nofollow"><code>Software Transactional Memory</code> by Shavit and Touitou</a>. I understand how STM works in general but I ...
habedi/stack-exchange-dataset
41,492
Are there algorithms with non-convex and non-concave computational complexity?
<p>If I am not mistaken, an algorithm that runs in time $\Theta(f(n))$ also runs in $\Theta(f(n) + a\sin(bn))$ where $a,b$ are conveniently chosen constants. Therefore I believe that the computational complexity of each algorithm <em>can</em> be described using a function that is <strong>neither convex nor concave</str...
algorithms complexity theory asymptotics
1
Are there algorithms with non-convex and non-concave computational complexity? -- (algorithms complexity theory asymptotics) <p>If I am not mistaken, an algorithm that runs in time $\Theta(f(n))$ also runs in $\Theta(f(n) + a\sin(bn))$ where $a,b$ are conveniently chosen constants. Therefore I believe that the computat...
habedi/stack-exchange-dataset
41,499
std::hash and separate chaining
<p>I'm attempting to implement my own generic hash table using separate chaining. I'm using the std::hash() method to create my hash function. I noticed in the description of std::hash() that:</p>&#xA;&#xA;<p>For two different parameters k1 and k2 that are not equal, the probability that std::hash()(k1) == std::hash(...
hash hash tables
1
std::hash and separate chaining -- (hash hash tables) <p>I'm attempting to implement my own generic hash table using separate chaining. I'm using the std::hash() method to create my hash function. I noticed in the description of std::hash() that:</p>&#xA;&#xA;<p>For two different parameters k1 and k2 that are not equ...
habedi/stack-exchange-dataset
41,509
Question about big O notation for function
<p>I'm just starting to learn Big O Notation and I was trying to understand how this function would scale:</p>&#xA;&#xA;<p>$\frac{n(n-3)}{4}$</p>&#xA;&#xA;<p>If the function was $n^2$, it would be quadratic, so O(n^2). However, the denominator gives me pause. Is this still a O(n^2) function? This is not homework. Thank...
asymptotics landau notation
1
Question about big O notation for function -- (asymptotics landau notation) <p>I'm just starting to learn Big O Notation and I was trying to understand how this function would scale:</p>&#xA;&#xA;<p>$\frac{n(n-3)}{4}$</p>&#xA;&#xA;<p>If the function was $n^2$, it would be quadratic, so O(n^2). However, the denominator ...
habedi/stack-exchange-dataset
41,516
A little confusion with the Knapsack problem (a worked example)
<p>I'm going through a worked example on the Knapsack problem:&#xA;<img src="https://i.stack.imgur.com/CUxuU.png" alt="enter image description here"></p>&#xA;&#xA;<p>My problem is that I don't understand quite follow the last bulletpoint. Where does the $x_4 = 4/5$ comes from? I know $x_4$ has to be a fraction of 1 (ot...
algorithms dynamic programming linear programming
1
A little confusion with the Knapsack problem (a worked example) -- (algorithms dynamic programming linear programming) <p>I'm going through a worked example on the Knapsack problem:&#xA;<img src="https://i.stack.imgur.com/CUxuU.png" alt="enter image description here"></p>&#xA;&#xA;<p>My problem is that I don't understa...
habedi/stack-exchange-dataset
41,518
Is there a complexity viewpoint of Galois' theorem?
<ul>&#xA;<li><p>Galois's theorem effectively says that one cannot express the roots of a polynomial of degree >= 5 using rational functions of coefficients and radicals - can't this be read to be saying that given a polynomial there is no deterministic algorithm to find the roots? </p></li>&#xA;<li><p>Now consider a de...
complexity theory np complete np polynomials
1
Is there a complexity viewpoint of Galois' theorem? -- (complexity theory np complete np polynomials) <ul>&#xA;<li><p>Galois's theorem effectively says that one cannot express the roots of a polynomial of degree >= 5 using rational functions of coefficients and radicals - can't this be read to be saying that given a po...
habedi/stack-exchange-dataset
41,519
Efficient algorithm for this optimization problem? Dynamic programming?
<p>I've created a diagram that depicts what I'm trying to accomplish.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/Bktqt.png" alt="Diagram"></p>&#xA;&#xA;<p><strong><a href="https://i.imgur.com/yPVywSA.png" rel="noreferrer">Full-size Image</a></strong></p>&#xA;&#xA;<p>In the input sequence, the nodes are as clos...
algorithms dynamic programming
1
Efficient algorithm for this optimization problem? Dynamic programming? -- (algorithms dynamic programming) <p>I've created a diagram that depicts what I'm trying to accomplish.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/Bktqt.png" alt="Diagram"></p>&#xA;&#xA;<p><strong><a href="https://i.imgur.com/yPVywSA.png...
habedi/stack-exchange-dataset
41,531
Are there any natural $\Pi_2^P$-complete problems?
<p>I know that the <a href="https://en.wikipedia.org/wiki/True_quantified_Boolean_formula">quantified Boolean formula problem</a> for a formula &#xA;$$&#xA;\psi = \forall x_1 \ldots \forall x_n \exists y_1 \ldots \exists y_n \phi &#xA;$$ &#xA;where $\phi$ contains no quantifiers and only the variables $x_1, \ldots, x_n...
complexity classes
1
Are there any natural $\Pi_2^P$-complete problems? -- (complexity classes) <p>I know that the <a href="https://en.wikipedia.org/wiki/True_quantified_Boolean_formula">quantified Boolean formula problem</a> for a formula &#xA;$$&#xA;\psi = \forall x_1 \ldots \forall x_n \exists y_1 \ldots \exists y_n \phi &#xA;$$ &#xA;wh...
habedi/stack-exchange-dataset
41,534
SPIN / Promela Verification
<p>I have this code here which performs the 'leader election' among a specified number of processes. In Promela, it is written as:</p>&#xA;&#xA;<pre><code> #define N 5 /* this is the number of processes */&#xA; #define I 3 /* node that is given the smallest number */&#xA; #define L 10 /* size of the buff...
computation models model checking
1
SPIN / Promela Verification -- (computation models model checking) <p>I have this code here which performs the 'leader election' among a specified number of processes. In Promela, it is written as:</p>&#xA;&#xA;<pre><code> #define N 5 /* this is the number of processes */&#xA; #define I 3 /* node that is give...
habedi/stack-exchange-dataset
41,536
Maximum edges in degree-restricted digraph
<p>How many edges can there be in a loop-free, asymmetric $n$-vertex digraph, if each node can have maximum total degree&nbsp;$k$ and minimum total degree&nbsp;$m$?</p>&#xA;&#xA;<p>That is,</p>&#xA;&#xA;<ol>&#xA;<li>There are no edges $(v,v)$ (self-loops),</li>&#xA;<li>if there is an edge $(u,v)$, there is no edge $(v,...
graphs
1
Maximum edges in degree-restricted digraph -- (graphs) <p>How many edges can there be in a loop-free, asymmetric $n$-vertex digraph, if each node can have maximum total degree&nbsp;$k$ and minimum total degree&nbsp;$m$?</p>&#xA;&#xA;<p>That is,</p>&#xA;&#xA;<ol>&#xA;<li>There are no edges $(v,v)$ (self-loops),</li>&#xA...
habedi/stack-exchange-dataset
41,544
Prove if $\{x^iy^jz^k \mid i \le2j\text{ or }j \le 3k\}$ is regular or not
<p>$$L = \{x^iy^jz^k \mid i \le2j\text{ or }j \le 3k\}$$</p>&#xA;&#xA;<p>To Prove: If given language is regular or not.</p>&#xA;&#xA;<p>I know that it is not a regular language but I am not able to come up with the string which I can use in the pumping lemma to prove that it is not regular.</p>&#xA;&#xA;<p>We can also ...
formal languages regular languages
1
Prove if $\{x^iy^jz^k \mid i \le2j\text{ or }j \le 3k\}$ is regular or not -- (formal languages regular languages) <p>$$L = \{x^iy^jz^k \mid i \le2j\text{ or }j \le 3k\}$$</p>&#xA;&#xA;<p>To Prove: If given language is regular or not.</p>&#xA;&#xA;<p>I know that it is not a regular language but I am not able to come up...
habedi/stack-exchange-dataset
41,549
Idea behind $\mathsf{NP}\subseteq\mathsf{P}/\mathsf{Poly}\implies\mathsf{P}=\mathsf{NP}$ not true?
<p>$\mathsf{3SAT}$ in $n$ variables is an $\mathsf{NP}$ complete problem.</p>&#xA;&#xA;<p>Augment input to $\mathsf{3SAT}$ with constants $\{a_i\}_{i=1}^{n^c}$ where each constant $|a_i|&lt;n^e$ to get an artificial problem ${\mathsf{3SAT}}_{aug}$. There is a direct reduction from $\mathsf{3SAT}$ to ${\mathsf{3SAT}}_{a...
complexity theory
1
Idea behind $\mathsf{NP}\subseteq\mathsf{P}/\mathsf{Poly}\implies\mathsf{P}=\mathsf{NP}$ not true? -- (complexity theory) <p>$\mathsf{3SAT}$ in $n$ variables is an $\mathsf{NP}$ complete problem.</p>&#xA;&#xA;<p>Augment input to $\mathsf{3SAT}$ with constants $\{a_i\}_{i=1}^{n^c}$ where each constant $|a_i|&lt;n^e$ to ...
habedi/stack-exchange-dataset
41,555
Does every problem in NP have an exponential time algorithm?
<p>I am not sure that every problem in NP have an exponential time algorithm. Since NP does not mean "not polynomial.", I think the answer is false. But I have no concrete reason about that.</p>&#xA;
algorithms np
1
Does every problem in NP have an exponential time algorithm? -- (algorithms np) <p>I am not sure that every problem in NP have an exponential time algorithm. Since NP does not mean "not polynomial.", I think the answer is false. But I have no concrete reason about that.</p>&#xA;
habedi/stack-exchange-dataset
41,560
Computational Complexity of 'Generic'/'Relaxed' Horn 3SAT
<p>Horn 3SAT are described as the 3SAT with at most one positive literal. And its in P. What about the complexity of relaxed case of 2-Horn 3SAT i.e. </p>&#xA;&#xA;<p>Each clause is in CNF, has exactly 3 literals, with at most 2 positive literals. </p>&#xA;&#xA;<p>Can someone please help with the reference.</p>&#xA;
complexity theory
1
Computational Complexity of 'Generic'/'Relaxed' Horn 3SAT -- (complexity theory) <p>Horn 3SAT are described as the 3SAT with at most one positive literal. And its in P. What about the complexity of relaxed case of 2-Horn 3SAT i.e. </p>&#xA;&#xA;<p>Each clause is in CNF, has exactly 3 literals, with at most 2 positive l...
habedi/stack-exchange-dataset
41,581
What type of algorithms are faster with a quantum computer?
<p>I am a beginning CS student and I am learning algorithms. I heard that even with quantum computers, that general sorting algorithms can never have better than $n\log n$ time. However, I also know that factoring algorithms would be a lot faster. In general terms what kind of algorithms would become substantially fast...
algorithms quantum computing
1
What type of algorithms are faster with a quantum computer? -- (algorithms quantum computing) <p>I am a beginning CS student and I am learning algorithms. I heard that even with quantum computers, that general sorting algorithms can never have better than $n\log n$ time. However, I also know that factoring algorithms w...
habedi/stack-exchange-dataset
41,587
Is there a known way to convert any $QBF_2$-formula into an equisatisfiable $QBF_2$-formula in CNF in polynomial time?
<p>It is easy to turn any boolean formula and any quantified boolean formula into an equisatisfiable formula in CNF using <em>Tseitin transformation</em>:</p>&#xA;&#xA;<p>$$&#xA;Q_1 z_1 Q_2 z_2 \ldots Q_n z_n \Phi \Rightarrow Q_1 z_1 Q_2 z_2 \ldots Q_n z_n \exists x ((\neg{x} \vee \Psi) \wedge \Phi[x/\Psi] ),\ Q_i \in ...
polynomial time propositional logic
1
Is there a known way to convert any $QBF_2$-formula into an equisatisfiable $QBF_2$-formula in CNF in polynomial time? -- (polynomial time propositional logic) <p>It is easy to turn any boolean formula and any quantified boolean formula into an equisatisfiable formula in CNF using <em>Tseitin transformation</em>:</p>&#...
habedi/stack-exchange-dataset
41,588
Do not understand why log n = O(n^c) (for any c>0)
<p>Can anyone help me understand this equation?</p>&#xA;&#xA;<blockquote>&#xA; <p>$\log (n) = O(n^c)$ (for any $c&gt;0$)</p>&#xA;</blockquote>&#xA;&#xA;<p>Does it mean that $O(\log (n)) &lt; O(n^c)$ (for any $c&gt;0$)?</p>&#xA;&#xA;<p>Added:</p>&#xA;&#xA;<p>Please also prove that $\log (n) = O(n^c)$ is true.</p>&#x...
asymptotics
1
Do not understand why log n = O(n^c) (for any c>0) -- (asymptotics) <p>Can anyone help me understand this equation?</p>&#xA;&#xA;<blockquote>&#xA; <p>$\log (n) = O(n^c)$ (for any $c&gt;0$)</p>&#xA;</blockquote>&#xA;&#xA;<p>Does it mean that $O(\log (n)) &lt; O(n^c)$ (for any $c&gt;0$)?</p>&#xA;&#xA;<p>Added:</p>&#x...
habedi/stack-exchange-dataset
41,595
How many ways are there to add a node to a digraph?
<p>In a digraph with $n$ vertices, how many different ways a new vertex can be added to get the digraphs with $n$+1 vertices? </p>&#xA;&#xA;<p>Input digraph with $n$ vertices have following degree criteria :</p>&#xA;&#xA;<ol>&#xA;<li>There are no edges $(v,v)$ (self-loops),</li>&#xA;<li>If there is an edge $(u,v)$, th...
graphs combinatorics
1
How many ways are there to add a node to a digraph? -- (graphs combinatorics) <p>In a digraph with $n$ vertices, how many different ways a new vertex can be added to get the digraphs with $n$+1 vertices? </p>&#xA;&#xA;<p>Input digraph with $n$ vertices have following degree criteria :</p>&#xA;&#xA;<ol>&#xA;<li>There a...
habedi/stack-exchange-dataset
41,601
How does one formulate a backtracking algorithm
<p>I am new to learning algorithms.&#xA;I was reading backtracking algorithm for generating all strings for n bits.&#xA;If I dry run the program I know the program is giving right result.&#xA;But I didn't understood the logic can anybody please explain? What I mean is what will be be the thought process to arrive at th...
algorithms backtracking
1
How does one formulate a backtracking algorithm -- (algorithms backtracking) <p>I am new to learning algorithms.&#xA;I was reading backtracking algorithm for generating all strings for n bits.&#xA;If I dry run the program I know the program is giving right result.&#xA;But I didn't understood the logic can anybody pleas...
habedi/stack-exchange-dataset
41,603
How must Grovers algorithm be modified in order to solve 3-SAT?
<p><a href="http://en.wikipedia.org/wiki/Grover%27s_algorithm" rel="nofollow">Grover's algorithm</a> was designed for a database with <strong>exactly one</strong> item that matches a given search criterion, and can be used to find that very item. </p>&#xA;&#xA;<p>However, when checking whether a given formula is in 3-S...
quantum computing 3 sat
1
How must Grovers algorithm be modified in order to solve 3-SAT? -- (quantum computing 3 sat) <p><a href="http://en.wikipedia.org/wiki/Grover%27s_algorithm" rel="nofollow">Grover's algorithm</a> was designed for a database with <strong>exactly one</strong> item that matches a given search criterion, and can be used to f...
habedi/stack-exchange-dataset
41,616
How do garbage collectors avoid stack overflow?
<p>So I was thinking about how garbage collectors work and I thought of an interesting issue. Presumably garbage collectors have to traverse all structures in the same way. They can't know weather they are traversing a linked list or a balanced tree or whatever. They also can't use up too much memory in their search. O...
programming languages memory management garbage collection
1
How do garbage collectors avoid stack overflow? -- (programming languages memory management garbage collection) <p>So I was thinking about how garbage collectors work and I thought of an interesting issue. Presumably garbage collectors have to traverse all structures in the same way. They can't know weather they are tr...
habedi/stack-exchange-dataset
41,618
Non-erasing Turing machines and loss of generality
<p>A non-erasing Turing machine is one that cannot replace a symbol with a blank unless the symbol under the read head is a blank. I'm trying to understand whether there is loss of generality because of this restriction.</p>&#xA;&#xA;<p>My guess is that there is no loss of generality, because the restriction above mer...
turing machines proof techniques
1
Non-erasing Turing machines and loss of generality -- (turing machines proof techniques) <p>A non-erasing Turing machine is one that cannot replace a symbol with a blank unless the symbol under the read head is a blank. I'm trying to understand whether there is loss of generality because of this restriction.</p>&#xA;&...
habedi/stack-exchange-dataset
41,625
How does a turing machine with doubly infinite tape simulate a normal-taped turing machine?
<p>The intuition is that on any input, we can write a symbol like $\#$ on the left that tells the machine to not move past this symbol. However, I'm running into problems trying to show this using the formal definition of a turing machine. It's not simple using the usual 7-tuple definition. Any help would be appreciate...
turing machines
1
How does a turing machine with doubly infinite tape simulate a normal-taped turing machine? -- (turing machines) <p>The intuition is that on any input, we can write a symbol like $\#$ on the left that tells the machine to not move past this symbol. However, I'm running into problems trying to show this using the formal...
habedi/stack-exchange-dataset
41,628
Why doesn't parallelism necessarily imply non-determinism?
<p>I'm a student reading a book on threads. And I got when I got to non-deterministic and parallel programs, I got a bit confused. I hope you can help me out. </p>&#xA;&#xA;<p>I understand the difference between concurrency and parallelism. I get that concurrent programs are non-deterministic depending on the precise t...
parallel computing concurrency nondeterminism
1
Why doesn't parallelism necessarily imply non-determinism? -- (parallel computing concurrency nondeterminism) <p>I'm a student reading a book on threads. And I got when I got to non-deterministic and parallel programs, I got a bit confused. I hope you can help me out. </p>&#xA;&#xA;<p>I understand the difference betwee...
habedi/stack-exchange-dataset
41,642
What is this trapezoid-shaped logic component?
<p>This is from <a href="http://www.cis.upenn.edu/~milom/cse240-Fall05/handouts/Ch05.pdf" rel="nofollow noreferrer">http://www.cis.upenn.edu/~milom/cse240-Fall05/handouts/Ch05.pdf</a> , slide 9.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/564de.png" alt="enter image description here"></p>&#xA;&#xA;<p><p>From th...
computer architecture arithmetic memory hardware
1
What is this trapezoid-shaped logic component? -- (computer architecture arithmetic memory hardware) <p>This is from <a href="http://www.cis.upenn.edu/~milom/cse240-Fall05/handouts/Ch05.pdf" rel="nofollow noreferrer">http://www.cis.upenn.edu/~milom/cse240-Fall05/handouts/Ch05.pdf</a> , slide 9.</p>&#xA;&#xA;<p><img src...
habedi/stack-exchange-dataset
41,645
provability of while loop vs for loop
<p><em>I'm abit afraid to ask this question here seeing as I <a href="https://softwareengineering.stackexchange.com/questions/279716/provability-of-while-loop-vs-for-loop">asked it on programmers SE</a> already, the thing is I think the question is more about the underlying theory than the use in practice (or call it c...
correctness proof loops
1
provability of while loop vs for loop -- (correctness proof loops) <p><em>I'm abit afraid to ask this question here seeing as I <a href="https://softwareengineering.stackexchange.com/questions/279716/provability-of-while-loop-vs-for-loop">asked it on programmers SE</a> already, the thing is I think the question is more...
habedi/stack-exchange-dataset
41,650
Memory access on byte/word addressable memory
<p>I'm doing a question on architecture and I've come across this question which I do not understand how to answer the question.</p>&#xA;&#xA;<p>Q. How many bits are required to address 4G x 32-bit main memory if</p>&#xA;&#xA;<p>a) Main memory is word addressable&#xA;b) Main memory is byte addressable</p>&#xA;&#xA;<p>I...
computer architecture
1
Memory access on byte/word addressable memory -- (computer architecture) <p>I'm doing a question on architecture and I've come across this question which I do not understand how to answer the question.</p>&#xA;&#xA;<p>Q. How many bits are required to address 4G x 32-bit main memory if</p>&#xA;&#xA;<p>a) Main memory is ...
habedi/stack-exchange-dataset
41,651
Tree decomposition - Fastest algorithm in practise
<p>I'm looking for a fast in practice algorithm for calculating the (preferable optimized) tree decomposition of a graph. </p>&#xA;&#xA;<p>I found the paper "A linear time algorithm for finding tree-decompositions of small treewidth" [1] by Hans L. Bodlaender which return a tree-decompsiton with the optimized tree-wid...
graphs time complexity runtime analysis
1
Tree decomposition - Fastest algorithm in practise -- (graphs time complexity runtime analysis) <p>I'm looking for a fast in practice algorithm for calculating the (preferable optimized) tree decomposition of a graph. </p>&#xA;&#xA;<p>I found the paper "A linear time algorithm for finding tree-decompositions of small t...
habedi/stack-exchange-dataset
41,655
NDTM for Graph Clique Problem in poly-time
<p>I am having a doubt. This is my NDTM algorithm:</p>&#xA;&#xA;<p>GCP(G, k):</p>&#xA;&#xA;<ul>&#xA;<li>generate a list with k distinct nodes from graph G</li>&#xA;<li>generate an adjacency matrix, fill it with 1 if an edge exist, 0 otherwise </li>&#xA;<li>check if every row has only 1-s, hence return <em>Yes</em>, oth...
turing machines nondeterminism clique
1
NDTM for Graph Clique Problem in poly-time -- (turing machines nondeterminism clique) <p>I am having a doubt. This is my NDTM algorithm:</p>&#xA;&#xA;<p>GCP(G, k):</p>&#xA;&#xA;<ul>&#xA;<li>generate a list with k distinct nodes from graph G</li>&#xA;<li>generate an adjacency matrix, fill it with 1 if an edge exist, 0 o...
habedi/stack-exchange-dataset
41,657
Confusing example of a language which may be Context-free or not context-free
<p>Hi so consider the language $L= \{(0^i)(1^j)\mid i=k*j \text{ for some positive }k\}$ Could I not rewrite this as $\{((0^k)^j)(b^j)\mid k&gt;1\}$. Seeing it in this form makes me think of a form $a^n b^n$ which we know is context free so therefore it should be context free. Is my logic wrong and if not what would be...
formal languages context free closure properties
1
Confusing example of a language which may be Context-free or not context-free -- (formal languages context free closure properties) <p>Hi so consider the language $L= \{(0^i)(1^j)\mid i=k*j \text{ for some positive }k\}$ Could I not rewrite this as $\{((0^k)^j)(b^j)\mid k&gt;1\}$. Seeing it in this form makes me think ...
habedi/stack-exchange-dataset
41,663
Evaluating Grover's algorithm on 3-SAT
<p>I recently asked <a href="https://cs.stackexchange.com/questions/41603/how-must-grovers-algorithm-be-modified-in-order-to-solve-3-sat">this</a> very similar question on how Grovers algorithm must be modified in order to solve 3-SAT and learned that it actually needs no modification at all. </p>&#xA;&#xA;<p>However, ...
quantum computing 3 sat
1
Evaluating Grover's algorithm on 3-SAT -- (quantum computing 3 sat) <p>I recently asked <a href="https://cs.stackexchange.com/questions/41603/how-must-grovers-algorithm-be-modified-in-order-to-solve-3-sat">this</a> very similar question on how Grovers algorithm must be modified in order to solve 3-SAT and learned that ...
habedi/stack-exchange-dataset
41,664
Confused about XORing and addition modulo $2$
<p>It's my understanding that when you XOR something, <a href="https://en.wikipedia.org/wiki/Exclusive_or#Properties" rel="noreferrer">the result is the sum of the two numbers mod <span class="math-container">$2$</span></a>. </p>&#xA;&#xA;<p>Why then does <span class="math-container">$4 \oplus 2 = 6$</span> and not <sp...
arithmetic
1
Confused about XORing and addition modulo $2$ -- (arithmetic) <p>It's my understanding that when you XOR something, <a href="https://en.wikipedia.org/wiki/Exclusive_or#Properties" rel="noreferrer">the result is the sum of the two numbers mod <span class="math-container">$2$</span></a>. </p>&#xA;&#xA;<p>Why then does <s...
habedi/stack-exchange-dataset
41,681
Maximize distance between k nodes in a graph
<p>I have an undirected unweighted graph $G$ and I want to select $k$ nodes from $G$ such that they are pairwise as far as possible from each other, in terms of <a href="https://en.wikipedia.org/wiki/Distance_%28graph_theory%29">geodesic distance</a>. In other words they have to be spread around the graph as possible....
algorithms graphs
1
Maximize distance between k nodes in a graph -- (algorithms graphs) <p>I have an undirected unweighted graph $G$ and I want to select $k$ nodes from $G$ such that they are pairwise as far as possible from each other, in terms of <a href="https://en.wikipedia.org/wiki/Distance_%28graph_theory%29">geodesic distance</a>. ...
habedi/stack-exchange-dataset
41,684
Turing Machines and Algorithm for Language Acceptance
<p>Is there an algorithm to decide if any two Turing machines accept the same language? I can't find a definite answer to this. My guess is that there isn't, because then we would be able to decide if a Turing machine accepts a given language and halts, which is undecidable. Is there a better explanation for why thi...
computability turing machines
1
Turing Machines and Algorithm for Language Acceptance -- (computability turing machines) <p>Is there an algorithm to decide if any two Turing machines accept the same language? I can't find a definite answer to this. My guess is that there isn't, because then we would be able to decide if a Turing machine accepts a g...
habedi/stack-exchange-dataset
41,693
Information Systems (IS) and Data Warehouse
<p>I'm working on a research project about the adoption of DWH systems and doing some literature review I find many documents that refer to Information System. I tried to find the right definition of information system and if a data warehouse can be considered an IS or not, or is just a subset of it.&#xA;In the wider d...
terminology databases
1
Information Systems (IS) and Data Warehouse -- (terminology databases) <p>I'm working on a research project about the adoption of DWH systems and doing some literature review I find many documents that refer to Information System. I tried to find the right definition of information system and if a data warehouse can be...
habedi/stack-exchange-dataset
41,697
If an NP problem reduces to an NPC problem, it is NPC?
<p>Is the following statement true?</p>&#xA;&#xA;<blockquote>&#xA; <p>If a problem P<sub>1</sub> is in NP and polynomial time reducible to P<sub>2</sub>, where P<sub>2</sub> is NP-complete, then P<sub>1</sub> is also NP-complete.</p>&#xA;</blockquote>&#xA;&#xA;<p>Intuitively I think the answer is &#xA;No because I nee...
complexity theory np complete reductions np
1
If an NP problem reduces to an NPC problem, it is NPC? -- (complexity theory np complete reductions np) <p>Is the following statement true?</p>&#xA;&#xA;<blockquote>&#xA; <p>If a problem P<sub>1</sub> is in NP and polynomial time reducible to P<sub>2</sub>, where P<sub>2</sub> is NP-complete, then P<sub>1</sub> is als...
habedi/stack-exchange-dataset
41,698
Linearizability and Serializability in context of Software Transactional Memory
<p>I've been trying to grasp serializability and linearizability in the context of software transactional memory. However, I think both notions can be applied to transactional memory in general.</p>&#xA;&#xA;<p>At this point, the following is my understanding of both subjects.</p>&#xA;&#xA;<h1>Serializability</h1>&#xA;...
distributed systems concurrency databases
1
Linearizability and Serializability in context of Software Transactional Memory -- (distributed systems concurrency databases) <p>I've been trying to grasp serializability and linearizability in the context of software transactional memory. However, I think both notions can be applied to transactional memory in general...
habedi/stack-exchange-dataset
41,700
Which bound is better, a logarithmic or a polynomial with arbitrarily small degree?
<p>I have a randomized approximation algorithm which can be tuned by selecting the randomization probabilities. I found out that:</p>&#xA;&#xA;<ul>&#xA;<li>For any $\epsilon &gt;0$, there are probabilities for which the approximation factor is $O(n^\epsilon)$.</li>&#xA;<li>There are probabilities for which the approxim...
algorithm analysis asymptotics approximation
1
Which bound is better, a logarithmic or a polynomial with arbitrarily small degree? -- (algorithm analysis asymptotics approximation) <p>I have a randomized approximation algorithm which can be tuned by selecting the randomization probabilities. I found out that:</p>&#xA;&#xA;<ul>&#xA;<li>For any $\epsilon &gt;0$, ther...
habedi/stack-exchange-dataset
41,704
Given a set of LTL formulas, on which states does the Kripke structure hold?
<p>I'm currently learning about LTL and CTL formulas and to get a better understanding I try to manually interpret the formulas over a given Kripke structure. Since I'm not 100% sure if my results are correct I would appreciate if anyone can verify them.</p>&#xA;<p><strong>Task:</strong></p>&#xA;<p>I showed on which st...
logic model checking linear temporal logic temporal logic
1
Given a set of LTL formulas, on which states does the Kripke structure hold? -- (logic model checking linear temporal logic temporal logic) <p>I'm currently learning about LTL and CTL formulas and to get a better understanding I try to manually interpret the formulas over a given Kripke structure. Since I'm not 100% su...
habedi/stack-exchange-dataset
41,713
How can I formalize key value stores with set theory?
<p>I'm currently developing a simple key-value NoSQL store and want to build its formal model. I found article about key value formalisation <a href="http://cacm.acm.org/magazines/2011/4/106584-a-co-relational-model-of-data-for-large-shared-data-banks/fulltext" rel="nofollow">with category theory</a>, but I'm intereste...
sets database theory databases category theory storage
1
How can I formalize key value stores with set theory? -- (sets database theory databases category theory storage) <p>I'm currently developing a simple key-value NoSQL store and want to build its formal model. I found article about key value formalisation <a href="http://cacm.acm.org/magazines/2011/4/106584-a-co-relatio...
habedi/stack-exchange-dataset
41,716
Approximating the set of witnesses of a BPP algorithm
<p>Let $\mathcal{A}$ be a randomized algorithm that decides a language $\mathcal{L}$. For each input $x\in\mathcal{L}$, we define the set of witnesses of $x$ as $W(\mathcal{A},x) = \{r\in\{0,1\}^n:\mathcal{A}(x,r) \text{ accepts}\}$. Suppose that $\mathcal{A}$ is a $\mathsf{BPP}$ algorithm. We wish to show that there ...
complexity theory randomized algorithms
1
Approximating the set of witnesses of a BPP algorithm -- (complexity theory randomized algorithms) <p>Let $\mathcal{A}$ be a randomized algorithm that decides a language $\mathcal{L}$. For each input $x\in\mathcal{L}$, we define the set of witnesses of $x$ as $W(\mathcal{A},x) = \{r\in\{0,1\}^n:\mathcal{A}(x,r) \text{ ...
habedi/stack-exchange-dataset
41,719
The most appropriate way to implement a heap is with an array rather than a linked list, why is this?
<p>The most appropriate way to implement a heap is with an array rather than a linked list, why is this?</p>&#xA;&#xA;<p>I don't completely comprehend why this is? is it because it is easier to traverse?</p>&#xA;
data structures
1
The most appropriate way to implement a heap is with an array rather than a linked list, why is this? -- (data structures) <p>The most appropriate way to implement a heap is with an array rather than a linked list, why is this?</p>&#xA;&#xA;<p>I don't completely comprehend why this is? is it because it is easier to tra...
habedi/stack-exchange-dataset
41,724
How was the ALU implemented in the first computer (i.e., Babbage's analytical engine)?
<p>I've seen circuit level implementations of ALU's before, but how are NOT/AND/ADD performed <strong>mechanically</strong>?</p>&#xA;
logic computer architecture arithmetic history
1
How was the ALU implemented in the first computer (i.e., Babbage's analytical engine)? -- (logic computer architecture arithmetic history) <p>I've seen circuit level implementations of ALU's before, but how are NOT/AND/ADD performed <strong>mechanically</strong>?</p>&#xA;
habedi/stack-exchange-dataset
41,728
Is there an intuitive proof for the existence of hard functions?
<p>I am referring to the theorem on page 115 of the book by Arora and Barak, which states that, ``For every $n&gt;1$, there exists a function $f:\{0,1\}^n \rightarrow \{0,1\}$ that cannot be computed by a circuit $C$ of size $\frac{2^n}{10n}$"</p>&#xA;&#xA;<ul>&#xA;<li>Can someone give a more intuitive proof of this th...
complexity theory lower bounds circuits boolean algebra
1
Is there an intuitive proof for the existence of hard functions? -- (complexity theory lower bounds circuits boolean algebra) <p>I am referring to the theorem on page 115 of the book by Arora and Barak, which states that, ``For every $n&gt;1$, there exists a function $f:\{0,1\}^n \rightarrow \{0,1\}$ that cannot be com...
habedi/stack-exchange-dataset
41,730
Is the question of whether the language of a DFA/CFG is equal to a particular set of string decidable?
<p>Suppose I have a set of strings $S$ that is generated from the alphabet. Suppose I have a DFA $D$ and a CFG $G$, are the questions of</p>&#xA;&#xA;<ul>&#xA;<li>$\{D\mid D\text{ is a DFA and }L(D) = S\}$ and </li>&#xA;<li>$\{G\mid G\text{ is a CFG and }L(G) = S\}$ </li>&#xA;</ul>&#xA;&#xA;<p>decidable?</p>&#xA;&#xA;<...
computability context free finite automata undecidability
1
Is the question of whether the language of a DFA/CFG is equal to a particular set of string decidable? -- (computability context free finite automata undecidability) <p>Suppose I have a set of strings $S$ that is generated from the alphabet. Suppose I have a DFA $D$ and a CFG $G$, are the questions of</p>&#xA;&#xA;<ul>...
habedi/stack-exchange-dataset
41,731
Is relative regularity distinct from regularity?
<p>Let $L$ and $G$ be languages over a finite alphabet $\Sigma$.&#xA;$L$ is <em>regular relative to</em> $G$ if $L \subseteq G$ and there is a finite automaton that accepts every input in $L$, and rejects every input in $G \setminus L$; the behaviour of the automaton on inputs in $\Sigma^{*}\setminus G$ is not specifie...
formal languages regular languages finite automata
1
Is relative regularity distinct from regularity? -- (formal languages regular languages finite automata) <p>Let $L$ and $G$ be languages over a finite alphabet $\Sigma$.&#xA;$L$ is <em>regular relative to</em> $G$ if $L \subseteq G$ and there is a finite automaton that accepts every input in $L$, and rejects every inpu...
habedi/stack-exchange-dataset
41,750
A query about serial data transmission
<p>I was studying computer science and I learnt that Serial Data transmission is when one bit is transmitted at a time over one wire/channel. Then what does '8 bit serial' data transmission mean?&#xA;I was studying about MIDI where it said it uses 8 bit serial data transmission and is asynchronous.</p>&#xA;&#xA;<p>Also...
terminology communication protocols
1
A query about serial data transmission -- (terminology communication protocols) <p>I was studying computer science and I learnt that Serial Data transmission is when one bit is transmitted at a time over one wire/channel. Then what does '8 bit serial' data transmission mean?&#xA;I was studying about MIDI where it said ...
habedi/stack-exchange-dataset
41,757
Constructing a sphere ($S^2$) in HoTT directly?
<p>(this is a repost of <a href="https://stackoverflow.com/questions/29802501/constructing-a-sphere-s2-in-hott-directly">https://stackoverflow.com/questions/29802501/constructing-a-sphere-s2-in-hott-directly</a>, which was voted out of SO)</p>&#xA;&#xA;<p>I understand the construction of $S^2$ as a suspension of $S^1$ ...
homotopy type theory
1
Constructing a sphere ($S^2$) in HoTT directly? -- (homotopy type theory) <p>(this is a repost of <a href="https://stackoverflow.com/questions/29802501/constructing-a-sphere-s2-in-hott-directly">https://stackoverflow.com/questions/29802501/constructing-a-sphere-s2-in-hott-directly</a>, which was voted out of SO)</p>&#x...
habedi/stack-exchange-dataset
41,768
Can any recursion implementation be written as tail-recursion?
<p>Can any method that uses recursion be written as tail-recursion?</p>&#xA;
algorithms recursion simulation
1
Can any recursion implementation be written as tail-recursion? -- (algorithms recursion simulation) <p>Can any method that uses recursion be written as tail-recursion?</p>&#xA;
habedi/stack-exchange-dataset
41,773
Need for random bits in final PCP theorem statement
<p>PCP theorem states that $$PCP(O(\log n),O(1))=NP.$$ Could we not run through $O(\log n)$ bits deterministically? </p>&#xA;&#xA;<p>Does PCP theorem statement mean any set of $O(\log n)$ random bits out of $2^{O(\log n)}$ choices of such bits suffice? If so, why cannot I choose all $0$ bits? If not why not?</p>&#xA;
complexity theory probabilistic algorithms
1
Need for random bits in final PCP theorem statement -- (complexity theory probabilistic algorithms) <p>PCP theorem states that $$PCP(O(\log n),O(1))=NP.$$ Could we not run through $O(\log n)$ bits deterministically? </p>&#xA;&#xA;<p>Does PCP theorem statement mean any set of $O(\log n)$ random bits out of $2^{O(\log n)...
habedi/stack-exchange-dataset
41,776
Choice of machine learning algorithms frequency of parts of speech
<p>I'm new to machine learning. I have text, and I tag the text according to their parts of speech tag ie walk is tagged as verb, etc. I tag entire sentences, and then convert them into a vector based on their frequency like so:</p>&#xA;&#xA;<p>Dan, walk the dog - > noun,verb, definite-article, noun ->&lt;2,1,1> (2x no...
machine learning natural language processing
1
Choice of machine learning algorithms frequency of parts of speech -- (machine learning natural language processing) <p>I'm new to machine learning. I have text, and I tag the text according to their parts of speech tag ie walk is tagged as verb, etc. I tag entire sentences, and then convert them into a vector based on...
habedi/stack-exchange-dataset
41,785
Intuition behind the max-flow min-cut theorem
<p>What is the intuition behind the <em>max-flow min-cut theorem</em>? </p>&#xA;&#xA;<p>I know that the min-cut is the dual of max-flow when formulated as a linear program, but the result seems artificial to me.</p>&#xA;
graphs network flow intuition
1
Intuition behind the max-flow min-cut theorem -- (graphs network flow intuition) <p>What is the intuition behind the <em>max-flow min-cut theorem</em>? </p>&#xA;&#xA;<p>I know that the min-cut is the dual of max-flow when formulated as a linear program, but the result seems artificial to me.</p>&#xA;
habedi/stack-exchange-dataset
41,791
A totally-ordered set of functions
<p>When we analyze algorithms using the $O$ notation, we usually use only a small set of the space of all functions. E.g., we use $\Theta(n)$ but not $\Theta(2n)$, as these two are equally well represented by $\Theta(n)$. This makes me ask whether it is possible to define a set of "representative functions" which are t...
asymptotics complexity classes mathematical analysis
1
A totally-ordered set of functions -- (asymptotics complexity classes mathematical analysis) <p>When we analyze algorithms using the $O$ notation, we usually use only a small set of the space of all functions. E.g., we use $\Theta(n)$ but not $\Theta(2n)$, as these two are equally well represented by $\Theta(n)$. This ...
habedi/stack-exchange-dataset
41,804
Term Rewriting vs Unification
<p>How is term rewriting different from unification, and what's the difference between term rewriting languages and logic programming, like Prolog?</p>&#xA;
terminology term rewriting logic programming unification
1
Term Rewriting vs Unification -- (terminology term rewriting logic programming unification) <p>How is term rewriting different from unification, and what's the difference between term rewriting languages and logic programming, like Prolog?</p>&#xA;
habedi/stack-exchange-dataset
41,808
What is a real-world use-case/need for a left-recursive grammar?
<p>I understand the basics of how left-recursion works, and <a href="https://cs.stackexchange.com/questions/9963/why-is-left-recursion-bad">why some people say it's bad</a>. And I've also ready opinions such as:</p>&#xA;&#xA;<blockquote>&#xA; <p>...like LL and LR parsing, PEGs are often frustrating to use in practise....
formal grammars parsers
1
What is a real-world use-case/need for a left-recursive grammar? -- (formal grammars parsers) <p>I understand the basics of how left-recursion works, and <a href="https://cs.stackexchange.com/questions/9963/why-is-left-recursion-bad">why some people say it's bad</a>. And I've also ready opinions such as:</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
41,810
Variation on Insertion Sort
<p>I'm writing insertion sort in scheme, but due to the difficulty of writing it recursively within the constraints of list processing of scheme, I made what seems like an insignificant change to the "find lowest" or inner loop.</p>&#xA;&#xA;<p>I'll reproduce the algorithm here in Python (aka the universal psuedocode) ...
algorithms sorting
1
Variation on Insertion Sort -- (algorithms sorting) <p>I'm writing insertion sort in scheme, but due to the difficulty of writing it recursively within the constraints of list processing of scheme, I made what seems like an insignificant change to the "find lowest" or inner loop.</p>&#xA;&#xA;<p>I'll reproduce the algo...
habedi/stack-exchange-dataset
41,814
Does location transparency imply access transparency?
<p>In distributed systems theory, I have found the definition that a distributed system requires, among others, location and access transparency.</p>&#xA;&#xA;<p>I was wondering if location transparency does not already include access transparency.</p>&#xA;&#xA;<p><a href="https://en.wikipedia.org/wiki/Transparency_%28...
distributed systems
1
Does location transparency imply access transparency? -- (distributed systems) <p>In distributed systems theory, I have found the definition that a distributed system requires, among others, location and access transparency.</p>&#xA;&#xA;<p>I was wondering if location transparency does not already include access transp...
habedi/stack-exchange-dataset
41,822
Is it decidable whether a pushdown automaton recognizes a given regular language?
<p>The problem whether two pushdown automaton recognize the same language is undecidable. The problem whether a pushdown automaton recognizes the empty language is decidable, hence it is also decidable whether it recognizes a given finite language. It is undecidable whether the language accepted by a pushdown automaton...
computability undecidability pushdown automata
1
Is it decidable whether a pushdown automaton recognizes a given regular language? -- (computability undecidability pushdown automata) <p>The problem whether two pushdown automaton recognize the same language is undecidable. The problem whether a pushdown automaton recognizes the empty language is decidable, hence it is...
habedi/stack-exchange-dataset
41,825
Are LALR tables equal to SLR tables if the grammar is SLR modulo precedence/associativity of operators?
<p>Consider a grammar G which is SLR(1) except for some shift/reduce conflicts which can be resolved by imposing some precedence or associativity of operators.</p>&#xA;&#xA;<p>Is it the case that the construction of the SLR(1) parser and the LALR(1) always yield the same table?</p>&#xA;&#xA;<p>If not, what happens if t...
formal grammars parsers
1
Are LALR tables equal to SLR tables if the grammar is SLR modulo precedence/associativity of operators? -- (formal grammars parsers) <p>Consider a grammar G which is SLR(1) except for some shift/reduce conflicts which can be resolved by imposing some precedence or associativity of operators.</p>&#xA;&#xA;<p>Is it the c...
habedi/stack-exchange-dataset
41,827
A clarification on the taxonomy of Evolutionary Algorithms
<p>A rather basic question but I am confused about the characterization of a certain local search method which I want to describe in the framework of EAs. In particular, consider an EA which in every step of the evolution has a neighborhood of size 2; one element in the neighborhood is the current hypothesis (<em>hypot...
machine learning genetic algorithms learning theory evolutionary computing
1
A clarification on the taxonomy of Evolutionary Algorithms -- (machine learning genetic algorithms learning theory evolutionary computing) <p>A rather basic question but I am confused about the characterization of a certain local search method which I want to describe in the framework of EAs. In particular, consider an...
habedi/stack-exchange-dataset
41,834
type theory notation troubles
<p>I'm working through "Types and Programming Languages" by Benjamin Pierce and I don't quite understand the notation. Particularly on Page 106, (chapter 9 Simply Typed Lambda-Calculus) there is a lemma (9.3.7):</p>&#xA;&#xA;<p>$$&#xA;\text{If } \Gamma \vdash t:T \text{ and } x \notin dom(\Gamma) \text{, then } \Gamma,...
lambda calculus type theory notation
1
type theory notation troubles -- (lambda calculus type theory notation) <p>I'm working through "Types and Programming Languages" by Benjamin Pierce and I don't quite understand the notation. Particularly on Page 106, (chapter 9 Simply Typed Lambda-Calculus) there is a lemma (9.3.7):</p>&#xA;&#xA;<p>$$&#xA;\text{If } \G...
habedi/stack-exchange-dataset
41,839
"Practical forms" of Chernoff bound for inequality in expectation
<p>From <a href="http://en.wikipedia.org/wiki/Chernoff_bound#Theorem_for_multiplicative_form_of_Chernoff_bound_.28relative_error.29" rel="nofollow noreferrer">Wikipedia</a>:</p>&#xA;<blockquote>&#xA;<p>The above formula is often unwieldy in practice, so the following looser but more convenient bounds are often used:</p...
probability theory chernoff bounds
1
"Practical forms" of Chernoff bound for inequality in expectation -- (probability theory chernoff bounds) <p>From <a href="http://en.wikipedia.org/wiki/Chernoff_bound#Theorem_for_multiplicative_form_of_Chernoff_bound_.28relative_error.29" rel="nofollow noreferrer">Wikipedia</a>:</p>&#xA;<blockquote>&#xA;<p>The above fo...
habedi/stack-exchange-dataset
41,841
Is a LBA with stack more powerful than a LBA without?
<p>Even so a linear bounded automata (LBA) is strictly more powerful than a pushdown automata (PDA), adding a stack to a LBA might make it more powerful. </p>&#xA;&#xA;<p>A LBA with stack should not be Turing complete, because its halting problem should be decidable. (It seems to be equivalent to the halting problem fo...
automata computation models turing completeness stacks linear bounded automata
1
Is a LBA with stack more powerful than a LBA without? -- (automata computation models turing completeness stacks linear bounded automata) <p>Even so a linear bounded automata (LBA) is strictly more powerful than a pushdown automata (PDA), adding a stack to a LBA might make it more powerful. </p>&#xA;&#xA;<p>A LBA with ...
habedi/stack-exchange-dataset
41,843
Recoloring bipartite graphs
<p>Given a bipartite graph $G = (A,B,E)$ where every vertex is colored either red or blue I am trying to minimize the number of blue vertices using the following operation:</p>&#xA;&#xA;<ol>&#xA;<li>Choose a vertex $v_a$ in $A$</li>&#xA;<li>Flip the colors of $N[v_a]$, meaning that $v_a$ and every neighbor of $v_a$ wil...
algorithms graphs
1
Recoloring bipartite graphs -- (algorithms graphs) <p>Given a bipartite graph $G = (A,B,E)$ where every vertex is colored either red or blue I am trying to minimize the number of blue vertices using the following operation:</p>&#xA;&#xA;<ol>&#xA;<li>Choose a vertex $v_a$ in $A$</li>&#xA;<li>Flip the colors of $N[v_a]$,...
habedi/stack-exchange-dataset
41,850
What are the k characters which make the most complete words?
<p>Given a word list of $N$ words formed from a language of $M$ characters, where each word is composed of $n \geq 1$ not necessarily distinct characters, how can I find the best set of $k&lt;M$ characters to learn, where "best" is defined as the set of $k$ with which the most <em>complete</em> words can be spelled. I...
algorithms optimization strings counting
1
What are the k characters which make the most complete words? -- (algorithms optimization strings counting) <p>Given a word list of $N$ words formed from a language of $M$ characters, where each word is composed of $n \geq 1$ not necessarily distinct characters, how can I find the best set of $k&lt;M$ characters to lea...
habedi/stack-exchange-dataset
41,854
How can a universal Turing machine simulate "bigger" ones?
<p>I'm trying to find the answers of two questions about the Universal Turing machine.</p>&#xA;&#xA;<ol>&#xA;<li>How can the Universal Turing machine simulate a Turing machine if&#xA;the one that is being simulated has a bigger number of states?</li>&#xA;<li>How can the Universal Turing machine simulate a Turing machin...
computability turing machines simulation turing completeness
1
How can a universal Turing machine simulate "bigger" ones? -- (computability turing machines simulation turing completeness) <p>I'm trying to find the answers of two questions about the Universal Turing machine.</p>&#xA;&#xA;<ol>&#xA;<li>How can the Universal Turing machine simulate a Turing machine if&#xA;the one that...
habedi/stack-exchange-dataset
41,859
Find equivalent LTL formula, without Y (Yesterday) operator. How can I handle first state?
<p><img src="https://i.stack.imgur.com/sOn3s.png" alt="enter image description here"></p>&#xA;&#xA;<p>The task is to find an equivalent LTL formula for $G(a \Rightarrow Yb)$, which doesn't contain the Y operator. My idea is to search for invalid path patterns with 2 $a$'s in a row, e.g. bbbbaab.</p>&#xA;&#xA;<p>Therefo...
model checking linear temporal logic
1
Find equivalent LTL formula, without Y (Yesterday) operator. How can I handle first state? -- (model checking linear temporal logic) <p><img src="https://i.stack.imgur.com/sOn3s.png" alt="enter image description here"></p>&#xA;&#xA;<p>The task is to find an equivalent LTL formula for $G(a \Rightarrow Yb)$, which doesn'...
habedi/stack-exchange-dataset
41,862
Proving that non-regular languages are closed under concatenation
<p>How can I prove that non-regular languages are closed under concatenation using only the non-regularity of $L=\{a^nb^n|n\ge1\}$ ?</p>&#xA;
formal languages closure properties
1
Proving that non-regular languages are closed under concatenation -- (formal languages closure properties) <p>How can I prove that non-regular languages are closed under concatenation using only the non-regularity of $L=\{a^nb^n|n\ge1\}$ ?</p>&#xA;
habedi/stack-exchange-dataset
41,865
T(n/3) + log(n)
<p>how do you find the Theta of this problem... $$T(n) = T(\frac{n}{3}) + \log_2(n)$$ I end up getting a pattern of $$T(\frac{n}{3^{k}}) + \log_2(\frac{n}{3^{k-1}}) + \log_2(\frac{n}{3^{k-2}}) + ... + \log_2(n)$$ when I solve for k with T(1) = 1 I get this... $$\frac{n}{3^{k}} = 1 \\ n = 3^{k} \\ \ln n = k \ln 3 \\ k =...
asymptotics recurrence relation
1
T(n/3) + log(n) -- (asymptotics recurrence relation) <p>how do you find the Theta of this problem... $$T(n) = T(\frac{n}{3}) + \log_2(n)$$ I end up getting a pattern of $$T(\frac{n}{3^{k}}) + \log_2(\frac{n}{3^{k-1}}) + \log_2(\frac{n}{3^{k-2}}) + ... + \log_2(n)$$ when I solve for k with T(1) = 1 I get this... $$\frac...
habedi/stack-exchange-dataset
41,867
How to state a recurrence that expresses the worst case for good pivots?
<p><strong>The Problem</strong>&#xA;Consider the randomized quicksort algorithm which has expected worst case running time of $\theta(nlogn)$ . With probability $\frac12$ the pivot selected will be between $\frac{n}{4}$ and $\frac{3n}{4}$(a good pivot). Also with probability $\frac12$ the pivot selected will be between...
algorithms recurrence relation recursion discrete mathematics quicksort
1
How to state a recurrence that expresses the worst case for good pivots? -- (algorithms recurrence relation recursion discrete mathematics quicksort) <p><strong>The Problem</strong>&#xA;Consider the randomized quicksort algorithm which has expected worst case running time of $\theta(nlogn)$ . With probability $\frac12$...
habedi/stack-exchange-dataset
41,869
Normalizing edge weights and the effect on Dijkstra's algorithm
<p>If I had a graph $G$ with some negative edge weights, clearly Dijkstra's algorithm does not definitely halt, since it might get caught in a negative cycle (shedding infinite weight). However, would finding the minimum weight (most negative weight) $w$ and adding the absolute value to every edge's weight preserve the...
algorithms graphs shortest path
1
Normalizing edge weights and the effect on Dijkstra's algorithm -- (algorithms graphs shortest path) <p>If I had a graph $G$ with some negative edge weights, clearly Dijkstra's algorithm does not definitely halt, since it might get caught in a negative cycle (shedding infinite weight). However, would finding the minimu...
habedi/stack-exchange-dataset
41,873
What additional expressivity does polyvariance give in pushdown CFA?
<p>I'm reading through <a href="http://arxiv.org/abs/1007.4268" rel="nofollow">Pushdown Control-Flow Analysis of Higher-Order Programs</a>, which presents a synthesis of the <a href="http://arxiv.org/abs/1105.1743" rel="nofollow">Abstracting Abstract Machines</a> technique and pushdown automata to get static analysis w...
programming languages pushdown automata functional programming
1
What additional expressivity does polyvariance give in pushdown CFA? -- (programming languages pushdown automata functional programming) <p>I'm reading through <a href="http://arxiv.org/abs/1007.4268" rel="nofollow">Pushdown Control-Flow Analysis of Higher-Order Programs</a>, which presents a synthesis of the <a href="...
habedi/stack-exchange-dataset
41,882
Determining which states in a transition system satisfy a specific CTL formula
<p>Trying to answer the following question: </p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/BqIwG.png" alt="enter image description here"></p>&#xA;&#xA;<p>However, my answer is that only one of these states satisfy the TS (which is for sure wrong since the next part of this question asks to remove states that don'...
model checking
1
Determining which states in a transition system satisfy a specific CTL formula -- (model checking) <p>Trying to answer the following question: </p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/BqIwG.png" alt="enter image description here"></p>&#xA;&#xA;<p>However, my answer is that only one of these states satisfy t...
habedi/stack-exchange-dataset
41,885
Is deciding whether the language of a TM contains all strings of length 4 computable?
<p>I was going through some Halting Problem reduction and I found the following problem:</p>&#xA;&#xA;<blockquote>&#xA; <p>Given a semi-decider TM $M$, does the language $L(M)$ contain all strings of exactly length $4$?</p>&#xA;</blockquote>&#xA;&#xA;<p>The question later asks to prove whether this is recursive or r.e...
computability turing machines
1
Is deciding whether the language of a TM contains all strings of length 4 computable? -- (computability turing machines) <p>I was going through some Halting Problem reduction and I found the following problem:</p>&#xA;&#xA;<blockquote>&#xA; <p>Given a semi-decider TM $M$, does the language $L(M)$ contain all strings o...
habedi/stack-exchange-dataset
41,886
Countability union of all finite and countably infinite sequences over finite alphabet
<p>Is the set of all finite and countably infinite sequences over $\{0,1\}$ countable?</p>&#xA;&#xA;<p>From my analysis, I think it is countable. I think of this as the set of all strings from a finite alphabet $\Sigma=\{0,1\}$, hence $\Sigma^*$. (is this a good assumption?).</p>&#xA;&#xA;<p>I later show that I can cou...
uncountability
1
Countability union of all finite and countably infinite sequences over finite alphabet -- (uncountability) <p>Is the set of all finite and countably infinite sequences over $\{0,1\}$ countable?</p>&#xA;&#xA;<p>From my analysis, I think it is countable. I think of this as the set of all strings from a finite alphabet $\...
habedi/stack-exchange-dataset
41,892
Algorithm to recognize Strongly Regular Graph (SRG)
<p>I am looking for an algorithm to determine whether a graph is Strongly Regular Graph (SRG) or not.</p>&#xA;
algorithms graphs reference request check my answer
1
Algorithm to recognize Strongly Regular Graph (SRG) -- (algorithms graphs reference request check my answer) <p>I am looking for an algorithm to determine whether a graph is Strongly Regular Graph (SRG) or not.</p>&#xA;
habedi/stack-exchange-dataset
41,897
Why isn't chess an impartial game?
<p>In <a href="http://en.wikipedia.org/wiki/Combinatorial_game_theory" rel="nofollow noreferrer">Combinatorial Game Theory</a>, a major distinction is drawn between <a href="http://en.wikipedia.org/wiki/Impartial_game" rel="nofollow noreferrer">impartial games</a> and partisan games. To be impartial, a game must satis...
combinatorics game theory board games
1
Why isn't chess an impartial game? -- (combinatorics game theory board games) <p>In <a href="http://en.wikipedia.org/wiki/Combinatorial_game_theory" rel="nofollow noreferrer">Combinatorial Game Theory</a>, a major distinction is drawn between <a href="http://en.wikipedia.org/wiki/Impartial_game" rel="nofollow noreferre...
habedi/stack-exchange-dataset
41,898
Represent an octree as a binary tree of thrice the depth?
<p>In an <a href="http://en.wikipedia.org/wiki/Octree" rel="nofollow">octree</a>, each node has up to eight child nodes. This can be implemented with eight pointers per node that are set to null pointers if the child is not used. Another implementation uses a byte as bit-mask that stores which children are used and a p...
data structures trees space partitioning
1
Represent an octree as a binary tree of thrice the depth? -- (data structures trees space partitioning) <p>In an <a href="http://en.wikipedia.org/wiki/Octree" rel="nofollow">octree</a>, each node has up to eight child nodes. This can be implemented with eight pointers per node that are set to null pointers if the child...
habedi/stack-exchange-dataset
41,899
Can we check in polynomial time if the language of a DFA is closed against Kleene star?
<p>I was wondering if there is a polynomial time algorithm to test whether a DFA recognizes a star closed language ( which is if $A=A^*$). I think that yes, but I do not have an idea to do it.</p>&#xA;
algorithms complexity theory regular languages time complexity
1
Can we check in polynomial time if the language of a DFA is closed against Kleene star? -- (algorithms complexity theory regular languages time complexity) <p>I was wondering if there is a polynomial time algorithm to test whether a DFA recognizes a star closed language ( which is if $A=A^*$). I think that yes, but I d...
habedi/stack-exchange-dataset
41,905
Recursive language subtracted from recursively enumerable language
<p>This is a homework problem but I am awfully confused. The problem reads as follows:</p>&#xA;&#xA;<p>If $L_1$ is recursively enumerable but not recursive, and $L_2$ is recursive, then which of the following is the strongest true statement about the set difference $L_1 - L_2$?</p>&#xA;&#xA;<p>a. It must be recursively...
computability undecidability
1
Recursive language subtracted from recursively enumerable language -- (computability undecidability) <p>This is a homework problem but I am awfully confused. The problem reads as follows:</p>&#xA;&#xA;<p>If $L_1$ is recursively enumerable but not recursive, and $L_2$ is recursive, then which of the following is the str...
habedi/stack-exchange-dataset
41,909
Automatic translation between formal languages
<p>There are parser generators (some of which are limited to certain classes of grammars) which, given a grammar, automatically generate a parser for that grammar. </p>&#xA;&#xA;<p>Would it be possible to make a general-purpose translator generator to automatically translate from a string in the language with productio...
formal languages programming languages compilers
1
Automatic translation between formal languages -- (formal languages programming languages compilers) <p>There are parser generators (some of which are limited to certain classes of grammars) which, given a grammar, automatically generate a parser for that grammar. </p>&#xA;&#xA;<p>Would it be possible to make a general...
habedi/stack-exchange-dataset
41,919
What is the size of a queue associated with a resource when the resource becomes a bottleneck?
<p>In <a href="http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470462531.html" rel="nofollow noreferrer">Software Performance and Scalability: A Quantitative Approach - Henry H. Liu</a>, the author is presenting a scenario where the hardware becomes a bottleneck. In one ot the tests, he is checking the number disk (...
distributed systems performance queueing theory
1
What is the size of a queue associated with a resource when the resource becomes a bottleneck? -- (distributed systems performance queueing theory) <p>In <a href="http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470462531.html" rel="nofollow noreferrer">Software Performance and Scalability: A Quantitative Approach - ...
habedi/stack-exchange-dataset
41,922
Is the union of finite and infinite sequences over alphabet of length 1 countable?
<p>Is the union of finite and countably infinite sequence over alphabet $\Sigma=\{1\}$, countably infinite as well?</p>&#xA;&#xA;<p>I understand this is similar a question to the one of <a href="https://cs.stackexchange.com/questions/41886/countability-union-of-all-finite-and-countably-infinite-sequences-over-finite-al...
sets uncountability
1
Is the union of finite and infinite sequences over alphabet of length 1 countable? -- (sets uncountability) <p>Is the union of finite and countably infinite sequence over alphabet $\Sigma=\{1\}$, countably infinite as well?</p>&#xA;&#xA;<p>I understand this is similar a question to the one of <a href="https://cs.stacke...
habedi/stack-exchange-dataset
41,926
Turing Machine that computes maximum steps of halting machines
<p>Suppose that $TM_{halting}$ is the set of machines that halt.</p>&#xA;&#xA;<p>Given a number of states $m$ and a length $n$ of the input, let $f(m,n)$ be the maximum number of steps a machine with $m$ states in $TM_{halting}$ can take on an input of length $n$.</p>&#xA;&#xA;<p>Is the function $f(m,n)$ computable?</p...
turing machines halting problem
1
Turing Machine that computes maximum steps of halting machines -- (turing machines halting problem) <p>Suppose that $TM_{halting}$ is the set of machines that halt.</p>&#xA;&#xA;<p>Given a number of states $m$ and a length $n$ of the input, let $f(m,n)$ be the maximum number of steps a machine with $m$ states in $TM_{h...
habedi/stack-exchange-dataset
41,931
Size of address spaces (logical and physical)
<p>Suppose a system in which addresses (physical and logical) occupy 32 bits, page size is 1024 bytes&#xA;(2<sup>10</sup>), and physical memory is of size 32MB. How many frames are in physical memory? Is the logical&#xA;address space larger than physical memory? Explain.</p>&#xA;&#xA;<p>The solution given is: </p>&#xA;...
operating systems memory management
1
Size of address spaces (logical and physical) -- (operating systems memory management) <p>Suppose a system in which addresses (physical and logical) occupy 32 bits, page size is 1024 bytes&#xA;(2<sup>10</sup>), and physical memory is of size 32MB. How many frames are in physical memory? Is the logical&#xA;address space...
habedi/stack-exchange-dataset
41,932
Regular expression for language with even number of 0's and 1's
<p>Let $\Sigma=\{0,1\}$. What is the regular expression for the language of all strings with an even number of $0$'s and an even number of $1$'s?</p>&#xA;&#xA;<p>If we only require an even number of $0$'s, the language $(1^*)\mid(1^*01^*01^*)^*$ works. But once there is a requirement on both $0$'s and $1$'s, I'm not su...
regular expressions
1
Regular expression for language with even number of 0's and 1's -- (regular expressions) <p>Let $\Sigma=\{0,1\}$. What is the regular expression for the language of all strings with an even number of $0$'s and an even number of $1$'s?</p>&#xA;&#xA;<p>If we only require an even number of $0$'s, the language $(1^*)\mid(1...
habedi/stack-exchange-dataset
41,935
Can I use ellipses in first order logic
<p>I ask, because I have to come up with a first-order logic sentence that shows that there are exactly N objects in the universe. What I've been able to come up with is:</p>&#xA;&#xA;<p>$$ \forall x \; \exists y_1, y_2, \dots , y_{n-1} \; (x \neq y_1) \land (x \neq y_2) \land \dots \land (x \neq y_{n-1})$$</p>&#xA;&...
logic first order logic notation
1
Can I use ellipses in first order logic -- (logic first order logic notation) <p>I ask, because I have to come up with a first-order logic sentence that shows that there are exactly N objects in the universe. What I've been able to come up with is:</p>&#xA;&#xA;<p>$$ \forall x \; \exists y_1, y_2, \dots , y_{n-1} \; (x...
habedi/stack-exchange-dataset
41,963
Can a recursive language be uncountable?
<p>Does there exist a recursive language $L$ whose cardinality is uncountable?</p>&#xA;&#xA;<p>I would like to have an explanation whether Turing Machine can encode uncountable languages and whether we can use this to reject the initial question.</p>&#xA;
formal languages computability uncountability
1
Can a recursive language be uncountable? -- (formal languages computability uncountability) <p>Does there exist a recursive language $L$ whose cardinality is uncountable?</p>&#xA;&#xA;<p>I would like to have an explanation whether Turing Machine can encode uncountable languages and whether we can use this to reject the...
habedi/stack-exchange-dataset
41,964
What exactly is a hash function?
<p>I have no idea how I managed to get this far in life without ever really grasping this but as it happens I'm still very confused on the concept of a hash function. I did some googling/wikipedia-ing, and here's what I get:</p>&#xA;&#xA;<ul>&#xA;<li>hash tables are nice because the index can be stored in a smaller arr...
hash hash tables
1
What exactly is a hash function? -- (hash hash tables) <p>I have no idea how I managed to get this far in life without ever really grasping this but as it happens I'm still very confused on the concept of a hash function. I did some googling/wikipedia-ing, and here's what I get:</p>&#xA;&#xA;<ul>&#xA;<li>hash tables ar...
habedi/stack-exchange-dataset
41,971
How do i find bits in virtual and physical address?
<p>The question is:</p>&#xA;&#xA;<pre><code>Consider a virtual address space of 256 pages with page size of 4KB, mapped onto a physical memory of 128 frames. &#xA;How many total bits are required in the virtual address? &#xA;How many total bits are required in the physical address?&#xA;</code></pre>&#xA;&#xA;<p>I can't...
computer architecture virtual memory
1
How do i find bits in virtual and physical address? -- (computer architecture virtual memory) <p>The question is:</p>&#xA;&#xA;<pre><code>Consider a virtual address space of 256 pages with page size of 4KB, mapped onto a physical memory of 128 frames. &#xA;How many total bits are required in the virtual address? &#xA;H...
habedi/stack-exchange-dataset