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 |
|---|---|---|---|---|---|---|
94,212 | Are there any implementations of computability logic? | <p>I'm currently looking into <a href="http://www.csc.villanova.edu/~japaridz/CL/" rel="nofollow noreferrer">Japridze's computability logic</a>. It looks great, but I was wondering whether any programming languages or systems implement it.</p>

<p>Does anyone know of any implementation?</p>

<p>Thanks.<... | computability logic | 1 | Are there any implementations of computability logic? -- (computability logic)
<p>I'm currently looking into <a href="http://www.csc.villanova.edu/~japaridz/CL/" rel="nofollow noreferrer">Japridze's computability logic</a>. It looks great, but I was wondering whether any programming languages or systems implement it.</... | habedi/stack-exchange-dataset |
94,216 | What is the benefit of using one to one thread mapping model instead of Many to Many or two level? | <p>So in the silberschatz O.S book it says Windows uses one to one model (mapping user level threads to kernel level threads)</p>

<p>but why? i thought many to many and two level models are much better, specially two level model, so why not use the two level mode or many to many? whats the benefit compared to ... | operating systems threads | 1 | What is the benefit of using one to one thread mapping model instead of Many to Many or two level? -- (operating systems threads)
<p>So in the silberschatz O.S book it says Windows uses one to one model (mapping user level threads to kernel level threads)</p>

<p>but why? i thought many to many and two level mo... | habedi/stack-exchange-dataset |
94,226 | How does the TLB identify a particular process? | <p>I have read that the <a href="https://en.wikipedia.org/wiki/Translation_lookaside_buffer" rel="nofollow noreferrer">translation lookaside buffer</a> (TLB) is implemented in hardware and stores the page numbers and the corresponding frame numbers for faster lookups. Now suppose there are two processes, A and B. Page ... | operating systems memory management | 1 | How does the TLB identify a particular process? -- (operating systems memory management)
<p>I have read that the <a href="https://en.wikipedia.org/wiki/Translation_lookaside_buffer" rel="nofollow noreferrer">translation lookaside buffer</a> (TLB) is implemented in hardware and stores the page numbers and the correspond... | habedi/stack-exchange-dataset |
94,228 | Question on word probability for hierarchical softmax used in natural language processing | <p>I am reading the following paper: <a href="https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf" rel="nofollow noreferrer">https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf</a></p>

<p... | machine learning binary trees probability theory natural language processing | 1 | Question on word probability for hierarchical softmax used in natural language processing -- (machine learning binary trees probability theory natural language processing)
<p>I am reading the following paper: <a href="https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositi... | habedi/stack-exchange-dataset |
94,234 | Halting Problem without self-reference: why does this argument not suffice (or does it)? | <p>I'm trying to find a way to explain the idea of the Halting Problem proof in as accessible a manner as possible (to undergrad CS students). The simplest argument I have found is <a href="https://simple.wikipedia.org/wiki/Halting_problem" rel="noreferrer">this one</a>; this is precisely the style of treatment I am ai... | halting problem | 1 | Halting Problem without self-reference: why does this argument not suffice (or does it)? -- (halting problem)
<p>I'm trying to find a way to explain the idea of the Halting Problem proof in as accessible a manner as possible (to undergrad CS students). The simplest argument I have found is <a href="https://simple.wikip... | habedi/stack-exchange-dataset |
94,236 | Time complexity of transforming one string to another | <p>Here is the problem:</p>

<p>Given a dictionary $D$ and two strings $s$ and $t$, write a program to determine if $s$ produces $t$. If it does produce $t$, output the length of of the shortest production sequence, otherwise, output $-1$.</p>

<p>Example: $D$ = [bat, cot, dog, dag, dot, cat], $s$ = cat... | algorithms graphs time complexity runtime analysis search algorithms | 1 | Time complexity of transforming one string to another -- (algorithms graphs time complexity runtime analysis search algorithms)
<p>Here is the problem:</p>

<p>Given a dictionary $D$ and two strings $s$ and $t$, write a program to determine if $s$ produces $t$. If it does produce $t$, output the length of of th... | habedi/stack-exchange-dataset |
94,237 | What are the concequences of the unit type and the unit value being the same? | <p>What are the practical and theoretical implications of the unit <em>type</em> and the unit <em>value</em> being the same or different entities?</p>

<p>For example, in Haskell the unit type and unit value are both spelled <code>()</code>. In ML, the unit type is spelled <code>unit</code> and it's value is <c... | type theory | 1 | What are the concequences of the unit type and the unit value being the same? -- (type theory)
<p>What are the practical and theoretical implications of the unit <em>type</em> and the unit <em>value</em> being the same or different entities?</p>

<p>For example, in Haskell the unit type and unit value are both ... | habedi/stack-exchange-dataset |
94,244 | Ordering the incident edges of each vertex to have a specified pre-order traversal | <p><strong>Input</strong>: You are given a graph $G(V, E)$ undirected, loop-less, no parallel edges, etc. and a label function $L: V \to \mathbb{N}$. Also, a sequence of $|V|$ natural numbers is given.</p>

