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
16,564
Clarification about big Oh calculation
<p>Say you have a loop that iterates over an array, </p>&#xA;&#xA;<pre><code>for i in someArray:&#xA; //some code&#xA;</code></pre>&#xA;&#xA;<p>This basic example would have a running time of $O(n)$. Say that you added a nested loop with equal number of operations, this then would be $O(n^2)$. My question is, is it ...
asymptotics
1
Clarification about big Oh calculation -- (asymptotics) <p>Say you have a loop that iterates over an array, </p>&#xA;&#xA;<pre><code>for i in someArray:&#xA; //some code&#xA;</code></pre>&#xA;&#xA;<p>This basic example would have a running time of $O(n)$. Say that you added a nested loop with equal number of operati...
habedi/stack-exchange-dataset
16,569
Term for size of maximum independent set
<p>An <em>independent set</em> is a set of vertices in a graph, no two of which are adjacent.</p>&#xA;&#xA;<p>A maximum independent set is a largest independent set for a given graph G.</p>&#xA;&#xA;<p>Is there a standard term for the size of the largest independent set in a given graph?</p>&#xA;&#xA;<p>If not, what sh...
graphs terminology
1
Term for size of maximum independent set -- (graphs terminology) <p>An <em>independent set</em> is a set of vertices in a graph, no two of which are adjacent.</p>&#xA;&#xA;<p>A maximum independent set is a largest independent set for a given graph G.</p>&#xA;&#xA;<p>Is there a standard term for the size of the largest ...
habedi/stack-exchange-dataset
16,570
Lines intersections with a point in 1D
<p>I have an array of lines in 1D represented by coordination and weight, it can be only positive weight. I want to find all the lines that intersect a point in a given range.</p>&#xA;&#xA;<p>Is there any efficient way of doing it?</p>&#xA;
algorithms
1
Lines intersections with a point in 1D -- (algorithms) <p>I have an array of lines in 1D represented by coordination and weight, it can be only positive weight. I want to find all the lines that intersect a point in a given range.</p>&#xA;&#xA;<p>Is there any efficient way of doing it?</p>&#xA;
habedi/stack-exchange-dataset
16,575
Does Reverse Polish Notation have an LL grammar?
<p>Let L be the language of all arithmetic expressions written in Reverse Polish Notation, containing only binary operators. $\Sigma(L) = \{n, o\}$, n := number, o := operator.</p>&#xA;&#xA;<p>Is there an LL grammar G so that L(G) = L?</p>&#xA;
context free
1
Does Reverse Polish Notation have an LL grammar? -- (context free) <p>Let L be the language of all arithmetic expressions written in Reverse Polish Notation, containing only binary operators. $\Sigma(L) = \{n, o\}$, n := number, o := operator.</p>&#xA;&#xA;<p>Is there an LL grammar G so that L(G) = L?</p>&#xA;
habedi/stack-exchange-dataset
16,578
Carry-free multiplication operation
<p>In long-multiplication, you shift and add, once for each $1$ bit in the lower number.</p>&#xA;&#xA;<p>Let $r = p \otimes q$ be an operation similar to multiplication, but slightly simpler: when expressed via long-multiplication, the addition does not carry. Essentially you bitwise-<strong>xor</strong> the shifted nu...
algorithms integers number theory multiplication
1
Carry-free multiplication operation -- (algorithms integers number theory multiplication) <p>In long-multiplication, you shift and add, once for each $1$ bit in the lower number.</p>&#xA;&#xA;<p>Let $r = p \otimes q$ be an operation similar to multiplication, but slightly simpler: when expressed via long-multiplication...
habedi/stack-exchange-dataset
16,592
Say that a stack frame only contains total functions: could the maximum stack size be statically determined?
<p>Say that you have a program with only total functions, or if that is impossible, consider a subset of the program with only total functions. Is it theoretically possible to statically determine the maximum size of the stack frame at runtime? The language may have other characteristics that are relevant/necessary (su...
algorithm analysis compilers
1
Say that a stack frame only contains total functions: could the maximum stack size be statically determined? -- (algorithm analysis compilers) <p>Say that you have a program with only total functions, or if that is impossible, consider a subset of the program with only total functions. Is it theoretically possible to s...
habedi/stack-exchange-dataset
16,599
Shouldn't the "even parity" function map 1101 to 0?
<p>From the book <em>Computer organization and design</em> by Patterson&amp;Hennessy:</p>&#xA;&#xA;<blockquote>&#xA; <p><strong>Parity</strong> is a function in which the output depends on the number of 1s in in the input. For an <em>even</em> parity function, the output is 1 if the input has an even number of ones. S...
logic
1
Shouldn't the "even parity" function map 1101 to 0? -- (logic) <p>From the book <em>Computer organization and design</em> by Patterson&amp;Hennessy:</p>&#xA;&#xA;<blockquote>&#xA; <p><strong>Parity</strong> is a function in which the output depends on the number of 1s in in the input. For an <em>even</em> parity funct...
habedi/stack-exchange-dataset
16,602
API - Design issues
<p>I'm building a GUI Desktop application that will communicate with an API(http) in a webserver.</p>&#xA;&#xA;<p>In the client side I have a GUI Desktop application and a GSM Modem(hardware). The GUI Desktop application will make requests to the API in the webserver and will get the SMS's to send.</p>&#xA;&#xA;<p>My q...
api design
1
API - Design issues -- (api design) <p>I'm building a GUI Desktop application that will communicate with an API(http) in a webserver.</p>&#xA;&#xA;<p>In the client side I have a GUI Desktop application and a GSM Modem(hardware). The GUI Desktop application will make requests to the API in the webserver and will get the...
habedi/stack-exchange-dataset
16,608
Designing a CFG that produces as many c's as the difference of numbers of a's and b's
<p>The question is to design a CFG for the language of words that have as many c's as the difference of numbers of a's and b's, that is</p>&#xA;&#xA;<p>$\qquad\displaystyle L = \{(a^l)(b^m)(c^n) \mid l, m \in \mathbb{N}; n = |l-m|\}$.</p>&#xA;&#xA;<p>I have so far go to create the cfg for $(a^l)(b^m)$ but don't know ho...
formal languages context free formal grammars
1
Designing a CFG that produces as many c's as the difference of numbers of a's and b's -- (formal languages context free formal grammars) <p>The question is to design a CFG for the language of words that have as many c's as the difference of numbers of a's and b's, that is</p>&#xA;&#xA;<p>$\qquad\displaystyle L = \{(a^l...
habedi/stack-exchange-dataset
16,611
Priority queue with unique elements and sublinear time merge?
<p>Some priority queues, like the <a href="https://en.wikipedia.org/wiki/Leftist_tree" rel="nofollow">height-based leftist tree</a> (or <a href="http://www.cse.ohio-state.edu/~gurari/course/cis680/cis680Ch8.html" rel="nofollow">here</a>) support merging in $\mathcal O\left(\log n\right)$ time.</p>&#xA;&#xA;<p>I am look...
algorithms data structures trees priority queues
1
Priority queue with unique elements and sublinear time merge? -- (algorithms data structures trees priority queues) <p>Some priority queues, like the <a href="https://en.wikipedia.org/wiki/Leftist_tree" rel="nofollow">height-based leftist tree</a> (or <a href="http://www.cse.ohio-state.edu/~gurari/course/cis680/cis680C...
habedi/stack-exchange-dataset
16,613
What is wrong in this proof?
<p>I stumbled upon this <a href="http://www.proofwiki.org/wiki/User:Joe" rel="nofollow noreferrer">wikipage</a> that has got this proof :</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/ouR52.png" alt="enter image description here"></p>&#xA;&#xA;<p>I rechecked <a href="http://en.wikipedia.org/wiki/Sum_rule_in_diffe...
proof techniques correctness proof
1
What is wrong in this proof? -- (proof techniques correctness proof) <p>I stumbled upon this <a href="http://www.proofwiki.org/wiki/User:Joe" rel="nofollow noreferrer">wikipage</a> that has got this proof :</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/ouR52.png" alt="enter image description here"></p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
16,622
standard sequential algorithm with polylog runtime?
<p>At the Wikipedia article on <a href="https://en.wikipedia.org/wiki/Time_complexity" rel="noreferrer">time complexity</a>, only a PRAM example is given for polylogarithmic time.</p>&#xA;&#xA;<p>Let $T(n)$ denote the largest number of steps used by a machine to reach a final state on any input with size $n$ bits.</p>&...
algorithms time complexity
1
standard sequential algorithm with polylog runtime? -- (algorithms time complexity) <p>At the Wikipedia article on <a href="https://en.wikipedia.org/wiki/Time_complexity" rel="noreferrer">time complexity</a>, only a PRAM example is given for polylogarithmic time.</p>&#xA;&#xA;<p>Let $T(n)$ denote the largest number of ...
habedi/stack-exchange-dataset
16,630
Understanding the basic concepts in memory organisation
<p>(Before actually proceeding to the question, I want to confess that this is a homework question, please do consider it and help me in improving my understanding a bit more.)</p>&#xA;&#xA;<p>I have recently started learning computer organisation and architecture. I have gained fair understanding for how caches are or...
memory management cpu cache virtual memory
1
Understanding the basic concepts in memory organisation -- (memory management cpu cache virtual memory) <p>(Before actually proceeding to the question, I want to confess that this is a homework question, please do consider it and help me in improving my understanding a bit more.)</p>&#xA;&#xA;<p>I have recently started...
habedi/stack-exchange-dataset
16,634
Complexity of Monotone (+,2) SAT problem?
<p>To continue this <a href="https://cs.stackexchange.com/questions/16483/complexity-of-deciding-the-satisfiability-of-a-quasi-monotone-cnf-formula">post</a>, let us define the Monotone$(+, 2^-)$-SAT problem: </p>&#xA;&#xA;<p>Given a monotone CNF formula $F^+$, where each variable appears exactly once (as a positive li...
complexity theory np complete decision problem complexity classes
1
Complexity of Monotone (+,2) SAT problem? -- (complexity theory np complete decision problem complexity classes) <p>To continue this <a href="https://cs.stackexchange.com/questions/16483/complexity-of-deciding-the-satisfiability-of-a-quasi-monotone-cnf-formula">post</a>, let us define the Monotone$(+, 2^-)$-SAT problem...
habedi/stack-exchange-dataset
16,661
Tiling an orthogonal polygon with squares
<p>Given an orthogonal polygon (a polygon whose sides are parallel to the axes), I want to find the smallest set of interior-disjoint squares, whose union equals the polygon.</p>&#xA;&#xA;<p>I found several references to slightly different problems, such as:</p>&#xA;&#xA;<ul>&#xA;<li><em>Covering</em> an orthogonal pol...
algorithms computational geometry tiling
1
Tiling an orthogonal polygon with squares -- (algorithms computational geometry tiling) <p>Given an orthogonal polygon (a polygon whose sides are parallel to the axes), I want to find the smallest set of interior-disjoint squares, whose union equals the polygon.</p>&#xA;&#xA;<p>I found several references to slightly di...
habedi/stack-exchange-dataset
16,670
Find a continuous path filling whole 3xN grid going through certain points in given order
<p>I've got a grid consisting of squares that is 3 squares high and N squares long. &#xA;Some of the squares are filled with numbers that are not greater than 3*N. You can move only to squares that are below, above, on right, or left from you. When you move on a square, you fill that square with a number of the amount ...
algorithms eulerian paths square grid
1
Find a continuous path filling whole 3xN grid going through certain points in given order -- (algorithms eulerian paths square grid) <p>I've got a grid consisting of squares that is 3 squares high and N squares long. &#xA;Some of the squares are filled with numbers that are not greater than 3*N. You can move only to sq...
habedi/stack-exchange-dataset
16,671
Range majority queries - most freqent element in range
<p>Given N numbers and M range queries (starting and ending points), I need to &#xA;compute majority (most frequent element, if it exists) in these ranges.</p>&#xA;&#xA;<p>I'm looking for an algorithm that would answer queries in logarithmic or even constant time.</p>&#xA;
algorithms search algorithms
1
Range majority queries - most freqent element in range -- (algorithms search algorithms) <p>Given N numbers and M range queries (starting and ending points), I need to &#xA;compute majority (most frequent element, if it exists) in these ranges.</p>&#xA;&#xA;<p>I'm looking for an algorithm that would answer queries in l...
habedi/stack-exchange-dataset
16,672
3-SAT where variables occur equally many times as a positive literal and as a negative literal
<p>Let $\phi$ be a 3-CNF formula over variables $x_1,x_2,\ldots,x_n$. Every variable $x_i$, $i \in [n]$, occurs equally many times as a positive literal and as a negative literal in $\phi$. </p>&#xA;&#xA;<p>Is it NP-complete to decide the satisfiability of such a formula? Assuming it is, I would be interested in knowin...
complexity theory np complete satisfiability decision problem
1
3-SAT where variables occur equally many times as a positive literal and as a negative literal -- (complexity theory np complete satisfiability decision problem) <p>Let $\phi$ be a 3-CNF formula over variables $x_1,x_2,\ldots,x_n$. Every variable $x_i$, $i \in [n]$, occurs equally many times as a positive literal and a...
habedi/stack-exchange-dataset
16,678
Constructing Context Free Grammar
<p>I am stuck and having a hard time with this question. I want to construct a CFG for the language $$L = \{{a^lb^mc^n | l,m\in N, n=|l-m|\}}$$&#xA;I know that the language consists of strings where:&#xA;<br>1. number of a's = number of b's, so c=0&#xA;<br>2. number of a's more than number of b's, c=l-m&#xA;<br>3. numb...
formal languages computability context free
1
Constructing Context Free Grammar -- (formal languages computability context free) <p>I am stuck and having a hard time with this question. I want to construct a CFG for the language $$L = \{{a^lb^mc^n | l,m\in N, n=|l-m|\}}$$&#xA;I know that the language consists of strings where:&#xA;<br>1. number of a's = number of ...
habedi/stack-exchange-dataset
16,682
Is MIN or MAX-True-2-XOR-SAT NP-hard?
<p><strong>Is there a proof or reference that $\left\{\text{MAX},\text{MIN}\right\}\text{-True-2-XOR-SAT}$ is $NP$-hard, or that it (the decision version) is in $P$?</strong></p>&#xA;&#xA;<p>Let:</p>&#xA;&#xA;<p>$$\Phi\left(\mathbf x\right)={\huge\wedge}_{i}^{n}C_i,\\&#xA;\forall_{C_i} \left.C_i=(p \oplus q)\right|_{\l...
complexity theory np hard satisfiability
1
Is MIN or MAX-True-2-XOR-SAT NP-hard? -- (complexity theory np hard satisfiability) <p><strong>Is there a proof or reference that $\left\{\text{MAX},\text{MIN}\right\}\text{-True-2-XOR-SAT}$ is $NP$-hard, or that it (the decision version) is in $P$?</strong></p>&#xA;&#xA;<p>Let:</p>&#xA;&#xA;<p>$$\Phi\left(\mathbf x\ri...
habedi/stack-exchange-dataset
16,684
Shor's Algorithm speed
<p>I'm a fledgling computer science scholar, and I'm being asked to write a paper which involves integer factorization. As a result, I'm having to look into Shor's algorithm on quantum computers.</p>&#xA;&#xA;<p>For the other algorithms, I was able to find specific equations to calculate the number of instructions of t...
time complexity quantum computing factoring
1
Shor's Algorithm speed -- (time complexity quantum computing factoring) <p>I'm a fledgling computer science scholar, and I'm being asked to write a paper which involves integer factorization. As a result, I'm having to look into Shor's algorithm on quantum computers.</p>&#xA;&#xA;<p>For the other algorithms, I was able...
habedi/stack-exchange-dataset
16,699
Which algorithms are usable for heatmaps and what are their pros and cons
<p>This is a <a href="https://stackoverflow.com/questions/19765076/which-algorithms-are-usable-for-heatmaps-and-what-are-their-pros-and-cons">cross post from Stack Overflow,</a> and <a href="https://dsp.stackexchange.com/questions/11463/which-algorithms-are-usable-for-heatmaps-and-what-are-their-pros-and-cons">DSP at S...
algorithms image processing matrices signal processing
1
Which algorithms are usable for heatmaps and what are their pros and cons -- (algorithms image processing matrices signal processing) <p>This is a <a href="https://stackoverflow.com/questions/19765076/which-algorithms-are-usable-for-heatmaps-and-what-are-their-pros-and-cons">cross post from Stack Overflow,</a> and <a h...
habedi/stack-exchange-dataset
16,723
Heuristics & Constrain Satisfaction Problem Differences
<p>I'm currently taking an Algorithms course, and we are covering Backtracking, CSP, and heuristics. However, I'm getting confused on exactly the differences between these terms and their applications.</p>&#xA;&#xA;<p>When using Backtracking on a problem, I understand we are calculating the set of all allowable solutio...
algorithms heuristics
1
Heuristics & Constrain Satisfaction Problem Differences -- (algorithms heuristics) <p>I'm currently taking an Algorithms course, and we are covering Backtracking, CSP, and heuristics. However, I'm getting confused on exactly the differences between these terms and their applications.</p>&#xA;&#xA;<p>When using Backtrac...
habedi/stack-exchange-dataset
16,729
Are real computers finite state machines?
<p>They have finite resources so they can be modeled by finite number of state what is the same that a finite state machine. There are any proof that it is not true?</p>&#xA;&#xA;<p>Thanks.</p>&#xA;
computability finite automata
1
Are real computers finite state machines? -- (computability finite automata) <p>They have finite resources so they can be modeled by finite number of state what is the same that a finite state machine. There are any proof that it is not true?</p>&#xA;&#xA;<p>Thanks.</p>&#xA;
habedi/stack-exchange-dataset
16,730
Corresponding noun for "side-effect-free"?
<p>For functions or computations we have terms like:</p>&#xA;&#xA;<ul>&#xA;<li>Deterministic &ndash; Determinism</li>&#xA;<li>Pure &ndash; Purity</li>&#xA;</ul>&#xA;&#xA;<p>Now what is the correct corresponding noun for <strong>side-effect-free</strong>?</p>&#xA;&#xA;<p>"Side-effect freeness"? "Side-effect freedom"? <s...
terminology programming languages
1
Corresponding noun for "side-effect-free"? -- (terminology programming languages) <p>For functions or computations we have terms like:</p>&#xA;&#xA;<ul>&#xA;<li>Deterministic &ndash; Determinism</li>&#xA;<li>Pure &ndash; Purity</li>&#xA;</ul>&#xA;&#xA;<p>Now what is the correct corresponding noun for <strong>side-effec...
habedi/stack-exchange-dataset
16,739
Finding farthest item in an array with duplicates
<p>I have an array $A[]$ of size $L$, which contains numbers in the range $1 \ldots N$. Here $L&gt;N$, so the array will contain repetitions. If $x,y$ are two numbers that are both present in the array, define the distance $d(x,y)$ to be the minimum difference in positions where $x,y$ appear, i.e.,</p>&#xA;&#xA;<p>$$...
algorithms arrays amortized analysis
1
Finding farthest item in an array with duplicates -- (algorithms arrays amortized analysis) <p>I have an array $A[]$ of size $L$, which contains numbers in the range $1 \ldots N$. Here $L&gt;N$, so the array will contain repetitions. If $x,y$ are two numbers that are both present in the array, define the distance $d(...
habedi/stack-exchange-dataset
16,741
Complexity of (SAT to 3-SAT) Problem?
<p>It is well known that any CNF formula can be transform in polynomial time into a 3-CNF formula by using new variables (<a href="http://en.wikipedia.org/wiki/Boolean_satisfiability_problem#3-satisfiability" rel="nofollow noreferrer">see here</a>). If using new variables is not allowed, it is not always possible (tak...
complexity theory satisfiability decision problem complexity classes
1
Complexity of (SAT to 3-SAT) Problem? -- (complexity theory satisfiability decision problem complexity classes) <p>It is well known that any CNF formula can be transform in polynomial time into a 3-CNF formula by using new variables (<a href="http://en.wikipedia.org/wiki/Boolean_satisfiability_problem#3-satisfiability...
habedi/stack-exchange-dataset
16,745
Can a Turing Machine decide only non-regular languages?
<p>I have an assignment where i need to create a Turing machine that decides an infinite language $L\subset \{0,1\}^*$ for which all $L'\subseteq L$, if $|L'|=\infty$, then $L'$ is not a regular language.</p>&#xA;&#xA;<p>I think this is not possible due to Rice's Theorem. It's not possible to tell for a Turing Machine ...
formal languages regular languages turing machines automata
1
Can a Turing Machine decide only non-regular languages? -- (formal languages regular languages turing machines automata) <p>I have an assignment where i need to create a Turing machine that decides an infinite language $L\subset \{0,1\}^*$ for which all $L'\subseteq L$, if $|L'|=\infty$, then $L'$ is not a regular lang...
habedi/stack-exchange-dataset
16,753
Pushdown automaton for complement of { ww | ... }
<p>I want to be able to describe the idea behind the pushdown automaton (no tables or diagrams). </p>&#xA;&#xA;<p>So, I already know that $L = \{ ww \mid w \text{ in } (0,1)^*\}$ is not context free. Since CFL are not closed under complement its complement $L'$ is a CFL. &#xA;I also read somewhere that any odd word is ...
formal languages context free automata pushdown automata
1
Pushdown automaton for complement of { ww | ... } -- (formal languages context free automata pushdown automata) <p>I want to be able to describe the idea behind the pushdown automaton (no tables or diagrams). </p>&#xA;&#xA;<p>So, I already know that $L = \{ ww \mid w \text{ in } (0,1)^*\}$ is not context free. Since CF...
habedi/stack-exchange-dataset
16,757
Simplest way to check edge set for transitivity
<p>I'm playing around with tournaments and currently have the problem that I need to check whether a given subset of the edges of a tournament is transitive (it need not be acyclic). I'm aware that I can always take the transitive closure of the edge set and see whether it terminates without adding a single edge or not...
algorithms graphs transitivity
1
Simplest way to check edge set for transitivity -- (algorithms graphs transitivity) <p>I'm playing around with tournaments and currently have the problem that I need to check whether a given subset of the edges of a tournament is transitive (it need not be acyclic). I'm aware that I can always take the transitive closu...
habedi/stack-exchange-dataset
16,758
Artificial Intelligence: Condition for BFS being optimal
<p>It is said in the book <em>Artificial Intelligence: A Modern Approach</em> for finding a solution on a tree using BFS that: </p>&#xA;&#xA;<blockquote>&#xA; <p>breadth-first search is optimal if the path cost is a nondecreasing function of the&#xA; depth of the node. The most common such scenario is that all action...
optimization artificial intelligence search algorithms search trees search problem
1
Artificial Intelligence: Condition for BFS being optimal -- (optimization artificial intelligence search algorithms search trees search problem) <p>It is said in the book <em>Artificial Intelligence: A Modern Approach</em> for finding a solution on a tree using BFS that: </p>&#xA;&#xA;<blockquote>&#xA; <p>breadth-firs...
habedi/stack-exchange-dataset
16,774
Can we push and pop both at a single transition in a PDA?
<p>Let say I have a pda :</p>&#xA;&#xA;<p>δ(q1,a,Z)=(q2,aZ)</p>&#xA;&#xA;<p>δ(q2,a,aZ)=(q2,bZ)</p>&#xA;&#xA;<p>Is this allowed....</p>&#xA;&#xA;<p>you can see that in <strong>δ(q2,a,aZ)=(q2,bZ)</strong>, we are basically popping 'a' and pushing 'b' for a single transition... </p>&#xA;&#xA;<p>Is this allowed for PDA ??<...
pushdown automata
1
Can we push and pop both at a single transition in a PDA? -- (pushdown automata) <p>Let say I have a pda :</p>&#xA;&#xA;<p>δ(q1,a,Z)=(q2,aZ)</p>&#xA;&#xA;<p>δ(q2,a,aZ)=(q2,bZ)</p>&#xA;&#xA;<p>Is this allowed....</p>&#xA;&#xA;<p>you can see that in <strong>δ(q2,a,aZ)=(q2,bZ)</strong>, we are basically popping 'a' and pu...
habedi/stack-exchange-dataset
16,777
Hidden Markov Model in Tagging Problem
<p>I try to understand the details regarding using <a href="http://en.wikipedia.org/wiki/Hidden_Markov_model" rel="nofollow">Hidden Markov Model</a> in Tagging Problem.</p>&#xA;&#xA;<p>The best concise description that I found is the <a href="http://www.cs.columbia.edu/~mcollins/hmms-spring2013.pdf" rel="nofollow">Cour...
machine learning natural language processing hidden markov models
1
Hidden Markov Model in Tagging Problem -- (machine learning natural language processing hidden markov models) <p>I try to understand the details regarding using <a href="http://en.wikipedia.org/wiki/Hidden_Markov_model" rel="nofollow">Hidden Markov Model</a> in Tagging Problem.</p>&#xA;&#xA;<p>The best concise descript...
habedi/stack-exchange-dataset
16,781
How to find the big O notation of $\log^b x$
<p>How would you determine big O notation for $\log^b x$? I don't think you can simply say $O(\log^b x)$, can you?</p>&#xA;&#xA;<p>If you can, then here is a better question: $x^3 + \log^b x$. How would you know if it's $O(x^3)$ or something else depending on the $b$ value?</p>&#xA;
asymptotics
1
How to find the big O notation of $\log^b x$ -- (asymptotics) <p>How would you determine big O notation for $\log^b x$? I don't think you can simply say $O(\log^b x)$, can you?</p>&#xA;&#xA;<p>If you can, then here is a better question: $x^3 + \log^b x$. How would you know if it's $O(x^3)$ or something else depending o...
habedi/stack-exchange-dataset
16,789
CNF Generator for Factoring Problems
<p>I've been reading these:</p>&#xA;&#xA;<ul>&#xA;<li><a href="https://cstheory.stackexchange.com/questions/6755/fast-reduction-from-rsa-to-sat">Fast Reduction from RSA to SAT</a></li>&#xA;<li><a href="http://cgi.cs.indiana.edu/~sabry/cnf.html" rel="nofollow noreferrer">CNF Generator for Factoring Problems</a> (Also ha...
algorithms graphs reductions factoring hamiltonian path
1
CNF Generator for Factoring Problems -- (algorithms graphs reductions factoring hamiltonian path) <p>I've been reading these:</p>&#xA;&#xA;<ul>&#xA;<li><a href="https://cstheory.stackexchange.com/questions/6755/fast-reduction-from-rsa-to-sat">Fast Reduction from RSA to SAT</a></li>&#xA;<li><a href="http://cgi.cs.indian...
habedi/stack-exchange-dataset
16,792
Prove that two different concatenations of relations are equivalent
<p>I've had this question on my exam today and I couldn't figure it out, I would like to know the answer.</p>&#xA;<p>The question:</p>&#xA;<blockquote>&#xA;<p>Given relations <span class="math-container">$R$</span>, <span class="math-container">$S$</span> on a set <span class="math-container">$U$</span>.</p>&#xA;<p><sp...
discrete mathematics
1
Prove that two different concatenations of relations are equivalent -- (discrete mathematics) <p>I've had this question on my exam today and I couldn't figure it out, I would like to know the answer.</p>&#xA;<p>The question:</p>&#xA;<blockquote>&#xA;<p>Given relations <span class="math-container">$R$</span>, <span clas...
habedi/stack-exchange-dataset
16,796
Convert a non-deterministic Turing machine into a deterministic Turing machine
<p>How can we systematically convert a non-deterministic Turing machine into a deterministic Turing machine that recognizes the same language?</p>&#xA;
turing machines simulation
1
Convert a non-deterministic Turing machine into a deterministic Turing machine -- (turing machines simulation) <p>How can we systematically convert a non-deterministic Turing machine into a deterministic Turing machine that recognizes the same language?</p>&#xA;
habedi/stack-exchange-dataset
16,800
Is there a low degree vertex in planar graphs?
<p>A book I read states "Since $G$ is planar, $G$ has a vertex $v$ of degree at most 5".</p>&#xA;&#xA;<ol>&#xA;<li>Is this true?</li>&#xA;<li>Why?</li>&#xA;<li>Does this theorem have a name?</li>&#xA;</ol>&#xA;
graphs
1
Is there a low degree vertex in planar graphs? -- (graphs) <p>A book I read states "Since $G$ is planar, $G$ has a vertex $v$ of degree at most 5".</p>&#xA;&#xA;<ol>&#xA;<li>Is this true?</li>&#xA;<li>Why?</li>&#xA;<li>Does this theorem have a name?</li>&#xA;</ol>&#xA;
habedi/stack-exchange-dataset
16,809
How to prove that the minimum square partition of a 3X2 rectangle has 3 squares
<p>This question is motivated by an older question about <a href="https://cs.stackexchange.com/q/16661/2755">tiling an orthogonal polygon with squares</a>.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/4furns.jpg" alt="enter image description here"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="https://i.s...
proof techniques computational geometry tiling
1
How to prove that the minimum square partition of a 3X2 rectangle has 3 squares -- (proof techniques computational geometry tiling) <p>This question is motivated by an older question about <a href="https://cs.stackexchange.com/q/16661/2755">tiling an orthogonal polygon with squares</a>.</p>&#xA;&#xA;<p><img src="https:...
habedi/stack-exchange-dataset
16,817
Is the $k$P$k$N-3SAT problem NP-complete?
<p>Consider the following 3-SAT variant defined over the variables $x_1,\ldots,x_n$. In the $k$P$k$N-3SAT problem each variable $x_j$, $j \in [n]$, occurs exactly $k$ times as a positive literal in $\phi$, and exactly $k$ times as a negative literal in $\phi$, where $\phi$ is a 3-CNF formula. The problem is then to dec...
complexity theory np complete satisfiability decision problem
1
Is the $k$P$k$N-3SAT problem NP-complete? -- (complexity theory np complete satisfiability decision problem) <p>Consider the following 3-SAT variant defined over the variables $x_1,\ldots,x_n$. In the $k$P$k$N-3SAT problem each variable $x_j$, $j \in [n]$, occurs exactly $k$ times as a positive literal in $\phi$, and e...
habedi/stack-exchange-dataset
16,820
Dynamic subtraction game
<p>I came across the following dynamic subtraction game:</p>&#xA;&#xA;<blockquote>&#xA; <p>There is one pile of n chips. The first player to move may remove as many chips as&#xA; desired, at least one chip but not the whole pile. Thereafter, the players alternate moving,&#xA; each player not being allowed to remove m...
algorithms dynamic programming game theory
1
Dynamic subtraction game -- (algorithms dynamic programming game theory) <p>I came across the following dynamic subtraction game:</p>&#xA;&#xA;<blockquote>&#xA; <p>There is one pile of n chips. The first player to move may remove as many chips as&#xA; desired, at least one chip but not the whole pile. Thereafter, the ...
habedi/stack-exchange-dataset
16,823
Maximum degree of concurrency in task dependency graphs
<p>I've been researching ways of modeling and executing tasks which are dependent on each other (but in an acyclic way) and came up with task graphs. But the question that's bugging me is how can I find out the maximum degree of concurrency in a given task graph.</p>&#xA;&#xA;<p>In my case, I'm talking of a relatively ...
optimization distributed systems concurrency
1
Maximum degree of concurrency in task dependency graphs -- (optimization distributed systems concurrency) <p>I've been researching ways of modeling and executing tasks which are dependent on each other (but in an acyclic way) and came up with task graphs. But the question that's bugging me is how can I find out the max...
habedi/stack-exchange-dataset
16,826
What is the minimum square partition of an almost-square rectangle?
<p>This question is motivated by an older question about <a href="https://cs.stackexchange.com/q/16661/2755">tiling an orthogonal polygon with squares</a>.&#xA;It is a generalisation of my former question about <a href="https://cs.stackexchange.com/q/16809/2755">how to prove that the minimum square partition of a 3X2 r...
computational geometry tiling
1
What is the minimum square partition of an almost-square rectangle? -- (computational geometry tiling) <p>This question is motivated by an older question about <a href="https://cs.stackexchange.com/q/16661/2755">tiling an orthogonal polygon with squares</a>.&#xA;It is a generalisation of my former question about <a hre...
habedi/stack-exchange-dataset
16,827
Algorithm to check whether a complete, undirected graph is fullfilling the triangle inequality
<p>I am searching for an algorithm to check whether a complete, undirected graph is fullfilling the triangle inequality( $\text{weight}(u,v) \le \text{weight}(u,w) + \text{weight}(w,v)$ for all vertices $u, v, w$).</p>&#xA;&#xA;<p>My first naive try was to use an algorithm for solving the all-pairs-shortest-path-proble...
algorithms graphs
1
Algorithm to check whether a complete, undirected graph is fullfilling the triangle inequality -- (algorithms graphs) <p>I am searching for an algorithm to check whether a complete, undirected graph is fullfilling the triangle inequality( $\text{weight}(u,v) \le \text{weight}(u,w) + \text{weight}(w,v)$ for all vertices...
habedi/stack-exchange-dataset
16,844
Microsoft Singularity : why closed
<p>I'm talking about <a href="http://research.microsoft.com/en-us/projects/singularity/">this one research project</a>:</p>&#xA;&#xA;<p>but MS closed it in 2008. I've read many articles about it, about high perfomance (30+% faster against tradinional monolithic kernels), much more secure etc. So it should be really a r...
operating systems os kernel
1
Microsoft Singularity : why closed -- (operating systems os kernel) <p>I'm talking about <a href="http://research.microsoft.com/en-us/projects/singularity/">this one research project</a>:</p>&#xA;&#xA;<p>but MS closed it in 2008. I've read many articles about it, about high perfomance (30+% faster against tradinional m...
habedi/stack-exchange-dataset
16,848
topological sort equivalence
<p>For a given acyclic graph $G$, a topological sort is an ordering $v_1, \dots, v_n$ of the vertices such that the arrows in the graph are all directed forward under that ordering.</p>&#xA;&#xA;<p>Question: can all topological orders of a graph $G$ be obtained from a single ordering by iteratively swapping two vertice...
graphs sorting
1
topological sort equivalence -- (graphs sorting) <p>For a given acyclic graph $G$, a topological sort is an ordering $v_1, \dots, v_n$ of the vertices such that the arrows in the graph are all directed forward under that ordering.</p>&#xA;&#xA;<p>Question: can all topological orders of a graph $G$ be obtained from a si...
habedi/stack-exchange-dataset
16,850
Is Dominosa NP-Hard?
<p>Dominosa is a relatively new puzzle game. It is played on an $(n+1)\times(n+2)$&#xA; grid. Before the game begins, the domino bones $\left(0,0\right),\left(0,1\right),\ldots,\left(n,n\right)$&#xA; are placed on the grid (constituting a perfect tiling). In the next step, the domino bones are hidden, leaving only t...
complexity theory np hard board games tiling
1
Is Dominosa NP-Hard? -- (complexity theory np hard board games tiling) <p>Dominosa is a relatively new puzzle game. It is played on an $(n+1)\times(n+2)$&#xA; grid. Before the game begins, the domino bones $\left(0,0\right),\left(0,1\right),\ldots,\left(n,n\right)$&#xA; are placed on the grid (constituting a perfect...
habedi/stack-exchange-dataset
16,853
computer science in the movies as an educational angle
<p>recently there have been a few questions on teaching CS in both cs.se &amp; tcs.se and there are many high-rated related questions on the two sites on the topic. thinking over the latest one made me realize that a lot of students get exposed to some aspects of STEM through the media (sometimes inaccurately), and one...
education
1
computer science in the movies as an educational angle -- (education) <p>recently there have been a few questions on teaching CS in both cs.se &amp; tcs.se and there are many high-rated related questions on the two sites on the topic. thinking over the latest one made me realize that a lot of students get exposed to so...
habedi/stack-exchange-dataset
17,854
Why does TSP require no repetition of cities?
<p>It seems odd to me that the TSP denies the possibility of repeated cities. The goal of this traveling salesman is to go as fast as possible and visit all of the cities, right? So what if it is faster to travel through a city you have already been to?</p>&#xA;
terminology traveling salesman
1
Why does TSP require no repetition of cities? -- (terminology traveling salesman) <p>It seems odd to me that the TSP denies the possibility of repeated cities. The goal of this traveling salesman is to go as fast as possible and visit all of the cities, right? So what if it is faster to travel through a city you have...
habedi/stack-exchange-dataset
17,862
How to I get a TM with lowest index?
<p>I'm struggling to understand this question:</p>&#xA;&#xA;<blockquote>&#xA; <p>Give an encoding of the Turing machine with lowest index that accepts anything but the empty set.</p>&#xA;</blockquote>&#xA;&#xA;<p>I know what an encoding of a Turing Machine is. But my professor didn't explain what the index of a Turing...
terminology turing machines
1
How to I get a TM with lowest index? -- (terminology turing machines) <p>I'm struggling to understand this question:</p>&#xA;&#xA;<blockquote>&#xA; <p>Give an encoding of the Turing machine with lowest index that accepts anything but the empty set.</p>&#xA;</blockquote>&#xA;&#xA;<p>I know what an encoding of a Turing ...
habedi/stack-exchange-dataset
17,864
Solving a graph problem by Gaussian elimination
<p>I have been given a graph with n nodes. Now, I have to color every node of this graph by k colors, number from 0 to k-1. Now, there is a rule.</p>&#xA;&#xA;<p>For a node $x$ with adjacent nodes $y_1 , y_2, y_3, y_4,... y_m$, $color(x)=(color(y_1)+color(y_2)+color(y_3)+...+color(y_m)) \pmod k $</p>&#xA;&#xA;<p>where ...
graphs linear algebra mathematical programming
1
Solving a graph problem by Gaussian elimination -- (graphs linear algebra mathematical programming) <p>I have been given a graph with n nodes. Now, I have to color every node of this graph by k colors, number from 0 to k-1. Now, there is a rule.</p>&#xA;&#xA;<p>For a node $x$ with adjacent nodes $y_1 , y_2, y_3, y_4,.....
habedi/stack-exchange-dataset
17,867
If the language of a TM is TMs which cannot self recognize, can the original TM?
<p>I've been thinking about this one for a while:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider the language of TMs which do not recognize themselves: $L_{s}=\{ \langle M\rangle ~|~ M \text{ does not accept } \langle M\rangle \}$. If $N$ is a TM where $L(N) \subseteq L_s$, then is $\langle N\rangle \in L_s$?</p>&#xA;</bl...
formal languages turing machines
1
If the language of a TM is TMs which cannot self recognize, can the original TM? -- (formal languages turing machines) <p>I've been thinking about this one for a while:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider the language of TMs which do not recognize themselves: $L_{s}=\{ \langle M\rangle ~|~ M \text{ does not acc...
habedi/stack-exchange-dataset
17,871
What is "dynamic" about dynamic programming?
<p>One of my seniors had a job interview and he was asked why it is called dynamic. He couldn't answer and after he gave up the interviewer said that there's nothing dynamic about it, its just called like that. That is hard for me to believe.</p>&#xA;&#xA;<p>Does it refer to the fact that the subproblems are solved dur...
terminology dynamic programming
1
What is "dynamic" about dynamic programming? -- (terminology dynamic programming) <p>One of my seniors had a job interview and he was asked why it is called dynamic. He couldn't answer and after he gave up the interviewer said that there's nothing dynamic about it, its just called like that. That is hard for me to beli...
habedi/stack-exchange-dataset
17,882
On the language of Turing machines not accepting their own encoding
<p>Let $\text{NOT-SELF} = \{\langle M \rangle : M \text{ is a TM that does not accept } \langle M \rangle \}$. How do you prove the following claim?</p>&#xA;&#xA;<blockquote>&#xA; <p>If $Q$ is a TM so that $L(Q) \subseteq \text{NOT-SELF}$, prove that $\langle Q \rangle \in \text{NOT-SELF}$.</p>&#xA;</blockquote>&#xA;
turing machines
1
On the language of Turing machines not accepting their own encoding -- (turing machines) <p>Let $\text{NOT-SELF} = \{\langle M \rangle : M \text{ is a TM that does not accept } \langle M \rangle \}$. How do you prove the following claim?</p>&#xA;&#xA;<blockquote>&#xA; <p>If $Q$ is a TM so that $L(Q) \subseteq \text{NO...
habedi/stack-exchange-dataset
17,883
Why does Patience sorting find the longest increasing subsequence?
<p>According to Wikipedia (<a href="https://en.wikipedia.org/w/index.php?title=Patience_sorting&amp;oldid=579146187" rel="noreferrer">link</a>), patience sort finds the longest increasing subsequence of a given sequence. Lets say the longest increasing subsequence of seq has length <code>correct(seq)</code></p>&#xA;&#x...
algorithms
1
Why does Patience sorting find the longest increasing subsequence? -- (algorithms) <p>According to Wikipedia (<a href="https://en.wikipedia.org/w/index.php?title=Patience_sorting&amp;oldid=579146187" rel="noreferrer">link</a>), patience sort finds the longest increasing subsequence of a given sequence. Lets say the lon...
habedi/stack-exchange-dataset
17,887
Can the String, $0^p 0^p 0^p$, be Used with the Pumping Lemma to Show that $w^r w w^r$ is Not Context Free?
<p>I'm trying to show that $L=\left\{w^rww^r:w \in \{0,1\}^*\right\}$ is not context free using the pumping lemma.</p>&#xA;&#xA;<p>I thought picking the string, $0^p0^p0^p$, would be a good candidate for this, but someone told me I might want to consider another string. Why is this? Any way in which I divide the string...
context free pumping lemma
1
Can the String, $0^p 0^p 0^p$, be Used with the Pumping Lemma to Show that $w^r w w^r$ is Not Context Free? -- (context free pumping lemma) <p>I'm trying to show that $L=\left\{w^rww^r:w \in \{0,1\}^*\right\}$ is not context free using the pumping lemma.</p>&#xA;&#xA;<p>I thought picking the string, $0^p0^p0^p$, would ...
habedi/stack-exchange-dataset
17,889
Show that a language is RE or recursive
<p>Consider these 2 languages:</p>&#xA;&#xA;<ul>&#xA;<li><blockquote>&#xA; <p>$L_{\ge5} = \left \{ \left&lt; M \right&gt; : M \text{ accepts at least 5 strings} \right\} $</p>&#xA;</blockquote></li>&#xA;<li><blockquote>&#xA; <p>$L_{&lt;5} = \left \{ \left&lt; M \right&gt; : M \text{ accepts fewer than 5 strings} \ri...
computability undecidability semi decidability
1
Show that a language is RE or recursive -- (computability undecidability semi decidability) <p>Consider these 2 languages:</p>&#xA;&#xA;<ul>&#xA;<li><blockquote>&#xA; <p>$L_{\ge5} = \left \{ \left&lt; M \right&gt; : M \text{ accepts at least 5 strings} \right\} $</p>&#xA;</blockquote></li>&#xA;<li><blockquote>&#xA; <...
habedi/stack-exchange-dataset
17,892
Proving that the language of TMs with finite left head moves is undecidable
<p>I'm trying to prove that the following language is undecidable:$$&#xA; \{ \langle M, w \rangle ~|~ M \text{ is a TM where its head moves left a finite number of times on } w \}&#xA;$$</p>&#xA;&#xA;<p>But I'm having a bit of trouble. I know I have to do some type of reduction, but I'm not really sure what. Can a Tu...
formal languages turing machines
1
Proving that the language of TMs with finite left head moves is undecidable -- (formal languages turing machines) <p>I'm trying to prove that the following language is undecidable:$$&#xA; \{ \langle M, w \rangle ~|~ M \text{ is a TM where its head moves left a finite number of times on } w \}&#xA;$$</p>&#xA;&#xA;<p>B...
habedi/stack-exchange-dataset
17,897
Regular expression over a monoid
<p>I'm looking for the name of the following concept.</p>&#xA;&#xA;<p>Given a monoid $(M,\oplus)$, and a finite set of generators $x_1,\ldots,x_n$. The generators are the alphabets.</p>&#xA;&#xA;<p>We define the regular expression on the <a href="http://en.wikipedia.org/wiki/Word_%28group_theory%29" rel="nofollow">word...
formal languages reference request
1
Regular expression over a monoid -- (formal languages reference request) <p>I'm looking for the name of the following concept.</p>&#xA;&#xA;<p>Given a monoid $(M,\oplus)$, and a finite set of generators $x_1,\ldots,x_n$. The generators are the alphabets.</p>&#xA;&#xA;<p>We define the regular expression on the <a href="...
habedi/stack-exchange-dataset
17,898
Complements of Linear Bounded Automata?
<p>Would switching the accept and reject states of an LBA A create a new LBA we'll say A' in which the language of A' is the complement of the language of A? I believe the answer is yes just by working out an example...but I'm not sure on a solid proof...nor am I sure if the fact that I am working with an LBA vs a regu...
formal languages turing machines linear bounded automata
1
Complements of Linear Bounded Automata? -- (formal languages turing machines linear bounded automata) <p>Would switching the accept and reject states of an LBA A create a new LBA we'll say A' in which the language of A' is the complement of the language of A? I believe the answer is yes just by working out an example.....
habedi/stack-exchange-dataset
17,904
How can I tell who is a truth teller and who is a liar?
<p>This is a problem that I was given for my data structures and algorithms class. I am not sure how to tackle this problem. Can I get some assistance?</p>&#xA;&#xA;<blockquote>&#xA; <p>At Hogwarts a new shipment of $n$ goblins has arrived. To be of any use, a goblin must be completely truthful (never lies). Unfortu...
algorithms
1
How can I tell who is a truth teller and who is a liar? -- (algorithms) <p>This is a problem that I was given for my data structures and algorithms class. I am not sure how to tackle this problem. Can I get some assistance?</p>&#xA;&#xA;<blockquote>&#xA; <p>At Hogwarts a new shipment of $n$ goblins has arrived. To be...
habedi/stack-exchange-dataset
17,908
Emulating boolean circuits using addition and multiplication (mod 5)
<p>I'm trying to use gates that do addition and multiplication modulo 5 to emulate logic gates.</p>&#xA;&#xA;<p>Assuming false and true are mapped to 0 and 1 respectively (with 2, 3, and 4 being invalid), I figured out I can map the operations like this:</p>&#xA;&#xA;<pre><code>a and b -&gt; a*b (mod 5)&#xA;a or b -&gt...
circuits modular arithmetic
1
Emulating boolean circuits using addition and multiplication (mod 5) -- (circuits modular arithmetic) <p>I'm trying to use gates that do addition and multiplication modulo 5 to emulate logic gates.</p>&#xA;&#xA;<p>Assuming false and true are mapped to 0 and 1 respectively (with 2, 3, and 4 being invalid), I figured out...
habedi/stack-exchange-dataset
17,914
How do I find the shortest representation for a subset of a powerset?
<p>I'm looking for an efficient algorithm for the following problem or a proof of NP-hardness.</p>&#xA;&#xA;<p>Let $\Sigma$ be a set and $A\subseteq\mathcal{P}(\Sigma)$ a set of subsets of $\Sigma$. Find a sequence $w\in \Sigma^*$ of least length such that for each $L\in A$, there is a $k\in\mathbb{N}$ such that $\{ w_...
algorithms formal languages encoding scheme
1
How do I find the shortest representation for a subset of a powerset? -- (algorithms formal languages encoding scheme) <p>I'm looking for an efficient algorithm for the following problem or a proof of NP-hardness.</p>&#xA;&#xA;<p>Let $\Sigma$ be a set and $A\subseteq\mathcal{P}(\Sigma)$ a set of subsets of $\Sigma$. Fi...
habedi/stack-exchange-dataset
17,917
Efficiently sampling shortest $s$-$t$ paths uniformly and independently at random
<p>Let $G$ be a graph, and let $s$ and $t$ be two vertices of $G$. Can we efficiently sample a shortest $s$-$t$ path uniformly and independently at random from the set of all shortest paths between $s$ and $t$? For simplicity, we can assume $G$ is simple, undirected and unweighted.</p>&#xA;&#xA;<p>Even in many restrict...
graphs reference request shortest path sampling
1
Efficiently sampling shortest $s$-$t$ paths uniformly and independently at random -- (graphs reference request shortest path sampling) <p>Let $G$ be a graph, and let $s$ and $t$ be two vertices of $G$. Can we efficiently sample a shortest $s$-$t$ path uniformly and independently at random from the set of all shortest p...
habedi/stack-exchange-dataset
17,924
Regular expression for the language where every a is surrounded by b's
<p>I had a question on an assignment where we were supposed to write a regular expression for a language where every $a$ in $w$ is immediately preceded and followed by a $b$. My answer was $\epsilon + (b + bab)^*$. The teacher pointed out that my answer makes an $a$ surrounded by at least two $b$s, which isn't correct....
formal languages regular languages regular expressions
1
Regular expression for the language where every a is surrounded by b's -- (formal languages regular languages regular expressions) <p>I had a question on an assignment where we were supposed to write a regular expression for a language where every $a$ in $w$ is immediately preceded and followed by a $b$. My answer was ...
habedi/stack-exchange-dataset
17,939
Subtracting binaries using two's complement
<p>I am trying to subtract these two binary numbers:</p>&#xA;&#xA;<p>$ 1110&#xA;- 1011$</p>&#xA;&#xA;<p>First I convert 1011 to two's complement by doing 1011 to 0100 and then adding 1 to get 0101. Then I add the first number to the converted two's complement number:</p>&#xA;&#xA;<p>$1110$</p>&#xA;&#xA;<p>$+$ $0101$</...
computer architecture binary arithmetic
1
Subtracting binaries using two's complement -- (computer architecture binary arithmetic) <p>I am trying to subtract these two binary numbers:</p>&#xA;&#xA;<p>$ 1110&#xA;- 1011$</p>&#xA;&#xA;<p>First I convert 1011 to two's complement by doing 1011 to 0100 and then adding 1 to get 0101. Then I add the first number to t...
habedi/stack-exchange-dataset
17,942
NFA or DFA for strings the contain exactly twice substring ab?
<p>Given the language with alphabet: $\{a, b, c\}$&#xA;Draw an NFA or DFA for all the strings that have exactly twice substrings $ab$ and at least on $c$.&#xA;I'm stuck with "exactly twice $ab$". Can somebody give me some ideas. It's also very good if you can suggest me the regular expression of this statement.</p>&#xA...
formal languages regular languages finite automata regular expressions
1
NFA or DFA for strings the contain exactly twice substring ab? -- (formal languages regular languages finite automata regular expressions) <p>Given the language with alphabet: $\{a, b, c\}$&#xA;Draw an NFA or DFA for all the strings that have exactly twice substrings $ab$ and at least on $c$.&#xA;I'm stuck with "exactl...
habedi/stack-exchange-dataset
17,945
Solutions to synchronization problem need to be executed in critical section
<p>I was reading about synchronization problems for cooperating processes and i learned that only hardware solutions like <code>test_and_wait()</code> and <code>compare_and_set()</code> are performed atomically at the hardware level and in all other software solutions like <strong>mutex</strong>, <strong>semaphore</str...
operating systems concurrency synchronization mutual exclusion
1
Solutions to synchronization problem need to be executed in critical section -- (operating systems concurrency synchronization mutual exclusion) <p>I was reading about synchronization problems for cooperating processes and i learned that only hardware solutions like <code>test_and_wait()</code> and <code>compare_and_se...
habedi/stack-exchange-dataset
17,946
Transforming SAT to Quadratic Programming in polynomial time
<p>I would like to show that Quadratic Programming is NP-hard.</p>&#xA;&#xA;<p>I am currently reading a couple of papers which state that QP is NP-Hard and prove it by transforming SAT to QP, however I am finding the diction quite tough since I am just a beginner in the field. Would anyone happen to know the answer to ...
complexity theory reductions np hard
1
Transforming SAT to Quadratic Programming in polynomial time -- (complexity theory reductions np hard) <p>I would like to show that Quadratic Programming is NP-hard.</p>&#xA;&#xA;<p>I am currently reading a couple of papers which state that QP is NP-Hard and prove it by transforming SAT to QP, however I am finding the ...
habedi/stack-exchange-dataset
17,956
Converting a recursive algorithm to a runtime function
<pre><code>void Sort(int A[], int left, int right)&#xA;{&#xA; int p;&#xA;&#xA; if (left &lt; right)&#xA; {&#xA; p = (right + left + 2)/3;&#xA;&#xA; Sort(A, left, left+p-1);&#xA; Sort(A, left+p, left+2*p-1);&#xA;&#xA; MergeSort(A, left+2*p, right);&#xA;&#xA; Merge3(A, left, le...
algorithm analysis runtime analysis recursion
1
Converting a recursive algorithm to a runtime function -- (algorithm analysis runtime analysis recursion) <pre><code>void Sort(int A[], int left, int right)&#xA;{&#xA; int p;&#xA;&#xA; if (left &lt; right)&#xA; {&#xA; p = (right + left + 2)/3;&#xA;&#xA; Sort(A, left, left+p-1);&#xA; Sort(A...
habedi/stack-exchange-dataset
17,974
Bipartite Graph Game
<p>So say we have a bipartite graph G=(X,Y,E). Let's make a game out of it.</p>&#xA;&#xA;<p>I go first. I pick a node in X. You go next. You pick a node in Y that is connected by an edge to the node I picked. Next it's my turn. I pick another node in X (must be a new one that hasn't been used before) that is also conne...
graphs combinatorics computer networks bipartite matching
1
Bipartite Graph Game -- (graphs combinatorics computer networks bipartite matching) <p>So say we have a bipartite graph G=(X,Y,E). Let's make a game out of it.</p>&#xA;&#xA;<p>I go first. I pick a node in X. You go next. You pick a node in Y that is connected by an edge to the node I picked. Next it's my turn. I pick a...
habedi/stack-exchange-dataset
17,975
Time Complexity of Regular Languages
<p>I wonder how I can go about proving that if a language L is decidable in o(nlog(n)) then L must be regular.</p>&#xA;&#xA;<p>I should probably mention that by "decidable" I mean "being decidable by single-tape deterministic turing machine". </p>&#xA;&#xA;<p>Thanks and regards&#xA;Guillermo</p>&#xA;
regular languages time complexity
1
Time Complexity of Regular Languages -- (regular languages time complexity) <p>I wonder how I can go about proving that if a language L is decidable in o(nlog(n)) then L must be regular.</p>&#xA;&#xA;<p>I should probably mention that by "decidable" I mean "being decidable by single-tape deterministic turing machine". ...
habedi/stack-exchange-dataset
17,987
What would dynamically-typed languages actually do if type enforcement was removed?
<p>I program in Python, which is a well-known dynamically typed language. I understand dynamic typing to mean mainly that "operations" (in a loose sense) in the language are either allowed or denied (raise an exception) based on the type of their operands, and that this type-checking is deferred as long as possible. My...
programming languages type theory type checking
1
What would dynamically-typed languages actually do if type enforcement was removed? -- (programming languages type theory type checking) <p>I program in Python, which is a well-known dynamically typed language. I understand dynamic typing to mean mainly that "operations" (in a loose sense) in the language are either al...
habedi/stack-exchange-dataset
17,992
Running time of this recursive relation: T(n) = (n/2)T(n/2) + O(n^2)
<p>I encountered these few recursive relations:</p>&#xA;&#xA;<p><code>T(n) = (n/2)T(n/2) + O(n^2)</code></p>&#xA;&#xA;<p><code>T(n) = T(n/2) + T(n/2-1) + ... + T(1) + O(n^2)</code></p>&#xA;&#xA;<p>I do notice that these recursions can be solved faster by DP. I'm just curious as to:</p>&#xA;&#xA;<ol>&#xA;<li>What's the ...
algorithm analysis asymptotics
1
Running time of this recursive relation: T(n) = (n/2)T(n/2) + O(n^2) -- (algorithm analysis asymptotics) <p>I encountered these few recursive relations:</p>&#xA;&#xA;<p><code>T(n) = (n/2)T(n/2) + O(n^2)</code></p>&#xA;&#xA;<p><code>T(n) = T(n/2) + T(n/2-1) + ... + T(1) + O(n^2)</code></p>&#xA;&#xA;<p>I do notice that t...
habedi/stack-exchange-dataset
17,999
Proof that Hamiltonian cycle/circuit with a specified edge is NP-complete
<p>I'm a little stuck on this question, any help would be appreciated!</p>&#xA;&#xA;<p>Given that the Hamiltonian Path (HP) and the Hamiltonian Circuit/Cycles (HC) problems are known to be NP-complete, show that HCE is NP-complete.</p>&#xA;&#xA;<p>HCE: Given an undirected graph G and an edge e of G, does G have a Hamil...
complexity theory np complete hamiltonian path
1
Proof that Hamiltonian cycle/circuit with a specified edge is NP-complete -- (complexity theory np complete hamiltonian path) <p>I'm a little stuck on this question, any help would be appreciated!</p>&#xA;&#xA;<p>Given that the Hamiltonian Path (HP) and the Hamiltonian Circuit/Cycles (HC) problems are known to be NP-co...
habedi/stack-exchange-dataset
18,009
Making feature vector from Gabor filters for classification
<p>My aim is to classify types of cars (Sedans,SUV,Hatchbacks) and earlier I was using corner features for classification but it didn't work out very well so now I am trying Gabor features.<br/></p>&#xA;&#xA;<p><a href="http://www.mathworks.in/matlabcentral/fileexchange/38844-gabor-image-features" rel="nofollow">code f...
machine learning neural networks image processing classification
1
Making feature vector from Gabor filters for classification -- (machine learning neural networks image processing classification) <p>My aim is to classify types of cars (Sedans,SUV,Hatchbacks) and earlier I was using corner features for classification but it didn't work out very well so now I am trying Gabor features.<...
habedi/stack-exchange-dataset
18,015
Can be non-deterministic Turing machine simulated by $k$-tape deterministic TM where $k=\infty$ with preserving polynomially-same accepting times?
<p>I know that for every $k$-tape DTM that runs in time $O(t(n))$, there exists a 1-tape DTM that runs in $O(t^2(n))$, no matter how large the $k$ (the $k$-part is a formulation from Wikipedia). But what if $k=\infty$?</p>&#xA;&#xA;<p>If I understand it right, if $k=\infty$, then the alphabet of the $\infty$-tape DTM i...
turing machines time complexity
1
Can be non-deterministic Turing machine simulated by $k$-tape deterministic TM where $k=\infty$ with preserving polynomially-same accepting times? -- (turing machines time complexity) <p>I know that for every $k$-tape DTM that runs in time $O(t(n))$, there exists a 1-tape DTM that runs in $O(t^2(n))$, no matter how lar...
habedi/stack-exchange-dataset
18,033
What is growth of $\psi_q(m) = \min \{ p: m ∣ (q^p−1) \}$ for fixed $q$?
<p>I have to estimate the computational complexity of some algorithm that does $\psi_q(m)$ iterations. Assume that all inputs $m$ are coprime to $q$.</p>&#xA;&#xA;<p>So I need to know what growth the $\psi(m)$ has.</p>&#xA;
asymptotics number theory
1
What is growth of $\psi_q(m) = \min \{ p: m ∣ (q^p−1) \}$ for fixed $q$? -- (asymptotics number theory) <p>I have to estimate the computational complexity of some algorithm that does $\psi_q(m)$ iterations. Assume that all inputs $m$ are coprime to $q$.</p>&#xA;&#xA;<p>So I need to know what growth the $\psi(m)$ has.</...
habedi/stack-exchange-dataset
18,041
Wiring Length Minimization
<p>My Problem is like this:</p>&#xA;&#xA;<ol>&#xA;<li><p>I have a physical layout represented as a graph. The Nodes represents hooks/ducts where a wire can anchor and Edges are the possible connection between 2 nodes from where wire can go.</p></li>&#xA;<li><p>There are some special Nodes, called splitters, from where ...
algorithms graphs optimization
1
Wiring Length Minimization -- (algorithms graphs optimization) <p>My Problem is like this:</p>&#xA;&#xA;<ol>&#xA;<li><p>I have a physical layout represented as a graph. The Nodes represents hooks/ducts where a wire can anchor and Edges are the possible connection between 2 nodes from where wire can go.</p></li>&#xA;<li...
habedi/stack-exchange-dataset
18,051
Complexity of the Kitten Adoption problem
<p>This came up while I was trying to answer this question on <a href="https://cs.stackexchange.com/questions/18041/wiring-length-minimization">Wiring Length Minimization</a>. I was going to call this the "polygamous marriage" problem, but the internet, so kittens. Yay!</p>&#xA;&#xA;<p>Suppose we have $M$ kittens th...
algorithms complexity theory
1
Complexity of the Kitten Adoption problem -- (algorithms complexity theory) <p>This came up while I was trying to answer this question on <a href="https://cs.stackexchange.com/questions/18041/wiring-length-minimization">Wiring Length Minimization</a>. I was going to call this the "polygamous marriage" problem, but th...
habedi/stack-exchange-dataset
18,052
Rules regarding Chomsky Normal Form (CNF) grammars
<p>I'm writing a context-free grammar that I hope will be in Chomsky Normal Form, and I have two questions:</p>&#xA;&#xA;<ol>&#xA;<li><p>Can I use a single variable (a non-terminal) on the left-hand side of multiple rules?</p></li>&#xA;<li><p>Can I use a single variable (a non-terminal) twice on the right-hand side of ...
context free formal grammars
1
Rules regarding Chomsky Normal Form (CNF) grammars -- (context free formal grammars) <p>I'm writing a context-free grammar that I hope will be in Chomsky Normal Form, and I have two questions:</p>&#xA;&#xA;<ol>&#xA;<li><p>Can I use a single variable (a non-terminal) on the left-hand side of multiple rules?</p></li>&#xA...
habedi/stack-exchange-dataset
18,054
Defining a "repeat until"-construct in Denotational semantics
<p><strong>My Problem is:</strong> to define a "repeat until"-construct in terms of Denotational semantics. I made an attempt and now i need to know if i made it right.</p>&#xA;&#xA;<p><strong>The Conditions are</strong>: i used the language "While" as specified in "Semantics with Applications" by Nielson &amp; Nielson...
semantics denotational semantics
1
Defining a "repeat until"-construct in Denotational semantics -- (semantics denotational semantics) <p><strong>My Problem is:</strong> to define a "repeat until"-construct in terms of Denotational semantics. I made an attempt and now i need to know if i made it right.</p>&#xA;&#xA;<p><strong>The Conditions are</strong>...
habedi/stack-exchange-dataset
18,058
Proving L = {$ { a^{2^n} \ | \ n \ge 0 } $} is not regular by use of Pumping Lemma
<p>I've been struggling with this problem for quite a while now and every explanation I have managed to find doesn't seem to correctly solve it.</p>&#xA;&#xA;<p>We have the language L = {$ { a^{2^n} \ | \ n \ge 0 } $} and we need to prove that it is not regular by use of the pumping lemma.</p>&#xA;&#xA;<p>(i.e. L is wo...
regular languages pumping lemma
1
Proving L = {$ { a^{2^n} \ | \ n \ge 0 } $} is not regular by use of Pumping Lemma -- (regular languages pumping lemma) <p>I've been struggling with this problem for quite a while now and every explanation I have managed to find doesn't seem to correctly solve it.</p>&#xA;&#xA;<p>We have the language L = {$ { a^{2^n} \...
habedi/stack-exchange-dataset
18,079
Computing parity function on n variables with O(n) gates
<p>Sipser example 9.29</p>&#xA;&#xA;<p>He says: "one way to do so (compute the parity function with O(n) gates. One way to do so is build a binary tree that computes the XOR function, where the XOR function is the same as parity on 2 variables, and then implement each XOR gate with two NOTs and two ANDs, and one OR. .....
complexity theory circuits
1
Computing parity function on n variables with O(n) gates -- (complexity theory circuits) <p>Sipser example 9.29</p>&#xA;&#xA;<p>He says: "one way to do so (compute the parity function with O(n) gates. One way to do so is build a binary tree that computes the XOR function, where the XOR function is the same as parity on...
habedi/stack-exchange-dataset
18,089
Uniformly random efficient sampling of shortest s-t paths, with optimal random bits
<p>Motivated by <a href="https://cs.stackexchange.com/q/17917/2755">Efficiently sampling shortest s-t paths uniformly and independently at random</a>,</p>&#xA;<p>The answers give methods of randomly sampling shortest <span class="math-container">$s\text{-}t$</span> paths. However, they use a lot of seemingly unnecessar...
graphs shortest path sampling randomness
1
Uniformly random efficient sampling of shortest s-t paths, with optimal random bits -- (graphs shortest path sampling randomness) <p>Motivated by <a href="https://cs.stackexchange.com/q/17917/2755">Efficiently sampling shortest s-t paths uniformly and independently at random</a>,</p>&#xA;<p>The answers give methods of ...
habedi/stack-exchange-dataset
18,092
How do you find out if the polygon lies to the right of a regular vertex?
<p>In section 3.2 of the book <a href="http://people.inf.elte.hu/fekete/algoritmusok_msc/terinfo_geom/konyvek/Computational%20Geometry%20-%20Algorithms%20and%20Applications,%203rd%20Ed.pdf" rel="nofollow noreferrer"><em>Computational Geometry: Algorithms and Applications</em></a> (by Berg et al.), the authors describe ...
algorithms data structures computational geometry doubly connected edge list
1
How do you find out if the polygon lies to the right of a regular vertex? -- (algorithms data structures computational geometry doubly connected edge list) <p>In section 3.2 of the book <a href="http://people.inf.elte.hu/fekete/algoritmusok_msc/terinfo_geom/konyvek/Computational%20Geometry%20-%20Algorithms%20and%20Appl...
habedi/stack-exchange-dataset
18,099
Is the set of non-deterministic Turing machines countable?
<p>We know that deterministic TMs are countable (enumeration). Does the same hold for NTMs? Are TMs and NTMS equinumerous?</p>&#xA;
turing machines enumeration
1
Is the set of non-deterministic Turing machines countable? -- (turing machines enumeration) <p>We know that deterministic TMs are countable (enumeration). Does the same hold for NTMs? Are TMs and NTMS equinumerous?</p>&#xA;
habedi/stack-exchange-dataset
18,107
Understanding Big O
<p>I'm just trying to get my understanding of big O down. I know the concept and the basics but I'm a bit confused about what it means to be <em>equal</em> to big O of something.</p>&#xA;&#xA;<p>For example, is $2^{2n} = O(2^{100n})$? From my understanding it is, since $2^{2n}$ is "faster" than $2^{100n}$, and so compl...
asymptotics
1
Understanding Big O -- (asymptotics) <p>I'm just trying to get my understanding of big O down. I know the concept and the basics but I'm a bit confused about what it means to be <em>equal</em> to big O of something.</p>&#xA;&#xA;<p>For example, is $2^{2n} = O(2^{100n})$? From my understanding it is, since $2^{2n}$ is "...
habedi/stack-exchange-dataset
18,113
About proofs in descriptive complexity
<p>In descriptive complexity, we have theorems that look like $\mathrm{ESO} = \mathrm{NP}$ or "on linearly ordered structures, $FO(LFP) = P$", but I don't really understand the proofs of those.</p>&#xA;&#xA;<p>For the latter, the intuitive equality really means that the statement "$\mathcal A\models \varphi$" can be ve...
descriptive complexity
1
About proofs in descriptive complexity -- (descriptive complexity) <p>In descriptive complexity, we have theorems that look like $\mathrm{ESO} = \mathrm{NP}$ or "on linearly ordered structures, $FO(LFP) = P$", but I don't really understand the proofs of those.</p>&#xA;&#xA;<p>For the latter, the intuitive equality real...
habedi/stack-exchange-dataset
18,126
CFG for $\{a^ib^jc^k \mid i \neq j+k\}$
<p>I am trying to design a context-free grammar for the language $L = \{a^ib^jc^k \mid i\neq j+k\}$ over the alphabet $\Sigma = \{a,b,c\}$.</p>&#xA;&#xA;<p>I know that I can split this up into the union of two cfg's $S_1$ and $S_2$,&#xA;<br>where $S_1$ is the case where $\#_a \lt \#_b + \#_c$, &#xA;<br>and $S_2$ is the...
formal languages context free formal grammars
1
CFG for $\{a^ib^jc^k \mid i \neq j+k\}$ -- (formal languages context free formal grammars) <p>I am trying to design a context-free grammar for the language $L = \{a^ib^jc^k \mid i\neq j+k\}$ over the alphabet $\Sigma = \{a,b,c\}$.</p>&#xA;&#xA;<p>I know that I can split this up into the union of two cfg's $S_1$ and $S_...
habedi/stack-exchange-dataset
18,130
How does taking modulo 1 make sense?
<p>I need some help understanding the problem statement in CLRS 11.3-4 pg 269. It says:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider a hash table of size $m = 1000$ and a corresponding hash function &#xA; $ h(k) =\left \lfloor m(kA \bmod 1) \right \rfloor $&#xA; for $A = (\sqrt5 - 1)/2$. Compute the locations to whi...
algorithms terminology hash
1
How does taking modulo 1 make sense? -- (algorithms terminology hash) <p>I need some help understanding the problem statement in CLRS 11.3-4 pg 269. It says:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider a hash table of size $m = 1000$ and a corresponding hash function &#xA; $ h(k) =\left \lfloor m(kA \bmod 1) \right ...
habedi/stack-exchange-dataset
18,137
Is the image of a function the codomain of a function?
<p>Here is a definition from the functions section in my discrete math textbook (Discrete Mathematics and its Applications 7e, Rosen 2012):</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $f$ be a function from $A$ to $B$, and let $S$ be a subset of $A$. The image&#xA; of S under the function $f$ is the subset of $B$ that cons...
discrete mathematics sets
1
Is the image of a function the codomain of a function? -- (discrete mathematics sets) <p>Here is a definition from the functions section in my discrete math textbook (Discrete Mathematics and its Applications 7e, Rosen 2012):</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $f$ be a function from $A$ to $B$, and let $S$ be a sub...
habedi/stack-exchange-dataset
18,147
Traveling Salesman's Tour Approx Algorithm: is this really a Hamiltonian Path?
<p>I'm given this problem:</p>&#xA;&#xA;<p>Consider the following closest-point heuristic for building an approximate traveling-salesman tour. Begin with a trivial cycle consisting of a single arbitrarily chosen vertex. At each step, identify the vertex u that is not on the cycle but whose distance to any vertex on th...
traveling salesman spanning trees approximation algorithms
1
Traveling Salesman's Tour Approx Algorithm: is this really a Hamiltonian Path? -- (traveling salesman spanning trees approximation algorithms) <p>I'm given this problem:</p>&#xA;&#xA;<p>Consider the following closest-point heuristic for building an approximate traveling-salesman tour. Begin with a trivial cycle consis...
habedi/stack-exchange-dataset
18,159
Is the set-partition problem polynomial time reducible to the subset-sum problem?
<p>There are many solutions on the web showing that the subset-sum problem is polynomial time reducible to the set-partition problem. However, during my search, I came across the following <a href="https://www.google.ie/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;ved=0CD0QFjAC&amp;url=http%3A%2F%2F...
sets polynomial time
1
Is the set-partition problem polynomial time reducible to the subset-sum problem? -- (sets polynomial time) <p>There are many solutions on the web showing that the subset-sum problem is polynomial time reducible to the set-partition problem. However, during my search, I came across the following <a href="https://www.go...
habedi/stack-exchange-dataset
18,160
shortest cost tiling of path to x distance
<p>I have a distance to get to, and square tiles that have a cost and length. EX: a 1 unit block that costs 1 unit to purchase.</p>&#xA;&#xA;<p>So if I was trying to get 10 units away. I would require 10 of the 1 unit blocks at that point for a total cost of 10.</p>&#xA;&#xA;<p>So another example would be a distance of...
algorithms
1
shortest cost tiling of path to x distance -- (algorithms) <p>I have a distance to get to, and square tiles that have a cost and length. EX: a 1 unit block that costs 1 unit to purchase.</p>&#xA;&#xA;<p>So if I was trying to get 10 units away. I would require 10 of the 1 unit blocks at that point for a total cost of 10...
habedi/stack-exchange-dataset
18,169
Extension of Time Hierarchy Theorem to LBAs
<p>I am trying to prove:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let there be a constructible function $t: ~\mathcal{N} \to \mathcal{N}$. Then there exists a language $L$ where $L$ is decidable by an LBA in $O(t(n))$ time, but not $o\left(\frac{t(n)}{\log t(n)}\right)$ time. You may assume that LBAs have a fixed tape alphab...
complexity theory automata
1
Extension of Time Hierarchy Theorem to LBAs -- (complexity theory automata) <p>I am trying to prove:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let there be a constructible function $t: ~\mathcal{N} \to \mathcal{N}$. Then there exists a language $L$ where $L$ is decidable by an LBA in $O(t(n))$ time, but not $o\left(\frac{t(n)...
habedi/stack-exchange-dataset
18,181
Precise definition of term: *schema*
<p>Does the term <em>schema</em>, in the context of describing a structure, refer to the actual structure of the data, or the <em>description</em> of this structure? I.e. can I talk about the schema of an entity without a <em>schema language</em>?</p>&#xA;&#xA;<p>For example, suppose I am writing documentation for some...
terminology encoding scheme
1
Precise definition of term: *schema* -- (terminology encoding scheme) <p>Does the term <em>schema</em>, in the context of describing a structure, refer to the actual structure of the data, or the <em>description</em> of this structure? I.e. can I talk about the schema of an entity without a <em>schema language</em>?</p...
habedi/stack-exchange-dataset
18,190
Convert $\lnot(x \oplus y \oplus z\oplus a)$ to CNF
<p>How to convert the below formula to <a href="http://en.wikipedia.org/wiki/Conjunctive_normal_form" rel="nofollow noreferrer">CNF</a>?</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$\lnot(x \oplus y \oplus z\oplus a)$</span></p>&#xA;</blockquote>&#xA;
logic normal forms
1
Convert $\lnot(x \oplus y \oplus z\oplus a)$ to CNF -- (logic normal forms) <p>How to convert the below formula to <a href="http://en.wikipedia.org/wiki/Conjunctive_normal_form" rel="nofollow noreferrer">CNF</a>?</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$\lnot(x \oplus y \oplus z\oplus a)$</span></p>&#x...
habedi/stack-exchange-dataset
18,194
Algorithm to add sum of every possible xor-sum sub-array
<p>I participated in one algorithmic competition. I got stuck in one problem, I am asking the same here.</p>&#xA;&#xA;<p><strong>Problem Statement</strong></p>&#xA;&#xA;<p>XOR-sum of a sub-array is to XOR all the numbers of that sub-array.&#xA;An array is given to you, you have to add all possible such XOR-sub-array.</...
algorithms efficiency
1
Algorithm to add sum of every possible xor-sum sub-array -- (algorithms efficiency) <p>I participated in one algorithmic competition. I got stuck in one problem, I am asking the same here.</p>&#xA;&#xA;<p><strong>Problem Statement</strong></p>&#xA;&#xA;<p>XOR-sum of a sub-array is to XOR all the numbers of that sub-arr...
habedi/stack-exchange-dataset
18,203
Prove that all non-recursive languages are infinite
<p>I am wondering this statement above [the title] is true or not.</p>&#xA;&#xA;<p>Here is what I've already had : non-recursive means undecidable.</p>&#xA;&#xA;<p>I've read this Are all infinite languages undecidable?</p>&#xA;&#xA;<p>which says:</p>&#xA;&#xA;<p>If a Language is undecidable(non-recursive), there must b...
formal languages turing machines
1
Prove that all non-recursive languages are infinite -- (formal languages turing machines) <p>I am wondering this statement above [the title] is true or not.</p>&#xA;&#xA;<p>Here is what I've already had : non-recursive means undecidable.</p>&#xA;&#xA;<p>I've read this Are all infinite languages undecidable?</p>&#xA;&#x...
habedi/stack-exchange-dataset