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
60,751
Label coloring to maximize number of "balanced" triangles (NP-hardness)
<p>Define a triangle in undirected graph $G$ is <em>balanced</em> if the edge labels in the triangle are $(+1, +1, +1)$, $(-1, -1, +1)$, $(+1, -1, -1)$ or $(-1, +1, -1)$ (<a href="https://arxiv.org/ftp/nlin/papers/0405/0405041.pdf" rel="nofollow">social balance theory</a>).</p>&#xA;&#xA;<p>Problem definition:</p>&#xA;...
complexity theory graphs np complete reductions colorings
1
Label coloring to maximize number of "balanced" triangles (NP-hardness) -- (complexity theory graphs np complete reductions colorings) <p>Define a triangle in undirected graph $G$ is <em>balanced</em> if the edge labels in the triangle are $(+1, +1, +1)$, $(-1, -1, +1)$, $(+1, -1, -1)$ or $(-1, +1, -1)$ (<a href="http...
habedi/stack-exchange-dataset
60,754
Sequential execution in $\pi$-calculus
<p>I am relatively new to $\pi$-Caculus and have a doubt wrt sequential execution in In $\pi$-Calculus . </p>&#xA;&#xA;<p>Does passing of common names over common channels shared between two Agents, represent a sequential execution ? so is the below reduction semantics correct if I have to represent a sequential execut...
computation models pi calculus
1
Sequential execution in $\pi$-calculus -- (computation models pi calculus) <p>I am relatively new to $\pi$-Caculus and have a doubt wrt sequential execution in In $\pi$-Calculus . </p>&#xA;&#xA;<p>Does passing of common names over common channels shared between two Agents, represent a sequential execution ? so is the b...
habedi/stack-exchange-dataset
60,755
Is there any precedence for symbols for constructing parse trees?
<p>I am wondering if some symbols such as the ones in propositional logic have precedence over others in drawing parse trees.</p>&#xA;&#xA;<p>For example, the sentence: <code>p ∧ q → r</code>, would <code>∧</code> take precedence over <code>→</code> in becoming the root of the parse tree or vice versa? &#xA;<br>&#xA;Or...
parsers propositional logic
1
Is there any precedence for symbols for constructing parse trees? -- (parsers propositional logic) <p>I am wondering if some symbols such as the ones in propositional logic have precedence over others in drawing parse trees.</p>&#xA;&#xA;<p>For example, the sentence: <code>p ∧ q → r</code>, would <code>∧</code> take pr...
habedi/stack-exchange-dataset
60,763
Does my grammar contradict LL ⊆ LR(1)?
<p><a href="https://cs.stackexchange.com/a/48">This answer</a> claims that $ LL \subseteq LR \left( 1 \right )$ where $LL = \bigcup_k LL(k)$.</p>&#xA;&#xA;<p>But is this true? Is this grammar a valid counterexample?</p>&#xA;&#xA;<p>$ S \rightarrow a | Aaa $, $ A \rightarrow \varepsilon $</p>&#xA;&#xA;<p>It's easy to ...
formal languages formal grammars parsers
1
Does my grammar contradict LL ⊆ LR(1)? -- (formal languages formal grammars parsers) <p><a href="https://cs.stackexchange.com/a/48">This answer</a> claims that $ LL \subseteq LR \left( 1 \right )$ where $LL = \bigcup_k LL(k)$.</p>&#xA;&#xA;<p>But is this true? Is this grammar a valid counterexample?</p>&#xA;&#xA;<p>$...
habedi/stack-exchange-dataset
60,770
The VC dimension when the samples are fixed
<p>The <a href="https://en.wikipedia.org/wiki/VC_dimension" rel="nofollow">VC dimension</a> is usually used in the following way. There is a space of hypotheses. There is an unknown probability distribution. We sample some training-samples from this distribution. We find the hypothesis that scores best on the training-...
learning theory vc dimension
1
The VC dimension when the samples are fixed -- (learning theory vc dimension) <p>The <a href="https://en.wikipedia.org/wiki/VC_dimension" rel="nofollow">VC dimension</a> is usually used in the following way. There is a space of hypotheses. There is an unknown probability distribution. We sample some training-samples fr...
habedi/stack-exchange-dataset
60,772
Finding an optimal topological ordering
<p>I have some jobs, which calculate values. Some of these jobs require the calculated values of other jobs for their own calculation. An execution plan for these jobs can be found with a topological sort on the dependency graph.</p>&#xA;&#xA;<p>However, these calculated values are huge and occupy a large chunk of memo...
algorithms graphs
1
Finding an optimal topological ordering -- (algorithms graphs) <p>I have some jobs, which calculate values. Some of these jobs require the calculated values of other jobs for their own calculation. An execution plan for these jobs can be found with a topological sort on the dependency graph.</p>&#xA;&#xA;<p>However, th...
habedi/stack-exchange-dataset
60,773
Why do we reject turing machines that use space less than the log of the length of the input?
<p>In <strong>Computational complexity: Modern Approach by Arora and Barak</strong>, it's mentioned that </p>&#xA;&#xA;<blockquote>&#xA; <p>We will require however that $S(n)&gt; \log n$ since the work tape has length $n$, and we would like the machine to at least be able to remember the index of the cell of the input...
complexity theory turing machines space complexity
1
Why do we reject turing machines that use space less than the log of the length of the input? -- (complexity theory turing machines space complexity) <p>In <strong>Computational complexity: Modern Approach by Arora and Barak</strong>, it's mentioned that </p>&#xA;&#xA;<blockquote>&#xA; <p>We will require however that ...
habedi/stack-exchange-dataset
60,792
Dynamically Learning Haar Cascade (in OpenCV)
<p>I am new to computer vision so please excuse me if this question is very simple. </p>&#xA;&#xA;<p>I am trying to learn how to use the Haar Cascade creation tool provided with OpenCV to train a cascade classifier. It seems relatively easy, with the tools provided, but I was wondering if there was a way to improve the...
machine learning image processing classification
1
Dynamically Learning Haar Cascade (in OpenCV) -- (machine learning image processing classification) <p>I am new to computer vision so please excuse me if this question is very simple. </p>&#xA;&#xA;<p>I am trying to learn how to use the Haar Cascade creation tool provided with OpenCV to train a cascade classifier. It s...
habedi/stack-exchange-dataset
60,796
Does 'subexponential algorithm' refer to input or number of bits used to represent input?
<p>When an algorithm is said to be subexponential - does this refer to the input N or the number of bits used to represent N? Consider the following: trial division for integer factorization (i.e. try all numbers less than $\sqrt N$) is subexponential in terms of N. </p>&#xA;&#xA;<p><strong>Note:</strong> here I'm us...
complexity theory time complexity
1
Does 'subexponential algorithm' refer to input or number of bits used to represent input? -- (complexity theory time complexity) <p>When an algorithm is said to be subexponential - does this refer to the input N or the number of bits used to represent N? Consider the following: trial division for integer factorization...
habedi/stack-exchange-dataset
60,811
How to formally prove that if triangle inequality is satisfied in a bunch of edges, then each edge has a positive value?
<p>The exact questions states the following:</p>&#xA;&#xA;<blockquote>&#xA; <p>Suppose that a complete undirected graph $G = (V,E)$ with at least 3 vertices has cost function $c$ that satisfies the triangle inequality. Prove that $c(u,v) \geq 0$ for all $u,v \in V$.</p>&#xA;</blockquote>&#xA;&#xA;<p>I can intuitively ...
graphs
1
How to formally prove that if triangle inequality is satisfied in a bunch of edges, then each edge has a positive value? -- (graphs) <p>The exact questions states the following:</p>&#xA;&#xA;<blockquote>&#xA; <p>Suppose that a complete undirected graph $G = (V,E)$ with at least 3 vertices has cost function $c$ that sa...
habedi/stack-exchange-dataset
60,817
Is there a difference between "marking", "configuration" and "state" in Petri nets?
<p>When finding sources for certain definitions related to Petri nets, I found that there seem to be three ways of referring to "which tokens are located in each place":</p>&#xA;&#xA;<ul>&#xA;<li>Configuration (e.g. in Sequential Configuration Graph, also referred to as a reachability graph)</li>&#xA;<li>Marking (e.g. ...
petri nets
1
Is there a difference between "marking", "configuration" and "state" in Petri nets? -- (petri nets) <p>When finding sources for certain definitions related to Petri nets, I found that there seem to be three ways of referring to "which tokens are located in each place":</p>&#xA;&#xA;<ul>&#xA;<li>Configuration (e.g. in S...
habedi/stack-exchange-dataset
60,832
Proving that a CFG generates a language
<p>Is a suitable way to prove that any given CFG generates (or not) any given language to draw its total language tree? </p>&#xA;&#xA;<p>What if the tree is infinite? What would then be a better way to prove that a given CFG generates a given language?</p>&#xA;
context free formal grammars parsers
1
Proving that a CFG generates a language -- (context free formal grammars parsers) <p>Is a suitable way to prove that any given CFG generates (or not) any given language to draw its total language tree? </p>&#xA;&#xA;<p>What if the tree is infinite? What would then be a better way to prove that a given CFG generates a g...
habedi/stack-exchange-dataset
60,840
Approximate Nearest Neighbour Problem in Spherical Setting
<p>There has been significant literature in solving the (Approximate) Nearest Neighbour Problem in the spherical setting in the $\mathbb{R}^n$ using Angular and Spherical LSH and other lattice sieving techniques. A proper definition of the problem is found in the image below. <a href="https://i.stack.imgur.com/ee4vv.pn...
optimization lattices nearest neighbour
1
Approximate Nearest Neighbour Problem in Spherical Setting -- (optimization lattices nearest neighbour) <p>There has been significant literature in solving the (Approximate) Nearest Neighbour Problem in the spherical setting in the $\mathbb{R}^n$ using Angular and Spherical LSH and other lattice sieving techniques. A p...
habedi/stack-exchange-dataset
60,842
Does the fact that there exists a polynomial time quantum algorithm for integer factorization suggest that integer factorization is in P?
<p>Just as the title says: Does the fact that there exists a polynomial time quantum algorithm for integer factorization suggest that integer factorization is in P? Additionally, if one could show that a problem known to be in NP had a polynomial time quantum solution, would that be enough to show that P=NP?</p>&#xA;
complexity theory time complexity quantum computing
1
Does the fact that there exists a polynomial time quantum algorithm for integer factorization suggest that integer factorization is in P? -- (complexity theory time complexity quantum computing) <p>Just as the title says: Does the fact that there exists a polynomial time quantum algorithm for integer factorization sugg...
habedi/stack-exchange-dataset
60,846
Clarification on the inapproximability of set cover
<p>I'm trying to understand the inapproximability of the minimum set cover problem.</p>&#xA;&#xA;<p>The <a href="https://en.wikipedia.org/wiki/Set_cover_problem#Inapproximability_results" rel="nofollow">wikipedia page</a> states that it is hard to approximate within a factor of $(1-o(1))\ln n$ and that $n$ refers to th...
approximation set cover
1
Clarification on the inapproximability of set cover -- (approximation set cover) <p>I'm trying to understand the inapproximability of the minimum set cover problem.</p>&#xA;&#xA;<p>The <a href="https://en.wikipedia.org/wiki/Set_cover_problem#Inapproximability_results" rel="nofollow">wikipedia page</a> states that it is...
habedi/stack-exchange-dataset
60,853
What is the complexity of Array[n] and Object.value
<p>I faced a great doubt about the Complexity of two ways of calling a information.</p>&#xA;&#xA;<p>First I have an Array, if I call an array in a program like this:</p>&#xA;&#xA;<pre><code>print array[0]&#xA;</code></pre>&#xA;&#xA;<p>This process will be O(1) as I understand.</p>&#xA;&#xA;<p>But what is the complexity...
algorithm analysis data structures programming languages runtime analysis
1
What is the complexity of Array[n] and Object.value -- (algorithm analysis data structures programming languages runtime analysis) <p>I faced a great doubt about the Complexity of two ways of calling a information.</p>&#xA;&#xA;<p>First I have an Array, if I call an array in a program like this:</p>&#xA;&#xA;<pre><code...
habedi/stack-exchange-dataset
60,855
Why is first-order logic (without arithmetic) VALIDITY only recursively enumerable, and not recursive?
<p>Papadimitriou's "Computational Complexity" states that VALIDITY, the problem of deciding whether a first-order logic (without arithmetic) formula is valid, is recursively enumerable. This follows from the completeness and soundness theorems, which equate VALIDITY and THEOREMHOOD, the latter being the problem of find...
complexity theory undecidability first order logic
1
Why is first-order logic (without arithmetic) VALIDITY only recursively enumerable, and not recursive? -- (complexity theory undecidability first order logic) <p>Papadimitriou's "Computational Complexity" states that VALIDITY, the problem of deciding whether a first-order logic (without arithmetic) formula is valid, is...
habedi/stack-exchange-dataset
60,858
Time complexity of the fast exponentiation method
<p>I am trying to analyse the time complexity of the fast exponentiation method,&#xA;which is given as </p>&#xA;&#xA;<p>$$x^n=&#xA;\begin{cases}&#xA; x^\frac{n}{2}.x^\frac{n}{2} &amp;\text{if n is even}\newline&#xA;x.x^{n-1} &amp;\text{if n is odd} \newline&#xA;1 &amp;\text{if n=0}&#xA;\end{cases}&#xA;$$</p>&#x...
time complexity asymptotics recurrence relation
1
Time complexity of the fast exponentiation method -- (time complexity asymptotics recurrence relation) <p>I am trying to analyse the time complexity of the fast exponentiation method,&#xA;which is given as </p>&#xA;&#xA;<p>$$x^n=&#xA;\begin{cases}&#xA; x^\frac{n}{2}.x^\frac{n}{2} &amp;\text{if n is even}\newline&...
habedi/stack-exchange-dataset
60,867
Negligible functions in definitions of statistical closeness and computational indistinguishability
<p>Statistical closeness implies computational indistinguishability.</p>&#xA;&#xA;<p>Is there any (simple) relationship between negligible function that is used in definition of statistical closeness and negligible function that is used in definition of computational indistinguishability?</p>&#xA;&#xA;<p>Can we say any...
complexity theory computability
1
Negligible functions in definitions of statistical closeness and computational indistinguishability -- (complexity theory computability) <p>Statistical closeness implies computational indistinguishability.</p>&#xA;&#xA;<p>Is there any (simple) relationship between negligible function that is used in definition of stati...
habedi/stack-exchange-dataset
60,870
Processing weighted points of interest. Is there a name for this task/algorithm?
<p>Is there a name for the following problem? Is there a measure of quality of a given solution? How can we even define what a proper solution is?</p>&#xA;&#xA;<p><strong>Context:</strong> I want to detect long lines (most lines over 1000 pixel long) in an image. It is known that most of the lines have similar alignmen...
algorithms computer vision
1
Processing weighted points of interest. Is there a name for this task/algorithm? -- (algorithms computer vision) <p>Is there a name for the following problem? Is there a measure of quality of a given solution? How can we even define what a proper solution is?</p>&#xA;&#xA;<p><strong>Context:</strong> I want to detect l...
habedi/stack-exchange-dataset
60,876
Deep DFS traverse on graph
<p>According to chess rules, the (undirected) graph generated from the Knight move on a keypad is the following:</p>&#xA;&#xA;&#xA;&#xA;<p>$$&#xA;\begin{array}{ccccc}&#xA;3 &amp; - &amp; 4 &amp; - &amp; 9 \\&#xA;| &amp; &amp; | &amp; &amp; | \\&#xA;8 &amp; &amp; 0 &amp; &amp; 2 \\&#xA;| &amp; &amp; | &amp; &amp; | \\&#...
graphs probability theory simulation
1
Deep DFS traverse on graph -- (graphs probability theory simulation) <p>According to chess rules, the (undirected) graph generated from the Knight move on a keypad is the following:</p>&#xA;&#xA;&#xA;&#xA;<p>$$&#xA;\begin{array}{ccccc}&#xA;3 &amp; - &amp; 4 &amp; - &amp; 9 \\&#xA;| &amp; &amp; | &amp; &amp; | \\&#xA;8 ...
habedi/stack-exchange-dataset
60,880
Identification and the definition of data type
<p>A frequently cited definition of data type is that it is a set of values and a set of operations of those values.</p>&#xA;&#xA;<p>I've never read any mention along the lines of a type must be capable of being identified, although the programming languages I've encountered use names to distinguish different types.</p...
typing
1
Identification and the definition of data type -- (typing) <p>A frequently cited definition of data type is that it is a set of values and a set of operations of those values.</p>&#xA;&#xA;<p>I've never read any mention along the lines of a type must be capable of being identified, although the programming languages I'...
habedi/stack-exchange-dataset
60,884
Why not space out memory allocations?
<p>In ext4 file system, the files are spaced out as far apart as reasonably possible to allow for efficient reallocation. Why do we not do this in memory?</p>&#xA;&#xA;<p>Why not allocate one memory as page 20, and the next large allocation as page 100 to allow for excess expansion before and after the current allocati...
memory management virtual memory memory allocation
1
Why not space out memory allocations? -- (memory management virtual memory memory allocation) <p>In ext4 file system, the files are spaced out as far apart as reasonably possible to allow for efficient reallocation. Why do we not do this in memory?</p>&#xA;&#xA;<p>Why not allocate one memory as page 20, and the next la...
habedi/stack-exchange-dataset
60,893
Is there a philosophical counterpart question to P != NP?
<p>Gödels motivation to prove his incompleteness theorems was the philosophical statement "This sentence is wrong.". Is there a philosophical counterpart to the statement P != NP? For example such statement might be "This Theorem is practically unprovable". The consequences of an existence of such theorem would be: If ...
complexity theory p vs np
1
Is there a philosophical counterpart question to P != NP? -- (complexity theory p vs np) <p>Gödels motivation to prove his incompleteness theorems was the philosophical statement "This sentence is wrong.". Is there a philosophical counterpart to the statement P != NP? For example such statement might be "This Theorem i...
habedi/stack-exchange-dataset
60,904
Overflow of integer counter in distributed systems
<p>I've just been introduced to Paxos. &#xA;There is notion of the of value that is incremented each time a new proposal is send. To provide order for proposals, something like time. What happens when this long or integer value overflows and starts from zero again. The proposed sequence number will become lower than th...
distributed systems arithmetic
1
Overflow of integer counter in distributed systems -- (distributed systems arithmetic) <p>I've just been introduced to Paxos. &#xA;There is notion of the of value that is incremented each time a new proposal is send. To provide order for proposals, something like time. What happens when this long or integer value overf...
habedi/stack-exchange-dataset
60,916
Embedding high dimensional vectors into low dimensional space preserving similarity
<p>I have a collection of high dimensional vectors such as $\vec{a}_{i} \in \mathbb{R}^{n}$ where $n$ is 3000. What I want to do is to embed these vectors into a space such as $\vec{b}_{i} \in [0, 255]^{n}$ where $n$ in this case is now 32. I want to embed it (using any hash trick or something like that) in a way that ...
hash hashing
1
Embedding high dimensional vectors into low dimensional space preserving similarity -- (hash hashing) <p>I have a collection of high dimensional vectors such as $\vec{a}_{i} \in \mathbb{R}^{n}$ where $n$ is 3000. What I want to do is to embed these vectors into a space such as $\vec{b}_{i} \in [0, 255]^{n}$ where $n$ i...
habedi/stack-exchange-dataset
60,924
What is the reason behind a specific ordering of the rows in the generator matrix for Hamming codes?
<p>What order the rows are in a Hamming generator matrix are irrelevant for the Hamming coding to work, given the check matrix is built accoridngly.</p>&#xA;&#xA;<p>In order to limit cognitive overload, it could have been decided that the "official" way of doing it should be either all data rows first then all parity r...
coding theory hamming code
1
What is the reason behind a specific ordering of the rows in the generator matrix for Hamming codes? -- (coding theory hamming code) <p>What order the rows are in a Hamming generator matrix are irrelevant for the Hamming coding to work, given the check matrix is built accoridngly.</p>&#xA;&#xA;<p>In order to limit cogn...
habedi/stack-exchange-dataset
60,938
Closed form solution for optimization problem
<p>Consider the problem of finding the real-valued matrix $C$ so that </p>&#xA;&#xA;<p>$$\|S-AC\|_F^2\qquad(1)$$</p>&#xA;&#xA;<p>is minimal. ($S$ and $A$ are real valued matrices and $_F$ denotes the Frobenius norm). This problem has a closed form solution of $C=A^+S$, where $A^+$ is the pseudo-inverse of $A$.</p>&#xA;...
optimization machine learning linear algebra
1
Closed form solution for optimization problem -- (optimization machine learning linear algebra) <p>Consider the problem of finding the real-valued matrix $C$ so that </p>&#xA;&#xA;<p>$$\|S-AC\|_F^2\qquad(1)$$</p>&#xA;&#xA;<p>is minimal. ($S$ and $A$ are real valued matrices and $_F$ denotes the Frobenius norm). This pr...
habedi/stack-exchange-dataset
60,946
Approximability of convex programming (convex optimization)
<p>Convex optimization is defined here: <a href="https://cstheory.stackexchange.com/questions/22314/definition-of-convex-optimization-problem-by-stephen-boyd-and-lieven-vandenbergh">https://cstheory.stackexchange.com/questions/22314/definition-of-convex-optimization-problem-by-stephen-boyd-and-lieven-vandenbergh</a></p...
approximation
1
Approximability of convex programming (convex optimization) -- (approximation) <p>Convex optimization is defined here: <a href="https://cstheory.stackexchange.com/questions/22314/definition-of-convex-optimization-problem-by-stephen-boyd-and-lieven-vandenbergh">https://cstheory.stackexchange.com/questions/22314/definiti...
habedi/stack-exchange-dataset
60,950
Hash multiple integers directly using FNV-1a
<p>An alternative version of <a href="https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash" rel="nofollow">FNV-1a</a> hash spread on the internet, which operates directly on integers instead of bytes. The offset basis and prime are the same used in the <a href="http://www.isthe.com/cho...
hash randomness statistics hashing c
1
Hash multiple integers directly using FNV-1a -- (hash randomness statistics hashing c) <p>An alternative version of <a href="https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash" rel="nofollow">FNV-1a</a> hash spread on the internet, which operates directly on integers instead of bytes...
habedi/stack-exchange-dataset
60,952
Timely lower bounded Turing machines
<p>Let M be a deterministic Turing machine wich has the properties:</p>&#xA;&#xA;<p>1) $\forall x,y \in \Sigma^* : t_M(xy) \ge t_M(x) + t_M(y)$</p>&#xA;&#xA;<p>2) $\forall a \in \Sigma: t_M(a) \ge 1$&#xA; (Also 2) should be obvious for every DTM).</p>&#xA;&#xA;<p>Then it follows that for all $x \in \Sigma^* : t_M(x) \g...
turing machines
1
Timely lower bounded Turing machines -- (turing machines) <p>Let M be a deterministic Turing machine wich has the properties:</p>&#xA;&#xA;<p>1) $\forall x,y \in \Sigma^* : t_M(xy) \ge t_M(x) + t_M(y)$</p>&#xA;&#xA;<p>2) $\forall a \in \Sigma: t_M(a) \ge 1$&#xA; (Also 2) should be obvious for every DTM).</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
60,959
A question on the graph induced by the transition function of a deterministic Turing machine
<p>Let $M$ be a deterministic Turing machine with totally defined transition function $\delta$ and working alphabet $\Gamma$. Let $Q$ denote the statespace of $M$'s finite control. Let $G_M$ be the graph induced by $\delta$ which is defined as $G_M = (V,E)$ with $V = Q$ and $(q,q') \in E$ iff there exist $a,b \in \Gam...
graphs turing machines
1
A question on the graph induced by the transition function of a deterministic Turing machine -- (graphs turing machines) <p>Let $M$ be a deterministic Turing machine with totally defined transition function $\delta$ and working alphabet $\Gamma$. Let $Q$ denote the statespace of $M$'s finite control. Let $G_M$ be the ...
habedi/stack-exchange-dataset
60,963
Similarity between Min-Conflicts and Coordinate Descent in CSPs?
<p>I'm currently writing a library that solves a specific type of problem that involves mainly constraint satisfaction. </p>&#xA;&#xA;<p>I have came across the <a href="https://en.wikipedia.org/wiki/Min-conflicts_algorithm" rel="nofollow">Min-Conflicts Algorithm</a> which proved to be rather efficient in the context of...
optimization constraint satisfaction
1
Similarity between Min-Conflicts and Coordinate Descent in CSPs? -- (optimization constraint satisfaction) <p>I'm currently writing a library that solves a specific type of problem that involves mainly constraint satisfaction. </p>&#xA;&#xA;<p>I have came across the <a href="https://en.wikipedia.org/wiki/Min-conflicts_...
habedi/stack-exchange-dataset
60,964
Simple majority classifier question
<p>one of my training questions for my exam is the following one:</p>&#xA;&#xA;<blockquote>&#xA; <p>Suppose you are testing a new algorithm on a data set consisting of&#xA; 100 positive and 100 negative examples. You plan to use leave-one-out&#xA; cross-validation (i.e. 200-fold cross-validation) and compare your&#x...
machine learning classification
1
Simple majority classifier question -- (machine learning classification) <p>one of my training questions for my exam is the following one:</p>&#xA;&#xA;<blockquote>&#xA; <p>Suppose you are testing a new algorithm on a data set consisting of&#xA; 100 positive and 100 negative examples. You plan to use leave-one-out&#x...
habedi/stack-exchange-dataset
60,965
Is C actually Turing-complete?
<p>I was trying to explain to someone that C is Turing-complete, and realized that I don't actually know if it is, indeed, technically Turing-complete. (C as in the abstract semantics, not as in an actual implementation.) </p>&#xA;&#xA;<p>The "obvious" answer (roughly: it can address an arbitrary amount of memory, so i...
computability turing completeness c
1
Is C actually Turing-complete? -- (computability turing completeness c) <p>I was trying to explain to someone that C is Turing-complete, and realized that I don't actually know if it is, indeed, technically Turing-complete. (C as in the abstract semantics, not as in an actual implementation.) </p>&#xA;&#xA;<p>The "obvi...
habedi/stack-exchange-dataset
60,979
Given a set of numbers (negative or positive), and a maximum weight w, find a subset that is maximal whose sum is less than w
<p>The aim of this problem is to find a subset (need not be consecutive) of a given set such that the sum is maximal and less than some given number $w$. (Note, we are trying to find a subset that is less than or equal to $w$ and not closest to $w$).</p>&#xA;&#xA;<p>For example, given a set $\{1, 3, 5, 9, 10\}$ and max...
dynamic programming
1
Given a set of numbers (negative or positive), and a maximum weight w, find a subset that is maximal whose sum is less than w -- (dynamic programming) <p>The aim of this problem is to find a subset (need not be consecutive) of a given set such that the sum is maximal and less than some given number $w$. (Note, we are t...
habedi/stack-exchange-dataset
60,985
Can a Turing Machine (TM) decide whether the halting problem applies to all TMs?
<p>On this site there are many variants on the question whether TMs can decide the halting problem, whether for all other TMs or certain subsets. This question is somewhat different. </p>&#xA;&#xA;<p>It asks whether the fact the halting problem applies to all TMs can be decided by a TM. I believe the answer is no, an...
computability turing machines undecidability halting problem
1
Can a Turing Machine (TM) decide whether the halting problem applies to all TMs? -- (computability turing machines undecidability halting problem) <p>On this site there are many variants on the question whether TMs can decide the halting problem, whether for all other TMs or certain subsets. This question is somewhat ...
habedi/stack-exchange-dataset
60,995
Simple elementary cellular automata with high period?
<p>I'm looking for a simple rewrite system which displays high period. </p>&#xA;&#xA;<p>In order to do that, I've ran a brute-force search on every elementary cellular automata, for a few fixed memory lengths <code>L</code>. The result is that, when <code>L=7</code>, there are rules with the max possible period (128). ...
automata cellular automata
1
Simple elementary cellular automata with high period? -- (automata cellular automata) <p>I'm looking for a simple rewrite system which displays high period. </p>&#xA;&#xA;<p>In order to do that, I've ran a brute-force search on every elementary cellular automata, for a few fixed memory lengths <code>L</code>. The resul...
habedi/stack-exchange-dataset
60,998
The meaning of "set" in NP-complete problem
<p>Garey and Johnson describe in their book many NP-complete problems which are based on sets, for example Hitting Set, Minimum Test Set, Set Packing, Set Splitting, and many more.</p>&#xA;&#xA;<p>The traditional mathematical definition of a set does not allow duplicates; when multiplicities count, the object is called...
np complete sets
1
The meaning of "set" in NP-complete problem -- (np complete sets) <p>Garey and Johnson describe in their book many NP-complete problems which are based on sets, for example Hitting Set, Minimum Test Set, Set Packing, Set Splitting, and many more.</p>&#xA;&#xA;<p>The traditional mathematical definition of a set does not...
habedi/stack-exchange-dataset
61,009
Does word addressable memory have more bytes than byte addressable memory?
<p>Well, my question - if word addressable memory has more bytes than byte addressable memory - is derived from the fact that in word addressable memory each address addresses a word and in byte addressable memory each address addresses a byte.&#xA;In the case of word addressable memory - If the word size is 4 bytes 32...
computer architecture memory management memory hardware memory access memory allocation
1
Does word addressable memory have more bytes than byte addressable memory? -- (computer architecture memory management memory hardware memory access memory allocation) <p>Well, my question - if word addressable memory has more bytes than byte addressable memory - is derived from the fact that in word addressable memory...
habedi/stack-exchange-dataset
61,019
How can one find an element in a Merkle tree?
<p>How can one find an element in a Merkle tree, as effectively as possible?</p>&#xA;&#xA;<p>Each internal node has a hash value. So I think, first, hash the value to find, and if an internal node has the same value exactly, get its leaf node. But this is correct in 2-depth, not all cases. Because each internal node ha...
data structures hash
1
How can one find an element in a Merkle tree? -- (data structures hash) <p>How can one find an element in a Merkle tree, as effectively as possible?</p>&#xA;&#xA;<p>Each internal node has a hash value. So I think, first, hash the value to find, and if an internal node has the same value exactly, get its leaf node. But ...
habedi/stack-exchange-dataset
61,022
Is zero allowed as an edge's weight, in a weighted graph?
<p>I am trying to write a script that generates random graphs and I need to know if an edge in a weighted graph can have the 0 value.</p>&#xA;&#xA;<p>actually it makes sense that 0 could be used as an edge's weight, but I've been working with graphs in last few days and I have never seen an example of it.</p>&#xA;&#xA;...
algorithms graphs weighted graphs
1
Is zero allowed as an edge's weight, in a weighted graph? -- (algorithms graphs weighted graphs) <p>I am trying to write a script that generates random graphs and I need to know if an edge in a weighted graph can have the 0 value.</p>&#xA;&#xA;<p>actually it makes sense that 0 could be used as an edge's weight, but I'v...
habedi/stack-exchange-dataset
61,025
Topological Sort without modifying the graph or marking edges
<p>I have a DAG which I want to traverse in a topological order. Wikipedia describes two algorithms for topological sorting, which both work in theory but seem impractical to me from a design point of view: Kahn's algorithm modifies the graph (by removing edges) and the DFS-based one marks nodes, which would require me...
dag
1
Topological Sort without modifying the graph or marking edges -- (dag) <p>I have a DAG which I want to traverse in a topological order. Wikipedia describes two algorithms for topological sorting, which both work in theory but seem impractical to me from a design point of view: Kahn's algorithm modifies the graph (by re...
habedi/stack-exchange-dataset
61,030
Why are hash map look-ups assumed to be $O(1)$ on average
<p>To look up a key in a hash map you have to</p>&#xA;&#xA;<ol>&#xA;<li>calculate its hash</li>&#xA;<li>find the entry in the resulting hash bucket</li>&#xA;</ol>&#xA;&#xA;<p>Hash calculation takes at least $O(l)$ operations when the hashes are $l$-bit-numbers.</p>&#xA;&#xA;<p>When using an index (like a binary tree) f...
algorithm analysis data structures runtime analysis hash tables
1
Why are hash map look-ups assumed to be $O(1)$ on average -- (algorithm analysis data structures runtime analysis hash tables) <p>To look up a key in a hash map you have to</p>&#xA;&#xA;<ol>&#xA;<li>calculate its hash</li>&#xA;<li>find the entry in the resulting hash bucket</li>&#xA;</ol>&#xA;&#xA;<p>Hash calculation t...
habedi/stack-exchange-dataset
61,036
Basic question about 4-way set associative
<p>When the CPU writes or reads from the memory and stores the value that was read or written into L1 cache. Do the CPU store the whole block( 1 block , leaves the other three ways empty) or the whole set ( 4 blocks)?</p>&#xA;
computer architecture cpu cache memory hardware
1
Basic question about 4-way set associative -- (computer architecture cpu cache memory hardware) <p>When the CPU writes or reads from the memory and stores the value that was read or written into L1 cache. Do the CPU store the whole block( 1 block , leaves the other three ways empty) or the whole set ( 4 blocks)?</p>&#x...
habedi/stack-exchange-dataset
61,037
Graph adjacency using Hashing
<p>Consider a graph $G = (V,E)$ and the following operation </p>&#xA;&#xA;<p>$\text{neighbour}(v_1,v_2)$: returns <code>true</code> if the vertices $v_1$ and $v_2$ are adjacent, and <code>false</code> otherwise.</p>&#xA;&#xA;<p>I now consider two standard data structures:</p>&#xA;&#xA;<p><strong>Adjacency Matrix.</stro...
graphs hash
1
Graph adjacency using Hashing -- (graphs hash) <p>Consider a graph $G = (V,E)$ and the following operation </p>&#xA;&#xA;<p>$\text{neighbour}(v_1,v_2)$: returns <code>true</code> if the vertices $v_1$ and $v_2$ are adjacent, and <code>false</code> otherwise.</p>&#xA;&#xA;<p>I now consider two standard data structures:<...
habedi/stack-exchange-dataset
61,040
Proving $(a+b)^* = b^*(ab^*)^*$ equationally
<p>I am new to automata theory and have a problem in understanding equivalence of regular expressions, though I can go for the construction procedure of minimized DFAs to prove that both are equal.</p>&#xA;&#xA;<p>I need to prove the following property using different Kleene star properties:</p>&#xA;&#xA;<p>$$(a+b)^* =...
formal languages proof techniques regular expressions kleene star
1
Proving $(a+b)^* = b^*(ab^*)^*$ equationally -- (formal languages proof techniques regular expressions kleene star) <p>I am new to automata theory and have a problem in understanding equivalence of regular expressions, though I can go for the construction procedure of minimized DFAs to prove that both are equal.</p>&#x...
habedi/stack-exchange-dataset
61,047
How static Bayesian networks are stored? Like Hugin etc
<p>I wanted to know the standard format to store the Bayesian network structure? I came across Hugin format and others. But couldn't find out the documentation as how its been written, if I wanted to write a piece of package that writes the BN in a file which can be read by other popular Bayesian inferencing tools for ...
machine learning graphical models
1
How static Bayesian networks are stored? Like Hugin etc -- (machine learning graphical models) <p>I wanted to know the standard format to store the Bayesian network structure? I came across Hugin format and others. But couldn't find out the documentation as how its been written, if I wanted to write a piece of package ...
habedi/stack-exchange-dataset
61,050
Is there a fast solution for this set reduction problem?
<p>Let there be a set $S$ and denote by $P=2^S$ the power set of $S$. We are given a finite subset $L = \{p_0, \ldots, p_{n-1}\}$ of $P$ and we are allowed to transform the set as follows: if two sets $p_i$ and $p_j$ share some elements, i.e. $p_i \cap p_j \neq \emptyset$, remove both $p_i$ and $p_j$ from $L$ but add t...
algorithms complexity theory
1
Is there a fast solution for this set reduction problem? -- (algorithms complexity theory) <p>Let there be a set $S$ and denote by $P=2^S$ the power set of $S$. We are given a finite subset $L = \{p_0, \ldots, p_{n-1}\}$ of $P$ and we are allowed to transform the set as follows: if two sets $p_i$ and $p_j$ share some e...
habedi/stack-exchange-dataset
61,056
Can max-flow with mutually exclusive edges be reduced to standard max-flow problem?
<p>I'm working with a flow network like the following:</p>&#xA;&#xA;<p>The source s has four edges, each with capacity 1, out to the nodes A, B, C, and D. All of A, B, C, and D have edges to two other nodes, X and Y, also with capacity 1. X and Y both have edges with capacity 4 to the sink t. </p>&#xA;&#xA;<p>Typically...
network flow max flow ford fulkerson
1
Can max-flow with mutually exclusive edges be reduced to standard max-flow problem? -- (network flow max flow ford fulkerson) <p>I'm working with a flow network like the following:</p>&#xA;&#xA;<p>The source s has four edges, each with capacity 1, out to the nodes A, B, C, and D. All of A, B, C, and D have edges to two...
habedi/stack-exchange-dataset
61,063
How is Memory Access Time of Processor calculated?
<p>In the <a href="http://www.plantation-productions.com/Webster/www.artofasm.com/index.html" rel="nofollow">Art of Assembly</a> ebook, I have read that 8088 processor require four clock cycle to access memory (in whatever clock speed &amp; memory speed is). How is it calculated? Is it time for processor to prepare for...
computer architecture cpu
1
How is Memory Access Time of Processor calculated? -- (computer architecture cpu) <p>In the <a href="http://www.plantation-productions.com/Webster/www.artofasm.com/index.html" rel="nofollow">Art of Assembly</a> ebook, I have read that 8088 processor require four clock cycle to access memory (in whatever clock speed &am...
habedi/stack-exchange-dataset
61,073
Why does P/Poly can also receive bad advice?
<p>(from my class's slides)</p>&#xA;&#xA;<p><em>"NP and P/Poly both use an external string for computation. However, for L in NP, any witness is rejected if x $\notin$ L. For L in P/Poly, there can be bad advice!</em>"</p>&#xA;&#xA;<p>I'm having a hard time understanding why this is true. My intuition is that if there ...
complexity theory complexity classes
1
Why does P/Poly can also receive bad advice? -- (complexity theory complexity classes) <p>(from my class's slides)</p>&#xA;&#xA;<p><em>"NP and P/Poly both use an external string for computation. However, for L in NP, any witness is rejected if x $\notin$ L. For L in P/Poly, there can be bad advice!</em>"</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
61,074
Algorithm for guessing a word in a dictionary with weighted operators
<p>Suppose I am given a dictionary of words which contains no more than 100 words, and each word has a maximum length of 50 characters. I want to write a program to guess an unknown word, call it S, that is in the dictionary using 2 weighted operators:</p>&#xA;&#xA;<ul>&#xA;<li>int getOccurrences(char x): return the fr...
algorithms
1
Algorithm for guessing a word in a dictionary with weighted operators -- (algorithms) <p>Suppose I am given a dictionary of words which contains no more than 100 words, and each word has a maximum length of 50 characters. I want to write a program to guess an unknown word, call it S, that is in the dictionary using 2 w...
habedi/stack-exchange-dataset
61,099
Algorithm for finding all the heaviest edges in a graph
<p>We have a non directed, not necessarily connected graph $G=(V,E)$, that is represented by a adjacency list, and a weight function $w:E \to R$. All edges have distinct weight. An edge is "heavy" if there exists a simple cycle in $G$ that contains it, and it has the maximal weight in that cycle. The question is to giv...
algorithms time complexity graph traversal minimum spanning tree
1
Algorithm for finding all the heaviest edges in a graph -- (algorithms time complexity graph traversal minimum spanning tree) <p>We have a non directed, not necessarily connected graph $G=(V,E)$, that is represented by a adjacency list, and a weight function $w:E \to R$. All edges have distinct weight. An edge is "heav...
habedi/stack-exchange-dataset
61,105
Implementing Nesetril and Poljak's clique detection algorithm
<p>I want to implement the clique detection algorithm by Nesetril and Poljak described in [1].</p>&#xA;&#xA;<p>However, I can't seem to understand how the auxiliary graph $H$ is to be created and how it can be used to detect a clique. For instance, the paper suggests that to detect a clique of size $3\ell$ in a graph o...
graphs clique
1
Implementing Nesetril and Poljak's clique detection algorithm -- (graphs clique) <p>I want to implement the clique detection algorithm by Nesetril and Poljak described in [1].</p>&#xA;&#xA;<p>However, I can't seem to understand how the auxiliary graph $H$ is to be created and how it can be used to detect a clique. For ...
habedi/stack-exchange-dataset
61,113
Does a given e-NFA accepts all the Strings?
<p>Given an e-NFA. It is easy to find a string that is accepted by it. But, how do we find if the given e-NFA accepts "All" the strings over the alphabet. Or if there is a string that is not accepted by it.</p>&#xA;&#xA;<p>Of course the usual way is to construct a DFA, or complement the e-NFA but since we are talking a...
regular languages finite automata regular expressions
1
Does a given e-NFA accepts all the Strings? -- (regular languages finite automata regular expressions) <p>Given an e-NFA. It is easy to find a string that is accepted by it. But, how do we find if the given e-NFA accepts "All" the strings over the alphabet. Or if there is a string that is not accepted by it.</p>&#xA;&#...
habedi/stack-exchange-dataset
61,119
Understanding non-faulting and faulting software prefetches
<p>What is the difference between a faulting and non-faulting software prefetch. I have read some material in Google but can't understand it deeply. How do we know if a software prefetch is faulting or non-faulting in practice?</p>&#xA;
computer architecture virtual memory memory access
1
Understanding non-faulting and faulting software prefetches -- (computer architecture virtual memory memory access) <p>What is the difference between a faulting and non-faulting software prefetch. I have read some material in Google but can't understand it deeply. How do we know if a software prefetch is faulting or no...
habedi/stack-exchange-dataset
61,120
Solving Recurrence Relation (quicksort )
<p>I know quicksort to have a runtime of $\mathcal{O}(n \log_2 n)$</p>&#xA;&#xA;<p>However trying to solve for it I get something different and I am not sure why that is.</p>&#xA;&#xA;<p>Ok, so solving recurrence relations can be done several different ways.</p>&#xA;&#xA;<p>The recurrence relation for quicksort is:</p>...
recurrence relation quicksort
1
Solving Recurrence Relation (quicksort ) -- (recurrence relation quicksort) <p>I know quicksort to have a runtime of $\mathcal{O}(n \log_2 n)$</p>&#xA;&#xA;<p>However trying to solve for it I get something different and I am not sure why that is.</p>&#xA;&#xA;<p>Ok, so solving recurrence relations can be done several d...
habedi/stack-exchange-dataset
61,122
L contains the concatenations of all k-bit long strings. Why is it decided in PSPACE(loglogn)?
<p>(This exercise is from Computation Complexity: A Conceptual Perspective by Oded Goldreich):</p>&#xA;&#xA;<p><em>For any k</em> $\in \mathbb{N}$, <em>let</em> $w_k$ <em>denote the concatenation of all k-bit long strings (in lexicographic order) separated by</em> *'s <em>(i.e, $w_k = 0^{k-2}00*0^{k-2}01*0^{k-2}10*...*...
complexity theory complexity classes space complexity
1
L contains the concatenations of all k-bit long strings. Why is it decided in PSPACE(loglogn)? -- (complexity theory complexity classes space complexity) <p>(This exercise is from Computation Complexity: A Conceptual Perspective by Oded Goldreich):</p>&#xA;&#xA;<p><em>For any k</em> $\in \mathbb{N}$, <em>let</em> $w_k$...
habedi/stack-exchange-dataset
61,127
Subset sum-like problem over boolean vectors
<p>I'm interested in finding maximal solutions to the problem of finding a subset that "sums" to a specific value. The elements of the set are boolean vectors and the notion of "sum" is point-wise or.</p>&#xA;&#xA;<p>Say you had {10, 01, 00} then there are two subsets that sum to 11: {10, 01} and {10, 01, 00}.</p>&#xA;...
algorithms reference request
1
Subset sum-like problem over boolean vectors -- (algorithms reference request) <p>I'm interested in finding maximal solutions to the problem of finding a subset that "sums" to a specific value. The elements of the set are boolean vectors and the notion of "sum" is point-wise or.</p>&#xA;&#xA;<p>Say you had {10, 01, 00}...
habedi/stack-exchange-dataset
61,134
Why update weights and biases after training a Neural Network on whole set of training samples
<p>I am reading the book <em>Neural Networks and Deep Learning</em> by Micheal Nielsen. In the <a href="http://neuralnetworksanddeeplearning.com/chap2.html#the_backpropagation_algorithm" rel="nofollow noreferrer">second chapter</a> of his book, he describes the following algorithm for updating weights and biases for a...
neural networks gradient descent
1
Why update weights and biases after training a Neural Network on whole set of training samples -- (neural networks gradient descent) <p>I am reading the book <em>Neural Networks and Deep Learning</em> by Micheal Nielsen. In the <a href="http://neuralnetworksanddeeplearning.com/chap2.html#the_backpropagation_algorithm"...
habedi/stack-exchange-dataset
61,136
Prove that $L^{\nsubseteq}_{M'}=\{ \langle M \rangle \ | \ L(M) \nsubseteq L(M')\}$ with $M'$ a TM that always halt is undecidable
<p>I've done some other problems by reduction, but I'm quite stuck here. I'm not really sure what to do with $M'$. I know that because $L(M) \nsubseteq L(M')$ there exists $w \in L(M)$ and $w \notin L(M')$ and I'm trying to create the machine that ignores the input and accepts only when M accepts $w$, but I'm kinda st...
turing machines reductions
1
Prove that $L^{\nsubseteq}_{M'}=\{ \langle M \rangle \ | \ L(M) \nsubseteq L(M')\}$ with $M'$ a TM that always halt is undecidable -- (turing machines reductions) <p>I've done some other problems by reduction, but I'm quite stuck here. I'm not really sure what to do with $M'$. I know that because $L(M) \nsubseteq L(M')...
habedi/stack-exchange-dataset
61,140
Compact, reversible mapping from set partitions of length k to integers
<p>Given a set $S$ of length $n$, I'm looking to map all the $k$-length partitions of $S$ onto the set of integers such that these integers are as close to 0 as possible. Ideally the range would be $\left[0, {n \brace k}\right)$.</p>&#xA;&#xA;<p>Ideally this mapping and its inverse would be easy to compute.</p>&#xA;
combinatorics sets partition problem
1
Compact, reversible mapping from set partitions of length k to integers -- (combinatorics sets partition problem) <p>Given a set $S$ of length $n$, I'm looking to map all the $k$-length partitions of $S$ onto the set of integers such that these integers are as close to 0 as possible. Ideally the range would be $\left[0...
habedi/stack-exchange-dataset
61,148
AVL Tree Height
<p>What is the height of an AVL Tree? I keep finding contradicting definitions.</p>&#xA;&#xA;<p>I found these two on wiki:</p>&#xA;&#xA;<p><strong>Height of node</strong>:&#xA;The height of a node is the number of edges on the longest path between that node and a leaf.</p>&#xA;&#xA;<p><strong>Height of tree</strong>:&#...
data structures trees
1
AVL Tree Height -- (data structures trees) <p>What is the height of an AVL Tree? I keep finding contradicting definitions.</p>&#xA;&#xA;<p>I found these two on wiki:</p>&#xA;&#xA;<p><strong>Height of node</strong>:&#xA;The height of a node is the number of edges on the longest path between that node and a leaf.</p>&#xA...
habedi/stack-exchange-dataset
61,150
Find the duplicates in a list of floating point numbers
<p>I receive a list of real numbers ( <code>float</code> ) between $0$ and $1$. The list has length $N+1$ and I need to find two numbers on the list which are $\le \frac{1}{N}$ apart. Here is an example test case:</p>&#xA;&#xA;<pre><code>[ 0. , 0.31662479, 0.63324958, 0.94987437, 0.26649916,&#xA; 0.583123...
sorting integers floating point lists
1
Find the duplicates in a list of floating point numbers -- (sorting integers floating point lists) <p>I receive a list of real numbers ( <code>float</code> ) between $0$ and $1$. The list has length $N+1$ and I need to find two numbers on the list which are $\le \frac{1}{N}$ apart. Here is an example test case:</p>&#...
habedi/stack-exchange-dataset
61,156
A question on the linear speedup theorem
<p>I am trying to understand the linear speedup theorem:</p>&#xA;&#xA;<p>Let $L$ be a decidable language. Let $X^L$ be the set of all deterministic Turing machines which decide $L$. For a word $x \in \Sigma^*$ define:&#xA;$t^L(x) := \min_{M \in X^L} t_M(x)$ where $t_M(x)$ is the time of $M$ on input $x$. Now let's choo...
turing machines time complexity
1
A question on the linear speedup theorem -- (turing machines time complexity) <p>I am trying to understand the linear speedup theorem:</p>&#xA;&#xA;<p>Let $L$ be a decidable language. Let $X^L$ be the set of all deterministic Turing machines which decide $L$. For a word $x \in \Sigma^*$ define:&#xA;$t^L(x) := \min_{M \...
habedi/stack-exchange-dataset
61,159
What is the difference between following two finite automata?
<p>I'm solving problem of drawing the finite automata of <code>(1+0)*(10)</code>. Which is any string ends with <code>10</code>. I've drawn the following diagram for this one:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/5lnFK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5lnFK.png" alt="My D...
automata finite automata
1
What is the difference between following two finite automata? -- (automata finite automata) <p>I'm solving problem of drawing the finite automata of <code>(1+0)*(10)</code>. Which is any string ends with <code>10</code>. I've drawn the following diagram for this one:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/5...
habedi/stack-exchange-dataset
61,161
Is there an example of an oracle A such that P = NP but $\mathsf{P}^A\neq\mathsf{NP}^A$?
<p>The question is stated in the title, I would like to see a counter example if there is any. &#xA;Thanks.</p>&#xA;
np polynomial time oracle machines
1
Is there an example of an oracle A such that P = NP but $\mathsf{P}^A\neq\mathsf{NP}^A$? -- (np polynomial time oracle machines) <p>The question is stated in the title, I would like to see a counter example if there is any. &#xA;Thanks.</p>&#xA;
habedi/stack-exchange-dataset
61,164
On maximum independent set of line graphs
<p>Are there any special algorithms for maximum independent set of line graphs? Could this special case be in $\mathsf{P}$?</p>&#xA;
algorithms complexity theory graphs polynomial time
1
On maximum independent set of line graphs -- (algorithms complexity theory graphs polynomial time) <p>Are there any special algorithms for maximum independent set of line graphs? Could this special case be in $\mathsf{P}$?</p>&#xA;
habedi/stack-exchange-dataset
61,177
Formal notations of equivalencence between floating point expressions
<p>In an informal context, most programmers might call these two expressions "equal" and no one would be mislead:</p>&#xA;&#xA;<pre><code>(a + b) + c&#xA;a + (b + c)&#xA;</code></pre>&#xA;&#xA;<p>For floating point numbers, we know that these two expressions are not strictly equivalent (in the sense that they evaluate ...
notation floating point
1
Formal notations of equivalencence between floating point expressions -- (notation floating point) <p>In an informal context, most programmers might call these two expressions "equal" and no one would be mislead:</p>&#xA;&#xA;<pre><code>(a + b) + c&#xA;a + (b + c)&#xA;</code></pre>&#xA;&#xA;<p>For floating point number...
habedi/stack-exchange-dataset
61,180
Uniformly sampling from cycles of a graph
<p>I was wondering if, given an arbitrary cycle basis (that's complete, e.g. every cycle in the graph can be expressed as the $\mathbb{Z}/2\mathbb{Z}$ sum of elements from the basis) of some graph $G$, is there some way of sampling all cycles uniformly? I'm not able to find papers on it, and I was wondering if anyone h...
graphs sampling
1
Uniformly sampling from cycles of a graph -- (graphs sampling) <p>I was wondering if, given an arbitrary cycle basis (that's complete, e.g. every cycle in the graph can be expressed as the $\mathbb{Z}/2\mathbb{Z}$ sum of elements from the basis) of some graph $G$, is there some way of sampling all cycles uniformly? I'm...
habedi/stack-exchange-dataset
61,182
Is it possible to add "memory" to a neural network?
<p>Suppose I have a NN with one hidden layer, 10 inputs and 5 outputs, intended to be used as a (for example) game-bot AI. Would it make any sense to add, say, 5 (insert any number here) more inputs and outputs, and directly link these outputs from a previous step to these additional inputs of the next?</p>&#xA;&#xA;<p...
neural networks
1
Is it possible to add "memory" to a neural network? -- (neural networks) <p>Suppose I have a NN with one hidden layer, 10 inputs and 5 outputs, intended to be used as a (for example) game-bot AI. Would it make any sense to add, say, 5 (insert any number here) more inputs and outputs, and directly link these outputs fro...
habedi/stack-exchange-dataset
61,184
Get term type during evaluation using Hindley-Milner type system
<p>I've implemented a lambda calculus evaluator and use the Hindley-Milner algorithm to infer terms types and ensure type correctness without the user having to explicitly annotate types. </p>&#xA;&#xA;<p>But now I'd like to add a <code>typeof</code> operator that given a term, it returns the type of the term. So far, ...
lambda calculus type checking type inference
1
Get term type during evaluation using Hindley-Milner type system -- (lambda calculus type checking type inference) <p>I've implemented a lambda calculus evaluator and use the Hindley-Milner algorithm to infer terms types and ensure type correctness without the user having to explicitly annotate types. </p>&#xA;&#xA;<p>...
habedi/stack-exchange-dataset
61,197
Are two strings equal if all deciders for a language take the same amount of time for both?
<p>Let $X_*^L$ be the set of all deterministic Turing machines $M$ which decide the language $L$ and have the property:</p>&#xA;&#xA;<p>$\forall x,y \in \Sigma^*: t_M(xy) \ge t_M(x) + t_M(y)$ (**)</p>&#xA;&#xA;<p>where $t_M(w)$ is the time of $M$ on input $w$.</p>&#xA;&#xA;<p>Define for all $x,y\in \Sigma^*$:</p>&#xA;&...
turing machines strings string metrics
1
Are two strings equal if all deciders for a language take the same amount of time for both? -- (turing machines strings string metrics) <p>Let $X_*^L$ be the set of all deterministic Turing machines $M$ which decide the language $L$ and have the property:</p>&#xA;&#xA;<p>$\forall x,y \in \Sigma^*: t_M(xy) \ge t_M(x) + ...
habedi/stack-exchange-dataset
61,219
W[1]-hardness of Steiner tree w.r.t. number of non-terminal vertices
<p>This is an exercice is Rolf Niedermeier's book "Invitation to fixed-parameter algorithms", Chapter 13. </p>&#xA;&#xA;<p>Show that the following problem is W[1]-hard:&#xA;Steiner Tree in Graphs with respect to the parameter "number of non-terminal vertices".</p>&#xA;&#xA;<p>The way I understand it, if there are most...
complexity theory
1
W[1]-hardness of Steiner tree w.r.t. number of non-terminal vertices -- (complexity theory) <p>This is an exercice is Rolf Niedermeier's book "Invitation to fixed-parameter algorithms", Chapter 13. </p>&#xA;&#xA;<p>Show that the following problem is W[1]-hard:&#xA;Steiner Tree in Graphs with respect to the parameter "...
habedi/stack-exchange-dataset
61,220
Where can I find a data set of graphs with known domination numbers?
<p>I implemented an algorithm to find the minimum dominating set of a graph. I want to check the output of the algorithm against some graphs for which the domination number has been determined.</p>&#xA;&#xA;<p>Where can I find graphs with a known domination number?</p>&#xA;
graphs
1
Where can I find a data set of graphs with known domination numbers? -- (graphs) <p>I implemented an algorithm to find the minimum dominating set of a graph. I want to check the output of the algorithm against some graphs for which the domination number has been determined.</p>&#xA;&#xA;<p>Where can I find graphs with ...
habedi/stack-exchange-dataset
61,226
Is there another common name for dominating set in graphs?
<p>I am looking for graphs which the value of a minimum dominating set is known (<a href="https://cs.stackexchange.com/questions/61220/where-can-i-find-a-data-set-of-graphs-with-the-number-of-dominating-set">Where can I find a data set of graphs with known domination numbers?</a>). So far I have not found anything, so ...
graphs terminology
1
Is there another common name for dominating set in graphs? -- (graphs terminology) <p>I am looking for graphs which the value of a minimum dominating set is known (<a href="https://cs.stackexchange.com/questions/61220/where-can-i-find-a-data-set-of-graphs-with-the-number-of-dominating-set">Where can I find a data set o...
habedi/stack-exchange-dataset
61,232
Find a Minimal Set of Combined Tuples
<p><strong>Suppose I have a set of <em>n</em> ordered tuples, all of the same, fixed dimension</strong>. The tuples' values are integers, with <code>#</code>s indicating an integer I don't care about. For example:</p>&#xA;&#xA;<blockquote>&#xA; <p>{ (1,2,5), (4,2,3), (1,2,#), (#,2,3) }</p>&#xA;</blockquote>&#xA;&#xA...
algorithms approximation
1
Find a Minimal Set of Combined Tuples -- (algorithms approximation) <p><strong>Suppose I have a set of <em>n</em> ordered tuples, all of the same, fixed dimension</strong>. The tuples' values are integers, with <code>#</code>s indicating an integer I don't care about. For example:</p>&#xA;&#xA;<blockquote>&#xA; <p>{...
habedi/stack-exchange-dataset
61,235
Formal notion of a call graph for Turing machines
<p>To most computer programs one can assign a "<a href="https://en.wikipedia.org/wiki/Call_graph" rel="nofollow">call graph</a>".&#xA;Is there a formal notion of call graphs of Turing machines?</p>&#xA;&#xA;<p>Motivation is, that one could intuitively call a decidable language $L$ "irreducible" if every Turing machine ...
turing machines programming languages data flow analysis
1
Formal notion of a call graph for Turing machines -- (turing machines programming languages data flow analysis) <p>To most computer programs one can assign a "<a href="https://en.wikipedia.org/wiki/Call_graph" rel="nofollow">call graph</a>".&#xA;Is there a formal notion of call graphs of Turing machines?</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
61,239
Why is PH in PSPACE?
<p>$PH \subseteq PSPACE$.</p>&#xA;&#xA;<p>In order to prove it, one has to show that for a language $A \in \Sigma_k$ (for some $k \in \mathbb{N}$) there exists a turing machine $M_A$ that decides it in polynomial space.</p>&#xA;&#xA;<p>I am having a hard time understanding why this is true. I'll try to explain:</p>&#xA...
complexity theory complexity classes space complexity
1
Why is PH in PSPACE? -- (complexity theory complexity classes space complexity) <p>$PH \subseteq PSPACE$.</p>&#xA;&#xA;<p>In order to prove it, one has to show that for a language $A \in \Sigma_k$ (for some $k \in \mathbb{N}$) there exists a turing machine $M_A$ that decides it in polynomial space.</p>&#xA;&#xA;<p>I am...
habedi/stack-exchange-dataset
61,244
Minimum number of sets of unreachable vertices for directed acyclic graph (DAG)
<p>I have a DAG with vertices $V$ and edges $E$. If $v,w \in V$ are vertices such that $v$ is not reachable from $w$ and $w$ is not reachable from $v$, I will say that $\langle v,w \rangle$ is an <em>unreachable pair</em>.</p>&#xA;&#xA;<p>I want to implement an efficient algorithm which takes this DAG as input, and pr...
algorithms graphs sets dag
1
Minimum number of sets of unreachable vertices for directed acyclic graph (DAG) -- (algorithms graphs sets dag) <p>I have a DAG with vertices $V$ and edges $E$. If $v,w \in V$ are vertices such that $v$ is not reachable from $w$ and $w$ is not reachable from $v$, I will say that $\langle v,w \rangle$ is an <em>unreach...
habedi/stack-exchange-dataset
61,260
Master Theorem and rounding up to the nearest integer
<p>For the master theorem for recurrences of the form</p>&#xA;&#xA;<p>$$T(n) = a\,T\!\left(\tfrac{n}{b}\right) + f(n)\,,$$</p>&#xA;&#xA;<p>what difference would it make if the split was into calls of $\lceil n/b\rceil$ instead of $n/b$? My guess is that this would only allow splits that are natural numbers, and obvious...
recurrence relation master theorem
1
Master Theorem and rounding up to the nearest integer -- (recurrence relation master theorem) <p>For the master theorem for recurrences of the form</p>&#xA;&#xA;<p>$$T(n) = a\,T\!\left(\tfrac{n}{b}\right) + f(n)\,,$$</p>&#xA;&#xA;<p>what difference would it make if the split was into calls of $\lceil n/b\rceil$ instead...
habedi/stack-exchange-dataset
62,275
Can every self-modifying algorithm be modelled by a non-selfmodifying algorithm?
<p>If we have any arbitrary computer program that can modify its instructions, is it possible to simulate that program with a program that cannot modify its instructions?</p>&#xA;&#xA;<hr>&#xA;&#xA;<p><strong>Edit:</strong></p>&#xA;&#xA;<p>I am new to stackexchange so not sure if I'm allowed to ask a NEW question here,...
computability computation models turing completeness church turing thesis
1
Can every self-modifying algorithm be modelled by a non-selfmodifying algorithm? -- (computability computation models turing completeness church turing thesis) <p>If we have any arbitrary computer program that can modify its instructions, is it possible to simulate that program with a program that cannot modify its ins...
habedi/stack-exchange-dataset
62,293
Distance query in trees with integer edge weights (Constant time, linear space)
<p>Consider an unrooted tree with integer edge weights. I'm looking for a linear space data structure which allows for constant time distance queries (finding the distance, i.e. the sum of edge weights, between any two vertices).</p>&#xA;&#xA;<p>Is this possible? If yes, how? I have an idea that it should be possible u...
graphs data structures trees
1
Distance query in trees with integer edge weights (Constant time, linear space) -- (graphs data structures trees) <p>Consider an unrooted tree with integer edge weights. I'm looking for a linear space data structure which allows for constant time distance queries (finding the distance, i.e. the sum of edge weights, bet...
habedi/stack-exchange-dataset
62,303
Locality-sensitive hashing random projection
<p>I'm trying to understand how the LSH works for Cosine Similarity metric. For instance, let's say you have $\vec{v} \in \mathbb{R}^d$ and the random vectors $\vec{r_{i}} \sim \mathcal{N}(0, 1)^d$ that will be used for the random projection. So, in LSH for Cosine Similarity, the define the hash function $h_i(\vec{v}) ...
hash linear algebra hashing
1
Locality-sensitive hashing random projection -- (hash linear algebra hashing) <p>I'm trying to understand how the LSH works for Cosine Similarity metric. For instance, let's say you have $\vec{v} \in \mathbb{R}^d$ and the random vectors $\vec{r_{i}} \sim \mathcal{N}(0, 1)^d$ that will be used for the random projection....
habedi/stack-exchange-dataset
62,305
Optimizing hash table for common subset of keys?
<p>Are there variants of hash tables that take advantage of the likely distribution of key values? For example, if I'm using utf-8 encoded unicode strings as identifiers in a compiler but expect the majority of them to fit into ASCII, can I optimize for that use case?</p>&#xA;
data structures strings hash tables
1
Optimizing hash table for common subset of keys? -- (data structures strings hash tables) <p>Are there variants of hash tables that take advantage of the likely distribution of key values? For example, if I'm using utf-8 encoded unicode strings as identifiers in a compiler but expect the majority of them to fit into AS...
habedi/stack-exchange-dataset
62,306
Can integer linear programs have non-integer OPT solutions?
<p>Why is it that <strong>every</strong> integer linear program has optimal solutions that are integers? At least in online text books, they are always integers. Can solutions of ILPs only be integers? </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/eovuN.png" rel="nofollow noreferrer"><img src="https://i.stack.img...
optimization integer programming
1
Can integer linear programs have non-integer OPT solutions? -- (optimization integer programming) <p>Why is it that <strong>every</strong> integer linear program has optimal solutions that are integers? At least in online text books, they are always integers. Can solutions of ILPs only be integers? </p>&#xA;&#xA;<p><a ...
habedi/stack-exchange-dataset
62,308
How Types avoids Russel's Paradox?
<p>I gone through the Russel's paradox. </p>&#xA;&#xA;<p>From Wikipedia :</p>&#xA;&#xA;<blockquote>&#xA; <p>According to naive set theory, any definable collection is a set. Let R be the set of all sets that are not members of themselves. If R is not a member of itself, then its definition dictates that it must contai...
type theory mathematical foundations
1
How Types avoids Russel's Paradox? -- (type theory mathematical foundations) <p>I gone through the Russel's paradox. </p>&#xA;&#xA;<p>From Wikipedia :</p>&#xA;&#xA;<blockquote>&#xA; <p>According to naive set theory, any definable collection is a set. Let R be the set of all sets that are not members of themselves. If ...
habedi/stack-exchange-dataset
62,309
On proving NP-completeness by reduction to 3-partition problem
<p>Consider a problem $X$ can be reduced to 3-partition problem. So, when 3-partition has a solution then $X$ has a solution. But if 3-partition does not have a solution, they $X$ may or may not have a solution. In this case, is it legal to say that the problem $X$ is np-complete? </p>&#xA;
complexity theory np complete reductions
1
On proving NP-completeness by reduction to 3-partition problem -- (complexity theory np complete reductions) <p>Consider a problem $X$ can be reduced to 3-partition problem. So, when 3-partition has a solution then $X$ has a solution. But if 3-partition does not have a solution, they $X$ may or may not have a solution....
habedi/stack-exchange-dataset
62,313
Finding a maximum-weight base of a a matroid, in reverse
<p>Given a <a href="https://en.wikipedia.org/wiki/Weighted_matroid" rel="nofollow">weighted matroid</a> with positive weights, we can find a independent set with a maximum weight with a greedy algorithm:</p>&#xA;&#xA;<ul>&#xA;<li>Start with an empty set (by definition of matroid, it is independent).</li>&#xA;<li>Add an...
optimization combinatorics greedy algorithms matroids
1
Finding a maximum-weight base of a a matroid, in reverse -- (optimization combinatorics greedy algorithms matroids) <p>Given a <a href="https://en.wikipedia.org/wiki/Weighted_matroid" rel="nofollow">weighted matroid</a> with positive weights, we can find a independent set with a maximum weight with a greedy algorithm:<...
habedi/stack-exchange-dataset
62,317
A question on decidable formal languages and turing machines
<p>Let $L' \subseteq L \subseteq \Sigma^*$ be decidable languages with deterministic Turing machines $M'$ and $M$ which decide the languages. Typically we have $t_M(w) \le t_{M'}(w)$ for all $w \in \Sigma^*$, where $t_M(w)$ is the time of $M$ on input $w$. </p>&#xA;&#xA;<p>Suppose furthermore that $M$ and $M'$ have min...
formal languages turing machines
1
A question on decidable formal languages and turing machines -- (formal languages turing machines) <p>Let $L' \subseteq L \subseteq \Sigma^*$ be decidable languages with deterministic Turing machines $M'$ and $M$ which decide the languages. Typically we have $t_M(w) \le t_{M'}(w)$ for all $w \in \Sigma^*$, where $t_M(w...
habedi/stack-exchange-dataset
62,320
Bankers Algorithm-Is the system in safe state?
<p>Could somebody please provide a step-through approach to solving the following problem using the Banker's Algorithm?</p>&#xA;&#xA;<p>A system contains 10 units of resource class Ru. The resource requirements of three user processes P1, P2 and P3 are as follows</p>&#xA;&#xA;<pre><code> | P1 | ...
algorithms operating systems deadlocks
1
Bankers Algorithm-Is the system in safe state? -- (algorithms operating systems deadlocks) <p>Could somebody please provide a step-through approach to solving the following problem using the Banker's Algorithm?</p>&#xA;&#xA;<p>A system contains 10 units of resource class Ru. The resource requirements of three user proc...
habedi/stack-exchange-dataset
62,321
Lamport’s fast mutual exclusion algorithm intuition
<p>Here's Lamport’s fast mutual exclusion algorithm:</p>&#xA;&#xA;<pre><code>want[i]:=true&#xA;fast-lock:=i&#xA;if slow-lock&lt;&gt;0 then&#xA; want[i]:=false&#xA; while (slow-lock&lt;&gt;0) {//busy wait}&#xA; goto 1&#xA;slow-lock:=i&#xA;if fast-lock &lt;&gt; i then&#xA; want[i]:=false&#xA; for j:=1...
algorithms concurrency mutual exclusion
1
Lamport’s fast mutual exclusion algorithm intuition -- (algorithms concurrency mutual exclusion) <p>Here's Lamport’s fast mutual exclusion algorithm:</p>&#xA;&#xA;<pre><code>want[i]:=true&#xA;fast-lock:=i&#xA;if slow-lock&lt;&gt;0 then&#xA; want[i]:=false&#xA; while (slow-lock&lt;&gt;0) {//busy wait}&#xA; g...
habedi/stack-exchange-dataset
62,327
Full circularity vs strong circularity for attribute grammars
<p>Attributes of an attribute grammar can have a circular dependency. In my compiler construction course I learned, that there are two types of circularity for attribute grammars:</p>&#xA;&#xA;<ul>&#xA;<li>full circularity can be checked in exponential time</li>&#xA;<li>strong circularity can be checked in polynomial t...
formal languages formal grammars compilers attribute grammars
1
Full circularity vs strong circularity for attribute grammars -- (formal languages formal grammars compilers attribute grammars) <p>Attributes of an attribute grammar can have a circular dependency. In my compiler construction course I learned, that there are two types of circularity for attribute grammars:</p>&#xA;&#x...
habedi/stack-exchange-dataset
62,328
Is the relation between the input and output of an arbitrary algorithm describable by a mathematical function?
<p>I hope that this question is clear, and not off-topic:</p>&#xA;&#xA;<p>I have been reading about neural networks (in the AI sense), and the textbook said that an artificial neural network can always be described by a single mathematical function (rather than by an "algorithm" in a register-machine, which is the stan...
algorithms turing machines
1
Is the relation between the input and output of an arbitrary algorithm describable by a mathematical function? -- (algorithms turing machines) <p>I hope that this question is clear, and not off-topic:</p>&#xA;&#xA;<p>I have been reading about neural networks (in the AI sense), and the textbook said that an artificial n...
habedi/stack-exchange-dataset
62,352
Are numbers types and what is "Number"?
<p>I was pondering about what are the numbers. It seems like a number is data type. I mean, like Maybe in Haskell. Because, for instance, one on its own means nothing for me. However, one apple tells me about how many apples does one talking about. Thus, numbers are quite abstract. If somebody asks you "how is it going...
data structures mathematical foundations abstract data types
1
Are numbers types and what is "Number"? -- (data structures mathematical foundations abstract data types) <p>I was pondering about what are the numbers. It seems like a number is data type. I mean, like Maybe in Haskell. Because, for instance, one on its own means nothing for me. However, one apple tells me about how m...
habedi/stack-exchange-dataset
62,358
Approximation ratio when optimal solution is $0$
<p>This might be a basic technicality but I'd like to make sure how to handle it.&#xA;The question is: how do we measure an algorithm's approximation (multiplicative) factor on instances with optimal value $0$.</p>&#xA;&#xA;<p>Suppose I have a minimization problem $Pb$, and it is NP-Hard to decide if a given instance $...
complexity theory approximation
1
Approximation ratio when optimal solution is $0$ -- (complexity theory approximation) <p>This might be a basic technicality but I'd like to make sure how to handle it.&#xA;The question is: how do we measure an algorithm's approximation (multiplicative) factor on instances with optimal value $0$.</p>&#xA;&#xA;<p>Suppose...
habedi/stack-exchange-dataset
62,369
Is it undecidable if the language of a given Turing Machine is the set of composite numbers?
<p>I am aware that the following problems are undecidable and tried to reduce the given problem to one of the following but with no success:</p>&#xA;&#xA;<ol>&#xA;<li>Halting problem</li>&#xA;<li>Blank Tape Halting problem</li>&#xA;<li>State-Entry problem</li>&#xA;<li>If a TM accepts nothing</li>&#xA;<li>If a TM accept...
computability turing machines undecidability
1
Is it undecidable if the language of a given Turing Machine is the set of composite numbers? -- (computability turing machines undecidability) <p>I am aware that the following problems are undecidable and tried to reduce the given problem to one of the following but with no success:</p>&#xA;&#xA;<ol>&#xA;<li>Halting pr...
habedi/stack-exchange-dataset
62,373
Question about branch hazards on 4-stage pipeline
<p>Let's say that conditional branches are resolved at the 2nd-stage on a 4-stage pipeline. Why is there different penalties on a taken branch versus an untaken branch ? Should the penalty be the same for both? I always assumed that the not taken and taken branch penalty is 2 cycles but this is incorrect according to m...
cpu pipelines
1
Question about branch hazards on 4-stage pipeline -- (cpu pipelines) <p>Let's say that conditional branches are resolved at the 2nd-stage on a 4-stage pipeline. Why is there different penalties on a taken branch versus an untaken branch ? Should the penalty be the same for both? I always assumed that the not taken and ...
habedi/stack-exchange-dataset
62,383
Can we find k shortest paths between all pairs faster than solving the pairwise problem repeatedly?
<p>I want to produce $k$ shortest path ($k$ would be less than 10) between all pairs in a graph. The graph is (actually a subway map):</p>&#xA;&#xA;<ul>&#xA;<li>positively weighted</li>&#xA;<li>undirected</li>&#xA;<li>sparse</li>&#xA;<li>with about 100 nodes</li>&#xA;</ul>&#xA;&#xA;<p>My current plan is to apply <a hre...
algorithms graphs optimization shortest path
1
Can we find k shortest paths between all pairs faster than solving the pairwise problem repeatedly? -- (algorithms graphs optimization shortest path) <p>I want to produce $k$ shortest path ($k$ would be less than 10) between all pairs in a graph. The graph is (actually a subway map):</p>&#xA;&#xA;<ul>&#xA;<li>positivel...
habedi/stack-exchange-dataset