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
71,635
if $f(n)$ is defined in the domain [0,1] then what $f(n) = O(1/n)$ actually means?
<p>We know that $f(n) \in O(g(n))$ notation means shortly, that $f(n) \leq cg(n)$ for $n&gt;n_o$ where n and c are some positive constants. And actually it gives the behavior of $f$ as $n$ goes to infinity.</p>&#xA;&#xA;<p>But in the case $f(n) \in O(\frac{1}{n})$ where n is at most 1, shouldn't be more intuitive to sa...
asymptotics
1
if $f(n)$ is defined in the domain [0,1] then what $f(n) = O(1/n)$ actually means? -- (asymptotics) <p>We know that $f(n) \in O(g(n))$ notation means shortly, that $f(n) \leq cg(n)$ for $n&gt;n_o$ where n and c are some positive constants. And actually it gives the behavior of $f$ as $n$ goes to infinity.</p>&#xA;&#xA;...
habedi/stack-exchange-dataset
71,638
Encoding a tree
<blockquote>&#xA; <p>Let $A$ be an $m \times n$ matrix. Let $F(A,S(t),t)$ be a program function, where $t$ is an integer counter beginning at $0$ and stopping at some $k \leq m,$ and such that $S(0)$ is empty. The function first iterates $t=1$ and then operates on $A$ in such a way that indices for a subset of columns...
data structures dynamic programming
1
Encoding a tree -- (data structures dynamic programming) <blockquote>&#xA; <p>Let $A$ be an $m \times n$ matrix. Let $F(A,S(t),t)$ be a program function, where $t$ is an integer counter beginning at $0$ and stopping at some $k \leq m,$ and such that $S(0)$ is empty. The function first iterates $t=1$ and then operates ...
habedi/stack-exchange-dataset
71,639
if $ b(x) <f(x) \leq g(x)$ where $b, g \in \Theta(x)$ can we state $f(x) \in \Theta(x)?$
<p>I restate the question:&#xA;if $ b(x) &lt;f(x) \leq g(x)$ where $b, g \in \Theta(x)$ can we state $f(x) \in \Theta(x)?$&#xA;notice that $b(x)&lt; f(x)$ and not $b(x) \leq f(x)$.&#xA;In other words what if</p>&#xA;&#xA;<p>$f(x) \in \omega(b(x)) $ and</p>&#xA;&#xA;<p>$f(x) \in O(g(x))$</p>&#xA;&#xA;<p>can we state $f(...
asymptotics
1
if $ b(x) <f(x) \leq g(x)$ where $b, g \in \Theta(x)$ can we state $f(x) \in \Theta(x)?$ -- (asymptotics) <p>I restate the question:&#xA;if $ b(x) &lt;f(x) \leq g(x)$ where $b, g \in \Theta(x)$ can we state $f(x) \in \Theta(x)?$&#xA;notice that $b(x)&lt; f(x)$ and not $b(x) \leq f(x)$.&#xA;In other words what if</p>&#x...
habedi/stack-exchange-dataset
71,648
Why is data in computer science considered to be discrete?
<p>I understand that "structure" of data is totally dependent on Boolean Algebra, but:</p>&#xA;&#xA;<blockquote>&#xA; <p>Why is data considered to be a discrete mathematical entity rather than a continuous one? </p>&#xA;</blockquote>&#xA;&#xA;<p>Related to this:</p>&#xA;&#xA;<blockquote>&#xA; <p>What are the drawback...
data structures mathematical foundations
1
Why is data in computer science considered to be discrete? -- (data structures mathematical foundations) <p>I understand that "structure" of data is totally dependent on Boolean Algebra, but:</p>&#xA;&#xA;<blockquote>&#xA; <p>Why is data considered to be a discrete mathematical entity rather than a continuous one? </p...
habedi/stack-exchange-dataset
71,651
Proving the loop invariant for a simple program in Hoare logic
<p>I was studying loop invariant and came across Tomas Petricek's <a href="https://stackoverflow.com/a/3221583/2448540">example</a>. Here's the equivalent(I believe) program after I revised it a bit for proof in Hoare logic:</p>&#xA;&#xA;<pre><code>j = 9;&#xA;i = 0;&#xA;while (i &lt; 10)&#xA;{&#xA; i = i + 1;&#xA; ...
hoare logic loop invariants check my answer
1
Proving the loop invariant for a simple program in Hoare logic -- (hoare logic loop invariants check my answer) <p>I was studying loop invariant and came across Tomas Petricek's <a href="https://stackoverflow.com/a/3221583/2448540">example</a>. Here's the equivalent(I believe) program after I revised it a bit for proof...
habedi/stack-exchange-dataset
71,652
Non-deterministic Büchi vs Rabin: Automaton size for LTL->automaton
<p>Is there any general result to show that which automaton is more succinct? I have a set of LTL properties and I would like to know (show) which automaton is more efficient in term of state number and edge number.</p>&#xA;
automata linear temporal logic
1
Non-deterministic Büchi vs Rabin: Automaton size for LTL->automaton -- (automata linear temporal logic) <p>Is there any general result to show that which automaton is more succinct? I have a set of LTL properties and I would like to know (show) which automaton is more efficient in term of state number and edge number.<...
habedi/stack-exchange-dataset
71,663
Nominal unification: How this lemma is proved?
<p>I was reading nominal unification paper. I could not understand the proof of a lemma. The paper is here <a href="http://gabbay.org.uk/papers/nomu-jv.pdf" rel="nofollow noreferrer">nominal unification</a>. The lemma is following.&#xA;$\sigma$ is a substitution, $\pi$ is a permutation (swapping of atoms).</p>&#xA;&#x...
proof techniques lambda calculus
1
Nominal unification: How this lemma is proved? -- (proof techniques lambda calculus) <p>I was reading nominal unification paper. I could not understand the proof of a lemma. The paper is here <a href="http://gabbay.org.uk/papers/nomu-jv.pdf" rel="nofollow noreferrer">nominal unification</a>. The lemma is following.&#x...
habedi/stack-exchange-dataset
71,670
Algorithm for finding connected components checking as few edges as possible
<p>Is there a good algorithm to find connected components in undirected graphs with at the lowest possible costs given as the total weight of the edges being checked?</p>&#xA;
graphs weighted graphs connected
1
Algorithm for finding connected components checking as few edges as possible -- (graphs weighted graphs connected) <p>Is there a good algorithm to find connected components in undirected graphs with at the lowest possible costs given as the total weight of the edges being checked?</p>&#xA;
habedi/stack-exchange-dataset
71,673
Algorithms for generating brick walls
<p>I'm not sure which StackExchange community is the correct place to ask this so I'm trying this one.</p>&#xA;&#xA;<p>I want to write a code that generates random brick wall type textures. Similarly to what, for example, this commercial software does: <a href="http://www.vizpark.com/shop/walls-and-tiles/" rel="norefer...
algorithms
1
Algorithms for generating brick walls -- (algorithms) <p>I'm not sure which StackExchange community is the correct place to ask this so I'm trying this one.</p>&#xA;&#xA;<p>I want to write a code that generates random brick wall type textures. Similarly to what, for example, this commercial software does: <a href="http...
habedi/stack-exchange-dataset
71,692
Algorithm for maximizing correspondence between 2 sets
<p>I am trying to figure out how to solve the following problem: I have 2 sets of objects, set A and set B. I have a metric that calculates how closely a given object from set A corresponds to an object from set B. I'd like to maximize the overall correspondence of the entire set.</p>&#xA;&#xA;<p>What I tried first was...
algorithms
1
Algorithm for maximizing correspondence between 2 sets -- (algorithms) <p>I am trying to figure out how to solve the following problem: I have 2 sets of objects, set A and set B. I have a metric that calculates how closely a given object from set A corresponds to an object from set B. I'd like to maximize the overall c...
habedi/stack-exchange-dataset
71,698
Graphs with chromatic number $(\chi(G) \ge 3 )$ other than odd cycle (Triangle free)
<p><a href="http://mathworld.wolfram.com/ChromaticNumber.html" rel="nofollow noreferrer">Chromatic number</a> denoted by $\chi(G)$ of graph $G$ is the minimum number of colours required to properly colour the given graph. </p>&#xA;&#xA;<p>For ODD Cycle chromatic number is 3 and it does not contain triangle as a subgrap...
graphs
1
Graphs with chromatic number $(\chi(G) \ge 3 )$ other than odd cycle (Triangle free) -- (graphs) <p><a href="http://mathworld.wolfram.com/ChromaticNumber.html" rel="nofollow noreferrer">Chromatic number</a> denoted by $\chi(G)$ of graph $G$ is the minimum number of colours required to properly colour the given graph. <...
habedi/stack-exchange-dataset
71,703
Bounded waiting and starvation free in critical section problem
<p>i have 4 question regarding relation between starvation and bounded waiting.</p>&#xA;&#xA;<p>1.Does starvation-freedom imply deadlock-freedom?</p>&#xA;&#xA;<p>My Answer-:</p>&#xA;&#xA;<p>From <a href="https://cs.stackexchange.com/questions/67406/does-deadlock-imply-starvation?noredirect=1&amp;lq=1">here</a>,</p>&#x...
operating systems synchronization deadlocks critical section
1
Bounded waiting and starvation free in critical section problem -- (operating systems synchronization deadlocks critical section) <p>i have 4 question regarding relation between starvation and bounded waiting.</p>&#xA;&#xA;<p>1.Does starvation-freedom imply deadlock-freedom?</p>&#xA;&#xA;<p>My Answer-:</p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
71,709
Is P = NP when solutions length is polynomially bounded by instance length?
<p>I'm currently reading the book "<em>P, NP, and NP-Completeness</em>" by Oded Goldreich. I'm currently reading a chapter that's concerned with the "search version" of the P-vs-NP-problem, that is if finding solutions is harder than checking the validity of solutions.</p>&#xA;&#xA;<p>First, the book defines "polynomia...
complexity theory p vs np search problem
1
Is P = NP when solutions length is polynomially bounded by instance length? -- (complexity theory p vs np search problem) <p>I'm currently reading the book "<em>P, NP, and NP-Completeness</em>" by Oded Goldreich. I'm currently reading a chapter that's concerned with the "search version" of the P-vs-NP-problem, that is ...
habedi/stack-exchange-dataset
71,711
CFG for a rather complex language
<p>I'm trying to construct a context free grammar for the language $\{a^ib^j:2i\neq3j+1\}$. I found that when $j$ is even, there are no problems. When $j$ is odd, there are some constraints on $i$. Now these are some examples of words that may NOT be parsed by the CFG:</p>&#xA;&#xA;<ul>&#xA;<li>aab</li>&#xA;<li>aaaaabb...
context free pushdown automata
1
CFG for a rather complex language -- (context free pushdown automata) <p>I'm trying to construct a context free grammar for the language $\{a^ib^j:2i\neq3j+1\}$. I found that when $j$ is even, there are no problems. When $j$ is odd, there are some constraints on $i$. Now these are some examples of words that may NOT be...
habedi/stack-exchange-dataset
71,720
Lemma 2 in Knuth's "Notes on Open Addressing"
<p>I'm trying to read Knuth's <a href="http://jeffe.cs.illinois.edu/teaching/datastructures/notes/knuth-OALP.pdf" rel="nofollow noreferrer"><em>Notes on Open Addressing</em></a>, and I don't quite follow the proof of Lemma 2. </p>&#xA;&#xA;<p><strong>The set-up</strong>&#xA;We're thinking about hashing $k - 1$ keys int...
hashing
1
Lemma 2 in Knuth's "Notes on Open Addressing" -- (hashing) <p>I'm trying to read Knuth's <a href="http://jeffe.cs.illinois.edu/teaching/datastructures/notes/knuth-OALP.pdf" rel="nofollow noreferrer"><em>Notes on Open Addressing</em></a>, and I don't quite follow the proof of Lemma 2. </p>&#xA;&#xA;<p><strong>The set-up...
habedi/stack-exchange-dataset
71,727
Speculating big O for a binary tree
<p>I have a binary tree with $n$ nodes. The tree is <strong>not</strong> necessarily balanced. </p>&#xA;&#xA;<p>For each node of the tree, I count down the total number of the nodes for its left sub-tree as $n_L$ and then I count down the total number of the nodes for its right sub-tree as $n_R$. Then I calculate $\min...
binary trees
1
Speculating big O for a binary tree -- (binary trees) <p>I have a binary tree with $n$ nodes. The tree is <strong>not</strong> necessarily balanced. </p>&#xA;&#xA;<p>For each node of the tree, I count down the total number of the nodes for its left sub-tree as $n_L$ and then I count down the total number of the nodes f...
habedi/stack-exchange-dataset
71,731
is size of maximum matching less than that of maximum k-parity k-set packing?
<p>My application problem can be modeled as maximum k-parity k-set packing problem, which is NP-hard. I know that maximum matching is polynomial time, hence I want to reduce k-parity k-set packing into bipartite maximum matching. I am wondering if there is any relation between their size.</p>&#xA;&#xA;<p><strong>Maximu...
complexity theory graphs approximation
1
is size of maximum matching less than that of maximum k-parity k-set packing? -- (complexity theory graphs approximation) <p>My application problem can be modeled as maximum k-parity k-set packing problem, which is NP-hard. I know that maximum matching is polynomial time, hence I want to reduce k-parity k-set packing i...
habedi/stack-exchange-dataset
71,733
Meaning of double colon $::$
<p>I've came across this expression regarding function composition in some notes by people from computer science, and I don't know what the notation "$::$" means.</p>&#xA;&#xA;<p>\begin{equation}&#xA;g \circ f : A \rightarrow C :: a \mapsto g(f(a))&#xA;\end{equation}</p>&#xA;&#xA;<p>I get what this expression is trying...
notation
1
Meaning of double colon $::$ -- (notation) <p>I've came across this expression regarding function composition in some notes by people from computer science, and I don't know what the notation "$::$" means.</p>&#xA;&#xA;<p>\begin{equation}&#xA;g \circ f : A \rightarrow C :: a \mapsto g(f(a))&#xA;\end{equation}</p>&#xA;&...
habedi/stack-exchange-dataset
71,734
"strongly relational m-consistency when the domains contain at most m elements implies satisfiability" plain wrong?
<p><a href="https://en.wikipedia.org/wiki/Local_consistency#Relational_consistency_and_satisfiability" rel="nofollow noreferrer">Wikipedia</a> states</p>&#xA;&#xA;<blockquote>&#xA; <p>A constraint satisfaction problem may be relationally consistent, have&#xA; no empty domain or unsatisfiable constraint, and yet be un...
satisfiability constraint satisfaction
1
"strongly relational m-consistency when the domains contain at most m elements implies satisfiability" plain wrong? -- (satisfiability constraint satisfaction) <p><a href="https://en.wikipedia.org/wiki/Local_consistency#Relational_consistency_and_satisfiability" rel="nofollow noreferrer">Wikipedia</a> states</p>&#xA;&#...
habedi/stack-exchange-dataset
71,737
Meaning of Steve Wozniak's epiphany on register addition/subtraction in 1975?
<p>I just finished reading Walter Isaacson's <em>Innovators</em> and on page 350 there is a quote from Steve Wozniak recalling things he learned from the March 1975 Homebrew Computer Club meeting:</p>&#xA;&#xA;<blockquote>&#xA; <p>A person at the meeting passed around the specification sheet for the new Intel micropro...
complexity theory computer architecture
1
Meaning of Steve Wozniak's epiphany on register addition/subtraction in 1975? -- (complexity theory computer architecture) <p>I just finished reading Walter Isaacson's <em>Innovators</em> and on page 350 there is a quote from Steve Wozniak recalling things he learned from the March 1975 Homebrew Computer Club meeting:<...
habedi/stack-exchange-dataset
71,761
Runtime of sorting a partially-sorted array
<p>I have an array of $n$ items which is partially sorted like below:</p>&#xA;&#xA;<p>$$A[i]\le{A[i+k]}$$ </p>&#xA;&#xA;<p>where:</p>&#xA;&#xA;<p>$$i=1,2,...,n-k$$</p>&#xA;&#xA;<p>For sorting the array completely, I wonder what the runtime big O is. </p>&#xA;&#xA;<p>I feel only an array of size $k$ needs to be sorted. ...
algorithms data structures sorting arrays
1
Runtime of sorting a partially-sorted array -- (algorithms data structures sorting arrays) <p>I have an array of $n$ items which is partially sorted like below:</p>&#xA;&#xA;<p>$$A[i]\le{A[i+k]}$$ </p>&#xA;&#xA;<p>where:</p>&#xA;&#xA;<p>$$i=1,2,...,n-k$$</p>&#xA;&#xA;<p>For sorting the array completely, I wonder what t...
habedi/stack-exchange-dataset
71,771
why is H = {www | w ∊ (0,1)* } not regular language
<p>I know pumping lemma and also know how to prove if languages are not regular or are regular using proof by contradiction methodology. But I am stuck on this one.Especially, I don't know exact string it produces. </p>&#xA;&#xA;<p>$$ H = \{www \mid w ∊ (0,1)^* \} $$ </p>&#xA;&#xA;<p>How do I prove this is not regula...
computability pumping lemma
1
why is H = {www | w ∊ (0,1)* } not regular language -- (computability pumping lemma) <p>I know pumping lemma and also know how to prove if languages are not regular or are regular using proof by contradiction methodology. But I am stuck on this one.Especially, I don't know exact string it produces. </p>&#xA;&#xA;<p>$...
habedi/stack-exchange-dataset
71,772
$L$ is decidable. Prove that "similar" language is also decidable
<p>Assume that $L$ is decidable. Is the following language decidable? $$ L' = \{w | \text{ there is } u \in L \text{ such that u and w are equal to at most two positions.}\}$$</p>&#xA;&#xA;<p>For example, let $u=abcd$. The following words are equal to $u$ at most two positions: $\{aba, agg, ab, zzz, dsa, ...\}$, but no...
complexity theory computability turing machines automata
1
$L$ is decidable. Prove that "similar" language is also decidable -- (complexity theory computability turing machines automata) <p>Assume that $L$ is decidable. Is the following language decidable? $$ L' = \{w | \text{ there is } u \in L \text{ such that u and w are equal to at most two positions.}\}$$</p>&#xA;&#xA;<p>...
habedi/stack-exchange-dataset
71,776
Absorption Law Proof by Algebra
<p>I'm struggling to understand the absorption law proof and I hope maybe you could help me out.</p>&#xA;&#xA;<p>The absorption law states that: $X + XY = X$<br>&#xA;Which is equivalent to $(X \cdot 1) + (XY) = X$</p>&#xA;&#xA;<p>No problem yet, it's this next step that stumps me. How can I apply the distributive law w...
boolean algebra
1
Absorption Law Proof by Algebra -- (boolean algebra) <p>I'm struggling to understand the absorption law proof and I hope maybe you could help me out.</p>&#xA;&#xA;<p>The absorption law states that: $X + XY = X$<br>&#xA;Which is equivalent to $(X \cdot 1) + (XY) = X$</p>&#xA;&#xA;<p>No problem yet, it's this next step t...
habedi/stack-exchange-dataset
71,795
Proving that $\mathrm{SPACE}(o(\log\log n)) = \mathrm{SPACE}(O(1))$?
<p>It is known that $\mathrm{SPACE}(o(\log \log n)) = \mathrm{SPACE}(O(1))$ (see e.g. these <a href="http://www.cs.jhu.edu/~scheideler/courses/600.471_S05/lecture_3.ps" rel="noreferrer">lecture notes</a> by Christian Scheideler).</p>&#xA;&#xA;<p>One inclusion is trivial, so I'm trying to show that $\mathrm{SPACE}(o(\lo...
complexity theory space complexity
1
Proving that $\mathrm{SPACE}(o(\log\log n)) = \mathrm{SPACE}(O(1))$? -- (complexity theory space complexity) <p>It is known that $\mathrm{SPACE}(o(\log \log n)) = \mathrm{SPACE}(O(1))$ (see e.g. these <a href="http://www.cs.jhu.edu/~scheideler/courses/600.471_S05/lecture_3.ps" rel="noreferrer">lecture notes</a> by Chri...
habedi/stack-exchange-dataset
71,803
Regular expression generating the language $L=\{w: |w|\le 5\}$
<p>Im trying to find a regular expression to generate the language that has words with length at most 5, over $\Sigma =\{0,1\}$&#xA;How can i represent the at most ? I know i can do it if ill just write all the $2^5$ possibilties with 'or' between them. But it seem to me not the right way.&#xA;Is it even possible to re...
computability regular languages finite automata
1
Regular expression generating the language $L=\{w: |w|\le 5\}$ -- (computability regular languages finite automata) <p>Im trying to find a regular expression to generate the language that has words with length at most 5, over $\Sigma =\{0,1\}$&#xA;How can i represent the at most ? I know i can do it if ill just write a...
habedi/stack-exchange-dataset
71,829
Low-level shift operator implementation
<p>I want a shift operator for an architecture that implements boxing. Basically, the high-level constructs represent integers as 31 bits followed by 1 bit set to one as a tag (so to represent binary int i I use instead 2i+1). Let's denote the box representation as $[[\cdot]]$, then I was able to make the following ded...
compilers integers
1
Low-level shift operator implementation -- (compilers integers) <p>I want a shift operator for an architecture that implements boxing. Basically, the high-level constructs represent integers as 31 bits followed by 1 bit set to one as a tag (so to represent binary int i I use instead 2i+1). Let's denote the box represen...
habedi/stack-exchange-dataset
71,842
Upper bound and lower bound of a custom function T(n)
<p>Assume a function $T(n)$:&#xA;$$T(n)=\log{\log^{*}{n}}$$&#xA;Let's define:&#xA;$$\log^{*}{n}=\min\{i\ge{0}:\log^{(i)}{n}\le1\}$$&#xA;and:&#xA;$$\log^{(i)}{n}=\log{(\log^{(i-1)}{n})}$$&#xA;Is the following $f(n)$ function an upper bound or a lower bound of $T(n)$?&#xA;$$f(n)=\log^{*}{\log{n}}$$</p>&#xA;&#xA;<hr>&#xA;...
algorithms data structures asymptotics
1
Upper bound and lower bound of a custom function T(n) -- (algorithms data structures asymptotics) <p>Assume a function $T(n)$:&#xA;$$T(n)=\log{\log^{*}{n}}$$&#xA;Let's define:&#xA;$$\log^{*}{n}=\min\{i\ge{0}:\log^{(i)}{n}\le1\}$$&#xA;and:&#xA;$$\log^{(i)}{n}=\log{(\log^{(i-1)}{n})}$$&#xA;Is the following $f(n)$ functio...
habedi/stack-exchange-dataset
71,846
Example of inductive sets that are neither least nor greatest fixed point
<p>Do there exist a set of inductive rules and a fixed point of these rules but is neither the least nor the greatest fixed points?</p>&#xA;
logic inductive datatypes
1
Example of inductive sets that are neither least nor greatest fixed point -- (logic inductive datatypes) <p>Do there exist a set of inductive rules and a fixed point of these rules but is neither the least nor the greatest fixed points?</p>&#xA;
habedi/stack-exchange-dataset
71,871
Efficiently determine relative ordering between two elements in a PO-set
<p>What algorithms/heuristics exist for efficiently determining the relative order between two elements in a partially ordered set? </p>&#xA;&#xA;<p>In my case, the PO-set is stored as a directed acyclic graph where an edge is an <code>happened before</code> relation and I am streaming live data into this PO-set. Nodes...
sorting partial order
1
Efficiently determine relative ordering between two elements in a PO-set -- (sorting partial order) <p>What algorithms/heuristics exist for efficiently determining the relative order between two elements in a partially ordered set? </p>&#xA;&#xA;<p>In my case, the PO-set is stored as a directed acyclic graph where an e...
habedi/stack-exchange-dataset
71,885
Understanding context free grammars in conjunction with PDA
<p>I have read TONS of articles about context free grammars and Pushdown Automata but I think there are things that I dont seem to understand. I am not studying computer science but I am really interested in many of the topics and I hope you can help me realign my knowledge about the CFG and PDA.</p>&#xA;&#xA;<p><stron...
context free pushdown automata parsers
1
Understanding context free grammars in conjunction with PDA -- (context free pushdown automata parsers) <p>I have read TONS of articles about context free grammars and Pushdown Automata but I think there are things that I dont seem to understand. I am not studying computer science but I am really interested in many of ...
habedi/stack-exchange-dataset
71,886
Sum of 2^Pi mod 1000000007 for all i where Pi is sum of numbers in ith subset of a set X
<p>I am stuck on a problem in which I have to print <strong>sum of 2<sup>P<sub>i</sub></sup> mod 1000000007</strong> for all <strong>i</strong> where <strong>P<sub>i</sub></strong> is sum of numbers in <strong>i</strong>th <strong>subset</strong> of a <strong>set X</strong>.<br><br></p>&#xA;&#xA;<p><strong>Length of s...
discrete mathematics sets
1
Sum of 2^Pi mod 1000000007 for all i where Pi is sum of numbers in ith subset of a set X -- (discrete mathematics sets) <p>I am stuck on a problem in which I have to print <strong>sum of 2<sup>P<sub>i</sub></sup> mod 1000000007</strong> for all <strong>i</strong> where <strong>P<sub>i</sub></strong> is sum of numbers ...
habedi/stack-exchange-dataset
71,892
Is repetition the origin of countability?
<p>The original question was "Do all non-regular languages have an uncountable number of strings?". </p>&#xA;&#xA;<p>How can someone prove that..? I am squeezing my head but I can't figure it out. </p>&#xA;&#xA;<p>And the other side of the coin: is a language always regular, if it has a countably infinite number of str...
regular languages finite automata uncountability
1
Is repetition the origin of countability? -- (regular languages finite automata uncountability) <p>The original question was "Do all non-regular languages have an uncountable number of strings?". </p>&#xA;&#xA;<p>How can someone prove that..? I am squeezing my head but I can't figure it out. </p>&#xA;&#xA;<p>And the ot...
habedi/stack-exchange-dataset
71,910
parsing left linear CF grammars
<p>In <strong>Introduction to Formal Languages</strong> by <em>György E. Révész</em> a polynomial time algorithm that can convert a left linear grammar to a right linear one is presented. </p>&#xA;&#xA;<p>Trying to understand when it is useful I read that <em>left linear grammars</em> are generally harder to parse than...
formal languages formal grammars
1
parsing left linear CF grammars -- (formal languages formal grammars) <p>In <strong>Introduction to Formal Languages</strong> by <em>György E. Révész</em> a polynomial time algorithm that can convert a left linear grammar to a right linear one is presented. </p>&#xA;&#xA;<p>Trying to understand when it is useful I read...
habedi/stack-exchange-dataset
71,912
Computing tree alignment distance
<p>I am implementing the dynamic programming algorithm for computing tree alignment distance as described in "<a href="http://www.sciencedirect.com/science/article/pii/0304397595800299" rel="nofollow noreferrer">Alignment of trees — an alternative to tree edit</a>". But I got stuck in lemma 3 on page 141 (page 5 of pdf...
algorithms trees dynamic programming
1
Computing tree alignment distance -- (algorithms trees dynamic programming) <p>I am implementing the dynamic programming algorithm for computing tree alignment distance as described in "<a href="http://www.sciencedirect.com/science/article/pii/0304397595800299" rel="nofollow noreferrer">Alignment of trees — an alternat...
habedi/stack-exchange-dataset
71,916
Formally proving properties of fold function
<p>Recall the fold function for lists:</p>&#xA;&#xA;<p>$fold(f,z,[x,xs]) = fold(f,f(z,x),xs)$</p>&#xA;&#xA;<p>$fold(f,z,[]) = z$</p>&#xA;&#xA;<p>I want to formally proof that if $f$ is associative, commutative and idempotent (meaning $f(x,y) = f(x,f(x,y))$ and we have to lists $l_1$ and $l_2$ such that their contents ...
functional programming first order logic software verification
1
Formally proving properties of fold function -- (functional programming first order logic software verification) <p>Recall the fold function for lists:</p>&#xA;&#xA;<p>$fold(f,z,[x,xs]) = fold(f,f(z,x),xs)$</p>&#xA;&#xA;<p>$fold(f,z,[]) = z$</p>&#xA;&#xA;<p>I want to formally proof that if $f$ is associative, commutati...
habedi/stack-exchange-dataset
71,948
Is there a language for which any string (that works) can be shown to not be pumped using the Pumping Lemma?
<p>Of course, whenever the Pumping Lemma for Regular Languages (or CFLs) is applied to a language $L$, only a single string $w \in L$ and $|w| \ge p$ needs to be picked (to eventually show that $w$, when pumped, leaves the language).</p>&#xA;&#xA;<p>Is there a non-regular (or non-context-free) language $L$ for which <e...
formal languages pumping lemma
1
Is there a language for which any string (that works) can be shown to not be pumped using the Pumping Lemma? -- (formal languages pumping lemma) <p>Of course, whenever the Pumping Lemma for Regular Languages (or CFLs) is applied to a language $L$, only a single string $w \in L$ and $|w| \ge p$ needs to be picked (to ev...
habedi/stack-exchange-dataset
71,954
What does "Outstanding" mean in the context of architecture?
<p>I'm taking an Advanced Computer Architecture course and I've come across the term &quot;outstanding&quot; a few times and I've searched online about what it means in the context of computer science/architecture but I can't find anything relevant. For example, on my notes there are some references such as:</p>&#xA;<b...
computer architecture
1
What does "Outstanding" mean in the context of architecture? -- (computer architecture) <p>I'm taking an Advanced Computer Architecture course and I've come across the term &quot;outstanding&quot; a few times and I've searched online about what it means in the context of computer science/architecture but I can't find a...
habedi/stack-exchange-dataset
71,962
Why are there only 2^i configurations?
<p>In the proof of TQBF-complete, it says if the input size is i, then the TM for the input has at most 2^i numbers of configuration. Can someone explain why?&#xA;The proof is from: <a href="http://zoo.cs.yale.edu/classes/cs468/fall12/TQBF-complete.pdf" rel="nofollow noreferrer">http://zoo.cs.yale.edu/classes/cs468/fal...
turing machines
1
Why are there only 2^i configurations? -- (turing machines) <p>In the proof of TQBF-complete, it says if the input size is i, then the TM for the input has at most 2^i numbers of configuration. Can someone explain why?&#xA;The proof is from: <a href="http://zoo.cs.yale.edu/classes/cs468/fall12/TQBF-complete.pdf" rel="n...
habedi/stack-exchange-dataset
71,963
Construct a DAG using Tarjan
<p>This is a question related to a homework assignment so I guess I'm asking for hints, if that's ok? Basically, I'm wondering if there is some way to use Tarjan to compress the nodes in every SCC found into one single node, essentially producing a DAG. The problem I'm faced with is that every SCC is obtained as a set ...
graphs dag
1
Construct a DAG using Tarjan -- (graphs dag) <p>This is a question related to a homework assignment so I guess I'm asking for hints, if that's ok? Basically, I'm wondering if there is some way to use Tarjan to compress the nodes in every SCC found into one single node, essentially producing a DAG. The problem I'm faced...
habedi/stack-exchange-dataset
71,964
Proof that a language is not regular
<p>as part of my homework assignment I have to proof that the following language is not regular using the pumping lemma:</p>&#xA;&#xA;<p>$L = \{w\in \{a,b,c\}^* \; | \enspace z(a,w) = z(b,w) + z(c,w)\}$</p>&#xA;&#xA;<p>The function $z(x,w)$ denotes the number of symbols $x$ in word $w$.</p>&#xA;&#xA;<p>I started my pro...
formal languages pumping lemma
1
Proof that a language is not regular -- (formal languages pumping lemma) <p>as part of my homework assignment I have to proof that the following language is not regular using the pumping lemma:</p>&#xA;&#xA;<p>$L = \{w\in \{a,b,c\}^* \; | \enspace z(a,w) = z(b,w) + z(c,w)\}$</p>&#xA;&#xA;<p>The function $z(x,w)$ denote...
habedi/stack-exchange-dataset
71,979
Why are some programming languages "faster" or "slower" than others?
<p>I have noticed that some applications or algorithms that are built on a programming language, say C++/Rust run faster or snappier than those built on say, Java/Node.js, running on the same machine. I have a few question regarding this:</p>&#xA;&#xA;<ol>&#xA;<li>Why does this happen?</li>&#xA;<li>What governs the "sp...
programming languages compilers
1
Why are some programming languages "faster" or "slower" than others? -- (programming languages compilers) <p>I have noticed that some applications or algorithms that are built on a programming language, say C++/Rust run faster or snappier than those built on say, Java/Node.js, running on the same machine. I have a few ...
habedi/stack-exchange-dataset
71,981
Do we need to read the input completely in Turing machine?
<p>This question is motivated from the question <a href="https://cs.stackexchange.com/questions/71795/proving-that-mathrmspaceo-log-log-n-mathrmspaceo1">$\mathrm{SPACE}(o(\log\log n)) = \mathrm{SPACE}(O(1))$</a>. I am wondering, how is it possible to decide a language without reading the entire input. I have seen the ...
turing machines
1
Do we need to read the input completely in Turing machine? -- (turing machines) <p>This question is motivated from the question <a href="https://cs.stackexchange.com/questions/71795/proving-that-mathrmspaceo-log-log-n-mathrmspaceo1">$\mathrm{SPACE}(o(\log\log n)) = \mathrm{SPACE}(O(1))$</a>. I am wondering, how is it ...
habedi/stack-exchange-dataset
71,983
Maximum One Third Cut
<p>I want to solve the following problem (This is a homework problem. Not looking for definite or complete answers):<br/><br/>&#xA;<strong>Maximum One Third Cut:</strong></p>&#xA;&#xA;<ul>&#xA;<li><strong>Input:</strong> An undirected graph <em>G=(V,E)</em> where <em>V={1,2,...,n}</em>, such that <em>|V|</em> is divisi...
algorithms graphs weighted graphs max cut
1
Maximum One Third Cut -- (algorithms graphs weighted graphs max cut) <p>I want to solve the following problem (This is a homework problem. Not looking for definite or complete answers):<br/><br/>&#xA;<strong>Maximum One Third Cut:</strong></p>&#xA;&#xA;<ul>&#xA;<li><strong>Input:</strong> An undirected graph <em>G=(V,E...
habedi/stack-exchange-dataset
71,985
Row Major Vs Column Major Order: 2D arrays access in programming languages
<p>Programmers prefer accessing a 2D array in <strong>Row-Major Order</strong> rather than <strong>Column-Major Order</strong>, Why?</p>&#xA;&#xA;<p>Are there some advantages/benefits of accessing a 2D array in row-major as compare to column-major?</p>&#xA;&#xA;<p>Like in C programming, programmers prefer row-major rat...
computer architecture arrays memory management memory access memory allocation
1
Row Major Vs Column Major Order: 2D arrays access in programming languages -- (computer architecture arrays memory management memory access memory allocation) <p>Programmers prefer accessing a 2D array in <strong>Row-Major Order</strong> rather than <strong>Column-Major Order</strong>, Why?</p>&#xA;&#xA;<p>Are there so...
habedi/stack-exchange-dataset
71,998
Rotation matrix between two objects - alignment
<p>I am trying to align two objects based on the notion of points and their correspondence, but struggling to find a solution.</p>&#xA;&#xA;<p>I have two objects A and B. However, they are rotated in a different direction, and therefore I would like them to align. I have a notion of some correspondence between the poin...
graphics
1
Rotation matrix between two objects - alignment -- (graphics) <p>I am trying to align two objects based on the notion of points and their correspondence, but struggling to find a solution.</p>&#xA;&#xA;<p>I have two objects A and B. However, they are rotated in a different direction, and therefore I would like them to ...
habedi/stack-exchange-dataset
72,004
Error in simple mode finding algorithm?
<p>I'm working through a few chapters on algorithms from the Discrete Math text by Rosen.</p>&#xA;&#xA;<p>In the solutions manual there is an algorithm (specified in pseudocode) for finding the mode within a list of non-decreasing integers.</p>&#xA;&#xA;<p>Here is the algorithm:</p>&#xA;&#xA;<pre><code>procedure find a...
algorithms
1
Error in simple mode finding algorithm? -- (algorithms) <p>I'm working through a few chapters on algorithms from the Discrete Math text by Rosen.</p>&#xA;&#xA;<p>In the solutions manual there is an algorithm (specified in pseudocode) for finding the mode within a list of non-decreasing integers.</p>&#xA;&#xA;<p>Here is...
habedi/stack-exchange-dataset
72,014
What cannot be proven at compile-time about a computer program?
<p>Is there a Turing-Complete-ish programming language without runtime errors? Like segmentation faults, memory leaks, race conditions, deadlock/livelock/starvation, etc.? With strongly typed languages, the compiler can detect null pointer exceptions and refuse to compile code. How much can we statically check? Everyth...
programming languages type theory
1
What cannot be proven at compile-time about a computer program? -- (programming languages type theory) <p>Is there a Turing-Complete-ish programming language without runtime errors? Like segmentation faults, memory leaks, race conditions, deadlock/livelock/starvation, etc.? With strongly typed languages, the compiler c...
habedi/stack-exchange-dataset
72,023
Identifying a starting point for maximum coverage
<p>I have 10,000 sequentially numbered items I wish to characterize. For each item, I created a list of the other items I think might have a similar characteristic.</p>&#xA;&#xA;<p>i.e. </p>&#xA;&#xA;<pre><code>Item 1: [2,4,7,8,9,...,9489] (list contains 250 items)&#xA;Item 2: [1,4,13,23,...,9424] (list contains 12 ite...
algorithms
1
Identifying a starting point for maximum coverage -- (algorithms) <p>I have 10,000 sequentially numbered items I wish to characterize. For each item, I created a list of the other items I think might have a similar characteristic.</p>&#xA;&#xA;<p>i.e. </p>&#xA;&#xA;<pre><code>Item 1: [2,4,7,8,9,...,9489] (list contains...
habedi/stack-exchange-dataset
72,032
DAG with modulo 3 restrictions
<p>Consider the following problem.</p>&#xA;&#xA;<p>The input is a Directed Acyclic Graph. Each vertex $v_i$ may have exactly 0 or 2 incoming edges with associated vertices $v_{i1}$ and $v_{i2}$. If it has 0 incoming edges, it is considered an <em>input vertex</em>. The input of the problem specifies with each input ver...
algorithms graphs
1
DAG with modulo 3 restrictions -- (algorithms graphs) <p>Consider the following problem.</p>&#xA;&#xA;<p>The input is a Directed Acyclic Graph. Each vertex $v_i$ may have exactly 0 or 2 incoming edges with associated vertices $v_{i1}$ and $v_{i2}$. If it has 0 incoming edges, it is considered an <em>input vertex</em>. ...
habedi/stack-exchange-dataset
72,033
Proof of decidability of determining whether a DFA accepts a string
<p>I want to ask the acceptance problem: &#xA;Whether a particular deterministic finite automaton accepts a given string can be expressed as a language, <span class="math-container">$A_{DFA}$</span>.&#xA;Show <span class="math-container">$A_{DFA}$</span> is decidable.&#xA;The proof in the textbook (Siper page 195) uses...
turing machines computability finite automata
1
Proof of decidability of determining whether a DFA accepts a string -- (turing machines computability finite automata) <p>I want to ask the acceptance problem: &#xA;Whether a particular deterministic finite automaton accepts a given string can be expressed as a language, <span class="math-container">$A_{DFA}$</span>.&#...
habedi/stack-exchange-dataset
72,038
Find $f\colon \Bbb{N}\to\Bbb{N}$ such that $f = n^{o(1)}$ and for every $c\in\Bbb{N}$, $f(n)=\omega(\log^c n)$
<p>Find $f\colon \Bbb{N}\to\Bbb{N}$ such that $f = n^{o(1)}$ and for every $c\in\Bbb{N}$, $f(n)=\omega(\log^c n)$.</p>&#xA;&#xA;<p>It looks like I need to find a very small growing function $g$ that will satisfy &#xA;$$\lim_{n\to{\infty}} \frac{1}{g} = 0 $$&#xA;and also &#xA;$$\lim_{n\to{\infty}} \frac{\log^cn}{n^{\fra...
asymptotics
1
Find $f\colon \Bbb{N}\to\Bbb{N}$ such that $f = n^{o(1)}$ and for every $c\in\Bbb{N}$, $f(n)=\omega(\log^c n)$ -- (asymptotics) <p>Find $f\colon \Bbb{N}\to\Bbb{N}$ such that $f = n^{o(1)}$ and for every $c\in\Bbb{N}$, $f(n)=\omega(\log^c n)$.</p>&#xA;&#xA;<p>It looks like I need to find a very small growing function $g...
habedi/stack-exchange-dataset
72,043
Understanding a formula on article
<p>I just read an article "Statistical approach for figurative sentiment analysis on Social Networking Services: a case study on Twitter", which provide an algorithm to analyze tweets, and this article includes 2 formulas which I don't really understand.</p>&#xA;&#xA;<p><a href="https://www.researchgate.net/profile/Ho...
algorithms algorithm analysis
1
Understanding a formula on article -- (algorithms algorithm analysis) <p>I just read an article "Statistical approach for figurative sentiment analysis on Social Networking Services: a case study on Twitter", which provide an algorithm to analyze tweets, and this article includes 2 formulas which I don't really unders...
habedi/stack-exchange-dataset
72,048
What is the current status of parallel or concurrent programs in the Curry-Howard isomorphism?
<p>In Girard's <em>Proofs and Types</em> we can read :</p>&#xA;&#xA;<blockquote>&#xA; <p>From an algorithmic viewpoint, the sequent calculus has no&#xA; Curry-Howard isomorphism, because of the multitude of ways of writing&#xA; the same proof. This prevents us from using it as a typed $\lambda$-calculus,&#xA; altho...
reference request logic parallel computing
1
What is the current status of parallel or concurrent programs in the Curry-Howard isomorphism? -- (reference request logic parallel computing) <p>In Girard's <em>Proofs and Types</em> we can read :</p>&#xA;&#xA;<blockquote>&#xA; <p>From an algorithmic viewpoint, the sequent calculus has no&#xA; Curry-Howard isomorphi...
habedi/stack-exchange-dataset
72,050
Do networking ports come from "port-mapped I/O"?
<p>Do networking ports come from "port-mapped I/O"?</p>&#xA;&#xA;<p>I was watching a hardware basic video by Brian Will:</p>&#xA;&#xA;<p><a href="https://www.youtube.com/watch?v=9-KUm9YpPm0" rel="nofollow noreferrer">https://www.youtube.com/watch?v=9-KUm9YpPm0</a></p>&#xA;&#xA;<p>And they brought up this concept at 18:...
operating systems computer networks
1
Do networking ports come from "port-mapped I/O"? -- (operating systems computer networks) <p>Do networking ports come from "port-mapped I/O"?</p>&#xA;&#xA;<p>I was watching a hardware basic video by Brian Will:</p>&#xA;&#xA;<p><a href="https://www.youtube.com/watch?v=9-KUm9YpPm0" rel="nofollow noreferrer">https://www.y...
habedi/stack-exchange-dataset
72,062
Calculate the average Big O from a function?
<p>I was given this function: $T(N) = 3N\log^2 N + 5N^2\log N + \log N + 17N + 2$ and was asked to find the average Big O complexity.</p>&#xA;&#xA;<p>If the Big(O) deals with an upper bound, would this algorithm be $O(N^2\log N)$ on average? But, because Big O is an upper bound, couldn't this also be $O(N^3)$, $O(N^4)$...
asymptotics
1
Calculate the average Big O from a function? -- (asymptotics) <p>I was given this function: $T(N) = 3N\log^2 N + 5N^2\log N + \log N + 17N + 2$ and was asked to find the average Big O complexity.</p>&#xA;&#xA;<p>If the Big(O) deals with an upper bound, would this algorithm be $O(N^2\log N)$ on average? But, because Big...
habedi/stack-exchange-dataset
72,063
Of monotone formulas and same ones satisfying certain properties
<p>There is the following theoretical computer science, namely:</p>&#xA;&#xA;<blockquote>&#xA; <p>For a particular monotone formula $M$ of size $n$, there's an equivalent formula of depth $\text{O}(\text{ln}\,n)$.</p>&#xA;</blockquote>&#xA;&#xA;<p>(I am reading the original paper in my library, if I have time later I ...
complexity theory intuition
1
Of monotone formulas and same ones satisfying certain properties -- (complexity theory intuition) <p>There is the following theoretical computer science, namely:</p>&#xA;&#xA;<blockquote>&#xA; <p>For a particular monotone formula $M$ of size $n$, there's an equivalent formula of depth $\text{O}(\text{ln}\,n)$.</p>&#xA...
habedi/stack-exchange-dataset
72,066
Prove the equivalence between a CFG and a Context free language
<p>I have to prove that the language $L=\{a^ib^j:2i=3j+1\}$ and the CFG G with the following rewrite rules:</p>&#xA;&#xA;<p>$S\rightarrow a^2Tb$</p>&#xA;&#xA;<p>$T\rightarrow a^3Tb^2 |\epsilon$</p>&#xA;&#xA;<p>are equivalent to each other.</p>&#xA;&#xA;<p>I'm going to prove this by saying $L(G)\subseteq L$ and $L \subs...
formal languages context free proof techniques induction
1
Prove the equivalence between a CFG and a Context free language -- (formal languages context free proof techniques induction) <p>I have to prove that the language $L=\{a^ib^j:2i=3j+1\}$ and the CFG G with the following rewrite rules:</p>&#xA;&#xA;<p>$S\rightarrow a^2Tb$</p>&#xA;&#xA;<p>$T\rightarrow a^3Tb^2 |\epsilon$<...
habedi/stack-exchange-dataset
72,071
Must a min weight subset of edges connecting all vertices form a tree?
<p>Got this question in an exam.</p>&#xA;&#xA;<p>In a graph where all edge weights are positive, if a subset S of the edges connects all vertices and has minimum total weight, then the edges in S form a tree?</p>&#xA;&#xA;<p>True or false?</p>&#xA;&#xA;<p>This seems to be the definition of a MST, but since it doesn't s...
graphs minimum spanning tree
1
Must a min weight subset of edges connecting all vertices form a tree? -- (graphs minimum spanning tree) <p>Got this question in an exam.</p>&#xA;&#xA;<p>In a graph where all edge weights are positive, if a subset S of the edges connects all vertices and has minimum total weight, then the edges in S form a tree?</p>&#x...
habedi/stack-exchange-dataset
72,082
Rounding logarithm to next integer — Potential function
<p>The problem is IV-3 of this pdf: <a href="https://www.cs.helsinki.fi/webfm_send/1481" rel="nofollow noreferrer">potential function</a>.</p>&#xA;&#xA;<p>Defining a potential function as $\Phi(i) = 2i - 2^{\lfloor{\log_2i}\rfloor+1} + 1$ </p>&#xA;&#xA;<p>The solution states that if $i$ is <em>not</em> an exact power o...
algorithm analysis rounding
1
Rounding logarithm to next integer — Potential function -- (algorithm analysis rounding) <p>The problem is IV-3 of this pdf: <a href="https://www.cs.helsinki.fi/webfm_send/1481" rel="nofollow noreferrer">potential function</a>.</p>&#xA;&#xA;<p>Defining a potential function as $\Phi(i) = 2i - 2^{\lfloor{\log_2i}\rfloor+...
habedi/stack-exchange-dataset
72,097
Construct a proof tree in Hindley-Milner with function overload
<p>I'm reading Wadler's paper called "<a href="https://people.csail.mit.edu/dnj/teaching/6898/papers/wadler88.pdf" rel="nofollow noreferrer">How to make adhoc polymorphism less ad hoc</a>".&#xA;I'm trying to understand the given rules for function overload (over and inst) and I want to create a small example of a proof...
type theory
1
Construct a proof tree in Hindley-Milner with function overload -- (type theory) <p>I'm reading Wadler's paper called "<a href="https://people.csail.mit.edu/dnj/teaching/6898/papers/wadler88.pdf" rel="nofollow noreferrer">How to make adhoc polymorphism less ad hoc</a>".&#xA;I'm trying to understand the given rules for ...
habedi/stack-exchange-dataset
72,098
Prove that every two vertices in graph are connected by a path of some length
<p>I'm working on simulating a network architecture. I'm representing every node and their connections as a connected graph with no directional edges. I need some help with my reasoning.</p>&#xA;&#xA;<p>Every node in network is connected to exactly 3 others. Is it possible for me to prove that every two nodes have a pa...
graphs shortest path
1
Prove that every two vertices in graph are connected by a path of some length -- (graphs shortest path) <p>I'm working on simulating a network architecture. I'm representing every node and their connections as a connected graph with no directional edges. I need some help with my reasoning.</p>&#xA;&#xA;<p>Every node in...
habedi/stack-exchange-dataset
72,101
Algorithm for smallest String without a given prefix
<p>How can I find the lexicographicaly smallest string that doesn't start with a given prefix AND is lexicographicaly bigger than the given prefix? Example: </p>&#xA;&#xA;<ol>&#xA;<li><p>prefix : cat;&#xA;next string : cau</p></li>&#xA;<li><p>prefix : cazz&#xA;next string; cb</p></li>&#xA;</ol>&#xA;
strings substrings
1
Algorithm for smallest String without a given prefix -- (strings substrings) <p>How can I find the lexicographicaly smallest string that doesn't start with a given prefix AND is lexicographicaly bigger than the given prefix? Example: </p>&#xA;&#xA;<ol>&#xA;<li><p>prefix : cat;&#xA;next string : cau</p></li>&#xA;<li><p>...
habedi/stack-exchange-dataset
72,102
Understanding serialization
<p>I am a software engineer and after a discussion with some colleagues, I realized I do not have a good grasp of the concept serialization. As I understand, serialization is the process of converting some entity, such as an object in OOP, to a sequence of bytes, so that the said entity can be stored or transmitted for...
storage
1
Understanding serialization -- (storage) <p>I am a software engineer and after a discussion with some colleagues, I realized I do not have a good grasp of the concept serialization. As I understand, serialization is the process of converting some entity, such as an object in OOP, to a sequence of bytes, so that the sai...
habedi/stack-exchange-dataset
72,105
Computing snapshot of Turing machine from previous snapshots in logarithmic space?
<blockquote>&#xA; <p>To prove that $P \subseteq P_{\ poly}$<a href="http://theory.cs.princeton.edu/complexity/book.pdf" rel="nofollow noreferrer"> [see book by Arora and Barak, chapter 6, page no 105]</a></p>&#xA;</blockquote>&#xA;&#xA;<p>Proof : Let $M$ be an oblivious TM and running time is $T(n)$, let $x \in \{0,1\...
complexity theory turing machines circuits
1
Computing snapshot of Turing machine from previous snapshots in logarithmic space? -- (complexity theory turing machines circuits) <blockquote>&#xA; <p>To prove that $P \subseteq P_{\ poly}$<a href="http://theory.cs.princeton.edu/complexity/book.pdf" rel="nofollow noreferrer"> [see book by Arora and Barak, chapter 6, ...
habedi/stack-exchange-dataset
72,106
Polymorphism restriction on lambda-bound variables in HM
<p>I'm trying to implement the Hindley-Milner type system, following Milner 1978, "A Theory of Type Polymorphism in Programming" (<a href="https://courses.engr.illinois.edu/cs421/sp2013/project/milner-polymorphism.pdf" rel="noreferrer">link</a>). In the Hindley-Milner system, a polymorphic let-bound expression may take...
typing type inference
1
Polymorphism restriction on lambda-bound variables in HM -- (typing type inference) <p>I'm trying to implement the Hindley-Milner type system, following Milner 1978, "A Theory of Type Polymorphism in Programming" (<a href="https://courses.engr.illinois.edu/cs421/sp2013/project/milner-polymorphism.pdf" rel="noreferrer">...
habedi/stack-exchange-dataset
72,123
When is a bound asymptotically tight?
<blockquote>&#xA;<p>What does it mean that the bound <span class="math-container">$2n^2 = O(n^2)$</span> is asymptotically tight while <span class="math-container">$2n = O(n^2)$</span> is not? We use the o-notation to denote an upper bound that is not asymptotically tight.</p>&#xA;</blockquote>&#xA;<p>The definitions of...
asymptotics
1
When is a bound asymptotically tight? -- (asymptotics) <blockquote>&#xA;<p>What does it mean that the bound <span class="math-container">$2n^2 = O(n^2)$</span> is asymptotically tight while <span class="math-container">$2n = O(n^2)$</span> is not? We use the o-notation to denote an upper bound that is not asymptoticall...
habedi/stack-exchange-dataset
72,130
Can we use Big O notation to predict actual running time of the algorithm on machine?
<p>As per my understanding, a program can take a different amount of time to run on different machines because it is dependent on hardware. So we use big O notation which is independent of hardware to compare the performance of two algorithms as the input grows.</p>&#xA;&#xA;<p>I am working on an algorithm which has a ...
asymptotics
1
Can we use Big O notation to predict actual running time of the algorithm on machine? -- (asymptotics) <p>As per my understanding, a program can take a different amount of time to run on different machines because it is dependent on hardware. So we use big O notation which is independent of hardware to compare the perf...
habedi/stack-exchange-dataset
72,138
Set Cover and additional constraints
<p>Consider the following bipartite graph:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/W1eL4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W1eL4.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>Each node in red color represents a warehouse $w = \{ 1,2,3\} $. For this example we h...
linear programming integer programming modelling
1
Set Cover and additional constraints -- (linear programming integer programming modelling) <p>Consider the following bipartite graph:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/W1eL4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W1eL4.png" alt="enter image description here"></a></p>&#xA;&#x...
habedi/stack-exchange-dataset
72,140
General Intelligence Utility Function
<p>I was watching the <a href="https://www.youtube.com/watch?v=3TYT1QfdfsM" rel="nofollow noreferrer">AI Stop Button Problem</a> from Computerphile, and was very confused on the difference between two approaches.</p>&#xA;&#xA;<p>Background: there is a barebones general intelligence running in the form of some robotic d...
artificial intelligence
1
General Intelligence Utility Function -- (artificial intelligence) <p>I was watching the <a href="https://www.youtube.com/watch?v=3TYT1QfdfsM" rel="nofollow noreferrer">AI Stop Button Problem</a> from Computerphile, and was very confused on the difference between two approaches.</p>&#xA;&#xA;<p>Background: there is a b...
habedi/stack-exchange-dataset
72,141
Confusion about the definition of the average-case running time of algorithms
<p>In this <a href="http://jeffe.cs.illinois.edu/teaching/algorithms/notes/09-nutsbolts.pdf" rel="nofollow noreferrer">lecture note</a>, </p>&#xA;&#xA;<blockquote>&#xA; <p>The <em>average-case</em> running time is defined by the <em>expected value</em>, over all inputs $X$ of a certain size, of the algorithm's running...
time complexity runtime analysis probability theory quicksort average case
1
Confusion about the definition of the average-case running time of algorithms -- (time complexity runtime analysis probability theory quicksort average case) <p>In this <a href="http://jeffe.cs.illinois.edu/teaching/algorithms/notes/09-nutsbolts.pdf" rel="nofollow noreferrer">lecture note</a>, </p>&#xA;&#xA;<blockquote...
habedi/stack-exchange-dataset
72,154
Insertions in Red-Black Trees
<p>I studied methods for inserting new nodes into Red-black trees for the first time this month.</p>&#xA;&#xA;<p>In doing so, I read a lot of pages on the internet and found that ( if I'm not mistaken ) there are many, many, many accepted algorithms for inserting nodes into red-black trees.</p>&#xA;&#xA;<p>Furthermore,...
algorithms balanced search trees
1
Insertions in Red-Black Trees -- (algorithms balanced search trees) <p>I studied methods for inserting new nodes into Red-black trees for the first time this month.</p>&#xA;&#xA;<p>In doing so, I read a lot of pages on the internet and found that ( if I'm not mistaken ) there are many, many, many accepted algorithms fo...
habedi/stack-exchange-dataset
72,161
Can Nondet Rabin Tree automaton be determinized?
<p>In other words, are they equally powerful?</p>&#xA;&#xA;<p>(for <em>word</em> automata the answer is "yes"; this question is about <em>tree</em> automata).</p>&#xA;&#xA;<p>(i am talking about tree automata that work on $in$finite trees)</p>&#xA;
reference request nondeterminism tree automata
1
Can Nondet Rabin Tree automaton be determinized? -- (reference request nondeterminism tree automata) <p>In other words, are they equally powerful?</p>&#xA;&#xA;<p>(for <em>word</em> automata the answer is "yes"; this question is about <em>tree</em> automata).</p>&#xA;&#xA;<p>(i am talking about tree automata that work ...
habedi/stack-exchange-dataset
72,166
Term for programming languages that read like sentences?
<p>Is there a term for programming languages that read like written sentences? I'm thinking of languages like Python, where you can almost read the code aloud as a sentence, as opposed to C++ which is really arcane.</p>&#xA;&#xA;<p>For example, in Python <code>if 'pizza' not in animals</code> is very clear when read al...
terminology programming languages
1
Term for programming languages that read like sentences? -- (terminology programming languages) <p>Is there a term for programming languages that read like written sentences? I'm thinking of languages like Python, where you can almost read the code aloud as a sentence, as opposed to C++ which is really arcane.</p>&#xA;...
habedi/stack-exchange-dataset
72,172
Adjacency-list to Adjacency matrix in logarithmic space?
<p><strong>Input :</strong> Adjacency-list representation of Directed acyclic graph (Boolean circuit). <a href="http://theory.cs.princeton.edu/complexity/circuitschap.pdf" rel="nofollow noreferrer"> see Complexity theory by Arora and bark, page no- 104 </a></p>&#xA;&#xA;<p><strong>Find :</strong> Adjacency matrix rep...
algorithms complexity theory data structures circuits
1
Adjacency-list to Adjacency matrix in logarithmic space? -- (algorithms complexity theory data structures circuits) <p><strong>Input :</strong> Adjacency-list representation of Directed acyclic graph (Boolean circuit). <a href="http://theory.cs.princeton.edu/complexity/circuitschap.pdf" rel="nofollow noreferrer"> see...
habedi/stack-exchange-dataset
72,193
Are there any efficient algorithems to find packets similarities in a list?
<p>I would like to make a program which finds similar packets (there might be more then one class of similarity) in packet list (which is updated all the time). Are there any efficient algorithems to find these similarities?</p>&#xA;&#xA;<p>By similarities I mean that they have the same size, type and payload. </p>&#xA...
machine learning trees real time
1
Are there any efficient algorithems to find packets similarities in a list? -- (machine learning trees real time) <p>I would like to make a program which finds similar packets (there might be more then one class of similarity) in packet list (which is updated all the time). Are there any efficient algorithems to find t...
habedi/stack-exchange-dataset
72,200
Euclid's Algorithm Time Complexity
<p>I have a question about the Euclid's Algorithm for finding greatest common divisors.</p>&#xA;&#xA;<p>gcd(p,q) where p > q and q is a n-bit integer.</p>&#xA;&#xA;<p>I'm trying to follow a time complexity analysis on the algorithm (input is n-bits as above)</p>&#xA;&#xA;<pre><code>gcd(p,q)&#xA; if (p == q)&#xA; ...
algorithms algorithm analysis time complexity runtime analysis
1
Euclid's Algorithm Time Complexity -- (algorithms algorithm analysis time complexity runtime analysis) <p>I have a question about the Euclid's Algorithm for finding greatest common divisors.</p>&#xA;&#xA;<p>gcd(p,q) where p > q and q is a n-bit integer.</p>&#xA;&#xA;<p>I'm trying to follow a time complexity analysis on...
habedi/stack-exchange-dataset
72,203
Using integer programming to find a solution without optimizing it
<p>Oftentimes I find myself wanting to use integer programming to find a solution to a particular problem, without caring about optimizing a certain variable at all.</p>&#xA;&#xA;<p>I've found that most packages that offer integer programming do not provide this feature.</p>&#xA;&#xA;<p>Is it then correct to assume tha...
integer programming
1
Using integer programming to find a solution without optimizing it -- (integer programming) <p>Oftentimes I find myself wanting to use integer programming to find a solution to a particular problem, without caring about optimizing a certain variable at all.</p>&#xA;&#xA;<p>I've found that most packages that offer integ...
habedi/stack-exchange-dataset
72,204
Converting $\beta$-bit integer to a decimal representation in $\Theta(M(\beta) \log \beta)$
<p>The following problem is from CLRS (31.1-13, Page 933, 3rd edition):</p>&#xA;&#xA;<blockquote>&#xA; <p>Give an efficient algorithm to convert a given $\beta$-bit (binary) integer to a decimal representation. Argue that if multiplication or division of integers whose length is at most $\beta$ takes time $M(\beta)$, ...
algorithm analysis asymptotics recurrence relation recursion divide and conquer
1
Converting $\beta$-bit integer to a decimal representation in $\Theta(M(\beta) \log \beta)$ -- (algorithm analysis asymptotics recurrence relation recursion divide and conquer) <p>The following problem is from CLRS (31.1-13, Page 933, 3rd edition):</p>&#xA;&#xA;<blockquote>&#xA; <p>Give an efficient algorithm to conve...
habedi/stack-exchange-dataset
72,211
Cost of find operation on a tree data-structure
<p>I implement my data sets with a tree data-structure.</p>&#xA;&#xA;<p>The tree data-structure has a method named <code>MakeSet</code> which creates a set with one node. The tree data-structure has also a method named <code>Merge(i,j)</code> which merges trees of set <code>i</code> and set <code>j</code> in this way: ...
algorithms graphs data structures trees
1
Cost of find operation on a tree data-structure -- (algorithms graphs data structures trees) <p>I implement my data sets with a tree data-structure.</p>&#xA;&#xA;<p>The tree data-structure has a method named <code>MakeSet</code> which creates a set with one node. The tree data-structure has also a method named <code>Me...
habedi/stack-exchange-dataset
72,223
Collision resistant Hash function in chaos cryptography
<p>In my earlier Question asked here <a href="https://cs.stackexchange.com/questions/59524/help-in-understanding-how-to-apply-nonlinear-function-in-hashing">Help in understanding how to apply nonlinear function in hashing</a> about chaos cryptography, since then I have come across several research papers that apply atl...
proof techniques search algorithms cryptography hashing
1
Collision resistant Hash function in chaos cryptography -- (proof techniques search algorithms cryptography hashing) <p>In my earlier Question asked here <a href="https://cs.stackexchange.com/questions/59524/help-in-understanding-how-to-apply-nonlinear-function-in-hashing">Help in understanding how to apply nonlinear f...
habedi/stack-exchange-dataset
72,235
Can Von Neumann bit extraction be made more efficient?
<p>I want to develop a previous <a href="https://cs.stackexchange.com/questions/9469/unbiasing-of-sequences">question</a> regarding Von Neumann debiasing /randomness extraction. </p>&#xA;&#xA;<p>The typical solution (as posted) is to take pairs of throws and output a bit based on a comparison of the two throws. This ...
randomness entropy
1
Can Von Neumann bit extraction be made more efficient? -- (randomness entropy) <p>I want to develop a previous <a href="https://cs.stackexchange.com/questions/9469/unbiasing-of-sequences">question</a> regarding Von Neumann debiasing /randomness extraction. </p>&#xA;&#xA;<p>The typical solution (as posted) is to take p...
habedi/stack-exchange-dataset
72,238
Does my "hollow list" structure exist already?
<p>I came up with an implementation in c for arrays which can be extremely large yet only use an amount of memory proportional to how much data you have written to it. What I want to know is if there is a name for this kind of list or structure. Here is my code in C for the structure and example use:</p>&#xA;&#xA;<pre>...
data structures
1
Does my "hollow list" structure exist already? -- (data structures) <p>I came up with an implementation in c for arrays which can be extremely large yet only use an amount of memory proportional to how much data you have written to it. What I want to know is if there is a name for this kind of list or structure. Here i...
habedi/stack-exchange-dataset
72,243
How to construct object oriented programming in pseudo code?
<p>I am studying a data structures course in which we have given many assignments on constructing data structures (like trees, arrays, and linked lists).</p>&#xA;&#xA;<p>In class template, what kind of notation should I write for these operators (::,->) and the others operators which are used in C++? Can anyone elabora...
data structures programming languages
1
How to construct object oriented programming in pseudo code? -- (data structures programming languages) <p>I am studying a data structures course in which we have given many assignments on constructing data structures (like trees, arrays, and linked lists).</p>&#xA;&#xA;<p>In class template, what kind of notation shoul...
habedi/stack-exchange-dataset
72,269
is this an example of nominal unification?
<p>I am thinking that is the following a problem solved by nominal unification.</p>&#xA;&#xA;<p>$\lambda a.X = \lambda b.\lambda c.c $</p>&#xA;&#xA;<p>where we find $X$. The answer is obvious.</p>&#xA;&#xA;<p>The reason is that it seems in nominal unification $X$ always will be an atom, not a function such as $\lambda ...
unification
1
is this an example of nominal unification? -- (unification) <p>I am thinking that is the following a problem solved by nominal unification.</p>&#xA;&#xA;<p>$\lambda a.X = \lambda b.\lambda c.c $</p>&#xA;&#xA;<p>where we find $X$. The answer is obvious.</p>&#xA;&#xA;<p>The reason is that it seems in nominal unification ...
habedi/stack-exchange-dataset
72,270
CLRS RAM model Description
<p>I'm seeking some clarification on a description of the RAM model in CLRS on page 23, section 2.2 (Analyzing Algorithms).</p>&#xA;&#xA;<p>Firstly, it is mentioned that we assume integers are represented with $c\cdot\log_2 n$ bits for some constant $c\geq 1$. Now take the integer value $2$, would it not be the case th...
algorithms algorithm analysis computation models
1
CLRS RAM model Description -- (algorithms algorithm analysis computation models) <p>I'm seeking some clarification on a description of the RAM model in CLRS on page 23, section 2.2 (Analyzing Algorithms).</p>&#xA;&#xA;<p>Firstly, it is mentioned that we assume integers are represented with $c\cdot\log_2 n$ bits for som...
habedi/stack-exchange-dataset
72,285
Finding all possible simple directed graphics given a set of nodes
<p>Is it possible to find all simple directed graphs given a set of nodes? I was thinking of just finding all permutations of an adjacency list of lists. For example, given nodes A, B I can have the adjacency lists:</p>&#xA;&#xA;<pre><code>A | \&#xA;B | \&#xA;&#xA;A | B&#xA;B | \&#xA;&#xA;A | \&#xA;B | A&#xA;&#xA;A | B...
graphs
1
Finding all possible simple directed graphics given a set of nodes -- (graphs) <p>Is it possible to find all simple directed graphs given a set of nodes? I was thinking of just finding all permutations of an adjacency list of lists. For example, given nodes A, B I can have the adjacency lists:</p>&#xA;&#xA;<pre><code>A...
habedi/stack-exchange-dataset
72,288
Given a function and its complexity, what is the complexity of its circuit?
<p>For example,&#xA;given an element-wise function $f$, with input $x\in\{0,1\}^{p\times n}$, the complexity $T(f(x))=O(n)$, and that all numbers are represented using $p$ binary digits. Suppose that we also know the complexity of each individual operations inside $f$. For example, multiplication takes $O(m^{1.585})$ u...
complexity theory circuits
1
Given a function and its complexity, what is the complexity of its circuit? -- (complexity theory circuits) <p>For example,&#xA;given an element-wise function $f$, with input $x\in\{0,1\}^{p\times n}$, the complexity $T(f(x))=O(n)$, and that all numbers are represented using $p$ binary digits. Suppose that we also know...
habedi/stack-exchange-dataset
72,289
Given a Turing machine , How to construct a efficient boolean circuit?
<p>The proof of <a href="https://cs.stackexchange.com/questions/72105/computing-snapshot-of-turing-machine-from-previous-snapshots-in-logarithmic-spac">$P\subseteq P_{\\poly}$</a>, Let $M$ is a Turing machine with $T(n)$ is running time and goal here is to design a boolean circuit of size $O(T(n))$ <a href="http://the...
complexity theory turing machines circuits
1
Given a Turing machine , How to construct a efficient boolean circuit? -- (complexity theory turing machines circuits) <p>The proof of <a href="https://cs.stackexchange.com/questions/72105/computing-snapshot-of-turing-machine-from-previous-snapshots-in-logarithmic-spac">$P\subseteq P_{\\poly}$</a>, Let $M$ is a Turing ...
habedi/stack-exchange-dataset
72,295
Showing that Bayes classifier is optimal
<p>Consider domain $X$, label set $ Y=\{0,1\}$ and the zero-one loss.</p>&#xA;&#xA;<p>Given any probability distribution D over $ X\times \{0,1\} $, we've defined the Bayes classifier $ f_D $ to be-</p>&#xA;&#xA;<p>$$ f_{D}(x)=&#xA;\begin{cases}&#xA;1 &amp; \text{if }\mathbb{P}[y=1|x]\geq\tfrac{1}{2}\\&#xA;0 &amp; \tex...
machine learning classification statistics
1
Showing that Bayes classifier is optimal -- (machine learning classification statistics) <p>Consider domain $X$, label set $ Y=\{0,1\}$ and the zero-one loss.</p>&#xA;&#xA;<p>Given any probability distribution D over $ X\times \{0,1\} $, we've defined the Bayes classifier $ f_D $ to be-</p>&#xA;&#xA;<p>$$ f_{D}(x)=&#xA...
habedi/stack-exchange-dataset
72,300
Push two symbols to stack at once in a push down automata
<p>I am pretty new to PDAs and I was solving a problem which asked to design a PDA for the following: $a^n b^{2n}$.</p>&#xA;&#xA;<p>The transitions on the PDAs I've encountered so far have pushed only one symbol onto the stack at any time. Can we push two symbols?&#xA;Eg: for every $a$ I encounter I push two symbols. ...
automata pushdown automata
1
Push two symbols to stack at once in a push down automata -- (automata pushdown automata) <p>I am pretty new to PDAs and I was solving a problem which asked to design a PDA for the following: $a^n b^{2n}$.</p>&#xA;&#xA;<p>The transitions on the PDAs I've encountered so far have pushed only one symbol onto the stack at ...
habedi/stack-exchange-dataset
72,308
Solving Hidoku problem using reduction to Hamilton path
<p>It seems like people have discussed this reduction here:</p>&#xA;&#xA;<p><a href="https://cs.stackexchange.com/questions/11330/is-hidoku-np-complete">Is Hidoku NP complete?</a></p>&#xA;&#xA;<p>But it looks like the solution that was given only tells you if the Hidoku problem has a solution or not (if an hamilton pat...
reductions np hamiltonian path
1
Solving Hidoku problem using reduction to Hamilton path -- (reductions np hamiltonian path) <p>It seems like people have discussed this reduction here:</p>&#xA;&#xA;<p><a href="https://cs.stackexchange.com/questions/11330/is-hidoku-np-complete">Is Hidoku NP complete?</a></p>&#xA;&#xA;<p>But it looks like the solution t...
habedi/stack-exchange-dataset
72,323
Counter Mode Encryption Vulnerabilities
<p>Hi All,&#xA;<br>I am solving a question about counter mode encryption in symmetric crypto. I am new to the topic and don't really understand the matter, could you help me a little how to solve the following task?</p>&#xA;&#xA;<p><em><p>The formula for counter mode encryption is <br>&#xA;&emsp;Ci = Pi ⊕ E (IV + i, K)...
cryptography
1
Counter Mode Encryption Vulnerabilities -- (cryptography) <p>Hi All,&#xA;<br>I am solving a question about counter mode encryption in symmetric crypto. I am new to the topic and don't really understand the matter, could you help me a little how to solve the following task?</p>&#xA;&#xA;<p><em><p>The formula for counter...
habedi/stack-exchange-dataset
72,325
Problems while trying to prove that $(r|s)^* = (r^*.s^*)^*$
<p>I came across the following equality of regular expressions $$(r|s)^* = (r^*.s^*)^*\,,$$ where $r$ and $s$ are two regular expressions and $.$ denotes concatenation, but I don't know how could I prove it.</p>&#xA;&#xA;<p><strong>My try:</strong></p>&#xA;&#xA;<p>I call $L(r)$ the language defined by the regular expre...
formal languages regular expressions
1
Problems while trying to prove that $(r|s)^* = (r^*.s^*)^*$ -- (formal languages regular expressions) <p>I came across the following equality of regular expressions $$(r|s)^* = (r^*.s^*)^*\,,$$ where $r$ and $s$ are two regular expressions and $.$ denotes concatenation, but I don't know how could I prove it.</p>&#xA;&#...
habedi/stack-exchange-dataset
72,332
Sampling among constrained partitions
<p>I'm working on a clustering problem and want to sample partitions (possible clustering solutions) among a set of constrained ones. </p>&#xA;&#xA;<p>Here is the problem: I have a set of objects $O=\{o_1,\ldots,o_n\}$ and would like to sample among reflexive, symmetric and transitive relations $R \in O \times O$ such ...
sampling partitions
1
Sampling among constrained partitions -- (sampling partitions) <p>I'm working on a clustering problem and want to sample partitions (possible clustering solutions) among a set of constrained ones. </p>&#xA;&#xA;<p>Here is the problem: I have a set of objects $O=\{o_1,\ldots,o_n\}$ and would like to sample among reflexi...
habedi/stack-exchange-dataset
72,336
Tree structure that is like a quadtree/octree but splits a different number of times in each dimension?
<p>I'm looking for a data structure that is like a quadtree where each level is a subdivision of the previous. However, unlike a quadtree I need the subdivision to occur a different number of times in the horizontal direction to the vertical direction. In a quadtree the space is subdivided once in each dimension (resul...
data structures search trees space partitioning
1
Tree structure that is like a quadtree/octree but splits a different number of times in each dimension? -- (data structures search trees space partitioning) <p>I'm looking for a data structure that is like a quadtree where each level is a subdivision of the previous. However, unlike a quadtree I need the subdivision to...
habedi/stack-exchange-dataset
72,346
How to reduce UNSAT problems so that less than $7/8+\epsilon$ of clauses are unsatisfied?
<p>In <a href="https://cs.stackexchange.com/questions/71040/hardness-of-approximation-of-max-3sat">this question</a> I ask about what use is a solver that can find an assignment that satisfies, say, 90% of the clauses of a known satisfiable 3SAT problem in polynomial time. The answer seems to be: given a problem ϕ tha...
satisfiability
1
How to reduce UNSAT problems so that less than $7/8+\epsilon$ of clauses are unsatisfied? -- (satisfiability) <p>In <a href="https://cs.stackexchange.com/questions/71040/hardness-of-approximation-of-max-3sat">this question</a> I ask about what use is a solver that can find an assignment that satisfies, say, 90% of the ...
habedi/stack-exchange-dataset
72,360
How is implication same as entailment
<p>In propositional logic (Artificial intelligence to be specific) $\alpha$ entails $\beta$ iff $\alpha\Rightarrow\beta$ is a statement.&#xA;However if I write the truth table for implies ($\Rightarrow$) if $\alpha$ is false implies that $\beta$ is a true sentence as shown in the table below in the fourth row.</p>&#xA;...
propositional logic
1
How is implication same as entailment -- (propositional logic) <p>In propositional logic (Artificial intelligence to be specific) $\alpha$ entails $\beta$ iff $\alpha\Rightarrow\beta$ is a statement.&#xA;However if I write the truth table for implies ($\Rightarrow$) if $\alpha$ is false implies that $\beta$ is a true s...
habedi/stack-exchange-dataset
72,365
Expressing the condition as a set of linear constraints
<p>Express the condition "$x = 0$ if and only if $y = 0$" as a set of linear constraints, where $x,y$ are integers such that $ - 5 \le x \le 8$ and $0 \le y \le 1$</p>&#xA;
logic linear programming integer programming
1
Expressing the condition as a set of linear constraints -- (logic linear programming integer programming) <p>Express the condition "$x = 0$ if and only if $y = 0$" as a set of linear constraints, where $x,y$ are integers such that $ - 5 \le x \le 8$ and $0 \le y \le 1$</p>&#xA;
habedi/stack-exchange-dataset
72,371
Proof that $A^* - \{x\} = A^+$ such that $A=\{a,b\}$ and $x \in \{a,b\}^*$
<p>Exercise 1.1 (2) from Problem Solving in Automata, Languages, and Complexity by Du and Ko. P.7. the question is as following:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let A be a langauge over {a,b} and $x \in {a,b}^*$. Find necessary and sufficient conditions in terms of x and A for the equation:&#xA; $$A^* - \{x\} = A^+...
formal languages
1
Proof that $A^* - \{x\} = A^+$ such that $A=\{a,b\}$ and $x \in \{a,b\}^*$ -- (formal languages) <p>Exercise 1.1 (2) from Problem Solving in Automata, Languages, and Complexity by Du and Ko. P.7. the question is as following:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let A be a langauge over {a,b} and $x \in {a,b}^*$. Find ne...
habedi/stack-exchange-dataset