<p><strong>Output</strong>: Is it possible to order the incident edges set of each vertex and choose a st... | np complete graph traversal | 1 | Ordering the incident edges of each vertex to have a specified pre-order traversal -- (np complete graph traversal)
<p><strong>Input</strong>: You are given a graph $G(V, E)$ undirected, loop-less, no parallel edges, etc. and a label function $L: V \to \mathbb{N}$. Also, a sequence of $|V|$ natural numbers is given.</p... | habedi/stack-exchange-dataset |
94,249 | The task of recognizing game units in the screenshot | <p>I'm new to computer vision and I want to solve the task of recognizing the game units of the game Clash Royale in the screenshot.
Briefly, there are about 70 different types of gaming units belonging to two teams (they differ a little in colors and some are visible in front, others with backs). I want to find ga... | machine learning artificial intelligence computer vision image processing computer games | 1 | The task of recognizing game units in the screenshot -- (machine learning artificial intelligence computer vision image processing computer games)
<p>I'm new to computer vision and I want to solve the task of recognizing the game units of the game Clash Royale in the screenshot.
Briefly, there are about 70 differen... | habedi/stack-exchange-dataset |
94,252 | Choosing a random edge with restrictions | <p>Given a bipartite graph $G = (V, U, E)$ such that $|V| = |U| =2^n$, one wants to sample an edge from $G$, uniformly at random, with the following operations:<br>
1. One can sample $u \in U$ w.p $\frac{1}{|U|}$ ,or $v \in V$ w.p $\frac{1}{|V|}$.<br>
2. There exists a polynomial time oracle, which can, given $... | algorithms complexity theory graphs probabilistic algorithms | 1 | Choosing a random edge with restrictions -- (algorithms complexity theory graphs probabilistic algorithms)
<p>Given a bipartite graph $G = (V, U, E)$ such that $|V| = |U| =2^n$, one wants to sample an edge from $G$, uniformly at random, with the following operations:<br>
1. One can sample $u \in U$ w.p $\frac{1}{|U... | habedi/stack-exchange-dataset |
95,261 | Time Complexity of the code | <p>I am having trouble finding the time complexity of the below code. </p>

<pre><code># Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None

class Solution(object):&#x... | algorithm analysis runtime analysis binary trees recursion | 1 | Time Complexity of the code -- (algorithm analysis runtime analysis binary trees recursion)
<p>I am having trouble finding the time complexity of the below code. </p>

<pre><code># Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# ... | habedi/stack-exchange-dataset |
95,266 | Subsampling of Frequent Words in Word2Vec | <p>I am reading through the following paper: <a href="https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf" rel="nofollow noreferrer">https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf</a></p>
... | machine learning natural language processing | 1 | Subsampling of Frequent Words in Word2Vec -- (machine learning natural language processing)
<p>I am reading through the following paper: <a href="https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf" rel="nofollow noreferrer">https://papers.nips.cc/paper/5021... | habedi/stack-exchange-dataset |
95,278 | Concatenation of language to itself zero times | <p>I was solving this question:</p>

<blockquote>
 <p>Which of the following statement(s) is/are false? </p>
 
 <ol>
 <li>$L^0=\{\epsilon\}$</li>
 <li>$|L^0|=0$</li>
 </ol>
</blockquote>

<p>The answer given was None. That is, none of these statements are false and both... | formal languages regular languages regular expressions | 1 | Concatenation of language to itself zero times -- (formal languages regular languages regular expressions)
<p>I was solving this question:</p>

<blockquote>
 <p>Which of the following statement(s) is/are false? </p>
 
 <ol>
 <li>$L^0=\{\epsilon\}$</li>
 <li>$|L^0|=0$</li>
 </ol>&#x... | habedi/stack-exchange-dataset |
95,280 | What is the use case for multi-type-parameter generics? | <p>In C#, one can define a class/method/function with multiple type parameters. For example, </p>

<pre><code>// function
void foo<T1, T2>(T1 x, T2 y) { /*body*/}

// class
class Bar<T1, T2> { /*body*/ }
</code></pre>

<p>I understand <strong>how</strong> to use it, but I... | type theory abstract data types | 1 | What is the use case for multi-type-parameter generics? -- (type theory abstract data types)
<p>In C#, one can define a class/method/function with multiple type parameters. For example, </p>

<pre><code>// function
void foo<T1, T2>(T1 x, T2 y) { /*body*/}

// class
class Bar<T1, T2> ... | habedi/stack-exchange-dataset |
95,286 | How is deciding a problem not equivalent to finding a valid certificate for verification? | <p>Take a decision problem $Q$, which maps encoded instances of a problem, i.e., $\lbrace 0, 1 \rbrace \ast$ to the solution set $\lbrace 0, 1 \rbrace$.<br>
Since $Q$ is in $NP$, there exists a verification algorithm $A$, which takes an input and a certificate, in that order, as arguments and maps those to $\lbrace... | complexity theory computability | 1 | How is deciding a problem not equivalent to finding a valid certificate for verification? -- (complexity theory computability)
<p>Take a decision problem $Q$, which maps encoded instances of a problem, i.e., $\lbrace 0, 1 \rbrace \ast$ to the solution set $\lbrace 0, 1 \rbrace$.<br>
Since $Q$ is in $NP$, there exis... | habedi/stack-exchange-dataset |
95,298 | Decidability of a set containing first symbols of elements of a decidable set | <p>Let's say we have an alphabet $\Sigma = \{a,b, \dots , z\}$</p>

<p>Set $A$ consists of words $x_i$ containing symbols from $\Sigma$ alphabet, which have this structure</p>

<p>$x_i := \alpha_i \beta_i$, where $\alpha_i$ is just 1 symbol from $\Sigma$ and $\beta_i \in \Sigma^{*}$ (can also be empty)<... | computability | 1 | Decidability of a set containing first symbols of elements of a decidable set -- (computability)
<p>Let's say we have an alphabet $\Sigma = \{a,b, \dots , z\}$</p>

<p>Set $A$ consists of words $x_i$ containing symbols from $\Sigma$ alphabet, which have this structure</p>

<p>$x_i := \alpha_i \beta_i$, ... | habedi/stack-exchange-dataset |
95,310 | Linux OS/HW VM cooperation | <p>From what i've learned, the HW is responsible for setting the accessed and dirty bits in the PTE of a process, and the OS is responsible for turning them off.
My question is why?<br>
The first part, i think is because only the HW is preforming the page table walk and it's a good opportunity for it to set the... | operating systems virtual memory paging | 1 | Linux OS/HW VM cooperation -- (operating systems virtual memory paging)
<p>From what i've learned, the HW is responsible for setting the accessed and dirty bits in the PTE of a process, and the OS is responsible for turning them off.
My question is why?<br>
The first part, i think is because only the HW is pref... | habedi/stack-exchange-dataset |
95,318 | Easiest way to find y in $x \text{ xor } y = z$ with given $x \text{ and } z$ | <p>Let's say we have given two numbers $x, z$, and we need to find another number $y$ such that $x \text{ xor } y = z$. The xor ( exclusive or ) is bitwise operation: <a href="https://en.wikipedia.org/wiki/Exclusive_or" rel="nofollow noreferrer">xor table</a>
.</p>

<p>I know that this can be solved if we a... | logic bit manipulation | 1 | Easiest way to find y in $x \text{ xor } y = z$ with given $x \text{ and } z$ -- (logic bit manipulation)
<p>Let's say we have given two numbers $x, z$, and we need to find another number $y$ such that $x \text{ xor } y = z$. The xor ( exclusive or ) is bitwise operation: <a href="https://en.wikipedia.org/wiki/Exclusiv... | habedi/stack-exchange-dataset |
95,322 | What is time complexity in this case? | <p>I have the recurrence of the form </p>

<blockquote>
 <p>T(n) = T(n/2) + O(n)</p>
</blockquote>

<p>This can be solved using master's theorem and if i use the results of the theorem, the recurrence evaluates to a time complexity of O(n). But if i think of it in terms of its tree, the input i... | time complexity recurrence relation | 1 | What is time complexity in this case? -- (time complexity recurrence relation)
<p>I have the recurrence of the form </p>

<blockquote>
 <p>T(n) = T(n/2) + O(n)</p>
</blockquote>

<p>This can be solved using master's theorem and if i use the results of the theorem, the recurrence evaluates to a ... | habedi/stack-exchange-dataset |
95,326 | Relationship between Higher Kinded Polymorphism, type inference, and Currying | <p>On Hacker News there is an interesting exchange about the <a href="https://news.ycombinator.com/item?id=17536441" rel="nofollow noreferrer">async\await RFC for Rust</a>.</p>

<p>The author of the proposal <code>withoutboats</code> is responding to a comment about the usage of async-await construct vs a monad... | type theory polymorphisms | 1 | Relationship between Higher Kinded Polymorphism, type inference, and Currying -- (type theory polymorphisms)
<p>On Hacker News there is an interesting exchange about the <a href="https://news.ycombinator.com/item?id=17536441" rel="nofollow noreferrer">async\await RFC for Rust</a>.</p>

<p>The author of the prop... | habedi/stack-exchange-dataset |
95,327 | Is it 100% OK to say "All software doesn't need to know the system lower than the architecture level"? | <p><img src="https://cdn-images-1.medium.com/max/1600/1*sfuJB1NH7u971A4sgLT2vA.jpeg" alt=""></p>

<p>Most of you know this diagram. If this diagram is true, all software is free to not know the levels lower than ISA. But it's not true. Softwares like performance-critical programs or system softwares like OS and... | computer architecture operating systems compilers simulation | 1 | Is it 100% OK to say "All software doesn't need to know the system lower than the architecture level"? -- (computer architecture operating systems compilers simulation)
<p><img src="https://cdn-images-1.medium.com/max/1600/1*sfuJB1NH7u971A4sgLT2vA.jpeg" alt=""></p>

<p>Most of you know this diagram. If this dia... | habedi/stack-exchange-dataset |
95,334 | Solve longest common subsequence in a non dynamic programming way? | <p>I am working on the longest common subsequence (LCS) problem while learning dynamic programming. Below is the Java code I created to solve the problem, which is not dynamic programming as far as I understand. </p>

<pre><code>public class LCS
{
 public static String lcs(String a, String b )
 ... | dynamic programming memoization | 1 | Solve longest common subsequence in a non dynamic programming way? -- (dynamic programming memoization)
<p>I am working on the longest common subsequence (LCS) problem while learning dynamic programming. Below is the Java code I created to solve the problem, which is not dynamic programming as far as I understand. </p>... | habedi/stack-exchange-dataset |
95,354 | Number of strings accepted by this regular expression | <p>This was a question that I got while taking a test at our university. The question paper was taken away after the exams. I remember the question only, not the multiple choices. </p>

<p>If a regular expression is of the form <code>(x+y)*y(a+ab)*</code> , then what is the maximum number of strings with length... | automata regular languages regular expressions | 1 | Number of strings accepted by this regular expression -- (automata regular languages regular expressions)
<p>This was a question that I got while taking a test at our university. The question paper was taken away after the exams. I remember the question only, not the multiple choices. </p>

<p>If a regular expr... | habedi/stack-exchange-dataset |
95,357 | A problem about slicing and indexing in numpy in Python | <p>I learned that in numpy, given a vector, slicing and indexing could give different results. I ran the following codes:</p>

<pre><code>a = np.array([1, 2])
b = np.array([3, 4, 5])
print(b[a])
c = b[1:]
print(b)
c[0] = 1
print(b)
print(c)
print(b[1:] is c)
</code></pre>
... | python | 1 | A problem about slicing and indexing in numpy in Python -- (python)
<p>I learned that in numpy, given a vector, slicing and indexing could give different results. I ran the following codes:</p>

<pre><code>a = np.array([1, 2])
b = np.array([3, 4, 5])
print(b[a])
c = b[1:]
print(b)
c[0] = 1&#... | habedi/stack-exchange-dataset |
95,358 | detectEigenFeatures with polygon ROI | <p>I am using detectEigenFeatures in the Matlab command to obtain the corner points. This function only can provide the corner points within a rectangular boundary region. But I want to extract the corner points within a polygon. I have thought about using small rectangles in order to obtain a polygon. But it seems tim... | computer vision | 1 | detectEigenFeatures with polygon ROI -- (computer vision)
<p>I am using detectEigenFeatures in the Matlab command to obtain the corner points. This function only can provide the corner points within a rectangular boundary region. But I want to extract the corner points within a polygon. I have thought about using small... | habedi/stack-exchange-dataset |
95,368 | Valid bit incoherence between TLB and Page Table | <p>In the fourth row of the TLB the valid bit is 0. The corresponding row in the pagle table (fifht row) has the valid bit 1. How is this possible? What events leads to this incoherence? </p>

<p><a href="https://i.stack.imgur.com/9pB8G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9pB8G.pn... | computer architecture cpu virtual memory memory access | 1 | Valid bit incoherence between TLB and Page Table -- (computer architecture cpu virtual memory memory access)
<p>In the fourth row of the TLB the valid bit is 0. The corresponding row in the pagle table (fifht row) has the valid bit 1. How is this possible? What events leads to this incoherence? </p>

<p><a href... | habedi/stack-exchange-dataset |
95,369 | Represent there are infinitely many in FOL | <p>How to represent in first order logic the expression:</p>

<blockquote>
 <p><strong>"there are infinitely many"</strong></p>
</blockquote>

<p>To be honest I'm confused and not even sure whether you can represent them in first order logic. </p>
 | logic first order logic | 1 | Represent there are infinitely many in FOL -- (logic first order logic)
<p>How to represent in first order logic the expression:</p>

<blockquote>
 <p><strong>"there are infinitely many"</strong></p>
</blockquote>

<p>To be honest I'm confused and not even sure whether you can represent them in... | habedi/stack-exchange-dataset |
95,379 | Finding duplicate in immutable array in linear time and constant space | <p>We have a array of $N$+1 integers. The integers range from 1 to $N$. The array contains at least one duplicate. Our goal is to find one of the duplicate entries. We have the constraint that we cannot modify the input array. Is there any solution to this problem which has $O(N)$ time complexity and $O(1)$ space compl... | algorithms arrays | 1 | Finding duplicate in immutable array in linear time and constant space -- (algorithms arrays)
<p>We have a array of $N$+1 integers. The integers range from 1 to $N$. The array contains at least one duplicate. Our goal is to find one of the duplicate entries. We have the constraint that we cannot modify the input array.... | habedi/stack-exchange-dataset |
95,394 | What is the name of the tree data structure where node weight equals the sum of all descendant nodes' weights? | <p>What is the name of the tree data structure where node weight equals the sum of all descendant nodes' weights?</p>

<p>Example:</p>

<pre><code> 15
 / \
 10 5
 / \ / \
 2 8 1 4
</code></pre>
 | data structures trees | 1 | What is the name of the tree data structure where node weight equals the sum of all descendant nodes' weights? -- (data structures trees)
<p>What is the name of the tree data structure where node weight equals the sum of all descendant nodes' weights?</p>

<p>Example:</p>

<pre><code> 15
 / ... | habedi/stack-exchange-dataset |
95,396 | What textbooks includes explanations of advanced data structures found commonly in competitive programming? | <p>While looking through some problems on CodeForces, I noticed that there were several problems that required knowledge of techniques that just aren't covered in standard algorithm texts. </p>

<p>Topics that I want to understand include</p>

<ul>
<li>segment trees, least common ancestor, range-min... | algorithms data structures books | 1 | What textbooks includes explanations of advanced data structures found commonly in competitive programming? -- (algorithms data structures books)
<p>While looking through some problems on CodeForces, I noticed that there were several problems that required knowledge of techniques that just aren't covered in standard al... | habedi/stack-exchange-dataset |
95,402 | Emulating equal operator using multiplication | <p>I have two values $A$ and $B$, I want to know if I can implement the equals $=$ operation as the product of the two values. I can apply any function to $A$ and any function to $B$, but I need to use multiplication at the end.</p>

<p>Basically I want to find $f$ and $g$, such that:</p>

<p>$$ f(A) \c... | arithmetic boolean algebra | 1 | Emulating equal operator using multiplication -- (arithmetic boolean algebra)
<p>I have two values $A$ and $B$, I want to know if I can implement the equals $=$ operation as the product of the two values. I can apply any function to $A$ and any function to $B$, but I need to use multiplication at the end.</p>

... | habedi/stack-exchange-dataset |
95,408 | Can computers lose information? | <p>I've heard that computers cannot forget anything, but yesterday my teacher told me that a computer can lose its memory from getting very hot. Is that true that computers can lose information? How and why does this happen? Can the lost information be retrieved back?</p>
 | memory management | 1 | Can computers lose information? -- (memory management)
<p>I've heard that computers cannot forget anything, but yesterday my teacher told me that a computer can lose its memory from getting very hot. Is that true that computers can lose information? How and why does this happen? Can the lost information be retrieved ba... | habedi/stack-exchange-dataset |
95,412 | Subgraph Isomorphism checking in Multigraphs | <p>I am considering the following problem:</p>
<blockquote>
<p><strong>Input</strong>: 2 Graphs <strong>G=(V,E), H=(V',E')</strong>. <strong>G</strong> and <strong>H</strong> are directed <a href="https://en.wikipedia.org/wiki/Multigraph" rel="nofollow noreferrer">multigraphs</a></p>
<p><strong>Question</st... | graphs np complete graph isomorphism | 1 | Subgraph Isomorphism checking in Multigraphs -- (graphs np complete graph isomorphism)
<p>I am considering the following problem:</p>
<blockquote>
<p><strong>Input</strong>: 2 Graphs <strong>G=(V,E), H=(V',E')</strong>. <strong>G</strong> and <strong>H</strong> are directed <a href="https://en.wikipedia.org/wik... | habedi/stack-exchange-dataset |
95,414 | Proving that $\{0^{m^2}\mid m\geq 3\}^*$ is regular | <p>We know that $L=\{0^{m^2}\mid m\geq 3 \}$ is not a regular language. However $L^*$ is regular because we can generate $0^{120}$ to $0^{128}$ by some concatenations and then any other power of $0$ can be generated just by concatenating $0^9$. Hence we can represent $L^*$ using a FSM.</p>

<p><strong>My Questi... | automata regular languages number theory | 1 | Proving that $\{0^{m^2}\mid m\geq 3\}^*$ is regular -- (automata regular languages number theory)
<p>We know that $L=\{0^{m^2}\mid m\geq 3 \}$ is not a regular language. However $L^*$ is regular because we can generate $0^{120}$ to $0^{128}$ by some concatenations and then any other power of $0$ can be generated just b... | habedi/stack-exchange-dataset |
95,419 | Definition of a TM accepting a word | <p>The following is a quote from Sipser's "Introduction to the theory of computation"</p>

<blockquote>
 <p>A Turing machine $M$ accepts input $w$ if a sequence of configurations
 $C_{1}, C_{1}, \ldots , C_{k}$ exists, where</p>
 
 <ol>
 <li>$C_{1}$ is the start configuration of $M$ on... | complexity theory turing machines | 1 | Definition of a TM accepting a word -- (complexity theory turing machines)
<p>The following is a quote from Sipser's "Introduction to the theory of computation"</p>

<blockquote>
 <p>A Turing machine $M$ accepts input $w$ if a sequence of configurations
 $C_{1}, C_{1}, \ldots , C_{k}$ exists, where</... | habedi/stack-exchange-dataset |
95,422 | Can Depth-first search (DFS) with alphabetical traversal of neighbors be run in O(|V|+|E|) time? | <p>I feel like the answer is <strong>no</strong> but I'm not sure. I think it's commonly accepted that DFS runs in $O(|V| + |E|)$ time. I've read a few explanations and they all make sense <strong>if</strong> the neighbour traversal for any given vertex can be done in arbitrary order.</p>

<p>But I've noticed a... | algorithms graphs data structures | 1 | Can Depth-first search (DFS) with alphabetical traversal of neighbors be run in O(|V|+|E|) time? -- (algorithms graphs data structures)
<p>I feel like the answer is <strong>no</strong> but I'm not sure. I think it's commonly accepted that DFS runs in $O(|V| + |E|)$ time. I've read a few explanations and they all make s... | habedi/stack-exchange-dataset |
95,438 | Proving Progress for STLC with Linear and Unrestricted Types | <p>In <a href="http://mitp-content-server.mit.edu:18180/books/content/sectbyfn?collid=books_pres_0&id=1104&fn=9780262162289_sch_0001.pdf" rel="nofollow noreferrer">this</a> paper Walker presents an extension of STLC with linear and unrestricted types. The proof of type soundness is left as an exercise to the re... | programming languages lambda calculus | 1 | Proving Progress for STLC with Linear and Unrestricted Types -- (programming languages lambda calculus)
<p>In <a href="http://mitp-content-server.mit.edu:18180/books/content/sectbyfn?collid=books_pres_0&id=1104&fn=9780262162289_sch_0001.pdf" rel="nofollow noreferrer">this</a> paper Walker presents an extension ... | habedi/stack-exchange-dataset |
95,442 | Bytes from integer using bitwise operators | <p>So I am extremely confused with using bitwise shifts used to extract the bytes from an integer. I find that if I do something like this...</p>

<pre><code>int i = 512; 
i & 0xFF; // this gives me the first byte
</code></pre>

<p>That must mean <code>i & 0xFF</code> gives me the first ... | binary bit manipulation c++ | 1 | Bytes from integer using bitwise operators -- (binary bit manipulation c++)
<p>So I am extremely confused with using bitwise shifts used to extract the bytes from an integer. I find that if I do something like this...</p>

<pre><code>int i = 512; 
i & 0xFF; // this gives me the first byte
</code></p... | habedi/stack-exchange-dataset |
95,444 | T(n) = aT(n/b)+f(n), I don't understand the difference between a and b | <p>I was analyzing the time complexity for recursive algorithms like merge sort, but when I came across that recurrence, [I think that equation is called a recurrence right?] I couldn't differentiate between a which mean the number of subproblems and b which in my slides it says is the factor by which n is divided by.<... | algorithm analysis | 1 | T(n) = aT(n/b)+f(n), I don't understand the difference between a and b -- (algorithm analysis)
<p>I was analyzing the time complexity for recursive algorithms like merge sort, but when I came across that recurrence, [I think that equation is called a recurrence right?] I couldn't differentiate between a which mean the ... | habedi/stack-exchange-dataset |
95,450 | Are there existing extensions to behavior trees that fascilitate node communication? | <p>I've been looking into behavior trees, but I cannot find a lot about them. The Wikipedia page pretty much only mentions sequence and selector nodes.</p>

<p>I have found implementations that also provide memory selector, memory sequence, and parallel sequence, as well as some decorators like inversion and re... | artificial intelligence message passing | 1 | Are there existing extensions to behavior trees that fascilitate node communication? -- (artificial intelligence message passing)
<p>I've been looking into behavior trees, but I cannot find a lot about them. The Wikipedia page pretty much only mentions sequence and selector nodes.</p>

<p>I have found implement... | habedi/stack-exchange-dataset |
95,451 | MLP and backpropagation limitations? | <p>I have heard a colleague of mine giving the following statements to a student, but I am not quite sure if he is right. The statements were about Multi Layer Perceptron and the Backpropagation algorithm, he said that:</p>

<p>It would be reasonable to check it up if the data to be input to a MLP should be che... | neural networks | 1 | MLP and backpropagation limitations? -- (neural networks)
<p>I have heard a colleague of mine giving the following statements to a student, but I am not quite sure if he is right. The statements were about Multi Layer Perceptron and the Backpropagation algorithm, he said that:</p>

<p>It would be reasonable to ... | habedi/stack-exchange-dataset |
95,454 | How to prove that if the set and its complement are recursively enumerable, then both are recursive? | <p>How to prove that if the set and its complement are recursively enumerable, then this set and its complement are recursive?<br>
My idea is that we can make the characteristic function of recursively enumerable set to be a total function using characteristic function of the complement (we can compute both $\chi_A... | computability primitive recursion | 1 | How to prove that if the set and its complement are recursively enumerable, then both are recursive? -- (computability primitive recursion)
<p>How to prove that if the set and its complement are recursively enumerable, then this set and its complement are recursive?<br>
My idea is that we can make the characteristi... | habedi/stack-exchange-dataset |
95,464 | Double exponentials vs single exponentials | <p>Here are four tenets I cannot reconcile:</p>

<ul>
<li><a href="https://en.wikipedia.org/wiki/Time_complexity#Double_exponential_time" rel="noreferrer">Double exponential time algorithms</a> run in $O(2^{2^{n^k}})$ time with $k \in \mathbb{N}$ constant</li>
<li><a href="https://en.wikipedia.org/wiki/... | asymptotics discrete mathematics notation | 1 | Double exponentials vs single exponentials -- (asymptotics discrete mathematics notation)
<p>Here are four tenets I cannot reconcile:</p>

<ul>
<li><a href="https://en.wikipedia.org/wiki/Time_complexity#Double_exponential_time" rel="noreferrer">Double exponential time algorithms</a> run in $O(2^{2^{n^k}})$ ... | habedi/stack-exchange-dataset |
95,465 | Finding a Hamilton path in a Complete Euclidean Graph is in P | <p>How is it possible to prove that this assert is not true?</p>
 | complexity theory graphs np hard | 1 | Finding a Hamilton path in a Complete Euclidean Graph is in P -- (complexity theory graphs np hard)
<p>How is it possible to prove that this assert is not true?</p>
 | habedi/stack-exchange-dataset |
95,473 | How a Symbolic Evaluator Generates Test Input for this Example | <p>Say we have some complicated function that determines if a string matches an XSS attack string, and throws an error or does something else in that case.</p>

<pre><code>function somethingWithXSSVulnerability(x) {
 var regex = /<script(.*)>(.*)<\/script>/
 if (x.match(regex)) {
 t... | software verification software testing symbolic execution | 1 | How a Symbolic Evaluator Generates Test Input for this Example -- (software verification software testing symbolic execution)
<p>Say we have some complicated function that determines if a string matches an XSS attack string, and throws an error or does something else in that case.</p>

<pre><code>function somet... | habedi/stack-exchange-dataset |
95,476 | Given a RxC grid, how to generate N 2D points randomly such that no 3 points are collinear? | <p>Context, I have a geometric algorithm that is sensitive to collinear points and receives as input a list of points in 2D generated randomly. Suppose that I have a Boolean function nonCollinear(x,y,z) that given three points returns true if they are non collinear and false otherwise. Is there an efficient algorithm t... | computational geometry probabilistic algorithms integers lists | 1 | Given a RxC grid, how to generate N 2D points randomly such that no 3 points are collinear? -- (computational geometry probabilistic algorithms integers lists)
<p>Context, I have a geometric algorithm that is sensitive to collinear points and receives as input a list of points in 2D generated randomly. Suppose that I h... | habedi/stack-exchange-dataset |
95,479 | Minimum cost circulation problem with bounded number of edges | <p>During an article I am writing, I encountered the following problem:
Let $N=(G=(V,E),W,C)$ be a network with a graph $G$, a weight function $W:E\to R$ and an integer capacity function $C:E \to N$.
Find a circulation $f$ with minimal cost $W(f)$ such that the number of edges used by the circulation (i.e., ed... | algorithms network flow | 1 | Minimum cost circulation problem with bounded number of edges -- (algorithms network flow)
<p>During an article I am writing, I encountered the following problem:
Let $N=(G=(V,E),W,C)$ be a network with a graph $G$, a weight function $W:E\to R$ and an integer capacity function $C:E \to N$.
Find a circulation $f... | habedi/stack-exchange-dataset |
95,484 | How is space from malloc allocated? | <p>Whenever we load a process (which consists of object code, static and global variables, stack and heap space) into main memory it would be of fixed size. But, the program doesn't know in advance how much heap memory is it gonna need? Is there some fixed stack and heap space given to each process of some size in adva... | operating systems | 1 | How is space from malloc allocated? -- (operating systems)
<p>Whenever we load a process (which consists of object code, static and global variables, stack and heap space) into main memory it would be of fixed size. But, the program doesn't know in advance how much heap memory is it gonna need? Is there some fixed stac... | habedi/stack-exchange-dataset |
95,488 | Generation regular languages by context free grammar | <p>I came across problem asking whether given statement is true and false. The statement given was as follows:</p>

<blockquote>
 <p>Every Type-2 grammar can generate regular language.</p>
</blockquote>

<p>I felt that Type-2 grammar means, its context free grammar and is generated by PDA. PDA ... | regular languages context free finite automata | 1 | Generation regular languages by context free grammar -- (regular languages context free finite automata)
<p>I came across problem asking whether given statement is true and false. The statement given was as follows:</p>

<blockquote>
 <p>Every Type-2 grammar can generate regular language.</p>
</blockqu... | habedi/stack-exchange-dataset |
95,491 | How a SMT / SAT Solver Generates Valuations for this Example | <p>First, an example of a set of constraints which turned out not to be solvable (I don't think):</p>

<pre><code>b < 3 && c + a > 5 && a - b > 2 && c > 1 && b - c > 3
</code></pre>

<p>My procedure for solving this is roughly: Okay b is less than 3, an... | satisfiability sat solvers smt solvers | 1 | How a SMT / SAT Solver Generates Valuations for this Example -- (satisfiability sat solvers smt solvers)
<p>First, an example of a set of constraints which turned out not to be solvable (I don't think):</p>

<pre><code>b < 3 && c + a > 5 && a - b > 2 && c > 1 && b - c... | habedi/stack-exchange-dataset |
95,497 | Are all computational complexity results oracle results? | <p>When talking about the complexity of a given operation, say multiplication of numbers, one usually counts the number of "elementary operations" that are required.</p>

<p>For example, a common argument says that multiplying two $n$-digit numbers with the schoolbook standard method takes $O(n^2)$ operations, ... | complexity theory programming languages computation models | 1 | Are all computational complexity results oracle results? -- (complexity theory programming languages computation models)
<p>When talking about the complexity of a given operation, say multiplication of numbers, one usually counts the number of "elementary operations" that are required.</p>

<p>For example, a co... | habedi/stack-exchange-dataset |
95,500 | Minimum number of strings to cover entire space within Hamming distance | <p>Given $(n, k)$:</p>

<ol>
<li>What is the minimum number $x$ of (binary) strings such that all $n$-bit (binary) strings are within $k$ Hamming distance of some string?

<ul>
<li>Is there an asymptotic expansion or lower bound, at least?</li>
<li>A somewhat-trivial lower bound is as follow... | strings discrete mathematics coding theory hamming distance | 1 | Minimum number of strings to cover entire space within Hamming distance -- (strings discrete mathematics coding theory hamming distance)
<p>Given $(n, k)$:</p>

<ol>
<li>What is the minimum number $x$ of (binary) strings such that all $n$-bit (binary) strings are within $k$ Hamming distance of some string?&... | habedi/stack-exchange-dataset |
95,505 | How the Abstract DPLL Algorithm Works in SAT Solving | <p>I have come across many definitions of the DPLL algorithm but haven't been able to follow them. The ones that are closest to making sense to me are the ones based on state-transition systems with transition rules such as defined here:</p>

<p><a href="http://homepage.cs.uiowa.edu/~tinelli/papers/NieOT-LPAR-0... | satisfiability sat solvers | 1 | How the Abstract DPLL Algorithm Works in SAT Solving -- (satisfiability sat solvers)
<p>I have come across many definitions of the DPLL algorithm but haven't been able to follow them. The ones that are closest to making sense to me are the ones based on state-transition systems with transition rules such as defined her... | habedi/stack-exchange-dataset |
95,521 | Ideas on how to approach the construction of a probability-heavy algorithm | <h2>Definitions</h2>

<p>Assume we have a Shopping List $L$ which is a list of pairs of Items and Quantities: $L = [(i_1, Q_1), (i_2, Q_2), (i_3, Q_3) ...$</p>

<p>We also have a Stock List $S$ which is a list of pairs of Containers and Prices: $S = [(C_1, p_1),(C_2, p_2), (C_3,p_3)...]$</p>

<p... | algorithms | 1 | Ideas on how to approach the construction of a probability-heavy algorithm -- (algorithms)
<h2>Definitions</h2>

<p>Assume we have a Shopping List $L$ which is a list of pairs of Items and Quantities: $L = [(i_1, Q_1), (i_2, Q_2), (i_3, Q_3) ...$</p>

<p>We also have a Stock List $S$ which is a list of ... | habedi/stack-exchange-dataset |
95,528 | What is tight NSPACE complexity of $ALT\text{-}SPACE(a(n),s(n))$? | <p>According to <a href="https://cstheory.stackexchange.com/questions/403/space-alternating-hierarchy/#tab-top">Ryan Williams's answer</a> $ALT\text{-}SPACE(a(n),\log n)\subseteq NSPACE(a(n)\log n)$.</p>

<blockquote>
 <p>Does there exist any better bound (for example something like $ALT\text{-}SPACE(a(n),... | space complexity | 1 | What is tight NSPACE complexity of $ALT\text{-}SPACE(a(n),s(n))$? -- (space complexity)
<p>According to <a href="https://cstheory.stackexchange.com/questions/403/space-alternating-hierarchy/#tab-top">Ryan Williams's answer</a> $ALT\text{-}SPACE(a(n),\log n)\subseteq NSPACE(a(n)\log n)$.</p>

<blockquote>
 ... | habedi/stack-exchange-dataset |
95,529 | How to find the virtual pages and physical memory frames? | <p>So i am given a system of 20 bits virtual addresses and 18 bits physical addresses using paging with pages size 4Kbytes.
I am told to find the maximum number of virtual pages that a process can have and the maximum number of physical memory frames the system can have.</p>

<p>So 2^12 page size makes 12 b... | paging | 1 | How to find the virtual pages and physical memory frames? -- (paging)
<p>So i am given a system of 20 bits virtual addresses and 18 bits physical addresses using paging with pages size 4Kbytes.
I am told to find the maximum number of virtual pages that a process can have and the maximum number of physical memory fr... | habedi/stack-exchange-dataset |
95,533 | How to convert DFA to regex with State Elimination | <p>I can do the very simple transitions but it gets difficult when you have transitions jumping over 1 or more states. </p>

<p>I have this difficult DFA i need help converting to RE:</p>

<p>using STATE ELIMINATION</p>

<p>if you could explain ripping state q1 from the DFA it would help a lot<... | finite automata regular expressions | 1 | How to convert DFA to regex with State Elimination -- (finite automata regular expressions)
<p>I can do the very simple transitions but it gets difficult when you have transitions jumping over 1 or more states. </p>

<p>I have this difficult DFA i need help converting to RE:</p>

<p>using STATE ELIMINA... | habedi/stack-exchange-dataset |
95,545 | Different context-free grammars for the same language | <p>In context-free grammar, are both the following grammars correct for the same language?</p>

<p>$$L = \{a^mb^n : m, n \in N_0 \text{ and } m \ne n\}$$</p>

<p><strong>(grammar one)</strong></p>

<p>$S \to S_1 | S_2$</p>

<p>$S_1 \to A_1B_1$</p>

<p>$A_1 \to aA_1 | a$</p>
&... | formal languages automata formal grammars | 1 | Different context-free grammars for the same language -- (formal languages automata formal grammars)
<p>In context-free grammar, are both the following grammars correct for the same language?</p>

<p>$$L = \{a^mb^n : m, n \in N_0 \text{ and } m \ne n\}$$</p>

<p><strong>(grammar one)</strong></p>
&#... | habedi/stack-exchange-dataset |
95,553 | Does data entropy depend on the arrangement of the characters in a file? | <p>From what I understand data entropy controls the limit of data compression and it depends on the probability of the characters in the file. Assuming that we have a file of size 256 bytes containing 256 different symbols and we made a bigger file consisting of many copies of that file, And because the small file has ... | terminology information theory | 1 | Does data entropy depend on the arrangement of the characters in a file? -- (terminology information theory)
<p>From what I understand data entropy controls the limit of data compression and it depends on the probability of the characters in the file. Assuming that we have a file of size 256 bytes containing 256 differ... | habedi/stack-exchange-dataset |
95,560 | How to graph search a LTL-generated Buchi automaton to generate valid execution paths | <p>I have a set of tasks, and a LTL specification that describes which orders of the tasks are legal. I want to find a way to enumerate all permutations of the tasks that meet the specification.</p>

<p>For example, suppose there are two tasks, A and B, and the LTL spec <code><>(A&<>B)</code> i... | automata search algorithms graph traversal linear temporal logic temporal logic | 1 | How to graph search a LTL-generated Buchi automaton to generate valid execution paths -- (automata search algorithms graph traversal linear temporal logic temporal logic)
<p>I have a set of tasks, and a LTL specification that describes which orders of the tasks are legal. I want to find a way to enumerate all permutat... | habedi/stack-exchange-dataset |
95,562 | Need help understanding which values can be inserted into a specific node in a binary tree | <p>I am studying binary trees and I am failing to see what numbers can be inserted into this specific node position. The values to pick from are : 16, 24, 36, 45, 49, 51, 58.</p>

<p><a href="https://i.stack.imgur.com/VapaZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VapaZ.png" alt="Binar... | binary trees | 1 | Need help understanding which values can be inserted into a specific node in a binary tree -- (binary trees)
<p>I am studying binary trees and I am failing to see what numbers can be inserted into this specific node position. The values to pick from are : 16, 24, 36, 45, 49, 51, 58.</p>

<p><a href="https://i.s... | habedi/stack-exchange-dataset |
95,567 | Proof that total computable functions are not enumerable | <p>In an <a href="https://cs.stackexchange.com/a/274/91931">answer</a> to this <a href="https://cs.stackexchange.com/questions/266/why-are-the-total-functions-not-enumerable/274#274?newreg=37d1afc74bd5473ba161c75ce3a5bb68">question</a>, a sketch of the proof that total computable functions are not enumerable is made:</... | computability semi decidability enumeration | 1 | Proof that total computable functions are not enumerable -- (computability semi decidability enumeration)
<p>In an <a href="https://cs.stackexchange.com/a/274/91931">answer</a> to this <a href="https://cs.stackexchange.com/questions/266/why-are-the-total-functions-not-enumerable/274#274?newreg=37d1afc74bd5473ba161c75ce... | habedi/stack-exchange-dataset |
95,573 | Priority queue of constant size fit for extraction of K highest priority elements | <p>In an algorithm I'm designing, I need to do this cycle on a priority queue of constant size N many times, as quickly as possible: </p>

<ol>
<li>get $K$ highest priority elements (do on them some outside calculation)</li>
<li>append $4K$ kind-of-sorted elements back into the priority queue, removing... | data structures heaps priority queues | 1 | Priority queue of constant size fit for extraction of K highest priority elements -- (data structures heaps priority queues)
<p>In an algorithm I'm designing, I need to do this cycle on a priority queue of constant size N many times, as quickly as possible: </p>

<ol>
<li>get $K$ highest priority elements ... | habedi/stack-exchange-dataset |
95,575 | Point and Application of Recursive and Recursive Enumerable Languages | <p>What is the point and application of recursive and recursive enumerable languages. Finite Automaton is used for pattern matching, designing computer architecture and protocols, CFG is used for designing compilers but what about Recursive and Recursive enumerable languages?</p>
 | automata computation models | 1 | Point and Application of Recursive and Recursive Enumerable Languages -- (automata computation models)
<p>What is the point and application of recursive and recursive enumerable languages. Finite Automaton is used for pattern matching, designing computer architecture and protocols, CFG is used for designing compilers b... | habedi/stack-exchange-dataset |
95,577 | What is the average size of a jump in a binary tree? | <p>Assume that a full binary tree is layed out in memory recursively in the following way.
First the Root followed by Tree representation of left subtree followed by tree representation of right subtree. Assume tree is complete and full.</p>

<p>If a search path requires to go from array location $a[i]$ to... | binary trees probability theory binary search trees | 1 | What is the average size of a jump in a binary tree? -- (binary trees probability theory binary search trees)
<p>Assume that a full binary tree is layed out in memory recursively in the following way.
First the Root followed by Tree representation of left subtree followed by tree representation of right subtree. A... | habedi/stack-exchange-dataset |
95,582 | Explanation for the regular expression for the set of all string over the alphabet {0,1} | <p>Why does set of all strings over the alphabet {0,1} is represented by (0+1)*? As per my understanding (0+1) means either 0 and 1 and * means 0 or more occurrence of the given string. Now when we do (0+1)* it looks like we have to select either 0 or 1 and do a * on that so the resulting should be something like </p>&... | regular expressions | 1 | Explanation for the regular expression for the set of all string over the alphabet {0,1} -- (regular expressions)
<p>Why does set of all strings over the alphabet {0,1} is represented by (0+1)*? As per my understanding (0+1) means either 0 and 1 and * means 0 or more occurrence of the given string. Now when we do (0+1)... | habedi/stack-exchange-dataset |
95,584 | $\tilde \Omega$ for division by logarithmic factor | <p>Is $\Omega \left(\frac{n}{\log{n}} \right)\subset \tilde\Omega(n)$? </p>
 | asymptotics notation | 1 | $\tilde \Omega$ for division by logarithmic factor -- (asymptotics notation)
<p>Is $\Omega \left(\frac{n}{\log{n}} \right)\subset \tilde\Omega(n)$? </p>
 | habedi/stack-exchange-dataset |
95,587 | Binary search with alternative comparison cost | <p>I have a sorted array $A$ of non-arbitrary elements. Now, I have another element $c$ and I want to find out where it belongs in the sorting of $A$. The cost of comparing $c$ to $A_i$ is $\Theta(i^2)$. I do not directly care about the number of comparisons, I just want to minimize the sum of the costs of the comparis... | algorithms binary search | 1 | Binary search with alternative comparison cost -- (algorithms binary search)
<p>I have a sorted array $A$ of non-arbitrary elements. Now, I have another element $c$ and I want to find out where it belongs in the sorting of $A$. The cost of comparing $c$ to $A_i$ is $\Theta(i^2)$. I do not directly care about the number... | habedi/stack-exchange-dataset |
95,592 | Is this scheduling problem with arrival times, deadlines, and costs NP-hard? | <p>There are $n$ jobs where each job $i$ has an arrival time $r_i$, a deadline $d_i$ and a cost $c_i$. The problem is to find a scheduling time $t_i$ (where $r_i\leq t_i\leq d_i$) for each job $i$ in order to minimize $$\sum_i\max_{j\in S_i}(c_j),$$ where $S_i$ is the set of jobs scheduled at time $t_i$.</p>

<... | algorithms np hard | 1 | Is this scheduling problem with arrival times, deadlines, and costs NP-hard? -- (algorithms np hard)
<p>There are $n$ jobs where each job $i$ has an arrival time $r_i$, a deadline $d_i$ and a cost $c_i$. The problem is to find a scheduling time $t_i$ (where $r_i\leq t_i\leq d_i$) for each job $i$ in order to minimize $... | habedi/stack-exchange-dataset |
95,605 | Find a straight line to divide two convex polygons by equal area | <p>Suppose, we have two non-overlapping convex polygons $A$ and $B$. How can we draw one straight line which divides $A$ into two parts of equal area and also divides $B$ into two equal area parts?
Also, can we do this in complexity $O(n^2)$ or better? ($n = |A| + |B|$)</p>
 | computational geometry | 1 | Find a straight line to divide two convex polygons by equal area -- (computational geometry)
<p>Suppose, we have two non-overlapping convex polygons $A$ and $B$. How can we draw one straight line which divides $A$ into two parts of equal area and also divides $B$ into two equal area parts?
Also, can we do this in c... | habedi/stack-exchange-dataset |
95,623 | Hardness of approximating Minimum Cardinality Exact Cover | <p>The Minimum Cardinality Exact Cover (MCEC) problem is just like set cover, but the output sets must be disjoint. </p>

<p>Formally, given a collection of subsets $S$ of a finite set $U$, the problem asks for a subcollection $S'$ of $S$ of minimum cardinality such that the union of $S'$ is $U$, and $S_1 \cap ... | algorithms approximation set cover | 1 | Hardness of approximating Minimum Cardinality Exact Cover -- (algorithms approximation set cover)
<p>The Minimum Cardinality Exact Cover (MCEC) problem is just like set cover, but the output sets must be disjoint. </p>

<p>Formally, given a collection of subsets $S$ of a finite set $U$, the problem asks for a s... | habedi/stack-exchange-dataset |
95,624 | Is any sudoku solver an SAT solver? | <p>I have recently created a sudoku solver using C#, which outputs the solution to a sudoku after a reasonable amount of time in many cases. I have used the basic sudoku SAT-reduction (i.e. x111 meaning this is true if column 1, row 1 is filled by 1). The method I have done this does not take in a large clause of varia... | reductions satisfiability boolean algebra sat solvers sudoku | 1 | Is any sudoku solver an SAT solver? -- (reductions satisfiability boolean algebra sat solvers sudoku)
<p>I have recently created a sudoku solver using C#, which outputs the solution to a sudoku after a reasonable amount of time in many cases. I have used the basic sudoku SAT-reduction (i.e. x111 meaning this is true if... | habedi/stack-exchange-dataset |
95,626 | Prove that $L^r$ is context free without alphabet | <p>I'm stuck with this problem:</p>

<p>Given $L$ a CFL on the alphabet $\Sigma$. Prove that $L^r=\{x^r|x\in L\}$, where for each $a\in\Sigma$ and $y\in\Sigma^*$, $$\epsilon^r=\epsilon,$$ $$(ay)^r=y^ra,$$ is context free or not.</p>

<p>Since I don't have the alphabet I cannot think of a grammar that g... | context free proof techniques pumping lemma | 1 | Prove that $L^r$ is context free without alphabet -- (context free proof techniques pumping lemma)
<p>I'm stuck with this problem:</p>

<p>Given $L$ a CFL on the alphabet $\Sigma$. Prove that $L^r=\{x^r|x\in L\}$, where for each $a\in\Sigma$ and $y\in\Sigma^*$, $$\epsilon^r=\epsilon,$$ $$(ay)^r=y^ra,$$ is cont... | habedi/stack-exchange-dataset |
95,631 | Operating System: replace the process's memory space with a new program | <p>What does it mean that "replace the process's memory space with a new program"? So who's memory space will be replaced by whom?</p>

<p><a href="https://i.stack.imgur.com/jJAuS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jJAuS.png" alt="fork1"></a></p>
 | operating systems | 1 | Operating System: replace the process's memory space with a new program -- (operating systems)
<p>What does it mean that "replace the process's memory space with a new program"? So who's memory space will be replaced by whom?</p>

<p><a href="https://i.stack.imgur.com/jJAuS.png" rel="nofollow noreferrer"><img s... | habedi/stack-exchange-dataset |
95,632 | How important is to formulate a convex optimization for a proposed algorithm? | <p>I proposed a new sparse coding algorithm which has good results compared to the baselines, however, it has a non-convex optimization framework. 
I solved the problem using a general solver (e.g. Matlab), and although the solution is local optimum, it is still better than other relevant approaches.
So how imp... | optimization | 1 | How important is to formulate a convex optimization for a proposed algorithm? -- (optimization)
<p>I proposed a new sparse coding algorithm which has good results compared to the baselines, however, it has a non-convex optimization framework. 
I solved the problem using a general solver (e.g. Matlab), and although ... | habedi/stack-exchange-dataset |
95,636 | Storing Specific data on DB Table(s) | <p>I have an Excel with 40columns and 20k rows, and i have to store it in a database but i cant figure the best approach for it, the excel format is like this:</p>

<p>This table has 30 columns for days, then 11 columns for the next 11 weeks and then 9 columns for the next 9 month, in resume the first month is ... | data structures database theory | 1 | Storing Specific data on DB Table(s) -- (data structures database theory)
<p>I have an Excel with 40columns and 20k rows, and i have to store it in a database but i cant figure the best approach for it, the excel format is like this:</p>

<p>This table has 30 columns for days, then 11 columns for the next 11 we... | habedi/stack-exchange-dataset |
95,654 | Is every AVL tree a BST or just BT? | <p>I was going through the concepts of AVL tree and came across the definition of AVL tree from the wiki.</p>

<blockquote>
 <p>In computer science, an AVL tree (named after inventors Adelson-Velsky and Landis) is a self-balancing binary search tree</p>
</blockquote>

<p>even most of the defini... | trees balanced search trees | 1 | Is every AVL tree a BST or just BT? -- (trees balanced search trees)
<p>I was going through the concepts of AVL tree and came across the definition of AVL tree from the wiki.</p>

<blockquote>
 <p>In computer science, an AVL tree (named after inventors Adelson-Velsky and Landis) is a self-balancing binary ... | habedi/stack-exchange-dataset |
95,657 | Prove or disprove if $L_{1}$ is Turing-recognizable and $L_{2}$ is co-Turing-recognizable then $L_{1}\cap L_{2}$ is decidable | <p>I thought about these languages:
$$L_{1} = A_{TM} = \big\{ \langle M, w \rangle \mid M \text{ is TM and }M \text{ accepts } w \big\}$$
$$L_{2} = \overline{HALT_{TM}} = \big\{ \langle M, w \rangle \mid M \text{ is TM and }M \text{ doesn't halt on input } w \big\}$$</p>

<p>Their intersection:
$$L_... | turing machines computability | 1 | Prove or disprove if $L_{1}$ is Turing-recognizable and $L_{2}$ is co-Turing-recognizable then $L_{1}\cap L_{2}$ is decidable -- (turing machines computability)
<p>I thought about these languages:
$$L_{1} = A_{TM} = \big\{ \langle M, w \rangle \mid M \text{ is TM and }M \text{ accepts } w \big\}$$
$$L_{2} = \ov... | habedi/stack-exchange-dataset |
95,658 | Can Tug of war problem be solved by DP or greedy approach? | <p>For problem explanation: <a href="https://www.geeksforgeeks.org/tug-of-war/" rel="nofollow noreferrer">https://www.geeksforgeeks.org/tug-of-war/</a></p>

<p>I know the exponential solution to the problem, but can it be improved by greedy or DP approach. If yes then please explain the ideology of the solution... | algorithms dynamic programming greedy algorithms | 1 | Can Tug of war problem be solved by DP or greedy approach? -- (algorithms dynamic programming greedy algorithms)
<p>For problem explanation: <a href="https://www.geeksforgeeks.org/tug-of-war/" rel="nofollow noreferrer">https://www.geeksforgeeks.org/tug-of-war/</a></p>

<p>I know the exponential solution to the ... | habedi/stack-exchange-dataset |
95,664 | Operating System: About user thread and kernel thread? | <p>Is that a "thread" consists of both "user thread" and "kernel thread" as two parts?</p>

<p>And when I create a "thread", is that I create a "user thread" and another "kernel thread" is created "in the background" by OS also?</p>

<p>I'm confused because of the second picture.</p>

<p>The boo... | operating systems | 1 | Operating System: About user thread and kernel thread? -- (operating systems)
<p>Is that a "thread" consists of both "user thread" and "kernel thread" as two parts?</p>

<p>And when I create a "thread", is that I create a "user thread" and another "kernel thread" is created "in the background" by OS also?</p>&#... | habedi/stack-exchange-dataset |
95,665 | String matching | <p>I need to design a data structure to which I can efficiently add new words(Strings) and search for an existing word. Also, the search word can contain <code>.</code> in it which can match any character. For eg. if I add strings "abcd" and "abed" then search for "ab.d" should return me both of them.</p>

<p>I... | algorithms data structures strings string matching | 1 | String matching -- (algorithms data structures strings string matching)
<p>I need to design a data structure to which I can efficiently add new words(Strings) and search for an existing word. Also, the search word can contain <code>.</code> in it which can match any character. For eg. if I add strings "abcd" and "abed"... | habedi/stack-exchange-dataset |
95,671 | Prove that $D =\{x \in \mathbb{N} | \Phi_x(x)\uparrow\}$ is **not** recursively enumerable | <p>So I tried to prove that $D =\{x \in \mathbb{N} | \Phi_x(x)\uparrow\}$ is <strong>not</strong> recursively enumerable in the following way:</p>

<ul>
<li>let's suppose that $g$ is the computable function that represents $D$ $$g(x) = \left\{\begin{array}{rcl} 1 & \mbox{if} & \Phi_x(x)\downarrow\ \... | computability proof techniques | 1 | Prove that $D =\{x \in \mathbb{N} | \Phi_x(x)\uparrow\}$ is **not** recursively enumerable -- (computability proof techniques)
<p>So I tried to prove that $D =\{x \in \mathbb{N} | \Phi_x(x)\uparrow\}$ is <strong>not</strong> recursively enumerable in the following way:</p>

<ul>
<li>let's suppose that $g$ i... | habedi/stack-exchange-dataset |
95,672 | How to distinguish between bits? | <p>I read a <a href="https://www.fiberoptics4sale.com/blogs/archive-posts/95042950-what-is-synchronous-transmission-and-asynchronous-transmission" rel="nofollow noreferrer">post</a> about differences between synchronous and asynchronous transmission modes.<br>
That post has a picture about how bits flows from termi... | computer networks bit manipulation | 1 | How to distinguish between bits? -- (computer networks bit manipulation)
<p>I read a <a href="https://www.fiberoptics4sale.com/blogs/archive-posts/95042950-what-is-synchronous-transmission-and-asynchronous-transmission" rel="nofollow noreferrer">post</a> about differences between synchronous and asynchronous transmissi... | habedi/stack-exchange-dataset |
95,679 | What is the State of The Art of Writer AIs (Deep Learning)? | <blockquote>
 <p>Does anyone know if Deep Learning Bots can already, for example, train
 on many books of an author and output a similar but new book?</p>
</blockquote>

<p>I've been wanting to get into ML for quite a while but was lacking a project to use as an incentive to keep learning, and thi... | machine learning | 1 | What is the State of The Art of Writer AIs (Deep Learning)? -- (machine learning)
<blockquote>
 <p>Does anyone know if Deep Learning Bots can already, for example, train
 on many books of an author and output a similar but new book?</p>
</blockquote>

<p>I've been wanting to get into ML for quite ... | habedi/stack-exchange-dataset |
95,697 | How does computer store non-repeating decimal very accurately? | <p>Maybe it is not accurate at all, but it looks very accurate for me.
I'm making a scientific calculator for my portfolio, and I found an interesting phenomenon. </p>

<p>Because computers store decimals not accurately but approximately, I thought that <strong><em>asin(sin(30rad))</em></strong> wouldn't gi... | floating point | 1 | How does computer store non-repeating decimal very accurately? -- (floating point)
<p>Maybe it is not accurate at all, but it looks very accurate for me.
I'm making a scientific calculator for my portfolio, and I found an interesting phenomenon. </p>

<p>Because computers store decimals not accurately but a... | habedi/stack-exchange-dataset |
95,698 | Finding the maximum substring for which a given predicate is true | <p>Given a string $S$ of length $N$ and a string predicate $F$, find the maximum substring, $s$, such that $F(s) = \text{true}$. Assume that $F$ satisfies the following:</p>

<ul>
<li>If $F(g) = \text{true}$, then any proper sub-string of $g$, above a certain cutoff length $L$, also evaluates true.</li>&#x... | algorithms strings substrings | 1 | Finding the maximum substring for which a given predicate is true -- (algorithms strings substrings)
<p>Given a string $S$ of length $N$ and a string predicate $F$, find the maximum substring, $s$, such that $F(s) = \text{true}$. Assume that $F$ satisfies the following:</p>

<ul>
<li>If $F(g) = \text{true}... | habedi/stack-exchange-dataset |
95,703 | Explanation of implication-introduction rule | <p>I read in Proofs and Types by Girard et alii. the following excerpt that talks about the calculus of natural deduction:</p>

<blockquote>
 <p>Now a sentence at a leaf (of the deduction tree) can be dead, when it
 no longer plays an active part in the proof. Dead sentences are
 obtained by kill... | proof assistants natural deduction | 1 | Explanation of implication-introduction rule -- (proof assistants natural deduction)
<p>I read in Proofs and Types by Girard et alii. the following excerpt that talks about the calculus of natural deduction:</p>

<blockquote>
 <p>Now a sentence at a leaf (of the deduction tree) can be dead, when it
 n... | habedi/stack-exchange-dataset |
95,706 | Median of two sorted arrays of different size in logarithmic time? | <p>The solution given in Cormen is as follows:</p>

<p><a href="https://i.stack.imgur.com/97XXa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/97XXa.png" alt="Median"></a></p>

<p>Reading this solution, the first doubt that comes in my mind is what if the median lies in array B. Acco... | algorithms arrays statistics | 1 | Median of two sorted arrays of different size in logarithmic time? -- (algorithms arrays statistics)
<p>The solution given in Cormen is as follows:</p>

<p><a href="https://i.stack.imgur.com/97XXa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/97XXa.png" alt="Median"></a></p>

<p>Rea... | habedi/stack-exchange-dataset |
95,716 | Obtaining Max-Weight Matching from Max-Weight-Max-Cardinality Matching? | <p>I have a graph with integer-valued edge weights (possibly negative) on which I would like to obtain a maximum-weight matching. </p>

<p>However, I am using python-graph-tool, which only has <a href="https://graph-tool.skewed.de/static/doc/topology.html#graph_tool.topology.max_cardinality_matching" rel="nofol... | algorithms graphs matching | 1 | Obtaining Max-Weight Matching from Max-Weight-Max-Cardinality Matching? -- (algorithms graphs matching)
<p>I have a graph with integer-valued edge weights (possibly negative) on which I would like to obtain a maximum-weight matching. </p>

<p>However, I am using python-graph-tool, which only has <a href="https:... | habedi/stack-exchange-dataset |
95,719 | In certificate view of NL can we force the guesses to be in some format like $a^n b^n c^n d^n$? | <p>In certificate view of NL the size of our guess can be polynomial.Can this guesses be like $a^n b^n c^n d^n$. Can we force the guesses to be in some format? I think it(the format) can be in regex format. can we use $a^n b^n c^n d^n$ format for our guesses?</p>
 | complexity theory space complexity nondeterminism | 1 | In certificate view of NL can we force the guesses to be in some format like $a^n b^n c^n d^n$? -- (complexity theory space complexity nondeterminism)
<p>In certificate view of NL the size of our guess can be polynomial.Can this guesses be like $a^n b^n c^n d^n$. Can we force the guesses to be in some format? I think i... | habedi/stack-exchange-dataset |
95,738 | How to find the optimum solution of Weighted set cover in O(2^n) | <p>A weighted set cover problem is: </p>

<blockquote>
 <p>Given a universe <span class="math-container">$U=\{1,2,...,n\}$</span> and a collection of subsets of <span class="math-container">$U$</span>, <span class="math-container">$\mathcal S=\{S_1,S_2,...,S_m\}$</span>, and a cost function <span class="m... | algorithms complexity theory | 1 | How to find the optimum solution of Weighted set cover in O(2^n) -- (algorithms complexity theory)
<p>A weighted set cover problem is: </p>

<blockquote>
 <p>Given a universe <span class="math-container">$U=\{1,2,...,n\}$</span> and a collection of subsets of <span class="math-container">$U$</span>, <span... | habedi/stack-exchange-dataset |
95,743 | Is the language $a^nwa^n$ regular? | <p>The given description of language is:</p>

<blockquote>
 <p>$\Sigma=\{a,b\}$ and $L=\{a^nwa^n:n\geq 1,w\in\Sigma^*\}$</p>
</blockquote>

<p>I felt its regular as we can always interpret $aabaa$ in string $aaabaaa$ as $w$. That is we can always interpret $a^n(a+b)^*a^n$ as $a(a+b)^*a$. So isn... | regular languages regular expressions | 1 | Is the language $a^nwa^n$ regular? -- (regular languages regular expressions)
<p>The given description of language is:</p>

<blockquote>
 <p>$\Sigma=\{a,b\}$ and $L=\{a^nwa^n:n\geq 1,w\in\Sigma^*\}$</p>
</blockquote>

<p>I felt its regular as we can always interpret $aabaa$ in string $aaabaaa$ ... | habedi/stack-exchange-dataset |
95,757 | Context-free grammar for $L=\{0^n1^{2n} \mid n \geq 0\}$ | <p>How can I express this language $L = \{0^n 1^{2n} \mid n ≥ 0\}$ as a context-free grammar?</p>

<p>I am new to this field and I am not sure what should I do. Please help me.</p>
 | formal languages automata context free formal grammars | 1 | Context-free grammar for $L=\{0^n1^{2n} \mid n \geq 0\}$ -- (formal languages automata context free formal grammars)
<p>How can I express this language $L = \{0^n 1^{2n} \mid n ≥ 0\}$ as a context-free grammar?</p>

<p>I am new to this field and I am not sure what should I do. Please help me.</p>
 | habedi/stack-exchange-dataset |
95,759 | Is "sparse subtree" an appropriate term for what I describe in this question? | <p>Given a tree, with <em>some</em> nodes annotated, such that the annotations form another tree, I'm thinking "sparse subtree" is an appropriate term for describing the latter tree as it relates to the original tree. But I'd like to check with y'all because I plan to use the term in writing for an audience that will i... | terminology trees | 1 | Is "sparse subtree" an appropriate term for what I describe in this question? -- (terminology trees)
<p>Given a tree, with <em>some</em> nodes annotated, such that the annotations form another tree, I'm thinking "sparse subtree" is an appropriate term for describing the latter tree as it relates to the original tree. B... | habedi/stack-exchange-dataset |
95,760 | Determining if given languages are regular or recursively enumerable | <p>I came across following problem:</p>

<blockquote>
 <p>Suppose $L_1$ and $L_2$ are two languages, $M$ is a Turing machine<br>
 $L_1 =\{M|M$ accepts at most 2016 strings$\}$<br>
 $L_2=\{M|M$ accepts at least 2016 strings$\}$<br>
 If $L=L_1\cap L_2$, then which one of the below is correct?<... | formal languages regular languages undecidability semi decidability | 1 | Determining if given languages are regular or recursively enumerable -- (formal languages regular languages undecidability semi decidability)
<p>I came across following problem:</p>

<blockquote>
 <p>Suppose $L_1$ and $L_2$ are two languages, $M$ is a Turing machine<br>
 $L_1 =\{M|M$ accepts at most 2... | habedi/stack-exchange-dataset |
95,772 | Induction on typing derivation in refinement types system | <p>From the text <a href="http://noamz.org/oplss16/refinements-notes.pdf" rel="nofollow noreferrer">Principles of Type Refinement</a> page 14:</p>

<p>The author introduces in definition 2.2.7 the rule:</p>

<p>$$ \dfrac{\Pi \vdash t : R \qquad R \le S}{\Pi \vdash t : S} $$</p>

<p>and gives the... | type theory induction | 1 | Induction on typing derivation in refinement types system -- (type theory induction)
<p>From the text <a href="http://noamz.org/oplss16/refinements-notes.pdf" rel="nofollow noreferrer">Principles of Type Refinement</a> page 14:</p>

<p>The author introduces in definition 2.2.7 the rule:</p>

<p>$$ \dfra... | habedi/stack-exchange-dataset |
95,780 | Context free Grammar for this context free language | <p>How can I create a context free grammar for the language $\{p^2q^mpr^nq^{2n+m}| m,n \ge 0\}$, where $\Sigma = \{p,q,r\}$?</p>
 | regular languages context free | 1 | Context free Grammar for this context free language -- (regular languages context free)
<p>How can I create a context free grammar for the language $\{p^2q^mpr^nq^{2n+m}| m,n \ge 0\}$, where $\Sigma = \{p,q,r\}$?</p>
 | habedi/stack-exchange-dataset |
95,783 | Interpretation of for loop. | <blockquote>
 <p>for every j != i in {0,....,n-1}</p>
</blockquote>

<p>How to interpret this for loop? I never seen this type of definition of for loop. </p>

<p>Is it like - <strong><code>j=0 to n-1; j !=i ; ++j</code></strong></p>
 | programming languages | 1 | Interpretation of for loop. -- (programming languages)
<blockquote>
 <p>for every j != i in {0,....,n-1}</p>
</blockquote>

<p>How to interpret this for loop? I never seen this type of definition of for loop. </p>

<p>Is it like - <strong><code>j=0 to n-1; j !=i ; ++j</code></strong></p>
 | habedi/stack-exchange-dataset |
95,790 | Do any programming languages use general recursive functions as their basis? | <p>This is a naïve and, therefore, possibly malformed question, so apologies in advance!</p>

<p>My view is that a Turing Machine can be seen as the computational basis for procedural/imperative programming languages. Similarly, the lambda calculus is the foundation for functional programming languages.</p>
... | programming languages mathematical foundations church turing thesis | 1 | Do any programming languages use general recursive functions as their basis? -- (programming languages mathematical foundations church turing thesis)
<p>This is a naïve and, therefore, possibly malformed question, so apologies in advance!</p>

<p>My view is that a Turing Machine can be seen as the computational... | habedi/stack-exchange-dataset |
95,798 | Algorithm for implementing the modulus "%" operator? | <p>How can an efficient modulus operator be implemented?</p>

<p>Here's a naive way of defining <code>A % B</code>: </p>

<blockquote>
 <p>given $(a,b) \in \mathbb{Z}$ (represented as <code>int</code>)</p>
 
 <p>while $a > b$ : $(a,b) \mapsto (a-b,b)$</p>
 
 <p>return $a$</p>... | arithmetic floating point integers | 1 | Algorithm for implementing the modulus "%" operator? -- (arithmetic floating point integers)
<p>How can an efficient modulus operator be implemented?</p>

<p>Here's a naive way of defining <code>A % B</code>: </p>

<blockquote>
 <p>given $(a,b) \in \mathbb{Z}$ (represented as <code>int</code>)</p>&... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.