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
81,788
When you do a remote desktop connect to another pc which pc's processing power do you have?
<p>Are you just accessing the data and things on the PC you are connecting to or, if it had a better processor/ram/etc, are you able to take advantage of that?</p>&#xA;
computer networks
1
When you do a remote desktop connect to another pc which pc's processing power do you have? -- (computer networks) <p>Are you just accessing the data and things on the PC you are connecting to or, if it had a better processor/ram/etc, are you able to take advantage of that?</p>&#xA;
habedi/stack-exchange-dataset
81,792
What's the difference between $O(1)$ and $o(1)$?
<p>What's the difference between $O(1)$ and $o(1)$ ?</p>&#xA;
asymptotics landau notation
1
What's the difference between $O(1)$ and $o(1)$? -- (asymptotics landau notation) <p>What's the difference between $O(1)$ and $o(1)$ ?</p>&#xA;
habedi/stack-exchange-dataset
81,803
Find all group of neighbors with a constraint weight
<p>Forgive if this seems like a repeated question. However, I couldn't find a specific algorithm to my needs.</p>&#xA;&#xA;<p>I have nodes that have weights with each other. I want to find all unique groups of nodes, with the constraint that every node in the group has a weight with every other node a value that is les...
nearest neighbour
1
Find all group of neighbors with a constraint weight -- (nearest neighbour) <p>Forgive if this seems like a repeated question. However, I couldn't find a specific algorithm to my needs.</p>&#xA;&#xA;<p>I have nodes that have weights with each other. I want to find all unique groups of nodes, with the constraint that ev...
habedi/stack-exchange-dataset
81,805
The communication complexity of Hamming distance mod $4$
<p>If Alice and Bob each have a bit string of length $n$, what is the randomized communication complexity (either one or two-way) of computing the Hamming distance mod $4$? It seems this is hard to search for online but I am sure it must be well known.</p>&#xA;&#xA;<p>The one-way deterministic communication complexit...
communication complexity
1
The communication complexity of Hamming distance mod $4$ -- (communication complexity) <p>If Alice and Bob each have a bit string of length $n$, what is the randomized communication complexity (either one or two-way) of computing the Hamming distance mod $4$? It seems this is hard to search for online but I am sure it...
habedi/stack-exchange-dataset
81,807
Choosing $n$ points to get the closest sum
<p>Let's say there is a set of $N$ real numbers, $x_i, i\in\{1,2,...,N\}$, and we would like to choose $n$ points out of them to get the sum of the chosen points as close as possible to a certain number, $y$, i.e. minimising&#xA;$$&#xA;f(J) = \left[y - \sum_{j\in J}x_j \right]^2 s.t. ~J \subset \{1,2,...,N\} ~\mathrm{a...
algorithms optimization randomized algorithms
1
Choosing $n$ points to get the closest sum -- (algorithms optimization randomized algorithms) <p>Let's say there is a set of $N$ real numbers, $x_i, i\in\{1,2,...,N\}$, and we would like to choose $n$ points out of them to get the sum of the chosen points as close as possible to a certain number, $y$, i.e. minimising&#...
habedi/stack-exchange-dataset
81,809
Is this language countable : $L= \{ w : w \in (1 + 0)^{*} \}$
<p>This is my take :</p>&#xA;&#xA;<p>Epsilon ---> 1</p>&#xA;&#xA;<p>0 --> 2</p>&#xA;&#xA;<p>01 ---> 3</p>&#xA;&#xA;<p>10 ---> 4</p>&#xA;&#xA;<p>11 ---> 5</p>&#xA;&#xA;<p>001 ---> 6</p>&#xA;&#xA;<p>010 ---> 7</p>&#xA;&#xA;<p>.&#xA;.&#xA;.</p>&#xA;&#xA;<p>So therefore we can count them.</p>&#xA;&#xA;<p>But based on thi...
formal languages uncountability
1
Is this language countable : $L= \{ w : w \in (1 + 0)^{*} \}$ -- (formal languages uncountability) <p>This is my take :</p>&#xA;&#xA;<p>Epsilon ---> 1</p>&#xA;&#xA;<p>0 --> 2</p>&#xA;&#xA;<p>01 ---> 3</p>&#xA;&#xA;<p>10 ---> 4</p>&#xA;&#xA;<p>11 ---> 5</p>&#xA;&#xA;<p>001 ---> 6</p>&#xA;&#xA;<p>010 ---> 7</p>&#xA;&#xA...
habedi/stack-exchange-dataset
81,813
Is the equality of two DFAs a decidable problem?
<p>So given two DFAs, is the problem of finding if they generate the same language a Decidable problem?</p>&#xA;&#xA;<p>I already know that Equality of two CFL is not Decidable</p>&#xA;&#xA;<p>but what about Equality of two DFAs? considering most of the problems with DFAs are decidable, is this decidable as well ? </p>...
computability automata finite automata decision problem
1
Is the equality of two DFAs a decidable problem? -- (computability automata finite automata decision problem) <p>So given two DFAs, is the problem of finding if they generate the same language a Decidable problem?</p>&#xA;&#xA;<p>I already know that Equality of two CFL is not Decidable</p>&#xA;&#xA;<p>but what about Eq...
habedi/stack-exchange-dataset
81,814
Does overclocking a cpu speed up a poorly optimised process?
<p><em>Perhaps this isn't exactly a computer science question, but I thought this wouldn't strictly fit in Electrical Engineering either. Let me know if I should move this somewhere else</em></p>&#xA;&#xA;<p>Suppose I have a process that is single-threaded and rather poorly optimised. It doesn't max out my processor, a...
computer architecture cpu
1
Does overclocking a cpu speed up a poorly optimised process? -- (computer architecture cpu) <p><em>Perhaps this isn't exactly a computer science question, but I thought this wouldn't strictly fit in Electrical Engineering either. Let me know if I should move this somewhere else</em></p>&#xA;&#xA;<p>Suppose I have a pro...
habedi/stack-exchange-dataset
81,822
Are the sets of all finite automata and pushdown automata countable?
<p>So considering that set of all turing machines is countably infinite, can we also say that set of all FA machines(DFA/NFA) or set of all PDA machines(DPDA/NPDA) are countably infinite, Considering that we can build all of them with Turing machine?</p>&#xA;
automata finite automata pushdown automata uncountability
1
Are the sets of all finite automata and pushdown automata countable? -- (automata finite automata pushdown automata uncountability) <p>So considering that set of all turing machines is countably infinite, can we also say that set of all FA machines(DFA/NFA) or set of all PDA machines(DPDA/NPDA) are countably infinite, ...
habedi/stack-exchange-dataset
81,838
How could an SMT solver be implemented as simple as possible?
<p>I'm trying to figure out how an SMT solver works as simple as possible.&#xA;Let's assume we have a simple input program with symbolic values <code>x</code> and <code>y</code>.&#xA;E.g.</p>&#xA;&#xA;<pre><code>if (x+y &lt; 20) {&#xA; if (x &gt; 10) {&#xA; if (y &gt; 10) {&#xA; assume(false);&#xA; }...
satisfiability constraint satisfaction smt solvers
1
How could an SMT solver be implemented as simple as possible? -- (satisfiability constraint satisfaction smt solvers) <p>I'm trying to figure out how an SMT solver works as simple as possible.&#xA;Let's assume we have a simple input program with symbolic values <code>x</code> and <code>y</code>.&#xA;E.g.</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
81,843
Dynamic connectivity in forests with constant query time
<p>I'm interested in the <a href="https://en.wikipedia.org/wiki/Dynamic_connectivity" rel="nofollow noreferrer">dynamic connectivity</a> problem for forests. In this problem a forest is subject to updates (edge insertion that do not create cycles and edge deletion) and queries if two nodes are connected.</p>&#xA;&#xA;...
algorithms graphs data structures
1
Dynamic connectivity in forests with constant query time -- (algorithms graphs data structures) <p>I'm interested in the <a href="https://en.wikipedia.org/wiki/Dynamic_connectivity" rel="nofollow noreferrer">dynamic connectivity</a> problem for forests. In this problem a forest is subject to updates (edge insertion tha...
habedi/stack-exchange-dataset
81,844
Amortized analysis of resizing array implementation of a stack
<p>Here is an excerpt from the book Algorithms, 4th edition by R. Sedgewick and K. Wayne:</p>&#xA;&#xA;<blockquote>&#xA; <p>Proposition E. In the resizing array implementation of Stack&#xA; (Algorithm 1.1), the average number of array accesses for any sequence&#xA; of operations starting from an empty data structure...
algorithms amortized analysis
1
Amortized analysis of resizing array implementation of a stack -- (algorithms amortized analysis) <p>Here is an excerpt from the book Algorithms, 4th edition by R. Sedgewick and K. Wayne:</p>&#xA;&#xA;<blockquote>&#xA; <p>Proposition E. In the resizing array implementation of Stack&#xA; (Algorithm 1.1), the average n...
habedi/stack-exchange-dataset
81,845
Find a CFG for univocalic words
<p>I'm trying to figure out how to create a CFG for univocalic words...</p>&#xA;&#xA;<p>Univocalic words are words that have only one the same vowel letter throughout the word</p>&#xA;&#xA;<p>Example:&#xA;September, Anna</p>&#xA;&#xA;<p>Would appreciate any of your help..</p>&#xA;
formal languages context free
1
Find a CFG for univocalic words -- (formal languages context free) <p>I'm trying to figure out how to create a CFG for univocalic words...</p>&#xA;&#xA;<p>Univocalic words are words that have only one the same vowel letter throughout the word</p>&#xA;&#xA;<p>Example:&#xA;September, Anna</p>&#xA;&#xA;<p>Would appreciate...
habedi/stack-exchange-dataset
81,876
Cuckoo filters for non powers-of-2
<p>The Cuckoo filters paper (<a href="https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf" rel="nofollow noreferrer">https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf</a>) claims a 95% load factor, however it seems to make an implicit assumption that the table size is a power of 2, and their implementation ...
combinatorics hash tables probabilistic algorithms bloom filters
1
Cuckoo filters for non powers-of-2 -- (combinatorics hash tables probabilistic algorithms bloom filters) <p>The Cuckoo filters paper (<a href="https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf" rel="nofollow noreferrer">https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf</a>) claims a 95% load factor, howev...
habedi/stack-exchange-dataset
81,890
How to compare algorithms having the same complexity
<p>I am new to programming and want to learn how to compare algorithms having the same complexity and pick the best one. Certain problems can be sloved using several algorithms which have the same complexity. How do i compare such algorithms</p>&#xA;
algorithms complexity theory time complexity space complexity
1
How to compare algorithms having the same complexity -- (algorithms complexity theory time complexity space complexity) <p>I am new to programming and want to learn how to compare algorithms having the same complexity and pick the best one. Certain problems can be sloved using several algorithms which have the same com...
habedi/stack-exchange-dataset
81,896
How to access the bit at a particular index?
<p>How do I access the bit at a particular index in a number using shift operator.&#xA;Say the number is $n$.<br>&#xA;Let the index be $i (i: 0 \le i &lt; n).$<br>&#xA;Rightmost bit is $0$. </p>&#xA;&#xA;<p>The only thing I can think of is:<br>&#xA;$def \, bitAt(n, i)$<br>&#xA;$\,\,\,\,\,\,\,\,m = n &gt;&gt; i+...
algorithms bit manipulation
1
How to access the bit at a particular index? -- (algorithms bit manipulation) <p>How do I access the bit at a particular index in a number using shift operator.&#xA;Say the number is $n$.<br>&#xA;Let the index be $i (i: 0 \le i &lt; n).$<br>&#xA;Rightmost bit is $0$. </p>&#xA;&#xA;<p>The only thing I can think ...
habedi/stack-exchange-dataset
81,918
Is there a universal identity or zero value for folding?
<p>I'm using Haskell notation for illustration, hopefully it is known widely enough for this to make sense.</p>&#xA;&#xA;<p>In the following fold function the second argument is what I'm calling the identity:</p>&#xA;&#xA;<pre><code>foldr :: Foldable t =&gt; (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b&#xA;</code></pr...
functional programming
1
Is there a universal identity or zero value for folding? -- (functional programming) <p>I'm using Haskell notation for illustration, hopefully it is known widely enough for this to make sense.</p>&#xA;&#xA;<p>In the following fold function the second argument is what I'm calling the identity:</p>&#xA;&#xA;<pre><code>fo...
habedi/stack-exchange-dataset
81,920
Finding the largest linear combination that is not possible
<p>Regarding the problem:</p>&#xA;&#xA;<p>What is the largest bet that cannot be made with chips worth $\$7.00 $&#xA;and $\$9.00$? Verify that your answer is correct with both forms of &#xA;induction.</p>&#xA;&#xA;<p>I need to find an algorithmic approach, but till now my approach is to try all possible combinations wi...
algorithms iteration
1
Finding the largest linear combination that is not possible -- (algorithms iteration) <p>Regarding the problem:</p>&#xA;&#xA;<p>What is the largest bet that cannot be made with chips worth $\$7.00 $&#xA;and $\$9.00$? Verify that your answer is correct with both forms of &#xA;induction.</p>&#xA;&#xA;<p>I need to find an...
habedi/stack-exchange-dataset
81,942
Are there any algorithms or data structures that need to find the median value of a set?
<p>I have been reading <a href="http://www.cambridge.org/us/academic/subjects/computer-science/algorithmics-complexity-computer-algebra-and-computational-g/probability-and-computing-randomization-and-probabilistic-techniques-algorithms-and-data-analysis-2nd-edition?format=HB&amp;isbn=9781107154889#ZyaIfPiWTGLBD3bU.97" ...
runtime analysis randomized algorithms
1
Are there any algorithms or data structures that need to find the median value of a set? -- (runtime analysis randomized algorithms) <p>I have been reading <a href="http://www.cambridge.org/us/academic/subjects/computer-science/algorithmics-complexity-computer-algebra-and-computational-g/probability-and-computing-rando...
habedi/stack-exchange-dataset
81,945
How does processing speed affect algorithm performance?
<p>I'm currently taking a class on algorithms, and we are studying algorithmic efficiency. I understand classifying algorithms based on their time complexity, but I am confused about the following category of questions:</p>&#xA;&#xA;<p>Suppose algorithm <em>A</em> has time complexity <em>C</em> (<em>C</em> being along ...
algorithms time complexity
1
How does processing speed affect algorithm performance? -- (algorithms time complexity) <p>I'm currently taking a class on algorithms, and we are studying algorithmic efficiency. I understand classifying algorithms based on their time complexity, but I am confused about the following category of questions:</p>&#xA;&#xA...
habedi/stack-exchange-dataset
81,950
Can a DFA have an empty string as input?
<p>Given string w such that every odd position in w is a 1</p>&#xA;&#xA;<p>My solution is</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/Hs2MI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hs2MI.png" alt="sol1"></a></p>&#xA;&#xA;<p>The book's solution is </p>&#xA;&#xA;<p><a href="https://i.stac...
finite automata
1
Can a DFA have an empty string as input? -- (finite automata) <p>Given string w such that every odd position in w is a 1</p>&#xA;&#xA;<p>My solution is</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/Hs2MI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hs2MI.png" alt="sol1"></a></p>&#xA;&#xA;<p>T...
habedi/stack-exchange-dataset
81,956
What algorithm to use for this subset sum problem
<p>I have a typical subset sum problem and I'm looking to choose the proper algorithm to solve it, the set contains (around) 1000 elements, and elements are constrained to max 22 bits for now.</p>&#xA;&#xA;<p>I have been looking around and looks like the well known O(2^(n/2)) is not an option, and looking into the Dyna...
algorithms time complexity np complete space complexity
1
What algorithm to use for this subset sum problem -- (algorithms time complexity np complete space complexity) <p>I have a typical subset sum problem and I'm looking to choose the proper algorithm to solve it, the set contains (around) 1000 elements, and elements are constrained to max 22 bits for now.</p>&#xA;&#xA;<p>...
habedi/stack-exchange-dataset
81,968
What is the time complexity of finding the residual network in this case?
<p>Here are the details:</p>&#xA;&#xA;<p><strong>(1)</strong> We are given a number $f$ of units of flow that we wish to transmit from the source node to the sink node. For example, $f=5$ units of flow (data or goods) should be transmitted from the source node to the sink node. </p>&#xA;&#xA;<p><strong>(2)</strong> We ...
time complexity network flow
1
What is the time complexity of finding the residual network in this case? -- (time complexity network flow) <p>Here are the details:</p>&#xA;&#xA;<p><strong>(1)</strong> We are given a number $f$ of units of flow that we wish to transmit from the source node to the sink node. For example, $f=5$ units of flow (data or g...
habedi/stack-exchange-dataset
81,971
Relation between Hoare Type Theory and pointers
<p>My understanding is that in Hoare Type Theory every imperative statement has a type of the form <code>{Pre}res:T{Post}</code> where <code>T</code> is the type of the result of the computation and <code>Pre</code> and <code>Post</code> are propositions representing respectively the pre and postconditions of the state...
type theory dependent types hoare logic
1
Relation between Hoare Type Theory and pointers -- (type theory dependent types hoare logic) <p>My understanding is that in Hoare Type Theory every imperative statement has a type of the form <code>{Pre}res:T{Post}</code> where <code>T</code> is the type of the result of the computation and <code>Pre</code> and <code>P...
habedi/stack-exchange-dataset
81,995
Non-deterministic TM and problems in class P
<p>Definition:&#xA;$P$ is the set of languages that can be decided by a deterministic Turing Machine in polynomial time.</p>&#xA;&#xA;<p>I wonder if:&#xA;$P$ equals to the set of languages that can be decided by a non-deterministic Turing Machine in polynomial time?</p>&#xA;&#xA;<p>I think this also has to be true in t...
complexity theory turing machines
1
Non-deterministic TM and problems in class P -- (complexity theory turing machines) <p>Definition:&#xA;$P$ is the set of languages that can be decided by a deterministic Turing Machine in polynomial time.</p>&#xA;&#xA;<p>I wonder if:&#xA;$P$ equals to the set of languages that can be decided by a non-deterministic Turi...
habedi/stack-exchange-dataset
82,015
Maximum depth of a B+ tree
<p>Given $K$...<code># key values</code>, $n$...<code># pointers in a node</code>.</p>&#xA;&#xA;<p>I read somewhere, that the <strong>maximum</strong> depth is defined as $\lceil\log_{\lceil\frac{n}{2}\rceil}(K)\rceil$. However, it is not correct, as I can come up with a counterexample. When the tree is minimum filled,...
data structures search trees balanced search trees
1
Maximum depth of a B+ tree -- (data structures search trees balanced search trees) <p>Given $K$...<code># key values</code>, $n$...<code># pointers in a node</code>.</p>&#xA;&#xA;<p>I read somewhere, that the <strong>maximum</strong> depth is defined as $\lceil\log_{\lceil\frac{n}{2}\rceil}(K)\rceil$. However, it is no...
habedi/stack-exchange-dataset
82,016
Are divide and conquer searches applicable to unimodal decision problems?
<p>Given a sorted list of booleans with consecutive 0s followed by consecutive 1s such as [0,0,0,0,1,1,1], binary search is able to find the first 1 after all the 0s in log(n) time.</p>&#xA;&#xA;<p>Is this technique generalizable to find the index to the maximum of a unimodal <em>boolean</em> list with a single 1 sandw...
algorithms binary search searching
1
Are divide and conquer searches applicable to unimodal decision problems? -- (algorithms binary search searching) <p>Given a sorted list of booleans with consecutive 0s followed by consecutive 1s such as [0,0,0,0,1,1,1], binary search is able to find the first 1 after all the 0s in log(n) time.</p>&#xA;&#xA;<p>Is this ...
habedi/stack-exchange-dataset
82,024
What kind of growth is $O(0.24\cdot K\cdot 2^w)$
<p>I've calculated the running time of an algorithm I'm interested in to be</p>&#xA;&#xA;<p>$$O(0.24\cdot K\cdot 2^{w})\,,$$</p>&#xA;&#xA;<p>where $K$ and&nbsp;$w$ are both variables. ($K$&nbsp;is the number of elements in some set, and $w$&nbsp;is the log of the largest element, so both are variables.)</p>&#xA;&#xA;<...
terminology asymptotics landau notation
1
What kind of growth is $O(0.24\cdot K\cdot 2^w)$ -- (terminology asymptotics landau notation) <p>I've calculated the running time of an algorithm I'm interested in to be</p>&#xA;&#xA;<p>$$O(0.24\cdot K\cdot 2^{w})\,,$$</p>&#xA;&#xA;<p>where $K$ and&nbsp;$w$ are both variables. ($K$&nbsp;is the number of elements in so...
habedi/stack-exchange-dataset
82,027
Can CNN be used for numeric data
<p>I have a numpy array of shape N_Samples x 360, as an example, consider the following:</p>&#xA;&#xA;<pre><code> [ 89 94 56 - - - 55] &lt;-360 length vector&#xA; [ 56 98 55 - - - 98]&#xA; | |&#xA; | |&#xA; [ 67 55 99 - - - 77] Total N such vectors&#xA;</code></pre>&#xA;&#xA;<p>There i...
artificial intelligence neural networks
1
Can CNN be used for numeric data -- (artificial intelligence neural networks) <p>I have a numpy array of shape N_Samples x 360, as an example, consider the following:</p>&#xA;&#xA;<pre><code> [ 89 94 56 - - - 55] &lt;-360 length vector&#xA; [ 56 98 55 - - - 98]&#xA; | |&#xA; | |&#xA; [...
habedi/stack-exchange-dataset
82,033
Bit Blasting Algorithm
<p>I found a pseudo algorithm which describes bit blasting: <a href="https://books.google.at/books?id=anJsH3Dq5BIC&amp;pg=PA156&amp;lpg=PA156&amp;dq=bit%20blasting%20algorithm&amp;source=bl&amp;ots=q8QrBjz3ky&amp;sig=iJlLk1LaEoB19UDasGrdmKsq0pA&amp;hl=de&amp;sa=X&amp;ved=0ahUKEwjAkPKH09bWAhUFJJoKHYT_BtAQ6AEIYTAN#v=onep...
satisfiability sat solvers smt solvers bit blasting
1
Bit Blasting Algorithm -- (satisfiability sat solvers smt solvers bit blasting) <p>I found a pseudo algorithm which describes bit blasting: <a href="https://books.google.at/books?id=anJsH3Dq5BIC&amp;pg=PA156&amp;lpg=PA156&amp;dq=bit%20blasting%20algorithm&amp;source=bl&amp;ots=q8QrBjz3ky&amp;sig=iJlLk1LaEoB19UDasGrdmKs...
habedi/stack-exchange-dataset
82,047
Name for tree where each node has the aggregate of its children
<p>Is there a general name for a tree in which the leaves have some arbitrary values and the value of every other node is some "aggregate" function of its children?</p>&#xA;&#xA;<p>An example where the aggregate function is the sum:</p>&#xA;&#xA;<pre><code> 14&#xA; / \&#xA;4 10&#xA; / | \&#xA; 7 1 2&#xA;</code...
data structures terminology trees
1
Name for tree where each node has the aggregate of its children -- (data structures terminology trees) <p>Is there a general name for a tree in which the leaves have some arbitrary values and the value of every other node is some "aggregate" function of its children?</p>&#xA;&#xA;<p>An example where the aggregate funct...
habedi/stack-exchange-dataset
82,051
Expressing that a functor is natural
<p>The Haskell <code>List: Type -&gt; Type</code> constructor implements the <code>Functor</code> typeclass with function <code>fmap f = map f</code>. This functor that applies the morphism <code>f</code> to each element of a list works, but there are other equally valid functors, for example <code>fmap f = map f . rev...
category theory
1
Expressing that a functor is natural -- (category theory) <p>The Haskell <code>List: Type -&gt; Type</code> constructor implements the <code>Functor</code> typeclass with function <code>fmap f = map f</code>. This functor that applies the morphism <code>f</code> to each element of a list works, but there are other equa...
habedi/stack-exchange-dataset
82,063
DFA for the set of strings of 0’s and 1’s such that there are two 0’s separated by a number of positions that is a multiple of 4
<p>I've being trying to understand this statement for quite a long time especially the "number of positions" part, but i can't seem to interpret it correctly.What i understand is that the statement means that there should be two 0's seperated by a number of symbols that are multiples of 4 i-e (0 , 4 , 8 , 16...), accor...
formal languages finite automata
1
DFA for the set of strings of 0’s and 1’s such that there are two 0’s separated by a number of positions that is a multiple of 4 -- (formal languages finite automata) <p>I've being trying to understand this statement for quite a long time especially the "number of positions" part, but i can't seem to interpret it corre...
habedi/stack-exchange-dataset
82,065
In the context of parametrized complexity
<p>For instance, Subset Sum is classified :</p>&#xA;&#xA;<pre><code> W[1]-hard, in W[P] (parameter:k, subset cardinality)&#xA;</code></pre>&#xA;&#xA;<p>by the <a href="http://www.sprg.uniroma2.it/home/cesati/research/compendium/compendium.pdf" rel="nofollow noreferrer">Compendium of Parameterized Problems</a>, how t...
complexity theory parameterized complexity
1
In the context of parametrized complexity -- (complexity theory parameterized complexity) <p>For instance, Subset Sum is classified :</p>&#xA;&#xA;<pre><code> W[1]-hard, in W[P] (parameter:k, subset cardinality)&#xA;</code></pre>&#xA;&#xA;<p>by the <a href="http://www.sprg.uniroma2.it/home/cesati/research/compendium...
habedi/stack-exchange-dataset
82,084
Determining Language from Context Free Grammar
<p>I am trying to understand how to write the language given the predicates of the context free grammar. As an example, I have the following grammar:</p>&#xA;&#xA;<p>$S \to 0B \mid 1A$</p>&#xA;&#xA;<p>$A \to 0 \mid 0S \mid 1AA$</p>&#xA;&#xA;<p>$B \to 1 \mid 1S \mid 0BB$</p>&#xA;&#xA;<p>What this says to me is that the ...
formal languages formal grammars
1
Determining Language from Context Free Grammar -- (formal languages formal grammars) <p>I am trying to understand how to write the language given the predicates of the context free grammar. As an example, I have the following grammar:</p>&#xA;&#xA;<p>$S \to 0B \mid 1A$</p>&#xA;&#xA;<p>$A \to 0 \mid 0S \mid 1AA$</p>&#xA...
habedi/stack-exchange-dataset
82,086
Linear programming restricted to rational coefficients
<p>I'm reading the appendix A of Williamson's "the design of approximation algorithms" about linear programming. In the definition of a linear programming it restricted the coefficients of cost function and conditions to be rational numbers. I guess that this restriction is because of time analysis consideration in ter...
polynomial time linear programming
1
Linear programming restricted to rational coefficients -- (polynomial time linear programming) <p>I'm reading the appendix A of Williamson's "the design of approximation algorithms" about linear programming. In the definition of a linear programming it restricted the coefficients of cost function and conditions to be r...
habedi/stack-exchange-dataset
82,093
Is $L=\left \{ wxw \,\,|\,\,w,x \,\in \left ( a+b \right )^{+}\right \}$ Regular?
<h2>Question</h2>&#xA;<blockquote>&#xA;<p>Is <span class="math-container">$L=\left \{ wxw \,\,|\,\,w,x \,\in \left ( a+b \right )^{+}\right \}$</span> regular?</p>&#xA;</blockquote>&#xA;<h2>My Understanding/Doubt</h2>&#xA;<p>We can say that Language</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$L_{2}=\left ...
formal languages regular languages regular expressions
1
Is $L=\left \{ wxw \,\,|\,\,w,x \,\in \left ( a+b \right )^{+}\right \}$ Regular? -- (formal languages regular languages regular expressions) <h2>Question</h2>&#xA;<blockquote>&#xA;<p>Is <span class="math-container">$L=\left \{ wxw \,\,|\,\,w,x \,\in \left ( a+b \right )^{+}\right \}$</span> regular?</p>&#xA;</blockquo...
habedi/stack-exchange-dataset
82,099
Planar graphs of bounded degree: mixing time = cover time?
<p>For many planar graphs of bounded degree (binary tree, lattice, cycle) the (1/4)-mixing time and the cover time are equal, up to log-factors. Is this always the case?</p>&#xA;
graphs planar graphs
1
Planar graphs of bounded degree: mixing time = cover time? -- (graphs planar graphs) <p>For many planar graphs of bounded degree (binary tree, lattice, cycle) the (1/4)-mixing time and the cover time are equal, up to log-factors. Is this always the case?</p>&#xA;
habedi/stack-exchange-dataset
82,108
What is more effective, a do while or a while?
<p>I mean, with the same code, if I modify a do while into a while in this way:</p>&#xA;&#xA;<p>do {$S;$} while ($B$) into a $S;$ while ($B$){$S;$} , there is any change &#xA;in the code?</p>&#xA;&#xA;<p>B = condition</p>&#xA;&#xA;<p>S; = instructions</p>&#xA;
efficiency loops
1
What is more effective, a do while or a while? -- (efficiency loops) <p>I mean, with the same code, if I modify a do while into a while in this way:</p>&#xA;&#xA;<p>do {$S;$} while ($B$) into a $S;$ while ($B$){$S;$} , there is any change &#xA;in the code?</p>&#xA;&#xA;<p>B = condition</p>&#xA;&#xA;<p>S; = instructions...
habedi/stack-exchange-dataset
82,116
Minimum number of moves in this Graph Coloring "Game"
<p>You're given a graph $G = (V, E)$ and a set of colors $C = \{c_1, \cdots, c_v\}$, and the task is as follows:</p>&#xA;&#xA;<ul>&#xA;<li>Color the vertices using the colors in $C$.</li>&#xA;<li>Remove any edges that have differing colors for its endpoints (of course, if a vertex eventually has all edges removed, it c...
graphs
1
Minimum number of moves in this Graph Coloring "Game" -- (graphs) <p>You're given a graph $G = (V, E)$ and a set of colors $C = \{c_1, \cdots, c_v\}$, and the task is as follows:</p>&#xA;&#xA;<ul>&#xA;<li>Color the vertices using the colors in $C$.</li>&#xA;<li>Remove any edges that have differing colors for its endpoi...
habedi/stack-exchange-dataset
82,119
Proving by induction that a function gets called n-1 times
<p>This is the pseudo-code from the problem:</p>&#xA;&#xA;<pre><code>procedure Foo(A,f,L)&#xA;&#xA; Precondition: A[f..L] is an array of integers, f,L, are &#xA; two naturals &gt;=1 with f&lt;=L.&#xA;&#xA; if (f=L) then&#xA; return A[f]&#xA; else&#xA; m &lt;-- [(f+L)/2]&#xA; return min...
algorithms correctness proof
1
Proving by induction that a function gets called n-1 times -- (algorithms correctness proof) <p>This is the pseudo-code from the problem:</p>&#xA;&#xA;<pre><code>procedure Foo(A,f,L)&#xA;&#xA; Precondition: A[f..L] is an array of integers, f,L, are &#xA; two naturals &gt;=1 with f&lt;=L.&#xA;&#xA; i...
habedi/stack-exchange-dataset
82,122
How is the data stored in AVL tree in a memory?
<p>I have been struggling to visualize how is the AVL tree is stored in memory?&#xA;Does it store data in array or list, If so how is it connected with its child and parents. </p>&#xA;
data structures search trees balanced search trees storage
1
How is the data stored in AVL tree in a memory? -- (data structures search trees balanced search trees storage) <p>I have been struggling to visualize how is the AVL tree is stored in memory?&#xA;Does it store data in array or list, If so how is it connected with its child and parents. </p>&#xA;
habedi/stack-exchange-dataset
82,138
Showing the following sequents are not valid
<p>$\lnot \forall x P(x) \models \forall x \lnot P(x)$<br>&#xA;$P(x) : x$ is divisible by 2&#xA;or $P(x) : x$ is a dog.&#xA;or $P(x) can be anything.</p>&#xA;&#xA;<p>I want to show the following sequents are not valid ..Isn't the following sequents equal or the first sequent the whole negation of the statement and the ...
first order logic logical validity
1
Showing the following sequents are not valid -- (first order logic logical validity) <p>$\lnot \forall x P(x) \models \forall x \lnot P(x)$<br>&#xA;$P(x) : x$ is divisible by 2&#xA;or $P(x) : x$ is a dog.&#xA;or $P(x) can be anything.</p>&#xA;&#xA;<p>I want to show the following sequents are not valid ..Isn't the follo...
habedi/stack-exchange-dataset
82,141
Minimum number of edges to add such that there are no bridges on a tree
<p>Any edge of a tree is a bridge. What is the minimum number of edges that I will need to add so that there are no more bridges in a tree? I have seen the solution from the internet the answer is $\frac{|V|}{2}$, where $|V|$ is the number of vertices in the tree. How can I prove it? </p>&#xA;
graphs trees
1
Minimum number of edges to add such that there are no bridges on a tree -- (graphs trees) <p>Any edge of a tree is a bridge. What is the minimum number of edges that I will need to add so that there are no more bridges in a tree? I have seen the solution from the internet the answer is $\frac{|V|}{2}$, where $|V|$ is t...
habedi/stack-exchange-dataset
82,142
Finding Models for a sequent
<p>I am trying to generate models for the following sequent.</p>&#xA;&#xA;<p>$$\exists x \exists y \forall z (z = x \lor z = y)$$</p>&#xA;&#xA;<p>What I have come up with is this.</p>&#xA;&#xA;<p>$$A= \{0,1\}$$</p>&#xA;&#xA;<p>So in this model, for all the values of $z$ there exists $x$ such that $z = x$ or there exist...
first order logic model checking
1
Finding Models for a sequent -- (first order logic model checking) <p>I am trying to generate models for the following sequent.</p>&#xA;&#xA;<p>$$\exists x \exists y \forall z (z = x \lor z = y)$$</p>&#xA;&#xA;<p>What I have come up with is this.</p>&#xA;&#xA;<p>$$A= \{0,1\}$$</p>&#xA;&#xA;<p>So in this model, for all ...
habedi/stack-exchange-dataset
82,145
Why do the definitions of non-deterministic Turing machines look strange?
<p>I read some definitions of the NDTM in several books. Something makes me confused.</p>&#xA;&#xA;<p>Some definitions say that the NDTM $M$ makes an arbitrary choice as to which of its transition functions to apply.</p>&#xA;&#xA;<p>So, if $x \in L(M)$, then $M$ can always guess a branch which leads to $q_{accept}$. An...
turing machines nondeterminism
1
Why do the definitions of non-deterministic Turing machines look strange? -- (turing machines nondeterminism) <p>I read some definitions of the NDTM in several books. Something makes me confused.</p>&#xA;&#xA;<p>Some definitions say that the NDTM $M$ makes an arbitrary choice as to which of its transition functions to ...
habedi/stack-exchange-dataset
82,153
Writing the coherence conditions for a monad in a functional laguage
<p>i recently asked a <a href="https://cs.stackexchange.com/questions/81591/how-is-the-definition-of-monads-in-category-theory-equivalent-to-the-definition">related question</a> about the relationship between monads in category theory and Haskell. The answerer showed me the following classes and instances:</p>&#xA;&#xA...
functional programming category theory
1
Writing the coherence conditions for a monad in a functional laguage -- (functional programming category theory) <p>i recently asked a <a href="https://cs.stackexchange.com/questions/81591/how-is-the-definition-of-monads-in-category-theory-equivalent-to-the-definition">related question</a> about the relationship betwee...
habedi/stack-exchange-dataset
82,155
Is there a difference between type safety and type soundness?
<p>I've been trying to tease apart the definitions of type safety and type soundness and I'm having a heck of a time of it. I asked a professor recently and after a bit of thought he said that there really wasn't any difference. However after reading <a href="http://papl.cs.brown.edu/2014/safety-soundness.html" rel="no...
programming languages type theory type checking
1
Is there a difference between type safety and type soundness? -- (programming languages type theory type checking) <p>I've been trying to tease apart the definitions of type safety and type soundness and I'm having a heck of a time of it. I asked a professor recently and after a bit of thought he said that there really...
habedi/stack-exchange-dataset
82,156
Does the subset sum problem remain $NP$ complete when we increase word size and restrict number of words?
<p>Is the problem </p>&#xA;&#xA;<blockquote>&#xA; <p>'Given $m=\big\lceil{n^b}\big\rceil$ with $b\in(0,1)$ integers $a_1,\cdots,a_m$ each with $\lceil\log_2 |a_i|\rceil=\big\lceil n^a\big\rceil$ with $a\in[1,\infty)$ is there a subset that sums to zero?' </p>&#xA;</blockquote>&#xA;&#xA;<p>$NP$ complete?</p>&#xA;&#xA;<...
np complete subset sum
1
Does the subset sum problem remain $NP$ complete when we increase word size and restrict number of words? -- (np complete subset sum) <p>Is the problem </p>&#xA;&#xA;<blockquote>&#xA; <p>'Given $m=\big\lceil{n^b}\big\rceil$ with $b\in(0,1)$ integers $a_1,\cdots,a_m$ each with $\lceil\log_2 |a_i|\rceil=\big\lceil n^a\b...
habedi/stack-exchange-dataset
82,180
How to find 5 repeated values in O(n) time?
<p>Suppose you have an array of size $n \geq 6$ containing integers from $1$ to $n − 5$, inclusive, with exactly five repeated. I need to propose an algorithm that can find the repeated numbers in $O(n)$ time. I cannot, for the life of me, think of anything. I think sorting, at best, would be $O(n\log n)$? Then travers...
algorithms arrays searching
1
How to find 5 repeated values in O(n) time? -- (algorithms arrays searching) <p>Suppose you have an array of size $n \geq 6$ containing integers from $1$ to $n − 5$, inclusive, with exactly five repeated. I need to propose an algorithm that can find the repeated numbers in $O(n)$ time. I cannot, for the life of me, thi...
habedi/stack-exchange-dataset
82,186
Is $2^n$ steps enough to tell if DTM will run forever?
<p>In the space hierarchy theorem proof for PSPACE from <a href="https://en.wikipedia.org/wiki/Space_hierarchy_theorem" rel="nofollow noreferrer">Wikipedia</a>, we reject the input after $2^{|f(x)|}$ steps on the machine $M$, reportedly to avoid infinite running time.</p>&#xA;&#xA;<p>My question is: how is it that $2^{...
complexity theory proof techniques space complexity
1
Is $2^n$ steps enough to tell if DTM will run forever? -- (complexity theory proof techniques space complexity) <p>In the space hierarchy theorem proof for PSPACE from <a href="https://en.wikipedia.org/wiki/Space_hierarchy_theorem" rel="nofollow noreferrer">Wikipedia</a>, we reject the input after $2^{|f(x)|}$ steps on...
habedi/stack-exchange-dataset
82,193
T(n) = 2T (sqrt(n))+ log n Recurrence
<p>I am aware that the question is asked before but i there is still a confusing part for me.</p>&#xA;&#xA;<p>In book the solution is like that:</p>&#xA;&#xA;<ol>&#xA;<li><p>$T(n) = 2T(\sqrt{n}) + \log(n)$</p></li>&#xA;<li><p>$m = \log n$ yields</p></li>&#xA;<li><p>$T(2^m) = 2T(2^{m/2}) + m$</p></li>&#xA;<li><p>Then $S...
asymptotics recurrence relation
1
T(n) = 2T (sqrt(n))+ log n Recurrence -- (asymptotics recurrence relation) <p>I am aware that the question is asked before but i there is still a confusing part for me.</p>&#xA;&#xA;<p>In book the solution is like that:</p>&#xA;&#xA;<ol>&#xA;<li><p>$T(n) = 2T(\sqrt{n}) + \log(n)$</p></li>&#xA;<li><p>$m = \log n$ yields...
habedi/stack-exchange-dataset
82,197
Working of NPDA
<p>I read that acceptance of languages by DPDA using empty stack is a subset of languages accepted by DPDA using final state because of prefix property.&#xA;I understood this statement by taking an example of regular language a*. Here if we use stack then we can't decide when to pop the symbols from stack. If we pop al...
automata computation models pushdown automata nondeterminism
1
Working of NPDA -- (automata computation models pushdown automata nondeterminism) <p>I read that acceptance of languages by DPDA using empty stack is a subset of languages accepted by DPDA using final state because of prefix property.&#xA;I understood this statement by taking an example of regular language a*. Here if ...
habedi/stack-exchange-dataset
82,215
How to properly describe this behavior (in terms of time complexity)
<p>After completing the time analysis for an algorithm I have been working on, I need some help to write its time complexity properly, let me describe how it works...</p>&#xA;&#xA;<p>The algorithm has two inputs $x$ and $y$.</p>&#xA;&#xA;<p>When $x &lt; 15$, steps to solve are $2^y$, so I know this is $O(2^y)$.</p>&#xA...
asymptotics
1
How to properly describe this behavior (in terms of time complexity) -- (asymptotics) <p>After completing the time analysis for an algorithm I have been working on, I need some help to write its time complexity properly, let me describe how it works...</p>&#xA;&#xA;<p>The algorithm has two inputs $x$ and $y$.</p>&#xA;&...
habedi/stack-exchange-dataset
82,217
Compiler Question : Does the parser detect Errors in these examples or the Semantic routine?
<p>For example, which part will detect these errors, Parser or Semantic Routine?</p>&#xA;<p><strong>1) int Array[10.5] ( wrong size )</strong></p>&#xA;<p><strong>2) int x=&quot;some string&quot;</strong></p>&#xA;<p><strong>3) A[10.5] + 3 (not in declaration, but in the middle of the code)</strong></p>&#xA;<p>The book...
programming languages compilers parsers
1
Compiler Question : Does the parser detect Errors in these examples or the Semantic routine? -- (programming languages compilers parsers) <p>For example, which part will detect these errors, Parser or Semantic Routine?</p>&#xA;<p><strong>1) int Array[10.5] ( wrong size )</strong></p>&#xA;<p><strong>2) int x=&quot;some...
habedi/stack-exchange-dataset
82,221
does mathematical function set in Genetic Programming can have two input values?
<p>I create an individual in GP by using the full method. My individual trees have the same shape and size. I use a binary tree with all the leaves in maxdepth. </p>&#xA;&#xA;<p>The problem is, I can not use the mathematical function set because it accepts two values. therefore I changed mathematical function set like ...
genetic algorithms
1
does mathematical function set in Genetic Programming can have two input values? -- (genetic algorithms) <p>I create an individual in GP by using the full method. My individual trees have the same shape and size. I use a binary tree with all the leaves in maxdepth. </p>&#xA;&#xA;<p>The problem is, I can not use the mat...
habedi/stack-exchange-dataset
82,257
Prove that a language is regular if it is accepted by a DFA with more than one intial state
<p>So I'm currently studying theory of computation, and I was wondering if you could theoretically have more than one initial state in a DFA and if you can prove that a DFA with more than one initial state can depict a <em>regular</em> language? So essentially, can we prove that a language is regular if and only if it ...
formal languages regular languages finite automata
1
Prove that a language is regular if it is accepted by a DFA with more than one intial state -- (formal languages regular languages finite automata) <p>So I'm currently studying theory of computation, and I was wondering if you could theoretically have more than one initial state in a DFA and if you can prove that a DFA...
habedi/stack-exchange-dataset
82,264
How does lexical analyzer remove white spaces from source file?
<p>In compiler at phase lexical analyzer, how does lexical analyze strip out white spaces from source file?.</p>&#xA;
compilers lexical analysis
1
How does lexical analyzer remove white spaces from source file? -- (compilers lexical analysis) <p>In compiler at phase lexical analyzer, how does lexical analyze strip out white spaces from source file?.</p>&#xA;
habedi/stack-exchange-dataset
82,271
How to show that hard-to-compute Boolean functions exist?
<p>How can one show that there exist Boolean functions on $n$ inputs which require at least $2^n/\log{n}$ logic gates to compute?</p>&#xA;&#xA;<p>This problem was originally stated in Exercise 3.16 of Nielsen &amp; Chuang's Quantum Computation and Quantum Information.</p>&#xA;
complexity theory circuits
1
How to show that hard-to-compute Boolean functions exist? -- (complexity theory circuits) <p>How can one show that there exist Boolean functions on $n$ inputs which require at least $2^n/\log{n}$ logic gates to compute?</p>&#xA;&#xA;<p>This problem was originally stated in Exercise 3.16 of Nielsen &amp; Chuang's Quantu...
habedi/stack-exchange-dataset
82,275
Can every DFA be converted to an equivalent one that has a single accept state
<p>I know that it is true for NFAs. It seems similar.</p>&#xA;
automata finite automata
1
Can every DFA be converted to an equivalent one that has a single accept state -- (automata finite automata) <p>I know that it is true for NFAs. It seems similar.</p>&#xA;
habedi/stack-exchange-dataset
82,277
Name of this rearranging/sorting problem?
<p>You are given an array of length $n$. Each element of the array belongs to one of $K$ classes. You are supposed to rearrange the array using minimum number of swap operations so that <em>all elements</em> from the <em>same class</em> are always grouped together, that is they form a contiguous subarray.<br>&#xA;For e...
terminology reference request sorting arrays
1
Name of this rearranging/sorting problem? -- (terminology reference request sorting arrays) <p>You are given an array of length $n$. Each element of the array belongs to one of $K$ classes. You are supposed to rearrange the array using minimum number of swap operations so that <em>all elements</em> from the <em>same cl...
habedi/stack-exchange-dataset
82,279
Solving Subset Sum Without the Use of Dynamic Programming
<p>I am looking for algorithmic techniques to solve the Subset Sum Problem in pseudopolynomial time. There is, of course, a textbook dynamic programming approach for Subset Sum. Have any other algorithmic techniques (Randomized, Linear Programming...) been successfully applied to this problem?</p>&#xA;&#xA;<p>In [1], t...
algorithms np hard pseudo polynomial subset sum
1
Solving Subset Sum Without the Use of Dynamic Programming -- (algorithms np hard pseudo polynomial subset sum) <p>I am looking for algorithmic techniques to solve the Subset Sum Problem in pseudopolynomial time. There is, of course, a textbook dynamic programming approach for Subset Sum. Have any other algorithmic tech...
habedi/stack-exchange-dataset
82,281
Checking large number of configurations with multiple constraints
<p>I have a very large number of constraints such as:</p>&#xA;&#xA;<ol>&#xA;<li>$ A1 \land B1 \land C1 \land D1 \land E1 \land F1$</li>&#xA;<li>$ A2 \land B2 \land C2 \land D2 \land E2 \land F2$</li>&#xA;<li>$ A3 \land B3 \land C3 \land D3 \land E3 \land F3$</li>&#xA;<li>$ A4 \land B4 \land C4 \land D4 \land E4 \land F...
combinatorics satisfiability constraint satisfaction constraint programming
1
Checking large number of configurations with multiple constraints -- (combinatorics satisfiability constraint satisfaction constraint programming) <p>I have a very large number of constraints such as:</p>&#xA;&#xA;<ol>&#xA;<li>$ A1 \land B1 \land C1 \land D1 \land E1 \land F1$</li>&#xA;<li>$ A2 \land B2 \land C2 \land ...
habedi/stack-exchange-dataset
82,282
affinity based static load balancing
<p>I am trying to find a good model the following problem:</p>&#xA;&#xA;<p>Given a collection of work packets <code>x, y, z, ...</code>, and a collection of worker nodes <code>A, B, C, ...</code>, assign packets to nodes.</p>&#xA;&#xA;<p>Each work packet has an affinity per worker-node, shown as a cost-value for how lo...
algorithms optimization combinatorics distributed systems assignment problem
1
affinity based static load balancing -- (algorithms optimization combinatorics distributed systems assignment problem) <p>I am trying to find a good model the following problem:</p>&#xA;&#xA;<p>Given a collection of work packets <code>x, y, z, ...</code>, and a collection of worker nodes <code>A, B, C, ...</code>, assi...
habedi/stack-exchange-dataset
82,288
What is the only condition that would cause the Insert operation of a dynamic data structure to return a “data structure full” error?
<p>I want to know where can I find some resources on this question, because, after researching for a day and half, I couldn't find information specific to my question. Can anyone help me answer my question? I know that dynamic data structures (such as linked lists) can expand the amount of nodes at runtime, but if that...
data structures dynamic programming linked lists
1
What is the only condition that would cause the Insert operation of a dynamic data structure to return a “data structure full” error? -- (data structures dynamic programming linked lists) <p>I want to know where can I find some resources on this question, because, after researching for a day and half, I couldn't find i...
habedi/stack-exchange-dataset
82,298
Summed-area table for circular range queries
<p>A summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a <em>rectangular</em> subset of a grid [<a href="https://en.wikipedia.org/wiki/Summed-area_table" rel="noreferrer">Wikipedia</a>]. Is there any algorithm for quickly and efficiently generating the sum o...
computational geometry image processing
1
Summed-area table for circular range queries -- (computational geometry image processing) <p>A summed-area table is a data structure and algorithm for quickly and efficiently generating the sum of values in a <em>rectangular</em> subset of a grid [<a href="https://en.wikipedia.org/wiki/Summed-area_table" rel="noreferre...
habedi/stack-exchange-dataset
82,306
Do Core Computer Programs Have To Function By Powers Of 2?
<p>As an example, the sRGB Gamut is 256 x 256 x 256 (all powers of 2). I'm aware that computers are generally binary. However, is it simply a matter of simplicity that sRGB was made this way, or was it ESSENTIAL? After all, it probably could've safely provided just as many detectable colors with 192 X 192 X 192.</p>&#x...
computer architecture history
1
Do Core Computer Programs Have To Function By Powers Of 2? -- (computer architecture history) <p>As an example, the sRGB Gamut is 256 x 256 x 256 (all powers of 2). I'm aware that computers are generally binary. However, is it simply a matter of simplicity that sRGB was made this way, or was it ESSENTIAL? After all, it...
habedi/stack-exchange-dataset
82,308
How to handle the time complexity for an optimization that depends on numerical values
<p>I'm working on an algorithm and there is an optimization I applied that is unpredictable because it depends on calculations done on top of the input trough several iterations, so as the input values change, the optimization gain oscillates (between a 20% to 90% step count reduction) as is adaptive to the input.</p>&...
algorithm analysis runtime analysis
1
How to handle the time complexity for an optimization that depends on numerical values -- (algorithm analysis runtime analysis) <p>I'm working on an algorithm and there is an optimization I applied that is unpredictable because it depends on calculations done on top of the input trough several iterations, so as the inp...
habedi/stack-exchange-dataset
82,310
Smallest multiple of a number that gives a specific remainder modulo another number
<p>Given three positive integers $a, b$ and $c$, my task to find the smallest positive integer $k$ such that $(k * a) \mod b = c$.<br>&#xA;I can obviously try values of $k$ from $1$ and higher, until I find the right value. My question is, can this computation be done in $O(1)$ time? That is, is there a direct way to c...
number theory modular arithmetic
1
Smallest multiple of a number that gives a specific remainder modulo another number -- (number theory modular arithmetic) <p>Given three positive integers $a, b$ and $c$, my task to find the smallest positive integer $k$ such that $(k * a) \mod b = c$.<br>&#xA;I can obviously try values of $k$ from $1$ and higher, unti...
habedi/stack-exchange-dataset
82,325
Solving a discrete optimization problem
<p>Assume that $x_1,\dots,x_n$ are $n$ integer variables which takes values in a subset of given numbers, say $x_i\in\{5,6,\dots,5000\}$. Let $f_i(x_i)$ and $g_i(x_i)$ both be non-decreasing non-negative functions of $x_i$. Values of both functions are given for all values of $x_i$. Now consider the optimization proble...
algorithms optimization search algorithms integer programming
1
Solving a discrete optimization problem -- (algorithms optimization search algorithms integer programming) <p>Assume that $x_1,\dots,x_n$ are $n$ integer variables which takes values in a subset of given numbers, say $x_i\in\{5,6,\dots,5000\}$. Let $f_i(x_i)$ and $g_i(x_i)$ both be non-decreasing non-negative functions...
habedi/stack-exchange-dataset
82,340
Complexity of Search Algorithm
<p>I have an algorithm which searches a sorted int array for two elements which sum up to a searched value. First I thought that the complexity is $\mathcal{O}(n)$, but the interpolation search algorithm has a similar approach and has a $\mathcal{O}(\log(log(n)))$ complexity with uniform distributed elements. </p>&#xA;...
algorithm analysis runtime analysis
1
Complexity of Search Algorithm -- (algorithm analysis runtime analysis) <p>I have an algorithm which searches a sorted int array for two elements which sum up to a searched value. First I thought that the complexity is $\mathcal{O}(n)$, but the interpolation search algorithm has a similar approach and has a $\mathcal{O...
habedi/stack-exchange-dataset
82,351
Optimizing greedy solution for choice game
<p>Consider the following game: Two players choose numbers from a sequence of integers with even number of elements. The two can only choose from either the front or the end of the sequence. The purpose is to pick a series of numbers that form a sum greater than the opponent's. The first player always starts and tries ...
algorithms greedy algorithms
1
Optimizing greedy solution for choice game -- (algorithms greedy algorithms) <p>Consider the following game: Two players choose numbers from a sequence of integers with even number of elements. The two can only choose from either the front or the end of the sequence. The purpose is to pick a series of numbers that form...
habedi/stack-exchange-dataset
82,360
Mistake in the Algorithm Design Manual?
<p>Look at this excerpt from the Algorithm Design Manual by Skiena, 2nd Edition</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/T6VOA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T6VOA.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>The sum of the first $n$ <strong>even</strong> in...
integers
1
Mistake in the Algorithm Design Manual? -- (integers) <p>Look at this excerpt from the Algorithm Design Manual by Skiena, 2nd Edition</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/T6VOA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T6VOA.png" alt="enter image description here"></a></p>&#xA;&#x...
habedi/stack-exchange-dataset
82,362
Error in the Algorithm Design Manual?
<p>Take a look at this excerpt from the Algorithm Design Manual, 2nd Edition by Skiena.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/zHzpG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zHzpG.png" alt="enter image description here"></a>&#xA;<a href="https://i.stack.imgur.com/yIxec.png" rel="no...
algorithm analysis
1
Error in the Algorithm Design Manual? -- (algorithm analysis) <p>Take a look at this excerpt from the Algorithm Design Manual, 2nd Edition by Skiena.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/zHzpG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zHzpG.png" alt="enter image description here">...
habedi/stack-exchange-dataset
82,367
Deformation of algorithms
<p>Has there been any attempt at a general theory to describe how an algorithm can be "deformed" to solve the problem more efficiently?</p>&#xA;&#xA;<p>For example suppose we have an algorithm (say sorting a list of numbers) which solves the problem in $O(n^2)$. Can we deform this algorithm (in the "space of algorithms...
algorithms algorithm design
1
Deformation of algorithms -- (algorithms algorithm design) <p>Has there been any attempt at a general theory to describe how an algorithm can be "deformed" to solve the problem more efficiently?</p>&#xA;&#xA;<p>For example suppose we have an algorithm (say sorting a list of numbers) which solves the problem in $O(n^2)$...
habedi/stack-exchange-dataset
82,372
Confusion regarding regular language
<p>A regular language is a language that can be represented by a <code>regular expression</code>(or for which there exists a <em>DFA</em>), then why is language represented by <strong>0$^{+}$</strong> not regular?</p>&#xA;&#xA;<p>I am asking this because for the following question the correct answer is <strong>optio...
formal languages regular languages
1
Confusion regarding regular language -- (formal languages regular languages) <p>A regular language is a language that can be represented by a <code>regular expression</code>(or for which there exists a <em>DFA</em>), then why is language represented by <strong>0$^{+}$</strong> not regular?</p>&#xA;&#xA;<p>I am askin...
habedi/stack-exchange-dataset
82,406
How to calculate the maximum sum over all arrays?
<p>Following question was asked in a online hackathon that has been concluded. &#xA;Given arrays $A_1,\ldots,A_n$ of length $\ell_1,\ldots,\ell_n$, we want to find cyclically rotate each array in a way which maximizes $$ \sum_{i=1}^{n-1} i|A_i[\ell_i] - A_{i+1}[1]|. $$</p>&#xA;&#xA;<p>For example, on input $2,3,1 \mid ...
dynamic programming arrays
1
How to calculate the maximum sum over all arrays? -- (dynamic programming arrays) <p>Following question was asked in a online hackathon that has been concluded. &#xA;Given arrays $A_1,\ldots,A_n$ of length $\ell_1,\ldots,\ell_n$, we want to find cyclically rotate each array in a way which maximizes $$ \sum_{i=1}^{n-1} ...
habedi/stack-exchange-dataset
82,409
Find a polynomial in two or three queries
<p>Black box of $f(x)$ means I can evaluate the polynomial $f(x)$ at any point.</p>&#xA;&#xA;<ul>&#xA;<li><p><strong>Input</strong>: A black box of monic polynomial $f(x) \in\mathbb{Z}^+[x]$ of degree $d$.</p></li>&#xA;<li><p><strong>Output:</strong> The $d$ coefficients of polynomial $f(x)$.</p></li>&#xA;</ul>&#xA;&#x...
algorithms polynomials
1
Find a polynomial in two or three queries -- (algorithms polynomials) <p>Black box of $f(x)$ means I can evaluate the polynomial $f(x)$ at any point.</p>&#xA;&#xA;<ul>&#xA;<li><p><strong>Input</strong>: A black box of monic polynomial $f(x) \in\mathbb{Z}^+[x]$ of degree $d$.</p></li>&#xA;<li><p><strong>Output:</strong>...
habedi/stack-exchange-dataset
82,413
Compute median in unsorted array in $\mathcal{O}(\log{}n)$ space and $\mathcal{O}(\log{}n)$ passes
<p>I want to compute the median in an array of size $m$ which consists of <strong>distinct</strong> integers from $\{0, 1, ..., n-1\}$, I have $m&lt;n$. By median I mean the middle element (rounding up/down if the array size is even) in the sorted version of the array.</p>&#xA;&#xA;<p>Ideally, the expected number of pa...
algorithms randomized algorithms selection problem
1
Compute median in unsorted array in $\mathcal{O}(\log{}n)$ space and $\mathcal{O}(\log{}n)$ passes -- (algorithms randomized algorithms selection problem) <p>I want to compute the median in an array of size $m$ which consists of <strong>distinct</strong> integers from $\{0, 1, ..., n-1\}$, I have $m&lt;n$. By median I ...
habedi/stack-exchange-dataset
82,416
Implementing a Compiler with Macros
<p>I've been thinking about embedded languages (domain-specific or otherwise), and in particular the approach where we define a datatype to represent terms of the embedded language, e.g. (in Haskell):</p>&#xA;&#xA;<pre><code>data Expr = Numeral Int&#xA; | Apply Expr Expr&#xA; | Lambda String Expr&#xA;...
compilers interpreters code generation meta programming
1
Implementing a Compiler with Macros -- (compilers interpreters code generation meta programming) <p>I've been thinking about embedded languages (domain-specific or otherwise), and in particular the approach where we define a datatype to represent terms of the embedded language, e.g. (in Haskell):</p>&#xA;&#xA;<pre><cod...
habedi/stack-exchange-dataset
82,424
Formal model of execution for Java (or general imperative language)
<p>I'm trying to prove some statements about execution in Java programs under some heavy restrictions (basically I have a conjecture that if two methods satisfy a set of constraints for a given input then the are they equivalent - i.e., that return value and state after execution are identical). To prove this I'm looki...
programming languages semantics java operational semantics
1
Formal model of execution for Java (or general imperative language) -- (programming languages semantics java operational semantics) <p>I'm trying to prove some statements about execution in Java programs under some heavy restrictions (basically I have a conjecture that if two methods satisfy a set of constraints for a ...
habedi/stack-exchange-dataset
82,445
In programming languages, generally we do not distinguish relations and functions. Is there a better way to deal with these two concepts?
<p>When we write a mathematical formula, the rule $a=42$ (when we say let $a=42$) and testing them (when we write something like $\ldots \mathrm{if} x=42$) is written in a same equal sign. I think that both of them are representing some relation. However, while programming, we write <code>=</code> for the first circums...
programming languages
1
In programming languages, generally we do not distinguish relations and functions. Is there a better way to deal with these two concepts? -- (programming languages) <p>When we write a mathematical formula, the rule $a=42$ (when we say let $a=42$) and testing them (when we write something like $\ldots \mathrm{if} x=42$)...
habedi/stack-exchange-dataset
82,462
Creating regular expression with sub sequences of strings
<p>I am creating a program which searches for particular types of strings. The alphabet of these strings are in $\{a, b, c\}$, for which every sub string of length 3 contains exactly $c$. Some strings that follow these constraints are:</p>&#xA;&#xA;<p>$cabcbbca$, $cbb$ and $acaacb$</p>&#xA;&#xA;<p>And strings that don...
regular expressions strings
1
Creating regular expression with sub sequences of strings -- (regular expressions strings) <p>I am creating a program which searches for particular types of strings. The alphabet of these strings are in $\{a, b, c\}$, for which every sub string of length 3 contains exactly $c$. Some strings that follow these constrain...
habedi/stack-exchange-dataset
82,466
Prove or disprove the given equivalence
<p>f(n) = n/100 = Ω(n) . I am new at proving asymptotic notations , especially at big-Ω. That's why I even didnt start the beginning myself. I tried to prove myself as looking at other proofs and searched on the internet to find same question but I couldnt find. I dont think so this question is a duplicate of another ...
asymptotics landau notation
1
Prove or disprove the given equivalence -- (asymptotics landau notation) <p>f(n) = n/100 = Ω(n) . I am new at proving asymptotic notations , especially at big-Ω. That's why I even didnt start the beginning myself. I tried to prove myself as looking at other proofs and searched on the internet to find same question but...
habedi/stack-exchange-dataset
82,475
Depth of a leaf in a prefix tree (Huffman Coding)
<p>So, regarding Huffman Coding we know that the optimal way of "storing" it is using a full binary tree (where all nodes have either 0 or 2 children). All leaves are the symbols $i$ of the alphabet we want to encode (all $i$ have a frequency of appearance$f_i$) and if we consider the freq. $f_i$ of each leaf (freq. of...
algorithms trees
1
Depth of a leaf in a prefix tree (Huffman Coding) -- (algorithms trees) <p>So, regarding Huffman Coding we know that the optimal way of "storing" it is using a full binary tree (where all nodes have either 0 or 2 children). All leaves are the symbols $i$ of the alphabet we want to encode (all $i$ have a frequency of ap...
habedi/stack-exchange-dataset
82,479
Optimal Partition of Book Chapters
<p>Suppose you want to read a book with $n$ chapters, and chapter $i$ has $a_i$ pages. Now you want to read the entire book in $d$ days. But there are two restrictions:</p>&#xA;&#xA;<ul>&#xA;<li>by the end of each day, you cannot be in the middle of a chapter.</li>&#xA;<li>You must read the chapters in order.</li>&#xA;...
algorithms optimization greedy algorithms
1
Optimal Partition of Book Chapters -- (algorithms optimization greedy algorithms) <p>Suppose you want to read a book with $n$ chapters, and chapter $i$ has $a_i$ pages. Now you want to read the entire book in $d$ days. But there are two restrictions:</p>&#xA;&#xA;<ul>&#xA;<li>by the end of each day, you cannot be in th...
habedi/stack-exchange-dataset
82,485
Is subtype polymorphism a kind of ad hoc polymorphism?
<blockquote>&#xA; <p>"Ad-hoc polymorphism is obtained when a function works, or appears to work, on several different types (which may not exhibit a common structure) and may behave in unrelated ways for each type." – Strachey 1967</p>&#xA;</blockquote>&#xA;&#xA;<p>Subtype polymorphism seems to fit this description, a...
programming languages polymorphisms
1
Is subtype polymorphism a kind of ad hoc polymorphism? -- (programming languages polymorphisms) <blockquote>&#xA; <p>"Ad-hoc polymorphism is obtained when a function works, or appears to work, on several different types (which may not exhibit a common structure) and may behave in unrelated ways for each type." – Strac...
habedi/stack-exchange-dataset
82,491
Was multiple inheritance ever implemented by adding redundant data members?
<p>In discussions about why most languages which implement inheritance only implement single-inheritance, the question of the precise semantics of overlaps often comes up, and having redundant data members is sometimes given as an example semantic that would be undesirable. Note that this semantic effectively implement...
programming languages object oriented language design
1
Was multiple inheritance ever implemented by adding redundant data members? -- (programming languages object oriented language design) <p>In discussions about why most languages which implement inheritance only implement single-inheritance, the question of the precise semantics of overlaps often comes up, and having re...
habedi/stack-exchange-dataset
82,492
Defining a predicate on the structure of a string
<p>I have the following homework question. (For a bit of context - the study unit is <a href="http://www.um.edu.mt/science/studyunit/CPS2005" rel="nofollow noreferrer">Formal Languages and Automata</a>).</p>&#xA;&#xA;<blockquote>&#xA; <p>Define the predicate $\mathrm{pre}(s,t)$ over $s, t\in\Sigma^*$ by induction <em>...
formal languages automata logic strings
1
Defining a predicate on the structure of a string -- (formal languages automata logic strings) <p>I have the following homework question. (For a bit of context - the study unit is <a href="http://www.um.edu.mt/science/studyunit/CPS2005" rel="nofollow noreferrer">Formal Languages and Automata</a>).</p>&#xA;&#xA;<blockqu...
habedi/stack-exchange-dataset
82,494
How does conversion from fixed-point to floating-point happen?
<p>I came across to the code that convert 32-bit signed fixed-point number (16.16) to a float and it looks like (pseudocode)</p>&#xA;&#xA;<pre><code>floating = fixed / 65536.0&#xA;</code></pre>&#xA;&#xA;<p>Could you please explain me what's the essence of dividing by this? Why does this dividing works when fixed-point ...
floating point real numbers fixed point
1
How does conversion from fixed-point to floating-point happen? -- (floating point real numbers fixed point) <p>I came across to the code that convert 32-bit signed fixed-point number (16.16) to a float and it looks like (pseudocode)</p>&#xA;&#xA;<pre><code>floating = fixed / 65536.0&#xA;</code></pre>&#xA;&#xA;<p>Could ...
habedi/stack-exchange-dataset
82,500
Infinite Union of Recursive language
<h2>Question</h2>&#xA;<blockquote>&#xA;<p>Is <strong>Infinite Union</strong> of Recursive language is <strong>Recursive</strong>?</p>&#xA;</blockquote>&#xA;<p>I know it is already posted <a href="https://cs.stackexchange.com/questions/206/is-an-in%EF%AC%81nite-union-of-context-free-languages-always-context-free">here</...
formal languages context free closure properties
1
Infinite Union of Recursive language -- (formal languages context free closure properties) <h2>Question</h2>&#xA;<blockquote>&#xA;<p>Is <strong>Infinite Union</strong> of Recursive language is <strong>Recursive</strong>?</p>&#xA;</blockquote>&#xA;<p>I know it is already posted <a href="https://cs.stackexchange.com/ques...
habedi/stack-exchange-dataset
82,515
How to maximize the profit
<p>In CLRS , under the section "Maximum sub array problem", there is a problem to maximize the profit in the stock exchange. The problem is.. given an array <strong><em>A[1..n]</em></strong> and we have to find <strong><em>i</em></strong> and <strong><em>j</em></strong> such that <strong><em>i &lt; j</em></strong> and ...
algorithms time complexity
1
How to maximize the profit -- (algorithms time complexity) <p>In CLRS , under the section "Maximum sub array problem", there is a problem to maximize the profit in the stock exchange. The problem is.. given an array <strong><em>A[1..n]</em></strong> and we have to find <strong><em>i</em></strong> and <strong><em>j</em>...
habedi/stack-exchange-dataset
82,516
Can we apply De Morgan's to any operator? (boolean , arithmetic , relational)
<p>I have seen various statements with negation( or complement) operators and when i try to negate them using De Morgan's law , i become confused about how to negate.</p>&#xA;&#xA;<p><strong>The main doubts are what variables to negate and what operators to negate.</strong></p>&#xA;&#xA;<p>Example:-&#xA;~(p^q)= ~p∨~q (...
logic
1
Can we apply De Morgan's to any operator? (boolean , arithmetic , relational) -- (logic) <p>I have seen various statements with negation( or complement) operators and when i try to negate them using De Morgan's law , i become confused about how to negate.</p>&#xA;&#xA;<p><strong>The main doubts are what variables to ne...
habedi/stack-exchange-dataset
82,520
What is a "closed set" in context of AI? How is it different from an open set or a frontier?
<p>I am reading some properties on the A* search algorithm on Wikipedia, specifically:</p>&#xA;&#xA;<p>"If the heuristic function h is admissible, meaning that it never overestimates the actual minimal cost of reaching the goal, then A* is itself admissible (or optimal) if we do not use a closed set. If a closed set is...
algorithms graphs data structures artificial intelligence
1
What is a "closed set" in context of AI? How is it different from an open set or a frontier? -- (algorithms graphs data structures artificial intelligence) <p>I am reading some properties on the A* search algorithm on Wikipedia, specifically:</p>&#xA;&#xA;<p>"If the heuristic function h is admissible, meaning that it n...
habedi/stack-exchange-dataset
82,525
Asymptotics and logarithmic exponents
<p>I was tasked to order some functions in respect to the $\mathcal{O}$ notation, and have some problems with the following ones: </p>&#xA;&#xA;<p>$n^{\ln(7)} = \mathcal{O}(n^{3})$: I can't find a more elegant proof for this other than using L'Hôpital's rule and a numerical approximation of $\ln(7)$:</p>&#xA;&#xA;<p>$\...
asymptotics
1
Asymptotics and logarithmic exponents -- (asymptotics) <p>I was tasked to order some functions in respect to the $\mathcal{O}$ notation, and have some problems with the following ones: </p>&#xA;&#xA;<p>$n^{\ln(7)} = \mathcal{O}(n^{3})$: I can't find a more elegant proof for this other than using L'Hôpital's rule and a ...
habedi/stack-exchange-dataset
82,529
"Breadth course" problem – find maximum independent set given all maximal cliques
<p>One of the undergraduate degree requirements at my university is that all Letters and Science students must take a "breadth course" in each of seven categories. If a course has multiple associated categories, you have to pick one; you can't satisfy multiple breadth requirement categories with a single course. </p>&#...
algorithms graphs
1
"Breadth course" problem – find maximum independent set given all maximal cliques -- (algorithms graphs) <p>One of the undergraduate degree requirements at my university is that all Letters and Science students must take a "breadth course" in each of seven categories. If a course has multiple associated categories, you...
habedi/stack-exchange-dataset
82,530
Classes of languages for which the language $\{a_1^n \cdots a_k^n \mid n \geq 0\}$ is in the language for $k$ but not $k+1$
<p>In any introductory course on the theory of computing, one encounters the language&#xA;$$L_k = \{a_1^n \cdots a_k^n \mid n \geq 0\}$$&#xA;as a canonical (or at least pedagogical) counterexample for a language which is not regular ($k=2$) or context-free ($k=3$). The next jump is usually to the turing machine, where ...
formal languages
1
Classes of languages for which the language $\{a_1^n \cdots a_k^n \mid n \geq 0\}$ is in the language for $k$ but not $k+1$ -- (formal languages) <p>In any introductory course on the theory of computing, one encounters the language&#xA;$$L_k = \{a_1^n \cdots a_k^n \mid n \geq 0\}$$&#xA;as a canonical (or at least pedag...
habedi/stack-exchange-dataset
82,531
AVL Tree or HashTable for storing relatively big data?
<p>I have been looking to implement a data structure for my project. I came across AVL tree and Hash Table. As I am a beginner so I'm in dilemma what data structure I use for large data. The main operation will be mostly searching through the database efficiently.</p>&#xA;&#xA;<p>AVL Tree seems to be very good option t...
algorithms algorithm analysis hash tables
1
AVL Tree or HashTable for storing relatively big data? -- (algorithms algorithm analysis hash tables) <p>I have been looking to implement a data structure for my project. I came across AVL tree and Hash Table. As I am a beginner so I'm in dilemma what data structure I use for large data. The main operation will be most...
habedi/stack-exchange-dataset
82,533
Minimum number of nucleotides to force duplicate substring
<p>There are 4 DNA nucleotides, each represented by one of the letters A, C, G, or T.</p>&#xA;&#xA;<p>Assume that they can be arranged in a string e.g. "GATTACA...". I want to figure out the minimum number of nucleotides I would have to encounter before I'm pigeonholed into seeing a duplicate substring of length 3.</p>...
combinatorics substrings bioinformatics
1
Minimum number of nucleotides to force duplicate substring -- (combinatorics substrings bioinformatics) <p>There are 4 DNA nucleotides, each represented by one of the letters A, C, G, or T.</p>&#xA;&#xA;<p>Assume that they can be arranged in a string e.g. "GATTACA...". I want to figure out the minimum number of nucleot...
habedi/stack-exchange-dataset
82,553
Max flow with priorities
<p>I'm studying a simple max flow problem:</p>&#xA;&#xA;<p>Each type of object $a_1, a_2...$ can be stored in some of several stores $b_1,b_2...$. This is described by this graph:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/3iR6N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3iR6N.png" alt="...
graphs linear programming network flow
1
Max flow with priorities -- (graphs linear programming network flow) <p>I'm studying a simple max flow problem:</p>&#xA;&#xA;<p>Each type of object $a_1, a_2...$ can be stored in some of several stores $b_1,b_2...$. This is described by this graph:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/3iR6N.png" rel="nofo...
habedi/stack-exchange-dataset