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
10,423
Constructing PDA for $a^{2n} b^{3n}$
<p>So I have been given the task of creating an PDA that recognises the language </p>&#xA;&#xA;<p>$\{a^{2n} b^{3n} \mid n = 0,1,2,\dots\}$.</p>&#xA;&#xA;<p>Am I right in thinking that it needs to have at least 3 times number of $b$'s than $a$'s? </p>&#xA;&#xA;<p>So for example:&#xA;$aabbb$ would be accepted&#xA;$aaabb$...
formal languages pushdown automata
1
Constructing PDA for $a^{2n} b^{3n}$ -- (formal languages pushdown automata) <p>So I have been given the task of creating an PDA that recognises the language </p>&#xA;&#xA;<p>$\{a^{2n} b^{3n} \mid n = 0,1,2,\dots\}$.</p>&#xA;&#xA;<p>Am I right in thinking that it needs to have at least 3 times number of $b$'s than $a$'...
habedi/stack-exchange-dataset
10,427
Number of cycles in a graph?
<p>Can the number of cycles in a graph (undirected/directed) be exponential in the number of edges/vertices?</p>&#xA;&#xA;<p>I'm looking for a polynomial algorithm for finding all cycles in a graph and was wondering if it's even possible.</p>&#xA;
graphs
1
Number of cycles in a graph? -- (graphs) <p>Can the number of cycles in a graph (undirected/directed) be exponential in the number of edges/vertices?</p>&#xA;&#xA;<p>I'm looking for a polynomial algorithm for finding all cycles in a graph and was wondering if it's even possible.</p>&#xA;
habedi/stack-exchange-dataset
10,434
Implement queue with a linked list; why would it be bad to insert at the head and remove at the tail?
<p>In my textbook, Data Structures and Algorithms in Java, the author says when implementing a queue using a linked list you choose the front of the queue to be at the head of the list, and the rear of the queue to be at the tail of the list. In this way, you remove from the head and insert at the tail.</p>&#xA;&#xA;<p...
time complexity linked lists abstract data types
1
Implement queue with a linked list; why would it be bad to insert at the head and remove at the tail? -- (time complexity linked lists abstract data types) <p>In my textbook, Data Structures and Algorithms in Java, the author says when implementing a queue using a linked list you choose the front of the queue to be at ...
habedi/stack-exchange-dataset
10,437
Proving that a specific language is a CFL, and that another language is not a CFL
<p>I have two languages $C_1$ and $C_2. \left(\Sigma=\{0,1\}\right)$:</p>&#xA;&#xA;<p>$C_1=\left\{xyz\mid x,z \in \Sigma^*, y \in \Sigma^*1\Sigma^*, \text{ where } |x|=|z| \geq |y|\right\}$, and $C_2=\left\{xyz\mid x,z \in \Sigma^*, y \in \Sigma^*1\Sigma^*1\Sigma^*, \text{ where } |x|=|z| \geq |y|\right\}$</p>&#xA;&#xA...
formal languages context free pumping lemma pushdown automata
1
Proving that a specific language is a CFL, and that another language is not a CFL -- (formal languages context free pumping lemma pushdown automata) <p>I have two languages $C_1$ and $C_2. \left(\Sigma=\{0,1\}\right)$:</p>&#xA;&#xA;<p>$C_1=\left\{xyz\mid x,z \in \Sigma^*, y \in \Sigma^*1\Sigma^*, \text{ where } |x|=|z|...
habedi/stack-exchange-dataset
10,438
What is the maximum number of shortest paths between any pair of vertices in a chordal graph?
<p>A graph $G$ is <em><a href="http://en.wikipedia.org/wiki/Chordal_graph" rel="nofollow noreferrer">chordal</a></em> if it doesn't have induced cycles of length 4 or more. Chordal graphs are precisely the class of graphs that admit a <em>clique tree</em> representation. A clique tree $T$ of $G$ is a tree in which the ...
graphs combinatorics shortest path discrete mathematics
1
What is the maximum number of shortest paths between any pair of vertices in a chordal graph? -- (graphs combinatorics shortest path discrete mathematics) <p>A graph $G$ is <em><a href="http://en.wikipedia.org/wiki/Chordal_graph" rel="nofollow noreferrer">chordal</a></em> if it doesn't have induced cycles of length 4 o...
habedi/stack-exchange-dataset
10,447
Hash function - uniformity / strong universality
<p>I am currently learning how randomised Hashing works. &#xA;So, you have a class (aka family) $H$ of hash functions, each of which maps the universe $U$ to the hash table $N$.</p>&#xA;&#xA;<p>That class is called "strongly universal" or "pairwise independent" if $\forall x,y \in U, x \neq y: \forall z_1,z_2 \in N: \P...
data structures hash tables hash
1
Hash function - uniformity / strong universality -- (data structures hash tables hash) <p>I am currently learning how randomised Hashing works. &#xA;So, you have a class (aka family) $H$ of hash functions, each of which maps the universe $U$ to the hash table $N$.</p>&#xA;&#xA;<p>That class is called "strongly universa...
habedi/stack-exchange-dataset
10,458
Can we say anything about the complement of a regular language?
<p>Given a regular language $L$, can we say anything about its complement $\overline L$? One thing that is trivial to say is that the DFA's for both languages are equal in size as complementing the language is simply a matter of changing all accepting states into rejecting states and vice-versa. Are there any other thi...
regular languages finite automata closure properties
1
Can we say anything about the complement of a regular language? -- (regular languages finite automata closure properties) <p>Given a regular language $L$, can we say anything about its complement $\overline L$? One thing that is trivial to say is that the DFA's for both languages are equal in size as complementing the ...
habedi/stack-exchange-dataset
10,461
Proving a language is not regular with pumping lemma
<p>I'm having a little bit of an issue with a pumping lemma problem. I've successfully completely all my other problems but this is the last one and I'm a little confused I must say. If anyone can help me out, it'd be much appreciated.</p>&#xA;&#xA;<p>\begin{equation} &#xA;A = \{a^n b^m c^l \mid n\leq m \vee ...
automata pumping lemma
1
Proving a language is not regular with pumping lemma -- (automata pumping lemma) <p>I'm having a little bit of an issue with a pumping lemma problem. I've successfully completely all my other problems but this is the last one and I'm a little confused I must say. If anyone can help me out, it'd be much appreciated.</p>...
habedi/stack-exchange-dataset
10,465
Is the following language context free?
<p>Is $L = \{ a^nb^nc^j \mid n \le j\}$ a context-free language? I'm getting really stuck generating a grammar for it. Any help would be appreciated. </p>&#xA;
formal languages formal grammars context free
1
Is the following language context free? -- (formal languages formal grammars context free) <p>Is $L = \{ a^nb^nc^j \mid n \le j\}$ a context-free language? I'm getting really stuck generating a grammar for it. Any help would be appreciated. </p>&#xA;
habedi/stack-exchange-dataset
10,468
The importance of normal forms like Chomsky normal form for CFGs
<p>I understand that context-free grammars can be used to represent context-free languages.It might have ambiguities. We also have normal forms like <a href="https://de.wikipedia.org/wiki/Chomsky-Normalform">Chomsky</a> and <a href="https://de.wikipedia.org/wiki/Greibach-Normalform">Greibach</a> normal form. I couldn't...
formal languages context free formal grammars normal forms
1
The importance of normal forms like Chomsky normal form for CFGs -- (formal languages context free formal grammars normal forms) <p>I understand that context-free grammars can be used to represent context-free languages.It might have ambiguities. We also have normal forms like <a href="https://de.wikipedia.org/wiki/Cho...
habedi/stack-exchange-dataset
10,469
Loop Invariants as Tautologies
<p>Would it be correct to characterize loop invariants as a type of tautology? I ask since the invariant must basically always be true, before the loop starts, before each iteration and after the loop terminates. I realize that there is the possibility that the invariant could become false during the body of the loop...
algorithm analysis logic correctness proof loop invariants program correctness
1
Loop Invariants as Tautologies -- (algorithm analysis logic correctness proof loop invariants program correctness) <p>Would it be correct to characterize loop invariants as a type of tautology? I ask since the invariant must basically always be true, before the loop starts, before each iteration and after the loop ter...
habedi/stack-exchange-dataset
10,472
What is an Efficient Algorithm?
<p>From the point of view of asymptotic behavior, what is considered an "efficient" algorithm? What is the standard / reason for drawing the line at that point? Personally, I would think that anything which is what I might naively call "sub-polynomial", such that $f(n) = o(n^2)$ such as $n^{1+\epsilon}$ would be effi...
algorithms terminology asymptotics landau notation
1
What is an Efficient Algorithm? -- (algorithms terminology asymptotics landau notation) <p>From the point of view of asymptotic behavior, what is considered an "efficient" algorithm? What is the standard / reason for drawing the line at that point? Personally, I would think that anything which is what I might naively...
habedi/stack-exchange-dataset
10,491
Local Search vs Classical Search
<p>I have some questions regarding local search / optimization as explained in chapter 4 of the book : <a href="http://aima.cs.berkeley.edu/" rel="nofollow">http://aima.cs.berkeley.edu/</a></p>&#xA;&#xA;<p>In classical search (Chap 3), the search starts from an initial node, then the search continues based on strategie...
artificial intelligence search algorithms
1
Local Search vs Classical Search -- (artificial intelligence search algorithms) <p>I have some questions regarding local search / optimization as explained in chapter 4 of the book : <a href="http://aima.cs.berkeley.edu/" rel="nofollow">http://aima.cs.berkeley.edu/</a></p>&#xA;&#xA;<p>In classical search (Chap 3), the ...
habedi/stack-exchange-dataset
10,498
How to get expected running time of hash table?
<p>If I have a hash table of 1000 slots, and I have an array of n numbers. I want to check if there are any repeats in the array of n numbers. The best way to do this that I can think of is storing it in the hash table and use a hash function which assumes simple uniform hashing assumption. Then before every insert you...
algorithms algorithm analysis hash tables hash probabilistic algorithms
1
How to get expected running time of hash table? -- (algorithms algorithm analysis hash tables hash probabilistic algorithms) <p>If I have a hash table of 1000 slots, and I have an array of n numbers. I want to check if there are any repeats in the array of n numbers. The best way to do this that I can think of is stori...
habedi/stack-exchange-dataset
10,507
Height of a full binary tree
<p>A full binary tree seems to be a binary tree in which every node is either a leaf or has 2 children.&#xA;I have been trying to prove that its height is O(logn) unsuccessfully.&#xA;Here is my work so far:</p>&#xA;&#xA;<p>I am considering the worst case of a full binary tree in which each right node has a subtree, and...
graphs combinatorics binary trees trees
1
Height of a full binary tree -- (graphs combinatorics binary trees trees) <p>A full binary tree seems to be a binary tree in which every node is either a leaf or has 2 children.&#xA;I have been trying to prove that its height is O(logn) unsuccessfully.&#xA;Here is my work so far:</p>&#xA;&#xA;<p>I am considering the wo...
habedi/stack-exchange-dataset
10,511
Methods for Finding Asymptotic Lower Bounds
<p>I've found in many exercises where I'm asked to show that $f(n)=\Theta(g(n))$ where the two functions are of the same order of magnitude I have difficulty finding a constant $c$ and a value $n_0$ for the lower bound. I'm using Corman's definition of $\Theta$: </p>&#xA;&#xA;<p>$$\exists c_1,c_2&gt;0\in\mathbb{R}:\fo...
asymptotics landau notation lower bounds
1
Methods for Finding Asymptotic Lower Bounds -- (asymptotics landau notation lower bounds) <p>I've found in many exercises where I'm asked to show that $f(n)=\Theta(g(n))$ where the two functions are of the same order of magnitude I have difficulty finding a constant $c$ and a value $n_0$ for the lower bound. I'm using...
habedi/stack-exchange-dataset
10,513
Mutual information and moment generating functions
<p>I went to listen to a workshop and someone from the audience asked the presenter how the moments can improve the <a href="https://en.wikipedia.org/wiki/Mutual_information" rel="nofollow">mutual information</a>. I am learning about MI (Mutual Information) so didn't have enough knowledge to understand what it means. T...
probability theory information theory bioinformatics
1
Mutual information and moment generating functions -- (probability theory information theory bioinformatics) <p>I went to listen to a workshop and someone from the audience asked the presenter how the moments can improve the <a href="https://en.wikipedia.org/wiki/Mutual_information" rel="nofollow">mutual information</a...
habedi/stack-exchange-dataset
10,518
Is this a divide-and-conquer algorithm?
<p>I'd like to start by stating this isn't homework! I'm studying for a job interview and would appreciate a second opinion. (Well, I guess it is homework, but not for school!).</p>&#xA;&#xA;<p>I've written an algorithm (see pseudocode below) to merge two <em>sorted</em> lists into one sorted list. The problem requires...
algorithms terminology divide and conquer
1
Is this a divide-and-conquer algorithm? -- (algorithms terminology divide and conquer) <p>I'd like to start by stating this isn't homework! I'm studying for a job interview and would appreciate a second opinion. (Well, I guess it is homework, but not for school!).</p>&#xA;&#xA;<p>I've written an algorithm (see pseudoco...
habedi/stack-exchange-dataset
10,528
Constraint violation and efficiency in search
<p>It seems that (in a broad sense) two approaches can be utilized to produce an algorithm for solving various optimization problems: </p>&#xA;&#xA;<ol>&#xA;<li>Start with a feasible solution and expand search until constraints are tight and solution is maximal (or minimal). </li>&#xA;<li>Begin with violated constrain...
algorithms optimization lower bounds
1
Constraint violation and efficiency in search -- (algorithms optimization lower bounds) <p>It seems that (in a broad sense) two approaches can be utilized to produce an algorithm for solving various optimization problems: </p>&#xA;&#xA;<ol>&#xA;<li>Start with a feasible solution and expand search until constraints are ...
habedi/stack-exchange-dataset
10,531
Landau Notation, Definitions: Limits vs. Corman's
<p>When dealing with Landau notation, $\Theta, O,\Omega,o,\omega$, why do some texts choose the Corman style definitions, i.e.:</p>&#xA;&#xA;<p>$$o(g(n))=\{ f(n): \forall c&gt;0:\exists n_0&gt;0:\; 0\leq f(n) &lt; cg(n): \; \forall n\geq n_0 \}$$</p>&#xA;&#xA;<p>and some texts use limit based definitions such as:</p>&#...
terminology asymptotics landau notation
1
Landau Notation, Definitions: Limits vs. Corman's -- (terminology asymptotics landau notation) <p>When dealing with Landau notation, $\Theta, O,\Omega,o,\omega$, why do some texts choose the Corman style definitions, i.e.:</p>&#xA;&#xA;<p>$$o(g(n))=\{ f(n): \forall c&gt;0:\exists n_0&gt;0:\; 0\leq f(n) &lt; cg(n): \; \...
habedi/stack-exchange-dataset
10,538
BIT: What is the intuition behind a binary indexed tree and how was it thought about?
<p>A binary indexed tree has very less or relatively no literature as compared to other data structures. The only place where it is taught is <a href="http://community.topcoder.com/tc?module=Static&amp;d1=tutorials&amp;d2=binaryIndexedTrees">the topcoder tutorial</a>. Although the tutorial is complete in all the explan...
algorithms binary trees trees
1
BIT: What is the intuition behind a binary indexed tree and how was it thought about? -- (algorithms binary trees trees) <p>A binary indexed tree has very less or relatively no literature as compared to other data structures. The only place where it is taught is <a href="http://community.topcoder.com/tc?module=Static&a...
habedi/stack-exchange-dataset
10,539
A "natural" decidable problem not in $\mathsf{NP}$?
<p>Are there any "natural" examples of decidable problems that are definitively known not to be in <strong>NP</strong>? The decidable languages I know of that are not contained in <strong>NP</strong> are usually derived from the time hierarchy theorem, which produces "artificial" languages based on diagonalization.</p...
np
1
A "natural" decidable problem not in $\mathsf{NP}$? -- (np) <p>Are there any "natural" examples of decidable problems that are definitively known not to be in <strong>NP</strong>? The decidable languages I know of that are not contained in <strong>NP</strong> are usually derived from the time hierarchy theorem, which ...
habedi/stack-exchange-dataset
10,543
What algorithm would compute the maximum choices from two sets?
<p>Given two vectors of integers of possibly unequal lengths, how can I determine the maximum result possible from accumulating choosing the maximum between corresponding pairs of numbers between the two vectors with extra zeros inserted into the shorter vector to make up for the size difference?</p>&#xA;&#xA;<p>For ex...
algorithms optimization
1
What algorithm would compute the maximum choices from two sets? -- (algorithms optimization) <p>Given two vectors of integers of possibly unequal lengths, how can I determine the maximum result possible from accumulating choosing the maximum between corresponding pairs of numbers between the two vectors with extra zero...
habedi/stack-exchange-dataset
10,545
Image pattern detection - Finding similarities in same image
<p>The problem: Only pattern-like images are supposed to be uploaded and be used as backgrounds to a site, photos should not. How would you detect if an image looks enough like itself to be regarded as a pattern?</p>&#xA;
image processing
1
Image pattern detection - Finding similarities in same image -- (image processing) <p>The problem: Only pattern-like images are supposed to be uploaded and be used as backgrounds to a site, photos should not. How would you detect if an image looks enough like itself to be regarded as a pattern?</p>&#xA;
habedi/stack-exchange-dataset
10,548
Construct two functions $f$ and $g$ satisfying $f \ne O(g), g \ne O(f)$
<p>Construct two functions $ f,g: R^+ → R^+ $ satisfying:</p>&#xA;&#xA;<ol>&#xA;<li>$f, g$ are continuous;</li>&#xA;<li>$f, g$ are monotonically increasing;</li>&#xA;<li>$f \ne O(g)$ and $g \ne O(f)$.</li>&#xA;</ol>&#xA;
asymptotics landau notation
1
Construct two functions $f$ and $g$ satisfying $f \ne O(g), g \ne O(f)$ -- (asymptotics landau notation) <p>Construct two functions $ f,g: R^+ → R^+ $ satisfying:</p>&#xA;&#xA;<ol>&#xA;<li>$f, g$ are continuous;</li>&#xA;<li>$f, g$ are monotonically increasing;</li>&#xA;<li>$f \ne O(g)$ and $g \ne O(f)$.</li>&#xA;</...
habedi/stack-exchange-dataset
10,551
How to Prove E $\subsetneq$ EXP?
<p>I want to prove that $E \subsetneq EXP$ and i would like to do so using the Time Hierarchy Theorem </p>&#xA;&#xA;<p>I need to choose $f(n)$, i think $2^{cn}$ is a good choice, so here is my Proof:</p>&#xA;&#xA;<ul>&#xA;<li>$E\subseteq TIME(2^{cn})$</li>&#xA;<li>$TIME(2^{cn}) \subsetneq TIME(n^2 \cdot (2^{cn})^2)$ Ti...
complexity theory time complexity complexity classes
1
How to Prove E $\subsetneq$ EXP? -- (complexity theory time complexity complexity classes) <p>I want to prove that $E \subsetneq EXP$ and i would like to do so using the Time Hierarchy Theorem </p>&#xA;&#xA;<p>I need to choose $f(n)$, i think $2^{cn}$ is a good choice, so here is my Proof:</p>&#xA;&#xA;<ul>&#xA;<li>$E\...
habedi/stack-exchange-dataset
10,552
Division modulo a prime in modular arithmetic
<p>I am looking for a way to implement division in modular arithmetic using modulo prime.</p>&#xA;&#xA;<p>The method I found in math books is to <strong>try</strong> <span class="math-container">$u$</span> such that</p>&#xA;&#xA;<p><span class="math-container">$au \equiv 1 \pmod{p}$</span></p>&#xA;&#xA;<p><span class="...
arithmetic
1
Division modulo a prime in modular arithmetic -- (arithmetic) <p>I am looking for a way to implement division in modular arithmetic using modulo prime.</p>&#xA;&#xA;<p>The method I found in math books is to <strong>try</strong> <span class="math-container">$u$</span> such that</p>&#xA;&#xA;<p><span class="math-containe...
habedi/stack-exchange-dataset
10,555
Show that the Kleene star of any unary language is regular
<p>An exercise asks me to show that the Kleene star of any unary language $L$ is regular. $E$ is the alphabet, $E = \{ 1 \}$</p>&#xA;&#xA;<p>Here's my reasoning :</p>&#xA;&#xA;<ul>&#xA;<li>$L$ is regular $\implies$ $L^*$ is regular (closure property)</li>&#xA;<li>$L$ is not regular&#xA;<ul>&#xA;<li>$L$ contains the wor...
formal languages regular languages
1
Show that the Kleene star of any unary language is regular -- (formal languages regular languages) <p>An exercise asks me to show that the Kleene star of any unary language $L$ is regular. $E$ is the alphabet, $E = \{ 1 \}$</p>&#xA;&#xA;<p>Here's my reasoning :</p>&#xA;&#xA;<ul>&#xA;<li>$L$ is regular $\implies$ $L^*$ ...
habedi/stack-exchange-dataset
10,557
Deciding whether a given language is regular
<p>I am struggling with a homework assignment. This next question seems to be pretty easy, once I get what I feel like I'm missing now. Anyway, here goes:</p>&#xA;&#xA;<blockquote>&#xA; <p>Decide if the following language is regular or not and prove your&#xA; claim.</p>&#xA; &#xA; <p>$$L=\{a^{i_{1}}ba^{i_{2}}ba^{i_...
formal languages regular languages
1
Deciding whether a given language is regular -- (formal languages regular languages) <p>I am struggling with a homework assignment. This next question seems to be pretty easy, once I get what I feel like I'm missing now. Anyway, here goes:</p>&#xA;&#xA;<blockquote>&#xA; <p>Decide if the following language is regular o...
habedi/stack-exchange-dataset
10,561
Network modem question
<p>How would I solve the following can anyone help me.I know MIPS is basically how many instruction the processor can do per second but what should I do?</p>&#xA;&#xA;<p>Assume that we are receiving a message across a network using a modem with a rate of 56,000 bits/second. Furthermore assume that we are working on a w...
computer architecture coding theory arithmetic
1
Network modem question -- (computer architecture coding theory arithmetic) <p>How would I solve the following can anyone help me.I know MIPS is basically how many instruction the processor can do per second but what should I do?</p>&#xA;&#xA;<p>Assume that we are receiving a message across a network using a modem with ...
habedi/stack-exchange-dataset
10,567
Counting solutions to system of linear equations modulo prime
<p>I have implemented Gaussian elimination for solving system of linear equations in the field of modulo prime remainders. If there is a pivot equal to zero I assume the system has no solution but how to calculate number of solutions of such systems when all pivots are non-zero? (i.e. one and more solutions)</p>&#xA;
combinatorics linear algebra
1
Counting solutions to system of linear equations modulo prime -- (combinatorics linear algebra) <p>I have implemented Gaussian elimination for solving system of linear equations in the field of modulo prime remainders. If there is a pivot equal to zero I assume the system has no solution but how to calculate number of ...
habedi/stack-exchange-dataset
10,572
Perfect shuffle in parallel processing
<p>How is Perfect shuffle a better interconnect scheme for parallel processing? For example if we consider a problem of sum reduction, I want to understand how this scheme is useful when implementing sum reduction in parallel , for example on a GPU? </p>&#xA;
computer architecture parallel computing
1
Perfect shuffle in parallel processing -- (computer architecture parallel computing) <p>How is Perfect shuffle a better interconnect scheme for parallel processing? For example if we consider a problem of sum reduction, I want to understand how this scheme is useful when implementing sum reduction in parallel , for exa...
habedi/stack-exchange-dataset
10,573
Prove finding a near clique is NP-complete
<p>An undirected graph is a near clique if adding an additional edge would make it a clique. Formally, a graph $G = (V,E)$ contains a near clique of size $k$ where $k$ is a positive integer in $G$ if there exists $S \subseteq V$ where $|S| = k$ and $u,v \in S$ where $(u,v) \not\in E$, and $S$ forms a clique in $(V,E \c...
complexity theory graphs np complete
1
Prove finding a near clique is NP-complete -- (complexity theory graphs np complete) <p>An undirected graph is a near clique if adding an additional edge would make it a clique. Formally, a graph $G = (V,E)$ contains a near clique of size $k$ where $k$ is a positive integer in $G$ if there exists $S \subseteq V$ where ...
habedi/stack-exchange-dataset
10,576
Is induced subgraph isomorphism easy on an infinite subclass?
<p>Is there a sequence of undirected graphs $\{C_n\}_{n\in \mathbb N}$, where each $C_n$ has exactly $n$ vertices and the problem </p>&#xA;&#xA;<blockquote>&#xA; <p>Given $n$ and a graph $G$, is $C_n$ an induced subgraph of $G$?</p>&#xA;</blockquote>&#xA;&#xA;<p>is known to be in class $\mathsf{P}$?</p>&#xA;
complexity theory graphs
1
Is induced subgraph isomorphism easy on an infinite subclass? -- (complexity theory graphs) <p>Is there a sequence of undirected graphs $\{C_n\}_{n\in \mathbb N}$, where each $C_n$ has exactly $n$ vertices and the problem </p>&#xA;&#xA;<blockquote>&#xA; <p>Given $n$ and a graph $G$, is $C_n$ an induced subgraph of $G$...
habedi/stack-exchange-dataset
10,577
Pumping Lemma for regular languages proof doubt - Sipser Book
<p>I was reading the proof of pumping lemma from Sipser's book. I couldn't understand certain things mentioned there.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/OEUAS.jpg" alt="pumping lemma proof"></p>&#xA;&#xA;<p>In the second paragraph he has written, "because $r_l$ occurs among first $p+1$ places, we have ...
regular languages automata pumping lemma
1
Pumping Lemma for regular languages proof doubt - Sipser Book -- (regular languages automata pumping lemma) <p>I was reading the proof of pumping lemma from Sipser's book. I couldn't understand certain things mentioned there.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/OEUAS.jpg" alt="pumping lemma proof"></p>&...
habedi/stack-exchange-dataset
10,595
Prove Matrix Correspondence is NP-complete
<p>Consider the following problem. Given a $m \times n$ integer matrix $A$ and a $p \times q$ integer matrix $B$, do there exist one-to-one functions &#xA;$$r:\{1,2,...,m\} \rightarrow \{1,2,...,p\}$$&#xA;$$c:\{1,2,...,n\} \rightarrow \{1,2,...,q\}$$&#xA;where for all $1 \leq i \leq m$ and $1 \leq j \leq n$, $A[i,j] \l...
complexity theory np complete reductions
1
Prove Matrix Correspondence is NP-complete -- (complexity theory np complete reductions) <p>Consider the following problem. Given a $m \times n$ integer matrix $A$ and a $p \times q$ integer matrix $B$, do there exist one-to-one functions &#xA;$$r:\{1,2,...,m\} \rightarrow \{1,2,...,p\}$$&#xA;$$c:\{1,2,...,n\} \rightar...
habedi/stack-exchange-dataset
10,598
Fastest Algo to separate the 0s and 1s
<p>Suppose, I have an array of length 100.&#xA;I have 0s at some positions and 1s at some other positions.&#xA;What is the <strong><em>fastest method</em></strong> by which I can separate the <strong>0s</strong> and <strong>1s</strong>, so that we get all the 0s at the beginning and all the 1s at the remaining position...
program optimization
1
Fastest Algo to separate the 0s and 1s -- (program optimization) <p>Suppose, I have an array of length 100.&#xA;I have 0s at some positions and 1s at some other positions.&#xA;What is the <strong><em>fastest method</em></strong> by which I can separate the <strong>0s</strong> and <strong>1s</strong>, so that we get all...
habedi/stack-exchange-dataset
10,612
Weighted sum of last N numbers
<p>Suppose we're receiving numbers in a stream. After each number is received, a weighted sum of the last $N$ numbers needs to be calculated, where the weights are always the same, but arbitrary. </p>&#xA;&#xA;<p>How efficiently can this done if we are allowed to keep a data structure to help with the computation? Can ...
algorithms data structures online algorithms
1
Weighted sum of last N numbers -- (algorithms data structures online algorithms) <p>Suppose we're receiving numbers in a stream. After each number is received, a weighted sum of the last $N$ numbers needs to be calculated, where the weights are always the same, but arbitrary. </p>&#xA;&#xA;<p>How efficiently can this d...
habedi/stack-exchange-dataset
10,613
Evaluation metric for an ordering algorithm
<p>There is a sentence with N words.</p>&#xA;&#xA;<p>The words are randomly shuffled.</p>&#xA;&#xA;<p>I have a heuristic algorithm that tries to restore the original order.</p>&#xA;&#xA;<p>I want to evaluate my algorithm on a dataset of several hundred long sentences from the internet. </p>&#xA;&#xA;<p>The main goal of...
natural language processing string metrics
1
Evaluation metric for an ordering algorithm -- (natural language processing string metrics) <p>There is a sentence with N words.</p>&#xA;&#xA;<p>The words are randomly shuffled.</p>&#xA;&#xA;<p>I have a heuristic algorithm that tries to restore the original order.</p>&#xA;&#xA;<p>I want to evaluate my algorithm on a da...
habedi/stack-exchange-dataset
10,614
How to understand the SR Latch
<p>I can't wrap my head around how the SR Latch works. &#xA;Seemingly, you plug an input line from R, and another from S, and you are supposed to get results in $Q$ and $Q'$. </p>&#xA;&#xA;<p>However, both R and S require input from the other's output, and the other's output requires input from the other other's output...
circuits sequential circuit
1
How to understand the SR Latch -- (circuits sequential circuit) <p>I can't wrap my head around how the SR Latch works. &#xA;Seemingly, you plug an input line from R, and another from S, and you are supposed to get results in $Q$ and $Q'$. </p>&#xA;&#xA;<p>However, both R and S require input from the other's output, and...
habedi/stack-exchange-dataset
10,616
Controlled NOT gate a type of measurement?
<p>I'm trying to understand the theory of quantum computing, and I'm a bit confused on a particular circuit:</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/i4Wzr.png" alt="http://i.stack.imgur.com/WWvxr.png"></p>&#xA;&#xA;<p>Would the controlled NOT gate be a type of measurement, causing Q1 to be either |0> or |1>...
quantum computing
1
Controlled NOT gate a type of measurement? -- (quantum computing) <p>I'm trying to understand the theory of quantum computing, and I'm a bit confused on a particular circuit:</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/i4Wzr.png" alt="http://i.stack.imgur.com/WWvxr.png"></p>&#xA;&#xA;<p>Would the controlled NOT...
habedi/stack-exchange-dataset
10,625
Recurrence relation with sum
<p>This is a question about recurrence relation that contains sum inside the recursion.I am totally stuck. Can anyone help?</p>&#xA;&#xA;<p>The problem asks to solve the following recursion $T(n)=\frac{1}{n} \sum_{i=1}^{n-1}(T(i)+T(n-i))+cn$. The problem also warns that unwrapping is going to be the wrong approach and ...
recurrence relation
1
Recurrence relation with sum -- (recurrence relation) <p>This is a question about recurrence relation that contains sum inside the recursion.I am totally stuck. Can anyone help?</p>&#xA;&#xA;<p>The problem asks to solve the following recursion $T(n)=\frac{1}{n} \sum_{i=1}^{n-1}(T(i)+T(n-i))+cn$. The problem also warns ...
habedi/stack-exchange-dataset
10,627
Matching Lemma with infinitely many symbols
<p>I was reading about Universal Turing Machines.</p>&#xA;&#xA;<p>I see that the matching lemma states, that between two symbols X and Y, if there are only 1-s and blanks, then a TM exists, which can count the number of ones.</p>&#xA;&#xA;<p>This is used to match strings of ones between two tapes.</p>&#xA;&#xA;<p>Now I...
turing machines machine models
1
Matching Lemma with infinitely many symbols -- (turing machines machine models) <p>I was reading about Universal Turing Machines.</p>&#xA;&#xA;<p>I see that the matching lemma states, that between two symbols X and Y, if there are only 1-s and blanks, then a TM exists, which can count the number of ones.</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
10,635
Is $L= \{ a^ib^j \mid j\neq i \ and \ j\neq2i \ \} $ context free?
<p>$L = \{ a^ib^j \mid j\neq i \ and \ j\neq2i \ \} $</p>&#xA;&#xA;<p>Is this language a context free language?&#xA;If yes give a PDA. If no, give a proof.</p>&#xA;&#xA;<p>The pumping lemma for context free languages doesn't seem to work here.</p>&#xA;&#xA;<p>Let $p&gt;1$ be the pumping length. Let the string be divide...
formal languages context free pushdown automata
1
Is $L= \{ a^ib^j \mid j\neq i \ and \ j\neq2i \ \} $ context free? -- (formal languages context free pushdown automata) <p>$L = \{ a^ib^j \mid j\neq i \ and \ j\neq2i \ \} $</p>&#xA;&#xA;<p>Is this language a context free language?&#xA;If yes give a PDA. If no, give a proof.</p>&#xA;&#xA;<p>The pumping lemma for contex...
habedi/stack-exchange-dataset
10,636
Complexity of transposing matrices represented as list of row or column vectors
<p>Given [[1,4,7],[2,5,8],[3,6,9]] which is a list of the column vectors of matrix</p>&#xA;&#xA;<pre><code>|1, 2, 3|&#xA;|4, 5, 6|&#xA;|7, 8, 9|&#xA;</code></pre>&#xA;&#xA;<p>is $ \Omega(n^2) $ a lower bound for transposing? Assume the matrix is not always square. I have to touch each element at least once, because goi...
algorithms lower bounds matrices
1
Complexity of transposing matrices represented as list of row or column vectors -- (algorithms lower bounds matrices) <p>Given [[1,4,7],[2,5,8],[3,6,9]] which is a list of the column vectors of matrix</p>&#xA;&#xA;<pre><code>|1, 2, 3|&#xA;|4, 5, 6|&#xA;|7, 8, 9|&#xA;</code></pre>&#xA;&#xA;<p>is $ \Omega(n^2) $ a lower ...
habedi/stack-exchange-dataset
10,637
Applying Expectation Maximization to coin toss examples
<p>I've been self-studying the Expectation Maximization lately, and grabbed myself some simple examples in the process:</p>&#xA;&#xA;<p>From <a href="http://cs.dartmouth.edu/~cs104/CS104_11.04.22.pdf">here</a>: There are three coins $c_0$, $c_1$ and $c_2$ with $p_0$, $p_1$ and $p_2$ the respective probability for landi...
probability theory statistics
1
Applying Expectation Maximization to coin toss examples -- (probability theory statistics) <p>I've been self-studying the Expectation Maximization lately, and grabbed myself some simple examples in the process:</p>&#xA;&#xA;<p>From <a href="http://cs.dartmouth.edu/~cs104/CS104_11.04.22.pdf">here</a>: There are three co...
habedi/stack-exchange-dataset
10,641
Computer Architecture-3 level RAM hierarchy
<p>In all computer architecture books we study that Cache memory could be divided into 3 levels (L1,L2 and L3) and its very beneficial to do so. Why don't we use the same approach in case of main memory (RAM). Is there any particular reason that we avoid this?</p>&#xA;
computer architecture memory hardware
1
Computer Architecture-3 level RAM hierarchy -- (computer architecture memory hardware) <p>In all computer architecture books we study that Cache memory could be divided into 3 levels (L1,L2 and L3) and its very beneficial to do so. Why don't we use the same approach in case of main memory (RAM). Is there any particular...
habedi/stack-exchange-dataset
10,646
How hard is a variant of Sudoku puzzle?
<p>Sudoku is well known puzzle which is known to be NP-complete and it is a special case of more general problem known as Latin squares. A correct solution of the $N \times N$ square consists of filling every row and every column with numbers from $1$ to $N$ under the condition that every number appears exactly once in...
complexity theory np complete
1
How hard is a variant of Sudoku puzzle? -- (complexity theory np complete) <p>Sudoku is well known puzzle which is known to be NP-complete and it is a special case of more general problem known as Latin squares. A correct solution of the $N \times N$ square consists of filling every row and every column with numbers fr...
habedi/stack-exchange-dataset
10,648
Does closure against countable union survive union of classes?
<p>A class of languages $\mathcal{C}$ is <em>closed under countable union</em> (<em>cucu</em>) if for all series of languages in $\mathcal{C}$ ($(L_i)_{i\in\mathbb{N}} \in \mathcal{C}^\mathbb{N}$) the language $\bigcup_{i\in\mathbb{N}}L_i = \{x\mid \exists i\in\mathbb{N}: x \in L_i\}$ is an element of $\mathcal{C}$.</p...
formal languages closure properties
1
Does closure against countable union survive union of classes? -- (formal languages closure properties) <p>A class of languages $\mathcal{C}$ is <em>closed under countable union</em> (<em>cucu</em>) if for all series of languages in $\mathcal{C}$ ($(L_i)_{i\in\mathbb{N}} \in \mathcal{C}^\mathbb{N}$) the language $\bigc...
habedi/stack-exchange-dataset
10,656
Is there a "sorting" algorithm which returns a random permutation when using a coin-flip comparator?
<p>Inspired by <a href="https://cs.stackexchange.com/q/2336/71">this question</a> in which the asker wants to know if the running time changes when the comparator used in a standard search algorithm is replaced by a fair coin-flip, and also <a href="http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.ht...
sorting randomized algorithms permutations
1
Is there a "sorting" algorithm which returns a random permutation when using a coin-flip comparator? -- (sorting randomized algorithms permutations) <p>Inspired by <a href="https://cs.stackexchange.com/q/2336/71">this question</a> in which the asker wants to know if the running time changes when the comparator used in ...
habedi/stack-exchange-dataset
10,664
Asymptotic Properties of Functions in Complexity Analysis
<p>When dealing with the analysis of time and space complexity of algorithms, is it safe to assume that any function which has tight bounds ( i.e. $f(n)=\Theta(g(n))$ is asymptotically positive and asymptotically monotonically increasing. I mean that for all $n$ greater than or equal to some $n_0$ both those propertie...
time complexity asymptotics landau notation
1
Asymptotic Properties of Functions in Complexity Analysis -- (time complexity asymptotics landau notation) <p>When dealing with the analysis of time and space complexity of algorithms, is it safe to assume that any function which has tight bounds ( i.e. $f(n)=\Theta(g(n))$ is asymptotically positive and asymptotically ...
habedi/stack-exchange-dataset
10,675
Why is the subset of palindromes of a regular language context-free?
<p>Why is $A(L) = \{x \in L \mid x = x^R \}$ context-free if $L$ is a regular language? </p>&#xA;&#xA;<p>Trying to understand the approach to determining whether a regular language is context-free.</p>&#xA;
formal languages regular languages context free closure properties
1
Why is the subset of palindromes of a regular language context-free? -- (formal languages regular languages context free closure properties) <p>Why is $A(L) = \{x \in L \mid x = x^R \}$ context-free if $L$ is a regular language? </p>&#xA;&#xA;<p>Trying to understand the approach to determining whether a regular languag...
habedi/stack-exchange-dataset
10,679
Minimal-envy land division
<p>There is a land divided to $D$ districts.</p>&#xA;&#xA;<p>There are $C$ citizens.</p>&#xA;&#xA;<p>We want to divide the land to the citizens, such that each citizen receives a single land-plot in a single district.</p>&#xA;&#xA;<p>Each citizen prefers certain districts, however, the preference also depends on the si...
reference request game theory
1
Minimal-envy land division -- (reference request game theory) <p>There is a land divided to $D$ districts.</p>&#xA;&#xA;<p>There are $C$ citizens.</p>&#xA;&#xA;<p>We want to divide the land to the citizens, such that each citizen receives a single land-plot in a single district.</p>&#xA;&#xA;<p>Each citizen prefers cer...
habedi/stack-exchange-dataset
10,681
Is detecting "doubly" arithmetic progressions 3SUM-hard?
<p>This is inspired by an <a href="http://www.careercup.com/question?id=15877680">interview question</a>.</p>&#xA;&#xA;<p>We are given an array of integers $a_1, \dots, a_n$ and have to determine if there are distinct $i \lt j \lt k$ such that</p>&#xA;&#xA;<ul>&#xA;<li>$a_k - a_j = a_j - a_i$</li>&#xA;<li>$k - j = j - ...
algorithms complexity theory lower bounds
1
Is detecting "doubly" arithmetic progressions 3SUM-hard? -- (algorithms complexity theory lower bounds) <p>This is inspired by an <a href="http://www.careercup.com/question?id=15877680">interview question</a>.</p>&#xA;&#xA;<p>We are given an array of integers $a_1, \dots, a_n$ and have to determine if there are distinc...
habedi/stack-exchange-dataset
10,683
What is the time complexity of generating n-th prime number?
<p>Say I want to find the n-th prime. Is there an algorithm to directly calculate it or must I do with sieving? I know always calculate the next prime with a sieve principle, but what if I want the n-th prime?</p>&#xA;&#xA;<p>Duplicate:</p>&#xA;&#xA;<p><a href="https://math.stackexchange.com/questions/1257/is-there-a-k...
algorithms primes
1
What is the time complexity of generating n-th prime number? -- (algorithms primes) <p>Say I want to find the n-th prime. Is there an algorithm to directly calculate it or must I do with sieving? I know always calculate the next prime with a sieve principle, but what if I want the n-th prime?</p>&#xA;&#xA;<p>Duplicate:...
habedi/stack-exchange-dataset
10,684
Union of two automata
<p>I need to find a minimal DFA given the following information: </p>&#xA;&#xA;<blockquote>&#xA; <p>$ \{a^nb : n\geq 0\} \cup \{b^na: n \geq 1\}$</p>&#xA;</blockquote>&#xA;&#xA;<p>Now, maybe I'm not seeing this properly, but I don't see how this is possible: the first one will take 0 or more a's followed by one b, whe...
automata finite automata
1
Union of two automata -- (automata finite automata) <p>I need to find a minimal DFA given the following information: </p>&#xA;&#xA;<blockquote>&#xA; <p>$ \{a^nb : n\geq 0\} \cup \{b^na: n \geq 1\}$</p>&#xA;</blockquote>&#xA;&#xA;<p>Now, maybe I'm not seeing this properly, but I don't see how this is possible: the firs...
habedi/stack-exchange-dataset
10,690
How to prove polynomial time equivalence?
<p>Define the problem $W$:</p>&#xA;&#xA;<blockquote>&#xA; <p><strong>Input:</strong> A multi-set of numbers $S$, and a number $t$.</p>&#xA; &#xA; <p><strong>Question:</strong> What is the smallest subset $s \subseteq S$ so that $\sum_{k \in s} k = t$, if there is one? (If not, return <code>none</code>.)</p>&#xA;</bl...
complexity theory reductions p vs np
1
How to prove polynomial time equivalence? -- (complexity theory reductions p vs np) <p>Define the problem $W$:</p>&#xA;&#xA;<blockquote>&#xA; <p><strong>Input:</strong> A multi-set of numbers $S$, and a number $t$.</p>&#xA; &#xA; <p><strong>Question:</strong> What is the smallest subset $s \subseteq S$ so that $\sum...
habedi/stack-exchange-dataset
10,694
How do you apply Context-Free Pumping Lemma to these problems, and how do the approaches differ?
<p>How are these Context-Free Pumping Lemma Approaches differ?&#xA;Maybe this might help understand pumping lemma better</p>&#xA;&#xA;<p>$(a^{i}b^{i}c^{j}d^{j} \mid i, j \geq 0$}</p>&#xA;&#xA;<p>$(a^{i}b^{j}c^{i}d^{j} \mid i, j \geq 0$}</p>&#xA;&#xA;<p>$(a^{i}b^{j}c^{j}d^{i} \mid i, j \geq 0$}</p>&#xA;&#xA;<p>I underst...
context free pumping lemma
1
How do you apply Context-Free Pumping Lemma to these problems, and how do the approaches differ? -- (context free pumping lemma) <p>How are these Context-Free Pumping Lemma Approaches differ?&#xA;Maybe this might help understand pumping lemma better</p>&#xA;&#xA;<p>$(a^{i}b^{i}c^{j}d^{j} \mid i, j \geq 0$}</p>&#xA;&#xA...
habedi/stack-exchange-dataset
10,696
Getting started with Program Analysis
<p>I'm looking for resources on getting started with <a href="http://en.wikipedia.org/wiki/Program_analysis">program analysis</a>.</p>&#xA;&#xA;<p>The only book I've found on the topic is the <a href="http://www.amazon.ca/Principles-Program-Analysis-Flemming-Nielson/dp/3540654100">Nielson &amp; Nielson</a> book.</p>&#x...
reference request compilers semantics
1
Getting started with Program Analysis -- (reference request compilers semantics) <p>I'm looking for resources on getting started with <a href="http://en.wikipedia.org/wiki/Program_analysis">program analysis</a>.</p>&#xA;&#xA;<p>The only book I've found on the topic is the <a href="http://www.amazon.ca/Principles-Progra...
habedi/stack-exchange-dataset
10,701
Complexity of algorithm inserting an element in a circular linked list at the front end
<p>In a circular linked list, if an elements needs to be inserted at front [just before the node pointed by head], can be done in O(1) (see the answer <a href="https://stackoverflow.com/questions/1096505/implement-an-algorithm-to-insert-a-node-into-a-circular-linked-list-without-trav">here</a>)</p>&#xA;&#xA;<p>But in a...
data structures efficiency linked lists
1
Complexity of algorithm inserting an element in a circular linked list at the front end -- (data structures efficiency linked lists) <p>In a circular linked list, if an elements needs to be inserted at front [just before the node pointed by head], can be done in O(1) (see the answer <a href="https://stackoverflow.com/q...
habedi/stack-exchange-dataset
10,706
Can a recurrence relation be translated to a composite function of itself?
<p>Perhaps this is a question for stackoverflow because its practical nature, but I am not aware of any general method to relate recurrence relations and recursive functions.</p>&#xA;&#xA;<p>Having as an example this recurrence relation:</p>&#xA;&#xA;<p>$\qquad \begin{align}a_0 &amp;= a_1 = 1 \\ 2a_n &amp;= 3a_{n-1}-2a...
recurrence relation recursion
1
Can a recurrence relation be translated to a composite function of itself? -- (recurrence relation recursion) <p>Perhaps this is a question for stackoverflow because its practical nature, but I am not aware of any general method to relate recurrence relations and recursive functions.</p>&#xA;&#xA;<p>Having as an exampl...
habedi/stack-exchange-dataset
10,710
Why is the name half-adder used to represent the half-adder?
<p>I have recently came across half-adders and full adders in my Logic Network lectures. I have somewhat understood the theory, but I am still unable to understand the reason why they called them in that name? I mean, is there any reason why half-adders have the name ‘half-adders’?</p>&#xA;
terminology circuits
1
Why is the name half-adder used to represent the half-adder? -- (terminology circuits) <p>I have recently came across half-adders and full adders in my Logic Network lectures. I have somewhat understood the theory, but I am still unable to understand the reason why they called them in that name? I mean, is there any re...
habedi/stack-exchange-dataset
10,717
DFS miniumum spanning tree
<p>Just a quick question,</p>&#xA;&#xA;<p>If i were to alter the general DFS algorithm to do this:</p>&#xA;&#xA;<pre><code>minDFS(Vertex v)&#xA;{&#xA; if (!v.getVisted())&#xA; {&#xA; v.setVisited();&#xA; Vertex temp = findClosestVertex();&#xA; graph.addEdge(v, temp);&#xA; minDFS(temp);&#xA; ...
algorithms graphs spanning trees
1
DFS miniumum spanning tree -- (algorithms graphs spanning trees) <p>Just a quick question,</p>&#xA;&#xA;<p>If i were to alter the general DFS algorithm to do this:</p>&#xA;&#xA;<pre><code>minDFS(Vertex v)&#xA;{&#xA; if (!v.getVisted())&#xA; {&#xA; v.setVisited();&#xA; Vertex temp = findClosestVertex();&...
habedi/stack-exchange-dataset
10,718
Destination-based vs source-based routing
<p>I understand that destination-based routing builds the "route" from the destination backwards to the source (e.g. if using a spanning tree, then the tree is routed at the destination). With source-based routing the opposite is true: the route is build from the source onwards towards the destination.</p>&#xA;&#xA;<p>...
algorithms distributed systems shortest path routing
1
Destination-based vs source-based routing -- (algorithms distributed systems shortest path routing) <p>I understand that destination-based routing builds the "route" from the destination backwards to the source (e.g. if using a spanning tree, then the tree is routed at the destination). With source-based routing the op...
habedi/stack-exchange-dataset
10,722
Why is there no two-bit data type?
<p>Why do most programming languages (if not all) lack a 2-bit data type?</p>&#xA;&#xA;<p>A <strong>boolean</strong> is a single bit with the values being <strong>either</strong> <em>true</em> or <em>false</em>.</p>&#xA;&#xA;<p>Why is there no native, corresponding type where the values can be either <em>true</em>, <em...
programming languages
1
Why is there no two-bit data type? -- (programming languages) <p>Why do most programming languages (if not all) lack a 2-bit data type?</p>&#xA;&#xA;<p>A <strong>boolean</strong> is a single bit with the values being <strong>either</strong> <em>true</em> or <em>false</em>.</p>&#xA;&#xA;<p>Why is there no native, corres...
habedi/stack-exchange-dataset
10,724
VAR autoincrement with constant space consumption for super large tables
<p>Assume there was a database system that had a data type called <code>VARINT</code> or some variant that allowed instead of fixed-length <code>INT</code>s regardless of value, a <code>1</code> would only take 1 <code>BIT</code> (<code>1</code>), <code>2</code> would take 2 <code>BIT</code>s (<code>10</code>), etc.</p...
integers database theory performance
1
VAR autoincrement with constant space consumption for super large tables -- (integers database theory performance) <p>Assume there was a database system that had a data type called <code>VARINT</code> or some variant that allowed instead of fixed-length <code>INT</code>s regardless of value, a <code>1</code> would only...
habedi/stack-exchange-dataset
10,728
How many minimal spanning trees are there when all edge costs are distinct?
<p>Suppose all costs on edges are distinct. How many minimal spanning trees are possible?</p>&#xA;&#xA;<p>I dont know if this question is supposed to be easy or hard, but all I can come up with is one, because Kruskal's, and any other greedy algorithm should choose all the smallest weighted edges first. Then, if all we...
graphs spanning trees
1
How many minimal spanning trees are there when all edge costs are distinct? -- (graphs spanning trees) <p>Suppose all costs on edges are distinct. How many minimal spanning trees are possible?</p>&#xA;&#xA;<p>I dont know if this question is supposed to be easy or hard, but all I can come up with is one, because Kruskal...
habedi/stack-exchange-dataset
10,732
How to prove NP-hardness of a longest-path problem?
<p>I have this question:</p>&#xA;&#xA;<pre><code>Input: &#xA;G(V, E) = an undirected graph, V={v1, v2, ..., vn} (V = set of nodes, E = set of edges)&#xA;where there is a path connecting from v1 to vn.&#xA;&#xA;Question: &#xA;What is the maximum number of nodes you can visit when starting from v1 and ending at vn. &#xA;...
complexity theory reductions proof techniques np hard
1
How to prove NP-hardness of a longest-path problem? -- (complexity theory reductions proof techniques np hard) <p>I have this question:</p>&#xA;&#xA;<pre><code>Input: &#xA;G(V, E) = an undirected graph, V={v1, v2, ..., vn} (V = set of nodes, E = set of edges)&#xA;where there is a path connecting from v1 to vn.&#xA;&#xA...
habedi/stack-exchange-dataset
10,733
Difference between the languages accepted by two DFAs with different initial state/accepting states?
<p><em>Recently, I asked a <a href="https://math.stackexchange.com/q/334581/17111">question</a> on Math SE. No response yet. This question is related to that question, but more technical details toward computer science.</em></p>&#xA;&#xA;<p>Given two DFAs $A = (Q, \Sigma, \delta, q_1, F_1)$ and $B = (Q, \Sigma, \delta,...
formal languages reference request finite automata
1
Difference between the languages accepted by two DFAs with different initial state/accepting states? -- (formal languages reference request finite automata) <p><em>Recently, I asked a <a href="https://math.stackexchange.com/q/334581/17111">question</a> on Math SE. No response yet. This question is related to that quest...
habedi/stack-exchange-dataset
10,736
Minimize the total execution time of jobs executed by 3 processors in sequence
<p>There are 3 processors: $P_1$, $P_2$, $P_3$. $P_1$ can execute only one job while the other two can execute any number of jobs in parallel.</p>&#xA;&#xA;<p>Each job consists of 3 parts, and each part is processed by their respective processor (eg. part 1 by $P_1$). Furthermore part 2 can be executed only after $P_1$...
algorithms scheduling
1
Minimize the total execution time of jobs executed by 3 processors in sequence -- (algorithms scheduling) <p>There are 3 processors: $P_1$, $P_2$, $P_3$. $P_1$ can execute only one job while the other two can execute any number of jobs in parallel.</p>&#xA;&#xA;<p>Each job consists of 3 parts, and each part is processe...
habedi/stack-exchange-dataset
10,747
How to reduce from subset-sum problem?
<p>I have this problem which is described as follows:</p>&#xA;&#xA;<p>Input:&#xA; You are given a multi-set $M$ (a set that can contain duplicates), and two numbers $P$ and $T$.&#xA; $M = {(x_1,y_1), (x_2,y_2), ..., (x_n,y_n)}$.&#xA; Each $x$ and $y$ is an integer $&gt;= 0$.&#xA; $P$ in an integer $&gt;= 0$...
complexity theory reductions np hard
1
How to reduce from subset-sum problem? -- (complexity theory reductions np hard) <p>I have this problem which is described as follows:</p>&#xA;&#xA;<p>Input:&#xA; You are given a multi-set $M$ (a set that can contain duplicates), and two numbers $P$ and $T$.&#xA; $M = {(x_1,y_1), (x_2,y_2), ..., (x_n,y_n)}$.&#xA;...
habedi/stack-exchange-dataset
10,756
Sampling perfect matching uniformly at random
<p>Suppose I have a graph $G$ with $M(G)$ the (unknown) set of perfect matchings of $G$. Suppose this set is non-empty, then how difficult is it to sample uniformly at random from $M(G)$? What if I am okay with a distribution that is close to uniform, but not quite uniform, then is there an efficient algorithm?</p>&#xA...
algorithms complexity theory matching sampling
1
Sampling perfect matching uniformly at random -- (algorithms complexity theory matching sampling) <p>Suppose I have a graph $G$ with $M(G)$ the (unknown) set of perfect matchings of $G$. Suppose this set is non-empty, then how difficult is it to sample uniformly at random from $M(G)$? What if I am okay with a distribut...
habedi/stack-exchange-dataset
10,759
Get the running time of forest disjoint sets
<p>If you have a forest implementation of disjoint sets, and have the union by weight/rank heuristic where you append the smaller one. Then why is the worst case running time &Theta;(m log n)? (m is the number of disjoint sets and n is the number of Make Set operations.)</p>&#xA;
data structures
1
Get the running time of forest disjoint sets -- (data structures) <p>If you have a forest implementation of disjoint sets, and have the union by weight/rank heuristic where you append the smaller one. Then why is the worst case running time &Theta;(m log n)? (m is the number of disjoint sets and n is the number of Make...
habedi/stack-exchange-dataset
10,761
Synchronization using serialization
<p>How can someone synchronize two or more threads using serialization? According to my professor's slides and code assignments you can use serialization to solve the synchronization problem. (He doesn't explain what serialization is).</p>&#xA;&#xA;<p>I tried to do my research but serialization means that you put data ...
concurrency synchronization
1
Synchronization using serialization -- (concurrency synchronization) <p>How can someone synchronize two or more threads using serialization? According to my professor's slides and code assignments you can use serialization to solve the synchronization problem. (He doesn't explain what serialization is).</p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
10,762
Faster Algorithm for Computing Norm
<p>Can anyone suggest an algorithm faster than $\Theta(n^{2})$ for computing the following function:</p>&#xA;&#xA;<p>$$||n||:=\frac{1}{\max\{k \in \mathbb{N}: 1|n, 2|n,\ldots,k|n\}}$$</p>&#xA;
algorithms discrete mathematics number theory
1
Faster Algorithm for Computing Norm -- (algorithms discrete mathematics number theory) <p>Can anyone suggest an algorithm faster than $\Theta(n^{2})$ for computing the following function:</p>&#xA;&#xA;<p>$$||n||:=\frac{1}{\max\{k \in \mathbb{N}: 1|n, 2|n,\ldots,k|n\}}$$</p>&#xA;
habedi/stack-exchange-dataset
10,768
Star free language vs. regular language
<p>I was wondering, since <span class="math-container">$a^*$</span> is itself a star-free language, is there a regular language that is not a star-free language? Could you give an example?</p>&#xA;&#xA;<hr>&#xA;&#xA;<p><em>(from <a href="http://en.wikipedia.org/wiki/Star-free_language#cite_ref-Law235_1-0" rel="nofollow...
formal languages regular languages automata
1
Star free language vs. regular language -- (formal languages regular languages automata) <p>I was wondering, since <span class="math-container">$a^*$</span> is itself a star-free language, is there a regular language that is not a star-free language? Could you give an example?</p>&#xA;&#xA;<hr>&#xA;&#xA;<p><em>(from <a...
habedi/stack-exchange-dataset
10,786
How to find specificity of a regex match?
<p>I'm thinking about a routing system. Imagine I have the two following regexes</p>&#xA;&#xA;<ul>&#xA;<li>pathpart1/pathpart2 => specific match that routes to controller1</li>&#xA;<li>.* => catch-all that routes to controller2</li>&#xA;</ul>&#xA;&#xA;<p>And I let them match on a URL, e.g. 'pathpart1/pathpart2'.</p>&#x...
algorithms regular expressions strings
1
How to find specificity of a regex match? -- (algorithms regular expressions strings) <p>I'm thinking about a routing system. Imagine I have the two following regexes</p>&#xA;&#xA;<ul>&#xA;<li>pathpart1/pathpart2 => specific match that routes to controller1</li>&#xA;<li>.* => catch-all that routes to controller2</li>&#...
habedi/stack-exchange-dataset
10,787
Is this NIM game tree correct?
<p>I have an assignment to construct a game of Nim (a game in which two players must divide a pile of tokens into two unequal sizes; 6 can be divided into 2 &amp; 4 but not 3 &amp; 3). I was provided a game tree (the same one I find on Google), but I am confused. Shouldn't the first turn of the second player have acces...
game theory
1
Is this NIM game tree correct? -- (game theory) <p>I have an assignment to construct a game of Nim (a game in which two players must divide a pile of tokens into two unequal sizes; 6 can be divided into 2 &amp; 4 but not 3 &amp; 3). I was provided a game tree (the same one I find on Google), but I am confused. Shouldn'...
habedi/stack-exchange-dataset
10,801
What is the difference between Multiprogramming and Multitasking
<p>I am finding it difficult to clearly differentiate between Multiprogramming and Multitasking.</p>&#xA;&#xA;<p>My primary source has been <a href="http://en.wikipedia.org/wiki/Computer_multitasking">Wikipedia</a>, but the WP article seems to be a little at odds with some less reputable sources (like my college profes...
terminology process scheduling
1
What is the difference between Multiprogramming and Multitasking -- (terminology process scheduling) <p>I am finding it difficult to clearly differentiate between Multiprogramming and Multitasking.</p>&#xA;&#xA;<p>My primary source has been <a href="http://en.wikipedia.org/wiki/Computer_multitasking">Wikipedia</a>, but...
habedi/stack-exchange-dataset
10,804
Non-trivial runs of Prim's algorithm
<p>What does it mean when we say that a run of Prim's algorithm is <em>trivial</em>? What are example graphs for either case, that is with and without trivial runs?</p>&#xA;
algorithms terminology graphs
1
Non-trivial runs of Prim's algorithm -- (algorithms terminology graphs) <p>What does it mean when we say that a run of Prim's algorithm is <em>trivial</em>? What are example graphs for either case, that is with and without trivial runs?</p>&#xA;
habedi/stack-exchange-dataset
10,818
Poker with Bluffing (game theory)
<p>I'm doing a self-study of <a href="http://rads.stackoverflow.com/amzn/click/0691140510" rel="nofollow noreferrer">Game Theory Evolving by Gintis</a>, and am stuck on problem 4.16 "Poker with Bluffing".</p>&#xA;&#xA;<p>The first question asks "<em>Show that Ollie has 64 pure strategies and Stan has 8 pure strategies....
game theory board games
1
Poker with Bluffing (game theory) -- (game theory board games) <p>I'm doing a self-study of <a href="http://rads.stackoverflow.com/amzn/click/0691140510" rel="nofollow noreferrer">Game Theory Evolving by Gintis</a>, and am stuck on problem 4.16 "Poker with Bluffing".</p>&#xA;&#xA;<p>The first question asks "<em>Show th...
habedi/stack-exchange-dataset
10,819
Linear time labeling algorithm for a tree?
<p>I have an undirected tree whose vertices I want to label. The leaf nodes should be labeled one. Then, assume the leaves were removed. In the tree that remains, the leaves should be labeled two. This process continues in the obvious way until all vertices have a label. The reason I do this is I want to store the vert...
algorithms trees
1
Linear time labeling algorithm for a tree? -- (algorithms trees) <p>I have an undirected tree whose vertices I want to label. The leaf nodes should be labeled one. Then, assume the leaves were removed. In the tree that remains, the leaves should be labeled two. This process continues in the obvious way until all vertic...
habedi/stack-exchange-dataset
10,837
Why do negative array indices make sense?
<p>I have came across a weird experience in C programming. Consider this code:</p>&#xA;&#xA;<pre><code>int main(){&#xA; int array1[6] = {0, 1, 2, 3, 4, 5};&#xA; int array2[6] = {6, 7, 8, 9, 10, 11};&#xA;&#xA; printf("%d\n", array1[-1]);&#xA; return 0;&#xA;}&#xA;</code></pre>&#xA;&#xA;<p>When I compile and run this,...
programming languages arrays c
1
Why do negative array indices make sense? -- (programming languages arrays c) <p>I have came across a weird experience in C programming. Consider this code:</p>&#xA;&#xA;<pre><code>int main(){&#xA; int array1[6] = {0, 1, 2, 3, 4, 5};&#xA; int array2[6] = {6, 7, 8, 9, 10, 11};&#xA;&#xA; printf("%d\n", array1[-1]);&#x...
habedi/stack-exchange-dataset
10,848
Can a Turing Machine decide if an NFA accepts a string of prime length?
<p>I want to know if the following problem is decidable:</p>&#xA;&#xA;<p>Instance: An NFA A with n states</p>&#xA;&#xA;<p>Question: Does there exist some prime number p such that A accepts some string of length p.</p>&#xA;&#xA;<p>My belief is that this problem is undecidable, but I can't prove it. The decider can easil...
computability finite automata
1
Can a Turing Machine decide if an NFA accepts a string of prime length? -- (computability finite automata) <p>I want to know if the following problem is decidable:</p>&#xA;&#xA;<p>Instance: An NFA A with n states</p>&#xA;&#xA;<p>Question: Does there exist some prime number p such that A accepts some string of length p....
habedi/stack-exchange-dataset
10,857
Does $c^*(b \cup (ac)^*)^*$ define all strings over $\{a,b,c\}$ that don't contain the substring $bc$
<p>I'm reading my textbook and it claims that the regular expression $c^*(b \cup (ac)^*)^*$ defines the language $L$ over $\{a,b,c\}$ which consists of <strong>all</strong> strings that do not contain the substring $bc$. </p>&#xA;&#xA;<p>However, I'm failing to see how that language would contain strings such as $bbbaa...
formal languages regular languages regular expressions
1
Does $c^*(b \cup (ac)^*)^*$ define all strings over $\{a,b,c\}$ that don't contain the substring $bc$ -- (formal languages regular languages regular expressions) <p>I'm reading my textbook and it claims that the regular expression $c^*(b \cup (ac)^*)^*$ defines the language $L$ over $\{a,b,c\}$ which consists of <stron...
habedi/stack-exchange-dataset
10,862
Shannon Entropy to Min-Entropy
<p>In many papers I've read that it is well known that the Shannon entropy of a random variable can be converted to min-entropy (up to small statistical distance) by taking independent copies of the variable.&#xA;Can anyone explain to me what exactly this means?</p>&#xA;
terminology probability theory entropy
1
Shannon Entropy to Min-Entropy -- (terminology probability theory entropy) <p>In many papers I've read that it is well known that the Shannon entropy of a random variable can be converted to min-entropy (up to small statistical distance) by taking independent copies of the variable.&#xA;Can anyone explain to me what ex...
habedi/stack-exchange-dataset
10,869
Job scheduling with a bottleneck problem
<p>Given $n$ jobs $J_1,J_2,...,J_n$, each job requires $T_i &gt; 0, T_i \in N$ time to complete.</p>&#xA;&#xA;<p>Each job must be pre-processed and post-processed by a single machine M that can handle only <em>1 job at a time</em> and both phases require 1 unit of time. After being pre-processed, job $J_i$ is sent to a...
complexity theory reference request scheduling
1
Job scheduling with a bottleneck problem -- (complexity theory reference request scheduling) <p>Given $n$ jobs $J_1,J_2,...,J_n$, each job requires $T_i &gt; 0, T_i \in N$ time to complete.</p>&#xA;&#xA;<p>Each job must be pre-processed and post-processed by a single machine M that can handle only <em>1 job at a time</...
habedi/stack-exchange-dataset
10,873
Pumping lemma for CFG doubt
<p>I was looking at the pumping lemma for CFG. I came across the first problem $a^nb^nc^n$ and understood the answer. Then I thought of the problem $a^nb^n$. I know that this is context free and thought of applying it. I came across a weired situation. Someone please tell me where I went wrong. </p>&#xA;&#xA;<p>So our ...
context free automata pumping lemma
1
Pumping lemma for CFG doubt -- (context free automata pumping lemma) <p>I was looking at the pumping lemma for CFG. I came across the first problem $a^nb^nc^n$ and understood the answer. Then I thought of the problem $a^nb^n$. I know that this is context free and thought of applying it. I came across a weired situation...
habedi/stack-exchange-dataset
10,879
Can a Turing Machine decide if a regular expression matches all strings of exactly some length $l \geq 1$?
<p>Earlier I asked the question: <a href="https://cs.stackexchange.com/questions/10848/can-a-turing-machine-decide-if-an-nfa-accepts-a-string-of-prime-length">Can a Turing Machine decide if an NFA accepts a string of prime length?</a>. The answer introduced me to Parikh's theorem, which I've been reading about. The con...
computability finite automata regular expressions
1
Can a Turing Machine decide if a regular expression matches all strings of exactly some length $l \geq 1$? -- (computability finite automata regular expressions) <p>Earlier I asked the question: <a href="https://cs.stackexchange.com/questions/10848/can-a-turing-machine-decide-if-an-nfa-accepts-a-string-of-prime-length"...
habedi/stack-exchange-dataset
10,886
The complexity class FP
<p>I have a hard time understanding the following lines from our lecture notes:</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>$f \in \text{FP}$ iff there is a transducer T that computes $f$ and there exists a polynomial $p$ such that $TIME(T(x)) \leq p(|x|).$</p>&#xA;&#xA;<p>Note: If $f \in \text{FP},$ then $|f(x)| \leq p(|x|)$ holds ...
complexity theory
1
The complexity class FP -- (complexity theory) <p>I have a hard time understanding the following lines from our lecture notes:</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>$f \in \text{FP}$ iff there is a transducer T that computes $f$ and there exists a polynomial $p$ such that $TIME(T(x)) \leq p(|x|).$</p>&#xA;&#xA;<p>Note: If $f \...
habedi/stack-exchange-dataset
10,890
Lower bound for sorting n arrays of size k each
<p>Given $n$ arrays of size $k$ each, we want to show that at least $\Omega(nk \log k)$ comparisons are needed to sort all arrays (indepentent of each other). </p>&#xA;&#xA;<p>My proof is a simple modification of the decision tree argument used to obtain the lower bound for comparison-based sorting of one array. More s...
algorithms sorting arrays lower bounds check my proof
1
Lower bound for sorting n arrays of size k each -- (algorithms sorting arrays lower bounds check my proof) <p>Given $n$ arrays of size $k$ each, we want to show that at least $\Omega(nk \log k)$ comparisons are needed to sort all arrays (indepentent of each other). </p>&#xA;&#xA;<p>My proof is a simple modification of ...
habedi/stack-exchange-dataset
10,891
Existence of bipartite perfect matching
<p>Let $B = G(L, R, E)$ be a bipartite graph. I want to find out whether this graph has a perfect matching. One way to test whether this graph has a perfect matching is Hall's Marriage Theorem, but it is inefficient (i.e $|\mathcal P(L)| = 2^{|L|}$ tests -- not polynomial). I can always find out whether a perfect match...
graphs bipartite matching
1
Existence of bipartite perfect matching -- (graphs bipartite matching) <p>Let $B = G(L, R, E)$ be a bipartite graph. I want to find out whether this graph has a perfect matching. One way to test whether this graph has a perfect matching is Hall's Marriage Theorem, but it is inefficient (i.e $|\mathcal P(L)| = 2^{|L|}$ ...
habedi/stack-exchange-dataset
10,892
Can a two-stack PDA accept language $a^nb^mc^nd^m$ which is not context-free?
<p>Can a two-stack PDA accept language $L=\{a^nb^mc^nd^m \mid n \geq m\}$, which has no context-free grammar?</p>&#xA;&#xA;<p>I don't believe this has a context-free grammar, but please correct me if I'm wrong.</p>&#xA;
formal languages automata machine models
1
Can a two-stack PDA accept language $a^nb^mc^nd^m$ which is not context-free? -- (formal languages automata machine models) <p>Can a two-stack PDA accept language $L=\{a^nb^mc^nd^m \mid n \geq m\}$, which has no context-free grammar?</p>&#xA;&#xA;<p>I don't believe this has a context-free grammar, but please correct me...
habedi/stack-exchange-dataset
10,896
How DMA improves I/O operation efficiency?
<p>I am reading Computer Architecture &amp; Organization by William Stallings to understand I/O operations. Stallings pretty well explains why Programmed I/O (CPU keeps checking the I/O module register status) &amp; Interrupt I/O (CPU still has to over look data transfer between I/O module &amp; memory) are not efficie...
computer architecture memory hardware memory access
1
How DMA improves I/O operation efficiency? -- (computer architecture memory hardware memory access) <p>I am reading Computer Architecture &amp; Organization by William Stallings to understand I/O operations. Stallings pretty well explains why Programmed I/O (CPU keeps checking the I/O module register status) &amp; Inte...
habedi/stack-exchange-dataset
10,899
How to enumerate combinations in parallel
<p>I have $n\times k$ matrix with $k&lt;n$ and I would like to find all its $n\choose k$ submatrices which are $k\times k$ matrices that are the concatenations of all possible $k$ rows. Actually I tried to do it with Matlab but it takes too long time specially when $n&gt;20$ and I couldn't find a way how to generate in...
algorithms combinatorics parallel computing matrices
1
How to enumerate combinations in parallel -- (algorithms combinatorics parallel computing matrices) <p>I have $n\times k$ matrix with $k&lt;n$ and I would like to find all its $n\choose k$ submatrices which are $k\times k$ matrices that are the concatenations of all possible $k$ rows. Actually I tried to do it with Mat...
habedi/stack-exchange-dataset
10,906
Can you complete a basis in polynomial time?
<p>Here is the problem: we are given vectors $v_1, \ldots, v_k$ lying in $\mathbb{R}^n$ which are orthogonal. We assume that the entries of $v_i$ are rational, with numerator and denominator taking $K$ bits to describe. We would like to find vectors $v_{k+1}, \ldots, v_n$ such that $v_1, \ldots, v_n$ is an orthogonal b...
algorithms linear algebra
1
Can you complete a basis in polynomial time? -- (algorithms linear algebra) <p>Here is the problem: we are given vectors $v_1, \ldots, v_k$ lying in $\mathbb{R}^n$ which are orthogonal. We assume that the entries of $v_i$ are rational, with numerator and denominator taking $K$ bits to describe. We would like to find ve...
habedi/stack-exchange-dataset
10,916
Recognizing loops in computation on LBA
<p>In the case of LBAs (Linear Bounded Automaton), in writing a decider for the language</p>&#xA;&#xA;<p>$\qquad A = \{ \langle M,w\rangle \mid M\ \mathrm{LBA}, w \in \mathcal{L}(M) \}$</p>&#xA;&#xA;<p>we reject the input after a specific number (number of possible different configurations) of computation steps.&#xA;We...
linear bounded automata
1
Recognizing loops in computation on LBA -- (linear bounded automata) <p>In the case of LBAs (Linear Bounded Automaton), in writing a decider for the language</p>&#xA;&#xA;<p>$\qquad A = \{ \langle M,w\rangle \mid M\ \mathrm{LBA}, w \in \mathcal{L}(M) \}$</p>&#xA;&#xA;<p>we reject the input after a specific number (numb...
habedi/stack-exchange-dataset
10,932
Understanding DPLL algorithm
<p>I'm trying to understand <a href="http://en.wikipedia.org/wiki/DPLL_algorithm" rel="noreferrer">DPLL algorithm</a> for solving SAT problem. And here it is:</p>&#xA;&#xA;<pre><code>Algorithm DPLL&#xA; Input: A set of clauses Φ.&#xA; Output: A Truth Value.&#xA;function DPLL(Φ)&#xA; if Φ is a consistent set of lite...
algorithms logic satisfiability sat solvers
1
Understanding DPLL algorithm -- (algorithms logic satisfiability sat solvers) <p>I'm trying to understand <a href="http://en.wikipedia.org/wiki/DPLL_algorithm" rel="noreferrer">DPLL algorithm</a> for solving SAT problem. And here it is:</p>&#xA;&#xA;<pre><code>Algorithm DPLL&#xA; Input: A set of clauses Φ.&#xA; Outpu...
habedi/stack-exchange-dataset
10,934
Proving undecidability of the language composed of LBAs where their language is empty
<p>As it is explained in Sipser's book, the following language is undecidable and he proves this using the computation history method.</p>&#xA;&#xA;<p>$\qquad E = \{\langle M \rangle \mid M\ \mathrm{LBA}, L(M)=\emptyset\}$</p>&#xA;&#xA;<p>I wanted to see if we could use the same method used for proving undecidability o...
turing machines undecidability
1
Proving undecidability of the language composed of LBAs where their language is empty -- (turing machines undecidability) <p>As it is explained in Sipser's book, the following language is undecidable and he proves this using the computation history method.</p>&#xA;&#xA;<p>$\qquad E = \{\langle M \rangle \mid M\ \mathrm...
habedi/stack-exchange-dataset
10,937
Adapting neural network
<p>I have on a few occasions trained neural networks (back propagation networks) with some rather complicated data sets (backgammon positions and OCR). When doing this, it seems that a lot of the work involves trying out different configurations of the networks, in order to find the optimal configuration for learning. ...
machine learning neural networks learning theory
1
Adapting neural network -- (machine learning neural networks learning theory) <p>I have on a few occasions trained neural networks (back propagation networks) with some rather complicated data sets (backgammon positions and OCR). When doing this, it seems that a lot of the work involves trying out different configurati...
habedi/stack-exchange-dataset