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
74,742
Relation between type-checking decidability, typability decidability and strong normalization
<p>Yo! This is probably a stupid question, however I've never seen it written down explicitly if, for instance, decidability of type-checking is equivalent to the strong normalization property. Therefore I'm asking this question to clarify all possible relations between type-checking, typability and strong normalizatio...
type theory type checking type inference
1
Relation between type-checking decidability, typability decidability and strong normalization -- (type theory type checking type inference) <p>Yo! This is probably a stupid question, however I've never seen it written down explicitly if, for instance, decidability of type-checking is equivalent to the strong normalizat...
habedi/stack-exchange-dataset
74,749
Finding the bandwidth of a band matrix
<p>I am designing an algorithm that solves a linear system using the QR factorization, and the matrices I am dealing with are sparse and very large ($6000 \times 6000$). In order to improve the efficiency of the algorithm, I am trying to exploit the sparsity of the matrix by finding its bandwidth, but I have to run thr...
algorithms linear algebra matrices sparse matrices
1
Finding the bandwidth of a band matrix -- (algorithms linear algebra matrices sparse matrices) <p>I am designing an algorithm that solves a linear system using the QR factorization, and the matrices I am dealing with are sparse and very large ($6000 \times 6000$). In order to improve the efficiency of the algorithm, I ...
habedi/stack-exchange-dataset
74,756
How do you compute the time complexity of distributed algorithms?
<p>How to compute the run-time of distributed algorithms in message passing systems? I was reading across and found it very weird that any computation done in each node is considered to take $\mathcal{O}(1)$ time due to the unreliability in the time it takes to pass messages. Since this approach is not practical at all...
algorithm analysis runtime analysis distributed systems
1
How do you compute the time complexity of distributed algorithms? -- (algorithm analysis runtime analysis distributed systems) <p>How to compute the run-time of distributed algorithms in message passing systems? I was reading across and found it very weird that any computation done in each node is considered to take $\...
habedi/stack-exchange-dataset
74,763
Does there exist an equivalent arithmetic circuit for each computable function?
<blockquote>&#xA; <p>Does there exist an equivalent arithmetic circuit for each computable function? </p>&#xA;</blockquote>&#xA;&#xA;<p>I've been trying to wrap my head around the statement above, but haven't found a counter example although I believe the statement to be false.</p>&#xA;&#xA;<p>What has made me curious...
computability computation models cryptography circuits simulation
1
Does there exist an equivalent arithmetic circuit for each computable function? -- (computability computation models cryptography circuits simulation) <blockquote>&#xA; <p>Does there exist an equivalent arithmetic circuit for each computable function? </p>&#xA;</blockquote>&#xA;&#xA;<p>I've been trying to wrap my head...
habedi/stack-exchange-dataset
74,764
ignoring overflow in two's complement addition of numbers with different signs[specific case]
<p>I understand the rule says that overflow cannot happen for two's complement addition of numbers with different signs, but do not understand why this specific case does not cause overflow:</p>&#xA;&#xA;<pre><code> 1001010&#xA;+0010101&#xA;--------&#xA; 1011111&#xA;</code></pre>&#xA;&#xA;<p>Am I simply misunderstandin...
discrete mathematics arithmetic
1
ignoring overflow in two's complement addition of numbers with different signs[specific case] -- (discrete mathematics arithmetic) <p>I understand the rule says that overflow cannot happen for two's complement addition of numbers with different signs, but do not understand why this specific case does not cause overflow...
habedi/stack-exchange-dataset
74,775
Grammar generating odd number of 1s
<p>I have the language $L = \{w ∈ \{0, 1, 2\}^∗ \mid \text{the number of 1s in $w$ is odd}\}$.</p>&#xA;&#xA;<p>I am stuck halfway through this process.</p>&#xA;&#xA;<p>I have </p>&#xA;&#xA;<p>$$&#xA;\begin{align*}&#xA; &amp;A \to 0A \mid \epsilon \\&#xA; &amp;B \to 2B \mid \epsilon \\&#xA; &amp;C \to AB \mid B...
formal grammars
1
Grammar generating odd number of 1s -- (formal grammars) <p>I have the language $L = \{w ∈ \{0, 1, 2\}^∗ \mid \text{the number of 1s in $w$ is odd}\}$.</p>&#xA;&#xA;<p>I am stuck halfway through this process.</p>&#xA;&#xA;<p>I have </p>&#xA;&#xA;<p>$$&#xA;\begin{align*}&#xA; &amp;A \to 0A \mid \epsilon \\&#xA; &a...
habedi/stack-exchange-dataset
74,781
Encode an ascii string in base 15
<p>How can I encode an ascii string in base 15?</p>&#xA;&#xA;<p>In other words, I have the following characters available:</p>&#xA;&#xA;<pre><code>0123456789abcde&#xA;</code></pre>&#xA;&#xA;<p>I have <em>no idea</em> how to do this. What do you suggest I do?</p>&#xA;&#xA;<p>(If this is not on-topic, please migrate.)</p...
strings encoding scheme
1
Encode an ascii string in base 15 -- (strings encoding scheme) <p>How can I encode an ascii string in base 15?</p>&#xA;&#xA;<p>In other words, I have the following characters available:</p>&#xA;&#xA;<pre><code>0123456789abcde&#xA;</code></pre>&#xA;&#xA;<p>I have <em>no idea</em> how to do this. What do you suggest I do...
habedi/stack-exchange-dataset
74,783
Does there always exist a reduction between two NP-hard problems?
<p>Let $A$ and $B$ be NP-hard problems. For all tuples $(A, B)$ does there exist a polynomial time reduction from $A$ to $B$ and from $B$ to $A$?</p>&#xA;&#xA;<p>Context: I want to prove some problem is NP-hard. Can I pick any problem in NP-hard to reduce from?</p>&#xA;
reductions np hard
1
Does there always exist a reduction between two NP-hard problems? -- (reductions np hard) <p>Let $A$ and $B$ be NP-hard problems. For all tuples $(A, B)$ does there exist a polynomial time reduction from $A$ to $B$ and from $B$ to $A$?</p>&#xA;&#xA;<p>Context: I want to prove some problem is NP-hard. Can I pick any pro...
habedi/stack-exchange-dataset
74,786
O(n) Palindromic Substring: Why is O(n^2) needed here?
<p>I have been doing dynamic programming problems, and I came across a palindromic substring question. I answered it quickly, and found an $O(n)$ dynamic programming solution, but when I check the actual solution, I find that I should be getting an $O(n^2)$ result. </p>&#xA;&#xA;<p>Can someone explain where I am goin...
dynamic programming substrings
1
O(n) Palindromic Substring: Why is O(n^2) needed here? -- (dynamic programming substrings) <p>I have been doing dynamic programming problems, and I came across a palindromic substring question. I answered it quickly, and found an $O(n)$ dynamic programming solution, but when I check the actual solution, I find that I ...
habedi/stack-exchange-dataset
74,787
Calculating fractions of accesses from various levels of memory? (L2 - Main)
<p>I'm currently studying computer architectures module, and during the workshop I came a across a series of questions that I struggled to being to answer.</p>&#xA;&#xA;<p>The question goes;</p>&#xA;&#xA;<pre><code>*You have an L1 data cache, L2 cache, and main memory. The hit rates and hit times for&#xA;each are:&#xA;...
cpu cache memory access
1
Calculating fractions of accesses from various levels of memory? (L2 - Main) -- (cpu cache memory access) <p>I'm currently studying computer architectures module, and during the workshop I came a across a series of questions that I struggled to being to answer.</p>&#xA;&#xA;<p>The question goes;</p>&#xA;&#xA;<pre><code...
habedi/stack-exchange-dataset
74,789
Center of a Cycle and Complete graph
<p>The center of a graph is the set of vertices with minimum eccentricity, so a $C_n$ have the minimum eccentricity equals to $n$ and a $K_n$ have the minimum eccentricity equals to $1$? Is valid that a center of a graph be the graph itself?</p>&#xA;
graphs
1
Center of a Cycle and Complete graph -- (graphs) <p>The center of a graph is the set of vertices with minimum eccentricity, so a $C_n$ have the minimum eccentricity equals to $n$ and a $K_n$ have the minimum eccentricity equals to $1$? Is valid that a center of a graph be the graph itself?</p>&#xA;
habedi/stack-exchange-dataset
74,794
Why is static-single assignment preferred over continuation passing style in many industry-used compilers?
<p>According to the <a href="https://en.wikipedia.org/wiki/Static_single_assignment_form" rel="noreferrer">Wikipedia page on static-single assignment (SSA)</a>, SSA is used by large and well-known projects such as LLVM, GCC, MSVC, Mono, Dalvik, SpiderMonkey, and V8 while the page on <a href="https://en.wikipedia.org/wi...
compilers program optimization continuations
1
Why is static-single assignment preferred over continuation passing style in many industry-used compilers? -- (compilers program optimization continuations) <p>According to the <a href="https://en.wikipedia.org/wiki/Static_single_assignment_form" rel="noreferrer">Wikipedia page on static-single assignment (SSA)</a>, SS...
habedi/stack-exchange-dataset
74,797
Counting islands in Boolean matrices
<p>Given an $n \times m$ Boolean matrix $\mathrm X$, let $0$ entries represent the sea and $1$ entries represent land. Define an island as vertically or horizontally (but not diagonally) adjacent $1$ entries. </p>&#xA;&#xA;<p><a href="https://codereview.stackexchange.com/questions/162100/counting-islands-in-matrix-of-b...
algorithms matrices counting streaming algorithm
1
Counting islands in Boolean matrices -- (algorithms matrices counting streaming algorithm) <p>Given an $n \times m$ Boolean matrix $\mathrm X$, let $0$ entries represent the sea and $1$ entries represent land. Define an island as vertically or horizontally (but not diagonally) adjacent $1$ entries. </p>&#xA;&#xA;<p><a ...
habedi/stack-exchange-dataset
74,799
Can a regular expression based "grammatic" be programatically minimized?
<p>I have a list of pairs like (regex, substitute) that take quite long to apply to some input text so I was thinking about optimizing them a bit.</p>&#xA;&#xA;<p>From my knowledge for each regular expression there is a deterministic finite automaton that accepts the same language, and as its possible to merge DFAs mer...
regular expressions
1
Can a regular expression based "grammatic" be programatically minimized? -- (regular expressions) <p>I have a list of pairs like (regex, substitute) that take quite long to apply to some input text so I was thinking about optimizing them a bit.</p>&#xA;&#xA;<p>From my knowledge for each regular expression there is a de...
habedi/stack-exchange-dataset
74,800
Decision problems whose verifier is NP
<p>We define $\mathbf P$ as the set of problems solvable in polynomial time. We define $\mathbf{NP}$ as the set of problems with a verifier $ \in \mathbf P$.</p>&#xA;&#xA;<p>Is there a name for problems whose verifiers are $\in \mathbf {NP}$ (e.g., $\mathbf{N(NP)}$)? I can't see this being a very <em>useful</em> comple...
complexity theory np decision problem complexity classes
1
Decision problems whose verifier is NP -- (complexity theory np decision problem complexity classes) <p>We define $\mathbf P$ as the set of problems solvable in polynomial time. We define $\mathbf{NP}$ as the set of problems with a verifier $ \in \mathbf P$.</p>&#xA;&#xA;<p>Is there a name for problems whose verifiers ...
habedi/stack-exchange-dataset
74,812
Data structure for A*'s "open" set
<p>I'm looking at <a href="https://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode" rel="nofollow noreferrer">Wikipedia's pseudocode implementation of A*</a> and found myself wondering about what they call <code>openSet</code>. That is, the neighbours we've seen, but not yet analyzed.</p>&#xA;&#xA;<p>The first par...
algorithms graphs shortest path efficiency
1
Data structure for A*'s "open" set -- (algorithms graphs shortest path efficiency) <p>I'm looking at <a href="https://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode" rel="nofollow noreferrer">Wikipedia's pseudocode implementation of A*</a> and found myself wondering about what they call <code>openSet</code>. That...
habedi/stack-exchange-dataset
74,817
Display Counting Algorithm
<p>I am writing some firmware for a display that will take measurements and present them in real time on an LCD screen. I would like for the measurements to display as <em>smoothly</em> as possible... What I mean is that I am looking for a smooth animation sequence on the display, such that values don't jump from say 1...
algorithms counting
1
Display Counting Algorithm -- (algorithms counting) <p>I am writing some firmware for a display that will take measurements and present them in real time on an LCD screen. I would like for the measurements to display as <em>smoothly</em> as possible... What I mean is that I am looking for a smooth animation sequence on...
habedi/stack-exchange-dataset
74,818
How many permutations for generating a specific binary search tree?
<p>The keys 2, 4, 6, 7, and 8 have been inserted, one by one, in some unknown order, into an initially empty BST. The result is this BST:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/0zU6a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0zU6a.png" alt="enter image description here"></a></p>&#x...
binary search trees
1
How many permutations for generating a specific binary search tree? -- (binary search trees) <p>The keys 2, 4, 6, 7, and 8 have been inserted, one by one, in some unknown order, into an initially empty BST. The result is this BST:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/0zU6a.png" rel="nofollow noreferrer">...
habedi/stack-exchange-dataset
74,833
Data structure for testing all subsets of a query for membership
<p>Is there a data structure that efficiently supports the following operations?</p>&#xA;&#xA;<ol>&#xA;<li>Add set</li>&#xA;<li>Query whether any subset of a set has been added.</li>&#xA;</ol>&#xA;&#xA;<p>This could be implemented with linear overhead by testing every added set during every query. Can it be implemented...
data structures
1
Data structure for testing all subsets of a query for membership -- (data structures) <p>Is there a data structure that efficiently supports the following operations?</p>&#xA;&#xA;<ol>&#xA;<li>Add set</li>&#xA;<li>Query whether any subset of a set has been added.</li>&#xA;</ol>&#xA;&#xA;<p>This could be implemented wit...
habedi/stack-exchange-dataset
74,834
Optimizing for maximum intervals given a distance bound
<p>Given an interval set $X = \{(s_1, e_1), \dotsc, (s_N, e_N)\}$ ordered such that $s_i \leq s_j$ and $e_i \leq e_j$ for all $i &lt; j$ and an integer $b$, I would like to find a maximum sized subset $X' \subseteq X$ such that $\text{end}(X') - \text{start}(X') \leq b$. Here the $\text{start}, \text{end}$ functions ar...
optimization
1
Optimizing for maximum intervals given a distance bound -- (optimization) <p>Given an interval set $X = \{(s_1, e_1), \dotsc, (s_N, e_N)\}$ ordered such that $s_i \leq s_j$ and $e_i \leq e_j$ for all $i &lt; j$ and an integer $b$, I would like to find a maximum sized subset $X' \subseteq X$ such that $\text{end}(X') - ...
habedi/stack-exchange-dataset
74,839
What was the major breakthrough between Hoare-Floyd logic and Scott–Strachey semantics?
<p>I'm reading through a commentary on Milner's "The use of machines to assist in rigorous proof" by Mike Gordon. In this paper, he explains how LCF was born from the ideas of denotational semantics by Dana Scott and Strachey. </p>&#xA;&#xA;<p>It seems to me that Floyd-Hoare logic wasn't enough for developing LCF, but ...
hoare logic automated theorem proving denotational semantics
1
What was the major breakthrough between Hoare-Floyd logic and Scott–Strachey semantics? -- (hoare logic automated theorem proving denotational semantics) <p>I'm reading through a commentary on Milner's "The use of machines to assist in rigorous proof" by Mike Gordon. In this paper, he explains how LCF was born from the...
habedi/stack-exchange-dataset
74,841
Select largest subset, subject to a separate weighting constraint
<p>Given an unsorted set of tuples $(c, w)$ and a threshold value $W$, I want to select $k$ tuples such that:&#xA;$$&#xA;maximize\sum_{i=1}^k c_i \\&#xA;\sum_{i=1}^k w_i \ge W&#xA;$$&#xA;It seems pretty simple at first. Without the weighting constraint, you can use any selection algorithm to select the $k$ elements wit...
optimization selection problem
1
Select largest subset, subject to a separate weighting constraint -- (optimization selection problem) <p>Given an unsorted set of tuples $(c, w)$ and a threshold value $W$, I want to select $k$ tuples such that:&#xA;$$&#xA;maximize\sum_{i=1}^k c_i \\&#xA;\sum_{i=1}^k w_i \ge W&#xA;$$&#xA;It seems pretty simple at first...
habedi/stack-exchange-dataset
74,844
The longest path in a tree
<p>Help me demonstrate this or there is a counterexample?</p>&#xA;&#xA;<p>Let $T(V,E)$ be a tree with $|T| \geq 2$ and a path $P{(u_0,u_1,u_2,...,u_n)}$. The longest path in a tree has $d(u_0) = d(u_n) = 1$.</p>&#xA;
graphs trees
1
The longest path in a tree -- (graphs trees) <p>Help me demonstrate this or there is a counterexample?</p>&#xA;&#xA;<p>Let $T(V,E)$ be a tree with $|T| \geq 2$ and a path $P{(u_0,u_1,u_2,...,u_n)}$. The longest path in a tree has $d(u_0) = d(u_n) = 1$.</p>&#xA;
habedi/stack-exchange-dataset
74,857
Reduction from $L$ to $L_{TM}$
<blockquote>&#xA; <p>Let $L$ be the language of all the words with the shape $&lt;M_1,M_2,w&gt;$ such that $M_1,M_2$ are turing machines that accepts $w$, show that $L$ isn't decidable. </p>&#xA;</blockquote>&#xA;&#xA;<p>I thought to use reduction from $L_{TM}=\{&lt;M,w&gt;\mid M \text{ accepts } w\}$</p>&#xA;&#xA;<p>...
turing machines reductions
1
Reduction from $L$ to $L_{TM}$ -- (turing machines reductions) <blockquote>&#xA; <p>Let $L$ be the language of all the words with the shape $&lt;M_1,M_2,w&gt;$ such that $M_1,M_2$ are turing machines that accepts $w$, show that $L$ isn't decidable. </p>&#xA;</blockquote>&#xA;&#xA;<p>I thought to use reduction from $L_...
habedi/stack-exchange-dataset
74,868
Data structures for annotations in large-scale text editor
<p>I need to create a specialized text editor capable of handling text up to billions of characters long, with no line breaks.</p>&#xA;&#xA;<p>I've read of multiple data structures to manage the text itself, including ropes, zippers, piece tables, gap buffers, and more.</p>&#xA;&#xA;<p>However, I also need to support <...
data structures
1
Data structures for annotations in large-scale text editor -- (data structures) <p>I need to create a specialized text editor capable of handling text up to billions of characters long, with no line breaks.</p>&#xA;&#xA;<p>I've read of multiple data structures to manage the text itself, including ropes, zippers, piece ...
habedi/stack-exchange-dataset
74,870
Why can we drop the superscripts in the Floyd Warshall algorithm?
<p>In the lecture notes, our professor mentioned that we can take down the space taken by the FW algorithm from $O(n^3)$ to $O(n^2)$ by dropping all the superscripts in the matrices (i.e. use one $n\times n$ array $D$).</p>&#xA;&#xA;<p>I just want to check my understanding, is it because by default $D^k=D^{k-1}$ except...
dynamic programming shortest path
1
Why can we drop the superscripts in the Floyd Warshall algorithm? -- (dynamic programming shortest path) <p>In the lecture notes, our professor mentioned that we can take down the space taken by the FW algorithm from $O(n^3)$ to $O(n^2)$ by dropping all the superscripts in the matrices (i.e. use one $n\times n$ array $...
habedi/stack-exchange-dataset
74,872
Optimal strategy for an abstract game
<p>I've been given the following problem in an interview (that I've already failed to solve, not trying to cheat my way past): The game starts with a positive integer number $A_0$. (E.g. $A_0 = 1234$.) This number is converted to binary representation, and $N$ is the number of bits set to $1$. (E.g. $A_0 = b100\ 1101\ ...
algorithms optimization
1
Optimal strategy for an abstract game -- (algorithms optimization) <p>I've been given the following problem in an interview (that I've already failed to solve, not trying to cheat my way past): The game starts with a positive integer number $A_0$. (E.g. $A_0 = 1234$.) This number is converted to binary representation, ...
habedi/stack-exchange-dataset
74,874
Prove a language $A_{PTM}$ is not BPP-Complete
<p>I am trying to prove that there are a language is not BPP-Complete. There are a couple of examples online, but they are not the best examples and are a bit complicated. I spoke with one of my computer science professors about the problem and he proposed the following proof sketch:</p>&#xA;&#xA;<p><em>Proof (sketch):...
turing machines proof techniques probability theory
1
Prove a language $A_{PTM}$ is not BPP-Complete -- (turing machines proof techniques probability theory) <p>I am trying to prove that there are a language is not BPP-Complete. There are a couple of examples online, but they are not the best examples and are a bit complicated. I spoke with one of my computer science prof...
habedi/stack-exchange-dataset
74,880
Is $A_{PTM}$ a BPP-complete language?
<p>The language $A_{PTM}$ is defined as the acceptance problem on a Probabilistic Turing machine. </p>&#xA;&#xA;<p>$A_{PTM}=$ { $&lt;M, x&gt; | M$ on input $x$ accepts with an error probability less than or equal to 1/3}</p>&#xA;&#xA;<p>Basically, given a probabilistic Turing machine $P$ and string $x$, a decider $D$ s...
proof techniques probabilistic algorithms
1
Is $A_{PTM}$ a BPP-complete language? -- (proof techniques probabilistic algorithms) <p>The language $A_{PTM}$ is defined as the acceptance problem on a Probabilistic Turing machine. </p>&#xA;&#xA;<p>$A_{PTM}=$ { $&lt;M, x&gt; | M$ on input $x$ accepts with an error probability less than or equal to 1/3}</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
74,886
Proof Check: The class L is closed under concatenation
<p>I want to prove that the class of all Turing machines that use a logarithmic amount of space is closed under concatenation. The basic idea of my proof is this: given a word, to check if it's in $L_1L_2$, simply look at all possible $n+1$ ways to slice the word into 2 parts and check if the first part belongs to $L_1...
complexity theory formal languages turing machines closure properties
1
Proof Check: The class L is closed under concatenation -- (complexity theory formal languages turing machines closure properties) <p>I want to prove that the class of all Turing machines that use a logarithmic amount of space is closed under concatenation. The basic idea of my proof is this: given a word, to check if i...
habedi/stack-exchange-dataset
74,898
Are most metaheuristic algorithms different metaphors for the same method?
<p>Most times I encounter this random metaphors for metaheuristic optimization they seem like a modified genetic algorithm to me. What do you think? Is there a way to remove the analogies/metaphors to better compare algorithms?</p>&#xA;
optimization heuristics genetic algorithms
1
Are most metaheuristic algorithms different metaphors for the same method? -- (optimization heuristics genetic algorithms) <p>Most times I encounter this random metaphors for metaheuristic optimization they seem like a modified genetic algorithm to me. What do you think? Is there a way to remove the analogies/metaphors...
habedi/stack-exchange-dataset
74,903
Finding a loop invariant
<p>the following pseudo code returns the nth Fibonacci number:</p>&#xA;&#xA;<pre><code> if n = 0 then&#xA; return 0&#xA; a ← 1&#xA; b ← 1&#xA; for i = 1 to n − 1 do&#xA; c ← b − i&#xA; b ← c + a&#xA; a ← c + 2*i + 1&#xA; return b&#xA;</code></pre>&#xA;&#xA;<p>I am trying to find any loop invariant for th...
loop invariants
1
Finding a loop invariant -- (loop invariants) <p>the following pseudo code returns the nth Fibonacci number:</p>&#xA;&#xA;<pre><code> if n = 0 then&#xA; return 0&#xA; a ← 1&#xA; b ← 1&#xA; for i = 1 to n − 1 do&#xA; c ← b − i&#xA; b ← c + a&#xA; a ← c + 2*i + 1&#xA; return b&#xA;</code></pre>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
74,904
Is a matching $M$ maximum iff the graph doesn't have an augmenting path wrt $M$?
<blockquote>&#xA; <p>Berge's theorem: a matching $M$ is maximum if and only if the graph doesn't have an augmenting path with respect to $M$.</p>&#xA;</blockquote>&#xA;&#xA;<p>I don't understand this theorem. For instance the following matching is maximum but has an augmenting path, doesn't it?</p>&#xA;&#xA;<p><a href...
matching
1
Is a matching $M$ maximum iff the graph doesn't have an augmenting path wrt $M$? -- (matching) <blockquote>&#xA; <p>Berge's theorem: a matching $M$ is maximum if and only if the graph doesn't have an augmenting path with respect to $M$.</p>&#xA;</blockquote>&#xA;&#xA;<p>I don't understand this theorem. For instance th...
habedi/stack-exchange-dataset
74,918
What is total work of managing the dynamic array and why is it the same as for fixed array - O(n)
<p>I'm reading the chapter on dynamic arrays in The <a href="http://rads.stackoverflow.com/amzn/click/1848000693" rel="nofollow noreferrer">Algorithm Design Manual</a> book. Here is the excerpt from the book:</p>&#xA;&#xA;<blockquote>&#xA; <p>Actually, we can efficiently enlarge arrays as we need them, through&#xA; t...
data structures arrays
1
What is total work of managing the dynamic array and why is it the same as for fixed array - O(n) -- (data structures arrays) <p>I'm reading the chapter on dynamic arrays in The <a href="http://rads.stackoverflow.com/amzn/click/1848000693" rel="nofollow noreferrer">Algorithm Design Manual</a> book. Here is the excerpt ...
habedi/stack-exchange-dataset
74,922
Neither Left nor Rightmost Derivations
<p>Consider a simple grammar and its derivations. The derivations could be done in leftmost or rightmost patterns and can also be done in no particular order as the derivation order has no effect on the language generated by a grammar.</p>&#xA;&#xA;<p>Apart from practical considerations, such as implementation difficu...
formal grammars parsers syntax trees
1
Neither Left nor Rightmost Derivations -- (formal grammars parsers syntax trees) <p>Consider a simple grammar and its derivations. The derivations could be done in leftmost or rightmost patterns and can also be done in no particular order as the derivation order has no effect on the language generated by a grammar.</p>...
habedi/stack-exchange-dataset
74,933
2-SAT Problem with additional constraints on variable?
<p>Given a 2-SAT problem that is satisfiable. The solution to the problem can be found in polynomial time.</p>&#xA;&#xA;<p>Adding an additional constraint:</p>&#xA;&#xA;<ol>&#xA;<li>The maximum number of positive literals that can have the boolean Value 1 is N. (i.e. a=positive literal, ~a=negative literal)</li>&#xA;</...
complexity theory
1
2-SAT Problem with additional constraints on variable? -- (complexity theory) <p>Given a 2-SAT problem that is satisfiable. The solution to the problem can be found in polynomial time.</p>&#xA;&#xA;<p>Adding an additional constraint:</p>&#xA;&#xA;<ol>&#xA;<li>The maximum number of positive literals that can have the bo...
habedi/stack-exchange-dataset
74,955
How can union-find algorithm be used with "real" data
<p>In the beginning of the Princeton algorithms course the Dynamic connectivity problem is presented (quick-find, quick-union). Here is how it's described:</p>&#xA;&#xA;<blockquote>&#xA; <p>The input is a sequence of pairs of integers, where each integer&#xA; represents an object of some type and we are to interpret ...
data structures modelling union find
1
How can union-find algorithm be used with "real" data -- (data structures modelling union find) <p>In the beginning of the Princeton algorithms course the Dynamic connectivity problem is presented (quick-find, quick-union). Here is how it's described:</p>&#xA;&#xA;<blockquote>&#xA; <p>The input is a sequence of pairs ...
habedi/stack-exchange-dataset
74,956
how os can calculate cpu cache size?
<p>There's an interview question.</p>&#xA;&#xA;<p>In my opinion, os can calculate cache hit rate and miss rate(with the total running time of process and the number of transfer of block of memory to cache).&#xA;But how can know the size of cache? Is it possible to calculate with os's certain information? (such as size ...
operating systems cpu cache
1
how os can calculate cpu cache size? -- (operating systems cpu cache) <p>There's an interview question.</p>&#xA;&#xA;<p>In my opinion, os can calculate cache hit rate and miss rate(with the total running time of process and the number of transfer of block of memory to cache).&#xA;But how can know the size of cache? Is ...
habedi/stack-exchange-dataset
74,958
Why 0-BPP equals P
<p>Sorry if it is an obvious question, since all my searches lead to "clearly 0-BPP=P" (like Papadimitriou text book or <a href="https://complexityzoo.uwaterloo.ca/Complexity_Zoo:D#deltabpp" rel="nofollow noreferrer" title="Complexity Zoo">Complexity Zoo</a>). I understand that any P machine can be seen as a 0-BPP mach...
complexity classes randomized algorithms
1
Why 0-BPP equals P -- (complexity classes randomized algorithms) <p>Sorry if it is an obvious question, since all my searches lead to "clearly 0-BPP=P" (like Papadimitriou text book or <a href="https://complexityzoo.uwaterloo.ca/Complexity_Zoo:D#deltabpp" rel="nofollow noreferrer" title="Complexity Zoo">Complexity Zoo<...
habedi/stack-exchange-dataset
74,962
create a ANN with more than one neuron output
<p>I start to learn artificial neural network and all introduction that I have found on internet present architecture with a number of input variable, so the input layer has the same number of "neurons" as number of variable. Then a number of neurons in hidden layers and only one output neurons. </p>&#xA;&#xA;<p>Does i...
machine learning neural networks
1
create a ANN with more than one neuron output -- (machine learning neural networks) <p>I start to learn artificial neural network and all introduction that I have found on internet present architecture with a number of input variable, so the input layer has the same number of "neurons" as number of variable. Then a num...
habedi/stack-exchange-dataset
74,964
Prove a network is a feedforward network if and only if the numbering of its cells satisfy these conditions
<p>Undergraduate math student here attempting to understand neural networks. Picked up a text on sale, "Neural Network Learning and Expert Systems" (Gallant), and I'm just starting on the exercises for chapter 1. </p>&#xA;&#xA;<p>The full question is:</p>&#xA;&#xA;<p>Prove that a network is a feedforward network if and...
graphs machine learning neural networks
1
Prove a network is a feedforward network if and only if the numbering of its cells satisfy these conditions -- (graphs machine learning neural networks) <p>Undergraduate math student here attempting to understand neural networks. Picked up a text on sale, "Neural Network Learning and Expert Systems" (Gallant), and I'm ...
habedi/stack-exchange-dataset
74,970
Difference between the Cartesian product in set theory and in relational algebra
<p>What's the difference between the Cartesian product in set theory and in relational algebra?</p>&#xA;&#xA;<p>The Cartesian product in set theory is defined as:</p>&#xA;&#xA;<p>$$A \times B = \{(a, b) \mid (a \in A) \land (b \in B)\}$$</p>&#xA;&#xA;<p>I think this is exactly how it works in relational databases, but ...
database theory relational algebra
1
Difference between the Cartesian product in set theory and in relational algebra -- (database theory relational algebra) <p>What's the difference between the Cartesian product in set theory and in relational algebra?</p>&#xA;&#xA;<p>The Cartesian product in set theory is defined as:</p>&#xA;&#xA;<p>$$A \times B = \{(a,...
habedi/stack-exchange-dataset
74,985
Cut costly functions in inter-procedural abstract interpretation
<p>I am performing some inter-procedural abstract interpretation to capture certain program properties. Following the standard way, what I am doing is to maintain a work list of to-be-analyzed functions, and pick one from the work list to perform intra-procedural analysis until the work list is empty.</p>&#xA;&#xA;<p>C...
programming languages formal methods data flow analysis static analysis
1
Cut costly functions in inter-procedural abstract interpretation -- (programming languages formal methods data flow analysis static analysis) <p>I am performing some inter-procedural abstract interpretation to capture certain program properties. Following the standard way, what I am doing is to maintain a work list of ...
habedi/stack-exchange-dataset
74,986
Finding short readable representation of words
<p>I am looking for Input/Literature on</p>&#xA;&#xA;<ol>&#xA;<li>a readable way to represent words (which are accepted by automata)</li>&#xA;<li>an Algorithm, that constructs the Representation</li>&#xA;</ol>&#xA;&#xA;<p>For example, a word $w$ might contain a subsequence $v$ which is repeated $m$ times, i.e. $w= u \,...
formal languages automata data compression
1
Finding short readable representation of words -- (formal languages automata data compression) <p>I am looking for Input/Literature on</p>&#xA;&#xA;<ol>&#xA;<li>a readable way to represent words (which are accepted by automata)</li>&#xA;<li>an Algorithm, that constructs the Representation</li>&#xA;</ol>&#xA;&#xA;<p>For...
habedi/stack-exchange-dataset
74,987
I built a mechanical computer powered by marbles. What are its theoretical limitations?
<p>Over the last couple years, I built a <a href="https://www.kickstarter.com/projects/871405126/1160007775?token=1f87b430" rel="nofollow noreferrer">mechanical computer powered by marbles</a> and made a game out of it. It's similar to the old Digi-Comp II, except for two key differences:</p>&#xA;&#xA;<ol>&#xA;<li>Part...
complexity theory turing machines computer architecture computation models
1
I built a mechanical computer powered by marbles. What are its theoretical limitations? -- (complexity theory turing machines computer architecture computation models) <p>Over the last couple years, I built a <a href="https://www.kickstarter.com/projects/871405126/1160007775?token=1f87b430" rel="nofollow noreferrer">me...
habedi/stack-exchange-dataset
74,988
prove CLIQUE is NP
<p>I am reading a proof on CLIQUE is NP-Complete. The first step is of course to show that CLIQUE is NP.</p>&#xA;<blockquote>&#xA;<p>c is the clique certificate</p>&#xA;<p>V = “On input <span class="math-container">$\langle\langle G, k\rangle, c\rangle$</span>:</p>&#xA;<ol>&#xA;<li>Test whether c is a set of k differen...
complexity theory algorithm analysis runtime analysis np
1
prove CLIQUE is NP -- (complexity theory algorithm analysis runtime analysis np) <p>I am reading a proof on CLIQUE is NP-Complete. The first step is of course to show that CLIQUE is NP.</p>&#xA;<blockquote>&#xA;<p>c is the clique certificate</p>&#xA;<p>V = “On input <span class="math-container">$\langle\langle G, k\ran...
habedi/stack-exchange-dataset
74,995
Finding the perimeter of a simplex
<p>I hope this question is close enough to CS to be posted here. I need to write a method that will compute the perimeter of a simplex&#xA;<a href="https://en.wikipedia.org/wiki/Simplex" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Simplex</a> in any dimension given only the coordinates of its vertices. Is s...
computational geometry
1
Finding the perimeter of a simplex -- (computational geometry) <p>I hope this question is close enough to CS to be posted here. I need to write a method that will compute the perimeter of a simplex&#xA;<a href="https://en.wikipedia.org/wiki/Simplex" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Simplex</a> in...
habedi/stack-exchange-dataset
75,002
What information needs to be saved in a Lamport clock system to deduce message causality?
<p>By using Lamport timestamps, we can determine the causality of messages. It is however unclear to me how one would deduce this simply from the lamport timestamp of the message.</p>&#xA;&#xA;<p>Take the following model situation: there is a casuality break when it comes to process 2:</p>&#xA;&#xA;<p><a href="https://...
parallel computing clocks
1
What information needs to be saved in a Lamport clock system to deduce message causality? -- (parallel computing clocks) <p>By using Lamport timestamps, we can determine the causality of messages. It is however unclear to me how one would deduce this simply from the lamport timestamp of the message.</p>&#xA;&#xA;<p>Tak...
habedi/stack-exchange-dataset
75,008
Asymptotics of a recurrence defined with two variables
<p>What is the asymptotic behaviour, in Θ notation, of the smallest function that for any $n_1$ and $n_2$ satisfies the following:</p>&#xA;&#xA;<p>$$t(n_1+n_2)≥t(n_1)+t(n_2)+c·\log_2(1+n_2)$$&#xA;where $n_1≥n_2≥1$ and $t(1)=1$</p>&#xA;&#xA;<p>I tried to see what happens if $n_1 = n_2$:</p>&#xA;&#xA;<p>$$t(2n)≥t(n)+t(n)...
asymptotics
1
Asymptotics of a recurrence defined with two variables -- (asymptotics) <p>What is the asymptotic behaviour, in Θ notation, of the smallest function that for any $n_1$ and $n_2$ satisfies the following:</p>&#xA;&#xA;<p>$$t(n_1+n_2)≥t(n_1)+t(n_2)+c·\log_2(1+n_2)$$&#xA;where $n_1≥n_2≥1$ and $t(1)=1$</p>&#xA;&#xA;<p>I tri...
habedi/stack-exchange-dataset
75,014
Prove that a model of infinite tapes is stronger then turing machine model
<p>I want to prove that if we have a model, $A$, with unbound number of tapes, then&#xA;$A$ is stronger then Turing Machine model. Can you help me with example of such a language that $M$ will fail but $A$ will give an output? thanks.</p>&#xA;
turing machines
1
Prove that a model of infinite tapes is stronger then turing machine model -- (turing machines) <p>I want to prove that if we have a model, $A$, with unbound number of tapes, then&#xA;$A$ is stronger then Turing Machine model. Can you help me with example of such a language that $M$ will fail but $A$ will give an outpu...
habedi/stack-exchange-dataset
75,021
Satisfiability of at least k linear equations over Z2 is NP-hard
<p>Given a system of $m$ equations in $n$ boolean variables:</p>&#xA;&#xA;<p>$$\begin{align}&#xA;a_{11}x_1 + a_{12}x_2 + \dots +a_{1n}x_n &amp;= b_1\pmod2\\&#xA;a_{21}x_1 + a_{22}x_2 + \dots +a_{2n}x_n &amp;= b_2\pmod2\\&#xA;&amp;\;\vdots\\&#xA;a_{m1}{x_1} + a_{m2}x_2 + \dots +a_{mn}x_n &amp;= b_m\pmod2&#xA;\end{align}...
np complete reductions satisfiability
1
Satisfiability of at least k linear equations over Z2 is NP-hard -- (np complete reductions satisfiability) <p>Given a system of $m$ equations in $n$ boolean variables:</p>&#xA;&#xA;<p>$$\begin{align}&#xA;a_{11}x_1 + a_{12}x_2 + \dots +a_{1n}x_n &amp;= b_1\pmod2\\&#xA;a_{21}x_1 + a_{22}x_2 + \dots +a_{2n}x_n &amp;= b_2...
habedi/stack-exchange-dataset
75,027
CPU Scheduling - Round Robin order on ready queue
<p>I am attempting the question below:</p>&#xA;&#xA;<blockquote>&#xA; <p>Assume a set of processes $P_1, P_2, P_3$ and $P_4$ arrive at different times in the ready queue. The table below shows the burst time, the priority (smallest priority number implies highest priority) and arrival time for each of the processes.&#...
scheduling
1
CPU Scheduling - Round Robin order on ready queue -- (scheduling) <p>I am attempting the question below:</p>&#xA;&#xA;<blockquote>&#xA; <p>Assume a set of processes $P_1, P_2, P_3$ and $P_4$ arrive at different times in the ready queue. The table below shows the burst time, the priority (smallest priority number impli...
habedi/stack-exchange-dataset
75,046
Efficient compression of simple binary data
<p>I have a file containing ordered binary numbers from $0$ to $2^n - 1$:</p>&#xA;&#xA;<pre><code>0000000000&#xA;0000000001&#xA;0000000010&#xA;0000000011&#xA;0000000100&#xA;...&#xA;1111111111&#xA;</code></pre>&#xA;&#xA;<p><a href="https://en.wikipedia.org/wiki/7z" rel="noreferrer">7z</a> did not compress this file very...
information theory data compression
1
Efficient compression of simple binary data -- (information theory data compression) <p>I have a file containing ordered binary numbers from $0$ to $2^n - 1$:</p>&#xA;&#xA;<pre><code>0000000000&#xA;0000000001&#xA;0000000010&#xA;0000000011&#xA;0000000100&#xA;...&#xA;1111111111&#xA;</code></pre>&#xA;&#xA;<p><a href="http...
habedi/stack-exchange-dataset
75,048
Upper bound for the time complexity of a TM in P on input x?
<p>I am trying to show that the following problem is P-complete with respect to LOGSPACE reductions: given a Turing machine $M^*$, an input $x$ for that machine, and a number $t$ in unary, does $M^*$ accept $x$ in $t$ steps?</p>&#xA;&#xA;<p>To do that I want to compute an upper bound on the time complexity of some TM $...
complexity theory time complexity
1
Upper bound for the time complexity of a TM in P on input x? -- (complexity theory time complexity) <p>I am trying to show that the following problem is P-complete with respect to LOGSPACE reductions: given a Turing machine $M^*$, an input $x$ for that machine, and a number $t$ in unary, does $M^*$ accept $x$ in $t$ st...
habedi/stack-exchange-dataset
75,049
Boolean expression to logic gates
<p>Hello I need help with xy xor z, do I do the logic AND first or the XOR, no parenthesis. Thank You</p>&#xA;
boolean algebra
1
Boolean expression to logic gates -- (boolean algebra) <p>Hello I need help with xy xor z, do I do the logic AND first or the XOR, no parenthesis. Thank You</p>&#xA;
habedi/stack-exchange-dataset
75,057
Calculate Miss rate of L2 cache given global and L1 miss rates
<p>If I have a Global miss rate of all caches of a total of <strong>5.41%</strong> and the miss rate of a single level cache of <strong>9.13%</strong>, how can I effectively calculate how much the second level cache miss rate need to be?</p>&#xA;&#xA;<p>I found <a href="https://people.cs.vt.edu/~cameron/cs4504/lecture8...
computer architecture cpu cache cpu
1
Calculate Miss rate of L2 cache given global and L1 miss rates -- (computer architecture cpu cache cpu) <p>If I have a Global miss rate of all caches of a total of <strong>5.41%</strong> and the miss rate of a single level cache of <strong>9.13%</strong>, how can I effectively calculate how much the second level cache ...
habedi/stack-exchange-dataset
75,063
ZigZag sequence without dynamic programming
<p>I just came across the <a href="http://www.geeksforgeeks.org/longest-zig-zag-subsequence/" rel="nofollow noreferrer">maximum zigzag sequence problem</a>, defined as follows:</p>&#xA;&#xA;<blockquote>&#xA; <p>A zigzag sequence is defined as a sequence of numbers such that the difference between two consecutive numbe...
time complexity dynamic programming subsequences
1
ZigZag sequence without dynamic programming -- (time complexity dynamic programming subsequences) <p>I just came across the <a href="http://www.geeksforgeeks.org/longest-zig-zag-subsequence/" rel="nofollow noreferrer">maximum zigzag sequence problem</a>, defined as follows:</p>&#xA;&#xA;<blockquote>&#xA; <p>A zigzag s...
habedi/stack-exchange-dataset
75,079
Construct a TM for checking if a set of parentheses are well formed
<p>This was a solved example given in my textbook. When I tried to solve this, I got a different TM that was given as the solution. I tried running a sample string through my TM, and somehow got the correct answer. &#xA;Still the answers dont match. Please let me know if there isvsomething I've missed. &#xA;This may s...
turing machines
1
Construct a TM for checking if a set of parentheses are well formed -- (turing machines) <p>This was a solved example given in my textbook. When I tried to solve this, I got a different TM that was given as the solution. I tried running a sample string through my TM, and somehow got the correct answer. &#xA;Still the ...
habedi/stack-exchange-dataset
75,087
Using random projections for locally sensitive hashing
<p>I recently came to see that this library sparselsh uses random projection to perform locally sensitive hashing of documents. </p>&#xA;&#xA;<p>The proof is such that based on cosine similarity to the vector. In other words if the dot product of a random projection vector and a feature vector > 0, it would mean that t...
hash linear algebra hashing
1
Using random projections for locally sensitive hashing -- (hash linear algebra hashing) <p>I recently came to see that this library sparselsh uses random projection to perform locally sensitive hashing of documents. </p>&#xA;&#xA;<p>The proof is such that based on cosine similarity to the vector. In other words if the ...
habedi/stack-exchange-dataset
75,102
ANN with communication between nodes of same layer
<p>I starting to learn about artificial neural network. </p>&#xA;&#xA;<p>I already did some simple things for classification, with different hidden layer. </p>&#xA;&#xA;<p>I would like to know :</p>&#xA;&#xA;<p>Is there a way to create "communication" (synapse) between neurons of the same layer ?&#xA;If yes how will wo...
neural networks
1
ANN with communication between nodes of same layer -- (neural networks) <p>I starting to learn about artificial neural network. </p>&#xA;&#xA;<p>I already did some simple things for classification, with different hidden layer. </p>&#xA;&#xA;<p>I would like to know :</p>&#xA;&#xA;<p>Is there a way to create "communicati...
habedi/stack-exchange-dataset
75,106
Does array always have a wasted space of O(n)?
<p><a href="https://cs.stackexchange.com/q/74434/70982">In this question</a> it's stated that dynamic array wasted space is O(n). <a href="https://cs.stackexchange.com/questions/74434/what-is-wasted-space-parameter-and-why-is-it-on-for-a-linked-list/74435?noredirect=1#comment159509_74435">Here is</a> the explanation wh...
algorithm analysis data structures arrays space analysis
1
Does array always have a wasted space of O(n)? -- (algorithm analysis data structures arrays space analysis) <p><a href="https://cs.stackexchange.com/q/74434/70982">In this question</a> it's stated that dynamic array wasted space is O(n). <a href="https://cs.stackexchange.com/questions/74434/what-is-wasted-space-parame...
habedi/stack-exchange-dataset
75,107
How is Grover's Algorithm useful?
<p>I am at a loss when it comes to understanding how Grover's Algorithm gives any useful information. Suppose we have a 4-qubit states (|0⟩ to |15⟩), and we are searching for the state |3⟩. The oracle would thus be &#xA;O=I−2|3⟩⟨3|</p>&#xA;&#xA;<p>And then, at the end, after all the amplitude amplification steps, we wo...
quantum computing
1
How is Grover's Algorithm useful? -- (quantum computing) <p>I am at a loss when it comes to understanding how Grover's Algorithm gives any useful information. Suppose we have a 4-qubit states (|0⟩ to |15⟩), and we are searching for the state |3⟩. The oracle would thus be &#xA;O=I−2|3⟩⟨3|</p>&#xA;&#xA;<p>And then, at th...
habedi/stack-exchange-dataset
75,111
How to find a good saw function for PRNG?
<p>As part of an assignment I have to write a PRNG using a sin (or any other trigonometric function) and a saw function which I'm struggling a bit with. So how would you find a good saw function with about equal distribution?</p>&#xA;&#xA;<p>This is what it is supposed to look like:&#xA;<a href="https://i.stack.imgur.c...
randomness statistics numerical algorithms random number generator
1
How to find a good saw function for PRNG? -- (randomness statistics numerical algorithms random number generator) <p>As part of an assignment I have to write a PRNG using a sin (or any other trigonometric function) and a saw function which I'm struggling a bit with. So how would you find a good saw function with about ...
habedi/stack-exchange-dataset
75,131
Why can we not find the generally superior machine learning algorithm in practice?
<p>TL;DR Our mind is a superior meta-machine learning algorithm, it can figure out tradeoffs in a much more general case than any machine learning algorithm we have. Furthermore, its Kolmogorov complexity is 4MB or less, and thus should be fairly easy to discover. However, despite our best efforts, no algorithm we've d...
machine learning
1
Why can we not find the generally superior machine learning algorithm in practice? -- (machine learning) <p>TL;DR Our mind is a superior meta-machine learning algorithm, it can figure out tradeoffs in a much more general case than any machine learning algorithm we have. Furthermore, its Kolmogorov complexity is 4MB or ...
habedi/stack-exchange-dataset
75,134
The number of nodes in a binary tree
<p>If a binary tree is both a max-heap and an AVL tree, what is its largest possible number of nodes, assuming all keys are different?</p>&#xA;
binary trees heaps
1
The number of nodes in a binary tree -- (binary trees heaps) <p>If a binary tree is both a max-heap and an AVL tree, what is its largest possible number of nodes, assuming all keys are different?</p>&#xA;
habedi/stack-exchange-dataset
75,138
$L\in NC^1$ iff there exists a sequence of poly sized formulas that decides $L$
<p><strong>Prove</strong> that $L\in NC^1$ iff there exists a sequence of poly sized formulas that decides $L$.</p>&#xA;&#xA;<p>I managed to prove the $(\impliedby)$ and I want to prove $(\implies)$. </p>&#xA;&#xA;<p>I feel that we need to take the boolean circuit and duplicate the sub-circuits of $fan-out\gt 1$ into e...
complexity theory circuits
1
$L\in NC^1$ iff there exists a sequence of poly sized formulas that decides $L$ -- (complexity theory circuits) <p><strong>Prove</strong> that $L\in NC^1$ iff there exists a sequence of poly sized formulas that decides $L$.</p>&#xA;&#xA;<p>I managed to prove the $(\impliedby)$ and I want to prove $(\implies)$. </p>&#xA...
habedi/stack-exchange-dataset
75,142
Loop invariant for a division algorithm
<p>I'm having problems trying to understand the concept of loop invariants.</p>&#xA;&#xA;<p>I have the following code, where M and N are predefined constants.</p>&#xA;&#xA;<pre><code>a = 0&#xA;b = M&#xA;c = 1&#xA;while M - c * N &gt;= 0:&#xA; a = c&#xA; c = c + 1&#xA; b = M - a * N&#xA;print(a, b)&#xA;</code></pre>&...
algorithms loop invariants
1
Loop invariant for a division algorithm -- (algorithms loop invariants) <p>I'm having problems trying to understand the concept of loop invariants.</p>&#xA;&#xA;<p>I have the following code, where M and N are predefined constants.</p>&#xA;&#xA;<pre><code>a = 0&#xA;b = M&#xA;c = 1&#xA;while M - c * N &gt;= 0:&#xA; a = ...
habedi/stack-exchange-dataset
75,144
Algorithm to generate integer sets fulfills restrictions
<p>I'm trying to solve the following problem.</p>&#xA;&#xA;<p><strong>Input</strong></p>&#xA;&#xA;<ul>&#xA;<li>positive integers $v$, $b$ and&nbsp;$\ell$. ($\ell\leq v\leq b\ell$.)</li>&#xA;</ul>&#xA;&#xA;<p><strong>Output</strong></p>&#xA;&#xA;<p>A list $S_1, \dots, S_k$ of all possible integer multisets (a generaliza...
combinatorics permutations
1
Algorithm to generate integer sets fulfills restrictions -- (combinatorics permutations) <p>I'm trying to solve the following problem.</p>&#xA;&#xA;<p><strong>Input</strong></p>&#xA;&#xA;<ul>&#xA;<li>positive integers $v$, $b$ and&nbsp;$\ell$. ($\ell\leq v\leq b\ell$.)</li>&#xA;</ul>&#xA;&#xA;<p><strong>Output</strong>...
habedi/stack-exchange-dataset
75,145
Definition of the inverse of the Ackermann function
<p>I am somewhat puzzled by the definition of the inverse of the Ackermann function: The normal Ackermann function $A$ can be used to define a function from $\mathbb{N} \to \mathbb{N}$ via $A(n, n)$. The inverse of this function, denoted by $\alpha$, is known as the <em>inverse Ackermann function</em>.</p>&#xA;&#xA;<p>...
complexity theory
1
Definition of the inverse of the Ackermann function -- (complexity theory) <p>I am somewhat puzzled by the definition of the inverse of the Ackermann function: The normal Ackermann function $A$ can be used to define a function from $\mathbb{N} \to \mathbb{N}$ via $A(n, n)$. The inverse of this function, denoted by $\al...
habedi/stack-exchange-dataset
75,160
Higher order empirical entropy is not the entropy of the empirical distribution?
<p>Basically, the problem is that I always thought that the (unnormalized) $k$th order empirical entropy $n\cdot H_k(x)$ (see "Backround" at the end of this post for more information) for a given string $x$ of length $n$ equals the entropy of the empirical distribution on the set of all words of length $n$ (the conditi...
probability theory information theory entropy
1
Higher order empirical entropy is not the entropy of the empirical distribution? -- (probability theory information theory entropy) <p>Basically, the problem is that I always thought that the (unnormalized) $k$th order empirical entropy $n\cdot H_k(x)$ (see "Backround" at the end of this post for more information) for ...
habedi/stack-exchange-dataset
75,161
Does every turing machine have an equivalent, single-state, n-tape turing machine?
<p>Is it the case that every problem computable by a Turing Machine can also be represented by some kind of equivalent n-tape Turing Machine which one has <em>only one state?</em> (We can assume that the accept and reject states are implicit here. If that bothers you, you may think about this as a question about 3-sta...
turing machines computation models simulation
1
Does every turing machine have an equivalent, single-state, n-tape turing machine? -- (turing machines computation models simulation) <p>Is it the case that every problem computable by a Turing Machine can also be represented by some kind of equivalent n-tape Turing Machine which one has <em>only one state?</em> (We c...
habedi/stack-exchange-dataset
75,162
What does $L$-uniformity mean?
<p>I've understood that $L$-uniformity means that there's a TM that can output the description of $C_n$ in $O(\log n)$ <strong>space</strong>. Now, that seems odd to me since the description itself (as far as I understand) must be a $O(n)$. I'd be glad for clarification.</p>&#xA;&#xA;<p>Also, in that context: What does...
complexity theory complexity classes space complexity
1
What does $L$-uniformity mean? -- (complexity theory complexity classes space complexity) <p>I've understood that $L$-uniformity means that there's a TM that can output the description of $C_n$ in $O(\log n)$ <strong>space</strong>. Now, that seems odd to me since the description itself (as far as I understand) must be...
habedi/stack-exchange-dataset
75,167
Using finite state machines for lexical analysis
<p>I'm a high school student and I'm passionate about everything language related - lexers, parsers, compilers, interpreters and so on. Some time ago I've written a calculator in Python (now willing to use a better language), which uses the Shunting yard algorithm and my own lexer.</p>&#xA;<p>So I want to start learnin...
regular languages
1
Using finite state machines for lexical analysis -- (regular languages) <p>I'm a high school student and I'm passionate about everything language related - lexers, parsers, compilers, interpreters and so on. Some time ago I've written a calculator in Python (now willing to use a better language), which uses the Shuntin...
habedi/stack-exchange-dataset
75,174
Recurrence Solution
<p>What's the (asymptotic) solution of the recurrence $T(n,m,k,t)\leq T(n^\frac 1 m, 1, km, kt) + \Theta(n)$?</p>&#xA;&#xA;<p>I know how to solve univariate recurrences, but this recurrence is much more difficult, so I am stuck here. </p>&#xA;&#xA;<p><strong>Edit:</strong><br>&#xA;The solution of this inequality should...
recurrence relation
1
Recurrence Solution -- (recurrence relation) <p>What's the (asymptotic) solution of the recurrence $T(n,m,k,t)\leq T(n^\frac 1 m, 1, km, kt) + \Theta(n)$?</p>&#xA;&#xA;<p>I know how to solve univariate recurrences, but this recurrence is much more difficult, so I am stuck here. </p>&#xA;&#xA;<p><strong>Edit:</strong><b...
habedi/stack-exchange-dataset
75,175
Divide N sticks among M boys as homogeneously as possible (ignoring order)
<p>There are <span class="math-container">$N$</span> sticks. <span class="math-container">$N$</span> is an integer greater than zero. I want to divide it among <span class="math-container">$M$</span> boys. <span class="math-container">$M$</span> is also a positive integer. Partitioning <span class="math-container">$N$<...
algorithms optimization integer partitions
1
Divide N sticks among M boys as homogeneously as possible (ignoring order) -- (algorithms optimization integer partitions) <p>There are <span class="math-container">$N$</span> sticks. <span class="math-container">$N$</span> is an integer greater than zero. I want to divide it among <span class="math-container">$M$</spa...
habedi/stack-exchange-dataset
75,193
boolean circuit to decide if there's a path of at most $k$ edges from $u$ to $v$ in graph $G$
<blockquote>&#xA; <p>Let an undirected graph and $k\in\mathbb{N}$. Prove that there's a circuit of depth $2$, size of $n^{O(k)}$ and <strong>unlimited fan-in</strong>, which gets $\langle G,v,u\rangle$ as an input and checks if there's a path from $u$ to $v$ of at most $k$ edges.</p>&#xA;</blockquote>&#xA;&#xA;<p>So I...
algorithms complexity theory circuits
1
boolean circuit to decide if there's a path of at most $k$ edges from $u$ to $v$ in graph $G$ -- (algorithms complexity theory circuits) <blockquote>&#xA; <p>Let an undirected graph and $k\in\mathbb{N}$. Prove that there's a circuit of depth $2$, size of $n^{O(k)}$ and <strong>unlimited fan-in</strong>, which gets $\l...
habedi/stack-exchange-dataset
75,199
Given two $a^n b^n$-style languages, how do I find out if their intersection is regular?
<p>I have two languages as below.</p>&#xA;&#xA;<p>$$L_1=\{a^ncb^n\}\cup\{a^mdb^{2m}\}$$&#xA;$$L_2=\{a^{2n}cb^{2m+1}\}\cup\{a^{2m+1}db^{2n}\}$$</p>&#xA;&#xA;<p>Now, I wonder what is $L_1\cap L_2$. Is it a regular language? Is it context-free?</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>To solve the problem, I feel like I need to solv...
formal languages regular languages context free
1
Given two $a^n b^n$-style languages, how do I find out if their intersection is regular? -- (formal languages regular languages context free) <p>I have two languages as below.</p>&#xA;&#xA;<p>$$L_1=\{a^ncb^n\}\cup\{a^mdb^{2m}\}$$&#xA;$$L_2=\{a^{2n}cb^{2m+1}\}\cup\{a^{2m+1}db^{2n}\}$$</p>&#xA;&#xA;<p>Now, I wonder what ...
habedi/stack-exchange-dataset
75,209
does every graph have a complete, preferred, stable and grounded extension?
<p>I was looking at graph extensions in argumentation theory and was wondering, which of those extensions does every graph have? and which of those only some graphs have? and is there a proof for each?</p>&#xA;&#xA;<p>thanks</p>&#xA;
graphs artificial intelligence
1
does every graph have a complete, preferred, stable and grounded extension? -- (graphs artificial intelligence) <p>I was looking at graph extensions in argumentation theory and was wondering, which of those extensions does every graph have? and which of those only some graphs have? and is there a proof for each?</p>&#x...
habedi/stack-exchange-dataset
75,215
Testing if a given DAG is a lattice
<p>I am given a directed acyclic graph (DAG) with a unique source and sink. Is there an efficient way to test whether the <a href="https://en.wikipedia.org/wiki/Partially_ordered_set" rel="noreferrer">partial order</a> represented by this graph is a <a href="https://en.wikipedia.org/wiki/Lattice_(order)" rel="noreferre...
graphs lattices order theory
1
Testing if a given DAG is a lattice -- (graphs lattices order theory) <p>I am given a directed acyclic graph (DAG) with a unique source and sink. Is there an efficient way to test whether the <a href="https://en.wikipedia.org/wiki/Partially_ordered_set" rel="noreferrer">partial order</a> represented by this graph is a ...
habedi/stack-exchange-dataset
75,229
Are poly-reductions to PSPACE problems for following problems are known?
<p>List of problems I'm interested in:</p>&#xA;&#xA;<ol>&#xA;<li><p>$\oplus$SAT</p></li>&#xA;<li><p>#SAT-decision</p></li>&#xA;<li><p>Permanent-decision (YES if permanent is greater than given number $k$)</p></li>&#xA;</ol>&#xA;&#xA;<p>I have discovered poly-reduction for MAJSAT (and MAJQBF). However, I don't know such...
algorithms complexity theory time complexity decision problem
1
Are poly-reductions to PSPACE problems for following problems are known? -- (algorithms complexity theory time complexity decision problem) <p>List of problems I'm interested in:</p>&#xA;&#xA;<ol>&#xA;<li><p>$\oplus$SAT</p></li>&#xA;<li><p>#SAT-decision</p></li>&#xA;<li><p>Permanent-decision (YES if permanent is greate...
habedi/stack-exchange-dataset
75,236
What is the type of linked list where order doesn't matter
<p>I'm reading the <a href="http://rads.stackoverflow.com/amzn/click/1848000693" rel="nofollow noreferrer">The Algorithm Design Manual</a> book on Data Structures and it says the following about linked listed implementation:</p>&#xA;&#xA;<blockquote>&#xA; <p>Insertion into a singly-linked list is a nice exercise in po...
data structures linked lists
1
What is the type of linked list where order doesn't matter -- (data structures linked lists) <p>I'm reading the <a href="http://rads.stackoverflow.com/amzn/click/1848000693" rel="nofollow noreferrer">The Algorithm Design Manual</a> book on Data Structures and it says the following about linked listed implementation:</p...
habedi/stack-exchange-dataset
75,242
Absorbing Markov Chains: An efficient algorithmic approach
<p>Following <a href="https://math.dartmouth.edu/archive/m20x06/public_html/Lecture14.pdf" rel="nofollow noreferrer">this procedure</a> I have successfully written a program to calculate the probability of ending in a given absorbing state given the initial state. The procedure is as follows:</p>&#xA;&#xA;<ol>&#xA;<li...
algorithms graphs linear algebra matrices markov chains
1
Absorbing Markov Chains: An efficient algorithmic approach -- (algorithms graphs linear algebra matrices markov chains) <p>Following <a href="https://math.dartmouth.edu/archive/m20x06/public_html/Lecture14.pdf" rel="nofollow noreferrer">this procedure</a> I have successfully written a program to calculate the probabili...
habedi/stack-exchange-dataset
75,243
Why is average waiting time is the same for FIFO and LIFO
<p>I'm reading the <a href="http://rads.stackoverflow.com/amzn/click/1848000693" rel="nofollow noreferrer">The Algorithm Design Manual</a> book on Data Structures and it says the following about FIFO and LIFO containers:</p>&#xA;&#xA;<blockquote>&#xA; <p>Support retrieval in first in, first out (FIFO) order. This is s...
data structures stacks queues
1
Why is average waiting time is the same for FIFO and LIFO -- (data structures stacks queues) <p>I'm reading the <a href="http://rads.stackoverflow.com/amzn/click/1848000693" rel="nofollow noreferrer">The Algorithm Design Manual</a> book on Data Structures and it says the following about FIFO and LIFO containers:</p>&#x...
habedi/stack-exchange-dataset
75,250
minimize sum of primes with a lower bound on product
<p>I can't quite figure out an algorithm for this:</p>&#xA;&#xA;<p>Given some integer n, what subset of the primes (so no repeats) would yield the lowest possible sum if their product is at least n?</p>&#xA;&#xA;<p>Example: 6 -> 2*3,</p>&#xA;&#xA;<p>2308 -> 2*3*5*7*11,</p>&#xA;&#xA;<p>14 -> 3*5</p>&#xA;&#xA;<p>Does any...
algorithms discrete mathematics knapsack problems primes
1
minimize sum of primes with a lower bound on product -- (algorithms discrete mathematics knapsack problems primes) <p>I can't quite figure out an algorithm for this:</p>&#xA;&#xA;<p>Given some integer n, what subset of the primes (so no repeats) would yield the lowest possible sum if their product is at least n?</p>&#x...
habedi/stack-exchange-dataset
75,254
λ -calculus : What is the most efficient in memory representation of functions?
<p>I would like to compare performance of function encoded (Church's / Scott's) vs classically encoded (assembler / C) data structures.</p>&#xA;&#xA;<p>But before I do that I need to know how efficient is / can be function representation in memory. The function can be of course partially applied (aka closure).</p>&#xA;...
lambda calculus functional programming
1
λ -calculus : What is the most efficient in memory representation of functions? -- (lambda calculus functional programming) <p>I would like to compare performance of function encoded (Church's / Scott's) vs classically encoded (assembler / C) data structures.</p>&#xA;&#xA;<p>But before I do that I need to know how effi...
habedi/stack-exchange-dataset
75,264
When does the product automaton of two NFAs A and B not decide L(A) U L(B)?
<p>We are given the following task:</p>&#xA;<blockquote>&#xA;<p>Let <span class="math-container">$\mathcal{A} = {}(Q_A,\Sigma, \delta_A, s_A, F_A)$</span> and <span class="math-container">$\mathcal{B} = {}(Q_B,\Sigma, \delta_B, s_B, F_B)$</span> be two NFAs and let their product automaton be defined as:</p>&#xA;<p><spa...
regular languages automata finite automata
1
When does the product automaton of two NFAs A and B not decide L(A) U L(B)? -- (regular languages automata finite automata) <p>We are given the following task:</p>&#xA;<blockquote>&#xA;<p>Let <span class="math-container">$\mathcal{A} = {}(Q_A,\Sigma, \delta_A, s_A, F_A)$</span> and <span class="math-container">$\mathca...
habedi/stack-exchange-dataset
75,266
Generating grammar for the given language
<p>Can someone please give a couple of examples of the language and construct a grammar for the language (given below), or at least show me how I can go about it?</p>&#xA;&#xA;<p>I am looking for a context-free grammar generating the language</p>&#xA;&#xA;<p>$$ L = \{ a^n b^m \mid n,m \geq 0 \text{ and } n \neq 2m \}. ...
context free formal grammars
1
Generating grammar for the given language -- (context free formal grammars) <p>Can someone please give a couple of examples of the language and construct a grammar for the language (given below), or at least show me how I can go about it?</p>&#xA;&#xA;<p>I am looking for a context-free grammar generating the language</...
habedi/stack-exchange-dataset
75,269
Turning generative recursion results (leaves of a tree) into connected components (where each neighbour differs by one element)
<p>I'm generating valid timetables for my uni with a simple generative recursion algorithm like this (disregarding handling of course-specific labs and tutorials)</p>&#xA;&#xA;<pre><code>def generate(current_timetable, unallocated_courses):&#xA; if conflicts(current_timetable):&#xA; return&#xA; if not unal...
algorithms graphs trees recursion
1
Turning generative recursion results (leaves of a tree) into connected components (where each neighbour differs by one element) -- (algorithms graphs trees recursion) <p>I'm generating valid timetables for my uni with a simple generative recursion algorithm like this (disregarding handling of course-specific labs and t...
habedi/stack-exchange-dataset
75,273
How to solve recurrence T(n) = 2T(n/2) + n/log(n) using substitution method
<p>The guess solution to the</p>&#xA;&#xA;<p>$$T(n) = 2T\left(\frac{n}{2}\right) + \frac{n}{\log n}$$</p>&#xA;&#xA;<p>is $\Theta(n \log{\log n})$. This is my solution:&#xA;$$&#xA;T(n) \leq 2c\left(\frac{n}{2}\right) \log{\log {\frac{n}{2}}} + \frac{n}{\log n} \\&#xA;\leq cn \log{\log {\frac{n}{2}}} + \frac{n}{\log n}\\...
recurrence relation
1
How to solve recurrence T(n) = 2T(n/2) + n/log(n) using substitution method -- (recurrence relation) <p>The guess solution to the</p>&#xA;&#xA;<p>$$T(n) = 2T\left(\frac{n}{2}\right) + \frac{n}{\log n}$$</p>&#xA;&#xA;<p>is $\Theta(n \log{\log n})$. This is my solution:&#xA;$$&#xA;T(n) \leq 2c\left(\frac{n}{2}\right) \lo...
habedi/stack-exchange-dataset
75,279
Why aren't computables used for numerical calculations?
<p>In programming languages like Haskell you can use lazy evaluation to delay calculations.</p>&#xA;&#xA;<p>Why isn't a similar approach being used for numerical methods (I understand that there would be memory implications).</p>&#xA;&#xA;<p>The approach would be that non-integer values would be stored as how they are ...
enumeration numerical algorithms
1
Why aren't computables used for numerical calculations? -- (enumeration numerical algorithms) <p>In programming languages like Haskell you can use lazy evaluation to delay calculations.</p>&#xA;&#xA;<p>Why isn't a similar approach being used for numerical methods (I understand that there would be memory implications).<...
habedi/stack-exchange-dataset
75,288
How to figure out if a language is recognizable by a finite state machine FSM
<p>I have a finite state machine FSM like below. </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/y2Jvc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y2Jvc.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>I want to know which of my languages are recognized by my FSM:</p>&#xA;&#xA;<p>...
formal languages automata finite automata
1
How to figure out if a language is recognizable by a finite state machine FSM -- (formal languages automata finite automata) <p>I have a finite state machine FSM like below. </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/y2Jvc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y2Jvc.png" alt="enter...
habedi/stack-exchange-dataset
75,290
Efficient algorithm for simple constraint satisfaction problem
<p>There are </p>&#xA;&#xA;<ul>&#xA;<li><p>$k$ <strong>Boolean</strong> variables $x_1, x_2, \dots, x_k$.</p></li>&#xA;<li><p>$m$ arbitrary subsets of these variables such that sum of each set equals to $1$ (i.e., only one variable is $1$, the others are $0$). E.g., one of $m$ constraints may be $x_1 + x_3 + x_5 + x_6 ...
algorithms data structures satisfiability integer programming constraint satisfaction
1
Efficient algorithm for simple constraint satisfaction problem -- (algorithms data structures satisfiability integer programming constraint satisfaction) <p>There are </p>&#xA;&#xA;<ul>&#xA;<li><p>$k$ <strong>Boolean</strong> variables $x_1, x_2, \dots, x_k$.</p></li>&#xA;<li><p>$m$ arbitrary subsets of these variables...
habedi/stack-exchange-dataset
75,296
Is there any K-means analog for regression, not culstering?
<p>Good day&#xA;Is there any regression Machine learning model, based on k-means? &#xA;Example (Zillow's Zestimate):&#xA;I have a lot of houses(with features like sq.feet and location) and prices. I want to estimate price for a new house by averaging k neighbors. </p>&#xA;
algorithms machine learning
1
Is there any K-means analog for regression, not culstering? -- (algorithms machine learning) <p>Good day&#xA;Is there any regression Machine learning model, based on k-means? &#xA;Example (Zillow's Zestimate):&#xA;I have a lot of houses(with features like sq.feet and location) and prices. I want to estimate price for a...
habedi/stack-exchange-dataset
75,310
Link-cut trees: using access() and link()
<p>I am having some trouble on understanding link-cut trees, so I need some help.</p>&#xA;<p>Suppose that we have nodes <span class="math-container">$A, B, C, D$</span> and we want to do the following operations:</p>&#xA;<blockquote>&#xA;<ol>&#xA;<li><p>Link(A,B)</p>&#xA;</li>&#xA;<li><p>Link(B,C)</p>&#xA;</li>&#xA;<li...
data structures trees binary trees search trees balanced search trees
1
Link-cut trees: using access() and link() -- (data structures trees binary trees search trees balanced search trees) <p>I am having some trouble on understanding link-cut trees, so I need some help.</p>&#xA;<p>Suppose that we have nodes <span class="math-container">$A, B, C, D$</span> and we want to do the following op...
habedi/stack-exchange-dataset
75,314
Minimum depth of addition and multiplication circuit using XOR and AND gates
<p>What are the minimum depth circuits possible for addition and multiplication of two n-bit numbers using just AND and XOR gates?&#xA;I read somewhere that we can achieve constant depth for addition if we have an OR gate. Can I achieve that using XOR gates?</p>&#xA;
arithmetic circuits multiplication xor
1
Minimum depth of addition and multiplication circuit using XOR and AND gates -- (arithmetic circuits multiplication xor) <p>What are the minimum depth circuits possible for addition and multiplication of two n-bit numbers using just AND and XOR gates?&#xA;I read somewhere that we can achieve constant depth for addition...
habedi/stack-exchange-dataset
75,315
What's the advantage of two pointers linked list implementation of Queue versus one pointer circular list
<p>Princeton Algorithms course shows the implementation of Queue using linked list and two pointers - <code>head</code> and <code>tail</code>. I've implemented the same functionality as a circular linked list using only one pointer <code>tail</code>. I'm wondering what's the advantage of two pointers versus one in a ci...
data structures linked lists queues
1
What's the advantage of two pointers linked list implementation of Queue versus one pointer circular list -- (data structures linked lists queues) <p>Princeton Algorithms course shows the implementation of Queue using linked list and two pointers - <code>head</code> and <code>tail</code>. I've implemented the same func...
habedi/stack-exchange-dataset
75,319
Problem with definition of bisimilarity
<p>In my model checking class we have defined a bisimulation like this:</p>&#xA;&#xA;<p>Let <span class="math-container">$K=(S,S_0,Act,R,L)$</span> and <span class="math-container">$K'=(S',S'_0,Act,R',L')$</span> be two kripke structures. A relation <span class="math-container">$B \subseteq S \times S'$</span> is calle...
formal methods process algebras
1
Problem with definition of bisimilarity -- (formal methods process algebras) <p>In my model checking class we have defined a bisimulation like this:</p>&#xA;&#xA;<p>Let <span class="math-container">$K=(S,S_0,Act,R,L)$</span> and <span class="math-container">$K'=(S',S'_0,Act,R',L')$</span> be two kripke structures. A re...
habedi/stack-exchange-dataset
75,327
Why is deep learning hyped despite bad VC dimension?
<p>The <a href="https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension" rel="noreferrer">Vapnik–Chervonenkis (VC)-dimension</a> formula for neural networks ranges from <span class="math-container">$O(E)$</span> to <span class="math-container">$O(E^2)$</span>, with <span class="math-container">$O(E^2V^2)$</...
machine learning vc dimension
1
Why is deep learning hyped despite bad VC dimension? -- (machine learning vc dimension) <p>The <a href="https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension" rel="noreferrer">Vapnik–Chervonenkis (VC)-dimension</a> formula for neural networks ranges from <span class="math-container">$O(E)$</span> to <span...
habedi/stack-exchange-dataset
75,329
Showing a problem is in coNP
<p>We have the problem $C = \{&lt;G,S&gt;| \text{ S is a minimal cover of G }\}$ and we want to show that $C\in coNP$.</p>&#xA;&#xA;<p>I can easily show that there's a ND TM that decides $coC$ using a guess to check if the drawn vertices are a minimal cover and if they are, return false. But it seems like it's wrong si...
complexity theory np complexity classes co np
1
Showing a problem is in coNP -- (complexity theory np complexity classes co np) <p>We have the problem $C = \{&lt;G,S&gt;| \text{ S is a minimal cover of G }\}$ and we want to show that $C\in coNP$.</p>&#xA;&#xA;<p>I can easily show that there's a ND TM that decides $coC$ using a guess to check if the drawn vertices ar...
habedi/stack-exchange-dataset
75,330
Understanding a detail in the proof of bin packing approximation
<p><strong><em>Input</em></strong>: $n$ item with sizes $s_1,...,s_n$, without lose of generality, all sizes are $\leq1$. <br/> In addition, $s_i &lt; \delta$ for all $i$ for some constant $\delta$. <br/>&#xA;<strong><em>Output</em></strong>: Minimal numbers of bins to pack the items, where each bin has volume 1. <br/>...
algorithm analysis approximation
1
Understanding a detail in the proof of bin packing approximation -- (algorithm analysis approximation) <p><strong><em>Input</em></strong>: $n$ item with sizes $s_1,...,s_n$, without lose of generality, all sizes are $\leq1$. <br/> In addition, $s_i &lt; \delta$ for all $i$ for some constant $\delta$. <br/>&#xA;<strong>...
habedi/stack-exchange-dataset