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
3,316
Is there any theoretically proven optimal compression algorithm?
<p>Is Huffman coding <strong>always</strong> optimal since it uses Shanon's ideas?&#xA;What about text, image, video, ... compression?</p>&#xA;&#xA;<p>Is this subject still active in the field? What classical or modern references should I read?</p>&#xA;
algorithms information theory data compression
1
Is there any theoretically proven optimal compression algorithm? -- (algorithms information theory data compression) <p>Is Huffman coding <strong>always</strong> optimal since it uses Shanon's ideas?&#xA;What about text, image, video, ... compression?</p>&#xA;&#xA;<p>Is this subject still active in the field? What clas...
habedi/stack-exchange-dataset
3,327
Complexity calculations, assumptions on basic costs
<blockquote>&#xA; <p><strong>Possible Duplicate:</strong><br>&#xA; <a href="https://cs.stackexchange.com/questions/1643/how-can-we-assume-comparison-addition-between-numbers-is-o1">How can we assume comparison, addition, &hellip; between numbers is $O(1)$</a> </p>&#xA;</blockquote>&#xA;&#xA;&#xA;&#xA;<p>When we calc...
complexity theory time complexity
1
Complexity calculations, assumptions on basic costs -- (complexity theory time complexity) <blockquote>&#xA; <p><strong>Possible Duplicate:</strong><br>&#xA; <a href="https://cs.stackexchange.com/questions/1643/how-can-we-assume-comparison-addition-between-numbers-is-o1">How can we assume comparison, addition, &helli...
habedi/stack-exchange-dataset
3,337
LFSR sequence computation
<p>I need to calculate the output of the sequence generated by this shift register but I cannot find anywhere how to do it. Everywhere the results are just given but there is no explanation how to do compute them. I know the the sequence will repeat every 2^3-1=7 times. Could anyone explain me how to do it. Thank you.<...
cryptography pseudo random generators shift register
1
LFSR sequence computation -- (cryptography pseudo random generators shift register) <p>I need to calculate the output of the sequence generated by this shift register but I cannot find anywhere how to do it. Everywhere the results are just given but there is no explanation how to do compute them. I know the the sequenc...
habedi/stack-exchange-dataset
3,339
Reference Request for Synthesis
<p>New to the world of software verification and synthesis. It was suggested to me that the book "Principles of Model Checking" is a good reference for verification, but I am clueless about synthesis. Could someone refer a good book?</p>&#xA;
reference request formal methods
1
Reference Request for Synthesis -- (reference request formal methods) <p>New to the world of software verification and synthesis. It was suggested to me that the book "Principles of Model Checking" is a good reference for verification, but I am clueless about synthesis. Could someone refer a good book?</p>&#xA;
habedi/stack-exchange-dataset
3,340
Problem contest with matrix and DP
<p>I found this problem while I was reading an ACM problem and it is about dynamic programming. The problem says that you have a square matrix $n\times n$ filled with 1's or 0's, like this:</p>&#xA;&#xA;<h2>$$\begin{bmatrix} 1 &amp;1 &amp;1 &amp;0\\ 1 &amp;1 &amp;1 &amp;1\\ 0 &amp;0 &amp;1 &amp;0\\ 1 &amp;1 &amp;1 &a...
algorithms dynamic programming
1
Problem contest with matrix and DP -- (algorithms dynamic programming) <p>I found this problem while I was reading an ACM problem and it is about dynamic programming. The problem says that you have a square matrix $n\times n$ filled with 1's or 0's, like this:</p>&#xA;&#xA;<h2>$$\begin{bmatrix} 1 &amp;1 &amp;1 &amp;0...
habedi/stack-exchange-dataset
3,347
For a graph $G$ find the minimal $t$ such $G(t)=(V,E(t))$ is connected
<p>Given a connected and directed graph $G=(V,E)$ with positive weights on the edges. for every $t&gt;0$ we define $E(t)$ to be the group of edges with weight lower or equal than $t$. I need to find an efficient algorithm which computes the minimal $t$ such that $G(t)=(V,E(t))$ is connected. </p>&#xA;&#xA;<p>I can sort...
algorithms graphs
1
For a graph $G$ find the minimal $t$ such $G(t)=(V,E(t))$ is connected -- (algorithms graphs) <p>Given a connected and directed graph $G=(V,E)$ with positive weights on the edges. for every $t&gt;0$ we define $E(t)$ to be the group of edges with weight lower or equal than $t$. I need to find an efficient algorithm whic...
habedi/stack-exchange-dataset
3,350
Is this language LL(1) parseable?
<p>I tried to find a simple example for a language that is not parseable with an LL(1) parser. I finally found this language.</p>&#xA;&#xA;<p><span class="math-container">$$L=\{\,a^nb^m\mid n,m\in\mathbb N,\&gt;n\ge m\,\}$$</span></p>&#xA;&#xA;<p>Is my hypothesis true or is this language parseable with an LL(1) parser?...
formal languages formal grammars context free parsers
1
Is this language LL(1) parseable? -- (formal languages formal grammars context free parsers) <p>I tried to find a simple example for a language that is not parseable with an LL(1) parser. I finally found this language.</p>&#xA;&#xA;<p><span class="math-container">$$L=\{\,a^nb^m\mid n,m\in\mathbb N,\&gt;n\ge m\,\}$$</sp...
habedi/stack-exchange-dataset
3,352
Find the lightest weight of a path between $u$ to $v$ that contains no more then $k$ edges (If there's one)
<p>Given a directed and strongly connected graph $G=(V,E)$, weight function $w: E \to \mathbb{R}$ and two distinct vertices $u,v \in V$. We know that there aren't negative cycles.&#xA;I need to find algorithm, efficient as possible,such that for every value of $k$, $2 \leq k \leq |V|-1$, it will find the lightest weigh...
algorithms graphs
1
Find the lightest weight of a path between $u$ to $v$ that contains no more then $k$ edges (If there's one) -- (algorithms graphs) <p>Given a directed and strongly connected graph $G=(V,E)$, weight function $w: E \to \mathbb{R}$ and two distinct vertices $u,v \in V$. We know that there aren't negative cycles.&#xA;I nee...
habedi/stack-exchange-dataset
3,355
Error in Generating Function Solution
<p>I am currently working my way through <a href="http://aofa.cs.princeton.edu/home/" rel="nofollow">An Introduction to Analysis of Algorithms</a> to stay sharp with recurrences as well as learn generating function techniques. However my analyses and the books analyses for the first few sample problems on ordinary gene...
recurrence relation mathematical analysis check my proof
1
Error in Generating Function Solution -- (recurrence relation mathematical analysis check my proof) <p>I am currently working my way through <a href="http://aofa.cs.princeton.edu/home/" rel="nofollow">An Introduction to Analysis of Algorithms</a> to stay sharp with recurrences as well as learn generating function techn...
habedi/stack-exchange-dataset
3,362
what is the complexity of recurrence relation?
<p>what is the complexity of below relation</p>&#xA;&#xA;<p>$ T(n) = 2*T(\sqrt n) + \log n$</p>&#xA;&#xA;<p>and $T(2) = 1$</p>&#xA;&#xA;<p>Is it $\Theta (\log n * \log \log n)$ ?</p>&#xA;
asymptotics recurrence relation mathematical analysis
1
what is the complexity of recurrence relation? -- (asymptotics recurrence relation mathematical analysis) <p>what is the complexity of below relation</p>&#xA;&#xA;<p>$ T(n) = 2*T(\sqrt n) + \log n$</p>&#xA;&#xA;<p>and $T(2) = 1$</p>&#xA;&#xA;<p>Is it $\Theta (\log n * \log \log n)$ ?</p>&#xA;
habedi/stack-exchange-dataset
3,377
Does Quicksort always have quadratic runtime if you choose a maximum element as pivot?
<p>If you have a quick-sort algorithm, and you always select the smallest (or largest) element as your pivot; am I right in assuming that if you provide an already sorted data set, you will always get worst-case performance regardless of whether your 'already sorted' list is in ascending or descending order? </p>&#xA;&...
algorithms time complexity algorithm analysis runtime analysis sorting
1
Does Quicksort always have quadratic runtime if you choose a maximum element as pivot? -- (algorithms time complexity algorithm analysis runtime analysis sorting) <p>If you have a quick-sort algorithm, and you always select the smallest (or largest) element as your pivot; am I right in assuming that if you provide an a...
habedi/stack-exchange-dataset
3,399
Finding the minimum cut of an undirected graph
<p>Here's a question from a past exam I'm trying to solve:</p>&#xA;&#xA;<p>For an undirected graph $G$ with positive weights $w(e) \geq 0$, I'm trying to find the minimum cut. I don't know other ways of doing that besides using the max-flow min-cut theorem. But the graph is undirected, so how should I direct it? I tho...
algorithms graphs
1
Finding the minimum cut of an undirected graph -- (algorithms graphs) <p>Here's a question from a past exam I'm trying to solve:</p>&#xA;&#xA;<p>For an undirected graph $G$ with positive weights $w(e) \geq 0$, I'm trying to find the minimum cut. I don't know other ways of doing that besides using the max-flow min-cut ...
habedi/stack-exchange-dataset
3,404
Compute 'insertable' letters in a regular language
<p>Let $L$ a regular language and define the <em><a href="https://en.wikipedia.org/wiki/Subsequence" rel="nofollow">subsequence</a> closure</em> of $L$ as</p>&#xA;&#xA;<p>$\qquad \displaystyle S(L) = \{ w \mid \exists w' \in L.\ w \text{ subsequence of } w'\}$.</p>&#xA;&#xA;<p>The problem I want to solve is to find for...
algorithms regular languages finite automata
1
Compute 'insertable' letters in a regular language -- (algorithms regular languages finite automata) <p>Let $L$ a regular language and define the <em><a href="https://en.wikipedia.org/wiki/Subsequence" rel="nofollow">subsequence</a> closure</em> of $L$ as</p>&#xA;&#xA;<p>$\qquad \displaystyle S(L) = \{ w \mid \exists w...
habedi/stack-exchange-dataset
3,406
Proving a grammar only generates words whose alternating digit sums are multiples of three
<p>This is homework and I'm looking for a push in the right direction. Proofs were never something I was properly taught, so now they're kind of a weak point.</p>&#xA;&#xA;<p>Here's the problem:</p>&#xA;&#xA;<blockquote>&#xA; <p>The following grammar generates numbers in binary notation ($C$ is the&#xA; start symbol)...
formal languages regular languages formal grammars proof techniques
1
Proving a grammar only generates words whose alternating digit sums are multiples of three -- (formal languages regular languages formal grammars proof techniques) <p>This is homework and I'm looking for a push in the right direction. Proofs were never something I was properly taught, so now they're kind of a weak poin...
habedi/stack-exchange-dataset
3,421
Random algorithm with biggest sequence that never repeats
<p>I am going to attempt to write a random number generator using exisiting randomize algorithms. Can you suggest which algorithm has the biggest sequence that never repeats? I don't care if they are fast or slow.</p>&#xA;
algorithms randomness
1
Random algorithm with biggest sequence that never repeats -- (algorithms randomness) <p>I am going to attempt to write a random number generator using exisiting randomize algorithms. Can you suggest which algorithm has the biggest sequence that never repeats? I don't care if they are fast or slow.</p>&#xA;
habedi/stack-exchange-dataset
3,427
Is this phrase structure grammar from my textbook correct?
<p>I just started reading "Parsing Techniques, A Practical Guide", Second Edition, by Dick Grune and Ceriel J.H. Jacobs. </p>&#xA;&#xA;<p>On page 12, the authors start describing a set of rules that can be used to generate the set of all enumerations of names of the type "tom, dick and harry": the rules allow single na...
formal languages formal grammars parsing
1
Is this phrase structure grammar from my textbook correct? -- (formal languages formal grammars parsing) <p>I just started reading "Parsing Techniques, A Practical Guide", Second Edition, by Dick Grune and Ceriel J.H. Jacobs. </p>&#xA;&#xA;<p>On page 12, the authors start describing a set of rules that can be used to g...
habedi/stack-exchange-dataset
3,431
Distinct variables for different clauses
<p>In resolution theorem proving, it is normally assumed variables in different clauses are distinct. This is not something that happens automatically; it requires significant extra code and computation to implement. Given that, I'm looking for a test case for it.</p>&#xA;&#xA;<p>The problem is, in all the test cases I...
logic automated theorem proving
1
Distinct variables for different clauses -- (logic automated theorem proving) <p>In resolution theorem proving, it is normally assumed variables in different clauses are distinct. This is not something that happens automatically; it requires significant extra code and computation to implement. Given that, I'm looking f...
habedi/stack-exchange-dataset
3,433
Are compilers able to detect alternating accesses to arrays and interleave them in memory?
<p>Is it possible to design a compiler which optimizes a loop in which arrays are accessed in alternate fashion? For example like this:</p>&#xA;&#xA;<pre><code>// int[] a,b&#xA;int sum = 0;&#xA;for(int i = 0; i &lt; n; i++)&#xA;{&#xA; sum += a[i] + b[i];&#xA;}&#xA;</code></pre>&#xA;&#xA;<p>With the usual sequential ar...
compilers arrays program optimization memory management
1
Are compilers able to detect alternating accesses to arrays and interleave them in memory? -- (compilers arrays program optimization memory management) <p>Is it possible to design a compiler which optimizes a loop in which arrays are accessed in alternate fashion? For example like this:</p>&#xA;&#xA;<pre><code>// int[]...
habedi/stack-exchange-dataset
3,435
The meaning of modulo in “formula modulo a background theory”
<p>I have been reading some papers where I keep reading stuff like “first-order formula modulo a background theory”. Does anyone know what modulo means in this case ? Is it something like “with respect to”?</p>&#xA;
terminology logic term rewriting
1
The meaning of modulo in “formula modulo a background theory” -- (terminology logic term rewriting) <p>I have been reading some papers where I keep reading stuff like “first-order formula modulo a background theory”. Does anyone know what modulo means in this case ? Is it something like “with respect to”?</p>&#xA;
habedi/stack-exchange-dataset
3,449
Benefit of Backward Pass at compile time
<p>We collect most of the information about possible compiler optimizations during forward pass. Is it possible to utilize the information collected in forward pass in a backward pass so as to perform better optimizations ?</p>&#xA;&#xA;<p>Note: I have been going through the patent <a href="http://www.google.com/patent...
compilers program optimization
1
Benefit of Backward Pass at compile time -- (compilers program optimization) <p>We collect most of the information about possible compiler optimizations during forward pass. Is it possible to utilize the information collected in forward pass in a backward pass so as to perform better optimizations ?</p>&#xA;&#xA;<p>Not...
habedi/stack-exchange-dataset
3,454
Using Loop Dependence analysis for vectorization
<p>How exactly <a href="http://en.wikipedia.org/wiki/Loop_dependence_analysis" rel="nofollow noreferrer">Loop Dependence Analysis</a> helps in <a href="http://en.wikipedia.org/wiki/Vectorization_(parallel_computing)" rel="nofollow noreferrer">vectorization</a> ? Are there any standard rules of safety criterias for para...
compilers parallel computing program optimization
1
Using Loop Dependence analysis for vectorization -- (compilers parallel computing program optimization) <p>How exactly <a href="http://en.wikipedia.org/wiki/Loop_dependence_analysis" rel="nofollow noreferrer">Loop Dependence Analysis</a> helps in <a href="http://en.wikipedia.org/wiki/Vectorization_(parallel_computing)"...
habedi/stack-exchange-dataset
3,455
References on teaching introductory programming courses
<p>As the new semester starts soon, I am interested in research regarding the teaching of introductory programming courses. I would like to improve my university course and I am looking for scientific papers on that topic.</p>&#xA;&#xA;<p>One trend I have seen is that some students (a smaller group) are interested in c...
reference request education
1
References on teaching introductory programming courses -- (reference request education) <p>As the new semester starts soon, I am interested in research regarding the teaching of introductory programming courses. I would like to improve my university course and I am looking for scientific papers on that topic.</p>&#xA;...
habedi/stack-exchange-dataset
3,458
Unambiguity of Reverse Polish Notation
<p>Lets say I have given following grammar which generates arithmetic expressions in reverse polish notation:</p>&#xA;&#xA;<p>$G=({E},{a,+,*},P,E)$<br>&#xA;$P={ E \rightarrow EE+ | EE* | a }$ </p>&#xA;&#xA;<p>I know this grammar is unambiguous. </p>&#xA;&#xA;<p>What I do not understand is how I can prove this.</p>&#xA...
formal languages formal grammars
1
Unambiguity of Reverse Polish Notation -- (formal languages formal grammars) <p>Lets say I have given following grammar which generates arithmetic expressions in reverse polish notation:</p>&#xA;&#xA;<p>$G=({E},{a,+,*},P,E)$<br>&#xA;$P={ E \rightarrow EE+ | EE* | a }$ </p>&#xA;&#xA;<p>I know this grammar is unambiguou...
habedi/stack-exchange-dataset
3,461
What is an IELR(1)-parser?
<p>I try to teach myself the usage of bison. The manpage bison(1) says about bison:</p>&#xA;&#xA;<blockquote>&#xA; <p>Generate a deterministic LR or generalized LR (GLR) parser employing LALR(1), IELR(1), or canonical LR(1) parser tables.</p>&#xA;</blockquote>&#xA;&#xA;<p>What is an IELR-parser? All relevant articles ...
formal languages terminology formal grammars parsers
1
What is an IELR(1)-parser? -- (formal languages terminology formal grammars parsers) <p>I try to teach myself the usage of bison. The manpage bison(1) says about bison:</p>&#xA;&#xA;<blockquote>&#xA; <p>Generate a deterministic LR or generalized LR (GLR) parser employing LALR(1), IELR(1), or canonical LR(1) parser tab...
habedi/stack-exchange-dataset
3,462
Polynomially related lengths under two different encodings
<p>I'm reading through <code>"Computers and Intractability: A guide to the Theory of NP-Completeness" by Michael R. Garey and David S. Johnson, p. 20</code> and I came across this concept of a function that is polynomially related to input lengths obtained using some encoding scheme. Let $$Len:D_{\Pi}\rightarrow \mathb...
complexity theory polynomial time encoding scheme
1
Polynomially related lengths under two different encodings -- (complexity theory polynomial time encoding scheme) <p>I'm reading through <code>"Computers and Intractability: A guide to the Theory of NP-Completeness" by Michael R. Garey and David S. Johnson, p. 20</code> and I came across this concept of a function that...
habedi/stack-exchange-dataset
3,463
Negation of nested quantifiers
<p>The problem is:</p>&#xA;&#xA;<p>$$\exists x \forall y (x \ge y)$$</p>&#xA;&#xA;<p>With a domain of all real positive integers.</p>&#xA;&#xA;<p>The negation is:</p>&#xA;&#xA;<p>$$\forall x \exists y (x &lt; y)$$</p>&#xA;&#xA;<p>so, if $y = x + 1$, the negation is true.</p>&#xA;&#xA;<p>That means the negation of the n...
logic first order logic
1
Negation of nested quantifiers -- (logic first order logic) <p>The problem is:</p>&#xA;&#xA;<p>$$\exists x \forall y (x \ge y)$$</p>&#xA;&#xA;<p>With a domain of all real positive integers.</p>&#xA;&#xA;<p>The negation is:</p>&#xA;&#xA;<p>$$\forall x \exists y (x &lt; y)$$</p>&#xA;&#xA;<p>so, if $y = x + 1$, the negati...
habedi/stack-exchange-dataset
3,466
Fixed point, what does it mean in the world of computer science
<p>I keep coming across references to <a href="http://en.wikipedia.org/wiki/Fixed_point_%28mathematics%29" rel="nofollow noreferrer">fixed point</a> in questions and answers at stackexchange and I look up the meaning on the web obviously finding reference at sites such as Wikipedia. However none of the references reall...
terminology
1
Fixed point, what does it mean in the world of computer science -- (terminology) <p>I keep coming across references to <a href="http://en.wikipedia.org/wiki/Fixed_point_%28mathematics%29" rel="nofollow noreferrer">fixed point</a> in questions and answers at stackexchange and I look up the meaning on the web obviously f...
habedi/stack-exchange-dataset
3,469
What does "dummy argument" mean?
<p>What is does it mean when an argument to a function is called a <strong>dummy argument</strong>? I have not encountered this term outside Fortran, is it a general term in computer science? What would be examples of arguments passed as dummy and not passed as dummy?</p>&#xA;&#xA;<p>I found <a href="http://encyclopedi...
terminology programming languages functional programming
1
What does "dummy argument" mean? -- (terminology programming languages functional programming) <p>What is does it mean when an argument to a function is called a <strong>dummy argument</strong>? I have not encountered this term outside Fortran, is it a general term in computer science? What would be examples of argumen...
habedi/stack-exchange-dataset
3,487
Using a step-counting function in a Turing Machine construction
<p>I have an question relating to the elementary foundations of Turing Machine theory. I would like to have a clarification of the status of a function $\phi$ (a mapping between TM indexes) I shall introduce in the formal question after the preamble. First to the preamble.</p>&#xA;&#xA;<p>Let us assume that we have a f...
complexity theory computability turing machines
1
Using a step-counting function in a Turing Machine construction -- (complexity theory computability turing machines) <p>I have an question relating to the elementary foundations of Turing Machine theory. I would like to have a clarification of the status of a function $\phi$ (a mapping between TM indexes) I shall intro...
habedi/stack-exchange-dataset
3,495
Complexity inversely propotional to $n$
<p>Is it possible an algorithm complexity decreases by input size? Simply $O(1/n)$ possible?</p>&#xA;
algorithms time complexity asymptotics landau notation
1
Complexity inversely propotional to $n$ -- (algorithms time complexity asymptotics landau notation) <p>Is it possible an algorithm complexity decreases by input size? Simply $O(1/n)$ possible?</p>&#xA;
habedi/stack-exchange-dataset
3,501
Approximating the Kolmogorov complexity
<p>I've studied something about the <a href="http://en.wikipedia.org/wiki/Kolmogorov_complexity">Kolmogorov Complexity</a>, read some articles and books from <a href="http://homepages.cwi.nl/~paulv/kolmogorov.html">Vitanyi and Li</a> and used the concept of <a href="http://complearn.org/ncd.html">Normalized Compression...
computability approximation data compression kolmogorov complexity
1
Approximating the Kolmogorov complexity -- (computability approximation data compression kolmogorov complexity) <p>I've studied something about the <a href="http://en.wikipedia.org/wiki/Kolmogorov_complexity">Kolmogorov Complexity</a>, read some articles and books from <a href="http://homepages.cwi.nl/~paulv/kolmogorov...
habedi/stack-exchange-dataset
3,504
Solving $T(n)= 3T(\frac{n}{4}) + n\cdot \lg(n)$ using the master theorem
<p><em>Introduction to Algorithms</em>, 3rd edition (p.95) has an example of how to solve the recurrence</p>&#xA;&#xA;<p>$$\displaystyle T(n)= 3T\left(\frac{n}{4}\right) + n\cdot \log(n)$$</p>&#xA;&#xA;<p>by applying the Master Theorem.</p>&#xA;&#xA;<p>I am very confused by how it is done. So, $a=3, b=4, f(n) = n\cdot ...
asymptotics recurrence relation landau notation mathematical analysis master theorem
1
Solving $T(n)= 3T(\frac{n}{4}) + n\cdot \lg(n)$ using the master theorem -- (asymptotics recurrence relation landau notation mathematical analysis master theorem) <p><em>Introduction to Algorithms</em>, 3rd edition (p.95) has an example of how to solve the recurrence</p>&#xA;&#xA;<p>$$\displaystyle T(n)= 3T\left(\frac{...
habedi/stack-exchange-dataset
3,509
NP-complete proof from Dasgupta problem on Kite
<p>I am trying to understand this problem from <a href="https://docs.google.com/viewer?a=v&amp;q=cache%3azCRhhxjqT5cJ%3awww.cs.berkeley.edu/~vazirani/algorithms/chap8.pdf%20&amp;hl=en&amp;gl=us&amp;pid=bl&amp;srcid=ADGEEShy1bvJEehdocFNfXKJs7p_TSog4n_ktXYth1MI0n1aUBo_L5Wbd-gzn5OH3QMnAv8mHqNKXJ8t1CXv3rle7avzGFVFN7DliQEAS...
complexity theory np complete reductions
1
NP-complete proof from Dasgupta problem on Kite -- (complexity theory np complete reductions) <p>I am trying to understand this problem from <a href="https://docs.google.com/viewer?a=v&amp;q=cache%3azCRhhxjqT5cJ%3awww.cs.berkeley.edu/~vazirani/algorithms/chap8.pdf%20&amp;hl=en&amp;gl=us&amp;pid=bl&amp;srcid=ADGEEShy1bv...
habedi/stack-exchange-dataset
3,510
What are the mathematical prerequisites for adaptive machine learning algorithms?
<p>I am a PhD student in Computer Science who switched his PhD a little bit towards ML algorithms combined with something else... I am an expert in that something else, say image processing, but not an expert in Machine Learning. What should I read/learn to get the ML mathematics right? Especially for adaptive learning...
reference request machine learning education learning theory
1
What are the mathematical prerequisites for adaptive machine learning algorithms? -- (reference request machine learning education learning theory) <p>I am a PhD student in Computer Science who switched his PhD a little bit towards ML algorithms combined with something else... I am an expert in that something else, say...
habedi/stack-exchange-dataset
3,529
How does a single-track Turing machine simulate a multi-track Turing machine?
<p>It's easy to see how a multi-track Turing machine can simulate a single-track Turing machine; it does so by ignoring all but the first track. But how does it work the other way? I need a specification of a transition function that does the job. If there are $k$ tracks, then we can think of symbols as being vectors a...
computability turing machines simulation
1
How does a single-track Turing machine simulate a multi-track Turing machine? -- (computability turing machines simulation) <p>It's easy to see how a multi-track Turing machine can simulate a single-track Turing machine; it does so by ignoring all but the first track. But how does it work the other way? I need a specif...
habedi/stack-exchange-dataset
3,533
Infinite alphabet Turing Machine
<p>Is a Turing Machine that is allowed to read and write symbols from an infinite alphabet more powerful than a regular TM (that is the only difference, the machine still has a finite number of states)?</p>&#xA;&#xA;<p>Intuition tells me not, since you need an infinite number of states to differentiate each symbol. So ...
computability turing machines reductions simulation
1
Infinite alphabet Turing Machine -- (computability turing machines reductions simulation) <p>Is a Turing Machine that is allowed to read and write symbols from an infinite alphabet more powerful than a regular TM (that is the only difference, the machine still has a finite number of states)?</p>&#xA;&#xA;<p>Intuition t...
habedi/stack-exchange-dataset
3,537
Is a single symbol, not in a set, a language?
<p>I was reading about Turing machines and realized I'm not sure about the difference between the following scenario. Given the alphabet $\Sigma = \{a, b \}$, we have the following assertions:</p>&#xA;&#xA;<ol>&#xA;<li>$a \in R $</li>&#xA;<li>$\{a\} \in R$</li>&#xA;</ol>&#xA;&#xA;<p>I think that assertion $1$ is incorr...
formal languages terminology computability
1
Is a single symbol, not in a set, a language? -- (formal languages terminology computability) <p>I was reading about Turing machines and realized I'm not sure about the difference between the following scenario. Given the alphabet $\Sigma = \{a, b \}$, we have the following assertions:</p>&#xA;&#xA;<ol>&#xA;<li>$a \in ...
habedi/stack-exchange-dataset
3,542
What if a formal grammar cannot be terminated?
<p>I'm currently in a class on Computability and we just finished looking at formal grammars before moving onto finite automata. We were given an several examples of a formal grammar, and one stuck out in particular:</p>&#xA;&#xA;<pre><code>V: { S, A, B, C }&#xA;T: { a, b, c }&#xA;P: {&#xA; S -&gt; aA | λ | ASA&#xA;...
formal grammars
1
What if a formal grammar cannot be terminated? -- (formal grammars) <p>I'm currently in a class on Computability and we just finished looking at formal grammars before moving onto finite automata. We were given an several examples of a formal grammar, and one stuck out in particular:</p>&#xA;&#xA;<pre><code>V: { S, A, ...
habedi/stack-exchange-dataset
3,554
What is the difference between halting, accepting, and deciding in the context of Turing machines?
<p>Does accepting mean that the TM will read and recognize a char from the cell it's currently reading from? And is it the case that a TM halts iff the input is decidable?</p>&#xA;
terminology turing machines undecidability
1
What is the difference between halting, accepting, and deciding in the context of Turing machines? -- (terminology turing machines undecidability) <p>Does accepting mean that the TM will read and recognize a char from the cell it's currently reading from? And is it the case that a TM halts iff the input is decidable?</...
habedi/stack-exchange-dataset
3,555
What is the difference between decidability and computability?
<p>If they are different, what are the typical problems in each that do not fall on the other category? Or are the mutually exclusive or does one completely capture the other?</p>&#xA;
computability terminology
1
What is the difference between decidability and computability? -- (computability terminology) <p>If they are different, what are the typical problems in each that do not fall on the other category? Or are the mutually exclusive or does one completely capture the other?</p>&#xA;
habedi/stack-exchange-dataset
3,557
What constitutes one operation/cycle/move in the RAM model?
<p>I saw a RAM model diagram that displayed an input tape, output tape, the program (read-only), the instruction pointer, and the memory registers. However, when I look at questions of time complexity, it is relevant how much time the program needs to spend on one action. Say you want to read one integer symbol from th...
algorithms time complexity algorithm analysis machine models
1
What constitutes one operation/cycle/move in the RAM model? -- (algorithms time complexity algorithm analysis machine models) <p>I saw a RAM model diagram that displayed an input tape, output tape, the program (read-only), the instruction pointer, and the memory registers. However, when I look at questions of time comp...
habedi/stack-exchange-dataset
3,559
Is star closure of reverse of language equivalent to reverse of closure of that language
<p>is the following true &#xA;$ (L^R)^* = (L^*)^R $ </p>&#xA;&#xA;<p>I tried the following to prove it true.&#xA;let u,v belong to L then $ L^* = \{ u,v, uu, vv, uv, vu ... \} $&#xA;and $ (L^*)^R = \{ u^R, v^R, u^Ru^R, v^Rv^R, v^Ru^R, u^Rv^R ... \} $</p>&#xA;&#xA;<p>now $ L^R = \{ u^R, v^R \} $ so &#xA;$(L^R)^* = \{ u^...
formal languages automata
1
Is star closure of reverse of language equivalent to reverse of closure of that language -- (formal languages automata) <p>is the following true &#xA;$ (L^R)^* = (L^*)^R $ </p>&#xA;&#xA;<p>I tried the following to prove it true.&#xA;let u,v belong to L then $ L^* = \{ u,v, uu, vv, uv, vu ... \} $&#xA;and $ (L^*)^R = \{...
habedi/stack-exchange-dataset
3,563
n*log n and n/log n against polynomial running time
<p>I understand that $\Theta(n)$ is faster than $\Theta(n\log n)$ and slower than $\Theta(n/\log n)$. What is difficult for me to understand is how to actually compare $\Theta(n \log n)$ and $\Theta(n/\log n)$ with $\Theta(n^f)$ where $0 &lt; f &lt; 1$.</p>&#xA;&#xA;<p>For example, how do we decide $\Theta(n/\log n)$ v...
asymptotics mathematical analysis landau notation
1
n*log n and n/log n against polynomial running time -- (asymptotics mathematical analysis landau notation) <p>I understand that $\Theta(n)$ is faster than $\Theta(n\log n)$ and slower than $\Theta(n/\log n)$. What is difficult for me to understand is how to actually compare $\Theta(n \log n)$ and $\Theta(n/\log n)$ wit...
habedi/stack-exchange-dataset
4,570
Kolmogorov complexity of string concatenation
<p>If $K(s)$ is the <a href="http://en.wikipedia.org/wiki/Kolmogorov_complexity" rel="noreferrer">Kolmogorov complexity</a> of the string $s \in \{0,1\}^*$,</p>&#xA;&#xA;<blockquote>&#xA;Can we prove (or disprove) the following statement:&#xA;<br><br>&#xA;"Every string $s$ is a prefix of an incompressible string; i.e. ...
computability kolmogorov complexity
1
Kolmogorov complexity of string concatenation -- (computability kolmogorov complexity) <p>If $K(s)$ is the <a href="http://en.wikipedia.org/wiki/Kolmogorov_complexity" rel="noreferrer">Kolmogorov complexity</a> of the string $s \in \{0,1\}^*$,</p>&#xA;&#xA;<blockquote>&#xA;Can we prove (or disprove) the following state...
habedi/stack-exchange-dataset
4,572
Why isn't converting from an NFA to a DFA working?
<p>I am just beginning to learn computation theory. I wrote up a non-deterministic finite automata that accepts strings that contain the substring "abba":</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/jZx92.jpg" alt="My NFA"></p>&#xA;&#xA;<p>I tried to convert it to a DFA by putting together sets of states in the...
automata finite automata
1
Why isn't converting from an NFA to a DFA working? -- (automata finite automata) <p>I am just beginning to learn computation theory. I wrote up a non-deterministic finite automata that accepts strings that contain the substring "abba":</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/jZx92.jpg" alt="My NFA"></p>&#xA...
habedi/stack-exchange-dataset
4,578
Why does heapsort run in $\Theta(n \log n)$ instead of $\Theta(n^2 \log n)$ time?
<p>I am reading section 6.4 on Heapsort algorithm in CLRS, page 160.</p>&#xA;&#xA;<pre><code>HEAPSORT(A) &#xA;1 BUILD-MAX-HEAP(A) &#xA;2 for i to A.length downto 2 &#xA;3 exchange A[i] with A[i]&#xA;4 A.heap-size = A.heap-size-1 &#xA;5 MAX-HEAPIFY(A,1)&#xA;</code></pre>&#xA;&#xA;<p>Why is the running time, ac...
algorithms algorithm analysis landau notation sorting
1
Why does heapsort run in $\Theta(n \log n)$ instead of $\Theta(n^2 \log n)$ time? -- (algorithms algorithm analysis landau notation sorting) <p>I am reading section 6.4 on Heapsort algorithm in CLRS, page 160.</p>&#xA;&#xA;<pre><code>HEAPSORT(A) &#xA;1 BUILD-MAX-HEAP(A) &#xA;2 for i to A.length downto 2 &#xA;3 exc...
habedi/stack-exchange-dataset
4,584
Computing the running time of a divide-by-4-and-conquer algorithm
<p>I write this code in python:</p>&#xA;&#xA;<pre><code>def sub(ma):&#xA; n = len(ma); m = len(ma[0])&#xA; if n != m : return&#xA; n2 = int(ceil(n/2))&#xA; a = []; b = []; c = []; d = [] &#xA; for i in range(n2):&#xA; a.append(ma[i][0:n2])&#xA; b.append(ma[i][n2:n])&#xA; c.append(ma[...
algorithms algorithm analysis runtime analysis recurrence relation
1
Computing the running time of a divide-by-4-and-conquer algorithm -- (algorithms algorithm analysis runtime analysis recurrence relation) <p>I write this code in python:</p>&#xA;&#xA;<pre><code>def sub(ma):&#xA; n = len(ma); m = len(ma[0])&#xA; if n != m : return&#xA; n2 = int(ceil(n/2))&#xA; a = []; b = []...
habedi/stack-exchange-dataset
4,592
Creating artificial NP-Complete problems
<p>Stephen Cook's proof of the NP-completeness of SAT is constructive. Given a Turing machine $M$, one can create a logical formula that is satisfiable if and only if $M$'s computation halts in an accepting state. This suggests that we could take a logical formula and create a Turing machine $M'$ whose computation is d...
algorithms np complete
1
Creating artificial NP-Complete problems -- (algorithms np complete) <p>Stephen Cook's proof of the NP-completeness of SAT is constructive. Given a Turing machine $M$, one can create a logical formula that is satisfiable if and only if $M$'s computation halts in an accepting state. This suggests that we could take a lo...
habedi/stack-exchange-dataset
4,603
When should I learn artificial intelligence?
<p>Straight to the point: I would really like to learn AI.</p>&#xA;&#xA;<p>But I want some advice from experienced CS guys as to when I should jump into Artificial Intelligence.</p>&#xA;&#xA;<p>What prerequisites are needed in order for me to better grasp the AI concepts?</p>&#xA;
artificial intelligence
1
When should I learn artificial intelligence? -- (artificial intelligence) <p>Straight to the point: I would really like to learn AI.</p>&#xA;&#xA;<p>But I want some advice from experienced CS guys as to when I should jump into Artificial Intelligence.</p>&#xA;&#xA;<p>What prerequisites are needed in order for me to bet...
habedi/stack-exchange-dataset
4,611
Anonymization of dataset preserving unique identities
<p>The $k$-anonymization paradigm (and its refinements) means to create datasets where every tuple is identical with $k-1$ others.</p>&#xA;&#xA;<p>However I'm in a situation where people are in the dataset many times. And I want to follow their progress through the health care system, so I need to know who is who. If I...
algorithms security databases
1
Anonymization of dataset preserving unique identities -- (algorithms security databases) <p>The $k$-anonymization paradigm (and its refinements) means to create datasets where every tuple is identical with $k-1$ others.</p>&#xA;&#xA;<p>However I'm in a situation where people are in the dataset many times. And I want to...
habedi/stack-exchange-dataset
4,612
Subtracting lower-order term to prove subtitution method works
<p>Substation method fails to prove that $T(n)=\Theta(n^2) $ for the recursion $T(n)=4T(n/2) + n^2$, since you end up with $T(n) &lt; cn^2 \leq cn^2 + n^2$.</p>&#xA;&#xA;<p>I don't understand how to subtract off lower-order term to prove that substitution works. </p>&#xA;&#xA;<p>Came up with: $T(n) \leq cn^2 - bn^2$</...
asymptotics recurrence relation landau notation
1
Subtracting lower-order term to prove subtitution method works -- (asymptotics recurrence relation landau notation) <p>Substation method fails to prove that $T(n)=\Theta(n^2) $ for the recursion $T(n)=4T(n/2) + n^2$, since you end up with $T(n) &lt; cn^2 \leq cn^2 + n^2$.</p>&#xA;&#xA;<p>I don't understand how to subtr...
habedi/stack-exchange-dataset
4,614
Why do the swap step in Prim's algorithm for minimum spanning trees?
<p>I was watching the <a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/lecture-16-greedy-algorithms-minimum-spanning-trees/" rel="nofollow">video lecture from MIT on Prim's algorithm for minimum spanning trees</a>.&#xA;Wh...
algorithms graphs algorithm analysis greedy algorithms spanning trees
1
Why do the swap step in Prim's algorithm for minimum spanning trees? -- (algorithms graphs algorithm analysis greedy algorithms spanning trees) <p>I was watching the <a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/lectur...
habedi/stack-exchange-dataset
4,618
What piece am I missing to turn this idea into a programming language?
<p>I've been doing some reading (I'll name drop along the way) and have selected a few scattered ideas that I think could be cobbled together into a nifty esoteric programming language. But I'm having some difficulty assembling the parts.</p>&#xA;&#xA;<p>Kleene's Theorem states: Any Regular Set can be recognized by som...
programming languages finite automata arrays neural networks machine models
1
What piece am I missing to turn this idea into a programming language? -- (programming languages finite automata arrays neural networks machine models) <p>I've been doing some reading (I'll name drop along the way) and have selected a few scattered ideas that I think could be cobbled together into a nifty esoteric prog...
habedi/stack-exchange-dataset
4,619
Are there any problems that are easy to compute but hard to verify?
<p>Assuming P $\neq$ NP, NP-complete problems are "hard to solve, but have answers that are easy to check." Does it make any sense to consider the opposite, that is, problems for which it's easy to compute a correct answer, but hard to verify an arbitrary purported solution?</p>&#xA;&#xA;<p>I think such a problem woul...
complexity theory
1
Are there any problems that are easy to compute but hard to verify? -- (complexity theory) <p>Assuming P $\neq$ NP, NP-complete problems are "hard to solve, but have answers that are easy to check." Does it make any sense to consider the opposite, that is, problems for which it's easy to compute a correct answer, but ...
habedi/stack-exchange-dataset
4,639
Compression of sequence with Direct Access
<p>I have a sequence of $n$ integers in a small range $[0, k)$ and all the integers have the same frequency $f$ (so the size of the sequence is $n = f * k$). What I'm trying to do now is to compress this sequence while providing random access (what is the $i$-th integer). I'm more interested in achieving high compressi...
algorithms data compression
1
Compression of sequence with Direct Access -- (algorithms data compression) <p>I have a sequence of $n$ integers in a small range $[0, k)$ and all the integers have the same frequency $f$ (so the size of the sequence is $n = f * k$). What I'm trying to do now is to compress this sequence while providing random access (...
habedi/stack-exchange-dataset
4,650
Unification vs. SAT solver
<p>I read on Wikipedia that <a href="http://en.wikipedia.org/wiki/Unification_%28computer_science%29">unification</a> is a process of solving the satisfability problem.</p>&#xA;&#xA;<p>At the same time, I know that such solvers are called "SAT solvers" or "SMT solvers". So, are they different names for the same thing?<...
terminology sat solvers unification
1
Unification vs. SAT solver -- (terminology sat solvers unification) <p>I read on Wikipedia that <a href="http://en.wikipedia.org/wiki/Unification_%28computer_science%29">unification</a> is a process of solving the satisfability problem.</p>&#xA;&#xA;<p>At the same time, I know that such solvers are called "SAT solvers"...
habedi/stack-exchange-dataset
4,653
Redundancy elimination in the superposition calculus
<p>When proving theorems with the superposition calculus, we deal with three kinds of rules:</p>&#xA;&#xA;<ol>&#xA;<li><p>Generating rules: from pair of clauses A and B, generate new clause C while keeping the original pair, e.g. superposition in the general case.</p></li>&#xA;<li><p>Rewriting rules: from clause A gene...
logic automated theorem proving
1
Redundancy elimination in the superposition calculus -- (logic automated theorem proving) <p>When proving theorems with the superposition calculus, we deal with three kinds of rules:</p>&#xA;&#xA;<ol>&#xA;<li><p>Generating rules: from pair of clauses A and B, generate new clause C while keeping the original pair, e.g. ...
habedi/stack-exchange-dataset
4,656
Finding the number of leaves in a imbalanced recursion tree
<p>I'm going through the MIT Online Course Videos on Intro. to Algorithms at <a href="http://video.google.com/videoplay?docid=-3860843648161712896" rel="nofollow">here</a> at around 38:00.</p>&#xA;&#xA;<p>So we have a recursion formula</p>&#xA;&#xA;<p>$\qquad T(n) = T(n/10) + T(9n/10) + O(n)$</p>&#xA;&#xA;<p>If we buil...
algorithm analysis asymptotics recurrence relation
1
Finding the number of leaves in a imbalanced recursion tree -- (algorithm analysis asymptotics recurrence relation) <p>I'm going through the MIT Online Course Videos on Intro. to Algorithms at <a href="http://video.google.com/videoplay?docid=-3860843648161712896" rel="nofollow">here</a> at around 38:00.</p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
4,660
Difference between multimethods and overloading
<h2>Context</h2>&#xA;&#xA;<p>I've been programming in java for a few years now. And atm i'm learning something totally different: Clojure.&#xA;There the expression problem can be solved by using multimethods whereas in java you will need something like the visitor pattern or something alike.</p>&#xA;&#xA;<h2>The questi...
programming languages semantics functional programming object oriented
1
Difference between multimethods and overloading -- (programming languages semantics functional programming object oriented) <h2>Context</h2>&#xA;&#xA;<p>I've been programming in java for a few years now. And atm i'm learning something totally different: Clojure.&#xA;There the expression problem can be solved by using m...
habedi/stack-exchange-dataset
4,667
complexity of decision problems vs computing functions
<p>This is an area that admittedly I've always found subtle about CS and occasionally trips me up, and clearly others. recently on <a href="http://www.tcs.se" rel="nofollow noreferrer">tcs.se</a> a user asked an apparently innocuous question about <a href="https://cstheory.stackexchange.com/questions/12682/is-the-n-que...
algorithms complexity theory reference request time complexity np complete
1
complexity of decision problems vs computing functions -- (algorithms complexity theory reference request time complexity np complete) <p>This is an area that admittedly I've always found subtle about CS and occasionally trips me up, and clearly others. recently on <a href="http://www.tcs.se" rel="nofollow noreferrer">...
habedi/stack-exchange-dataset
4,670
When are Dynamic and Lexical Scoping equivalent?
<p>I am designing a small DSL and I know that implementing dynamic scoping (with a simple global stack) is easier then using full lexical scoping (each function needs its own scope/closure). What kind of features can be added that do not care how scope is implemented and what features would require a particular kind of...
programming languages semantics
1
When are Dynamic and Lexical Scoping equivalent? -- (programming languages semantics) <p>I am designing a small DSL and I know that implementing dynamic scoping (with a simple global stack) is easier then using full lexical scoping (each function needs its own scope/closure). What kind of features can be added that do ...
habedi/stack-exchange-dataset
4,672
Büchi automaton with modified acceptance condition
<p>Consider a Büchi automaton $\mathcal{A}$ with the modified acceptance condition, that an $\omega$-word $\mathcal{w}$ is accepted by $\mathcal{A}$ iff every run $\rho$ of $\mathcal{A}$ on $\mathcal{w}$ is accepting (rather than at least one run being accepting). I need to show that this automaton also accepts only $\...
formal languages automata buchi automata
1
Büchi automaton with modified acceptance condition -- (formal languages automata buchi automata) <p>Consider a Büchi automaton $\mathcal{A}$ with the modified acceptance condition, that an $\omega$-word $\mathcal{w}$ is accepted by $\mathcal{A}$ iff every run $\rho$ of $\mathcal{A}$ on $\mathcal{w}$ is accepting (rathe...
habedi/stack-exchange-dataset
4,675
Size of Maximum Matching in Bipartite Graph
<p>Am I correct in my observation that the cardinality of the maximum matching $M$ of a bipartite graph $G(U, V, E)$ is always equal to $\min(|U|, |V|)$?</p>&#xA;
graphs bipartite matching
1
Size of Maximum Matching in Bipartite Graph -- (graphs bipartite matching) <p>Am I correct in my observation that the cardinality of the maximum matching $M$ of a bipartite graph $G(U, V, E)$ is always equal to $\min(|U|, |V|)$?</p>&#xA;
habedi/stack-exchange-dataset
4,683
Simple Task-Assignment Problem
<p>I have this simple 'assignment' problem:</p>&#xA;&#xA;<p>We have a set of agents $A = \{a_1, a_2, \dotso, a_n\}$ and set of tasks $T= \{t_1, t_2, \dotso, t_m\}$. Note that $m$ is not necessarily equal to $n$. Unlike the general assignment formulation in Wikipedia, a task $t_c$ can only be assigned to an agent based ...
algorithms graphs proof techniques assignment problem
1
Simple Task-Assignment Problem -- (algorithms graphs proof techniques assignment problem) <p>I have this simple 'assignment' problem:</p>&#xA;&#xA;<p>We have a set of agents $A = \{a_1, a_2, \dotso, a_n\}$ and set of tasks $T= \{t_1, t_2, \dotso, t_m\}$. Note that $m$ is not necessarily equal to $n$. Unlike the general...
habedi/stack-exchange-dataset
4,692
Phrase generators for use with testing grammars that don't use a seed
<p>In helping someone understand phrase generators for use with testing grammars, think compiler test cases, I noted that I have never found a phrase generator that is knowledgeable of the grammar, and is deterministic. The phrase generators I am talking about rely on the grammar of the language as input so that the us...
reference request formal grammars context free parsing software testing
1
Phrase generators for use with testing grammars that don't use a seed -- (reference request formal grammars context free parsing software testing) <p>In helping someone understand phrase generators for use with testing grammars, think compiler test cases, I noted that I have never found a phrase generator that is knowl...
habedi/stack-exchange-dataset
4,700
Upper-bounding the number of comparisons for Sorting to $\Theta(n)$ using a physically big number like Number of Particles in the Universe
<p>I recently read an article <a href="http://www.scottaaronson.com/writings/bignumbers.html" rel="noreferrer">Scott Aaronson - Big Numbers</a> . That has made me think about the effective upper-bound for sorting.</p>&#xA;&#xA;<p>According to the article, some of the big numbers like the number of particles in the univ...
algorithm analysis sorting
1
Upper-bounding the number of comparisons for Sorting to $\Theta(n)$ using a physically big number like Number of Particles in the Universe -- (algorithm analysis sorting) <p>I recently read an article <a href="http://www.scottaaronson.com/writings/bignumbers.html" rel="noreferrer">Scott Aaronson - Big Numbers</a> . Tha...
habedi/stack-exchange-dataset
4,705
Euler cycles in biconnected components
<p>If a graph has a Euler cycle, do the biconnected components have Euler cycles as well?</p>&#xA;
graphs eulerian paths
1
Euler cycles in biconnected components -- (graphs eulerian paths) <p>If a graph has a Euler cycle, do the biconnected components have Euler cycles as well?</p>&#xA;
habedi/stack-exchange-dataset
4,707
Can two neighbors in a graph be at the same depth in a DFS tree?
<p>In an undirected graph, can two nodes at an identical distance n from the root of a <a href="http://en.wikipedia.org/wiki/Depth-first_search">DFS</a> tree be neighbors in the original graph? I'm thinking no, but I'm not sure (because of back edges)</p>&#xA;
graphs graph traversal
1
Can two neighbors in a graph be at the same depth in a DFS tree? -- (graphs graph traversal) <p>In an undirected graph, can two nodes at an identical distance n from the root of a <a href="http://en.wikipedia.org/wiki/Depth-first_search">DFS</a> tree be neighbors in the original graph? I'm thinking no, but I'm not sure...
habedi/stack-exchange-dataset
4,711
Unique path in a directed graph
<p>I'm designing an algorithm for a class that will determine if a directed graph is unique with respect to a vertex $v$ such that for any $u \ne v$ there is at most one path from $v$ to $u$. I've started by using BFS (breadth-first search) to find the shortest path from v to another vertex u, and then running BFS agai...
graphs shortest path graph traversal
1
Unique path in a directed graph -- (graphs shortest path graph traversal) <p>I'm designing an algorithm for a class that will determine if a directed graph is unique with respect to a vertex $v$ such that for any $u \ne v$ there is at most one path from $v$ to $u$. I've started by using BFS (breadth-first search) to fi...
habedi/stack-exchange-dataset
4,716
Understanding LEADING and TRAILING operations of an operator precedence grammar
<p>I want to understand what the <code>LEADING</code> and <code>TRAILING</code> of non-terminal in an operator precedence grammar physically mean.</p>&#xA;&#xA;<p>I am confused by the various definitions I have read on them. <br>&#xA;I understand that the <code>LEADING</code> of a non-terminal is the first terminal whi...
terminology formal grammars parsing
1
Understanding LEADING and TRAILING operations of an operator precedence grammar -- (terminology formal grammars parsing) <p>I want to understand what the <code>LEADING</code> and <code>TRAILING</code> of non-terminal in an operator precedence grammar physically mean.</p>&#xA;&#xA;<p>I am confused by the various definit...
habedi/stack-exchange-dataset
4,717
Is an oracle ever useful if you can't control the input instances?
<p>Let's say $F$ is an oracle for a problem in $\mathbb{NP}$, but I cannot call this oracle with any input instance. Instead, whenever I call $F$ I get returned a random instance and solution. Thus, I know that $F$ is in fact capable of solving arbitrary $\mathbb{NP}$-hard problems, I just can't specify which one I ...
complexity theory np complete
1
Is an oracle ever useful if you can't control the input instances? -- (complexity theory np complete) <p>Let's say $F$ is an oracle for a problem in $\mathbb{NP}$, but I cannot call this oracle with any input instance. Instead, whenever I call $F$ I get returned a random instance and solution. Thus, I know that $F$ ...
habedi/stack-exchange-dataset
4,719
How to prove that the pre-order tree traversal algorithm terminates?
<p>I see <strong>structural induction</strong> the usual way for proving an algorithm's <strong>termination</strong> property, but it's not that easy to prove by means of induction on a <strong>tree</strong> algorithm. Now I am struggling on proving that the pre-order tree traversal algorithm is terminable:</p>&#xA;&#x...
algorithms data structures algorithm analysis correctness proof induction
1
How to prove that the pre-order tree traversal algorithm terminates? -- (algorithms data structures algorithm analysis correctness proof induction) <p>I see <strong>structural induction</strong> the usual way for proving an algorithm's <strong>termination</strong> property, but it's not that easy to prove by means of i...
habedi/stack-exchange-dataset
4,723
Best-Case Running Time For Binary Search Tree Insertion
<p>The notion of best-case running time is kind of ambiguous for me. According to wikipedia, the definition of best case running time is:</p>&#xA;&#xA;<blockquote>&#xA; <p>The term best-case performance is used in computer science to describe the way of an algorithm behaves under optimal conditions. For example, the b...
terminology data structures runtime analysis binary trees
1
Best-Case Running Time For Binary Search Tree Insertion -- (terminology data structures runtime analysis binary trees) <p>The notion of best-case running time is kind of ambiguous for me. According to wikipedia, the definition of best case running time is:</p>&#xA;&#xA;<blockquote>&#xA; <p>The term best-case performan...
habedi/stack-exchange-dataset
4,727
definition of formula validity
<p>I read in some sources that valid formulas are tautologies (valid under every evaluation). In the others, I read that these are formulas that have conclusions true when premises are true. Are these just equivalent definitions because ⊨ P → Q is equivalent to P ⊨ Q?</p>&#xA;
terminology logic logical validity
1
definition of formula validity -- (terminology logic logical validity) <p>I read in some sources that valid formulas are tautologies (valid under every evaluation). In the others, I read that these are formulas that have conclusions true when premises are true. Are these just equivalent definitions because ⊨ P → Q is e...
habedi/stack-exchange-dataset
4,729
How many possible assignments does a CNF sentence have?
<p>I'm having some trouble understanding the following:</p>&#xA;&#xA;<p>When we look at satisfiability problems in conjunctive normal form, an underconstrained problem is one with relatively few clauses constraining the variables. For eg. here is a randomly generated 3-CNF sentence with five symbols and five clauses. (...
logic combinatorics satisfiability
1
How many possible assignments does a CNF sentence have? -- (logic combinatorics satisfiability) <p>I'm having some trouble understanding the following:</p>&#xA;&#xA;<p>When we look at satisfiability problems in conjunctive normal form, an underconstrained problem is one with relatively few clauses constraining the var...
habedi/stack-exchange-dataset
4,734
Turing complete and computational power
<p>In a lecture a professor mentioned that modern computers don't have as much computational power as a Turing machine because they don't have infinite memory, and since no computer can have infinite memory the Turing machine is therefore unattainable and simply represents the upper limit of computing. Is there a measu...
computability
1
Turing complete and computational power -- (computability) <p>In a lecture a professor mentioned that modern computers don't have as much computational power as a Turing machine because they don't have infinite memory, and since no computer can have infinite memory the Turing machine is therefore unattainable and simpl...
habedi/stack-exchange-dataset
4,746
How to prove that BFS directed-graph traversal algorithm terminates?
<p>How to prove that BFS directed-graph traversal algorithm terminates?&#xA;(I copy the pseudocode from <a href="http://en.wikipedia.org/wiki/Breadth-first_search" rel="nofollow">here</a>) Input: A graph G and a root v of G.</p>&#xA;&#xA;<pre><code> procedure BFS(G,v):&#xA; create a queue Q&#xA; enqueue v on...
algorithms algorithm analysis correctness proof
1
How to prove that BFS directed-graph traversal algorithm terminates? -- (algorithms algorithm analysis correctness proof) <p>How to prove that BFS directed-graph traversal algorithm terminates?&#xA;(I copy the pseudocode from <a href="http://en.wikipedia.org/wiki/Breadth-first_search" rel="nofollow">here</a>) Input: A ...
habedi/stack-exchange-dataset
4,754
Rigorous proof against pseudorandom generator
<p>I am trying to teach myself the principles of cryptograhpy, and want to solve the following question:</p>&#xA;<blockquote>&#xA;<p>Let G be the algorithm that takes an input x = (x1, . . . , xn) from&#xA;{0, 1} n (so each xi ∈ {0, 1}) and outputs the string G(x1, . . . ,&#xA;xn) = (x1, . . . , xn, x1 ⊕ x2) in {0, 1} ...
correctness proof pseudo random generators
1
Rigorous proof against pseudorandom generator -- (correctness proof pseudo random generators) <p>I am trying to teach myself the principles of cryptograhpy, and want to solve the following question:</p>&#xA;<blockquote>&#xA;<p>Let G be the algorithm that takes an input x = (x1, . . . , xn) from&#xA;{0, 1} n (so each xi...
habedi/stack-exchange-dataset
4,758
Chromatic polynomial of a square
<p>Consider a square, ABCD. Intuitively it seemed to me that its chromatic polynomial is $\lambda(\lambda - 1)(\lambda - 1)(\lambda - 2)$ where there are $\lambda$ colours available..</p>&#xA;&#xA;<p>That is there are $\lambda$ ways in which a colour for A can be picked, there are $\lambda - 1$ ways for colours for B a...
graphs colorings
1
Chromatic polynomial of a square -- (graphs colorings) <p>Consider a square, ABCD. Intuitively it seemed to me that its chromatic polynomial is $\lambda(\lambda - 1)(\lambda - 1)(\lambda - 2)$ where there are $\lambda$ colours available..</p>&#xA;&#xA;<p>That is there are $\lambda$ ways in which a colour for A can be p...
habedi/stack-exchange-dataset
4,761
Difference between regular expressions: $(0^*1^*)^*$ and $(0+1)^*$
<p>Can anyone tell me what is the difference between the following regular expressions: $(0^*1^*)^*$ and $(0+1)^*$ ? To me they look like generating the same string.</p>&#xA;
formal languages regular languages regular expressions
1
Difference between regular expressions: $(0^*1^*)^*$ and $(0+1)^*$ -- (formal languages regular languages regular expressions) <p>Can anyone tell me what is the difference between the following regular expressions: $(0^*1^*)^*$ and $(0+1)^*$ ? To me they look like generating the same string.</p>&#xA;
habedi/stack-exchange-dataset
4,768
References on collective intelligence with respect to CS applications
<p>In recent years the field of "collective intelligence" sometimes known as <a href="http://en.wikipedia.org/wiki/Web_2.0" rel="nofollow">Web 2.0</a> has had a big impact on computer science, software engineering, and software development. Stackexchange software itself is a large scale evolving application or implemen...
reference request education software engineering books
1
References on collective intelligence with respect to CS applications -- (reference request education software engineering books) <p>In recent years the field of "collective intelligence" sometimes known as <a href="http://en.wikipedia.org/wiki/Web_2.0" rel="nofollow">Web 2.0</a> has had a big impact on computer scienc...
habedi/stack-exchange-dataset
4,777
On "The Average Height of Planted Plane Trees" by Knuth, de Bruijn and Rice (1972)
<p>I am trying to derive the <a href="http://alexandria.tue.nl/repository/freearticles/597601.pdf">classic paper</a> in the title only by elementary means (no generating functions, no complex analysis, no Fourier analysis) although with much less precision. In short, I "only" want to prove that the average height $h_n$...
combinatorics discrete mathematics trees average case random walks
1
On "The Average Height of Planted Plane Trees" by Knuth, de Bruijn and Rice (1972) -- (combinatorics discrete mathematics trees average case random walks) <p>I am trying to derive the <a href="http://alexandria.tue.nl/repository/freearticles/597601.pdf">classic paper</a> in the title only by elementary means (no genera...
habedi/stack-exchange-dataset
4,779
How is the rule 110 Turing complete?
<p>I've read the wikipedia page for <a href="http://en.wikipedia.org/wiki/Rule_110">rule 110</a> in cellular automata, and I more or less know how they work (a set of rules decides where to draw the next 1 or 0).</p>&#xA;&#xA;<p>I've just read they're Turing complete, but I can't even fathom how would you 'program' in...
computability automata turing completeness cellular automata
1
How is the rule 110 Turing complete? -- (computability automata turing completeness cellular automata) <p>I've read the wikipedia page for <a href="http://en.wikipedia.org/wiki/Rule_110">rule 110</a> in cellular automata, and I more or less know how they work (a set of rules decides where to draw the next 1 or 0).</p>&...
habedi/stack-exchange-dataset
4,784
Reconstructing a data table from cross-tabulation frequencies
<p>Say there is a data table $D$ that we cannot see, with $M$ columns. We are given exact <a href="https://en.wikipedia.org/wiki/Cross_tabulation" rel="nofollow">cross-tabulation</a> frequencies for all ${M \choose 2}$ pairs of columns, that is how often each combination of two values occurs.</p>&#xA;&#xA;<p>From the c...
algorithms complexity theory combinatorics statistics
1
Reconstructing a data table from cross-tabulation frequencies -- (algorithms complexity theory combinatorics statistics) <p>Say there is a data table $D$ that we cannot see, with $M$ columns. We are given exact <a href="https://en.wikipedia.org/wiki/Cross_tabulation" rel="nofollow">cross-tabulation</a> frequencies for ...
habedi/stack-exchange-dataset
4,789
Fastest square root method with exact integer result?
<p>I am dealing with the problem of computing $ s = \lfloor sqrt(x)\rfloor$ with $x \in [0,30000^2]$. The common <code>sqrtf(x)</code> on C language is too slow for this case, however it always gives me the correct result. I've tried with the Newton's method but I get very small errors when the square root of a number ...
algorithms integers discrete mathematics
1
Fastest square root method with exact integer result? -- (algorithms integers discrete mathematics) <p>I am dealing with the problem of computing $ s = \lfloor sqrt(x)\rfloor$ with $x \in [0,30000^2]$. The common <code>sqrtf(x)</code> on C language is too slow for this case, however it always gives me the correct resul...
habedi/stack-exchange-dataset
4,790
Hiring one person out of n -- rank and probablity
<p>I am studying algorithms from CLRS book. I try to understand the difference between </p>&#xA;&#xA;<ul>&#xA;<li>probability of hiring the $i$th person out of $n$ and</li>&#xA;<li>probability of hiring the $i$th person out of $n$ persons based on ranks.</li>&#xA;</ul>&#xA;&#xA;<p>Using the normal probability, we know ...
probability theory
1
Hiring one person out of n -- rank and probablity -- (probability theory) <p>I am studying algorithms from CLRS book. I try to understand the difference between </p>&#xA;&#xA;<ul>&#xA;<li>probability of hiring the $i$th person out of $n$ and</li>&#xA;<li>probability of hiring the $i$th person out of $n$ persons based o...
habedi/stack-exchange-dataset
4,793
Start learning about Theory of Distributed Systems?
<p>What's the best way that anyone can do to have a good introduction to the theory of distributed system, any books or references, and topics should be covered first and requirements to start learning in this topic.</p>&#xA;
reference request education distributed systems
1
Start learning about Theory of Distributed Systems? -- (reference request education distributed systems) <p>What's the best way that anyone can do to have a good introduction to the theory of distributed system, any books or references, and topics should be covered first and requirements to start learning in this topic...
habedi/stack-exchange-dataset
4,794
Time complexity of an enumeration of SUBSET SUM instances
<p>An instance of the <strong><a href="http://en.wikipedia.org/wiki/Subset_sum_problem" rel="nofollow">SUBSET SUM</a></strong> problem (given $y$ and $A = \{x_1,...,x_n\}$ is there a non-empty subset of $A$ whose sum is $y$) can be represented on a one-tape Turing Machine with a list of comma separated numbers in binar...
algorithms formal languages turing machines enumeration
1
Time complexity of an enumeration of SUBSET SUM instances -- (algorithms formal languages turing machines enumeration) <p>An instance of the <strong><a href="http://en.wikipedia.org/wiki/Subset_sum_problem" rel="nofollow">SUBSET SUM</a></strong> problem (given $y$ and $A = \{x_1,...,x_n\}$ is there a non-empty subset o...
habedi/stack-exchange-dataset
4,797
Fast k mismatch string matching algorithm
<p>I am looking for a fast k-mismatch string matching algorithm. Given a pattern string P of length m, and a text string T of length n, I need a fast (linear time) algorithm to find all positions where P matches a substring of T with at most k mismatches. This is different from the k-differences problem (edit distance)...
algorithms reference request strings string metrics substrings
1
Fast k mismatch string matching algorithm -- (algorithms reference request strings string metrics substrings) <p>I am looking for a fast k-mismatch string matching algorithm. Given a pattern string P of length m, and a text string T of length n, I need a fast (linear time) algorithm to find all positions where P matche...
habedi/stack-exchange-dataset
4,805
Sorting as a linear program
<p>A surprising number of problems have fairly natural reductions to linear programming (LP). See <a href="http://www.cs.berkeley.edu/~vazirani/algorithms/chap7.pdf" rel="noreferrer">Chapter 7</a> of [1] for examples such as network flows, bipartite matching, zero-sum games, shortest paths, a form of linear regression,...
algorithms reductions sorting linear programming
1
Sorting as a linear program -- (algorithms reductions sorting linear programming) <p>A surprising number of problems have fairly natural reductions to linear programming (LP). See <a href="http://www.cs.berkeley.edu/~vazirani/algorithms/chap7.pdf" rel="noreferrer">Chapter 7</a> of [1] for examples such as network flows...
habedi/stack-exchange-dataset
4,806
Using Funk SVD with SGD?
<p>I work on a recommender system framework which is implemented with a variant on Funk SVD (See his explanation of his algorithm <a href="http://sifter.org/~simon/journal/20061211.html" rel="nofollow" title="here">here</a>). </p>&#xA;&#xA;<p>However the framework that we are trying to integrate doesn't support Funk SV...
algorithms machine learning matrices
1
Using Funk SVD with SGD? -- (algorithms machine learning matrices) <p>I work on a recommender system framework which is implemented with a variant on Funk SVD (See his explanation of his algorithm <a href="http://sifter.org/~simon/journal/20061211.html" rel="nofollow" title="here">here</a>). </p>&#xA;&#xA;<p>However th...
habedi/stack-exchange-dataset
4,812
What is the difference between a module in a monolithic kernel and a server in a microkernel?
<p>I´m not exactly sure what kind of impact these two things have on kernel design. Are servers more flexible because of running in user space, for instance, and does adding a module require a new build of a kernel?</p>&#xA;
operating systems os kernel
1
What is the difference between a module in a monolithic kernel and a server in a microkernel? -- (operating systems os kernel) <p>I´m not exactly sure what kind of impact these two things have on kernel design. Are servers more flexible because of running in user space, for instance, and does adding a module require a ...
habedi/stack-exchange-dataset
4,818
Definition of $\Theta$ for negative functions
<p>I'm working out of the 3rd edition CLRS Algorithms textbook and in Chapter 3 a discussion begins about asymptotic notation which starts with $\Theta$ notation. I understood the beginning definition of:</p>&#xA;&#xA;<p>$$\Theta(g(n)) = \{ f(n)\,|\, \exists\, c_1, c_2 &gt; 0, n_0 \in \mathbb{N}: 0 \leq c_1 g(n) \leq f...
terminology asymptotics
1
Definition of $\Theta$ for negative functions -- (terminology asymptotics) <p>I'm working out of the 3rd edition CLRS Algorithms textbook and in Chapter 3 a discussion begins about asymptotic notation which starts with $\Theta$ notation. I understood the beginning definition of:</p>&#xA;&#xA;<p>$$\Theta(g(n)) = \{ f(n)...
habedi/stack-exchange-dataset
4,826
Planarity conditions for Planar 1-in-3 SAT
<p><strong>Planar 3SAT</strong> is NP-complete. A planar 3SAT instance is a 3SAT instance for which the graph built using the following rules is planar:</p>&#xA;&#xA;<ol>&#xA;<li>add a vertex for every $x_i$ and $\bar{x_i}$</li>&#xA;<li>add a vertex for every clause $C_j$</li>&#xA;<li>add an edge for every $(x_i,\bar{x...
np complete reductions satisfiability 3 sat
1
Planarity conditions for Planar 1-in-3 SAT -- (np complete reductions satisfiability 3 sat) <p><strong>Planar 3SAT</strong> is NP-complete. A planar 3SAT instance is a 3SAT instance for which the graph built using the following rules is planar:</p>&#xA;&#xA;<ol>&#xA;<li>add a vertex for every $x_i$ and $\bar{x_i}$</li>...
habedi/stack-exchange-dataset
4,835
Hardness and directions of reductions
<p>Let us say we know that problem A is hard, then we reduce A to the unknown problem B to prove B is also hard.</p>&#xA;&#xA;<p>As an example: we know 3-coloring is hard. Then we reduce 3-coloring to 4-coloring. By conflating one of the colors in the 3-coloring you have a 4-coloring, ergo 4-coloring is hard.</p>&#xA;&...
complexity theory np complete reductions
1
Hardness and directions of reductions -- (complexity theory np complete reductions) <p>Let us say we know that problem A is hard, then we reduce A to the unknown problem B to prove B is also hard.</p>&#xA;&#xA;<p>As an example: we know 3-coloring is hard. Then we reduce 3-coloring to 4-coloring. By conflating one of th...
habedi/stack-exchange-dataset
4,837
Is $(a^nb^m)^r$ regular?
<p>I took my theory of computation exams a few weeks ago, and this was one of the questions:</p>&#xA;<blockquote>&#xA;<p>Assume language <span class="math-container">$L=\{(a^nb^m)^r \mid n,m,r\ge 0\}$</span></p>&#xA;<p>Is L regular? If yes provide a regular expression or an automaton for it.</p>&#xA;</blockquote>&#xA;<...
formal languages regular languages regular expressions
1
Is $(a^nb^m)^r$ regular? -- (formal languages regular languages regular expressions) <p>I took my theory of computation exams a few weeks ago, and this was one of the questions:</p>&#xA;<blockquote>&#xA;<p>Assume language <span class="math-container">$L=\{(a^nb^m)^r \mid n,m,r\ge 0\}$</span></p>&#xA;<p>Is L regular? If...
habedi/stack-exchange-dataset
4,850
Understanding the definition of reduction
<p>From <a href="http://en.wikipedia.org/wiki/Reduction_%28complexity%29" rel="nofollow">Wikipedia</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Given two subsets A and B of N and a set of functions F from N to N&#xA; which is closed under composition, A is called reducible to B under F&#xA; if $$&#xA; \exists f \in F ...
complexity theory terminology reductions
1
Understanding the definition of reduction -- (complexity theory terminology reductions) <p>From <a href="http://en.wikipedia.org/wiki/Reduction_%28complexity%29" rel="nofollow">Wikipedia</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Given two subsets A and B of N and a set of functions F from N to N&#xA; which is closed und...
habedi/stack-exchange-dataset
4,862
Left-Factoring a grammar into LL(1)
<p>I have a homework assignment where I need to convert a grammar into LL(1). I've already removed the left recursion, but I'm having trouble doing left-factoring. All of the examples I've found are simple, and look something like this:</p>&#xA;&#xA;<p><code>A -&gt; aX | aY</code><br>&#xA;becomes:<br>&#xA;<code>A -&gt;...
formal languages formal grammars parsers left recursion
1
Left-Factoring a grammar into LL(1) -- (formal languages formal grammars parsers left recursion) <p>I have a homework assignment where I need to convert a grammar into LL(1). I've already removed the left recursion, but I'm having trouble doing left-factoring. All of the examples I've found are simple, and look somethi...
habedi/stack-exchange-dataset
4,865
Recursive complexity with change of variable
<p>I face a problem with computing a complexity. &#xA;I have this equality : $P(u) = (\sqrt{u}+1)P(\sqrt{u}) + \theta(\sqrt{u})$</p>&#xA;&#xA;<p>And I want to prove that $P(u) = O(u)$</p>&#xA;&#xA;<p>This is how I process :</p>&#xA;&#xA;<p>I put $m = \lg\lg u \implies P(u) = P(2^{2^{m}}) = (2^{2^{m-1}}+1)P(2^{2^{m-1}})...
asymptotics recurrence relation
1
Recursive complexity with change of variable -- (asymptotics recurrence relation) <p>I face a problem with computing a complexity. &#xA;I have this equality : $P(u) = (\sqrt{u}+1)P(\sqrt{u}) + \theta(\sqrt{u})$</p>&#xA;&#xA;<p>And I want to prove that $P(u) = O(u)$</p>&#xA;&#xA;<p>This is how I process :</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
4,867
What helpful solution does the Halting Problem give to computing?
<p>What problem does the halting problem solve in computing, whether theoretical or practical?</p>&#xA;&#xA;<p>It is very easy to debug code which loops forever, just signal the debugger to break if the program is running for too long? What purpose / good is the halting problem? Why was Turing praised for it?</p>&#xA;
computability terminology halting problem
1
What helpful solution does the Halting Problem give to computing? -- (computability terminology halting problem) <p>What problem does the halting problem solve in computing, whether theoretical or practical?</p>&#xA;&#xA;<p>It is very easy to debug code which loops forever, just signal the debugger to break if the prog...
habedi/stack-exchange-dataset