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
116,896
Optimal root in shortest path tree (SPT)
<p>I would like to find the "optimal" shortest path tree (SPT) in some undirected weighted graph. As "optimal" SPT, I mean so its maximal path from root to leaf is minimal from any other potential SPTs.</p>&#xA;&#xA;<p>It is quite easy to find SPT from 1 root via Dijkstra's algorithm. So I can run Dijkstra from all ver...
graphs shortest path
1
Optimal root in shortest path tree (SPT) -- (graphs shortest path) <p>I would like to find the "optimal" shortest path tree (SPT) in some undirected weighted graph. As "optimal" SPT, I mean so its maximal path from root to leaf is minimal from any other potential SPTs.</p>&#xA;&#xA;<p>It is quite easy to find SPT from ...
habedi/stack-exchange-dataset
116,897
Recover an array from its insertion indices
<p>An array is built starting with an empty array, and then a sequence of insertions:</p>&#xA;&#xA;<ol>&#xA;<li>insert <span class="math-container">$a_1$</span> at index <span class="math-container">$z_1=1$</span></li>&#xA;<li>insert <span class="math-container">$a_2$</span> at index <span class="math-container">$z_2$<...
algorithms arrays
1
Recover an array from its insertion indices -- (algorithms arrays) <p>An array is built starting with an empty array, and then a sequence of insertions:</p>&#xA;&#xA;<ol>&#xA;<li>insert <span class="math-container">$a_1$</span> at index <span class="math-container">$z_1=1$</span></li>&#xA;<li>insert <span class="math-c...
habedi/stack-exchange-dataset
116,898
I cannot find an invariant for the following program
<p>I have the following:</p>&#xA;&#xA;<p>(|<span class="math-container">$y=0; x=c$</span>|) <code>while(x &gt; 0){y=y+a; x=x-1;}</code> (|<span class="math-container">$y= a*c$</span>|)</p>&#xA;&#xA;<p>This seems like a fairly simple program and I can intuitively tell that the post condition <span class="math-container"...
correctness proof loops loop invariants hoare logic
1
I cannot find an invariant for the following program -- (correctness proof loops loop invariants hoare logic) <p>I have the following:</p>&#xA;&#xA;<p>(|<span class="math-container">$y=0; x=c$</span>|) <code>while(x &gt; 0){y=y+a; x=x-1;}</code> (|<span class="math-container">$y= a*c$</span>|)</p>&#xA;&#xA;<p>This seem...
habedi/stack-exchange-dataset
116,923
Space complexity for storing integers in Python
<p>So I was watching this mock interview by an Airbnb engineer on interviewing.io (<a href="https://youtu.be/cdCeU8DJvPM?t=1224" rel="noreferrer">https://youtu.be/cdCeU8DJvPM?t=1224</a>) and around ~20:11 seconds he raises an interesting point.</p>&#xA;&#xA;<p>The question that the interviewee was trying to solve was -...
space complexity integers python
1
Space complexity for storing integers in Python -- (space complexity integers python) <p>So I was watching this mock interview by an Airbnb engineer on interviewing.io (<a href="https://youtu.be/cdCeU8DJvPM?t=1224" rel="noreferrer">https://youtu.be/cdCeU8DJvPM?t=1224</a>) and around ~20:11 seconds he raises an interest...
habedi/stack-exchange-dataset
116,924
Recognizable vs co-recognizable languages
<p>I understand following about recognizable (aka recursively enumerable) and co-recognizable languages:</p>&#xA;&#xA;<ol>&#xA;<li><p><strong>Definition 1: Recognizable language</strong> is one which have one-to-one correspondence with the natural number with the additional property that we could specify an algorithm t...
formal languages
1
Recognizable vs co-recognizable languages -- (formal languages) <p>I understand following about recognizable (aka recursively enumerable) and co-recognizable languages:</p>&#xA;&#xA;<ol>&#xA;<li><p><strong>Definition 1: Recognizable language</strong> is one which have one-to-one correspondence with the natural number w...
habedi/stack-exchange-dataset
116,926
What programming languages always learned in computer science B.Sc.?
<p>Even if programming by itself is not an <a href="https://cs.stackexchange.com/questions/116666/is-coding-a-concept-in-this-theoretical-logical-field-of-study">integral part of computer science</a>,<br>&#xA;I would bet any B.Sc. student learns fundamentals of binary code, fundamentals of assembly code and at least on...
formal languages education
1
What programming languages always learned in computer science B.Sc.? -- (formal languages education) <p>Even if programming by itself is not an <a href="https://cs.stackexchange.com/questions/116666/is-coding-a-concept-in-this-theoretical-logical-field-of-study">integral part of computer science</a>,<br>&#xA;I would be...
habedi/stack-exchange-dataset
116,944
Why can we ignore the constant factor in Weis's proof of the Master Theorem
<p>In the 4th edition of his Data Structures textbook, Weis gives a proof of part of the Master Theorem. This proof says "Let us ... ignore the constant factor in <span class="math-container">$\theta(N^k)$</span> ... I don't understand why it ignoring that constant is valid. (I know that the real Master Theorem is b...
recurrence relation master theorem
1
Why can we ignore the constant factor in Weis's proof of the Master Theorem -- (recurrence relation master theorem) <p>In the 4th edition of his Data Structures textbook, Weis gives a proof of part of the Master Theorem. This proof says "Let us ... ignore the constant factor in <span class="math-container">$\theta(N^k...
habedi/stack-exchange-dataset
116,948
How to determine time complexity with a simple way?
<p>I'm learning about time complexity but all the cases we did in class were rather simple. Now I'm working on my home work and the cases our teacher let us have was: <span class="math-container">$$f(n) = 4n(n + 2 \log^2 n^2) + e^{−n} + 8 \sin(2πn/256). $$</span></p>&#xA;&#xA;<p>Is there a simple way how a I can determ...
asymptotics big o notation
1
How to determine time complexity with a simple way? -- (asymptotics big o notation) <p>I'm learning about time complexity but all the cases we did in class were rather simple. Now I'm working on my home work and the cases our teacher let us have was: <span class="math-container">$$f(n) = 4n(n + 2 \log^2 n^2) + e^{−n} +...
habedi/stack-exchange-dataset
116,949
Relabel to front, what does topological sort according to admissible network mean?
<p>In the CLRS book it says that "relabel to front" algorithm, which solves the maximum-flow problem, maintains a list of topologically sorted vertices in the admissible network and that vertices with zero excess flow are moved to the front of the list.</p>&#xA;&#xA;<p>I do not fully understand what is the meaning of i...
network flow
1
Relabel to front, what does topological sort according to admissible network mean? -- (network flow) <p>In the CLRS book it says that "relabel to front" algorithm, which solves the maximum-flow problem, maintains a list of topologically sorted vertices in the admissible network and that vertices with zero excess flow a...
habedi/stack-exchange-dataset
116,955
Water Jug Problem in AI
<p>In AI we can classify a problem in 3 classes, <strong>ignorable, recoverable</strong> or <strong>irrecoverable</strong> problems. Now while reading Water jug Problem</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/nBSS3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nBSS3.png" alt="enter image descrip...
artificial intelligence
1
Water Jug Problem in AI -- (artificial intelligence) <p>In AI we can classify a problem in 3 classes, <strong>ignorable, recoverable</strong> or <strong>irrecoverable</strong> problems. Now while reading Water jug Problem</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/nBSS3.png" rel="noreferrer"><img src="https://...
habedi/stack-exchange-dataset
116,959
Are event and mode well defined terms in CS literature?
<p>From my experience in programming small imperative scrips for personal usage with JavaScript,<br>&#xA;I can conclude that an <em>event</em> is "A perceived change in the output of a system" (such as clicking a link from client side or refreshing a page from server side),<br>&#xA;while a <em>mode</em> is a situation ...
terminology
1
Are event and mode well defined terms in CS literature? -- (terminology) <p>From my experience in programming small imperative scrips for personal usage with JavaScript,<br>&#xA;I can conclude that an <em>event</em> is "A perceived change in the output of a system" (such as clicking a link from client side or refreshin...
habedi/stack-exchange-dataset
116,963
Finding most likely tree over a semilattice
<p>If I am not mistaken, then a semilattice defines a finite set of trees, for example spanning trees.</p>&#xA;&#xA;<p>Now assume that each semilattice edge is annotated with a transition probability. In addition, let's assume that the probability of a tree over the semilattice is the product of the probabilities of al...
trees spanning trees lattices graphical models
1
Finding most likely tree over a semilattice -- (trees spanning trees lattices graphical models) <p>If I am not mistaken, then a semilattice defines a finite set of trees, for example spanning trees.</p>&#xA;&#xA;<p>Now assume that each semilattice edge is annotated with a transition probability. In addition, let's assu...
habedi/stack-exchange-dataset
116,969
Turing recognizable but not Turing decidable language cannot have TM do not halt on infinitely many inputs
<p>Sorry, I think I misunderstand the question, It should read as if <span class="math-container">$L$</span> is turing-recognizable but not decidable, then there exists infinitely many input that any TM will not halt on it...</p>&#xA;
formal languages turing machines automata undecidability halting problem
1
Turing recognizable but not Turing decidable language cannot have TM do not halt on infinitely many inputs -- (formal languages turing machines automata undecidability halting problem) <p>Sorry, I think I misunderstand the question, It should read as if <span class="math-container">$L$</span> is turing-recognizable but...
habedi/stack-exchange-dataset
116,978
How to check rapidly if an element is present in a large set of data
<p>I am trying to harvest scientific publications data from different online sources like Core, PMC, arXiv etc. From these sources I keep the metadata of the articles (title, authors, abstract etc.) and the fulltext (only from the sources that provide it).</p>&#xA;&#xA;<p>However, I dont want to harvest the same articl...
python big data
1
How to check rapidly if an element is present in a large set of data -- (python big data) <p>I am trying to harvest scientific publications data from different online sources like Core, PMC, arXiv etc. From these sources I keep the metadata of the articles (title, authors, abstract etc.) and the fulltext (only from the...
habedi/stack-exchange-dataset
116,985
Are regular languages and their regular expressions part of computer science?
<p>I am trying to understand if regular languages and their regular expressions are concepts of computer science in general and if these are discovered, or invented, by computer scientists, in particular.</p>&#xA;&#xA;<p>In math discourse there was always the question like "Are mathematics discovered or invented?".<br>...
terminology logic regular expressions mathematical programming
1
Are regular languages and their regular expressions part of computer science? -- (terminology logic regular expressions mathematical programming) <p>I am trying to understand if regular languages and their regular expressions are concepts of computer science in general and if these are discovered, or invented, by compu...
habedi/stack-exchange-dataset
116,992
Doubt on Karger's Algorithm for Min-Cuts
<p>I am learning Karger's algorithm for Min-Cuts.I have been solving 1 problem on it. The first part of the problem asks us to run Karger's Algorithm on a given graph. I have no problem doing that. My doubt is in the 2nd part of the question.</p>&#xA;&#xA;<p>2nd part of the question asks to find the probability of cont...
algorithms graphs randomized algorithms
1
Doubt on Karger's Algorithm for Min-Cuts -- (algorithms graphs randomized algorithms) <p>I am learning Karger's algorithm for Min-Cuts.I have been solving 1 problem on it. The first part of the problem asks us to run Karger's Algorithm on a given graph. I have no problem doing that. My doubt is in the 2nd part of the q...
habedi/stack-exchange-dataset
117,006
How undecidable is it whether a given Turing machine runs in polynomial time?
<p>The proof of Theorem 1 that PTime is not semi-decidable <a href="https://arxiv.org/pdf/1911.04026v1.pdf" rel="nofollow noreferrer">in this recent preprint</a> effectively shows that it is <span class="math-container">$\mathsf{R}\cup\mathsf{coR}$</span>-hard. The proof itself is similar to undecidability proofs at <...
computability undecidability polynomial time
1
How undecidable is it whether a given Turing machine runs in polynomial time? -- (computability undecidability polynomial time) <p>The proof of Theorem 1 that PTime is not semi-decidable <a href="https://arxiv.org/pdf/1911.04026v1.pdf" rel="nofollow noreferrer">in this recent preprint</a> effectively shows that it is <...
habedi/stack-exchange-dataset
117,007
Prof Knuth's MIX computer - Card Reader and illegal characters
<p>I'm reading through Knuth's "The Art of Computer Programming" volume 1 (3rd edition), with the goal of understanding the complete workings of his hypothetical MIX computer in order to implement MIX in software. Needless to say this is a long term project! (I'm not in college or anything, just an amateur CS enthusi...
simulation
1
Prof Knuth's MIX computer - Card Reader and illegal characters -- (simulation) <p>I'm reading through Knuth's "The Art of Computer Programming" volume 1 (3rd edition), with the goal of understanding the complete workings of his hypothetical MIX computer in order to implement MIX in software. Needless to say this is a ...
habedi/stack-exchange-dataset
117,010
What is the computational power of Parsing Expression Grammars?
<p>Parsing Expression Grammars were introduced by <a href="http://www.brynosaurus.com/pub/lang/peg.pdf" rel="nofollow noreferrer">Bryan Ford</a> in <em>Parsing Expression Grammars: A Recognition Based Syntactic Foundation.</em>. <a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar#cite_note-For04-1" rel="n...
formal grammars parsers
1
What is the computational power of Parsing Expression Grammars? -- (formal grammars parsers) <p>Parsing Expression Grammars were introduced by <a href="http://www.brynosaurus.com/pub/lang/peg.pdf" rel="nofollow noreferrer">Bryan Ford</a> in <em>Parsing Expression Grammars: A Recognition Based Syntactic Foundation.</em>...
habedi/stack-exchange-dataset
117,019
No nonfinal states in NFA
<p>I know that if there are no non-final states in DFA then the language accepted is <span class="math-container">$\Sigma^*$</span>.</p>&#xA;&#xA;<p>What will happen if there are no non-final states in an NFA? Can we say it also accepts <span class="math-container">$\Sigma^*$</span>? Can there be an NFA with no non-fin...
formal languages automata finite automata
1
No nonfinal states in NFA -- (formal languages automata finite automata) <p>I know that if there are no non-final states in DFA then the language accepted is <span class="math-container">$\Sigma^*$</span>.</p>&#xA;&#xA;<p>What will happen if there are no non-final states in an NFA? Can we say it also accepts <span clas...
habedi/stack-exchange-dataset
117,043
Can current quantum computers decide languages that Turing Machines cannot?
<p>I am currently learning Computing Theory at university, and we were on the topic of Turing-Decidability, Recognizability, etc. Showing that a problem is undecidable with Turing machines due to reductions got me thinking about all the Quantum Computer craze. </p>&#xA;&#xA;<p>As such my question is as follows</p>&#xA;...
turing machines reductions undecidability quantum computing church turing thesis
1
Can current quantum computers decide languages that Turing Machines cannot? -- (turing machines reductions undecidability quantum computing church turing thesis) <p>I am currently learning Computing Theory at university, and we were on the topic of Turing-Decidability, Recognizability, etc. Showing that a problem is un...
habedi/stack-exchange-dataset
117,054
Determine shortest path in a 4x5 grid graph
<p>Suppose we had a graph <span class="math-container">$G = (V,E)$</span>. </p>&#xA;&#xA;<p>This graph can also be seen as a <span class="math-container">$4x5$</span> grid graph as shown in the image. </p>&#xA;&#xA;<p>There is a directed edge from <span class="math-container">$v_{i,j} \rightarrow v_{i,j+1}$</span> for ...
algorithms graphs shortest path
1
Determine shortest path in a 4x5 grid graph -- (algorithms graphs shortest path) <p>Suppose we had a graph <span class="math-container">$G = (V,E)$</span>. </p>&#xA;&#xA;<p>This graph can also be seen as a <span class="math-container">$4x5$</span> grid graph as shown in the image. </p>&#xA;&#xA;<p>There is a directed e...
habedi/stack-exchange-dataset
117,059
Special case of the $MST-$ Problem
<p>I am working on the following exercise:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider an undirected complete graph <span class="math-container">$G(V,E)$</span> and positive real numbers <span class="math-container">$a_1,a_2,\ldots,a_n$</span>. The task is to find a MST with respect to the edge weights <span class="mat...
graphs time complexity minimum spanning tree
1
Special case of the $MST-$ Problem -- (graphs time complexity minimum spanning tree) <p>I am working on the following exercise:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider an undirected complete graph <span class="math-container">$G(V,E)$</span> and positive real numbers <span class="math-container">$a_1,a_2,\ldots,a_n...
habedi/stack-exchange-dataset
117,060
Finding the similarity between large text files
<p><strong>My first question is: is there an algorithm that already exists for this? If not any thoughts and ideas are appreciated.</strong></p>&#xA;&#xA;<p>Let's say I have two large text files (original file A and new file B). Each file is English prose text (including dialogue) with a typical size 256K to 500K chara...
algorithms
1
Finding the similarity between large text files -- (algorithms) <p><strong>My first question is: is there an algorithm that already exists for this? If not any thoughts and ideas are appreciated.</strong></p>&#xA;&#xA;<p>Let's say I have two large text files (original file A and new file B). Each file is English prose ...
habedi/stack-exchange-dataset
117,063
Sensitivity analysis of $MST$ edges
<p>I am working on the following exercise:</p>&#xA;<blockquote>&#xA;<p>Consider an undirected graph <span class="math-container">$G = (V,E)$</span>. Let <span class="math-container">$T^* = (V,E_{T^*})$</span> be a <span class="math-container">$MST$</span> and let <span class="math-container">$e$</span> be an edge in <s...
minimum spanning tree
1
Sensitivity analysis of $MST$ edges -- (minimum spanning tree) <p>I am working on the following exercise:</p>&#xA;<blockquote>&#xA;<p>Consider an undirected graph <span class="math-container">$G = (V,E)$</span>. Let <span class="math-container">$T^* = (V,E_{T^*})$</span> be a <span class="math-container">$MST$</span> a...
habedi/stack-exchange-dataset
117,078
Example of non-regular context free language L such that prefix(L) is regular
<p>Suppose we have some non-regular context free language L. Suppose we also have language of all prefixes of words in L.</p>&#xA;&#xA;<blockquote>&#xA; <p>What can be an example of non-regular language L such that language of&#xA; it's prefixes is regular (Can be represented by a finite automaton)?</p>&#xA;</blockqu...
regular languages context free
1
Example of non-regular context free language L such that prefix(L) is regular -- (regular languages context free) <p>Suppose we have some non-regular context free language L. Suppose we also have language of all prefixes of words in L.</p>&#xA;&#xA;<blockquote>&#xA; <p>What can be an example of non-regular language L ...
habedi/stack-exchange-dataset
117,091
How to determine minimum word length of regular language
<p>Given a regular language <span class="math-container">$L$</span> and a regular expression <span class="math-container">$r$</span> with <span class="math-container">$L=L(r)$</span>. Is it possible to determine the minimum length of words of <span class="math-container">$L(r)$</span> by the structure of <span class="m...
regular languages regular expressions
1
How to determine minimum word length of regular language -- (regular languages regular expressions) <p>Given a regular language <span class="math-container">$L$</span> and a regular expression <span class="math-container">$r$</span> with <span class="math-container">$L=L(r)$</span>. Is it possible to determine the mini...
habedi/stack-exchange-dataset
117,100
Prove or disprove - graph doesn't exists
<p>So, we have a directed graph G whose basis graph is connective.&#xA;I was asked to prove or disprove If its possible that for every DFS run on G, the output will be two trees containing all G vertices .&#xA;The only thing I could think of Is that graph like this cannon have a root (otherwise we could use DFS on the ...
graphs
1
Prove or disprove - graph doesn't exists -- (graphs) <p>So, we have a directed graph G whose basis graph is connective.&#xA;I was asked to prove or disprove If its possible that for every DFS run on G, the output will be two trees containing all G vertices .&#xA;The only thing I could think of Is that graph like this c...
habedi/stack-exchange-dataset
117,102
Is 3-colouring NP-hard for 5-colourable graphs?
<p>Recently it was shown that it is NP-hard to find a 5-colouring of a 3-colourable graph.&#xA;More generally, it is NP-hard to distinguish <span class="math-container">$k$</span>-colourable graphs from those that are not <span class="math-container">$(2k-1)$</span>-colourable, for <span class="math-container">$k\ge 3$...
complexity theory np hard
1
Is 3-colouring NP-hard for 5-colourable graphs? -- (complexity theory np hard) <p>Recently it was shown that it is NP-hard to find a 5-colouring of a 3-colourable graph.&#xA;More generally, it is NP-hard to distinguish <span class="math-container">$k$</span>-colourable graphs from those that are not <span class="math-c...
habedi/stack-exchange-dataset
117,104
Treap union unrandomizes priorities?
<p>The algorithm for the union of two sets represented by treaps is defined in <a href="https://kilthub.cmu.edu/articles/Fast_Set_Operations_Using_Treaps/6605606/files/12096080.pdf" rel="nofollow noreferrer">this paper</a> and on <a href="https://en.wikipedia.org/wiki/Treap#Bulk_operations" rel="nofollow noreferrer">Wi...
balanced search trees
1
Treap union unrandomizes priorities? -- (balanced search trees) <p>The algorithm for the union of two sets represented by treaps is defined in <a href="https://kilthub.cmu.edu/articles/Fast_Set_Operations_Using_Treaps/6605606/files/12096080.pdf" rel="nofollow noreferrer">this paper</a> and on <a href="https://en.wikipe...
habedi/stack-exchange-dataset
117,108
Computing minimum partition of poset of $N$ intervals into chains in $o(N^{2.5})$ time?
<p>Consider a set <span class="math-container">$P$</span> of <span class="math-container">$N$</span> intervals <span class="math-container">$\{I_i = (l_i, r_i)\}$</span> partially ordered according the standard <a href="https://en.wikipedia.org/wiki/Interval_order" rel="nofollow noreferrer">interval order</a>: <span cl...
matching bipartite matching partitions intervals partial order
1
Computing minimum partition of poset of $N$ intervals into chains in $o(N^{2.5})$ time? -- (matching bipartite matching partitions intervals partial order) <p>Consider a set <span class="math-container">$P$</span> of <span class="math-container">$N$</span> intervals <span class="math-container">$\{I_i = (l_i, r_i)\}$</...
habedi/stack-exchange-dataset
117,109
Partition into pairs with minimum absolute difference, NP-hard?
<p>I have a set <span class="math-container">$S$</span> of an even number of positive elements <span class="math-container">$2m$</span> and <span class="math-container">$m$</span> values <span class="math-container">$t_1,t_2,\ldots,t_m$</span> where each <span class="math-container">$t_i\leq1$</span> for all <span clas...
algorithms complexity theory reductions np hard
1
Partition into pairs with minimum absolute difference, NP-hard? -- (algorithms complexity theory reductions np hard) <p>I have a set <span class="math-container">$S$</span> of an even number of positive elements <span class="math-container">$2m$</span> and <span class="math-container">$m$</span> values <span class="mat...
habedi/stack-exchange-dataset
117,134
General resolution in first order logic
<p>Assuming you have a formula in first order logic like</p>&#xA;&#xA;<blockquote>&#xA; <blockquote>&#xA; <p><span class="math-container">$$(\forall_x p(x) \land \forall_x q(x)) \rightarrow \forall_x(p(x) \land q(x))$$</span>&#xA; (which seems valid?)</p>&#xA; </blockquote>&#xA;</blockquote>&#xA;&#xA;<p>Convert...
logic artificial intelligence first order logic
1
General resolution in first order logic -- (logic artificial intelligence first order logic) <p>Assuming you have a formula in first order logic like</p>&#xA;&#xA;<blockquote>&#xA; <blockquote>&#xA; <p><span class="math-container">$$(\forall_x p(x) \land \forall_x q(x)) \rightarrow \forall_x(p(x) \land q(x))$$</spa...
habedi/stack-exchange-dataset
117,136
Multi-agent randomized behavior
<p>In <strong>Artificial Intelligence: A Modern Approach</strong> Edition 3, Page of 43, At Single Vs. Multi-agent section's last line, Writer says,</p>&#xA;&#xA;<blockquote>&#xA; <p>In some competitive environments, randomized behavior is rational&#xA; because it avoids the <strong>pitfalls of predictability</strong...
artificial intelligence
1
Multi-agent randomized behavior -- (artificial intelligence) <p>In <strong>Artificial Intelligence: A Modern Approach</strong> Edition 3, Page of 43, At Single Vs. Multi-agent section's last line, Writer says,</p>&#xA;&#xA;<blockquote>&#xA; <p>In some competitive environments, randomized behavior is rational&#xA; bec...
habedi/stack-exchange-dataset
117,141
NP-hard problems but only for n≥3
<ul>&#xA;<li>2-SAT is in P; 3-SAT is NP-complete.</li>&#xA;<li>Exact cover by 2-sets is in P; exact cover by 3-sets is NP-complete</li>&#xA;<li>Two-dimensional matching is in P; three-dimensional matching is NP-complete</li>&#xA;<li>Graph 2-coloring is trivially in P; graph 3-coloring is NP-complete</li>&#xA;</ul>&#xA;...
np complete
1
NP-hard problems but only for n≥3 -- (np complete) <ul>&#xA;<li>2-SAT is in P; 3-SAT is NP-complete.</li>&#xA;<li>Exact cover by 2-sets is in P; exact cover by 3-sets is NP-complete</li>&#xA;<li>Two-dimensional matching is in P; three-dimensional matching is NP-complete</li>&#xA;<li>Graph 2-coloring is trivially in P; ...
habedi/stack-exchange-dataset
117,146
Decide whether an $n$-bit positive integer is composite
<p><strong>Question:</strong></p>&#xA;&#xA;<p>Given an <span class="math-container">$n$</span>-bit positive integer. A decision problem is to decide whether it is composite. Is this problem in NP?</p>&#xA;&#xA;<p>I know that for every composite number, a factor of the number is a certificate.&#xA;Verification proceeds ...
complexity theory np complete np decision problem
1
Decide whether an $n$-bit positive integer is composite -- (complexity theory np complete np decision problem) <p><strong>Question:</strong></p>&#xA;&#xA;<p>Given an <span class="math-container">$n$</span>-bit positive integer. A decision problem is to decide whether it is composite. Is this problem in NP?</p>&#xA;&#xA...
habedi/stack-exchange-dataset
117,148
Intuition behind min cut in a flow network? Whether it's baseball elimination or project selection
<p>I was wondering if someone can give me a general definition of a min-cut besides it being the max flow of a network. </p>&#xA;&#xA;<p>For example, in the baseball elimination problem, if we wanted to find out if team z is eliminated, the min cut represents the team(s) that will beat team z out of the 1st place if th...
algorithms graphs network flow
1
Intuition behind min cut in a flow network? Whether it's baseball elimination or project selection -- (algorithms graphs network flow) <p>I was wondering if someone can give me a general definition of a min-cut besides it being the max flow of a network. </p>&#xA;&#xA;<p>For example, in the baseball elimination problem...
habedi/stack-exchange-dataset
117,153
How to find number of combinations of choosing one from k subsets
<p>Consider we have set S:</p>&#xA;&#xA;<p>S = {1,2,3,4,5,6}</p>&#xA;&#xA;<p>and 3 (say k) subsets of S:</p>&#xA;&#xA;<p>S_1 = {1,2,3}</p>&#xA;&#xA;<p>S_2 = {2,3,4,5}</p>&#xA;&#xA;<p>S_3 = {1,3,6}</p>&#xA;&#xA;<p>What is the total number of cases choosing one element from each subsets?</p>&#xA;&#xA;<p>Same element cann...
algorithms sets
1
How to find number of combinations of choosing one from k subsets -- (algorithms sets) <p>Consider we have set S:</p>&#xA;&#xA;<p>S = {1,2,3,4,5,6}</p>&#xA;&#xA;<p>and 3 (say k) subsets of S:</p>&#xA;&#xA;<p>S_1 = {1,2,3}</p>&#xA;&#xA;<p>S_2 = {2,3,4,5}</p>&#xA;&#xA;<p>S_3 = {1,3,6}</p>&#xA;&#xA;<p>What is the total nu...
habedi/stack-exchange-dataset
117,154
Conditions under which the 3-partition problem is not strongly NP-complete?
<p>I'm a bit confused about the <a href="https://en.wikipedia.org/wiki/3-partition_problem" rel="nofollow noreferrer">3-partition problem</a>. More specifically I'm confused about this from the Wikipedia article:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let B denote the (desired) sum of each subset Si, or equivalently, let t...
time complexity np complete combinatorics partitions
1
Conditions under which the 3-partition problem is not strongly NP-complete? -- (time complexity np complete combinatorics partitions) <p>I'm a bit confused about the <a href="https://en.wikipedia.org/wiki/3-partition_problem" rel="nofollow noreferrer">3-partition problem</a>. More specifically I'm confused about this f...
habedi/stack-exchange-dataset
117,170
Removing recursion from a function with multiple params
<p>I am given the following function as a brain teaser:</p>&#xA;&#xA;<pre><code>def t(x, y, z):&#xA; if x &lt;= z:&#xA; return y&#xA; else:&#xA; return t(t(x - 1 , y , z ) , t(y - 1 , z , x ) , t (z - 1 , x , y ))&#xA;</code></pre>&#xA;&#xA;<p>the task is to remove the recursion in the else-br...
algorithms recursion
1
Removing recursion from a function with multiple params -- (algorithms recursion) <p>I am given the following function as a brain teaser:</p>&#xA;&#xA;<pre><code>def t(x, y, z):&#xA; if x &lt;= z:&#xA; return y&#xA; else:&#xA; return t(t(x - 1 , y , z ) , t(y - 1 , z , x ) , t (z - 1 , x , y )...
habedi/stack-exchange-dataset
117,173
Is it common in the literature to define regular languages and serialization languages as programming languages?
<p>Often when I create programs I use operating-programming language such as Bash for automating OS operations, structure ("markup") language such as HTML to define structures, styling language such as CSS to style structures, and programming (behavior defining) language such as JavaScript, to define the "nature of int...
terminology
1
Is it common in the literature to define regular languages and serialization languages as programming languages? -- (terminology) <p>Often when I create programs I use operating-programming language such as Bash for automating OS operations, structure ("markup") language such as HTML to define structures, styling langu...
habedi/stack-exchange-dataset
117,174
Calculate the number of combinations of a sequence of numbers in a particular order
<p>I have a problem solving coding challenge when I have to calculate the number of combinations, numbers from <strong>0</strong> to <strong>9</strong>, with the length <strong>n</strong>, with <strong>2</strong> rules -</p>&#xA;&#xA;<p><strong>-</strong> The first number cannot be <strong>0</strong></p>&#xA;&#xA;<p><s...
algorithms
1
Calculate the number of combinations of a sequence of numbers in a particular order -- (algorithms) <p>I have a problem solving coding challenge when I have to calculate the number of combinations, numbers from <strong>0</strong> to <strong>9</strong>, with the length <strong>n</strong>, with <strong>2</strong> rules -...
habedi/stack-exchange-dataset
117,178
Determining key from plaintext and ciphertext (Vigenère)
<p>I was wondering why mathematically we can know the key in the Vigenère cipher if we know in advance a message and its encryption.</p>&#xA;
cryptography encoding scheme encryption
1
Determining key from plaintext and ciphertext (Vigenère) -- (cryptography encoding scheme encryption) <p>I was wondering why mathematically we can know the key in the Vigenère cipher if we know in advance a message and its encryption.</p>&#xA;
habedi/stack-exchange-dataset
117,189
Wrong proof about maximum matching
<p>Given a bipartite graph <span class="math-container">$G=(U,V,E)$</span>, find a maximum matching.</p>&#xA;&#xA;<p>Algorithm G:</p>&#xA;&#xA;<ul>&#xA;<li>Let <span class="math-container">$S\gets\emptyset$</span></li>&#xA;<li>Mark all edges unmatched</li>&#xA;<li>For <span class="math-container">$i\gets1$</span> to <s...
algorithms
1
Wrong proof about maximum matching -- (algorithms) <p>Given a bipartite graph <span class="math-container">$G=(U,V,E)$</span>, find a maximum matching.</p>&#xA;&#xA;<p>Algorithm G:</p>&#xA;&#xA;<ul>&#xA;<li>Let <span class="math-container">$S\gets\emptyset$</span></li>&#xA;<li>Mark all edges unmatched</li>&#xA;<li>For ...
habedi/stack-exchange-dataset
117,192
Reductions from non decision problems
<p>I want to show a minimization problem <span class="math-container">$Y$</span> has no approximation factor of 1.36. To be more specific the problem <span class="math-container">$Y$</span> is the exemplar distance problem between two genomes. Could I reduce from the min vertex cover problem instead of the decision ver...
complexity theory computability np complete reductions approximation
1
Reductions from non decision problems -- (complexity theory computability np complete reductions approximation) <p>I want to show a minimization problem <span class="math-container">$Y$</span> has no approximation factor of 1.36. To be more specific the problem <span class="math-container">$Y$</span> is the exemplar di...
habedi/stack-exchange-dataset
117,206
Time Complexity: Big-O
<p>What is the time complexity of this loop?</p>&#xA;&#xA;<pre><code>k=1&#xA;for(j=0;j&lt;=n;j+=k)&#xA; k++;&#xA;</code></pre>&#xA;&#xA;<p>Is it <span class="math-container">$O(n)$</span> as we are increasing <span class="math-container">$j$</span> linearly?</p>&#xA;
time complexity
1
Time Complexity: Big-O -- (time complexity) <p>What is the time complexity of this loop?</p>&#xA;&#xA;<pre><code>k=1&#xA;for(j=0;j&lt;=n;j+=k)&#xA; k++;&#xA;</code></pre>&#xA;&#xA;<p>Is it <span class="math-container">$O(n)$</span> as we are increasing <span class="math-container">$j$</span> linearly?</p>&#xA;
habedi/stack-exchange-dataset
117,213
The space complexity of a function that allocates space based on the input value and not size
<p>What is the space complexity of the following hyphotetical function:</p>&#xA;&#xA;<pre><code>void function(int n) {&#xA; int[] array = new int[n]; // allocate array of size n&#xA; return;&#xA;}&#xA;</code></pre>&#xA;&#xA;<p>My intuition tells me that it is not O(n). Because the function will allocate an array of s...
complexity theory asymptotics space complexity space analysis
1
The space complexity of a function that allocates space based on the input value and not size -- (complexity theory asymptotics space complexity space analysis) <p>What is the space complexity of the following hyphotetical function:</p>&#xA;&#xA;<pre><code>void function(int n) {&#xA; int[] array = new int[n]; // alloc...
habedi/stack-exchange-dataset
117,218
Making a CFG for a^i b^j c^k such that i+k < 3j
<p>I have the language <span class="math-container">$L = \{ a^ib^jc^k \mid i + k &lt; 3j \}$</span>, however I am struggling to convert it to a CFG.</p>&#xA;&#xA;<p>I have thought about solving this for a long time but but this still hasn't gotten me very far</p>&#xA;&#xA;<p>Any help would be appreciated Thanks</p>&#xA...
formal languages context free formal grammars
1
Making a CFG for a^i b^j c^k such that i+k < 3j -- (formal languages context free formal grammars) <p>I have the language <span class="math-container">$L = \{ a^ib^jc^k \mid i + k &lt; 3j \}$</span>, however I am struggling to convert it to a CFG.</p>&#xA;&#xA;<p>I have thought about solving this for a long time but bu...
habedi/stack-exchange-dataset
117,219
Do all programming languages adhere to the IEEE 754-2008 standard?
<p>I am well aware that the <code>float</code> data type's maximum value is approximately <code>1.8E308</code>, which means that across the various programming languages such as dearly beloved Java, the maximum factorial we can compute with this primitive data type is that of 170. Trying to compute the factorial of 171...
floating point
1
Do all programming languages adhere to the IEEE 754-2008 standard? -- (floating point) <p>I am well aware that the <code>float</code> data type's maximum value is approximately <code>1.8E308</code>, which means that across the various programming languages such as dearly beloved Java, the maximum factorial we can compu...
habedi/stack-exchange-dataset
117,220
Asymptotics of $\frac{1}{\log(\frac{2^n}{2^n-1})}$
<p>I am trying to understand the asymptotics of</p>&#xA;&#xA;<p><span class="math-container">\begin{equation}&#xA;f(n) = \frac{1}{\log(\frac{2^n}{2^n-1})}&#xA;\end{equation}</span>&#xA;In particular, is there some <span class="math-container">$c \geq 1$</span> such that <span class="math-container">$f(n) = O(n^c)$</spa...
asymptotics big o notation
1
Asymptotics of $\frac{1}{\log(\frac{2^n}{2^n-1})}$ -- (asymptotics big o notation) <p>I am trying to understand the asymptotics of</p>&#xA;&#xA;<p><span class="math-container">\begin{equation}&#xA;f(n) = \frac{1}{\log(\frac{2^n}{2^n-1})}&#xA;\end{equation}</span>&#xA;In particular, is there some <span class="math-conta...
habedi/stack-exchange-dataset
117,238
Number of maximal cliques in a ($2C_4$, $C_5$, $P_5$)-free graph
<p>So far, I have found out that chordal graphs have <a href="http://i.stanford.edu/pub/cstr/reports/cs/tr/75/531/CS-TR-75-531.pdf" rel="nofollow noreferrer">linear number of maximal cliques</a> with respect to the number of vertices.&#xA;In general case, it is exponential.</p>&#xA;<p>I am trying to determine whether t...
graphs reference request clique
1
Number of maximal cliques in a ($2C_4$, $C_5$, $P_5$)-free graph -- (graphs reference request clique) <p>So far, I have found out that chordal graphs have <a href="http://i.stanford.edu/pub/cstr/reports/cs/tr/75/531/CS-TR-75-531.pdf" rel="nofollow noreferrer">linear number of maximal cliques</a> with respect to the num...
habedi/stack-exchange-dataset
117,249
variable in turing machine
<p>Here is a simple turing machine, that accepts only <span class="math-container">$0$</span>.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/i5Evc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i5Evc.png" alt="tm accepts zero"></a></p>&#xA;&#xA;<p>For this, it read <span class="math-container">...
turing machines
1
variable in turing machine -- (turing machines) <p>Here is a simple turing machine, that accepts only <span class="math-container">$0$</span>.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/i5Evc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i5Evc.png" alt="tm accepts zero"></a></p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
117,250
turing machine logic instead of something
<p>Lets assume I have this turing machine:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/kAlvf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kAlvf.png" alt="tm_except_something"></a></p>&#xA;&#xA;<p>And I have a <span class="math-container">$\Sigma = \{0,1,2,3,4,5\}$</span>.</p>&#xA;&#xA;<p>No...
turing machines
1
turing machine logic instead of something -- (turing machines) <p>Lets assume I have this turing machine:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/kAlvf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kAlvf.png" alt="tm_except_something"></a></p>&#xA;&#xA;<p>And I have a <span class="math-c...
habedi/stack-exchange-dataset
117,254
Interactive proof system for graph nonisomorphism
<blockquote>&#xA; <p><span class="math-container">$\mathit{GNI} \in \mathrm{PCP}(\mathit{poly}(n),1)$</span></p>&#xA; &#xA; <p><em>GNI</em> is the language of nonisomorphic graphs. Given two grapsh <span class="math-container">$G_0$</span> and <span class="math-container">$G_1$</span> with <span class="math-containe...
complexity theory interactive proof systems
1
Interactive proof system for graph nonisomorphism -- (complexity theory interactive proof systems) <blockquote>&#xA; <p><span class="math-container">$\mathit{GNI} \in \mathrm{PCP}(\mathit{poly}(n),1)$</span></p>&#xA; &#xA; <p><em>GNI</em> is the language of nonisomorphic graphs. Given two grapsh <span class="math-co...
habedi/stack-exchange-dataset
117,265
Oracle separation P and BPP
<p>I'm reading (with much pleasure) the book Quantum Computing Since Democritus by Scott Aaronson. At some point the author claims that, while most most people believe that <span class="math-container">$\mathbf{P} = \mathbf{BPP}$</span> in real life, it is very easy to construct an oracle <span class="math-container">$...
complexity theory oracle machines pseudo random generators
1
Oracle separation P and BPP -- (complexity theory oracle machines pseudo random generators) <p>I'm reading (with much pleasure) the book Quantum Computing Since Democritus by Scott Aaronson. At some point the author claims that, while most most people believe that <span class="math-container">$\mathbf{P} = \mathbf{BPP}...
habedi/stack-exchange-dataset
117,278
Simplification of a multi-index Boolean expression towards computation in fewer steps
<p>Let <span class="math-container">$x_{ij} \in \{0,1\}$</span>, <span class="math-container">$1 \leq i \leq M$</span> (typically, <span class="math-container">$M = 2000$</span>), <span class="math-container">$1 \leq j \leq N$</span> (typically, <span class="math-container">$N = 10$</span>), be Boolean variables. If p...
algorithms logic boolean algebra performance
1
Simplification of a multi-index Boolean expression towards computation in fewer steps -- (algorithms logic boolean algebra performance) <p>Let <span class="math-container">$x_{ij} \in \{0,1\}$</span>, <span class="math-container">$1 \leq i \leq M$</span> (typically, <span class="math-container">$M = 2000$</span>), <spa...
habedi/stack-exchange-dataset
117,289
How many "compressible" strings are there?
<p>Let's say that a string of length <span class="math-container">$N$</span> is "compressible" iff its Kolmogorov complexity is less than <span class="math-container">$N$</span>. To keep it simple, we can assume binary strings for this.</p>&#xA;&#xA;<p>It is easy to see that almost all binary strings of length <span cl...
strings data compression kolmogorov complexity
1
How many "compressible" strings are there? -- (strings data compression kolmogorov complexity) <p>Let's say that a string of length <span class="math-container">$N$</span> is "compressible" iff its Kolmogorov complexity is less than <span class="math-container">$N$</span>. To keep it simple, we can assume binary string...
habedi/stack-exchange-dataset
117,291
Is finding the minimum feedback arc set on graph with two outgoing arcs for each node np-complete?
<p>I have a graph with at most two outgoing arcs for each node and I need to extract a DAG by removing the least number of arcs. I know that the general problem is np-complete but i can't reduce it to the other one.</p>&#xA;&#xA;<p>I know that each graph can be mapped to a graph with only two outgoing edges for each no...
complexity theory np complete reductions
1
Is finding the minimum feedback arc set on graph with two outgoing arcs for each node np-complete? -- (complexity theory np complete reductions) <p>I have a graph with at most two outgoing arcs for each node and I need to extract a DAG by removing the least number of arcs. I know that the general problem is np-complete...
habedi/stack-exchange-dataset
117,296
Why is finding the closest pair of points by brute force search O(n^2)?
<p>If I have n points <code>A, B, C, D</code> it seems like finding the closest pair via brute force search would go like:</p>&#xA;&#xA;<ul>&#xA;<li>Compare A to every item (n-1)</li>&#xA;<li>Compare B to every item (except A which it has already been compared to)</li>&#xA;<li>etc for every element.</li>&#xA;</ul>&#xA...
algorithms time complexity
1
Why is finding the closest pair of points by brute force search O(n^2)? -- (algorithms time complexity) <p>If I have n points <code>A, B, C, D</code> it seems like finding the closest pair via brute force search would go like:</p>&#xA;&#xA;<ul>&#xA;<li>Compare A to every item (n-1)</li>&#xA;<li>Compare B to every item...
habedi/stack-exchange-dataset
117,302
Are there any proofs of exponential lower bound time complexity
<p>I'm trying to understand what are the techniques to prove an exponential time lower bound.</p>&#xA;&#xA;<p>For some problems, we can prove that the size of the output is exponential is the size of the input, thus it takes an exponential number of steps just to write the output. For example for some generalized board...
complexity theory time complexity decision problem
1
Are there any proofs of exponential lower bound time complexity -- (complexity theory time complexity decision problem) <p>I'm trying to understand what are the techniques to prove an exponential time lower bound.</p>&#xA;&#xA;<p>For some problems, we can prove that the size of the output is exponential is the size of ...
habedi/stack-exchange-dataset
117,312
Injective burrows wheeler
<p>We know that the Burrows-Wheeler Transform is reversible, in the sense that, given&#xA;s=BWT(w) and an index I, it is possible to recover w by an algorithm. But how to prove that w is unique? In other way how to prove that Burrows-Wheeler is injective?</p>&#xA;
algorithms
1
Injective burrows wheeler -- (algorithms) <p>We know that the Burrows-Wheeler Transform is reversible, in the sense that, given&#xA;s=BWT(w) and an index I, it is possible to recover w by an algorithm. But how to prove that w is unique? In other way how to prove that Burrows-Wheeler is injective?</p>&#xA;
habedi/stack-exchange-dataset
117,314
How to find maximum matching edges in undirected tree
<p>Let <span class="math-container">$B$</span> be an undirected tree with <span class="math-container">$|V|$</span> nodes given as adjacency list. I want to develop a greedy algorithm using pseudo code to find a maximal matching in runtime <span class="math-container">$\mathcal{O}(|V|)$</span>.</p>&#xA;&#xA;<p><strong>...
algorithms graphs matching bipartite matching
1
How to find maximum matching edges in undirected tree -- (algorithms graphs matching bipartite matching) <p>Let <span class="math-container">$B$</span> be an undirected tree with <span class="math-container">$|V|$</span> nodes given as adjacency list. I want to develop a greedy algorithm using pseudo code to find a max...
habedi/stack-exchange-dataset
117,332
How to prove NP-completeness of this variant of the set cover problem?
<p>The problem exactly:</p>&#xA;&#xA;<p>Suppose you're helping to organize a summer sports camp, and the following problem comes up. For each of the n sports offered at this camp, the camp is supposed to have at least two counselors who are skilled at this sport. They have received job applications from m potential cou...
complexity theory algorithm analysis np complete
1
How to prove NP-completeness of this variant of the set cover problem? -- (complexity theory algorithm analysis np complete) <p>The problem exactly:</p>&#xA;&#xA;<p>Suppose you're helping to organize a summer sports camp, and the following problem comes up. For each of the n sports offered at this camp, the camp is sup...
habedi/stack-exchange-dataset
117,333
Data structure to report all axis aligned bounding boxes intersecting an axis aligned query line
<p>I would like to build a Data structure that uses subquadratic space to quickly report a set of AABBs (axis aligned bounding boxes) in 3 dimensional space when it intersects a query line? I am only interested in the design, no coding. I believe I can use the approach of kd-trees assuming that the query line is also a...
algorithms data structures computational geometry
1
Data structure to report all axis aligned bounding boxes intersecting an axis aligned query line -- (algorithms data structures computational geometry) <p>I would like to build a Data structure that uses subquadratic space to quickly report a set of AABBs (axis aligned bounding boxes) in 3 dimensional space when it int...
habedi/stack-exchange-dataset
117,339
O(n) external intersection points?
<p>I have a doubt. For a given n (axis-parallel) squares in a plane, where there are Ω(n²) intersection points between the edges of the square, is it possible to have O(n) external intersection points? (external intersection meaning if the point is not contained in the interior of the union of all the squares).</p>&#xA...
algorithms data structures computational geometry discrete mathematics
1
O(n) external intersection points? -- (algorithms data structures computational geometry discrete mathematics) <p>I have a doubt. For a given n (axis-parallel) squares in a plane, where there are Ω(n²) intersection points between the edges of the square, is it possible to have O(n) external intersection points? (extern...
habedi/stack-exchange-dataset
117,345
Prove that $\texttt{prefix}(L)$ is regular
<p>Given that <span class="math-container">$L = \lbrace 0^n1^n : n \geq 0\rbrace$</span> is a non-regular context-free language, prove that <span class="math-container">$\texttt{prefix}(L)$</span> is regular.</p>&#xA;&#xA;<p>So far I have provided that the grammar to produce this language is:&#xA;<span class="math-cont...
formal languages regular languages
1
Prove that $\texttt{prefix}(L)$ is regular -- (formal languages regular languages) <p>Given that <span class="math-container">$L = \lbrace 0^n1^n : n \geq 0\rbrace$</span> is a non-regular context-free language, prove that <span class="math-container">$\texttt{prefix}(L)$</span> is regular.</p>&#xA;&#xA;<p>So far I hav...
habedi/stack-exchange-dataset
117,356
Pandemic board game - find all possible next 4 actions
<p>I hope I am asking this on the right community. </p>&#xA;&#xA;<p>I am building an Artificial Intelligence to play the board game Pandemic. The AI uses a Monte Carlo algorithm. After implementing the game rules and the AI, it works as expected (very poorly, but it works).</p>&#xA;&#xA;<p>I figured the main problem th...
algorithms optimization board games monte carlo
1
Pandemic board game - find all possible next 4 actions -- (algorithms optimization board games monte carlo) <p>I hope I am asking this on the right community. </p>&#xA;&#xA;<p>I am building an Artificial Intelligence to play the board game Pandemic. The AI uses a Monte Carlo algorithm. After implementing the game rules...
habedi/stack-exchange-dataset
117,362
HashTable open-addressing is used for main array or buckets
<p>I am trying to understand the HashTable open-addressing technique. I see there are three approaches: linear, quadratic and double hashing. I'm wondering are these techniques used:</p>&#xA;&#xA;<ul>&#xA;<li>to find an index of the main array and no bucketing is involved</li>&#xA;<li>or used when our buckets are array...
hash tables
1
HashTable open-addressing is used for main array or buckets -- (hash tables) <p>I am trying to understand the HashTable open-addressing technique. I see there are three approaches: linear, quadratic and double hashing. I'm wondering are these techniques used:</p>&#xA;&#xA;<ul>&#xA;<li>to find an index of the main array...
habedi/stack-exchange-dataset
117,381
Modifying digraph to make it strongly connected
<p>I came across this problem and have not been able to find a solution. </p>&#xA;&#xA;<p>Given directed graph <span class="math-container">$G$</span>, devise an algorithm to find the minimum number of edges to flip/change/transplant such that the modified graph <span class="math-container">$G'$</span> has a path from ...
algorithms graphs
1
Modifying digraph to make it strongly connected -- (algorithms graphs) <p>I came across this problem and have not been able to find a solution. </p>&#xA;&#xA;<p>Given directed graph <span class="math-container">$G$</span>, devise an algorithm to find the minimum number of edges to flip/change/transplant such that the m...
habedi/stack-exchange-dataset
117,383
Find lines segment portions close together
<p>I have two lines segment in 3D space. Lines segment are defined by 2 points each: <span class="math-container">$A_1$</span>, <span class="math-container">$B_1$</span> and <span class="math-container">$A_2$</span>, <span class="math-container">$B_2$</span> (see left part in the below schema).</p>&#xA;&#xA;<p>I would ...
algorithms mathematical programming
1
Find lines segment portions close together -- (algorithms mathematical programming) <p>I have two lines segment in 3D space. Lines segment are defined by 2 points each: <span class="math-container">$A_1$</span>, <span class="math-container">$B_1$</span> and <span class="math-container">$A_2$</span>, <span class="math-c...
habedi/stack-exchange-dataset
117,384
How do we construct reductions for NP-Completeness
<p>I'm wondering in what direction we construct reductions to prove that a problem is NP-complete. Say the question is asking to prove that the vertex cover problem is NP-complete given that the independent set problem is NP-complete. </p>&#xA;&#xA;<p>In this case, do we start with an instance of the vertex cover probl...
np complete reductions
1
How do we construct reductions for NP-Completeness -- (np complete reductions) <p>I'm wondering in what direction we construct reductions to prove that a problem is NP-complete. Say the question is asking to prove that the vertex cover problem is NP-complete given that the independent set problem is NP-complete. </p>&#...
habedi/stack-exchange-dataset
117,391
Is it possible that the subtraction between two undecidable languages is regular?
<p>If <span class="math-container">$L_1$</span> and <span class="math-container">$L_2$</span> are both non-decidable languages (Not decidable, so can be SD &#xA;or <span class="math-container">$\lnot$</span>SD), is it possible that <span class="math-container">$L_1-L_2$</span> is regular and <span class="math-container...
turing machines regular languages undecidability semi decidability
1
Is it possible that the subtraction between two undecidable languages is regular? -- (turing machines regular languages undecidability semi decidability) <p>If <span class="math-container">$L_1$</span> and <span class="math-container">$L_2$</span> are both non-decidable languages (Not decidable, so can be SD &#xA;or <s...
habedi/stack-exchange-dataset
117,397
Period of sum of two periodic sequences
<p>I was wondering, what is to be the shortest possible key using Vigenere encryption, if a text is ciphered one time with a key of length <span class="math-container">$i$</span> using Vigenere and second time with a key of length <span class="math-container">$j$</span> using Vigenere?</p>&#xA;&#xA;<p>From what I under...
cryptography encoding scheme encryption
1
Period of sum of two periodic sequences -- (cryptography encoding scheme encryption) <p>I was wondering, what is to be the shortest possible key using Vigenere encryption, if a text is ciphered one time with a key of length <span class="math-container">$i$</span> using Vigenere and second time with a key of length <spa...
habedi/stack-exchange-dataset
117,416
Can algorithms of arbitrarily worse complexity be systematically created?
<p>We’ve all seen this:&#xA;<img src="https://i.stack.imgur.com/iyocx.jpg" alt="Hierarchy of time complexities"></p>&#xA;&#xA;<p>Can we get worse?</p>&#xA;&#xA;<p>Part 1: Can mathematical operations of increasing orders of growth be generated, with or without Knuth’s up-arrow notation?</p>&#xA;&#xA;<p>Part 2: If they c...
complexity theory algorithm analysis code generation
1
Can algorithms of arbitrarily worse complexity be systematically created? -- (complexity theory algorithm analysis code generation) <p>We’ve all seen this:&#xA;<img src="https://i.stack.imgur.com/iyocx.jpg" alt="Hierarchy of time complexities"></p>&#xA;&#xA;<p>Can we get worse?</p>&#xA;&#xA;<p>Part 1: Can mathematical ...
habedi/stack-exchange-dataset
117,420
Mixed integer non convex optimization problem
<p>If an optimization problem is mixed integer non-convex problem. The optimal solution by applying brute exhaustive search is infeasible to be applied in practice due to high complexity i.e. <span class="math-container">$O(N^K)$</span>. Can we say that it's NP hard problem? If yes, can someone explain with more detail...
optimization
1
Mixed integer non convex optimization problem -- (optimization) <p>If an optimization problem is mixed integer non-convex problem. The optimal solution by applying brute exhaustive search is infeasible to be applied in practice due to high complexity i.e. <span class="math-container">$O(N^K)$</span>. Can we say that it...
habedi/stack-exchange-dataset
117,436
Example of two undecidable languages that cannot be mapping reduced to each other
<p>I want to find two undecidable languages <span class="math-container">$A$</span> and <span class="math-container">$B$</span> that <span class="math-container">$A$</span> cannot mapping (i.e. many-one) reduce to <span class="math-container">$B$</span>, <span class="math-container">$B$</span> cannot reduce to <span cl...
formal languages turing machines automata reductions
1
Example of two undecidable languages that cannot be mapping reduced to each other -- (formal languages turing machines automata reductions) <p>I want to find two undecidable languages <span class="math-container">$A$</span> and <span class="math-container">$B$</span> that <span class="math-container">$A$</span> cannot ...
habedi/stack-exchange-dataset
117,438
Would an optimization version of the 3-partition problem also be strongly np-complete / np-hard?
<p>Anyone know if an optimization variant of the <a href="https://en.wikipedia.org/wiki/3-partition_problem" rel="nofollow noreferrer">3-partition problem</a> (as explained there) would also be strongly np-complete?</p>&#xA;&#xA;<p>This would be where the goal is to group a multiset whose size is evenly divisible by 3 ...
algorithm analysis np complete
1
Would an optimization version of the 3-partition problem also be strongly np-complete / np-hard? -- (algorithm analysis np complete) <p>Anyone know if an optimization variant of the <a href="https://en.wikipedia.org/wiki/3-partition_problem" rel="nofollow noreferrer">3-partition problem</a> (as explained there) would a...
habedi/stack-exchange-dataset
117,444
How do you prove the Natarajan's Lemma intuitively?
<p>Let <span class="math-container">$H$</span> be a hypothesis class of multiclass predictors; namely, each <span class="math-container">$h\in H$</span> is a function from <span class="math-container">$X$</span> to <span class="math-container">$[k]$</span>.</p>&#xA;&#xA;<p>Denote the Natarajan dimension of <span class=...
machine learning learning theory
1
How do you prove the Natarajan's Lemma intuitively? -- (machine learning learning theory) <p>Let <span class="math-container">$H$</span> be a hypothesis class of multiclass predictors; namely, each <span class="math-container">$h\in H$</span> is a function from <span class="math-container">$X$</span> to <span class="ma...
habedi/stack-exchange-dataset
117,462
adding an edge, Is T still a MST to the new graph?
<p>Suppose I have a minimum spanning tree <span class="math-container">$T$</span> in a graph <span class="math-container">$G=(V,E)$</span> with positive edge weights <span class="math-container">$w$</span>. Provide an algorithm that after adding a new edge <span class="math-container">$e$</span> with a unique weight <s...
minimum spanning tree
1
adding an edge, Is T still a MST to the new graph? -- (minimum spanning tree) <p>Suppose I have a minimum spanning tree <span class="math-container">$T$</span> in a graph <span class="math-container">$G=(V,E)$</span> with positive edge weights <span class="math-container">$w$</span>. Provide an algorithm that after add...
habedi/stack-exchange-dataset
117,463
Problem with understanding the Mathematical Equations related to Testing Tool
<p>I have downloaded the slides from the site:&#xA;[Compliance and Violation Patterns<a href="https://i.stack.imgur.com/YDXbn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YDXbn.jpg" alt="][1]"></a>&#xA;It says No writes after calls. I can understand this concept. It’s a remedy for reentrancy probl...
security software testing
1
Problem with understanding the Mathematical Equations related to Testing Tool -- (security software testing) <p>I have downloaded the slides from the site:&#xA;[Compliance and Violation Patterns<a href="https://i.stack.imgur.com/YDXbn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YDXbn.jpg" alt="][...
habedi/stack-exchange-dataset
117,467
Why do min/max operations in van Emde Boas trees run in $\mathcal{O}(1)$?
<p>I have read in the book </p>&#xA;&#xA;<blockquote>&#xA; <p>"Introduction to Algorithms", 3ed by Cormen, Leiserson, Rivest, and&#xA; Stein (Chapter 20)</p>&#xA;</blockquote>&#xA;&#xA;<p>that <em>Emde Boas trees</em> run min/max operations in <span class="math-container">$\mathcal{O}(1)$</span> time since the minimu...
van emde boas trees
1
Why do min/max operations in van Emde Boas trees run in $\mathcal{O}(1)$? -- (van emde boas trees) <p>I have read in the book </p>&#xA;&#xA;<blockquote>&#xA; <p>"Introduction to Algorithms", 3ed by Cormen, Leiserson, Rivest, and&#xA; Stein (Chapter 20)</p>&#xA;</blockquote>&#xA;&#xA;<p>that <em>Emde Boas trees</em> r...
habedi/stack-exchange-dataset
117,469
Given a regular language, calculate its equivalence classes
<p>I was given the following regular language:</p>&#xA;&#xA;<p>For any <span class="math-container">$n$</span>, the language <span class="math-container">$L_{n}$</span> consists of all words over <span class="math-container">$Σ = \{0, 1\}$</span> whose <span class="math-container">$n$</span>th character&#xA;from the en...
formal languages regular languages
1
Given a regular language, calculate its equivalence classes -- (formal languages regular languages) <p>I was given the following regular language:</p>&#xA;&#xA;<p>For any <span class="math-container">$n$</span>, the language <span class="math-container">$L_{n}$</span> consists of all words over <span class="math-contai...
habedi/stack-exchange-dataset
117,473
What does the term "top-most" mean in the context of formal grammars?
<p>I was learning about disambiguating grammars. In particular I was learning about enforcing right associativity on the sum language here:</p>&#xA;&#xA;<p><span class="math-container">$$ \mathit{Sum} ::= 0 \mid 1 \mid \mathit{Sum} + \mathit{Sum} \mid ( \mathit{Sum} )$$</span></p>&#xA;&#xA;<p>I think I understand the i...
formal grammars
1
What does the term "top-most" mean in the context of formal grammars? -- (formal grammars) <p>I was learning about disambiguating grammars. In particular I was learning about enforcing right associativity on the sum language here:</p>&#xA;&#xA;<p><span class="math-container">$$ \mathit{Sum} ::= 0 \mid 1 \mid \mathit{Su...
habedi/stack-exchange-dataset
117,487
3-Dimensional Matching with at Most $2n$ Hyperedges
<p>In 3 dimensional matching, we are given a set <span class="math-container">$M\subseteq X\times Y\times Z$</span> where <span class="math-container">$|X|=|Y|=|Z|=n$</span>. A matching in <span class="math-container">$M$</span> is a subset <span class="math-container">$T⊆M$</span> such that no elements in <span class=...
algorithms np hard
1
3-Dimensional Matching with at Most $2n$ Hyperedges -- (algorithms np hard) <p>In 3 dimensional matching, we are given a set <span class="math-container">$M\subseteq X\times Y\times Z$</span> where <span class="math-container">$|X|=|Y|=|Z|=n$</span>. A matching in <span class="math-container">$M$</span> is a subset <sp...
habedi/stack-exchange-dataset
117,492
Worst case runtime for binary search
<p>The run time of binary search is O(log(n)).<br>&#xA;log(8) = 3<br>&#xA;It takes 3 comparisons to decide if an array of 8 elements contains a given element.&#xA;It takes 4 comparisons in the example below. </p>&#xA;&#xA;<p>python2.7</p>&#xA;&#xA;<pre><code>def binary_search(a_list, item, comparisons_inner=0):&#xA; ...
runtime analysis binary search
1
Worst case runtime for binary search -- (runtime analysis binary search) <p>The run time of binary search is O(log(n)).<br>&#xA;log(8) = 3<br>&#xA;It takes 3 comparisons to decide if an array of 8 elements contains a given element.&#xA;It takes 4 comparisons in the example below. </p>&#xA;&#xA;<p>python2.7</p>&#xA;&#x...
habedi/stack-exchange-dataset
117,500
Read and write ports in a register file?
<p>How many read and write ports in a register file? Moreover, what is the difference between a register and a register file?</p>&#xA;
computer architecture
1
Read and write ports in a register file? -- (computer architecture) <p>How many read and write ports in a register file? Moreover, what is the difference between a register and a register file?</p>&#xA;
habedi/stack-exchange-dataset
117,508
How to solve linear equation with binary tree
<p>I'm working on a school project that takes in a simple linear equation and has to return the value of <span class="math-container">$x$</span>. The code I have transforms <span class="math-container">$x + 3 = 3x - 2$</span> into a binary tree format like so:</p>&#xA;&#xA;<pre><code> =&#xA; / \&#xA; ...
data structures binary trees
1
How to solve linear equation with binary tree -- (data structures binary trees) <p>I'm working on a school project that takes in a simple linear equation and has to return the value of <span class="math-container">$x$</span>. The code I have transforms <span class="math-container">$x + 3 = 3x - 2$</span> into a binary ...
habedi/stack-exchange-dataset
117,513
Quotient of languages, regular quotient and their closedness
<p>Left quotient is defined as below at <a href="https://planetmath.org/quotientoflanguages" rel="nofollow noreferrer">this</a> link:</p>&#xA;<blockquote>&#xA;<p>Left quotient of <span class="math-container">$L1$</span> by <span class="math-container">$L2$</span>:</p>&#xA;<p><span class="math-container">$L1\backslash L...
formal languages closure properties
1
Quotient of languages, regular quotient and their closedness -- (formal languages closure properties) <p>Left quotient is defined as below at <a href="https://planetmath.org/quotientoflanguages" rel="nofollow noreferrer">this</a> link:</p>&#xA;<blockquote>&#xA;<p>Left quotient of <span class="math-container">$L1$</span...
habedi/stack-exchange-dataset
117,524
Minimum number of bits to represent negative number
<blockquote>&#xA;<p>Minimum number of bits required to represent <span class="math-container">$(+32)_{base10}$</span> and <span class="math-container">$(-32)_{base10}$</span> in signed two's compliment form?</p>&#xA;</blockquote>&#xA;<p>My attempt:</p>&#xA;<p>32 = 0100000 ( 1st zero - sign bit as positive)</p>&#xA;<p>...
arithmetic digital circuits binary
1
Minimum number of bits to represent negative number -- (arithmetic digital circuits binary) <blockquote>&#xA;<p>Minimum number of bits required to represent <span class="math-container">$(+32)_{base10}$</span> and <span class="math-container">$(-32)_{base10}$</span> in signed two's compliment form?</p>&#xA;</blockquot...
habedi/stack-exchange-dataset
117,534
Constructing preorder traversal from postorder of a Binary Search Tree in O(n)
<p>We are given postorder traversal of a Binary "SEARCH" Tree (in an array) and we want to find (print) its preorder traversal.</p>&#xA;&#xA;<p>A very naive solution is to check from end until we find element less than root so we can find left and right subtree and call the function on them. This is <span class="math-c...
binary trees binary search trees
1
Constructing preorder traversal from postorder of a Binary Search Tree in O(n) -- (binary trees binary search trees) <p>We are given postorder traversal of a Binary "SEARCH" Tree (in an array) and we want to find (print) its preorder traversal.</p>&#xA;&#xA;<p>A very naive solution is to check from end until we find el...
habedi/stack-exchange-dataset
117,553
Graph of size n with girth >2k and minimum degree more than n^1/k
<p>I'm stuck at a proof about Graphs in the context of Graph Spanners. A Lemma says: <br>&#xA;Let <span class="math-container">$G$</span> be a graph with <span class="math-container">$n$</span> vertices and <span class="math-container">$m$</span> edges. If <span class="math-container">$G$</span> has girth more than <sp...
graphs
1
Graph of size n with girth >2k and minimum degree more than n^1/k -- (graphs) <p>I'm stuck at a proof about Graphs in the context of Graph Spanners. A Lemma says: <br>&#xA;Let <span class="math-container">$G$</span> be a graph with <span class="math-container">$n$</span> vertices and <span class="math-container">$m$</s...
habedi/stack-exchange-dataset
117,565
Minimizing a multiple output circuit with K-maps - and without
<p>I'm currently working on learning to minimize a circuit which has multiple outputs using K-maps. My universities script seems rather unhelpful to me which left me in a spot where I have a very rough understanding of the matter without actually being able to pull it through.</p>&#xA;&#xA;<p>I currently am supposed to...
digital circuits karnaugh map
1
Minimizing a multiple output circuit with K-maps - and without -- (digital circuits karnaugh map) <p>I'm currently working on learning to minimize a circuit which has multiple outputs using K-maps. My universities script seems rather unhelpful to me which left me in a spot where I have a very rough understanding of the...
habedi/stack-exchange-dataset
117,567
Reduction from Vertex Cover to Dominating Set
<p>I am trying to reduce the vertex cover (decision) problem to the dominating set (decision) problem in order to prove that the latter is NP-hard. After some research online, I found that many articles use a reduction that transforms the input for the vertex cover problem to an input for the dominating set problem by ...
reductions np hard correctness proof polynomial time reductions
1
Reduction from Vertex Cover to Dominating Set -- (reductions np hard correctness proof polynomial time reductions) <p>I am trying to reduce the vertex cover (decision) problem to the dominating set (decision) problem in order to prove that the latter is NP-hard. After some research online, I found that many articles us...
habedi/stack-exchange-dataset
117,572
Difference between $a^{2n} b^n$ and $n_a(w) = 2n_b(w)$
<p>I have encountered two questions related to npda:</p>&#xA;&#xA;<ol>&#xA;<li><p>Construct an npda for <span class="math-container">$L_1 = \{a^{2n} b^n \mid n \geq 0\}$</span> as a language over <span class="math-container">$\Sigma = \{a,b,c\}$</span>.</p></li>&#xA;<li><p>Construct an npda for <span class="math-contai...
formal languages context free
1
Difference between $a^{2n} b^n$ and $n_a(w) = 2n_b(w)$ -- (formal languages context free) <p>I have encountered two questions related to npda:</p>&#xA;&#xA;<ol>&#xA;<li><p>Construct an npda for <span class="math-container">$L_1 = \{a^{2n} b^n \mid n \geq 0\}$</span> as a language over <span class="math-container">$\Sig...
habedi/stack-exchange-dataset
117,577
Which Grows Faster: Factorial or Double Exponentiation
<p>Which of the functions among <span class="math-container">$2^{3^n}$</span> or <span class="math-container">$n!$</span> grows faster?</p>&#xA;&#xA;<p>I know that <span class="math-container">$n^n$</span> grows faster than <span class="math-container">$n!$</span> and <span class="math-container">$n!$</span> grows fast...
time complexity
1
Which Grows Faster: Factorial or Double Exponentiation -- (time complexity) <p>Which of the functions among <span class="math-container">$2^{3^n}$</span> or <span class="math-container">$n!$</span> grows faster?</p>&#xA;&#xA;<p>I know that <span class="math-container">$n^n$</span> grows faster than <span class="math-co...
habedi/stack-exchange-dataset
117,580
Algorithm for animating/morphing convex polygon diagrams
<p>I am trying to find an algorithm to smoothly morph a (given) diagram made of convex polygons into another (given) diagram of the same type.</p>&#xA;&#xA;<p>The target diagram is usually generated from the source, where all kind of operations may happen (new polygon popping up, polygon gets deleted etc.)</p>&#xA;&#xA...
algorithms computational geometry
1
Algorithm for animating/morphing convex polygon diagrams -- (algorithms computational geometry) <p>I am trying to find an algorithm to smoothly morph a (given) diagram made of convex polygons into another (given) diagram of the same type.</p>&#xA;&#xA;<p>The target diagram is usually generated from the source, where al...
habedi/stack-exchange-dataset
117,582
Proving that max flows of undirected graph and equivalent directed graph are equal
<p>There is an undirected graph <span class="math-container">$G$</span>. A graph <span class="math-container">$H$</span> is constructed by changing each edge <span class="math-container">$(a,b)$</span> in <span class="math-container">$G$</span> to a pair of directed edges <span class="math-container">$(a,b)$</span> and...
algorithms graphs network flow
1
Proving that max flows of undirected graph and equivalent directed graph are equal -- (algorithms graphs network flow) <p>There is an undirected graph <span class="math-container">$G$</span>. A graph <span class="math-container">$H$</span> is constructed by changing each edge <span class="math-container">$(a,b)$</span>...
habedi/stack-exchange-dataset
117,584
Time Complexity: Why does $n^n$ grow faster than $n!$?
<p>Seeing the title, you will probably like to give your explanation as</p>&#xA;&#xA;<p><span class="math-container">$n!=n\times (n-1)\times (n-2)\times (n-3)\times\cdots\times 1$</span></p>&#xA;&#xA;<p>where as </p>&#xA;&#xA;<p><span class="math-container">$n^n$</span> = <span class="math-container">$n\times n \times ...
time complexity
1
Time Complexity: Why does $n^n$ grow faster than $n!$? -- (time complexity) <p>Seeing the title, you will probably like to give your explanation as</p>&#xA;&#xA;<p><span class="math-container">$n!=n\times (n-1)\times (n-2)\times (n-3)\times\cdots\times 1$</span></p>&#xA;&#xA;<p>where as </p>&#xA;&#xA;<p><span class="ma...
habedi/stack-exchange-dataset
117,597
Computing hash of a compound key
<p>Why is the initial value of <code>hash</code> 17 and not 0?</p>&#xA;&#xA;<pre><code>/**&#xA; * Returns an integer hash code for this date.&#xA; *&#xA; * @return an integer hash code for this date&#xA; */&#xA;@Override&#xA;public int hashCode() {&#xA; int hash = 17;&#xA; hash = 31*hash + month;&#xA; hash = 3...
hash
1
Computing hash of a compound key -- (hash) <p>Why is the initial value of <code>hash</code> 17 and not 0?</p>&#xA;&#xA;<pre><code>/**&#xA; * Returns an integer hash code for this date.&#xA; *&#xA; * @return an integer hash code for this date&#xA; */&#xA;@Override&#xA;public int hashCode() {&#xA; int hash = 17;&#xA; ...
habedi/stack-exchange-dataset
117,611
Different application of Arden's theorem leads to different answers
<p>So, I have to solve for the following set of equations</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$q_1$</span> = <span class="math-container">$q_1$</span>a + <span class="math-container">$q_2$</span>b + <span class="math-container">$\epsilon$</span></p>&#xA;<p><span class="math-container">$q_2$</span> ...
automata regular expressions
1
Different application of Arden's theorem leads to different answers -- (automata regular expressions) <p>So, I have to solve for the following set of equations</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$q_1$</span> = <span class="math-container">$q_1$</span>a + <span class="math-container">$q_2$</span>b ...
habedi/stack-exchange-dataset