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
65,135
Notation: SPACE(n) vs SPACE(O(n))
<p>I want to denote the class of problems solvable by linear space multi-tape Turing machines. I have seem in many places this class being denoted by $SPACE(n)$. But why is the notation $SPACE(O(n))$ not preferred in this case? In particular, I'm writing a project in which I need to distinguish between problems solvabl...
complexity theory complexity classes notation
1
Notation: SPACE(n) vs SPACE(O(n)) -- (complexity theory complexity classes notation) <p>I want to denote the class of problems solvable by linear space multi-tape Turing machines. I have seem in many places this class being denoted by $SPACE(n)$. But why is the notation $SPACE(O(n))$ not preferred in this case? In part...
habedi/stack-exchange-dataset
65,144
Do approximation results for CSPs hold even when domains are of finite but different size?
<p>We need to have a precise definition for what a constraint satisfaction problem (CSP) is to study it formally. Looking at <a href="http://www.karlin.mff.cuni.cz/~barto/Articles/SurveyBSLverSub.pdf" rel="nofollow">a survey by Libor Barto, titled "The Constraint Satisfaction Problem and Universal Algebra"</a>, a defin...
approximation constraint satisfaction
1
Do approximation results for CSPs hold even when domains are of finite but different size? -- (approximation constraint satisfaction) <p>We need to have a precise definition for what a constraint satisfaction problem (CSP) is to study it formally. Looking at <a href="http://www.karlin.mff.cuni.cz/~barto/Articles/Survey...
habedi/stack-exchange-dataset
65,146
What is the meaning and significance of a Turing machine taking a description of itself as input?
<p>Currently I'm reading about the Halting problem. $H(\langle M,w\rangle)$ is a machine which will solve the Halting problem, and then using machine $H$ one creates a new machine $D$ and we run $H$ on input $\langle M, \langle M\rangle\rangle$. </p>&#xA;&#xA;<p>My question is: What is the significance of giving a desc...
computability turing machines undecidability halting problem
1
What is the meaning and significance of a Turing machine taking a description of itself as input? -- (computability turing machines undecidability halting problem) <p>Currently I'm reading about the Halting problem. $H(\langle M,w\rangle)$ is a machine which will solve the Halting problem, and then using machine $H$ on...
habedi/stack-exchange-dataset
65,152
Derivative for x-direction for image
<p>I want to ask, consider we want to compute the slope of x-direction of the following step</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/Zocmz.jpg" alt="enter image description here">.</p>&#xA;&#xA;<p>The slope for it would be</p>&#xA;&#xA;<p>$m =\frac{0}{m_2 - m_1} =\frac{0}{5 - 2}$ which is 0.</p>&#xA;&#xA;<p...
image processing mathematical analysis
1
Derivative for x-direction for image -- (image processing mathematical analysis) <p>I want to ask, consider we want to compute the slope of x-direction of the following step</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/Zocmz.jpg" alt="enter image description here">.</p>&#xA;&#xA;<p>The slope for it would be</p>&...
habedi/stack-exchange-dataset
65,159
If NP is not a proper subset of coNP, why does NP not equal coNP?
<p>I am studying some lecture notes on the complexity of algorithms.<br>&#xA;The notes give a proof that NP is not a proper subset of coNP.<br>&#xA;However, they still assert that NP is a subset of coNP (which I agree with).<br>&#xA;So, in this case, why does it not follow that NP is equal to coNP?</p>&#xA;
complexity theory np complexity classes
1
If NP is not a proper subset of coNP, why does NP not equal coNP? -- (complexity theory np complexity classes) <p>I am studying some lecture notes on the complexity of algorithms.<br>&#xA;The notes give a proof that NP is not a proper subset of coNP.<br>&#xA;However, they still assert that NP is a subset of coNP (which...
habedi/stack-exchange-dataset
65,169
What is the time complexity of an algorithm that calls a polynomial time algorithm?
<p>I'm having a difficult time understanding time complexities of algorithm. I know that a polynomial time is of the form O(n^m) where m is a constant. Consider the following case where A is a list of elements:</p>&#xA;&#xA;<pre><code>Foo(A)&#xA;for each element a in A:&#xA; for each element b in A-a:&#xA; Po...
algorithm analysis runtime analysis
1
What is the time complexity of an algorithm that calls a polynomial time algorithm? -- (algorithm analysis runtime analysis) <p>I'm having a difficult time understanding time complexities of algorithm. I know that a polynomial time is of the form O(n^m) where m is a constant. Consider the following case where A is a li...
habedi/stack-exchange-dataset
65,170
Why does russian peasant multiplication work?
<p>can someone provide a proof with induction on why the Russian peasant multiplication work ?</p>&#xA;&#xA;<p>if you don't know what that is , here is the algorithm :</p>&#xA;&#xA;<pre><code> P(2·a,⌊b/2⌋) : b&gt;1 and b is even number&#xA;P(a,b):= P(2·a,⌊b/2⌋)+a : b&gt;1 and b is odd n...
proof techniques mathematical analysis
1
Why does russian peasant multiplication work? -- (proof techniques mathematical analysis) <p>can someone provide a proof with induction on why the Russian peasant multiplication work ?</p>&#xA;&#xA;<p>if you don't know what that is , here is the algorithm :</p>&#xA;&#xA;<pre><code> P(2·a,⌊b/2⌋) : ...
habedi/stack-exchange-dataset
65,177
Understanding the Diameter Constrained MST Problem
<p>I am interested in understanding the DCMST problem, explained in this paper (<a href="http://www.dcc.ic.uff.br/~celso/artigos/cpdcmst.pdf" rel="nofollow">http://www.dcc.ic.uff.br/~celso/artigos/cpdcmst.pdf</a>). I don't think I understand it as I should. Here is how I understand it, we have a undirected connected gr...
graphs optimization weighted graphs minimum spanning tree
1
Understanding the Diameter Constrained MST Problem -- (graphs optimization weighted graphs minimum spanning tree) <p>I am interested in understanding the DCMST problem, explained in this paper (<a href="http://www.dcc.ic.uff.br/~celso/artigos/cpdcmst.pdf" rel="nofollow">http://www.dcc.ic.uff.br/~celso/artigos/cpdcmst.p...
habedi/stack-exchange-dataset
65,190
What are the design issue with today's micro processor
<p>I'm just getting started with cs. In school I heard about that modern micro processor are not perfect. So what are the issues? Are does problems related to energy(power draw)/ time /speed(clock speed)? Or is the design faulty?&#xA;So if you could design the perfect cpu what would it look like? </p>&#xA;
computer architecture cpu
1
What are the design issue with today's micro processor -- (computer architecture cpu) <p>I'm just getting started with cs. In school I heard about that modern micro processor are not perfect. So what are the issues? Are does problems related to energy(power draw)/ time /speed(clock speed)? Or is the design faulty?&#xA;...
habedi/stack-exchange-dataset
65,191
How to apply the pumping lemma for CFGs to languages that contain the empty string
<p>The pumping lemma states that if we can split a string w (taken from a context-free language L) as uvxyz with conditions |vy|>=1 |vxy|&lt;=p |w|>=p for some p then $uv^ixy^iz$ is in L for any i.</p>&#xA;&#xA;<p>However, some context-free languages include the empty string, which has length 0. How can we possibly spl...
context free pumping lemma
1
How to apply the pumping lemma for CFGs to languages that contain the empty string -- (context free pumping lemma) <p>The pumping lemma states that if we can split a string w (taken from a context-free language L) as uvxyz with conditions |vy|>=1 |vxy|&lt;=p |w|>=p for some p then $uv^ixy^iz$ is in L for any i.</p>&#xA...
habedi/stack-exchange-dataset
65,192
Where does the assembler live inside a CPU? If, it indeed does?
<p>Where does the assembler live in the system? I understand that assembly language gets converted to machine code (binary) and that the processor then follows these instructions. </p>&#xA;&#xA;<p>Where does the assembler live? Does it live in some kind of Read Only memory? </p>&#xA;
computer architecture
1
Where does the assembler live inside a CPU? If, it indeed does? -- (computer architecture) <p>Where does the assembler live in the system? I understand that assembly language gets converted to machine code (binary) and that the processor then follows these instructions. </p>&#xA;&#xA;<p>Where does the assembler live? D...
habedi/stack-exchange-dataset
65,196
Are there any types of distributed databases which allows untrusted peers, like Blockchain?
<p>Are there any types of distributed databases which allows untrusted peers, like Blockchain?&#xA;If it exist, can I look its whitepapers and/or implementations?</p>&#xA;
distributed systems databases
1
Are there any types of distributed databases which allows untrusted peers, like Blockchain? -- (distributed systems databases) <p>Are there any types of distributed databases which allows untrusted peers, like Blockchain?&#xA;If it exist, can I look its whitepapers and/or implementations?</p>&#xA;
habedi/stack-exchange-dataset
65,198
How powerful are CFGs that allow an infinite number of rules?
<p>I was wondering recently what would happen if we'd allow context-free grammars to have an infinite number of rules. Clearly, if we'd allow arbitrary such infinite sets of rules, every language $L$ over some alphabet $\Sigma$ could be described by a CFG $G = (\{S\},\Sigma,R,S)$ with $R = \{S \rightarrow w \mid w \in...
formal languages context free formal grammars
1
How powerful are CFGs that allow an infinite number of rules? -- (formal languages context free formal grammars) <p>I was wondering recently what would happen if we'd allow context-free grammars to have an infinite number of rules. Clearly, if we'd allow arbitrary such infinite sets of rules, every language $L$ over so...
habedi/stack-exchange-dataset
65,200
What is a difference between cross-lingual IR and multi-lingual IR?
<p>In papers usually <strong>Cross-Lingual Information Retrieval</strong> (<strong>CLIR</strong>) and <strong>Multi-Lingual Information Retrieval</strong> (<strong>MLIR</strong>) use equivalently or distinctly. I want to know is there any difference between these two terms? </p>&#xA;
information retrieval
1
What is a difference between cross-lingual IR and multi-lingual IR? -- (information retrieval) <p>In papers usually <strong>Cross-Lingual Information Retrieval</strong> (<strong>CLIR</strong>) and <strong>Multi-Lingual Information Retrieval</strong> (<strong>MLIR</strong>) use equivalently or distinctly. I want to know...
habedi/stack-exchange-dataset
65,201
Can one truly build a schedule from graph coloring?
<p>I know that with graph coloring we can build a simple schedule with maybe 9 students and 9 lectures (i.e. <a href="http://web.math.princeton.edu/math_alive/5/Notes2.pdf" rel="nofollow">these notes</a>) and determine the minimum number of meeting times, but is this feasible in a real world scenario? Say I have 30 pro...
graphs colorings
1
Can one truly build a schedule from graph coloring? -- (graphs colorings) <p>I know that with graph coloring we can build a simple schedule with maybe 9 students and 9 lectures (i.e. <a href="http://web.math.princeton.edu/math_alive/5/Notes2.pdf" rel="nofollow">these notes</a>) and determine the minimum number of meeti...
habedi/stack-exchange-dataset
65,206
The throughput of the ALOHA protocol if the Binomial distribution was used
<p>In all the examples of ALOHA I've seen, the Poisson distribution is used. Theoretically, how could the throughput be calculated if a Binomial distribution was used instead?</p>&#xA;&#xA;<p>For example, in the case that the offered load follows a Binomial distribution with probability $p$, I know that the probability...
probability theory computer networks communication protocols protocols
1
The throughput of the ALOHA protocol if the Binomial distribution was used -- (probability theory computer networks communication protocols protocols) <p>In all the examples of ALOHA I've seen, the Poisson distribution is used. Theoretically, how could the throughput be calculated if a Binomial distribution was used in...
habedi/stack-exchange-dataset
65,219
Algorithm for clustering points in $\mathbb{R}^2$ based on pairwise distance (percolation graphs)
<p>I haven't been able to find literature on the efficient solving of the following problem.</p>&#xA;&#xA;<p>Given $n$ random points $x_i \in (0, 1)^2$ the unit square, obtain the flat clusters of points, such that two points are in the same cluster if their pairwise distance $d(x_i, x_j) &lt; r$, where $r &lt; 1$ is a...
algorithms graphs
1
Algorithm for clustering points in $\mathbb{R}^2$ based on pairwise distance (percolation graphs) -- (algorithms graphs) <p>I haven't been able to find literature on the efficient solving of the following problem.</p>&#xA;&#xA;<p>Given $n$ random points $x_i \in (0, 1)^2$ the unit square, obtain the flat clusters of po...
habedi/stack-exchange-dataset
65,227
Collection of inference rules viewed itself as a judgment
<p>I'm confused about the intended meaning of the following passage from Bob Harper's <em>Practical Foundations for Programming Languages</em>:</p>&#xA;&#xA;<blockquote>&#xA; <p>A collection of rules is considered to define the <em>strongest</em> judgment form that is <em>closed under</em>, or <em>respects</em>, those...
logic type theory semantics
1
Collection of inference rules viewed itself as a judgment -- (logic type theory semantics) <p>I'm confused about the intended meaning of the following passage from Bob Harper's <em>Practical Foundations for Programming Languages</em>:</p>&#xA;&#xA;<blockquote>&#xA; <p>A collection of rules is considered to define the ...
habedi/stack-exchange-dataset
65,233
How to partition a set into a given number of disjoint subsets subject to some conditions?
<p>I am given a set $A\triangleq\{1,\ldots,k\}$, an integer $s\leqslant k$, and non-negative integers $a_{ij}$. My problem is to find $s$ disjoint subsets $S_j$ of $\{1,\ldots,k\}$ such that:</p>&#xA;&#xA;<ol>&#xA;<li>$\bigcup_{j=1}^s S_j=A$; and </li>&#xA;<li>$|S_j|\leqslant a_{ij}$ for all $i\in S_j$ and $j=1,\ldots,...
complexity theory integer programming
1
How to partition a set into a given number of disjoint subsets subject to some conditions? -- (complexity theory integer programming) <p>I am given a set $A\triangleq\{1,\ldots,k\}$, an integer $s\leqslant k$, and non-negative integers $a_{ij}$. My problem is to find $s$ disjoint subsets $S_j$ of $\{1,\ldots,k\}$ such ...
habedi/stack-exchange-dataset
65,239
Rearrange pixels to maximize visually distinguishable pattern
<p>I have a dataset full of 0s and 1s, and when I visualize it with <a href="https://lvdmaaten.github.io/tsne/" rel="nofollow noreferrer">t-SNE</a>, which does dimensionality reduction. There is clearly some structure in it as shown below. Each color corresponds to a particular category. There are 10 categories, and th...
machine learning image processing
1
Rearrange pixels to maximize visually distinguishable pattern -- (machine learning image processing) <p>I have a dataset full of 0s and 1s, and when I visualize it with <a href="https://lvdmaaten.github.io/tsne/" rel="nofollow noreferrer">t-SNE</a>, which does dimensionality reduction. There is clearly some structure i...
habedi/stack-exchange-dataset
65,240
PDA with an unusual double inequality
<p>I have an odd PDA problem that I cant seem to construct. I haven't come across one like this before. </p>&#xA;&#xA;<p>$L = \{w\in\{a,b\}^{*} : 3\#_{a}(w) \leq 5\#_{b}(w) \leq 4\#_{a}(w)\}$</p>&#xA;&#xA;<p>Could I get some pointers on how to tackle such a problem like this so I can be more familiar with the approache...
pushdown automata
1
PDA with an unusual double inequality -- (pushdown automata) <p>I have an odd PDA problem that I cant seem to construct. I haven't come across one like this before. </p>&#xA;&#xA;<p>$L = \{w\in\{a,b\}^{*} : 3\#_{a}(w) \leq 5\#_{b}(w) \leq 4\#_{a}(w)\}$</p>&#xA;&#xA;<p>Could I get some pointers on how to tackle such a p...
habedi/stack-exchange-dataset
65,242
Simple question about grammar derivations
<p>I'm learning the basics of grammars and compilers for a comparative programming languages class, but having a bit of trouble with one aspect of grammar derivation.</p>&#xA;&#xA;<p>Here is an example of a grammar derivation in <a href="https://www.youtube.com/watch?v=WccZQSERfCM&amp;feature=youtu.be&amp;t=315" rel="n...
formal grammars compilers parsers
1
Simple question about grammar derivations -- (formal grammars compilers parsers) <p>I'm learning the basics of grammars and compilers for a comparative programming languages class, but having a bit of trouble with one aspect of grammar derivation.</p>&#xA;&#xA;<p>Here is an example of a grammar derivation in <a href="h...
habedi/stack-exchange-dataset
65,248
Sorting a set of $n$ elements containing only $\log n$ unique elements
<p>We have a set of $n$ elements which contains at most $\log n$ different numbers. I want to sort this set faster than $O(n \log n)$. Is it possible?</p>&#xA;&#xA;<p>I tried using a hash table to find the set of $\log n$ unique elements, then sort them in $O(\log n \log \log n)$, after that creating a new array of $n...
algorithms sorting
1
Sorting a set of $n$ elements containing only $\log n$ unique elements -- (algorithms sorting) <p>We have a set of $n$ elements which contains at most $\log n$ different numbers. I want to sort this set faster than $O(n \log n)$. Is it possible?</p>&#xA;&#xA;<p>I tried using a hash table to find the set of $\log n$ uni...
habedi/stack-exchange-dataset
65,254
thread scheduling in multi core architecture
<p>In multi core architecture, let us say we have M cores and N threads (N > M) and a process once assigned to a core can't migrate to another core's ready queue. We have to design scheduling policy to balance load.&#xA;I read about this area and found this - <br>&#xA;1) Block multithreading, Interleaved multithreading...
computer architecture operating systems scheduling threads
1
thread scheduling in multi core architecture -- (computer architecture operating systems scheduling threads) <p>In multi core architecture, let us say we have M cores and N threads (N > M) and a process once assigned to a core can't migrate to another core's ready queue. We have to design scheduling policy to balance l...
habedi/stack-exchange-dataset
65,258
Construct regular expression for language
<p>How to construct regular expression for language L which contain all words in which there is a letter 'a' and the letter 'b'?&#xA;Of course, I understand that it's easy problem but I just start to learn this science? Please, any advices and hints.</p>&#xA;
regular expressions
1
Construct regular expression for language -- (regular expressions) <p>How to construct regular expression for language L which contain all words in which there is a letter 'a' and the letter 'b'?&#xA;Of course, I understand that it's easy problem but I just start to learn this science? Please, any advices and hints.</p...
habedi/stack-exchange-dataset
65,276
Why do so many 8-Puzzle solving algorithms use DFS instead of BFS?
<p>I see so many 8 Puzzle Solvers use a stack instead of a queue. Why is that? If you are looking for the solution with the fewest number of moves, wouldn't the solution be at a shallower point in the tree, meaning that BFS would find it much quicker? Is there some subtlety to the problem that I'm forgetting that makes...
algorithms graphs search algorithms trees search problem
1
Why do so many 8-Puzzle solving algorithms use DFS instead of BFS? -- (algorithms graphs search algorithms trees search problem) <p>I see so many 8 Puzzle Solvers use a stack instead of a queue. Why is that? If you are looking for the solution with the fewest number of moves, wouldn't the solution be at a shallower poi...
habedi/stack-exchange-dataset
65,280
CRF message passing as convolution operation
<p>I was reading the paper _Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials (Philipp Krähenbül and Vladen Koltun, in Proceedings of 25th Annual Conference on Neural Information Processing Systems (NIPS), 2011 <a href="https://www.robots.ox.ac.uk/%7Evgg/rg/papers/kraehenbuehl__nips2012__densecr...
machine learning computer vision
1
CRF message passing as convolution operation -- (machine learning computer vision) <p>I was reading the paper _Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials (Philipp Krähenbül and Vladen Koltun, in Proceedings of 25th Annual Conference on Neural Information Processing Systems (NIPS), 2011 <a...
habedi/stack-exchange-dataset
65,284
How does "Greedy Stays Ahead" Prove an Optimal Greedy Algorithm?
<p>I have found many proofs online about proving that a greedy algorithm is optimal, specifically within the context of the interval scheduling problem.</p>&#xA;&#xA;<p>On the second page of <a href="http://www.cs.cornell.edu/courses/cs482/2004su/handouts/greedy_ahead.pdf" rel="nofollow">Cornell's Greedy Stays Ahead</a...
algorithms greedy algorithms
1
How does "Greedy Stays Ahead" Prove an Optimal Greedy Algorithm? -- (algorithms greedy algorithms) <p>I have found many proofs online about proving that a greedy algorithm is optimal, specifically within the context of the interval scheduling problem.</p>&#xA;&#xA;<p>On the second page of <a href="http://www.cs.cornell...
habedi/stack-exchange-dataset
65,289
Is there an algorithm or shortcut for continually updating and summing sub-sections of arrays?
<p>Let's say I have an NxN array if integers. I want to continually update it, but also continually query for the sum of an arbitrary sub-section. So example would be as follows:</p>&#xA;<p>We start with a 3x3 array of all 0s.</p>&#xA;<p>Operations:</p>&#xA;<blockquote>&#xA;<p>update 1,1 to 3</p>&#xA;<p>update 1,2 to 1...
algorithms data structures arrays
1
Is there an algorithm or shortcut for continually updating and summing sub-sections of arrays? -- (algorithms data structures arrays) <p>Let's say I have an NxN array if integers. I want to continually update it, but also continually query for the sum of an arbitrary sub-section. So example would be as follows:</p>&#xA...
habedi/stack-exchange-dataset
65,292
BFS implementation: queue vs storing previous and next frontier
<p>The most trivial implementation of BFS would simply store the last frontier (open list), build the new frontier, and then replace the last frontier with the new (like in the example python code below). But almost universally, the first algorithm shown for BFS in textbooks is the queue-based implementation.</p>&#xA;&...
algorithms graphs
1
BFS implementation: queue vs storing previous and next frontier -- (algorithms graphs) <p>The most trivial implementation of BFS would simply store the last frontier (open list), build the new frontier, and then replace the last frontier with the new (like in the example python code below). But almost universally, the ...
habedi/stack-exchange-dataset
65,300
Do quantum logic gates work differently than traditional logic gates?
<p>In a traditional computer calculations are done with logic gates that check inputs with AND gates etc. But in a quantum computer, are calculations performed differently since the qubit can be in states other than 1 or 0?&#xA;I understand that qubits can have values other than 1 and 0, however, before it is used as i...
logic quantum computing
1
Do quantum logic gates work differently than traditional logic gates? -- (logic quantum computing) <p>In a traditional computer calculations are done with logic gates that check inputs with AND gates etc. But in a quantum computer, are calculations performed differently since the qubit can be in states other than 1 or ...
habedi/stack-exchange-dataset
65,312
What is the "Chairman Tree"?
<p>My competitive programming coach told me of a balanced binary tree used by a lot of Chinese competitors that has all the functions of any other balanced binary tree <strong>and is fully persistent</strong> and runs queries and updates in ${O(log^2N)}.$ What information is there on this tree, and does it go by a diff...
data structures trees persistent data structure
1
What is the "Chairman Tree"? -- (data structures trees persistent data structure) <p>My competitive programming coach told me of a balanced binary tree used by a lot of Chinese competitors that has all the functions of any other balanced binary tree <strong>and is fully persistent</strong> and runs queries and updates ...
habedi/stack-exchange-dataset
65,315
Equivalence of two definitions of substitution
<h3>Preliminary definitions</h3>&#xA;&#xA;<p>Barendregt [2004] introduces the following two definitions of substitution and their equivalence:</p>&#xA;&#xA;<ul>&#xA;<li><p>Ottamnn variable convention (p. 26)</p>&#xA;&#xA;<blockquote>&#xA; <p>2.1.13. Ottamnn variable convention. If $M_1, ..., M_n$ occur in a certain ma...
lambda calculus
1
Equivalence of two definitions of substitution -- (lambda calculus) <h3>Preliminary definitions</h3>&#xA;&#xA;<p>Barendregt [2004] introduces the following two definitions of substitution and their equivalence:</p>&#xA;&#xA;<ul>&#xA;<li><p>Ottamnn variable convention (p. 26)</p>&#xA;&#xA;<blockquote>&#xA; <p>2.1.13. O...
habedi/stack-exchange-dataset
65,318
Algorithm for solving incremental max flow problem
<p>I am working on a project where I need to be able to compute the <a href="https://en.wikipedia.org/wiki/Maximum_flow_problem" rel="nofollow">maximum flow</a> between two nodes in a graph after one of the edge weights has been incremented or decremented by 1. The graph is directed and edge weights are all integers. I...
algorithms graphs network flow ford fulkerson
1
Algorithm for solving incremental max flow problem -- (algorithms graphs network flow ford fulkerson) <p>I am working on a project where I need to be able to compute the <a href="https://en.wikipedia.org/wiki/Maximum_flow_problem" rel="nofollow">maximum flow</a> between two nodes in a graph after one of the edge weight...
habedi/stack-exchange-dataset
65,326
Why is the number of states for DFA is 3n + 1 for this language
<p>I'm taking online compilers course. It's long ended, so it wouldn't be cheating to ask a question on quiz here.</p>&#xA;&#xA;<p>Let $S_i$ be the string consisting of $i$ 0's followed by $2i$ 1's. Define the language &#xA;$L_n = \{ S_i | 1 \leq i \leq n \}$. For example,</p>&#xA;&#xA;<p>$L_3 = \{\, 011,\, 001111,\, 0...
regular languages finite automata regular expressions
1
Why is the number of states for DFA is 3n + 1 for this language -- (regular languages finite automata regular expressions) <p>I'm taking online compilers course. It's long ended, so it wouldn't be cheating to ask a question on quiz here.</p>&#xA;&#xA;<p>Let $S_i$ be the string consisting of $i$ 0's followed by $2i$ 1's...
habedi/stack-exchange-dataset
65,330
Decidability of Unary Languages / One-to-One Mapping
<p>I'm trying to prove that there exists an undecidable subset of {1}* by showing a one-to-one correspondence between it and {0, 1}* (which would imply a one-to-one correspondence between their power sets), but I'm struggling with how to do the one-to-one mapping. Isn't it just surjective? That is, there's one unary re...
turing machines undecidability uncountability mapreduce
1
Decidability of Unary Languages / One-to-One Mapping -- (turing machines undecidability uncountability mapreduce) <p>I'm trying to prove that there exists an undecidable subset of {1}* by showing a one-to-one correspondence between it and {0, 1}* (which would imply a one-to-one correspondence between their power sets),...
habedi/stack-exchange-dataset
65,333
Does expert system use algorithms?
<p>I want to build an expert system for analyzing the personality of a number of people and then distribute them in groups , each group will have members with different personalities.</p>&#xA;&#xA;<p>I have been reading about ES a lot but I still confused , does rule-based system enough to build the system, or do I ha...
algorithms artificial intelligence
1
Does expert system use algorithms? -- (algorithms artificial intelligence) <p>I want to build an expert system for analyzing the personality of a number of people and then distribute them in groups , each group will have members with different personalities.</p>&#xA;&#xA;<p>I have been reading about ES a lot but I stil...
habedi/stack-exchange-dataset
65,339
Types and Types Systems concepts
<p><strong>Given this definitions about Types and Type systems :</strong></p>&#xA;<p>Types are described by means of a language of type expressions:</p>&#xA;<ul>&#xA;<li><p><strong>Basic</strong> or <strong>primitive types</strong>: Bool, Char, Int, ...</p>&#xA;</li>&#xA;<li><p>Type <strong>variables</strong>: a, b, c,...
type theory types
1
Types and Types Systems concepts -- (type theory types) <p><strong>Given this definitions about Types and Type systems :</strong></p>&#xA;<p>Types are described by means of a language of type expressions:</p>&#xA;<ul>&#xA;<li><p><strong>Basic</strong> or <strong>primitive types</strong>: Bool, Char, Int, ...</p>&#xA;</...
habedi/stack-exchange-dataset
65,349
What do the terms 'Sample' and 'Sampling' mean in the discussion of Pattern Recognition and Machine Learning?
<p>The tag sampling tells me that,</p>&#xA;&#xA;<blockquote>&#xA; <p>Creating samples from a well-specified population using a&#xA; probabilistic method and/or producing random numbers from a specified&#xA; distribution.</p>&#xA;</blockquote>&#xA;&#xA;<p>Now, the question becomes: what is <code>population</code> the...
sampling
1
What do the terms 'Sample' and 'Sampling' mean in the discussion of Pattern Recognition and Machine Learning? -- (sampling) <p>The tag sampling tells me that,</p>&#xA;&#xA;<blockquote>&#xA; <p>Creating samples from a well-specified population using a&#xA; probabilistic method and/or producing random numbers from a sp...
habedi/stack-exchange-dataset
65,353
Why does the last step of Decompression Transformation of the cited report work?
<p>The report referred in the title is the following:&#xA;<a href="http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-124.pdf" rel="nofollow noreferrer">A Block-sorting Lossless Data Compression Algorithm</a>, by M. Burrows and D.J. Wheeler, SRC Research Report, 1994</p>&#xA;&#xA;<p>The step I do not understand is ste...
algorithms data compression
1
Why does the last step of Decompression Transformation of the cited report work? -- (algorithms data compression) <p>The report referred in the title is the following:&#xA;<a href="http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-124.pdf" rel="nofollow noreferrer">A Block-sorting Lossless Data Compression Algorithm<...
habedi/stack-exchange-dataset
65,356
Best data structure for a queue with random reads?
<p>Well, it's not exactly a queue if it allows for random reads. This question is about a data structure which behaves like a queue for insertions and a sorted dictionary for reads.</p>&#xA;&#xA;<p>Imagine an algorithm that maintains a list of elements so that:</p>&#xA;&#xA;<ol>&#xA;<li>It reads an element from the lis...
data structures dictionaries priority queues
1
Best data structure for a queue with random reads? -- (data structures dictionaries priority queues) <p>Well, it's not exactly a queue if it allows for random reads. This question is about a data structure which behaves like a queue for insertions and a sorted dictionary for reads.</p>&#xA;&#xA;<p>Imagine an algorithm ...
habedi/stack-exchange-dataset
65,359
Is it possible to build a computer that would output $10^{10^{100}}$ symbols and halt, without using ~$10^{100}$ space?
<p>My <a href="https://codegolf.stackexchange.com/questions/97975/output-a-googol-copies-of-a-string">recent question</a> on Programming Puzzles and Code Golf got some fair attention and showed that not only it is very easy to output $10^{100}$ symbols and halt, but actually quite convenient in many programming languag...
complexity theory space complexity
1
Is it possible to build a computer that would output $10^{10^{100}}$ symbols and halt, without using ~$10^{100}$ space? -- (complexity theory space complexity) <p>My <a href="https://codegolf.stackexchange.com/questions/97975/output-a-googol-copies-of-a-string">recent question</a> on Programming Puzzles and Code Golf g...
habedi/stack-exchange-dataset
65,360
Algorithm to efficiently determine whether a magazine contains all the letters in a search string
<p>Title pretty much states the question, I was looking for some assistance with the following:</p>&#xA;&#xA;<p>You are given a search string and a magazine. You seek to generate all the characters in a search string by cutting them out form the magazine. Give an algorithm to efficiently determine whether a magazine co...
algorithms search algorithms
1
Algorithm to efficiently determine whether a magazine contains all the letters in a search string -- (algorithms search algorithms) <p>Title pretty much states the question, I was looking for some assistance with the following:</p>&#xA;&#xA;<p>You are given a search string and a magazine. You seek to generate all the c...
habedi/stack-exchange-dataset
65,375
Is "Find a Steiner Tree of cost < K" NP-hard?
<p>Finding the minimum Steiner tree is well known NP-hard.&#xA;It seems obviois that asking "find a Steiner tree of cost &lt; K" has to be NP hard, because I could solve the original problem by repetedly calling an algorithm that solves the second. But is this "repeteadly call"/loop a valid reduction? There seems to be...
np complete reductions np hard
1
Is "Find a Steiner Tree of cost < K" NP-hard? -- (np complete reductions np hard) <p>Finding the minimum Steiner tree is well known NP-hard.&#xA;It seems obviois that asking "find a Steiner tree of cost &lt; K" has to be NP hard, because I could solve the original problem by repetedly calling an algorithm that solves t...
habedi/stack-exchange-dataset
65,383
Programming language semantics prototyping tool
<p>Is there any tool for prototyping a programming language semantics and type system and that also allows for some sort of <em>model checking</em> of standard properties, like type soundness? </p>&#xA;&#xA;<p>I'm asking this, because I'm reading a book on <a href="http://alloy.mit.edu/alloy/">Alloy</a> and it provides...
reference request programming languages semantics model checking
1
Programming language semantics prototyping tool -- (reference request programming languages semantics model checking) <p>Is there any tool for prototyping a programming language semantics and type system and that also allows for some sort of <em>model checking</em> of standard properties, like type soundness? </p>&#xA;...
habedi/stack-exchange-dataset
65,390
sum of squared distances from mean equals all-pairs sum of square distances?
<p>In this <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.144.9253" rel="nofollow noreferrer">variance based k-clustering paper</a> they claim that for a cluster with S points:</p>&#xA;&#xA;<p>$$|S|\sum_{i \in S}{\|x_i-\bar{x}\|^2} = \sum_{a,b \in S,\ a&lt;b}{\|x_a-x_b\|^2}\,.$$</p>&#xA;&#xA;<p>Why is...
clustering
1
sum of squared distances from mean equals all-pairs sum of square distances? -- (clustering) <p>In this <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.144.9253" rel="nofollow noreferrer">variance based k-clustering paper</a> they claim that for a cluster with S points:</p>&#xA;&#xA;<p>$$|S|\sum_{i \in...
habedi/stack-exchange-dataset
65,391
Applications of Graph Automorphisms
<p>I've seen the topic of the automorphism group appear in several introductory graph theory books I've looked at. It always feel oddly disjointed and poorly motivated to me.</p>&#xA;&#xA;<p>Is there any practical (or impractical for that matter) applications of knowing the automorphism group of a graph?</p>&#xA;
graphs group theory
1
Applications of Graph Automorphisms -- (graphs group theory) <p>I've seen the topic of the automorphism group appear in several introductory graph theory books I've looked at. It always feel oddly disjointed and poorly motivated to me.</p>&#xA;&#xA;<p>Is there any practical (or impractical for that matter) applications...
habedi/stack-exchange-dataset
65,392
Lambda Calculus Prove Equality Excessive (Haskell-oriented)
<p>I'm on a lambda calculus with parametric polymorphism a la Hindley-Milner Haskell-oriented course and I'm currently facing this exercise which I got stuck on.</p>&#xA;&#xA;<p>Prove that $(\forall m\downarrow, n\downarrow :: N)\space (m+n)-m=n$</p>&#xA;&#xA;<p>Definitions:</p>&#xA;&#xA;<p>$(+)=\backslash m \space n \...
proof techniques lambda calculus functional programming
1
Lambda Calculus Prove Equality Excessive (Haskell-oriented) -- (proof techniques lambda calculus functional programming) <p>I'm on a lambda calculus with parametric polymorphism a la Hindley-Milner Haskell-oriented course and I'm currently facing this exercise which I got stuck on.</p>&#xA;&#xA;<p>Prove that $(\forall ...
habedi/stack-exchange-dataset
65,395
Understanding why ALL_nfa is in co-nspace
<p>I'm trying to understand Sipser's example showing that $ALL_{nfa} \in Co-NSPACE(n)$, where $$ALL_{nfa} = \{ &lt;A&gt; | A \text{ is an NFA such that } L(A) = \Sigma^*\}.$$</p>&#xA;&#xA;<p>The algorithm can be seen <a href="https://books.google.ca/books?id=X0puCgAAQBAJ&amp;lpg=PA336&amp;ots=oWGVPz4jbZ&amp;dq=all_nfa%...
complexity theory space complexity nondeterminism
1
Understanding why ALL_nfa is in co-nspace -- (complexity theory space complexity nondeterminism) <p>I'm trying to understand Sipser's example showing that $ALL_{nfa} \in Co-NSPACE(n)$, where $$ALL_{nfa} = \{ &lt;A&gt; | A \text{ is an NFA such that } L(A) = \Sigma^*\}.$$</p>&#xA;&#xA;<p>The algorithm can be seen <a hre...
habedi/stack-exchange-dataset
65,397
finding a & b in an array that a+b = x, for a given integer x
<p>I want to get an algorithm with $\theta(nlogn)$ time complexity that search for two elements in an array of integers, which their sum is equal to $x$ such that x is an integer and $n$ is array size. </p>&#xA;
algorithms data structures search algorithms algorithm design
1
finding a & b in an array that a+b = x, for a given integer x -- (algorithms data structures search algorithms algorithm design) <p>I want to get an algorithm with $\theta(nlogn)$ time complexity that search for two elements in an array of integers, which their sum is equal to $x$ such that x is an integer and $n$ is a...
habedi/stack-exchange-dataset
65,400
Question about labeling in Dijkstra's Proof of Correctness
<p>I am trying to understand the proof of correctness for Dijkstra's algorithm (shown below) and also at the following link: <a href="https://www.cs.auckland.ac.nz/software/AlgAnim/dij-proof.html" rel="nofollow noreferrer">CS Auskland</a></p>&#xA;&#xA;<blockquote>&#xA; <p>Proof by contradiction</p>&#xA; &#xA; <p>Sup...
algorithms graphs
1
Question about labeling in Dijkstra's Proof of Correctness -- (algorithms graphs) <p>I am trying to understand the proof of correctness for Dijkstra's algorithm (shown below) and also at the following link: <a href="https://www.cs.auckland.ac.nz/software/AlgAnim/dij-proof.html" rel="nofollow noreferrer">CS Auskland</a>...
habedi/stack-exchange-dataset
65,401
Proof of the undecidability of the Halting Problem
<p>I'm having trouble understanding the proof of the undecidability of the Halting Problem.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/1Byze.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/1Byze.jpg" alt="http://computing.guide/wp-content/uploads/2014/12/HaltingProblem1.jpg"></a></p>&#xA;&#xA;<p>If $H...
computability turing machines
1
Proof of the undecidability of the Halting Problem -- (computability turing machines) <p>I'm having trouble understanding the proof of the undecidability of the Halting Problem.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/1Byze.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/1Byze.jpg" alt="http://comp...
habedi/stack-exchange-dataset
65,403
Is the set cover problem NP-complete when the cardinality of the collection of sets is equal to the cardinality of the universe?
<p>In the set cover (SC) problem we are given a universe $U$ (a set) of $n$ elements and a collection $S$ of $m$ sets whose union equals the universe. The set cover problem is to identify the smallest sub-collection of $S$ whose union equals the universe. </p>&#xA;&#xA;<p>If I add the constraint that $m=n$ to SC, is t...
complexity theory np complete reductions
1
Is the set cover problem NP-complete when the cardinality of the collection of sets is equal to the cardinality of the universe? -- (complexity theory np complete reductions) <p>In the set cover (SC) problem we are given a universe $U$ (a set) of $n$ elements and a collection $S$ of $m$ sets whose union equals the uni...
habedi/stack-exchange-dataset
65,410
Skip List randomization complexity
<p>I understand the basics of Skip Lists and their implementation also the basic <code>Search</code> <code>Insert</code> <code>Delete</code> functions and their run time complexity. Recently after a lecture, a professor proposed an interesting question. He asked what we suspected the total time building a skip list usi...
algorithm analysis data structures runtime analysis lists
1
Skip List randomization complexity -- (algorithm analysis data structures runtime analysis lists) <p>I understand the basics of Skip Lists and their implementation also the basic <code>Search</code> <code>Insert</code> <code>Delete</code> functions and their run time complexity. Recently after a lecture, a professor pr...
habedi/stack-exchange-dataset
65,411
Computability of Stack Cleanliness
<p><a href="https://github.com/DJMcMayhem/Brain-Flak" rel="nofollow noreferrer">Brain-Flak</a> is a minimalistic, stack-based, Turing complete, esoteric programming language. </p>&#xA;&#xA;<p>A big concern among Brain-Flak enthusiasts is a concept informally called "stack cleanliness". </p>&#xA;&#xA;<p>The basic idea ...
computability turing machines programming languages
1
Computability of Stack Cleanliness -- (computability turing machines programming languages) <p><a href="https://github.com/DJMcMayhem/Brain-Flak" rel="nofollow noreferrer">Brain-Flak</a> is a minimalistic, stack-based, Turing complete, esoteric programming language. </p>&#xA;&#xA;<p>A big concern among Brain-Flak enthu...
habedi/stack-exchange-dataset
65,417
Relation between Machine code and Von Neumann architecture
<p>Since machine language executes instructions on ALU, CPU register and memory, is correct say that <strong>machine code abstract the Von Neumann model</strong>?</p>&#xA;&#xA;<p>If exists, semantically, what is the relation between machine code and Von Neumann architecture?</p>&#xA;
computer architecture computation models
1
Relation between Machine code and Von Neumann architecture -- (computer architecture computation models) <p>Since machine language executes instructions on ALU, CPU register and memory, is correct say that <strong>machine code abstract the Von Neumann model</strong>?</p>&#xA;&#xA;<p>If exists, semantically, what is the...
habedi/stack-exchange-dataset
65,422
Programming Symbols : Instance/Instantiation
<p>Is there a generally accepted symbol for indicating instantiation. That is indicating an object is an instance of a class.</p>&#xA;&#xA;<p>My first guess is to use a left arrow with a double or triple line but this seems more like a functional programming symbol, based upon what I've seen of Haskell.</p>&#xA;&#xA;<p...
programming languages semantics notation
1
Programming Symbols : Instance/Instantiation -- (programming languages semantics notation) <p>Is there a generally accepted symbol for indicating instantiation. That is indicating an object is an instance of a class.</p>&#xA;&#xA;<p>My first guess is to use a left arrow with a double or triple line but this seems more ...
habedi/stack-exchange-dataset
65,426
Is $L / R$ context free?
<p>I was reviewing the post <a href="https://cs.stackexchange.com/questions/1886/if-l-is-context-free-and-r-is-regular-then-l-r-is-context-free">If $L$ is context-free and $R$ is regular, then $L / R$ is context-free?</a></p>&#xA;&#xA;<p>I completely understand why $L/R$ is context free. </p>&#xA;&#xA;<p>I just tried ...
context free automata pushdown automata
1
Is $L / R$ context free? -- (context free automata pushdown automata) <p>I was reviewing the post <a href="https://cs.stackexchange.com/questions/1886/if-l-is-context-free-and-r-is-regular-then-l-r-is-context-free">If $L$ is context-free and $R$ is regular, then $L / R$ is context-free?</a></p>&#xA;&#xA;<p>I completel...
habedi/stack-exchange-dataset
65,428
How to construct CFG for language
<p>We have alphabet $\Sigma = \{ { a, b} \} $.</p>&#xA;&#xA;<p>How to construct CFG for language $\Sigma^{\ast} - \{a^{n}b^{n} | n \ge 0 \}$.</p>&#xA;&#xA;<p>I suggest that is very easy, but I can't invent. I know PDA for this language if it can help.</p>&#xA;
context free
1
How to construct CFG for language -- (context free) <p>We have alphabet $\Sigma = \{ { a, b} \} $.</p>&#xA;&#xA;<p>How to construct CFG for language $\Sigma^{\ast} - \{a^{n}b^{n} | n \ge 0 \}$.</p>&#xA;&#xA;<p>I suggest that is very easy, but I can't invent. I know PDA for this language if it can help.</p>&#xA;
habedi/stack-exchange-dataset
65,433
Distinction between statements, declarations, and expressions in formal grammar
<p>I am learning basic grammar and parsing concepts and ran into this statement:</p>&#xA;&#xA;<blockquote>&#xA; <p>Nonterminal symbols represent syntactic entities: statements, declarations, or expressions.</p>&#xA;</blockquote>&#xA;&#xA;<p>But the three terms (statements, declarations, expressions) were not really de...
formal languages formal grammars
1
Distinction between statements, declarations, and expressions in formal grammar -- (formal languages formal grammars) <p>I am learning basic grammar and parsing concepts and ran into this statement:</p>&#xA;&#xA;<blockquote>&#xA; <p>Nonterminal symbols represent syntactic entities: statements, declarations, or express...
habedi/stack-exchange-dataset
65,440
What does it mean to "strengthen the precondition and weaken the postcondition" in Hoare logic?
<p>Having learned a rough summary of Hoare logic (i.e. learning just the basic concept of Hoare triples and a few of the rules) I kept seeing a statement along these lines:</p>&#xA;&#xA;<blockquote>&#xA; <p>The rule of consquence allows us to strengthen the precondition and weaken the postcondition. (paraphrased)</p>&...
correctness proof semantics hoare logic
1
What does it mean to "strengthen the precondition and weaken the postcondition" in Hoare logic? -- (correctness proof semantics hoare logic) <p>Having learned a rough summary of Hoare logic (i.e. learning just the basic concept of Hoare triples and a few of the rules) I kept seeing a statement along these lines:</p>&#x...
habedi/stack-exchange-dataset
65,441
From NFA to DFA
<p>Let $A = (Q,Σ,\delta,q_0,F)$ be an NFA such that $L = L(A)$. </p>&#xA;&#xA;<p>We define a DFA $A'=(Q',Σ,\delta,q_0',F')$ as:&#xA;$$ &#xA;Q'=2^Q, \qquad q_0'=\{q_0\}\\F'=\{q\in Q \mid q'\cap F \neq\emptyset\}&#xA;$$&#xA;My question is how we know what elements $Q'$ has? What is the formal definition to obtain these e...
automata finite automata
1
From NFA to DFA -- (automata finite automata) <p>Let $A = (Q,Σ,\delta,q_0,F)$ be an NFA such that $L = L(A)$. </p>&#xA;&#xA;<p>We define a DFA $A'=(Q',Σ,\delta,q_0',F')$ as:&#xA;$$ &#xA;Q'=2^Q, \qquad q_0'=\{q_0\}\\F'=\{q\in Q \mid q'\cap F \neq\emptyset\}&#xA;$$&#xA;My question is how we know what elements $Q'$ has? W...
habedi/stack-exchange-dataset
65,460
Dynamic Programming Help
<p>Sometimes I can see the recurrence relationship and other times I cannot. This is one of those times. I've gone through a few iterations of trying to solve it but I also find a set of values where my idea fails. If I go exponenetial I can figure it out... but that's a specific no-no.</p>&#xA;&#xA;<p>I'm good with nu...
algorithms dynamic programming
1
Dynamic Programming Help -- (algorithms dynamic programming) <p>Sometimes I can see the recurrence relationship and other times I cannot. This is one of those times. I've gone through a few iterations of trying to solve it but I also find a set of values where my idea fails. If I go exponenetial I can figure it out... ...
habedi/stack-exchange-dataset
65,469
Comparing 2 video files
<p>I have a bunch of <code>wmv</code> files (~300), named the following way: <code>video1.wmv -&gt; videox.wmv</code>. Some of these video files, are exact duplicates of one another (same format, same bitrate, same length, basically, they were copied and renamed, so the only thing that differs from them is their name)....
comparison video
1
Comparing 2 video files -- (comparison video) <p>I have a bunch of <code>wmv</code> files (~300), named the following way: <code>video1.wmv -&gt; videox.wmv</code>. Some of these video files, are exact duplicates of one another (same format, same bitrate, same length, basically, they were copied and renamed, so the onl...
habedi/stack-exchange-dataset
65,470
How to calculate the efficiency of an algorithm?
<p>So I was given this algorithm to compute the efficieny in which I found sorts an array into ascending order.</p>&#xA;&#xA;<pre><code>solvethis(T[1..n])&#xA; for i = 1 to n-1 do //n&#xA; minJ = i //n-1&#xA; minX = T[i] //n-1&#xA; for j = i+1 to n do //sum_{i=1}^{n} t&#xA; ...
algorithms
1
How to calculate the efficiency of an algorithm? -- (algorithms) <p>So I was given this algorithm to compute the efficieny in which I found sorts an array into ascending order.</p>&#xA;&#xA;<pre><code>solvethis(T[1..n])&#xA; for i = 1 to n-1 do //n&#xA; minJ = i //n-1&#xA; minX = T[i] ...
habedi/stack-exchange-dataset
65,472
Understanding this answer: A CFG defines a language as a the smallest solution to a system of language equations
<p>Statement comes from <a href="https://cs.stackexchange.com/a/22298/53824">this answer</a>. A blanket statement that this is a well-known fact is made in <a href="https://cs.stackexchange.com/questions/57570/context-free-grammar-as-minimal-solution-of-a-system-of-equations">this other question</a>.</p>&#xA;&#xA;<p>I ...
formal languages formal grammars
1
Understanding this answer: A CFG defines a language as a the smallest solution to a system of language equations -- (formal languages formal grammars) <p>Statement comes from <a href="https://cs.stackexchange.com/a/22298/53824">this answer</a>. A blanket statement that this is a well-known fact is made in <a href="http...
habedi/stack-exchange-dataset
65,477
An imperative program is analogous to how a Turing machine works?
<p>Since Turing machines has great influence on typical hardware architecture (Von Neumann) and both uses concept of state, is correct to say that <strong>an imperative program is analogous to how a Turing machine works</strong>?</p>&#xA;&#xA;<blockquote>&#xA; <p>“Computability via Turing machines gave rise to imperat...
turing machines computer architecture imperative programming
1
An imperative program is analogous to how a Turing machine works? -- (turing machines computer architecture imperative programming) <p>Since Turing machines has great influence on typical hardware architecture (Von Neumann) and both uses concept of state, is correct to say that <strong>an imperative program is analogou...
habedi/stack-exchange-dataset
65,486
proving " if $k\log(k) = \theta (n)$ then $k = \theta (\frac{n}{\log(n)})$"
<p>First i began with the definition of $\theta$ as below:&#xA;$c_1n \leq k \log(k) \leq c_2n \implies c_1\frac{n}{logk} \leq k \leq c_2\frac{n}{logk}$&#xA;and we also know if $k\log(k) = \theta (n)$ then $k = O(n)$ then $k \leq cn$ thus $c\frac{n}{logn} \leq c_1\frac{n}{logk}\leq k $ and thus $k = \omega(\frac{n}{\lo...
asymptotics recurrence relation
1
proving " if $k\log(k) = \theta (n)$ then $k = \theta (\frac{n}{\log(n)})$" -- (asymptotics recurrence relation) <p>First i began with the definition of $\theta$ as below:&#xA;$c_1n \leq k \log(k) \leq c_2n \implies c_1\frac{n}{logk} \leq k \leq c_2\frac{n}{logk}$&#xA;and we also know if $k\log(k) = \theta (n)$ then $...
habedi/stack-exchange-dataset
65,491
Recognizing vs Deciding in defining class BPP
<p>In Sipser's text, he writes:</p>&#xA;&#xA;<blockquote>&#xA; <p>When a probabilistic Turning machine recognizes a language, it must&#xA; accept all strings in the language and reject all strings not in the&#xA; language as usual, except that now we allow the machine a small&#xA; probability of error.</p>&#xA;</bl...
complexity theory turing machines decision problem probabilistic algorithms
1
Recognizing vs Deciding in defining class BPP -- (complexity theory turing machines decision problem probabilistic algorithms) <p>In Sipser's text, he writes:</p>&#xA;&#xA;<blockquote>&#xA; <p>When a probabilistic Turning machine recognizes a language, it must&#xA; accept all strings in the language and reject all st...
habedi/stack-exchange-dataset
65,495
Find expression with minimal distance to target
<p>I will start of with an informal example and give a more formal problem definition later.</p>&#xA;&#xA;<p>Say I have a finite set of positive real values: $\{2.3, \pi, 4.382, 0.3\}$. Using normal addition and multiplication, we can construct expressions like $(\pi + 2.3) * 0.3 + 4.382$ and $(0.3 + \pi) * (2.3 + 4.38...
complexity theory optimization
1
Find expression with minimal distance to target -- (complexity theory optimization) <p>I will start of with an informal example and give a more formal problem definition later.</p>&#xA;&#xA;<p>Say I have a finite set of positive real values: $\{2.3, \pi, 4.382, 0.3\}$. Using normal addition and multiplication, we can c...
habedi/stack-exchange-dataset
65,496
Algorithm for converting (coordinates + reach radius) data to directed graph
<p>I am trying to find a solution better than O(n<sup>2</sup>) for the following problem: </p>&#xA;&#xA;<p>There are N points on a 2-D plane (N $\le$ 10<sup>6</sup>), with integer coordinates between -10<sup>5</sup> and 10<sup>5</sup>. Each point has an associated integer "reach radius" R<sub>i</sub> (0 &lt; R<sub>i</s...
algorithms complexity theory divide and conquer
1
Algorithm for converting (coordinates + reach radius) data to directed graph -- (algorithms complexity theory divide and conquer) <p>I am trying to find a solution better than O(n<sup>2</sup>) for the following problem: </p>&#xA;&#xA;<p>There are N points on a 2-D plane (N $\le$ 10<sup>6</sup>), with integer coordinate...
habedi/stack-exchange-dataset
65,497
Applicability of Machine Learning on Images.
<p>I am trying to use machine learning to detect and locate an object in a greyscale image. I have about 700 images which are 360x360 pixels in size. &#xA;See below for an example of the object and image:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/oOx1W.png" rel="nofollow noreferrer"><img src="https://i.stack.i...
machine learning image processing
1
Applicability of Machine Learning on Images. -- (machine learning image processing) <p>I am trying to use machine learning to detect and locate an object in a greyscale image. I have about 700 images which are 360x360 pixels in size. &#xA;See below for an example of the object and image:</p>&#xA;&#xA;<p><a href="https:...
habedi/stack-exchange-dataset
65,500
Term for members of a class that are not inherited
<p>Is there an explicit term for a member of a class that is not inherited from any parent class?</p>&#xA;&#xA;<pre><code>class Vehicle {&#xA; int weight;&#xA;}&#xA;&#xA;class Car extends Vehicle {&#xA; int numDoors;&#xA;}&#xA;&#xA;Car car = new Car();&#xA;car.weight = 10000; // weight is an "inherited member"&#x...
terminology object oriented
1
Term for members of a class that are not inherited -- (terminology object oriented) <p>Is there an explicit term for a member of a class that is not inherited from any parent class?</p>&#xA;&#xA;<pre><code>class Vehicle {&#xA; int weight;&#xA;}&#xA;&#xA;class Car extends Vehicle {&#xA; int numDoors;&#xA;}&#xA;&#x...
habedi/stack-exchange-dataset
65,502
Why is the complement of SAT in IP?
<p>It is mentioned in Sipser's text that the complement of <strong>SAT</strong> is in $IP$, before $IP$ is formally introduced. After looking at the definition and some of the results, I still don't see why this is the case.</p>&#xA;&#xA;<p>Is this supposed to be seen directly? Or is it easier to show that it is in $NP...
complexity theory satisfiability space complexity interactive proof systems
1
Why is the complement of SAT in IP? -- (complexity theory satisfiability space complexity interactive proof systems) <p>It is mentioned in Sipser's text that the complement of <strong>SAT</strong> is in $IP$, before $IP$ is formally introduced. After looking at the definition and some of the results, I still don't see ...
habedi/stack-exchange-dataset
65,503
Calculating positions of nodes relative to a known point
<p>If I know all the distances between a set of nodes and I also know that one of the nodes is at location (0,0), using the distances between the nodes, can I calculate the absolute positions between all of the nodes? I feel that this will involve some form of trilateration but only a single node position is known. Wil...
algorithms computational geometry
1
Calculating positions of nodes relative to a known point -- (algorithms computational geometry) <p>If I know all the distances between a set of nodes and I also know that one of the nodes is at location (0,0), using the distances between the nodes, can I calculate the absolute positions between all of the nodes? I feel...
habedi/stack-exchange-dataset
65,519
$\{0,1\}^*$ vs $\{0,1\}^+$ vs $(0 \cup 1)^*$
<p>I understand that $(0 U 1)^*$ is the set of all binary strings. However, what do the other two expressions create?</p>&#xA;&#xA;<p>Could someone please provide examples of what strings these languages would accept?</p>&#xA;&#xA;<p>$L = \{0,1\}^*$</p>&#xA;&#xA;<p>$L = \{0,1\}^+$</p>&#xA;
formal languages regular languages regular expressions
1
$\{0,1\}^*$ vs $\{0,1\}^+$ vs $(0 \cup 1)^*$ -- (formal languages regular languages regular expressions) <p>I understand that $(0 U 1)^*$ is the set of all binary strings. However, what do the other two expressions create?</p>&#xA;&#xA;<p>Could someone please provide examples of what strings these languages would acce...
habedi/stack-exchange-dataset
65,522
What is a recursion for Huffman encoding?
<p>If I had to write the Huffman encoding as a recursion in terms of the cost $C_{ij}$, given weights/frequencies $W = [w_1,\ldots,w_n]$, how would I do it? (where this is creating a minimum cost tree, $C = \sum_i w_i \cdot \mathrm{depth}_i$). </p>&#xA;&#xA;<p>I am going off of Dasgupta's Huffman procedure:</p>&#xA;&#x...
algorithms recursion huffman coding
1
What is a recursion for Huffman encoding? -- (algorithms recursion huffman coding) <p>If I had to write the Huffman encoding as a recursion in terms of the cost $C_{ij}$, given weights/frequencies $W = [w_1,\ldots,w_n]$, how would I do it? (where this is creating a minimum cost tree, $C = \sum_i w_i \cdot \mathrm{depth...
habedi/stack-exchange-dataset
65,526
Help with a difficult expected runtime recurrence
<p>I developed an algorithm and have a recurrence for its runtime; I want to show the expected runtime is <span class="math-container">$O(\sqrt{n})$</span>.</p>&#xA;<p>At each iteration <span class="math-container">$i$</span>, I have a random variable <span class="math-container">$k_i$</span> that is equal to the numbe...
algorithm analysis runtime analysis recurrence relation randomized algorithms
1
Help with a difficult expected runtime recurrence -- (algorithm analysis runtime analysis recurrence relation randomized algorithms) <p>I developed an algorithm and have a recurrence for its runtime; I want to show the expected runtime is <span class="math-container">$O(\sqrt{n})$</span>.</p>&#xA;<p>At each iteration <...
habedi/stack-exchange-dataset
65,534
Hash functions and pathological data sets
<p>So I'm watching an Algorithms course in Coursera, and we are currently discussing hash tables. He's talking about the importance of a good hash function, and about how an ideal hash function would be a "super clever hash function guaranteed to spread every data set evenly".</p>&#xA;&#xA;<p>Then, he explains that the...
hash tables hashing
1
Hash functions and pathological data sets -- (hash tables hashing) <p>So I'm watching an Algorithms course in Coursera, and we are currently discussing hash tables. He's talking about the importance of a good hash function, and about how an ideal hash function would be a "super clever hash function guaranteed to spread...
habedi/stack-exchange-dataset
65,535
Growing a set given constraints
<p>I am trying to solve the following:</p>&#xA;&#xA;<p>Given a set $S_0$, find min $|S|$ where $S_0 \subseteq S$ subject to:</p>&#xA;&#xA;<p>$\forall s \in S$ $\exists$ $s_a, s_b \in S $ $|$ $ ( s_a \neq s, s_b\neq s ) \land ( s = s_a + s_b \lor s = 1 \lor s=2 ) $</p>&#xA;&#xA;<p>Or in english, forall s in S there exis...
optimization discrete mathematics set cover
1
Growing a set given constraints -- (optimization discrete mathematics set cover) <p>I am trying to solve the following:</p>&#xA;&#xA;<p>Given a set $S_0$, find min $|S|$ where $S_0 \subseteq S$ subject to:</p>&#xA;&#xA;<p>$\forall s \in S$ $\exists$ $s_a, s_b \in S $ $|$ $ ( s_a \neq s, s_b\neq s ) \land ( s = s_a + s_...
habedi/stack-exchange-dataset
65,538
Prove NP-completeness for union of NP-complete language and language in P
<p>Given disjoint languages $X$ and $Y$, where $X$ is NP-complete and $Y\in P$ , how do I prove that $X\cup Y$ is NP-complete?</p>&#xA;&#xA;<p>My idea is to prove that $(X\cup Y)\in NP$ and then prove that $X\cup Y$ is NP-hard:</p>&#xA;&#xA;<p>I can prove $(X\cup Y)\in NP$ by saying that since both are in NP, they each...
complexity theory np complete np
1
Prove NP-completeness for union of NP-complete language and language in P -- (complexity theory np complete np) <p>Given disjoint languages $X$ and $Y$, where $X$ is NP-complete and $Y\in P$ , how do I prove that $X\cup Y$ is NP-complete?</p>&#xA;&#xA;<p>My idea is to prove that $(X\cup Y)\in NP$ and then prove that $X...
habedi/stack-exchange-dataset
65,545
Comparing two recurrence relations w.r.t. asymptotic growth
<p>I have two functions $T_1(n),T_2(n)$. How do I decide which is asymptotically faster?</p>&#xA;&#xA;<p>One is given by the recurrence relation</p>&#xA;&#xA;<p>$$ T_1(n) = \sqrt{n} T_1(\sqrt{n}) + 3 n, \quad T_1(1) = T_1(2) = 1. $$</p>&#xA;&#xA;<p>The other is given by the recurrence relation</p>&#xA;&#xA;<p>$$ T_2(n)...
asymptotics recurrence relation
1
Comparing two recurrence relations w.r.t. asymptotic growth -- (asymptotics recurrence relation) <p>I have two functions $T_1(n),T_2(n)$. How do I decide which is asymptotically faster?</p>&#xA;&#xA;<p>One is given by the recurrence relation</p>&#xA;&#xA;<p>$$ T_1(n) = \sqrt{n} T_1(\sqrt{n}) + 3 n, \quad T_1(1) = T_1(2...
habedi/stack-exchange-dataset
65,548
Is it enough to show the number of steps for certain values of $n$ in order to state an algorithm's complexity?
<p>If I can easily state the number of steps for an algorithms for certain values of $n$, e.g. for $n = 2^k$, where $k$ is a whole number, the number of steps is $n\log n$, is this enough to allow me to state the complexity is amortized $O(n\log n)$?</p>&#xA;&#xA;<p>I have a tree building algorithm - when adding elemen...
algorithm analysis asymptotics runtime analysis
1
Is it enough to show the number of steps for certain values of $n$ in order to state an algorithm's complexity? -- (algorithm analysis asymptotics runtime analysis) <p>If I can easily state the number of steps for an algorithms for certain values of $n$, e.g. for $n = 2^k$, where $k$ is a whole number, the number of st...
habedi/stack-exchange-dataset
65,549
Lower-order term constraints and wrong guess
<p>I'm a self-taught and I'm studying from CLRS.&#xA;I'm having difficulty with this recurrence relation:&#xA;$$T(n)=3T\left(\left\lfloor\frac{n}{2}\right\rfloor\right) + n$$</p>&#xA;&#xA;<p>The problem is that I can "prove" that $T(n) = \mathcal{O}(n)$. It's absurd.&#xA;My inductive hypothesis about $\mathcal{O}(n)$ i...
time complexity recurrence relation
1
Lower-order term constraints and wrong guess -- (time complexity recurrence relation) <p>I'm a self-taught and I'm studying from CLRS.&#xA;I'm having difficulty with this recurrence relation:&#xA;$$T(n)=3T\left(\left\lfloor\frac{n}{2}\right\rfloor\right) + n$$</p>&#xA;&#xA;<p>The problem is that I can "prove" that $T(n...
habedi/stack-exchange-dataset
65,557
$\mathsf{PP=RP}$ consequences
<p>We know $$\mathsf{PP=RP},\mathsf{coPP=coRP},\mathsf{PP=coPP=coRP=RP=ZPP=BPP\subseteq P/poly}$$ are equivalent and the polynomial hierarchy collapses to $2$nd level.</p>&#xA;&#xA;<p>What are the other non-trivial collapses and consequences?</p>&#xA;
complexity theory complexity classes
1
$\mathsf{PP=RP}$ consequences -- (complexity theory complexity classes) <p>We know $$\mathsf{PP=RP},\mathsf{coPP=coRP},\mathsf{PP=coPP=coRP=RP=ZPP=BPP\subseteq P/poly}$$ are equivalent and the polynomial hierarchy collapses to $2$nd level.</p>&#xA;&#xA;<p>What are the other non-trivial collapses and consequences?</p>&#...
habedi/stack-exchange-dataset
65,568
Why is the time complexity of insertion sort not brought down even if we use binary search for the comparisons?
<p>There are two factors that decide the running time of the insertion sort algorithm:<br />&#xA;the number of comparisons, and the number of movements.<br />&#xA;In the case of number of comparisons, the sorted part (left side of <span class="math-container">$j$</span>) of the array is searched linearly for the right ...
algorithms time complexity sorting binary search
1
Why is the time complexity of insertion sort not brought down even if we use binary search for the comparisons? -- (algorithms time complexity sorting binary search) <p>There are two factors that decide the running time of the insertion sort algorithm:<br />&#xA;the number of comparisons, and the number of movements.<b...
habedi/stack-exchange-dataset
65,583
Assigning a unique representation to equivalent circular queues
<p>First, a few vague definitions:</p>&#xA;&#xA;<p><strong>Circular queues</strong> (or circular buffers) are data structures like normal queues but with their ends connected together (forming a "circle").&#xA;<a href="https://en.wikipedia.org/wiki/Circular_buffer" rel="nofollow noreferrer">wikipedia</a></p>&#xA;&#xA;<...
data structures strings queues
1
Assigning a unique representation to equivalent circular queues -- (data structures strings queues) <p>First, a few vague definitions:</p>&#xA;&#xA;<p><strong>Circular queues</strong> (or circular buffers) are data structures like normal queues but with their ends connected together (forming a "circle").&#xA;<a href="h...
habedi/stack-exchange-dataset
65,593
Can we do better than $O(n\log n)$ building a balanced binary tree?
<p>I'm (foolishly it turns out) confident that the answer to this question is no. So why am I asking?</p>&#xA;&#xA;<p>Because Dr. Aleksandar Prokopec at EPFL in his parallel programming course introduces a data-structure for which he asserts various properties. If these properties hold then it seems <em>to me</em> that...
complexity theory algorithm analysis data structures time complexity search trees
1
Can we do better than $O(n\log n)$ building a balanced binary tree? -- (complexity theory algorithm analysis data structures time complexity search trees) <p>I'm (foolishly it turns out) confident that the answer to this question is no. So why am I asking?</p>&#xA;&#xA;<p>Because Dr. Aleksandar Prokopec at EPFL in his ...
habedi/stack-exchange-dataset
65,600
Heuristic algorithms for the dense assignment problem
<p>Given a dense assignment problem ($n$ tasks assigned to $n$ workers, where each worker can do any one of the tasks), I understand the best complexity is $O(n^3)$, using the Hungarian Algorithm or variants.</p>&#xA;&#xA;<p>However, if $n$ is large, $O(n^3)$ may not be feasible from a timing perspective. Moreover, sto...
optimization approximation heuristics assignment problem
1
Heuristic algorithms for the dense assignment problem -- (optimization approximation heuristics assignment problem) <p>Given a dense assignment problem ($n$ tasks assigned to $n$ workers, where each worker can do any one of the tasks), I understand the best complexity is $O(n^3)$, using the Hungarian Algorithm or varia...
habedi/stack-exchange-dataset
65,604
Why are these FIRST sets not combined into a single set?
<p>In Sebesta's <em>Concepts of Programming Languages 10th edition</em> on page 189 he explains the concept of <span class="math-container">$\text{FIRST}$</span> sets using the following example:</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$A \rightarrow aB \ | \ bAb \ | \ Bb$</span></p>&#xA;<p><span class...
formal grammars compilers
1
Why are these FIRST sets not combined into a single set? -- (formal grammars compilers) <p>In Sebesta's <em>Concepts of Programming Languages 10th edition</em> on page 189 he explains the concept of <span class="math-container">$\text{FIRST}$</span> sets using the following example:</p>&#xA;<blockquote>&#xA;<p><span cl...
habedi/stack-exchange-dataset
65,605
Finding alternative way of combinatorial counting
<p>The question is related to databases:</p>&#xA;&#xA;<blockquote>&#xA; <p>There is a relation $R(A_1,A_2,...,A_n)$. Every $(n-2)$ attributes of $R$ forms candidate key. Number of superkeys of $R$ are?</p>&#xA;</blockquote>&#xA;&#xA;<p>I thought if any one of the $(n-2)$ attribute combinations is chosen then the numbe...
combinatorics database theory counting word combinatorics
1
Finding alternative way of combinatorial counting -- (combinatorics database theory counting word combinatorics) <p>The question is related to databases:</p>&#xA;&#xA;<blockquote>&#xA; <p>There is a relation $R(A_1,A_2,...,A_n)$. Every $(n-2)$ attributes of $R$ forms candidate key. Number of superkeys of $R$ are?</p>&...
habedi/stack-exchange-dataset
65,619
Is finding a set cover of size $k$ NP-complete?
<p>I know that set cover problem is NP-complete. We are given a universe $U$ (a set) of $n$ elements and a collection $S$ of $m$ sets whose union equals the universe and an integer $k$. The set cover problem is to identify a sub-collection of $S$ of size $k$ <strong>or less</strong> whose union equals the universe?</p...
reductions
1
Is finding a set cover of size $k$ NP-complete? -- (reductions) <p>I know that set cover problem is NP-complete. We are given a universe $U$ (a set) of $n$ elements and a collection $S$ of $m$ sets whose union equals the universe and an integer $k$. The set cover problem is to identify a sub-collection of $S$ of size ...
habedi/stack-exchange-dataset
65,629
Can formal languages be used to study mathematical notation?
<p><strong>Question:</strong> Are there any introductory texts in formal language or programming language theory which discuss how to apply it to the study of optimal notation?</p>&#xA;&#xA;<p>In particular, I am interested to learn what stack-languages, parse trees, and indices are, and how to predict when a certain t...
formal languages reference request formal grammars programming languages
1
Can formal languages be used to study mathematical notation? -- (formal languages reference request formal grammars programming languages) <p><strong>Question:</strong> Are there any introductory texts in formal language or programming language theory which discuss how to apply it to the study of optimal notation?</p>&...
habedi/stack-exchange-dataset
65,631
Assigning all nodes in a tree a parent and children
<p>If one was given a tree in the form of a list of $A,B$ (not implying which one is the parent) pairs implying that node $A$ and $B$ were connected by an edge, how could a root node be determined and each node be assigned children and a parent such that by recursing up through its parent, its parents parent and so on ...
graphs trees
1
Assigning all nodes in a tree a parent and children -- (graphs trees) <p>If one was given a tree in the form of a list of $A,B$ (not implying which one is the parent) pairs implying that node $A$ and $B$ were connected by an edge, how could a root node be determined and each node be assigned children and a parent such ...
habedi/stack-exchange-dataset
65,633
Check if adding an edge to a DAG results in a cycle
<p>On the begining: It is a programming contest problem, but not from on-going one. Unfortunatelly, I can't provide any link to this task, because it is not publically available. It was from one of the Polish local programming contest in 2011 organised by Warsaw School of Computer Science.</p>&#xA;&#xA;<p>I have a grap...
algorithms graphs searching
1
Check if adding an edge to a DAG results in a cycle -- (algorithms graphs searching) <p>On the begining: It is a programming contest problem, but not from on-going one. Unfortunatelly, I can't provide any link to this task, because it is not publically available. It was from one of the Polish local programming contest ...
habedi/stack-exchange-dataset
65,636
How to use PHOG and LPQ features for Emotion Recognition?
<p>I have a database that consists of PHOG and LPQ features for each image. Now, I wish to train an SVM on these features for emotion recognition i.e SVM classifies the images on basis of emotion in the image. </p>&#xA;&#xA;<p>Please provide a detailed procedure on how to use these features to train SVM.</p>&#xA;
image processing computer vision svm
1
How to use PHOG and LPQ features for Emotion Recognition? -- (image processing computer vision svm) <p>I have a database that consists of PHOG and LPQ features for each image. Now, I wish to train an SVM on these features for emotion recognition i.e SVM classifies the images on basis of emotion in the image. </p>&#xA;&...
habedi/stack-exchange-dataset
65,655
Is every NP-hard problem computable?
<p>Is it required that a NP-hard problem must be computable?</p>&#xA;&#xA;<p>I don't think so, but I am not sure.</p>&#xA;
complexity theory computability np hard
1
Is every NP-hard problem computable? -- (complexity theory computability np hard) <p>Is it required that a NP-hard problem must be computable?</p>&#xA;&#xA;<p>I don't think so, but I am not sure.</p>&#xA;
habedi/stack-exchange-dataset
65,665
Hashing Probabilities
<p>I'm not too sure about how to calculate hashing probabilities, and can't find much documents online to help me with it. Am looking to solve this question "If we hash N items into M buckets using a simple uniform hash, what is the expected number of buckets that have exactly 1 item? What is the expected number of buc...
algorithm analysis data structures probability theory hashing
1
Hashing Probabilities -- (algorithm analysis data structures probability theory hashing) <p>I'm not too sure about how to calculate hashing probabilities, and can't find much documents online to help me with it. Am looking to solve this question "If we hash N items into M buckets using a simple uniform hash, what is th...
habedi/stack-exchange-dataset
65,677
Complexity of finding the shortest simple even s-t-path
<p>Consider a graph <span class="math-container">$G=(V,E)$</span> and two vertices <span class="math-container">$s,t$</span>.</p>&#xA;<blockquote>&#xA;<p>What is the complexity of finding the length of the shortest <strong>simple</strong> <span class="math-container">$s-t$</span> path that has even length?</p>&#xA;<p>D...
complexity theory graphs shortest path
1
Complexity of finding the shortest simple even s-t-path -- (complexity theory graphs shortest path) <p>Consider a graph <span class="math-container">$G=(V,E)$</span> and two vertices <span class="math-container">$s,t$</span>.</p>&#xA;<blockquote>&#xA;<p>What is the complexity of finding the length of the shortest <stro...
habedi/stack-exchange-dataset
65,681
Proving landau notation statements
<p>If we have the function $f : \mathbb{N}_0 \rightarrow \mathbb{N}$ with $f(n) = n^2$ and we look at the following representations of the sets $\mathcal{o}(f),\mathcal{O}(f),\Theta(f),\Omega(f),\omega(f) $: &#xA;<a href="https://i.stack.imgur.com/ArYKI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com...
asymptotics landau notation
1
Proving landau notation statements -- (asymptotics landau notation) <p>If we have the function $f : \mathbb{N}_0 \rightarrow \mathbb{N}$ with $f(n) = n^2$ and we look at the following representations of the sets $\mathcal{o}(f),\mathcal{O}(f),\Theta(f),\Omega(f),\omega(f) $: &#xA;<a href="https://i.stack.imgur.com/ArYK...
habedi/stack-exchange-dataset