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 |
|---|---|---|---|---|---|---|
90,440 | Is $T(n) = Ω (n^2)$ the same as $n^2=O(T(n))$? | <p><strong>Question:</strong> In the problem below, does proving $T(n) = O(n^2)$ and $n^2 = O(T(n))$ lead to the same result as proving $T(n)=O(n^2)$ and $T(n)=Ω (n^2)$? Which would be the better approach to take? I feel like I am not getting the big picture. Right now I am just trying around until I find something tha... | asymptotics landau notation | 1 | Is $T(n) = Ω (n^2)$ the same as $n^2=O(T(n))$? -- (asymptotics landau notation)
<p><strong>Question:</strong> In the problem below, does proving $T(n) = O(n^2)$ and $n^2 = O(T(n))$ lead to the same result as proving $T(n)=O(n^2)$ and $T(n)=Ω (n^2)$? Which would be the better approach to take? I feel like I am not getti... | habedi/stack-exchange-dataset |
90,445 | Sum of distances between points on one-dimensional axis | <p>We have given integer array of $n$ points, let it be $A$, showing where it is on the x-axis. For this problem we are working only with the x-axis and the y-axis is not important at all. Now for given two indexes $l$ and $r$, such that $0\leq l\leq r \leq n-1$, we want to find the sum of distances from each point who... | mathematical programming | 1 | Sum of distances between points on one-dimensional axis -- (mathematical programming)
<p>We have given integer array of $n$ points, let it be $A$, showing where it is on the x-axis. For this problem we are working only with the x-axis and the y-axis is not important at all. Now for given two indexes $l$ and $r$, such t... | habedi/stack-exchange-dataset |
90,453 | NFA accepting $L=\{wbbav \;|\; w \in \{a,b\}^*, v \in \{a,b\}^+, v\; has\; suffix\; a\}$ | <p>I have to construct NFA that accepts language $L=\{wbbav \;|\; w \in \{a,b\}^*, v \in \{a,b\}^+, v\; has\; suffix\; a\}$.</p>

<p>My solution is this automata:</p>

<p><a href="https://i.stack.imgur.com/MvZ2q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MvZ2q.png" alt="My automa... | finite automata nondeterminism | 1 | NFA accepting $L=\{wbbav \;|\; w \in \{a,b\}^*, v \in \{a,b\}^+, v\; has\; suffix\; a\}$ -- (finite automata nondeterminism)
<p>I have to construct NFA that accepts language $L=\{wbbav \;|\; w \in \{a,b\}^*, v \in \{a,b\}^+, v\; has\; suffix\; a\}$.</p>

<p>My solution is this automata:</p>

<p><a href=... | habedi/stack-exchange-dataset |
90,479 | Why line graph is a proper subclass of claw-free graph? | <p>A <strong>claw</strong> is the graph isomorphic to $K_{1,3}$, that is, a star graph with three edges, three leaves, and one central vertex. (see below)</p>

<p><a href="https://i.stack.imgur.com/FMw1Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FMw1Y.png" alt="enter image description h... | graphs | 1 | Why line graph is a proper subclass of claw-free graph? -- (graphs)
<p>A <strong>claw</strong> is the graph isomorphic to $K_{1,3}$, that is, a star graph with three edges, three leaves, and one central vertex. (see below)</p>

<p><a href="https://i.stack.imgur.com/FMw1Y.png" rel="nofollow noreferrer"><img src=... | habedi/stack-exchange-dataset |
90,480 | Counting arrays with Euclidean distance at most 2 from a given binary array | <p>I have a binary array like this: </p>

<p>$$A = [0,1,0,0,1,0]\,.$$</p>

<p>I'm trying to find a way to calculate how many arrays of the same length exist that have a Euclidean distance of 2 or less from this array.</p>

<p>So, how many arrays of length 6 exist where</p>

<p>$$\sqrt{\S... | nearest neighbour euclidean distance | 1 | Counting arrays with Euclidean distance at most 2 from a given binary array -- (nearest neighbour euclidean distance)
<p>I have a binary array like this: </p>

<p>$$A = [0,1,0,0,1,0]\,.$$</p>

<p>I'm trying to find a way to calculate how many arrays of the same length exist that have a Euclidean distanc... | habedi/stack-exchange-dataset |
90,481 | How to remove cycles from a directed graph | <p>I saw <a href="https://stackoverflow.com/questions/6284469/how-to-remove-cycles-in-an-unweighted-directed-graph-such-that-the-number-of-ed">this</a> from SO which led to <a href="https://en.wikipedia.org/wiki/Feedback_arc_set" rel="noreferrer">Feedback Arc Set</a>, which describes the problem nicely:</p>

<b... | graphs | 1 | How to remove cycles from a directed graph -- (graphs)
<p>I saw <a href="https://stackoverflow.com/questions/6284469/how-to-remove-cycles-in-an-unweighted-directed-graph-such-that-the-number-of-ed">this</a> from SO which led to <a href="https://en.wikipedia.org/wiki/Feedback_arc_set" rel="noreferrer">Feedback Arc Set</... | habedi/stack-exchange-dataset |
90,486 | Can the higher-order oracle Turing machines simulate the lower-order machines so that the current oracle does not contradict the simulated oracle? | <p>Here is a quote from the <a href="https://cs.stackexchange.com/a/82986/66506">Source 1</a>: </p>

<blockquote>
 <p>For example, if $M$ is a machine with an oracle for the halting problem, then obviously there isn't in general an equivalent machine that can simulate the oracle. </p>
</blockquote>&#... | turing machines computability logic undecidability oracle machines | 1 | Can the higher-order oracle Turing machines simulate the lower-order machines so that the current oracle does not contradict the simulated oracle? -- (turing machines computability logic undecidability oracle machines)
<p>Here is a quote from the <a href="https://cs.stackexchange.com/a/82986/66506">Source 1</a>: </p>&... | habedi/stack-exchange-dataset |
90,493 | Why scholarly papers focus on DAGs instead of DCGs (Directed Cyclic Graphs) | <p>In trying to understand how to convert DCG's (Directed Cyclic Graphs) to DAG's (Directed Acyclic Graphs) without removing all the edges, I came across <a href="http://www.m-hikari.com/ces/ces2015/ces17-20-2015/p/ariffinCES17-20-2015.pdf" rel="nofollow noreferrer">this paper</a> which says:</p>

<blockquote>&... | graphs | 1 | Why scholarly papers focus on DAGs instead of DCGs (Directed Cyclic Graphs) -- (graphs)
<p>In trying to understand how to convert DCG's (Directed Cyclic Graphs) to DAG's (Directed Acyclic Graphs) without removing all the edges, I came across <a href="http://www.m-hikari.com/ces/ces2015/ces17-20-2015/p/ariffinCES17-20-2... | habedi/stack-exchange-dataset |
90,499 | Get indexes of unique elements in two different arrays in linear time | <p>I have two array of the same set of elements, say for exemple:
$a_1 = [x_1, x_2, …, x_n]$ and $a_2 = [y_1, y_2, …, y_n]$ so that $i \neq j \Rightarrow x_i \neq x_j$</p>

<p>Is it possible, in linear time, to construct the array $[(x_1, k_1), (x_2, k_2), …, (x_n, k_n)]$ so that $y_{k_i} = x_i$ ?</p>
&... | algorithms time complexity arrays finite sets | 1 | Get indexes of unique elements in two different arrays in linear time -- (algorithms time complexity arrays finite sets)
<p>I have two array of the same set of elements, say for exemple:
$a_1 = [x_1, x_2, …, x_n]$ and $a_2 = [y_1, y_2, …, y_n]$ so that $i \neq j \Rightarrow x_i \neq x_j$</p>

<p>Is it possi... | habedi/stack-exchange-dataset |
90,507 | Finding a minimal subset of strings whose bitwise OR is the all ones string | <p>Consider we're given a set $S\subset \{0,1\}^n$ and we want to find a minimal subset $A \subset S$ under the property that if we bitwise OR all of the strings in $A$ we get the all ones string $1^n$. I have been having trouble finding a polynomial time algorithm for this or finding evidence that one doesn't exist (e... | algorithms | 1 | Finding a minimal subset of strings whose bitwise OR is the all ones string -- (algorithms)
<p>Consider we're given a set $S\subset \{0,1\}^n$ and we want to find a minimal subset $A \subset S$ under the property that if we bitwise OR all of the strings in $A$ we get the all ones string $1^n$. I have been having troubl... | habedi/stack-exchange-dataset |
90,511 | Can we define the Functor Category in Haskell (or any other language with a more expressive type system)? | <p>Here I am talking about the Functor category, which is defined as a category whose objects are functors and morphisms are natural transformations.</p>

<p>For reference: <a href="https://ncatlab.org/nlab/show/functor+category" rel="nofollow noreferrer">https://ncatlab.org/nlab/show/functor+category</a></p>&#... | functional programming category theory haskell | 1 | Can we define the Functor Category in Haskell (or any other language with a more expressive type system)? -- (functional programming category theory haskell)
<p>Here I am talking about the Functor category, which is defined as a category whose objects are functors and morphisms are natural transformations.</p>

... | habedi/stack-exchange-dataset |
90,527 | Is every PSPACE-complete problem complete with respect to logspace reductions? | <p>A remarkable feature of the reduction showing that TQBF (True Quantified Boolean Formulas) is PSPACE-complete is that it actually runs in <em>logspace</em>, i.e. for any <span class="math-container">$A \in \mathsf{PSPACE}$</span>,
<span class="math-container">$$
A \le_L TQBF.
$$</span>
(See for examp... | complexity theory reductions complexity classes space complexity | 1 | Is every PSPACE-complete problem complete with respect to logspace reductions? -- (complexity theory reductions complexity classes space complexity)
<p>A remarkable feature of the reduction showing that TQBF (True Quantified Boolean Formulas) is PSPACE-complete is that it actually runs in <em>logspace</em>, i.e. for an... | habedi/stack-exchange-dataset |
90,530 | Minimal date interval cover algorithm | <p>The problem involves date intervals filtered by days of week. For example, the filtered interval {2001 APR 1 - 2001 APR 30, 17} corresponds to all Mondays and Sundays between April 1 and April 30. Here is the problem: given a collection of filtered date intervals, find a minimal collection of such intervals that cov... | algorithms algorithm analysis time complexity optimization asymptotics | 1 | Minimal date interval cover algorithm -- (algorithms algorithm analysis time complexity optimization asymptotics)
<p>The problem involves date intervals filtered by days of week. For example, the filtered interval {2001 APR 1 - 2001 APR 30, 17} corresponds to all Mondays and Sundays between April 1 and April 30. Here i... | habedi/stack-exchange-dataset |
90,531 | Bounded Quadratic Congruence Problem Variant (for some specific Residue) | <p><strong>Given:</strong> 3 positive integers $a,b,L$. <strong>Problem:</strong> Is there a positive integer $x<L$ such that $x^2≡ a(mod\ b)$?</p>

<p>The above problem is <strong>NPComplete</strong> (as mentioned in G&J) even if we have the factorization of $b$ given. My query is the following:</p>
... | complexity theory | 1 | Bounded Quadratic Congruence Problem Variant (for some specific Residue) -- (complexity theory)
<p><strong>Given:</strong> 3 positive integers $a,b,L$. <strong>Problem:</strong> Is there a positive integer $x<L$ such that $x^2≡ a(mod\ b)$?</p>

<p>The above problem is <strong>NPComplete</strong> (as mentione... | habedi/stack-exchange-dataset |
90,535 | Prove Minimum AABB Construction | <p>Assume a point set $P[n]$ with $n$ points which align in one plane in the euclidean space, so $p(x,y) \in \mathbb{R}^2$. Looking for an algorithm to construct an <strong>AABB</strong> (<em>axis aligned bounding box</em>) I did not find anything. But I thought that the simpliest appraoch could be the best: traverse a... | computational geometry | 1 | Prove Minimum AABB Construction -- (computational geometry)
<p>Assume a point set $P[n]$ with $n$ points which align in one plane in the euclidean space, so $p(x,y) \in \mathbb{R}^2$. Looking for an algorithm to construct an <strong>AABB</strong> (<em>axis aligned bounding box</em>) I did not find anything. But I thoug... | habedi/stack-exchange-dataset |
90,539 | Number of possible sequence partitioning | <p>Given a sequence of 1 and 0 elements, what is the number of possible partitioning of the sequence in sub-sequences (not necessarily consecutive elements, and any number of sub-sequences are allowed) so that any sub-sequence starts and ends with a 1, and can contain an arbitrary number of 0s?</p>

<p>For exam... | algorithms dynamic programming subsequences | 1 | Number of possible sequence partitioning -- (algorithms dynamic programming subsequences)
<p>Given a sequence of 1 and 0 elements, what is the number of possible partitioning of the sequence in sub-sequences (not necessarily consecutive elements, and any number of sub-sequences are allowed) so that any sub-sequence sta... | habedi/stack-exchange-dataset |
90,550 | Is there a language that can be Turing-reduced from all languages? | <p>I don't think so, because $A_{TM} = \{<M,w>\mid \text{M accepts w}\}$ is not Turing-decidable. Is this the right way to think about?</p>
 | computability reductions | 1 | Is there a language that can be Turing-reduced from all languages? -- (computability reductions)
<p>I don't think so, because $A_{TM} = \{<M,w>\mid \text{M accepts w}\}$ is not Turing-decidable. Is this the right way to think about?</p>
 | habedi/stack-exchange-dataset |
90,566 | Where did Don Knuth say that suffix trees were the "Algorithm of the Year 1973?" | <p>If you do a quick search for suffix trees on Google, you'll find a bunch of sources saying that Don Knuth called them the "Algorithm of the Year 1973." However, I can't seem to find a source on this.</p>

<p>Is there a reference to a paper, communication, etc. where Knuth specifically says this about suffix ... | reference request suffix trees | 1 | Where did Don Knuth say that suffix trees were the "Algorithm of the Year 1973?" -- (reference request suffix trees)
<p>If you do a quick search for suffix trees on Google, you'll find a bunch of sources saying that Don Knuth called them the "Algorithm of the Year 1973." However, I can't seem to find a source on this.<... | habedi/stack-exchange-dataset |
90,568 | Non Regularity proof using Kolmogorov Complexity (Li - Vitanyi Theorem) | <p>When proving a language is non regular we can use Kolmogorov complexity.</p>
<p>As far I know to do this we just have to use this satisfy the following conditions</p>
<p>Given <span class="math-container">$Y^A_{x,n}$</span>= the nth string <span class="math-container">$y∈Σ^∗$</span> (in lex order) such that ... | regular languages kolmogorov complexity | 1 | Non Regularity proof using Kolmogorov Complexity (Li - Vitanyi Theorem) -- (regular languages kolmogorov complexity)
<p>When proving a language is non regular we can use Kolmogorov complexity.</p>
<p>As far I know to do this we just have to use this satisfy the following conditions</p>
<p>Given <span class="mat... | habedi/stack-exchange-dataset |
90,569 | In what case would bi-directional BFS have a worse asymptotic run time than regular BFS? | <p>I am trying to prove that bidirectional BFS could have a worse run time than regular BFS. I am confused on how this would be possible, considered bidirectional BFS always divides the run time in two, since it is executing two searches. Would a specific order of nodes and vertices have to take place in order to give ... | algorithms graphs | 1 | In what case would bi-directional BFS have a worse asymptotic run time than regular BFS? -- (algorithms graphs)
<p>I am trying to prove that bidirectional BFS could have a worse run time than regular BFS. I am confused on how this would be possible, considered bidirectional BFS always divides the run time in two, since... | habedi/stack-exchange-dataset |
90,587 | Is Euclidean TSP strongly NP-hard | <p>Is Euclidean TSP strongly NP-hard? What I mean is if it is NP-hard with weights specified in unary?</p>

<p>Can someone provide a reference?</p>
 | np complete traveling salesman | 1 | Is Euclidean TSP strongly NP-hard -- (np complete traveling salesman)
<p>Is Euclidean TSP strongly NP-hard? What I mean is if it is NP-hard with weights specified in unary?</p>

<p>Can someone provide a reference?</p>
 | habedi/stack-exchange-dataset |
90,588 | Decide whether this language is regular | <p>Decide whether the language $L$, defined by the following grammar is regular or not:<br>
$S \rightarrow aab$<br>
$S \rightarrow aacSb$<br>
$S \rightarrow acSab$<br>
$S \rightarrow acSacSb$<br><br>
Where should I start?<br> 
I have tried defining a new language $L' = \{(aac)^n\ w\ b^n | w \in ... | regular languages context free chomsky hierarchy | 1 | Decide whether this language is regular -- (regular languages context free chomsky hierarchy)
<p>Decide whether the language $L$, defined by the following grammar is regular or not:<br>
$S \rightarrow aab$<br>
$S \rightarrow aacSb$<br>
$S \rightarrow acSab$<br>
$S \rightarrow acSacSb$<br><br>
Where ... | habedi/stack-exchange-dataset |
90,591 | Number of pairs of indexes of two arrays such that one element is greater than the other | <blockquote>
 <p>Let $A$ and $B$ be two arrays of size $n$. How many pairs of indices $i, j$ satisfy $1 \le i < j \le n$ and $A[i] > B[j]$?</p>
</blockquote>

<p>After quite a bit of thinking the best i had gotten to was make a for loop inside of another, which i don´t think it´s a good solution.... | algorithms time complexity arrays | 1 | Number of pairs of indexes of two arrays such that one element is greater than the other -- (algorithms time complexity arrays)
<blockquote>
 <p>Let $A$ and $B$ be two arrays of size $n$. How many pairs of indices $i, j$ satisfy $1 \le i < j \le n$ and $A[i] > B[j]$?</p>
</blockquote>

<p>After q... | habedi/stack-exchange-dataset |
90,597 | Distance between $u$ and $v$ is the same as distance between $v$ and $u$ in a transposed graph? | <p>My question is what the title says. Given an weighted directed graph $G=(V,E)$ and the minimum distance between two vertexes $u$ and $v$, I want to know if the distance between $v$ and $u$ is always the same in $G^{T}$ (the graph with all edges inverted).</p>

<p>I did some tests and couldn't find a graph wh... | graphs | 1 | Distance between $u$ and $v$ is the same as distance between $v$ and $u$ in a transposed graph? -- (graphs)
<p>My question is what the title says. Given an weighted directed graph $G=(V,E)$ and the minimum distance between two vertexes $u$ and $v$, I want to know if the distance between $v$ and $u$ is always the same i... | habedi/stack-exchange-dataset |
90,602 | Prove that A is non-regular using K-Complexity Non regularity theorem | <p>Given <span class="math-container">$Y^A_{x,n}$</span>= the nth string <span class="math-container">$y∈Σ^∗$</span> (in lex order) such that <span class="math-container">$xy∈A$</span> (if n such y exits). So what completes <span class="math-container">$x$</span> if adding <span class="math-container">$n$</span> such <... | regular languages kolmogorov complexity | 1 | Prove that A is non-regular using K-Complexity Non regularity theorem -- (regular languages kolmogorov complexity)
<p>Given <span class="math-container">$Y^A_{x,n}$</span>= the nth string <span class="math-container">$y∈Σ^∗$</span> (in lex order) such that <span class="math-container">$xy∈A$</span> (if n such y exits).... | habedi/stack-exchange-dataset |
90,628 | Transform 2D range query matrix into segment tree to make memory usage lower | <p>Let's say we have given matrix $N\cdot N$, with zeros and ones only at $P$ position at it. We want to implement queries $q(x_1, y_1, x_2, y_2)$ which will return the number of ones in the sub-rectangle described with those two points. Since $N$ can be up to $10^4$ we cannot create standard DP matrix for answering th... | trees dynamic programming | 1 | Transform 2D range query matrix into segment tree to make memory usage lower -- (trees dynamic programming)
<p>Let's say we have given matrix $N\cdot N$, with zeros and ones only at $P$ position at it. We want to implement queries $q(x_1, y_1, x_2, y_2)$ which will return the number of ones in the sub-rectangle describ... | habedi/stack-exchange-dataset |
90,630 | How do you analyse the time complexity of a piecewise function? | <p>Is there a method to apply when trying to finding out the time complexity of a piecewise function?</p>

<p>\begin{align*}
F(x) &= \begin{cases} 2^x & x < 8, \\ x^2 & x \geq 8. \end{cases} \\
\end{align*}</p>

<p>This case seems straightforward as the function is $\Theta(x^2)$ f... | asymptotics | 1 | How do you analyse the time complexity of a piecewise function? -- (asymptotics)
<p>Is there a method to apply when trying to finding out the time complexity of a piecewise function?</p>

<p>\begin{align*}
F(x) &= \begin{cases} 2^x & x < 8, \\ x^2 & x \geq 8. \end{cases} \\
\end{align*}</... | habedi/stack-exchange-dataset |
90,636 | Definition of InLeft and InRight | <p>So in reading I have come across the terms "InLeft" and "InRight" and I am unable to find a concrete definition for it.</p>

<p>I have found it used in the specification for <a href="https://coq.inria.fr/library/Coq.Init.Specif.html" rel="nofollow noreferrer">COQ,</a> and in some notes on compilers (there it... | terminology proof techniques compilers proof assistants | 1 | Definition of InLeft and InRight -- (terminology proof techniques compilers proof assistants)
<p>So in reading I have come across the terms "InLeft" and "InRight" and I am unable to find a concrete definition for it.</p>

<p>I have found it used in the specification for <a href="https://coq.inria.fr/library/Coq... | habedi/stack-exchange-dataset |
90,643 | function application of N x N -> N | <p>Let the function cane and its auxiliary helping function down be the smallest functions satisfying the following requirement. For every x∈ℕ, for every y∈ℕ, and for p=(x,y), all of the following statements hold:</p>

<p><em>down(x+1,y)=(x,y+1)</em></p>

<p><em>down(0,y+1)=(y,0)</em></p>

<p><e... | computability | 1 | function application of N x N -> N -- (computability)
<p>Let the function cane and its auxiliary helping function down be the smallest functions satisfying the following requirement. For every x∈ℕ, for every y∈ℕ, and for p=(x,y), all of the following statements hold:</p>

<p><em>down(x+1,y)=(x,y+1)</em></p>
... | habedi/stack-exchange-dataset |
90,652 | Questions on Sipser's NP implying verifiability? | <p>I've revisited trying to understand the proof to why NTM exists iff there is a verifier. I think I'm finally understanding the proof but I want to make sure and thus have some questions as follow up along with to check if I'm understanding.</p>

<ol>
<li><p>For the forward implication (there exists a ver... | complexity theory turing machines np nondeterminism | 1 | Questions on Sipser's NP implying verifiability? -- (complexity theory turing machines np nondeterminism)
<p>I've revisited trying to understand the proof to why NTM exists iff there is a verifier. I think I'm finally understanding the proof but I want to make sure and thus have some questions as follow up along with t... | habedi/stack-exchange-dataset |
90,653 | Syntax of recurrence formula not clear | <p>I have this task for Analysis of Algorithms module in university </p>

<p>$$
\begin{align*}
W, V &= \{v_1, v_2, v_n\}, S = \{s_1, s_2, s_n\}\\
G(W) &= \max~_{i:w_i\leq w} ~\{G(W-s_i) + v_i\}, G(0)=0\\
\end{align*}
$$</p>

<p>I am not sure what does the marked text mean in ... | recurrence relation notation mathematical foundations | 1 | Syntax of recurrence formula not clear -- (recurrence relation notation mathematical foundations)
<p>I have this task for Analysis of Algorithms module in university </p>

<p>$$
\begin{align*}
W, V &= \{v_1, v_2, v_n\}, S = \{s_1, s_2, s_n\}\\
G(W) &= \max~_{i:w_i\leq w} ~\{G(W-s_i) + v_i\},... | habedi/stack-exchange-dataset |
90,659 | What is the relation between NP/NP-hard problems and Recursive/R.E languages? any of them a subset of another? | <p>So i came upon this thread : </p>

<p><a href="https://gateoverflow.in/57631/relation-between-np-recursive-and-recusive-enumerable" rel="nofollow noreferrer">https://gateoverflow.in/57631/relation-between-np-recursive-and-recusive-enumerable</a></p>

<p>and the guy says Every language in NP is recur... | formal languages turing machines np complete np decision problem | 1 | What is the relation between NP/NP-hard problems and Recursive/R.E languages? any of them a subset of another? -- (formal languages turing machines np complete np decision problem)
<p>So i came upon this thread : </p>

<p><a href="https://gateoverflow.in/57631/relation-between-np-recursive-and-recusive-enumerab... | habedi/stack-exchange-dataset |
90,662 | Recurrence equation calculation | <p>I have a recurrece equation</p>

<p><a href="https://i.stack.imgur.com/syFcR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/syFcR.png" alt="enter image description here"></a></p>

<p>Changed notations:
$\qquad\displaystyle G(W) = \max \{ G(W - s_i) + v_i \mid 0 \leq i \leq n, ... | recurrence relation recursion | 1 | Recurrence equation calculation -- (recurrence relation recursion)
<p>I have a recurrece equation</p>

<p><a href="https://i.stack.imgur.com/syFcR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/syFcR.png" alt="enter image description here"></a></p>

<p>Changed notations:
$\qquad\... | habedi/stack-exchange-dataset |
90,665 | Path in a graph with durations | <p>I have the following problem:</p>

<p>given </p>

<ul>
<li>a directed graph $G=(V,E,d)$, where $d:V\to\mathcal{I}(\mathbb{Q}_0^+\cup\{+\infty\})$ <em>(here $\mathbb{Q}_0^+$ denotes the set of non-negative rationals and $\mathcal{I}(\mathbb{Q}_0^+\cup\{+\infty\})$ the set of intervals, bounded or ... | graphs np complete decision problem | 1 | Path in a graph with durations -- (graphs np complete decision problem)
<p>I have the following problem:</p>

<p>given </p>

<ul>
<li>a directed graph $G=(V,E,d)$, where $d:V\to\mathcal{I}(\mathbb{Q}_0^+\cup\{+\infty\})$ <em>(here $\mathbb{Q}_0^+$ denotes the set of non-negative rationals and $\math... | habedi/stack-exchange-dataset |
90,673 | What is the usage of CYK algorithm in the real world considering we have algorithms with a much better Time complexity? | <p>So considering CYK is O(n^3) and since we can just use LR(k) algorithms for DCFG's which they can check if a string is in the language in O(n) then whats the usage of CYK?</p>

<p>is it being used anywhere?</p>

<p>If I'm not mistaken(correct me If I'm wrong) the benefit of CYK is that since we can c... | algorithms formal languages automata compilers | 1 | What is the usage of CYK algorithm in the real world considering we have algorithms with a much better Time complexity? -- (algorithms formal languages automata compilers)
<p>So considering CYK is O(n^3) and since we can just use LR(k) algorithms for DCFG's which they can check if a string is in the language in O(n) th... | habedi/stack-exchange-dataset |
90,687 | How to check if $m$ numbers in a sequence satisfy a condition, such that all these numbers are spaced apart by at least $k$? | <p>Suppose we have a sequence $s$ with $n$ elements from $s[1..n]$. I want to check if there exists $m \leq n$ elements in this sequence that each satisfy some simple condition (that can be tested in $O(1)$ for each $s[i]$), such that all of these elements are spaced apart by at least $k$. Is there an algorithm that ca... | algorithms arrays subsequences | 1 | How to check if $m$ numbers in a sequence satisfy a condition, such that all these numbers are spaced apart by at least $k$? -- (algorithms arrays subsequences)
<p>Suppose we have a sequence $s$ with $n$ elements from $s[1..n]$. I want to check if there exists $m \leq n$ elements in this sequence that each satisfy some... | habedi/stack-exchange-dataset |
90,694 | How to solve the recurrence $T(n) = T(n/2) + T(n/4) + T(n/8)$? | <p>How to solve the recurrence $T(n) = T(n/2) + T(n/4) + T(n/8)$?</p>

<p>We assume that $T(n)$ is constant for sufficiently small $n$.</p>
 | recurrence relation | 1 | How to solve the recurrence $T(n) = T(n/2) + T(n/4) + T(n/8)$? -- (recurrence relation)
<p>How to solve the recurrence $T(n) = T(n/2) + T(n/4) + T(n/8)$?</p>

<p>We assume that $T(n)$ is constant for sufficiently small $n$.</p>
 | habedi/stack-exchange-dataset |
90,697 | Little bit confusing to compute time complexity of nested loop | <pre><code>1 for(i=1; i<=n; i++){
2 for(j=1; j<=n; j*=2){
3 a[i][j]=b[i][j-1]+1;
4 }
5 }
</code></pre>

<p>line 1 : n+1 times</p>

<p>lnie 2 : n/2+1 times</p>

<p>line 3 : constant time c</p>

<p>so, I computed $(n+1)(n/2+1)c=(n^2+2n+2)/2+c=\theta(n^2... | algorithm analysis runtime analysis loops | 1 | Little bit confusing to compute time complexity of nested loop -- (algorithm analysis runtime analysis loops)
<pre><code>1 for(i=1; i<=n; i++){
2 for(j=1; j<=n; j*=2){
3 a[i][j]=b[i][j-1]+1;
4 }
5 }
</code></pre>

<p>line 1 : n+1 times</p>

<p>lnie 2 : n/2+1 times</p... | habedi/stack-exchange-dataset |
90,702 | Proof of big-o propositions | <p>I don't understand the proof of below sentences.</p>

<ol>
<li><p>$O(f(n))=O(g(n)) \iff \Omega(f(n))=\Omega(g(n)) \iff \theta(f(n))=\theta(g(n))$</p></li>
<li><p>$f(n)=\theta(g(n)) \iff g(n)=\theta(f(n))$</p></li>
</ol>

<p>How can I prove these statements?</p>
 | asymptotics | 1 | Proof of big-o propositions -- (asymptotics)
<p>I don't understand the proof of below sentences.</p>

<ol>
<li><p>$O(f(n))=O(g(n)) \iff \Omega(f(n))=\Omega(g(n)) \iff \theta(f(n))=\theta(g(n))$</p></li>
<li><p>$f(n)=\theta(g(n)) \iff g(n)=\theta(f(n))$</p></li>
</ol>

<p>How can I prove thes... | habedi/stack-exchange-dataset |
90,704 | What kind of math problems can be solved by automated theorem provers? | <p>Can I prove following statements with using available automated theorem provers?</p>

<ol>
<li><p>$(a+b)^2=a^2+b^2+2ab$.</p></li>
<li><p>If $ 11 \mid 2a-3b$, then $ 11 \mid 7a-5b $.</p></li>
<li><p>If $ ax^2+bx+c=0$, then $x=\frac{-b\pm\sqrt{b^2-4ac}
}{2a}$.</p></li>
<li><p>If $a$ is ev... | automated theorem proving | 1 | What kind of math problems can be solved by automated theorem provers? -- (automated theorem proving)
<p>Can I prove following statements with using available automated theorem provers?</p>

<ol>
<li><p>$(a+b)^2=a^2+b^2+2ab$.</p></li>
<li><p>If $ 11 \mid 2a-3b$, then $ 11 \mid 7a-5b $.</p></li>
<l... | habedi/stack-exchange-dataset |
90,706 | Proving that language is regular or not | <p>How to prove that the language over the alphabet $\{0, 1, +, =\}$ is regular or not:</p>

<p>$\{a+b=c:a,b,c \text{ are integers in binary for which } a \text{ plus } b\text{ equals } c\}$</p>

<p>I started with the pumping lemma:</p>

<blockquote>
 <ol>
 <li>|$y$| ≥ 1</li>
 <li... | regular languages pumping lemma | 1 | Proving that language is regular or not -- (regular languages pumping lemma)
<p>How to prove that the language over the alphabet $\{0, 1, +, =\}$ is regular or not:</p>

<p>$\{a+b=c:a,b,c \text{ are integers in binary for which } a \text{ plus } b\text{ equals } c\}$</p>

<p>I started with the pumping l... | habedi/stack-exchange-dataset |
90,719 | How to efficiently find line-segment intersections between two sets? | <p>So I'm building this iterative simulation of a surface (composed of line segments) that cannot self-intersect, which means I have to check intersections at the end of a timestep. The thing is, I know, at the beginning of every timestep, that no intersections exist within the set of all line segments that constitute ... | algorithms computational geometry polygons | 1 | How to efficiently find line-segment intersections between two sets? -- (algorithms computational geometry polygons)
<p>So I'm building this iterative simulation of a surface (composed of line segments) that cannot self-intersect, which means I have to check intersections at the end of a timestep. The thing is, I know,... | habedi/stack-exchange-dataset |
90,727 | How realistic is the i.i.d assumption in the definition of Shannon's entropy? | <p>Let me first say I come from a physics background and have about zero exposure to computer science, so the question may be very naive. Shannon's entropy looks perfectly natural and useful from a statistical/thermal physics point of view, but now I'm trying to understand how it is applied for real computers. </p>
... | information theory entropy | 1 | How realistic is the i.i.d assumption in the definition of Shannon's entropy? -- (information theory entropy)
<p>Let me first say I come from a physics background and have about zero exposure to computer science, so the question may be very naive. Shannon's entropy looks perfectly natural and useful from a statistical/... | habedi/stack-exchange-dataset |
90,736 | What structure is used for accessing the most frequent elements top k over a stream of elements? | <p>Let's say you want the top k elements. Then given the array, there is an O(n) O(n) space approach. But what if you have a stream of elements, this means that each time you'd append an element to the end of your list, you'd have to do this O(n) time O(n) space approach. Let's say your elements are distinct elements o... | algorithms | 1 | What structure is used for accessing the most frequent elements top k over a stream of elements? -- (algorithms)
<p>Let's say you want the top k elements. Then given the array, there is an O(n) O(n) space approach. But what if you have a stream of elements, this means that each time you'd append an element to the end o... | habedi/stack-exchange-dataset |
90,743 | Is $O(|V||E|)$ polynomial time? | <p>If an algorithm runs in $O(|V||E|)$, is its running time bounded by some polynomial of $|V|+|E|$? If not, what is its running time called? </p>
 | asymptotics | 1 | Is $O(|V||E|)$ polynomial time? -- (asymptotics)
<p>If an algorithm runs in $O(|V||E|)$, is its running time bounded by some polynomial of $|V|+|E|$? If not, what is its running time called? </p>
 | habedi/stack-exchange-dataset |
90,745 | How do I know the height from recursion tree of $T(n)=4T(n/2+2)+n$? | <p>I already saw <a href="https://cs.stackexchange.com/questions/19343/clrs-4-4-3-height-of-recursion-tree-for-tn-4tn-2-2-n">this answer</a>. But I didn't understand totally.</p>

<p>So I found the solution to this equation $T(n)=4T(n/2+2)+n$.</p>

<p><a href="https://i.stack.imgur.com/wRwvw.gif" rel="n... | recurrence relation | 1 | How do I know the height from recursion tree of $T(n)=4T(n/2+2)+n$? -- (recurrence relation)
<p>I already saw <a href="https://cs.stackexchange.com/questions/19343/clrs-4-4-3-height-of-recursion-tree-for-tn-4tn-2-2-n">this answer</a>. But I didn't understand totally.</p>

<p>So I found the solution to this equa... | habedi/stack-exchange-dataset |
90,749 | Why is this expression (A and ¬A |= C) entailed? | <p>Hopefully I am posting this in the right place, I am currently in a course of knowledge representation, and I came across an exercise about entailment:
$$A\land\neg A\vDash C\,.$$</p>

<p>I would argue that this expression is not entail, but it is actually entailed, but I don't see how, can you help me f... | logic knowledge representation reasoning | 1 | Why is this expression (A and ¬A |= C) entailed? -- (logic knowledge representation reasoning)
<p>Hopefully I am posting this in the right place, I am currently in a course of knowledge representation, and I came across an exercise about entailment:
$$A\land\neg A\vDash C\,.$$</p>

<p>I would argue that thi... | habedi/stack-exchange-dataset |
90,752 | Difference between Time-sharing computers and computers which use Round Robin scheduling algorithm? | <p>So maybe I'm confused in these concepts </p>

<p>but i thought that time sharing computer is a computer which the processor switches between different processes quickly to achieve a good response time </p>

<p>but isn't this the same as Round Robin algorithm?! i mean aren't we scheduling between diff... | operating systems process scheduling | 1 | Difference between Time-sharing computers and computers which use Round Robin scheduling algorithm? -- (operating systems process scheduling)
<p>So maybe I'm confused in these concepts </p>

<p>but i thought that time sharing computer is a computer which the processor switches between different processes quickl... | habedi/stack-exchange-dataset |
90,754 | Closed-Form Expression for Recursive Function | <blockquote>
 <p>Let $k \in \mathbb{N}$ and $m \in \mathbb{R}$. Consider the following function $S\colon \mathbb{R} \times \mathbb{N} \to \mathbb{R}$:
 $$
S(m,k) = \begin{cases} 3m & \text{if } k = 0, \\ 4S(\tfrac{m}{2},k-1)+3m & \text{if } k \geq 1. \end{cases}
$$
 Find a closed-form exp... | recurrence relation | 1 | Closed-Form Expression for Recursive Function -- (recurrence relation)
<blockquote>
 <p>Let $k \in \mathbb{N}$ and $m \in \mathbb{R}$. Consider the following function $S\colon \mathbb{R} \times \mathbb{N} \to \mathbb{R}$:
 $$
S(m,k) = \begin{cases} 3m & \text{if } k = 0, \\ 4S(\tfrac{m}{2},k-1)+3m &am... | habedi/stack-exchange-dataset |
90,773 | CFG With unambiguous if-else statement | <p>I am writting a small compiler for a compilers' class. The algorithm is having a shift/reduce conflict when I try to enclose if-else with braces '{', '}'.
 The non-ambiguous if-else statement I took from the dragon book, which turns to be ambiguous when I add the braces. To build the parser and test it I am usin... | formal languages compilers | 1 | CFG With unambiguous if-else statement -- (formal languages compilers)
<p>I am writting a small compiler for a compilers' class. The algorithm is having a shift/reduce conflict when I try to enclose if-else with braces '{', '}'.
 The non-ambiguous if-else statement I took from the dragon book, which turns to be amb... | habedi/stack-exchange-dataset |
90,777 | How to find middle element of doubly linked list using head and tail? | <p>Is there a way possible to find the middle element of a doubly linked list using head and tail. I tried traversing to the next element from the starting node and the previous element from the end node and check if the reference of both is same or not. This works fine if there are odd number of elements in the list. ... | data structures linked lists | 1 | How to find middle element of doubly linked list using head and tail? -- (data structures linked lists)
<p>Is there a way possible to find the middle element of a doubly linked list using head and tail. I tried traversing to the next element from the starting node and the previous element from the end node and check if... | habedi/stack-exchange-dataset |
90,779 | Empty intersection of longest path in connected graph | <blockquote>
 <p>Do all longest paths share a common point? (Gallai 1966)</p>
</blockquote>

<p>A few years later, Walther produced a counterexample on 25 vertices (a). The simplest counterexample was found by both Walther and Zamfirescu independently and has 12 vertices (b).</p>

<p><a href="... | graphs discrete mathematics | 1 | Empty intersection of longest path in connected graph -- (graphs discrete mathematics)
<blockquote>
 <p>Do all longest paths share a common point? (Gallai 1966)</p>
</blockquote>

<p>A few years later, Walther produced a counterexample on 25 vertices (a). The simplest counterexample was found by both ... | habedi/stack-exchange-dataset |
90,783 | Optimal 4-input sorting network | <p>In his paper <em>The Bose-Nelson Sorting Problem</em> (1973, Chapter 15 of <em>A Survey of Combinatorial theory</em> on page 163 available on <a href="https://books.google.fr/books?hl=en&lr=&id=U8HSBQAAQBAJ" rel="nofollow noreferrer">Google books</a>), Knuth says that the optimal bound of 5 comparators for a... | logic sorting | 1 | Optimal 4-input sorting network -- (logic sorting)
<p>In his paper <em>The Bose-Nelson Sorting Problem</em> (1973, Chapter 15 of <em>A Survey of Combinatorial theory</em> on page 163 available on <a href="https://books.google.fr/books?hl=en&lr=&id=U8HSBQAAQBAJ" rel="nofollow noreferrer">Google books</a>), Knuth... | habedi/stack-exchange-dataset |
90,787 | Bisimilarity and Trace Equivalence in Labelled Transition Systems | <p>I'm a bit confused regarding the relation between trace equivalence and bisimilarity. These <a href="http://wiki.di.uminho.pt/twiki/pub/Education/PeC/PeC1213/PeC1213-LTS2.pdf" rel="nofollow noreferrer">lecture notes</a> I found and a few others documents I've read state that "if an LTS is deterministic then two stat... | terminology | 1 | Bisimilarity and Trace Equivalence in Labelled Transition Systems -- (terminology)
<p>I'm a bit confused regarding the relation between trace equivalence and bisimilarity. These <a href="http://wiki.di.uminho.pt/twiki/pub/Education/PeC/PeC1213/PeC1213-LTS2.pdf" rel="nofollow noreferrer">lecture notes</a> I found and a ... | habedi/stack-exchange-dataset |
90,790 | Bounded Quadratic Congruence Problem Variant (for square Residue) | <p>This is a follow up to the following question: <a href="https://cs.stackexchange.com/questions/90531/bounded-quadratic-congruence-problem-variant-for-some-specific-residue">Bounded Quadratic Congruence Problem Variant (for some specific Residue)</a></p>

<p>As indicated that for square residue the problem is... | algorithms complexity theory | 1 | Bounded Quadratic Congruence Problem Variant (for square Residue) -- (algorithms complexity theory)
<p>This is a follow up to the following question: <a href="https://cs.stackexchange.com/questions/90531/bounded-quadratic-congruence-problem-variant-for-some-specific-residue">Bounded Quadratic Congruence Problem Variant... | habedi/stack-exchange-dataset |
90,792 | Are there algorithms for proving two finite state machines are equivalent? | <p>Suppose we call two finite state machines equivalent if they "perform the same computation" - they accept the same language, or they produce the same output for any given input. Is there an algorithm for checking if two finite state machines are equivalent?</p>
 | finite automata | 1 | Are there algorithms for proving two finite state machines are equivalent? -- (finite automata)
<p>Suppose we call two finite state machines equivalent if they "perform the same computation" - they accept the same language, or they produce the same output for any given input. Is there an algorithm for checking if two f... | habedi/stack-exchange-dataset |
90,798 | Is there an existing protocol where a sender does not know who he is sending data to? | <p>I was thinking about how the BitTorrent protocol automatically gives every peer a list of IPs of every other user who is currently seeding / leeching off the torrent in question. Is there an existing protocol where, somehow, the destination address is vague enough or unknown to the sender (and perhaps becomes more k... | communication protocols protocols | 1 | Is there an existing protocol where a sender does not know who he is sending data to? -- (communication protocols protocols)
<p>I was thinking about how the BitTorrent protocol automatically gives every peer a list of IPs of every other user who is currently seeding / leeching off the torrent in question. Is there an e... | habedi/stack-exchange-dataset |
90,799 | Proving Clique Number of a Regular Graph | <p>I am very new to Graph Theory and I am trying to prove the following statement from a problem set for my class: </p>

<p>Prove that if G is a regular graph on n vertices $(n \ge 2)$, then $\omega(G) \in \{1, 2, 3,... \lfloor n / 2 \rfloor, n\}$</p>

<p>I am confused by the part where it places the ... | graphs clique | 1 | Proving Clique Number of a Regular Graph -- (graphs clique)
<p>I am very new to Graph Theory and I am trying to prove the following statement from a problem set for my class: </p>

<p>Prove that if G is a regular graph on n vertices $(n \ge 2)$, then $\omega(G) \in \{1, 2, 3,... \lfloor n / 2 \rfloor, n\}$</p... | habedi/stack-exchange-dataset |
90,802 | Can you explain in terms of logic gates how Babbage’s Analytical Engine worked? | <p>On a recent trip to the London Science Museum I saw <a href="https://en.m.wikipedia.org/wiki/Charles_Babbage" rel="nofollow noreferrer">Babbage’s</a> <a href="https://en.m.wikipedia.org/wiki/Analytical_Engine" rel="nofollow noreferrer">Analytical Engine</a>.</p>

<p><a href="https://i.stack.imgur.com/jP1I7.j... | computer architecture | 1 | Can you explain in terms of logic gates how Babbage’s Analytical Engine worked? -- (computer architecture)
<p>On a recent trip to the London Science Museum I saw <a href="https://en.m.wikipedia.org/wiki/Charles_Babbage" rel="nofollow noreferrer">Babbage’s</a> <a href="https://en.m.wikipedia.org/wiki/Analytical_Engine" ... | habedi/stack-exchange-dataset |
90,805 | Halting problem for polynomial space bounded Turing machines | <p>A polynomially bounded Turing machine is the one which, on input $w$, uses no more than $f(|w|)$ cells on its tape, where $f$ is a polynomial. For this problem halting is decidable. </p>

<p>I do not understand why is halting decidable for this problem because $f$ is unknown to us.</p>
 | computability undecidability | 1 | Halting problem for polynomial space bounded Turing machines -- (computability undecidability)
<p>A polynomially bounded Turing machine is the one which, on input $w$, uses no more than $f(|w|)$ cells on its tape, where $f$ is a polynomial. For this problem halting is decidable. </p>

<p>I do not understand why... | habedi/stack-exchange-dataset |
90,809 | Constructing an optimal solution to bin packing using a "magical function" $\phi$ | <p>I am taking an introductory course in complexity theory, and as an exercise, we were given the following problem.</p>

<p>Consider the bin packing problem, with objects of positive (rational) weights $W = \{w_1, w_2, ..., w_n\}$ ($0 < w_i \leq 1 \forall i$) that should be placed in bins of capacity 1. Ima... | algorithms complexity theory time complexity polynomial time packing | 1 | Constructing an optimal solution to bin packing using a "magical function" $\phi$ -- (algorithms complexity theory time complexity polynomial time packing)
<p>I am taking an introductory course in complexity theory, and as an exercise, we were given the following problem.</p>

<p>Consider the bin packing proble... | habedi/stack-exchange-dataset |
90,821 | Proving that a context-free grammar is unambiguous | <p>I have to find an unambiguous context-free grammar that generates the following language. $$L= \{ w \in \{a,b\}^+ : |w|_a = |w|_b\}$$
I think I have found the context-free one, it should be this one.
$$S \to aS'bS'|bS'aS'$$
$$S' \to aS'bS' | bS'aS' | \lambda$$
Now I am stuck with proving whether it i... | context free formal grammars | 1 | Proving that a context-free grammar is unambiguous -- (context free formal grammars)
<p>I have to find an unambiguous context-free grammar that generates the following language. $$L= \{ w \in \{a,b\}^+ : |w|_a = |w|_b\}$$
I think I have found the context-free one, it should be this one.
$$S \to aS'bS'|bS'aS'$$&... | habedi/stack-exchange-dataset |
90,827 | Help with question involving k-regular graphs | <p>In my last test, our teacher gave us this question:</p>

<blockquote>
 <p>In an conference with 90 participants, the staff wants to divide all
 participants in 6 groups of 15 participants each. Each participant of
 each group must have at least one article with exactly 7 other
 participan... | graphs | 1 | Help with question involving k-regular graphs -- (graphs)
<p>In my last test, our teacher gave us this question:</p>

<blockquote>
 <p>In an conference with 90 participants, the staff wants to divide all
 participants in 6 groups of 15 participants each. Each participant of
 each group must have ... | habedi/stack-exchange-dataset |
90,835 | Proving that a Language is non-Regular | <blockquote>
 <p>Prove that $L_2 = \{ w \in \{a,b\}^* \mid w = a^ib^j, i \neq j \}$ is not regular.</p>
</blockquote>

<p>I was wondering if my intuition holds for proving this language as not regular:</p>

<p>Let $q = \max(i, j) - \min(i, j)$.</p>

<p>Case 1: $i > j$</p>

<p... | formal languages regular languages | 1 | Proving that a Language is non-Regular -- (formal languages regular languages)
<blockquote>
 <p>Prove that $L_2 = \{ w \in \{a,b\}^* \mid w = a^ib^j, i \neq j \}$ is not regular.</p>
</blockquote>

<p>I was wondering if my intuition holds for proving this language as not regular:</p>

<p>Let $q... | habedi/stack-exchange-dataset |
90,840 | Do NFAs with $\varepsilon$-moves never terminate? | <p>Suppose in an NFA we have an $\varepsilon$-move from a state $q_0$ to $q_1$. According to Sipser,</p>

<blockquote>
 <p>Without reading any input, the machine splits into multiple copies one following each of the exiting $\varepsilon$-arrows and one staying at the current state. Then the machine proceed... | computability finite automata nondeterminism | 1 | Do NFAs with $\varepsilon$-moves never terminate? -- (computability finite automata nondeterminism)
<p>Suppose in an NFA we have an $\varepsilon$-move from a state $q_0$ to $q_1$. According to Sipser,</p>

<blockquote>
 <p>Without reading any input, the machine splits into multiple copies one following eac... | habedi/stack-exchange-dataset |
90,849 | Extended grammar form (backus-naur) and simple grammar forms equivalence | <p>Square braces around a grammar symbol or symbols denote that these constructs are optional. Thus, production A -> X[Y]Z has the same effect as the two productions A -> XYZ and A -> XZ.</p>

<p>Curly braces around a grammar symbol or symbols say that these symbols may be repeated any number of times, includi... | context free compilers | 1 | Extended grammar form (backus-naur) and simple grammar forms equivalence -- (context free compilers)
<p>Square braces around a grammar symbol or symbols denote that these constructs are optional. Thus, production A -> X[Y]Z has the same effect as the two productions A -> XYZ and A -> XZ.</p>

<p>Curly braces ar... | habedi/stack-exchange-dataset |
90,856 | Solving $T(n)=4T(n/4)+\log n$ using master theorem | <p>$T(n)=4T(n/4)+\log n$</p>

<p>I'm solving this recurrence relation by master theorem.</p>

<p>$a=4, b=4$ , $n^{\log_b a}=n^{\log_4 4}=n$</p>

<p>$f(n)=\log n=O(n^{1-\epsilon})$</p>

<p>when $\epsilon<1$, it is correct. So, $T(n)=\Theta(n)$.</p>

<p>But I'm confused how can ... | recurrence relation master theorem | 1 | Solving $T(n)=4T(n/4)+\log n$ using master theorem -- (recurrence relation master theorem)
<p>$T(n)=4T(n/4)+\log n$</p>

<p>I'm solving this recurrence relation by master theorem.</p>

<p>$a=4, b=4$ , $n^{\log_b a}=n^{\log_4 4}=n$</p>

<p>$f(n)=\log n=O(n^{1-\epsilon})$</p>

<p>when $\ep... | habedi/stack-exchange-dataset |
90,861 | Why vertices of directed acyclic graph are considered strongly-connected components? | <p>Well the title pretty much says it all, I've heard our professor saying that the smallest strongly-connected components in DAG (directed acyclic graph) are its vertices. Sadly I was unable to ask him for explanation and now this is stuck in my head ever since. </p>
 | graphs | 1 | Why vertices of directed acyclic graph are considered strongly-connected components? -- (graphs)
<p>Well the title pretty much says it all, I've heard our professor saying that the smallest strongly-connected components in DAG (directed acyclic graph) are its vertices. Sadly I was unable to ask him for explanation and ... | habedi/stack-exchange-dataset |
90,868 | Defining the polynomial hierarchy using $\Pi_i^p$ instead of $\Sigma_i^p$ | <p>From Computational Complexity - A Modern Approach, it is claimed in a remark that the following holds true.</p>
<blockquote>
<p>Remark 5.5</p>
<p>Note that <span class="math-container">$\mathbf\Sigma_1^p = \mathbf{NP}$</span> and <span class="math-container">$\mathbf\Pi_1^p = \mathbf{coNP}$</span>. More ... | complexity theory | 1 | Defining the polynomial hierarchy using $\Pi_i^p$ instead of $\Sigma_i^p$ -- (complexity theory)
<p>From Computational Complexity - A Modern Approach, it is claimed in a remark that the following holds true.</p>
<blockquote>
<p>Remark 5.5</p>
<p>Note that <span class="math-container">$\mathbf\Sigma_1^p = \m... | habedi/stack-exchange-dataset |
90,874 | In Bankers Algorithm, with three processes, in the question of need <= work(aka available). Is the need of 1 0 1 <= 0 0 2 work? | <p>Three processes A B C. When conducting the safety algorithm, no explanation that I've been able to find answers the question of how the processes are being compared. Is it the total processes added up, or every process individually must pass the '<=' operator, or is it like regular integers where Process A would... | algorithms | 1 | In Bankers Algorithm, with three processes, in the question of need <= work(aka available). Is the need of 1 0 1 <= 0 0 2 work? -- (algorithms)
<p>Three processes A B C. When conducting the safety algorithm, no explanation that I've been able to find answers the question of how the processes are being compared. Is it ... | habedi/stack-exchange-dataset |
90,880 | How to find vertices of bounded region made by intersection of lines | <p>Suppose we have random lines made with 2 points. and point has (x,y)</p>
<p>For example:</p>
<p><a href="https://i.stack.imgur.com/HTnfx.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HTnfx.gif" alt="this is sample image which i am looking for" /></a></p>
<p>Now when we draw a random ... | algorithms computational geometry | 1 | How to find vertices of bounded region made by intersection of lines -- (algorithms computational geometry)
<p>Suppose we have random lines made with 2 points. and point has (x,y)</p>
<p>For example:</p>
<p><a href="https://i.stack.imgur.com/HTnfx.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.c... | habedi/stack-exchange-dataset |
90,887 | What algorithm can I use for a rule based system? | <p>I'm doing research for a system that is based on rules. The goal of the system is to fire when some of the rules are true. </p>

<p>Explanation (requirements/working of the algorithm):<br/>
The algorithm will run in the background of an app. There will be a lot of data available about the user. The algor... | algorithms expert systems | 1 | What algorithm can I use for a rule based system? -- (algorithms expert systems)
<p>I'm doing research for a system that is based on rules. The goal of the system is to fire when some of the rules are true. </p>

<p>Explanation (requirements/working of the algorithm):<br/>
The algorithm will run in the back... | habedi/stack-exchange-dataset |
90,901 | The language of non-extendable strings of a regular language is regular | <p>I recently came across this question in my textbook.</p>

<blockquote>
 <p>$ \text{Let } L \text{ be a language over an alphabet } \Sigma \text{ that is accepted by some FSA.} $
 $ \text{Prove that the language is also accepted by some FSA.} $
 $ \operatorname{Max}(L) = \{x \in L : \forall y \... | regular languages automata finite automata | 1 | The language of non-extendable strings of a regular language is regular -- (regular languages automata finite automata)
<p>I recently came across this question in my textbook.</p>

<blockquote>
 <p>$ \text{Let } L \text{ be a language over an alphabet } \Sigma \text{ that is accepted by some FSA.} $
 ... | habedi/stack-exchange-dataset |
90,906 | Proving that $\{0^i10^i : i \ge 1\}$ is non-regular, using only closure results | <p>I have been stumped on the following question for a few hours now, I feel like I am missing some "aha" moment.</p>

<blockquote>
 <p>$\text{Suppose that } \{ a^nb^n : n \ge 1 \} \text{ is non-regular.}$
 $\text{Prove using closure results that } \{ 0^i10^i : i \ge 1 \} \text{ is non-regular.}$</p>&... | regular languages closure properties | 1 | Proving that $\{0^i10^i : i \ge 1\}$ is non-regular, using only closure results -- (regular languages closure properties)
<p>I have been stumped on the following question for a few hours now, I feel like I am missing some "aha" moment.</p>

<blockquote>
 <p>$\text{Suppose that } \{ a^nb^n : n \ge 1 \} \tex... | habedi/stack-exchange-dataset |
90,919 | What defines the interaction between CPU, Memory and I/O parts? | <p>From <a href="https://en.wikipedia.org/wiki/Microarchitecture" rel="nofollow noreferrer">Wikipedia</a>:</p>

<blockquote>
 <p>In computer engineering, microarchitecture, also called computer organization and sometimes abbreviated as µarch or uarch, is the way a given instruction set architecture (ISA), ... | computer architecture | 1 | What defines the interaction between CPU, Memory and I/O parts? -- (computer architecture)
<p>From <a href="https://en.wikipedia.org/wiki/Microarchitecture" rel="nofollow noreferrer">Wikipedia</a>:</p>

<blockquote>
 <p>In computer engineering, microarchitecture, also called computer organization and somet... | habedi/stack-exchange-dataset |
90,948 | Is it known that $AC^1 \subseteq L$? | <p>A good exercise is to show $NC^1 \subseteq L$. (According to the <a href="https://complexityzoo.uwaterloo.ca/Complexity_Zoo:N#nc1" rel="nofollow noreferrer">complexity zoo page</a> this was first shown by Borodin, 1977.) Although the details must be checked, the proof is simple: take the $NC^1$ circuit and do depth-... | complexity theory complexity classes space complexity circuits | 1 | Is it known that $AC^1 \subseteq L$? -- (complexity theory complexity classes space complexity circuits)
<p>A good exercise is to show $NC^1 \subseteq L$. (According to the <a href="https://complexityzoo.uwaterloo.ca/Complexity_Zoo:N#nc1" rel="nofollow noreferrer">complexity zoo page</a> this was first shown by Borodin... | habedi/stack-exchange-dataset |
90,951 | A Special Case of Multiple Choice Knapsack Problem: Is it NP-hard? | <p>The <a href="https://en.wikipedia.org/wiki/List_of_knapsack_problems" rel="nofollow noreferrer">multiple choice knapsack problem (MCKP)</a> can be defined as follows:</p>

<p><a href="https://i.stack.imgur.com/RRRs8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RRRs8.png" alt="enter imag... | algorithms np complete np hard knapsack problems | 1 | A Special Case of Multiple Choice Knapsack Problem: Is it NP-hard? -- (algorithms np complete np hard knapsack problems)
<p>The <a href="https://en.wikipedia.org/wiki/List_of_knapsack_problems" rel="nofollow noreferrer">multiple choice knapsack problem (MCKP)</a> can be defined as follows:</p>

<p><a href="http... | habedi/stack-exchange-dataset |
90,952 | Efficient traffic allocation | <p>Users can be assigned to one experiment on my site. I have an API that developers use to trigger logic for each experiment. They call ExperimentEngine.run() to trigger the code logic for the experiment.</p>

<p>I would like to allocate users to each experiment, at the point where a user might be exposed to t... | algorithms greedy algorithms assignment problem experimental analysis | 1 | Efficient traffic allocation -- (algorithms greedy algorithms assignment problem experimental analysis)
<p>Users can be assigned to one experiment on my site. I have an API that developers use to trigger logic for each experiment. They call ExperimentEngine.run() to trigger the code logic for the experiment.</p>
&#... | habedi/stack-exchange-dataset |
90,958 | Advantages (from a mathematical perspective) of representing data as symmetric matrices | <p>From <a href="https://en.wikipedia.org/wiki/Symmetric_matrix" rel="nofollow noreferrer">Wikipedia</a>, a <strong>symmetric matrix</strong> is a square matrix that is equal to its transpose. An example of this (I think) is an <a href="https://en.wikipedia.org/wiki/Adjacency_matrix" rel="nofollow noreferrer">adjacency... | matrices adjacency matrix | 1 | Advantages (from a mathematical perspective) of representing data as symmetric matrices -- (matrices adjacency matrix)
<p>From <a href="https://en.wikipedia.org/wiki/Symmetric_matrix" rel="nofollow noreferrer">Wikipedia</a>, a <strong>symmetric matrix</strong> is a square matrix that is equal to its transpose. An examp... | habedi/stack-exchange-dataset |
90,961 | How a range query works on a simple B+tree | <p>Given a <a href="https://en.wikipedia.org/wiki/B%2B_tree" rel="nofollow noreferrer">B+tree</a> indexing scheme, wondering how a database actually goes and finds records matching a range query such as the following:</p>

<pre><code>CREATE TABLE foo (
 x int,
 y int
)

SELECT * FROM foo&#... | trees database theory | 1 | How a range query works on a simple B+tree -- (trees database theory)
<p>Given a <a href="https://en.wikipedia.org/wiki/B%2B_tree" rel="nofollow noreferrer">B+tree</a> indexing scheme, wondering how a database actually goes and finds records matching a range query such as the following:</p>

<pre><code>CREATE T... | habedi/stack-exchange-dataset |
90,974 | What's the difference between transdichotomous model and RAM? | <p>In <a href="https://en.wikipedia.org/wiki/Transdichotomous_model" rel="nofollow noreferrer">Wikipedia</a>, it says</p>

<blockquote>
 <p>the transdichotomous model is a variation of the random access machine in which the machine word size is assumed to match the problem size.</p>
</blockquote>
&... | computation models | 1 | What's the difference between transdichotomous model and RAM? -- (computation models)
<p>In <a href="https://en.wikipedia.org/wiki/Transdichotomous_model" rel="nofollow noreferrer">Wikipedia</a>, it says</p>

<blockquote>
 <p>the transdichotomous model is a variation of the random access machine in which t... | habedi/stack-exchange-dataset |
90,985 | How to prove that $3$-Spanning-Tree decision problem is $NP$-Complete | <p>I am not sure what problem may reduce to <span class="math-container">$3$</span>-<strong>Spanning</strong>-<strong>Tree</strong> where <span class="math-container">$3$</span>-<strong>Spanning</strong>-<strong>Tree</strong> is defined as a decision problem which given an undirected graph <span class="math-container">... | np complete reductions | 1 | How to prove that $3$-Spanning-Tree decision problem is $NP$-Complete -- (np complete reductions)
<p>I am not sure what problem may reduce to <span class="math-container">$3$</span>-<strong>Spanning</strong>-<strong>Tree</strong> where <span class="math-container">$3$</span>-<strong>Spanning</strong>-<strong>Tree</stro... | habedi/stack-exchange-dataset |
90,989 | what does "vector" mean in computer science? | <p>I am trying to understand how computers work under the hood, and I came across following sentence. </p>

<p>"Computer technology is based on electronic circuits able to process <strong>vectors</strong> of 0's and 1's. For that reason all data are encoded by strings of 0's and 1's."</p>

<p>So does th... | binary | 1 | what does "vector" mean in computer science? -- (binary)
<p>I am trying to understand how computers work under the hood, and I came across following sentence. </p>

<p>"Computer technology is based on electronic circuits able to process <strong>vectors</strong> of 0's and 1's. For that reason all data are encod... | habedi/stack-exchange-dataset |
90,991 | Find the minimum path to every vertex using Bellman-Ford | <p>I was studying the chapter 24 of the <a href="https://dl.acm.org/citation.cfm?id=1614191" rel="nofollow noreferrer">CLRS</a> and got to the following question:</p>

<blockquote>
 <p><strong>24.1-5</strong> $\star$ Let $G=(V,E)$ be a weighted, directed graph with weight function $w : E \rightarrow \mathb... | algorithms graphs shortest path | 1 | Find the minimum path to every vertex using Bellman-Ford -- (algorithms graphs shortest path)
<p>I was studying the chapter 24 of the <a href="https://dl.acm.org/citation.cfm?id=1614191" rel="nofollow noreferrer">CLRS</a> and got to the following question:</p>

<blockquote>
 <p><strong>24.1-5</strong> $\st... | habedi/stack-exchange-dataset |
90,997 | Kolmogorov complexity of a sequence of n bits with k ones | <p>Let Program P be :"Generate, in lexicographic order, all sequences with k ones and n bit length;
Of these sequences, print the ith sequence."</p>

<p>Apparently the length of this program is $\log(n) + \log(\binom{n}{k}) + c$ where $c$ is a constant. Where $i$ can be represented in $\log(n)$ bits and &#x... | kolmogorov complexity | 1 | Kolmogorov complexity of a sequence of n bits with k ones -- (kolmogorov complexity)
<p>Let Program P be :"Generate, in lexicographic order, all sequences with k ones and n bit length;
Of these sequences, print the ith sequence."</p>

<p>Apparently the length of this program is $\log(n) + \log(\binom{n}{k})... | habedi/stack-exchange-dataset |
91,001 | Beginner question in Java | <p>I am just starting to study Java and was wondering why the following code</p>

<p>if(x>2) x*=2;
if(x>4)x=0;
System.out.println(x);</p>

<p>returns 0 for any value of x greater than 2. For example, when x=3, why would 6 not be returned?</p>
 | java | 1 | Beginner question in Java -- (java)
<p>I am just starting to study Java and was wondering why the following code</p>

<p>if(x>2) x*=2;
if(x>4)x=0;
System.out.println(x);</p>

<p>returns 0 for any value of x greater than 2. For example, when x=3, why would 6 not be returned?</p>
 | habedi/stack-exchange-dataset |
91,002 | Understanding the closed form derivation on the function f(n/3) + n^2 +3 | <p>I have the function:</p>

<p>$$ f(n) = 
\begin {cases}
4 & , n = 1 \\
f(\frac{n}{3}) + n^2 -3 & , n \ge2 
\end {cases}
$$</p>

<p>The given solutions shows the unwinding of the function as follows:</p>

<p>Assuming $ n \ge 2$</p>

<p>$$f(n) = f\bigg(\frac{n... | runtime analysis | 1 | Understanding the closed form derivation on the function f(n/3) + n^2 +3 -- (runtime analysis)
<p>I have the function:</p>

<p>$$ f(n) = 
\begin {cases}
4 & , n = 1 \\
f(\frac{n}{3}) + n^2 -3 & , n \ge2 
\end {cases}
$$</p>

<p>The given solutions shows the unwinding of the f... | habedi/stack-exchange-dataset |
91,010 | A way to convert a binary tree into a grid | <p>Wondering if there is a way to convert a binary tree into a grid such as this:</p>

<pre><code> a
 / \
 b c
 / \ / \
 d e f g


 or


 d--b--... | trees lattices | 1 | A way to convert a binary tree into a grid -- (trees lattices)
<p>Wondering if there is a way to convert a binary tree into a grid such as this:</p>

<pre><code> a
 / \
 b c
 / \ / \
 d e f g

&#... | habedi/stack-exchange-dataset |
91,025 | Number of calls with length 2 array in quick-sort | <p>I need to find average number of recursive calls in quick-sort with array of length 2. I established and solved the following recursion:</p>

<p>$$T_N = \frac{1}{N}\sum_{k=1}^N\left(T_{k-1}+N_{N-k}\right) = \frac{N+1}{N}T_{N-1} = \frac{N+1}{3}.$$</p>

<p>Where $T_0 = T_1 = 0, T_2 = 1$. But:</p>
&... | recursion quicksort | 1 | Number of calls with length 2 array in quick-sort -- (recursion quicksort)
<p>I need to find average number of recursive calls in quick-sort with array of length 2. I established and solved the following recursion:</p>

<p>$$T_N = \frac{1}{N}\sum_{k=1}^N\left(T_{k-1}+N_{N-k}\right) = \frac{N+1}{N}T_{N-1} = \fra... | habedi/stack-exchange-dataset |
91,027 | Problem with proving the undecidability of REGULAR$_{TM}$ | <p>Sipser in his book provided the following proof for undecidability of REGULAR$_{TM}$:</p>

<blockquote>
 <p>S = “On input $<M,w>$, where $M$ is a TM and w is a string:</p>
 
 <ol>
 <li><p>Construct the following TM $M_2$.</p>
 
 <p>$M_2$= “On input $x$:</p>
 
 <... | turing machines computability reductions | 1 | Problem with proving the undecidability of REGULAR$_{TM}$ -- (turing machines computability reductions)
<p>Sipser in his book provided the following proof for undecidability of REGULAR$_{TM}$:</p>

<blockquote>
 <p>S = “On input $<M,w>$, where $M$ is a TM and w is a string:</p>
 
 <ol>
... | habedi/stack-exchange-dataset |
91,039 | NP-complete problem with a polynomial number of yes-instances? | <p>I have the impression that for every NP-complete problem, for infinitely many input sizes $n$, the number of yes-instances over all possible inputs of size $n$, is (at least) exponential in $n$.</p>

<p>Is this true? Can it be proven (probably only under the assumption that $P\neq NP$)? Or can we, maybe arti... | complexity theory np complete np intermediate | 1 | NP-complete problem with a polynomial number of yes-instances? -- (complexity theory np complete np intermediate)
<p>I have the impression that for every NP-complete problem, for infinitely many input sizes $n$, the number of yes-instances over all possible inputs of size $n$, is (at least) exponential in $n$.</p>
... | habedi/stack-exchange-dataset |
91,042 | Hoare-Logic: Requirements for imperfect data types | <p>Theoretically, Hoare-Logic let's one prove the correctness of an algorithm, given pre- and post-condition.</p>

<p>However, as far as I've seen it so far, one idealizes his data-types to a mathematical set like $\mathbb{N}$ or $\mathbb{R}$. </p>

<p>So, even though the logic might be sound in Hoare-c... | hoare logic | 1 | Hoare-Logic: Requirements for imperfect data types -- (hoare logic)
<p>Theoretically, Hoare-Logic let's one prove the correctness of an algorithm, given pre- and post-condition.</p>

<p>However, as far as I've seen it so far, one idealizes his data-types to a mathematical set like $\mathbb{N}$ or $\mathbb{R}$. ... | habedi/stack-exchange-dataset |
91,047 | Choose minimum subset of edges in tree that connects all important nodes | <p>Let's say we have given weighted tree of size $n$ and list of important nodes in the tree $k$.</p>

<p>We want to choose subset of edges of the tree such that:</p>

<ul>
<li>For each two important nodes at least one edge of the path between them will be choosen</li>
<li>The sum of the subset ... | algorithms graphs optimization trees | 1 | Choose minimum subset of edges in tree that connects all important nodes -- (algorithms graphs optimization trees)
<p>Let's say we have given weighted tree of size $n$ and list of important nodes in the tree $k$.</p>

<p>We want to choose subset of edges of the tree such that:</p>

<ul>
<li>For each... | habedi/stack-exchange-dataset |
91,050 | Generate numeric or string ID for a sequence of elements | <p>How to generate a numeric or string id(not very large text) for a sequence of elements where ordering doesn't matter.</p>

<p>Example:<br>
<code>[41,1001,32]</code> should generate the same ID as <code>[32,1001,41]</code><br>
<code>[41,1001,32, 5]</code> should be different. </p>

<p>Element... | data compression pseudo random generators hashing | 1 | Generate numeric or string ID for a sequence of elements -- (data compression pseudo random generators hashing)
<p>How to generate a numeric or string id(not very large text) for a sequence of elements where ordering doesn't matter.</p>

<p>Example:<br>
<code>[41,1001,32]</code> should generate the same ID ... | habedi/stack-exchange-dataset |
91,064 | Modified Counting Inversions problem using divide and conquer | <blockquote>
 <p>Given an array $A$, find the number of pairs $(i, j)$, such that $ i > j$ and $A[i] \ge A[j]$.</p>
</blockquote>

<p>This is a modified version of the famous problem of <em>Counting Inversions</em>, only in this version it allows the elements to be equal as well. I have an algorithm... | algorithms arrays counting | 1 | Modified Counting Inversions problem using divide and conquer -- (algorithms arrays counting)
<blockquote>
 <p>Given an array $A$, find the number of pairs $(i, j)$, such that $ i > j$ and $A[i] \ge A[j]$.</p>
</blockquote>

<p>This is a modified version of the famous problem of <em>Counting Inversi... | habedi/stack-exchange-dataset |
91,071 | How do you proceed if your milp is not solvable | <p>We are currently developing an ilp/milp model to fit the best routes with given resources (people) in a given timeframe and given visits and costs to travel from one visit to another (asymetrical).</p>

<p>We went with a very simple aproach (make a cube person x visit x Time and add constraints from here on)... | linear programming integer programming constraint programming | 1 | How do you proceed if your milp is not solvable -- (linear programming integer programming constraint programming)
<p>We are currently developing an ilp/milp model to fit the best routes with given resources (people) in a given timeframe and given visits and costs to travel from one visit to another (asymetrical).</p>&... | habedi/stack-exchange-dataset |
91,083 | Construct a grammar over {$a,b$} whose language is {${a^mb^ia^n | i = m+n}$} | <p>I am a little confused on how to approach this problem. I am unsure how to construct both parts of the grammar using a context-free grammar. </p>

<p>This is as far as I got, but this will end up producing a's inside of the group of b's and a's. I'm not sure how to add the second group of a's to the right of... | context free | 1 | Construct a grammar over {$a,b$} whose language is {${a^mb^ia^n | i = m+n}$} -- (context free)
<p>I am a little confused on how to approach this problem. I am unsure how to construct both parts of the grammar using a context-free grammar. </p>

<p>This is as far as I got, but this will end up producing a's insi... | habedi/stack-exchange-dataset |
91,089 | if traveling salesman problem is decidable in polynomial time, can an actual solution be proposed in polynomial time? | <p>I'm asking because it seems that P problems refer to decision problems rather than actually propose a solution.</p>
 | complexity theory p vs np traveling salesman | 1 | if traveling salesman problem is decidable in polynomial time, can an actual solution be proposed in polynomial time? -- (complexity theory p vs np traveling salesman)
<p>I'm asking because it seems that P problems refer to decision problems rather than actually propose a solution.</p>
 | habedi/stack-exchange-dataset |
91,095 | Imaginary numbers and negative zero | <p>I've been studying the low-level hardware implementations of floating point numbers and doing an exercise to design a custom floating point implementation.</p>

<p>I know that being able to represent negative zero is important for some purposes, but ran across a curious question.</p>

<p>Complex numb... | floating point number formats | 1 | Imaginary numbers and negative zero -- (floating point number formats)
<p>I've been studying the low-level hardware implementations of floating point numbers and doing an exercise to design a custom floating point implementation.</p>

<p>I know that being able to represent negative zero is important for some pu... | habedi/stack-exchange-dataset |
91,105 | Does this "set intersection" problem have a different name? | <p>I've been back and forth about this one. I have the following theoretical homework problem, which describes the <code>SET-INTERSECTION</code> problem. In my homework, it's presented as being NP-complete.</p>

<p><a href="https://i.stack.imgur.com/rOtsl.png" rel="nofollow noreferrer"><img src="https://i.stack... | np complete sets | 1 | Does this "set intersection" problem have a different name? -- (np complete sets)
<p>I've been back and forth about this one. I have the following theoretical homework problem, which describes the <code>SET-INTERSECTION</code> problem. In my homework, it's presented as being NP-complete.</p>

<p><a href="https:... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.