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
6,865
Advantages of amortized analysis
<p>I understood what amortized analysis does, but can anyone tell me what is the main purpose of this kind of analysis?</p>&#xA;&#xA;<p>What I understood:</p>&#xA;&#xA;<p>Let say we have 3 three operations a,b,c used 1,2 and 3 times to achieve d. Based on aggregate analysis a,b and c are used 2 times each. Is this corr...
algorithm analysis proof techniques amortized analysis
1
Advantages of amortized analysis -- (algorithm analysis proof techniques amortized analysis) <p>I understood what amortized analysis does, but can anyone tell me what is the main purpose of this kind of analysis?</p>&#xA;&#xA;<p>What I understood:</p>&#xA;&#xA;<p>Let say we have 3 three operations a,b,c used 1,2 and 3 ...
habedi/stack-exchange-dataset
6,874
Show that a language belongs to the polynomial hierarchy
<p>I think the following exercise is to "warm up", but nevertheless it's quite difficult for me:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $k \in \mathbb{N}$ and let $L \in \Sigma_k$. Show that also $L^{*} \in \Sigma_k$.</p>&#xA;</blockquote>&#xA;&#xA;<p>The following details from my lecture notes seem to be useful:</p>&#...
complexity theory time complexity
1
Show that a language belongs to the polynomial hierarchy -- (complexity theory time complexity) <p>I think the following exercise is to "warm up", but nevertheless it's quite difficult for me:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $k \in \mathbb{N}$ and let $L \in \Sigma_k$. Show that also $L^{*} \in \Sigma_k$.</p>&#x...
habedi/stack-exchange-dataset
6,877
reducing subset-sum to partition
<blockquote>&#xA;<p><strong>Subset-sum:</strong> Given a list of numbers, find if a non-empty sublist has sum 0 (there's a variation where we want sum=k instead of 0, but 0 is easier for analysis)</p>&#xA;<p><strong>Partition:</strong> Given a list, can it be partitioned into two non-empty sublists with equal sum?</p>&...
complexity theory np complete reductions partitions
1
reducing subset-sum to partition -- (complexity theory np complete reductions partitions) <blockquote>&#xA;<p><strong>Subset-sum:</strong> Given a list of numbers, find if a non-empty sublist has sum 0 (there's a variation where we want sum=k instead of 0, but 0 is easier for analysis)</p>&#xA;<p><strong>Partition:</st...
habedi/stack-exchange-dataset
6,879
Showing the function=? is impossible
<p>Here's a lab from a first-year computer science course, taught in Scheme: <a href="https://www.student.cs.uwaterloo.ca/~cs135/assns/a07/a07.pdf">https://www.student.cs.uwaterloo.ca/~cs135/assns/a07/a07.pdf</a></p>&#xA;&#xA;<p>At the end of the lab, it basically presents the halting problem, and shows that it is impo...
undecidability lambda calculus halting problem
1
Showing the function=? is impossible -- (undecidability lambda calculus halting problem) <p>Here's a lab from a first-year computer science course, taught in Scheme: <a href="https://www.student.cs.uwaterloo.ca/~cs135/assns/a07/a07.pdf">https://www.student.cs.uwaterloo.ca/~cs135/assns/a07/a07.pdf</a></p>&#xA;&#xA;<p>At...
habedi/stack-exchange-dataset
6,883
Gödelization in Turing Machine
<p>I was looking at Gödelization in Theory of Computation course. I could understand the Gödel numbering concepts, but couldn't understand its importance in Theory of Computation. Could anyone please point to some good materials or point out its importance.</p>&#xA;
formal languages turing machines
1
Gödelization in Turing Machine -- (formal languages turing machines) <p>I was looking at Gödelization in Theory of Computation course. I could understand the Gödel numbering concepts, but couldn't understand its importance in Theory of Computation. Could anyone please point to some good materials or point out its impor...
habedi/stack-exchange-dataset
6,885
Strict polynomial hierarchy and reduction
<p>The following exercise gives me headaches:</p>&#xA;&#xA;<blockquote>&#xA; <p>Show: If the polynomial hierarchy is strict (i.e. $\forall k \in \mathbb{N}. \Sigma_k \neq \Sigma_{k+1}$), then there is no $\text{PH}$-complete problem for polynomial-time reductions (i.e. there is no problem $\text{P} \in \text{PH}$ such...
complexity theory time complexity
1
Strict polynomial hierarchy and reduction -- (complexity theory time complexity) <p>The following exercise gives me headaches:</p>&#xA;&#xA;<blockquote>&#xA; <p>Show: If the polynomial hierarchy is strict (i.e. $\forall k \in \mathbb{N}. \Sigma_k \neq \Sigma_{k+1}$), then there is no $\text{PH}$-complete problem for p...
habedi/stack-exchange-dataset
6,893
Is this intersection of DFAs correct?
<p>I'm constructing a <a href="http://en.wikipedia.org/wiki/Deterministic_finite_automaton" rel="nofollow noreferrer">deterministic finite automata</a> (DFA) for a language of all strings defined over $\{0,1\}$ whose length is even and number of $1$s is odd. I constructed each DFA separately and then combined:</p>&#xA;...
automata regular languages finite automata
1
Is this intersection of DFAs correct? -- (automata regular languages finite automata) <p>I'm constructing a <a href="http://en.wikipedia.org/wiki/Deterministic_finite_automaton" rel="nofollow noreferrer">deterministic finite automata</a> (DFA) for a language of all strings defined over $\{0,1\}$ whose length is even an...
habedi/stack-exchange-dataset
6,894
Bellman-Ford algorithm - Why can edges be updated out of order?
<p>The <a href="http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm">Bellman-Ford algorithm</a> determines the shortest path from a source $s$ to all other vertices. Initially the distance between $s$ and all other vertices is set to $\infty$. Then the shortest path from $s$ to each vertex is computed; this goe...
algorithms shortest path
1
Bellman-Ford algorithm - Why can edges be updated out of order? -- (algorithms shortest path) <p>The <a href="http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm">Bellman-Ford algorithm</a> determines the shortest path from a source $s$ to all other vertices. Initially the distance between $s$ and all other ver...
habedi/stack-exchange-dataset
6,895
Scala as a language for Generic Programming
<p>I posted <a href="https://softwareengineering.stackexchange.com/q/177037/6638">the same Q at programmers.SE</a>, but nobody really helps.</p>&#xA;&#xA;<p>In the paper “<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.110.122&amp;rep=rep1&amp;type=pdf" rel="nofollow noreferrer">An Extended Comparativ...
programming languages typing
1
Scala as a language for Generic Programming -- (programming languages typing) <p>I posted <a href="https://softwareengineering.stackexchange.com/q/177037/6638">the same Q at programmers.SE</a>, but nobody really helps.</p>&#xA;&#xA;<p>In the paper “<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.110.1...
habedi/stack-exchange-dataset
6,897
Optimization-factoring $\le_p$ Decision-factoring
<p>Optimization factoring:<br>&#xA;Input: $N\in \mathbb{N}$<br>&#xA;Output: All prime factors of $N$</p>&#xA;&#xA;<p>Decision factoring:<br>&#xA;Input: $N, k\in \mathbb{N}$<br>&#xA;Output: True iff $N$ has a prime factor of at most $k$</p>&#xA;&#xA;<p>How can I solve the optimization problem in polynomial time if the d...
optimization reductions factoring
1
Optimization-factoring $\le_p$ Decision-factoring -- (optimization reductions factoring) <p>Optimization factoring:<br>&#xA;Input: $N\in \mathbb{N}$<br>&#xA;Output: All prime factors of $N$</p>&#xA;&#xA;<p>Decision factoring:<br>&#xA;Input: $N, k\in \mathbb{N}$<br>&#xA;Output: True iff $N$ has a prime factor of at most...
habedi/stack-exchange-dataset
6,901
What is the time complexity of the following program?
<p>Please help me calculate the time complexity of the following program.</p>&#xA;&#xA;<pre><code>int fun (int n) {&#xA; if (n &lt;= 2)&#xA; return 1;&#xA; else&#xA; return fun(sqrt(n)) + n;&#xA;}&#xA;</code></pre>&#xA;&#xA;<p>Please explain.</p>&#xA;&#xA;<p>There were four choices given.</p>&#xA;&#xA;<ol>&#xA;<l...
algorithm analysis runtime analysis landau notation
1
What is the time complexity of the following program? -- (algorithm analysis runtime analysis landau notation) <p>Please help me calculate the time complexity of the following program.</p>&#xA;&#xA;<pre><code>int fun (int n) {&#xA; if (n &lt;= 2)&#xA; return 1;&#xA; else&#xA; return fun(sqrt(n)) + n;&#xA;}&#xA;</...
habedi/stack-exchange-dataset
6,907
Seeking Alternate Proof Regarding Closure Of Recursively Enumerable Languages
<p>So I would like to show that the class of Recursively Enumerable languages are closed under the shrink operation. In other words, $\text{shrink}_a(L) = \{\text{shrink}_a(w)\mid w\in L\}$ and where $\text{shrink}_a(w)$ is the string formed from $w$ by replacing every maximal substring of two or more $a$'s by a single...
formal languages computability proof techniques closure properties
1
Seeking Alternate Proof Regarding Closure Of Recursively Enumerable Languages -- (formal languages computability proof techniques closure properties) <p>So I would like to show that the class of Recursively Enumerable languages are closed under the shrink operation. In other words, $\text{shrink}_a(L) = \{\text{shrink}...
habedi/stack-exchange-dataset
6,912
NP-complete reductions
<p>I've read that "Every problem in NP can be reduced to every NP-complete problem". </p>&#xA;&#xA;<p>My question is on the choice of the word "reduce". If I were to "reduce" a polynomial problem in NP to an exponential problem in NP, I just plain feel weird about using the word "reduce" because I feel like I've increa...
complexity theory terminology np complete reductions
1
NP-complete reductions -- (complexity theory terminology np complete reductions) <p>I've read that "Every problem in NP can be reduced to every NP-complete problem". </p>&#xA;&#xA;<p>My question is on the choice of the word "reduce". If I were to "reduce" a polynomial problem in NP to an exponential problem in NP, I ju...
habedi/stack-exchange-dataset
6,917
Decidability of languages
<blockquote>&#xA; <p>$L_1$ is a recursively enumerable language over some alphabet&#xA; $\Sigma$. An algorithm effectively enumerates its words as $w_1, w_2, ...$. <br> $L_2$ is another language over $\Sigma \cup \{\#\}$ as&#xA; $\{w_i\#w_j : w_i, w_j \in L_1, i &lt; j\}$<br> Consider the following&#xA; assertions....
formal languages computability
1
Decidability of languages -- (formal languages computability) <blockquote>&#xA; <p>$L_1$ is a recursively enumerable language over some alphabet&#xA; $\Sigma$. An algorithm effectively enumerates its words as $w_1, w_2, ...$. <br> $L_2$ is another language over $\Sigma \cup \{\#\}$ as&#xA; $\{w_i\#w_j : w_i, w_j \in...
habedi/stack-exchange-dataset
6,919
Getting negative cycle using Bellman Ford
<p>I have to find a negative cycle in a directed weighted graph. I know how the Bellman Ford algorithm works, and that it tells me if there is a reachable negative cycle. But it does not explicitly name it.</p>&#xA;<p>How can I get the actual path <span class="math-container">$v1, v2, \ldots vk, v1$</span> of the cycle...
algorithms graphs shortest path
1
Getting negative cycle using Bellman Ford -- (algorithms graphs shortest path) <p>I have to find a negative cycle in a directed weighted graph. I know how the Bellman Ford algorithm works, and that it tells me if there is a reachable negative cycle. But it does not explicitly name it.</p>&#xA;<p>How can I get the actua...
habedi/stack-exchange-dataset
6,929
Two functions $g(n)$, $G(n)$ such that $g(n) = o(G(n))$ but $g(n+1) \neq o(G(n))$
<p>The title of the question expresses what I'm looking for - this is to help me better understand the prerequisites for the <a href="http://en.wikipedia.org/wiki/Time_hierarchy_theorem#Non-deterministic_time_hierarchy_theorem">Non-Deterministic Time Hierarchy Theorem</a></p>&#xA;&#xA;<p>For instance, the Arora-Barak b...
complexity theory time complexity asymptotics landau notation
1
Two functions $g(n)$, $G(n)$ such that $g(n) = o(G(n))$ but $g(n+1) \neq o(G(n))$ -- (complexity theory time complexity asymptotics landau notation) <p>The title of the question expresses what I'm looking for - this is to help me better understand the prerequisites for the <a href="http://en.wikipedia.org/wiki/Time_hie...
habedi/stack-exchange-dataset
6,933
Showing that Independent set of size $k$ can be decided using logarithmic space
<p>An independent set $I$ is a subset of the nodes of a graph $G$ where: no 2 nodes in $I$ are adjacent in $G$. For natural number $k$, the problem $k-\text{IND}$ asks if there is an independent set of size $k$.</p>&#xA;&#xA;<p>I'd really love your help with showing that $k-\text{IND} \in {\sf L}$, i.e., can be decided...
complexity theory graphs space complexity
1
Showing that Independent set of size $k$ can be decided using logarithmic space -- (complexity theory graphs space complexity) <p>An independent set $I$ is a subset of the nodes of a graph $G$ where: no 2 nodes in $I$ are adjacent in $G$. For natural number $k$, the problem $k-\text{IND}$ asks if there is an independen...
habedi/stack-exchange-dataset
6,934
Finite state automata, multiple completion states?
<p>I'm currently studying for an exam for a course where some of the material covered included finite state automata, I've completed a question and I'm not sure about my answer.</p>&#xA;&#xA;<p><strong>Exercise</strong></p>&#xA;&#xA;<p>Explain what is meant by a Finite State Automaton (FSA) by drawing an FSA to recogni...
automata finite automata
1
Finite state automata, multiple completion states? -- (automata finite automata) <p>I'm currently studying for an exam for a course where some of the material covered included finite state automata, I've completed a question and I'm not sure about my answer.</p>&#xA;&#xA;<p><strong>Exercise</strong></p>&#xA;&#xA;<p>Exp...
habedi/stack-exchange-dataset
6,941
Randomized Rounding of Solutions to Linear Programs
<p><a href="http://en.wikipedia.org/wiki/Linear_programming#Integral_linear_programs" rel="nofollow">Integer linear programming</a> (ILP) is an incredibly powerful tool in combinatorial optimization. If we can formulate some problem as an instance of an ILP then solvers are guaranteed to find the global optimum. Howeve...
optimization randomized algorithms linear programming approximation
1
Randomized Rounding of Solutions to Linear Programs -- (optimization randomized algorithms linear programming approximation) <p><a href="http://en.wikipedia.org/wiki/Linear_programming#Integral_linear_programs" rel="nofollow">Integer linear programming</a> (ILP) is an incredibly powerful tool in combinatorial optimizat...
habedi/stack-exchange-dataset
6,942
Cliques in an alternate graph representation
<p>EDITS: corrected $r$ to add edges just like $f$ does in paragraph 8 per the first comment below. Also specified the Clique problem of interest in paragraph 2.</p>&#xA;&#xA;<p>Having received no response to this question on math.SE, I'm asking it here. Thanks for your help.</p>&#xA;&#xA;<p>In <a href="http://en.wikip...
complexity theory graphs
1
Cliques in an alternate graph representation -- (complexity theory graphs) <p>EDITS: corrected $r$ to add edges just like $f$ does in paragraph 8 per the first comment below. Also specified the Clique problem of interest in paragraph 2.</p>&#xA;&#xA;<p>Having received no response to this question on math.SE, I'm asking...
habedi/stack-exchange-dataset
6,943
Why does a suffix tree have a linear number of nodes (relative to input string size)?
<p>Aren't there $n^2$ unique substrings of a string (irrespective of the alphabet size)? Perhaps the number of unique <em>suffix substrings</em> is less than the number of unique <em>substrings</em> of a string.</p>&#xA;
data structures trees strings suffix trees
1
Why does a suffix tree have a linear number of nodes (relative to input string size)? -- (data structures trees strings suffix trees) <p>Aren't there $n^2$ unique substrings of a string (irrespective of the alphabet size)? Perhaps the number of unique <em>suffix substrings</em> is less than the number of unique <em>sub...
habedi/stack-exchange-dataset
6,952
How to guess the value of $j$ at the end of the loop?
<pre><code>for ( i = n , j = 0 ; i &gt; 0 ; i = i / 2 , j = j + i ) ;&#xA;</code></pre>&#xA;&#xA;<p>All variables are integers.(i.e. if decimal values occur, consider their floor value)</p>&#xA;&#xA;<p>Let $\text{val}(j)$ denote the value of $j$, after the termination of the loop. Which of the following is true?</p>&#x...
algorithm analysis asymptotics integers
1
How to guess the value of $j$ at the end of the loop? -- (algorithm analysis asymptotics integers) <pre><code>for ( i = n , j = 0 ; i &gt; 0 ; i = i / 2 , j = j + i ) ;&#xA;</code></pre>&#xA;&#xA;<p>All variables are integers.(i.e. if decimal values occur, consider their floor value)</p>&#xA;&#xA;<p>Let $\text{val}(j)$...
habedi/stack-exchange-dataset
6,961
Algorithm exercise
<p>making exercises to prepare a test I'm having problems to understand 2 questions, the questions are:</p>&#xA;&#xA;<pre><code> how many are the leafs of a decisional tree associated to any algorithm for &#xA; the search problem in a ordered set?&#xA;</code></pre>&#xA;&#xA;<p>for this question I have 2 set of answer...
algorithms
1
Algorithm exercise -- (algorithms) <p>making exercises to prepare a test I'm having problems to understand 2 questions, the questions are:</p>&#xA;&#xA;<pre><code> how many are the leafs of a decisional tree associated to any algorithm for &#xA; the search problem in a ordered set?&#xA;</code></pre>&#xA;&#xA;<p>for t...
habedi/stack-exchange-dataset
6,968
Find vectors with elements of finite fields that sum up to given value
<p>Given a universe $U$ consisting of k sets of vectors with each vector $\vec{v} \in {\mathbb{F}_{p^m}}^n $. Given also another vector $\vec{c} \in {\mathbb{F}_{p^m}}^n$.&#xA;Now decide if there is a set $X$ with $|X| = |U|$ and $X_i \in U_i, i = 1,2,...,k$ such that $\sum\limits_i X_i = \vec{c}$. If there is, output ...
algorithms combinatorics discrete mathematics
1
Find vectors with elements of finite fields that sum up to given value -- (algorithms combinatorics discrete mathematics) <p>Given a universe $U$ consisting of k sets of vectors with each vector $\vec{v} \in {\mathbb{F}_{p^m}}^n $. Given also another vector $\vec{c} \in {\mathbb{F}_{p^m}}^n$.&#xA;Now decide if there is...
habedi/stack-exchange-dataset
6,973
What do these arrows in design pattern diagrams mean?
<p>I am learning about software design patterns by reading Wikipedia pages about them. A lot of the patterns such as the bridge pattern have diagrams with boxes and different kinds of arrows:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/ZPF7S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZPF7...
terminology software engineering
1
What do these arrows in design pattern diagrams mean? -- (terminology software engineering) <p>I am learning about software design patterns by reading Wikipedia pages about them. A lot of the patterns such as the bridge pattern have diagrams with boxes and different kinds of arrows:</p>&#xA;&#xA;<p><a href="https://i.s...
habedi/stack-exchange-dataset
6,977
Routing Algorithms and Hosts
<p>I'm reading a book about computer network theory, and one topic is discusses is routing algorithms. It only mentions (probably not intentionally) how routers participate in forming the understood network topology stored in each routers memory - the routing tables. </p>&#xA;&#xA;<p>So this brings me to my question, ...
computer networks
1
Routing Algorithms and Hosts -- (computer networks) <p>I'm reading a book about computer network theory, and one topic is discusses is routing algorithms. It only mentions (probably not intentionally) how routers participate in forming the understood network topology stored in each routers memory - the routing tables....
habedi/stack-exchange-dataset
6,990
Deletion in min/max heaps
<p>I think I'm confused about deletion in heaps, and since I have an exam today, I'm looking for your help to correct me.</p>&#xA;&#xA;<p>I will post photos since it will makes it a bit more clear.</p>&#xA;&#xA;<p>Note(forget about deleting the root)</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/USyPs.png" alt="e...
data structures heaps
1
Deletion in min/max heaps -- (data structures heaps) <p>I think I'm confused about deletion in heaps, and since I have an exam today, I'm looking for your help to correct me.</p>&#xA;&#xA;<p>I will post photos since it will makes it a bit more clear.</p>&#xA;&#xA;<p>Note(forget about deleting the root)</p>&#xA;&#xA;<p>...
habedi/stack-exchange-dataset
6,992
Context-free Languages closed under Reversal
<p>In class this week we've been learning about the CFLs and their closure properties. I've seen proofs for union, intersection and compliment but for reversal my lecturer just said its closed. I wanted to see the proof so I've been searching for the past few days but all I've found is most people just say that to reve...
context free closure properties
1
Context-free Languages closed under Reversal -- (context free closure properties) <p>In class this week we've been learning about the CFLs and their closure properties. I've seen proofs for union, intersection and compliment but for reversal my lecturer just said its closed. I wanted to see the proof so I've been searc...
habedi/stack-exchange-dataset
6,995
Height of AVL after entries
<blockquote>&#xA; <p><strong>Problem:</strong> Suppose $V$ is an <a href="http://en.wikipedia.org/wiki/AVL_tree" rel="nofollow">AVL tree</a> (a self-balancing binary search tree) of $n$&#xA; elements. After the insertion of $n^2$ elements, what would be its&#xA; height?</p>&#xA;</blockquote>&#xA;&#xA;<p><strong>My i...
algorithms asymptotics binary trees search trees
1
Height of AVL after entries -- (algorithms asymptotics binary trees search trees) <blockquote>&#xA; <p><strong>Problem:</strong> Suppose $V$ is an <a href="http://en.wikipedia.org/wiki/AVL_tree" rel="nofollow">AVL tree</a> (a self-balancing binary search tree) of $n$&#xA; elements. After the insertion of $n^2$ elemen...
habedi/stack-exchange-dataset
6,997
What is OUTER UNION and why is it partially compatible
<p>I am trying to understand how a <code>OUTER UNION</code> $∪^✳$ works, and why it is only partially compatible. </p>&#xA;&#xA;<p>I am aware this operation was created to take union of tuples from two relations if the relation are not type compatible (which I understand).</p>&#xA;&#xA;<p>Examples of this operation wil...
terminology database theory relational algebra
1
What is OUTER UNION and why is it partially compatible -- (terminology database theory relational algebra) <p>I am trying to understand how a <code>OUTER UNION</code> $∪^✳$ works, and why it is only partially compatible. </p>&#xA;&#xA;<p>I am aware this operation was created to take union of tuples from two relations i...
habedi/stack-exchange-dataset
7,001
Distributed algorithms - $\alpha, \beta$ synchronizers
<p>I experience a difficulty in solving exercises in distributed algorithm. Below is the the exercise I try to solve, it looks like I miss basic idea. </p>&#xA;&#xA;<p><strong>Exercise.</strong> Consider a 15-processor asynchronous network with processors 0,…,14. The processors constantly run a synchronizer. Let $v$ an...
algorithms distributed systems synchronization
1
Distributed algorithms - $\alpha, \beta$ synchronizers -- (algorithms distributed systems synchronization) <p>I experience a difficulty in solving exercises in distributed algorithm. Below is the the exercise I try to solve, it looks like I miss basic idea. </p>&#xA;&#xA;<p><strong>Exercise.</strong> Consider a 15-proc...
habedi/stack-exchange-dataset
7,003
How can one simulate a PDA with a FIFO queue PDA?
<p>I'm trying to figure out how a pushdown automata (PDA), which we know uses a stack (LIFO) can be simulated by a queue (FIFO). I understand that in a regular PDA, we only have access to the top most element which can be popped. When we push something, it goes to the top of the stack. </p>&#xA;&#xA;<p>In a queue, as I...
automata pushdown automata machine models
1
How can one simulate a PDA with a FIFO queue PDA? -- (automata pushdown automata machine models) <p>I'm trying to figure out how a pushdown automata (PDA), which we know uses a stack (LIFO) can be simulated by a queue (FIFO). I understand that in a regular PDA, we only have access to the top most element which can be p...
habedi/stack-exchange-dataset
7,005
What is an instance of NP complete problem?
<p>I don't understand this definition of an "instance" of a problem. Quoting from the CLRS book on page 1054 on abstract problems (Chapter 34.1):</p>&#xA;&#xA;<blockquote>&#xA; <p>We define an abstract problem $Q$ to be a binary relation on a set $I$ of problem <strong>instances</strong> and set $S$ of problem <stron...
complexity theory terminology np complete
1
What is an instance of NP complete problem? -- (complexity theory terminology np complete) <p>I don't understand this definition of an "instance" of a problem. Quoting from the CLRS book on page 1054 on abstract problems (Chapter 34.1):</p>&#xA;&#xA;<blockquote>&#xA; <p>We define an abstract problem $Q$ to be a binar...
habedi/stack-exchange-dataset
7,008
A puzzle related to nested loops
<p>For a given input $N$, how many times does the enclosed statement executes?</p>&#xA;&#xA;<blockquote>&#xA; <p>for $i$ in $1\ldots N$ loop <br>&#xA; $\quad$for $j$ in $1\ldots i$ loop <br>&#xA; $\quad$$\quad$for $k$ in $i\ldots j$ loop <br>&#xA; $\quad$$\quad$$\quad$$sum = sum + i$ ; <br>&#xA; $\quad$$\quad$end ...
algorithm analysis loops
1
A puzzle related to nested loops -- (algorithm analysis loops) <p>For a given input $N$, how many times does the enclosed statement executes?</p>&#xA;&#xA;<blockquote>&#xA; <p>for $i$ in $1\ldots N$ loop <br>&#xA; $\quad$for $j$ in $1\ldots i$ loop <br>&#xA; $\quad$$\quad$for $k$ in $i\ldots j$ loop <br>&#xA; $\qua...
habedi/stack-exchange-dataset
7,013
Graph 3-colorability is self-reducible
<p>I am interested in self-reducibility of Graph 3-Coloralibity problem.</p>&#xA;&#xA;<p><strong>Definition of Graph 3-Coloralibity problem.</strong></p>&#xA;&#xA;<p>Given an undirected graph $G$ does there exists a way to color the nodes red, green, and blue so that no adjacent nodes have the same color?</p>&#xA;&#xA;...
complexity theory reductions
1
Graph 3-colorability is self-reducible -- (complexity theory reductions) <p>I am interested in self-reducibility of Graph 3-Coloralibity problem.</p>&#xA;&#xA;<p><strong>Definition of Graph 3-Coloralibity problem.</strong></p>&#xA;&#xA;<p>Given an undirected graph $G$ does there exists a way to color the nodes red, gre...
habedi/stack-exchange-dataset
7,025
Conflicting definitions of language accepted by Turing Machine?
<p>I am reading Papadimitriou, Computational Complexity, page 24, where it is says </p>&#xA;&#xA;<blockquote>&#xA; <p>We say that $M$ accepts $L$ whenever for any string $x \in (\Sigma - \{\sqcup\})^*$, if $x \in L$, then $M(x) =$ ``yes''; however, if $x\notin L$, then $M(x) = \nearrow$. </p>&#xA;</blockquote>&#xA;&#x...
reference request turing machines
1
Conflicting definitions of language accepted by Turing Machine? -- (reference request turing machines) <p>I am reading Papadimitriou, Computational Complexity, page 24, where it is says </p>&#xA;&#xA;<blockquote>&#xA; <p>We say that $M$ accepts $L$ whenever for any string $x \in (\Sigma - \{\sqcup\})^*$, if $x \in L$,...
habedi/stack-exchange-dataset
7,029
Inapproximability result implies apx-hardness?
<p>If an optimization problem is known to be inapproximable up to some precision, does this automatically imply that the problem is apx-hard?</p>&#xA;
complexity theory approximation
1
Inapproximability result implies apx-hardness? -- (complexity theory approximation) <p>If an optimization problem is known to be inapproximable up to some precision, does this automatically imply that the problem is apx-hard?</p>&#xA;
habedi/stack-exchange-dataset
7,031
Grammatical characterization of deterministic context-free languages
<p>Deterministic context-free languages are commonly defined using an <em>automaton</em> concept, the (restricted, deterministic) pushdown automaton. To some that is confusing, as the name <em>context-free</em> refers to a grammar type.</p>&#xA;&#xA;<p>I seem to remember there exists a characterization of the DCF langu...
reference request formal grammars context free
1
Grammatical characterization of deterministic context-free languages -- (reference request formal grammars context free) <p>Deterministic context-free languages are commonly defined using an <em>automaton</em> concept, the (restricted, deterministic) pushdown automaton. To some that is confusing, as the name <em>contex...
habedi/stack-exchange-dataset
7,032
Simple proof that circuit satisfiability problem is NP-Hard
<p><span class="math-container">$\newcommand{\np}{\mathsf{NP}}\newcommand{\cc}{\textrm{Circuit-SAT}}$</span>I am having difficulty understanding the <span class="math-container">$\np$</span>-hardness proof for <span class="math-container">$\cc$</span> in <a href="http://en.wikipedia.org/wiki/Introduction_to_Algorithms"...
complexity theory np hard satisfiability circuits
1
Simple proof that circuit satisfiability problem is NP-Hard -- (complexity theory np hard satisfiability circuits) <p><span class="math-container">$\newcommand{\np}{\mathsf{NP}}\newcommand{\cc}{\textrm{Circuit-SAT}}$</span>I am having difficulty understanding the <span class="math-container">$\np$</span>-hardness proof...
habedi/stack-exchange-dataset
7,038
What is the origin of the client server model?
<p>I was wondering if someone knew the origin of the client server model. Where does the term come from (paper, software application, book)?</p>&#xA;
terminology reference request distributed systems history
1
What is the origin of the client server model? -- (terminology reference request distributed systems history) <p>I was wondering if someone knew the origin of the client server model. Where does the term come from (paper, software application, book)?</p>&#xA;
habedi/stack-exchange-dataset
7,048
A Recursive Formula For Generalized Josephus problem
<p>The <a href="http://en.wikipedia.org/wiki/Josephus_problem" rel="nofollow">Josephus Problem</a> asks where to start taking out every kth person in the circle consisted of n people, such that you are the last "survivor".</p>&#xA;&#xA;<p>The following recursive formula is given:&#xA;$$\begin{align}&#xA;f(1,k)&amp;=1, ...
combinatorics recursion
1
A Recursive Formula For Generalized Josephus problem -- (combinatorics recursion) <p>The <a href="http://en.wikipedia.org/wiki/Josephus_problem" rel="nofollow">Josephus Problem</a> asks where to start taking out every kth person in the circle consisted of n people, such that you are the last "survivor".</p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
7,050
What are the differences between computer vision and image processing?
<p>What are the differences between computer vision and image processing? For example, in object recognition, what are the roles of computer vision and image processing?</p>&#xA;
terminology computer vision image processing education
1
What are the differences between computer vision and image processing? -- (terminology computer vision image processing education) <p>What are the differences between computer vision and image processing? For example, in object recognition, what are the roles of computer vision and image processing?</p>&#xA;
habedi/stack-exchange-dataset
7,051
Radix sort exercise
<p>I'm trying to understand a proof regarding radix-sort but to no avail.</p>&#xA;&#xA;<p>I'll first write down a brief summary of the proof and then assign some questions which I hope will be clarified enough.</p>&#xA;&#xA;<blockquote>&#xA; <p>Suppose you have an array of integer numbers in the range $\{0,1,2,\ldots ...
algorithms algorithm analysis sorting
1
Radix sort exercise -- (algorithms algorithm analysis sorting) <p>I'm trying to understand a proof regarding radix-sort but to no avail.</p>&#xA;&#xA;<p>I'll first write down a brief summary of the proof and then assign some questions which I hope will be clarified enough.</p>&#xA;&#xA;<blockquote>&#xA; <p>Suppose you...
habedi/stack-exchange-dataset
7,052
Using Clique decision to solve Clique optimization
<p>How can you perform the clique decision algorithm fewer than $ O(n) $ times to solve clique optimization?</p>&#xA;&#xA;<p>I'm not sure if my approach is right but this is my thought process: you would pick vertices in a graph and see if they form a clique, then keep picking more vertices until you have the max possi...
algorithms graphs optimization
1
Using Clique decision to solve Clique optimization -- (algorithms graphs optimization) <p>How can you perform the clique decision algorithm fewer than $ O(n) $ times to solve clique optimization?</p>&#xA;&#xA;<p>I'm not sure if my approach is right but this is my thought process: you would pick vertices in a graph and ...
habedi/stack-exchange-dataset
7,054
What is the difference between control flow graph & interprocedural control flow graph?
<p>I am doing research on control flow analysis on aspect oriented programs and I found in some papers an interprocedural approach for doing control flow analysis on others call graph or control flow graph. Is there a real difference between control flow graphs and interprocedural control flow graphs?</p>&#xA;
terminology algorithm analysis programming languages
1
What is the difference between control flow graph & interprocedural control flow graph? -- (terminology algorithm analysis programming languages) <p>I am doing research on control flow analysis on aspect oriented programs and I found in some papers an interprocedural approach for doing control flow analysis on others c...
habedi/stack-exchange-dataset
7,055
How does this algorithm for verifying if a string is $0^n1^n$ work?
<p>I have found an efficient algorithm for verifying if a string $\omega$ is of the form $0^n1^n$, where $n \in \mathbb{N}$.</p>&#xA;&#xA;<ol>&#xA;<li>Scan across $\omega$. If a 1 appears before a 0, then reject.</li>&#xA;<li><p>Repeat so long as some 0s and some 1s remain on the tape.</p>&#xA;&#xA;<ol>&#xA;<li>Scan ac...
algorithms formal languages
1
How does this algorithm for verifying if a string is $0^n1^n$ work? -- (algorithms formal languages) <p>I have found an efficient algorithm for verifying if a string $\omega$ is of the form $0^n1^n$, where $n \in \mathbb{N}$.</p>&#xA;&#xA;<ol>&#xA;<li>Scan across $\omega$. If a 1 appears before a 0, then reject.</li>&#...
habedi/stack-exchange-dataset
7,056
Why is it that every k-tape Turing machine has a 1-tape TM that runs in $O(t^2(n))$?
<p>Apparently, for every k-tape Turing machine that runs in time $O(t(n))$, there exists a 1-tape Turing machine that runs in $O(t^2(n))$.</p>&#xA;&#xA;<p>I can see how any multi-tape machine $M$ can be simulated by a 1-tape machine $S$. Just have the tape of $S$ contain all of $M$'s tapes separated by some symbol such...
turing machines
1
Why is it that every k-tape Turing machine has a 1-tape TM that runs in $O(t^2(n))$? -- (turing machines) <p>Apparently, for every k-tape Turing machine that runs in time $O(t(n))$, there exists a 1-tape Turing machine that runs in $O(t^2(n))$.</p>&#xA;&#xA;<p>I can see how any multi-tape machine $M$ can be simulated b...
habedi/stack-exchange-dataset
7,061
Show the Language is Recursive
<p>I have devised the following TM for the language EQUAL. </p>&#xA;&#xA;<p>EQUAL accepts all strings with the same number of a's and b's. It is context free but non regular. </p>&#xA;&#xA;<p>Using the TM I devised, how can I show that EQUAL is recursive? How can I show that it crashes when the input is not in EQUAL.</...
formal languages computability turing machines
1
Show the Language is Recursive -- (formal languages computability turing machines) <p>I have devised the following TM for the language EQUAL. </p>&#xA;&#xA;<p>EQUAL accepts all strings with the same number of a's and b's. It is context free but non regular. </p>&#xA;&#xA;<p>Using the TM I devised, how can I show that E...
habedi/stack-exchange-dataset
7,062
Why is the unary representation of a number exponentially larger than a base k representation of it?
<p>According to a book I am reading, the unary representation of a number exponentially larger than a base k representation of it. I, however, feel that the unary representation should scale linearly with the input.</p>&#xA;&#xA;<p>After all, 1 is 1, 2 is 11, 3 is 111, and so on, right? Wouldn't that be linear?</p>&#xA...
algorithm analysis
1
Why is the unary representation of a number exponentially larger than a base k representation of it? -- (algorithm analysis) <p>According to a book I am reading, the unary representation of a number exponentially larger than a base k representation of it. I, however, feel that the unary representation should scale line...
habedi/stack-exchange-dataset
7,064
Using coloring optimization or coloring decision to solve coloring search
<p>How can you show that <strong>coloring search</strong> can be solved by making a polynomial number of calls to the solution for <strong>coloring optimization</strong> or <strong>coloring decision</strong>? (<strong>Coloring search</strong> is the algorithm to color the vertices of a graph such that adjacent vertices...
graphs np
1
Using coloring optimization or coloring decision to solve coloring search -- (graphs np) <p>How can you show that <strong>coloring search</strong> can be solved by making a polynomial number of calls to the solution for <strong>coloring optimization</strong> or <strong>coloring decision</strong>? (<strong>Coloring sear...
habedi/stack-exchange-dataset
7,065
How does this non-deterministic algorithm to find if a Hamiltonian path exists work?
<p>I have read of an algorithm that a <a href="http://en.wikipedia.org/wiki/Non-deterministic_Turing_machine" rel="nofollow">non-deterministic Turing machine</a> $N$ can run to determine whether a given graph $G$ has a <a href="http://en.wikipedia.org/wiki/Hamiltonian_path" rel="nofollow">Hamiltonian path</a> from the ...
turing machines nondeterminism
1
How does this non-deterministic algorithm to find if a Hamiltonian path exists work? -- (turing machines nondeterminism) <p>I have read of an algorithm that a <a href="http://en.wikipedia.org/wiki/Non-deterministic_Turing_machine" rel="nofollow">non-deterministic Turing machine</a> $N$ can run to determine whether a gi...
habedi/stack-exchange-dataset
7,068
How to determine the polynomial runtime of an NP reduction?
<p>To show that a NP problem is NP-complete, we also have to show that $L \leq_{p} L'$ , where $L$ is proven NP-complete and you have to prove $L'$ also is. The thing I am confused is how in all NP-complete problems in CLRS they just state the reduction algorithm for $L$ to convert to $L'$ is polynomial. How can one p...
complexity theory np complete reductions proof techniques
1
How to determine the polynomial runtime of an NP reduction? -- (complexity theory np complete reductions proof techniques) <p>To show that a NP problem is NP-complete, we also have to show that $L \leq_{p} L'$ , where $L$ is proven NP-complete and you have to prove $L'$ also is. The thing I am confused is how in all N...
habedi/stack-exchange-dataset
7,071
Doubt regarding cache hit ratios and access time
<p><strong>Question 1:</strong> What is the average access time for a 3-level memory system with access time $T_1$, $2T_1$ and $3T_1$? (Hit ratio $h_1$ = $h_2$ = 0.9)</p>&#xA;&#xA;<p>The solution given is: $0.9[T_1] + 0.1(0.9[2*T_1] + 0.1[3*T_1]) = 1.11[T_1]$ <strong>(Method 1)</strong></p>&#xA;&#xA;<p>Here, they have...
computer architecture cpu cache
1
Doubt regarding cache hit ratios and access time -- (computer architecture cpu cache) <p><strong>Question 1:</strong> What is the average access time for a 3-level memory system with access time $T_1$, $2T_1$ and $3T_1$? (Hit ratio $h_1$ = $h_2$ = 0.9)</p>&#xA;&#xA;<p>The solution given is: $0.9[T_1] + 0.1(0.9[2*T_1] +...
habedi/stack-exchange-dataset
7,073
Finding nested intervals efficiently
<p>The intervals are represented as two numbers, e.g. $(4.3, 5.6)$. The intervals are unique. </p>&#xA;&#xA;<p>If for $(x,y)$ and $(u,v)$, $x≤u$ and $v≤y$, $(u,v)$ is nested in $(x,y)$</p>&#xA;&#xA;<p>How do I find out which intervals are nested in others efficiently?</p>&#xA;&#xA;<p>The hint is to use two induction hy...
algorithms induction
1
Finding nested intervals efficiently -- (algorithms induction) <p>The intervals are represented as two numbers, e.g. $(4.3, 5.6)$. The intervals are unique. </p>&#xA;&#xA;<p>If for $(x,y)$ and $(u,v)$, $x≤u$ and $v≤y$, $(u,v)$ is nested in $(x,y)$</p>&#xA;&#xA;<p>How do I find out which intervals are nested in others e...
habedi/stack-exchange-dataset
7,074
How does the computer determine whether a number is smaller or greater than another?
<p>It might sound like a stupid question but I'm really curious to know how a computer knows that $1&lt;2$? Also, how does a computer know that the order of integer is $1,2,3,4,5,\ldots$ and alphabet is A,B,C,D,...? Is it somewhere stored in the hardware or does the operating system provide this kind of information?</p...
computer architecture reference question
1
How does the computer determine whether a number is smaller or greater than another? -- (computer architecture reference question) <p>It might sound like a stupid question but I'm really curious to know how a computer knows that $1&lt;2$? Also, how does a computer know that the order of integer is $1,2,3,4,5,\ldots$ an...
habedi/stack-exchange-dataset
7,076
How to show composition of one way function is not such?
<p>I was wondering how should I proceed in order to show that the composition of (say) two one-way functions (either weak or strong or both together) is not a one-way function?</p>&#xA;&#xA;<p>Specifically: Say $f$ and $g$ are one-way functions (either weak or strong).&#xA;How do I prove that their composition $g(f(x))...
proof techniques cryptography one way functions
1
How to show composition of one way function is not such? -- (proof techniques cryptography one way functions) <p>I was wondering how should I proceed in order to show that the composition of (say) two one-way functions (either weak or strong or both together) is not a one-way function?</p>&#xA;&#xA;<p>Specifically: Say...
habedi/stack-exchange-dataset
7,079
A puzzle in Permutation
<p>There are two stacks A and B. </p>&#xA;&#xA;<pre><code>A : a,b,c,d ('a' is on top and 'd' is at the bottom of the stack)&#xA;B : (empty)&#xA;</code></pre>&#xA;&#xA;<p>There are two rules.</p>&#xA;&#xA;<pre><code>If an element of A is popped, it must be printed immediately or pushed into B.&#xA;If an element of B...
stacks permutations
1
A puzzle in Permutation -- (stacks permutations) <p>There are two stacks A and B. </p>&#xA;&#xA;<pre><code>A : a,b,c,d ('a' is on top and 'd' is at the bottom of the stack)&#xA;B : (empty)&#xA;</code></pre>&#xA;&#xA;<p>There are two rules.</p>&#xA;&#xA;<pre><code>If an element of A is popped, it must be printed imm...
habedi/stack-exchange-dataset
7,091
Why is $3^n = 2^{O(n)}$ true?
<p>$3^n = 2^{O(n)}$ is apparently true. I thought that it was false though because $3^n$ grows faster than any exponential function with a base of 2.</p>&#xA;&#xA;<p>How is $3^n = 2^{O(n)}$ true?</p>&#xA;
asymptotics landau notation
1
Why is $3^n = 2^{O(n)}$ true? -- (asymptotics landau notation) <p>$3^n = 2^{O(n)}$ is apparently true. I thought that it was false though because $3^n$ grows faster than any exponential function with a base of 2.</p>&#xA;&#xA;<p>How is $3^n = 2^{O(n)}$ true?</p>&#xA;
habedi/stack-exchange-dataset
7,101
Reducing recursive languages
<p>I need a clarification related to the following situation.</p>&#xA;&#xA;<p>Consider a Turing machine $T_1$ that halts for every input. In other words $J_1 = L(T_1) \subseteq \Sigma^*$ is recursive. Suppose we are given a function $f:\Sigma^* \mapsto \Sigma^*$ and a language $J_2 \in \Sigma^*$ such that $$ x \in J_2 ...
computability turing machines
1
Reducing recursive languages -- (computability turing machines) <p>I need a clarification related to the following situation.</p>&#xA;&#xA;<p>Consider a Turing machine $T_1$ that halts for every input. In other words $J_1 = L(T_1) \subseteq \Sigma^*$ is recursive. Suppose we are given a function $f:\Sigma^* \mapsto \Si...
habedi/stack-exchange-dataset
7,105
Time complexity for count-change procedure in SICP
<p>In famous Structure and Interretation of Computer Programs, there is an exercise (<a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%_thm_1.14" rel="noreferrer">1.14</a>), that asks for the time complexity of the following algorithm - in Scheme - for counting change (the problem statement suggest...
algorithms time complexity space complexity
1
Time complexity for count-change procedure in SICP -- (algorithms time complexity space complexity) <p>In famous Structure and Interretation of Computer Programs, there is an exercise (<a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%_thm_1.14" rel="noreferrer">1.14</a>), that asks for the time co...
habedi/stack-exchange-dataset
7,112
Computational complexity of the clique problem
<p>What is the best known approximation for the computational complexity of the clique problem? Is it accurate to consider it $O(2^n)$?</p>&#xA;
complexity theory time complexity algorithm analysis
1
Computational complexity of the clique problem -- (complexity theory time complexity algorithm analysis) <p>What is the best known approximation for the computational complexity of the clique problem? Is it accurate to consider it $O(2^n)$?</p>&#xA;
habedi/stack-exchange-dataset
7,118
Closure properties of languages
<blockquote>&#xA; <p>Let $P$ be a regular language and $Q$ be a context-free language such&#xA; that $Q \subseteq P$(For example, let $P = a^*b^*$ and $Q = \{ a^nb^n | n \ge 0\}$). Then which of the following is always regular?</p>&#xA; &#xA; <ol>&#xA; <li>$P \cap Q$</li>&#xA; <li>$P - Q$</li>&#xA; <li>$\Sigma^...
formal languages regular languages context free closure properties
1
Closure properties of languages -- (formal languages regular languages context free closure properties) <blockquote>&#xA; <p>Let $P$ be a regular language and $Q$ be a context-free language such&#xA; that $Q \subseteq P$(For example, let $P = a^*b^*$ and $Q = \{ a^nb^n | n \ge 0\}$). Then which of the following is a...
habedi/stack-exchange-dataset
7,124
Efficient algorithm for a modified stack to pop the smallest element
<p>I was practicing the following problem :</p>&#xA;&#xA;<blockquote>&#xA; <p>There are a total of $N$ operations.&#xA; At each operation, you can either add an element to the top or remove several elements as described below.</p>&#xA; &#xA; <p>Inputs are integers. An input other than $-1$ indicates that we have to...
algorithms arrays stacks
1
Efficient algorithm for a modified stack to pop the smallest element -- (algorithms arrays stacks) <p>I was practicing the following problem :</p>&#xA;&#xA;<blockquote>&#xA; <p>There are a total of $N$ operations.&#xA; At each operation, you can either add an element to the top or remove several elements as described...
habedi/stack-exchange-dataset
7,132
What is a linearization point?
<p>With respect concurrent programming, what is a linearization point? </p>&#xA;&#xA;<p>They seem to occur at a compare-and-swap instruction apparently. The best definition I could find is <a href="http://en.wikipedia.org/wiki/Atomicity_%28programming%29#Linearization_points" rel="nofollow">here</a>. </p>&#xA;&#xA;<blo...
semantics concurrency synchronization
1
What is a linearization point? -- (semantics concurrency synchronization) <p>With respect concurrent programming, what is a linearization point? </p>&#xA;&#xA;<p>They seem to occur at a compare-and-swap instruction apparently. The best definition I could find is <a href="http://en.wikipedia.org/wiki/Atomicity_%28progra...
habedi/stack-exchange-dataset
7,134
How is verifying whether an assignment satisfies a boolean formula possible in polynomial time?
<p>How can I prove that I can verify whether a boolean assignment of variables $a$ satisfies some boolean formmula $\phi$ in polynomial time?</p>&#xA;&#xA;<p>I know that we can just plug the boolean assignment into the formula, but this seems to be a very high-level description, and I am not sure that it is a reliable ...
complexity theory logic satisfiability
1
How is verifying whether an assignment satisfies a boolean formula possible in polynomial time? -- (complexity theory logic satisfiability) <p>How can I prove that I can verify whether a boolean assignment of variables $a$ satisfies some boolean formmula $\phi$ in polynomial time?</p>&#xA;&#xA;<p>I know that we can jus...
habedi/stack-exchange-dataset
7,139
Static access pattern in Distributed Databases
<blockquote>&#xA; <p>The access patterns of user requests may be <strong>static</strong>, so that they do&#xA; not change over time, or dynamic. It is obviously considerably easier to plan for&#xA; and manage the <strong>static</strong> environments than would be the case for dynamic distributed&#xA; systems. Unfor...
distributed systems databases
1
Static access pattern in Distributed Databases -- (distributed systems databases) <blockquote>&#xA; <p>The access patterns of user requests may be <strong>static</strong>, so that they do&#xA; not change over time, or dynamic. It is obviously considerably easier to plan for&#xA; and manage the <strong>static</strong...
habedi/stack-exchange-dataset
7,141
Generate the word using this grammar
<p>Using this grammar, over the alphabet $\Sigma=\{a\}$&#xA;$$&#xA;S \rightarrow a \\&#xA;S\rightarrow CD \\&#xA;C\rightarrow ACB \\&#xA;C\rightarrow AB \\&#xA;AB\rightarrow aBA \\&#xA;Aa\rightarrow aA \\&#xA;Ba\rightarrow aB \\&#xA;AD\rightarrow Da \\&#xA;BD\rightarrow Ea \\&#xA;BE\rightarrow Ea \\&#xA;E\rightarrow a ...
formal grammars context free
1
Generate the word using this grammar -- (formal grammars context free) <p>Using this grammar, over the alphabet $\Sigma=\{a\}$&#xA;$$&#xA;S \rightarrow a \\&#xA;S\rightarrow CD \\&#xA;C\rightarrow ACB \\&#xA;C\rightarrow AB \\&#xA;AB\rightarrow aBA \\&#xA;Aa\rightarrow aA \\&#xA;Ba\rightarrow aB \\&#xA;AD\rightarrow Da...
habedi/stack-exchange-dataset
7,144
What is complement of Context-free languages?
<p>I need to know what class of CFL is closed under i.e. what set is complement of CFL.&#xA;I know CFL is not closed under complement, and I know that P is closed under complement. Since CFL $\subsetneq$ P I can say that complement of CFL is included in P(right?). There is still a question whether complement of CFL is ...
complexity theory formal languages context free closure properties sets
1
What is complement of Context-free languages? -- (complexity theory formal languages context free closure properties sets) <p>I need to know what class of CFL is closed under i.e. what set is complement of CFL.&#xA;I know CFL is not closed under complement, and I know that P is closed under complement. Since CFL $\subs...
habedi/stack-exchange-dataset
7,145
Calculating Binet's formula for Fibonacci numbers with arbitrary precision
<p><a href="http://en.wikipedia.org/wiki/Fibonacci_number" rel="nofollow">Binet's formula</a> for the nth Fibonacci numbers is remarkable because the equation "converts" via a few arithmetic operations an irrational number $\phi$ into an integer sequence. However, using finite precision arithmetic, one would always hav...
algorithms discrete mathematics floating point arithmetic mathematical programming
1
Calculating Binet's formula for Fibonacci numbers with arbitrary precision -- (algorithms discrete mathematics floating point arithmetic mathematical programming) <p><a href="http://en.wikipedia.org/wiki/Fibonacci_number" rel="nofollow">Binet's formula</a> for the nth Fibonacci numbers is remarkable because the equatio...
habedi/stack-exchange-dataset
7,156
What exactly is a clique cover problem?
<p>I am really confused about clique problem and clique cover problem. I tried googling it,but I don't see to be able to visualise the clique cover problem.</p>&#xA;
complexity theory terminology np complete
1
What exactly is a clique cover problem? -- (complexity theory terminology np complete) <p>I am really confused about clique problem and clique cover problem. I tried googling it,but I don't see to be able to visualise the clique cover problem.</p>&#xA;
habedi/stack-exchange-dataset
7,160
What will i obtain if i apply a xor-ing a one way function and it's input?
<p>I know that a <a href="http://en.wikipedia.org/wiki/One-way_function" rel="nofollow">one-way function</a> is informally a function that it's easy to compute but hard to invert.<br/>&#xA;If f(x) is a one way function the function $g(x) = x\oplus f(x)$ is a one-way function?&#xA;My intuition is that it's but i not re...
cryptography one way functions
1
What will i obtain if i apply a xor-ing a one way function and it's input? -- (cryptography one way functions) <p>I know that a <a href="http://en.wikipedia.org/wiki/One-way_function" rel="nofollow">one-way function</a> is informally a function that it's easy to compute but hard to invert.<br/>&#xA;If f(x) is a one way...
habedi/stack-exchange-dataset
7,162
Does forcing TMs to change all symbols they read change their power?
<p>If we limit a turing machine so that it is not allowed to write the symbol that it reads would it reduce its power?</p>&#xA;&#xA;<p>For example: $( State, A, State, Z, DIRECTION)$</p>&#xA;&#xA;<p>$A$ cannot be the same symbol as $Z$. </p>&#xA;
computability turing machines machine models
1
Does forcing TMs to change all symbols they read change their power? -- (computability turing machines machine models) <p>If we limit a turing machine so that it is not allowed to write the symbol that it reads would it reduce its power?</p>&#xA;&#xA;<p>For example: $( State, A, State, Z, DIRECTION)$</p>&#xA;&#xA;<p>$A...
habedi/stack-exchange-dataset
7,169
Algorithm to find all 2-hop neighbors lists in a graph
<p>Given a graph $G = (V,E)$, where $|V| = n$. What is a fast algorithm for generating the collection of all 2-hop neighborhood lists of all nodes in $V$. </p>&#xA;&#xA;<p>Naively, you can do that in $O(n^3)$. With power of matrices, you can do that with $O(n^{2.8})$ using Strassen algorithm. You can do better than thi...
algorithms algorithm analysis graphs randomized algorithms
1
Algorithm to find all 2-hop neighbors lists in a graph -- (algorithms algorithm analysis graphs randomized algorithms) <p>Given a graph $G = (V,E)$, where $|V| = n$. What is a fast algorithm for generating the collection of all 2-hop neighborhood lists of all nodes in $V$. </p>&#xA;&#xA;<p>Naively, you can do that in $...
habedi/stack-exchange-dataset
7,173
Determine whether the $k^{th}$ smallest element in max-heap is greater than a given number
<p>A set of numbers is stored in a <strong>max-heap</strong>. We want to find an algorithm with $O(k)$ time complexity to check if $k^{th}$ <strong>smallest</strong> element is greater than an arbitrary given number.</p>&#xA;
algorithms data structures heaps
1
Determine whether the $k^{th}$ smallest element in max-heap is greater than a given number -- (algorithms data structures heaps) <p>A set of numbers is stored in a <strong>max-heap</strong>. We want to find an algorithm with $O(k)$ time complexity to check if $k^{th}$ <strong>smallest</strong> element is greater than a...
habedi/stack-exchange-dataset
7,190
Construct a PDA for the complement of $a^nb^nc^n$
<p>I am wondering if this is even possible, since $\{a^n b^n c^n \mid n \geq 0\} \not\in \mathrm{CFL}$. Therefore a PDA that can distinguish a word $w\in\{a^n b^n c^n \mid n \geq 0\}$ from the rest of $\{a^*b^*c^*\}$ might as well accept it, which sounds contradictory to me.</p>&#xA;&#xA;<p>I guess I need to take adv...
formal languages automata context free pushdown automata
1
Construct a PDA for the complement of $a^nb^nc^n$ -- (formal languages automata context free pushdown automata) <p>I am wondering if this is even possible, since $\{a^n b^n c^n \mid n \geq 0\} \not\in \mathrm{CFL}$. Therefore a PDA that can distinguish a word $w\in\{a^n b^n c^n \mid n \geq 0\}$ from the rest of $\{a^...
habedi/stack-exchange-dataset
7,208
Find maximum distance between elements given constraints on some
<p>I have a list of numbered elements 1 to N that fit into positions on a number line starting with 1. I also have constraints for these elements:</p>&#xA;&#xA;<ul>&#xA;<li>The element 1 is in position 1, and element N must be at a position >= the position of element N-1. (i.e. element 2 could be at position 1, element...
algorithms optimization dynamic programming linear programming
1
Find maximum distance between elements given constraints on some -- (algorithms optimization dynamic programming linear programming) <p>I have a list of numbered elements 1 to N that fit into positions on a number line starting with 1. I also have constraints for these elements:</p>&#xA;&#xA;<ul>&#xA;<li>The element 1 ...
habedi/stack-exchange-dataset
7,215
Reducing a problem to Halt
<p>I'm reviewing for a computability test, and my professor has not provided solutions to his practice questions. I came up with a "solution" to this problem, but it really seems like my answer is wrong (since I call upon $\mathsf{Halt}$ twice)...</p>&#xA;&#xA;<p>We are given this initial language for some machine $M$:...
computability reductions
1
Reducing a problem to Halt -- (computability reductions) <p>I'm reviewing for a computability test, and my professor has not provided solutions to his practice questions. I came up with a "solution" to this problem, but it really seems like my answer is wrong (since I call upon $\mathsf{Halt}$ twice)...</p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
7,232
Do linearly dependent features in feature vectors improve the feature vector?
<p>I was reading Wiki on <a href="http://en.wikipedia.org/wiki/Feature_vector" rel="noreferrer">feature vectors</a>, and as far as I can see, it suggests creating new features from already existing features:</p>&#xA;&#xA;<blockquote>&#xA; <p>Higher-level features can be obtained from already available features&#xA; a...
machine learning
1
Do linearly dependent features in feature vectors improve the feature vector? -- (machine learning) <p>I was reading Wiki on <a href="http://en.wikipedia.org/wiki/Feature_vector" rel="noreferrer">feature vectors</a>, and as far as I can see, it suggests creating new features from already existing features:</p>&#xA;&#xA...
habedi/stack-exchange-dataset
7,235
Proofs using the regular pumping lemma
<p>I have two questions:</p>&#xA;&#xA;<ol>&#xA;<li><p>I consider the following language &#xA;$$L_1= \{ w\in \{0,1\}^* \mid \not \exists u\in \{0,1\}^* \colon w= uu^R\}.$$&#xA;In other words $w$ is not palindrome with even length. I proved that this language is NOT regular by proving that its complement is not regular. ...
formal languages regular languages pumping lemma
1
Proofs using the regular pumping lemma -- (formal languages regular languages pumping lemma) <p>I have two questions:</p>&#xA;&#xA;<ol>&#xA;<li><p>I consider the following language &#xA;$$L_1= \{ w\in \{0,1\}^* \mid \not \exists u\in \{0,1\}^* \colon w= uu^R\}.$$&#xA;In other words $w$ is not palindrome with even lengt...
habedi/stack-exchange-dataset
7,238
Pumping lemma for a finite language
<blockquote>&#xA; <p><strong>Possible Duplicate:</strong><br>&#xA; <a href="https://cs.stackexchange.com/questions/1847/pumping-lemma-for-simple-finite-regular-languages">Pumping lemma for simple finite regular languages</a> </p>&#xA;</blockquote>&#xA;&#xA;&#xA;&#xA;<p>The pumping lemma says that for any regular lan...
formal languages
1
Pumping lemma for a finite language -- (formal languages) <blockquote>&#xA; <p><strong>Possible Duplicate:</strong><br>&#xA; <a href="https://cs.stackexchange.com/questions/1847/pumping-lemma-for-simple-finite-regular-languages">Pumping lemma for simple finite regular languages</a> </p>&#xA;</blockquote>&#xA;&#xA;&#...
habedi/stack-exchange-dataset
7,241
Solvability of Turing Machines
<p>I'm preparing for an exam, and on a sample one provided (without solutions), we have this question: Is the following solvable or non-solvable: Given a turing machine $T$, does it accept a word of even length? - Given a deterministic 1-tape turing machine $T$, does $T$ ever read the contents of the 10th cell?</p>&#xA...
turing machines undecidability
1
Solvability of Turing Machines -- (turing machines undecidability) <p>I'm preparing for an exam, and on a sample one provided (without solutions), we have this question: Is the following solvable or non-solvable: Given a turing machine $T$, does it accept a word of even length? - Given a deterministic 1-tape turing mac...
habedi/stack-exchange-dataset
7,248
Speed-up of two-tape Turing machine
<p>I try to figure out linear speed-up of Turing machine.</p>&#xA;&#xA;<p><em>Prove that any problem that can be solved by a two-tape Turing machine that has time complexity t can be solved by another two-tape Turing machine having time complexity $t′$, where $t′(n) = O(n) + (t(n)/2)$.</em></p>&#xA;&#xA;<p>The idea see...
complexity theory turing machines
1
Speed-up of two-tape Turing machine -- (complexity theory turing machines) <p>I try to figure out linear speed-up of Turing machine.</p>&#xA;&#xA;<p><em>Prove that any problem that can be solved by a two-tape Turing machine that has time complexity t can be solved by another two-tape Turing machine having time complexi...
habedi/stack-exchange-dataset
7,250
Retrieving the shortest path of a dynamic graph
<p>I'm studying shortest paths in directed graphs currently. There are many efficient algorithms for finding the shortest path in a network, like dijkstra's or bellman-ford's. But what if the graph is dynamic? By saying dynamic I mean that we can insert or remove vertices during the execution of the program. I'm trying...
algorithms data structures graphs efficiency shortest path
1
Retrieving the shortest path of a dynamic graph -- (algorithms data structures graphs efficiency shortest path) <p>I'm studying shortest paths in directed graphs currently. There are many efficient algorithms for finding the shortest path in a network, like dijkstra's or bellman-ford's. But what if the graph is dynamic...
habedi/stack-exchange-dataset
7,253
An interesting metric space related to Turing machines
<p>In this question we only consider Turing machines that halt on all inputs. If $k \in \mathbb{N}$ then by $T_k$ we denote the Turing machine whose code is $k$.</p>&#xA;&#xA;<p>Consider the following function </p>&#xA;&#xA;<p>$$s(x,y) = \min\{k \mid |L(T_k) \cap \{x,y\}| = 1\}$$</p>&#xA;&#xA;<p>In other words, $s(x,y)...
computability turing machines
1
An interesting metric space related to Turing machines -- (computability turing machines) <p>In this question we only consider Turing machines that halt on all inputs. If $k \in \mathbb{N}$ then by $T_k$ we denote the Turing machine whose code is $k$.</p>&#xA;&#xA;<p>Consider the following function </p>&#xA;&#xA;<p>$$s...
habedi/stack-exchange-dataset
7,256
Triple nested for-loops
<blockquote>&#xA; <p><strong>Possible Duplicate:</strong><br>&#xA; <a href="https://cs.stackexchange.com/questions/7008/a-puzzle-related-to-nested-loops">A puzzle related to nested loops</a> </p>&#xA;</blockquote>&#xA;&#xA;&#xA;&#xA;<p>I am trying to count the exact/total number of iterations the following nested fo...
runtime analysis loops
1
Triple nested for-loops -- (runtime analysis loops) <blockquote>&#xA; <p><strong>Possible Duplicate:</strong><br>&#xA; <a href="https://cs.stackexchange.com/questions/7008/a-puzzle-related-to-nested-loops">A puzzle related to nested loops</a> </p>&#xA;</blockquote>&#xA;&#xA;&#xA;&#xA;<p>I am trying to count the exac...
habedi/stack-exchange-dataset
7,261
How do I structure hexagon edge data?
<p><img src="https://i.stack.imgur.com/XeuwO.gif" alt="hexagon coordinates"></p>&#xA;&#xA;<p>In my program, it draws them by offsetting every other row by half of the width, as pictured above. Each tile can be referenced by coordinates, also shown above.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/DKyZq.gif" al...
data structures graph traversal
1
How do I structure hexagon edge data? -- (data structures graph traversal) <p><img src="https://i.stack.imgur.com/XeuwO.gif" alt="hexagon coordinates"></p>&#xA;&#xA;<p>In my program, it draws them by offsetting every other row by half of the width, as pictured above. Each tile can be referenced by coordinates, also sho...
habedi/stack-exchange-dataset
7,262
If I have a large random array of 0s and 1s that I want to sort what kind of an algorithm and data structures should I consider?
<p>What are the types of things that need to be considered if I need to sort a large random array of 0s and 1s? </p>&#xA;&#xA;<p>You can assume large array is in the order of million or billions. </p>&#xA;&#xA;<p>I understand there are tons of sorting algorithms out there (quick, merge, radix,.etc.) and there are so m...
sorting big data
1
If I have a large random array of 0s and 1s that I want to sort what kind of an algorithm and data structures should I consider? -- (sorting big data) <p>What are the types of things that need to be considered if I need to sort a large random array of 0s and 1s? </p>&#xA;&#xA;<p>You can assume large array is in the ord...
habedi/stack-exchange-dataset
7,271
Is this language regular?
<p>Consider the following language:&#xA;$$ L_1=\{uu^rv \mid u,v\in\{0,1\}^+\}.$$&#xA;that means that neither $u$ nor $v$ can be $\varepsilon$. As usual $u^r$ refers to $u$ reflected.</p>&#xA;&#xA;<p>I think that this language is not regular, but i am not sure. Any ideas? </p>&#xA;
formal languages regular languages
1
Is this language regular? -- (formal languages regular languages) <p>Consider the following language:&#xA;$$ L_1=\{uu^rv \mid u,v\in\{0,1\}^+\}.$$&#xA;that means that neither $u$ nor $v$ can be $\varepsilon$. As usual $u^r$ refers to $u$ reflected.</p>&#xA;&#xA;<p>I think that this language is not regular, but i am not...
habedi/stack-exchange-dataset
7,275
Why does the Count-Min Sketch require pairwise independent hash functions?
<p>The <a href="http://en.wikipedia.org/wiki/Count-Min_sketch">Count-Min Sketch</a> is an awesome data structure for estimating the frequencies of different elements in a data stream. Intuitively, it works by picking a variety of hash functions, hashing each element with those hash functions, and incrementing the freq...
algorithms data structures randomized algorithms hash
1
Why does the Count-Min Sketch require pairwise independent hash functions? -- (algorithms data structures randomized algorithms hash) <p>The <a href="http://en.wikipedia.org/wiki/Count-Min_sketch">Count-Min Sketch</a> is an awesome data structure for estimating the frequencies of different elements in a data stream. I...
habedi/stack-exchange-dataset
7,276
Smallest string length to contain all types of beads
<p>I read this question somewhere, and could not come up with an efficient answer.</p>&#xA;&#xA;<p>A string of some length has beads fixed on it at some given arbitrary distances from each other. There are $k$ different types of beads and $n$ beads in total on the string, and each bead is present atleast once. We need ...
algorithms dynamic programming search algorithms
1
Smallest string length to contain all types of beads -- (algorithms dynamic programming search algorithms) <p>I read this question somewhere, and could not come up with an efficient answer.</p>&#xA;&#xA;<p>A string of some length has beads fixed on it at some given arbitrary distances from each other. There are $k$ dif...
habedi/stack-exchange-dataset
7,281
If $f(n) = \Theta(g(n))$, do both functions bound each other for all $n$ or only sufficiently large $n$?
<p>The following is an excerpt from <a href="http://www.amazon.ca/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1355097851&amp;sr=1-1" rel="nofollow">CLRS</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>$\Theta(g(n))= \{ f(n) \mid \text{ $\exists c_1,c_2,n_0&gt;0$ such that $0 \l...
asymptotics landau notation
1
If $f(n) = \Theta(g(n))$, do both functions bound each other for all $n$ or only sufficiently large $n$? -- (asymptotics landau notation) <p>The following is an excerpt from <a href="http://www.amazon.ca/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1355097851&amp;sr=1-1" ...
habedi/stack-exchange-dataset
7,285
Undecidability of the following language
<p>So we can prove that the language say $A = \{ \langle M,w \rangle \mid \text{M is TM that accepts } w^R \text{ whenever it accepts } w \}$ is undecidable by assuming it is decidable and use that to construct a $TM$ deciding $A_{TM}$. So by contradiction $A$ is undecidable. But what if the language was $\{ \langle M,...
turing machines undecidability
1
Undecidability of the following language -- (turing machines undecidability) <p>So we can prove that the language say $A = \{ \langle M,w \rangle \mid \text{M is TM that accepts } w^R \text{ whenever it accepts } w \}$ is undecidable by assuming it is decidable and use that to construct a $TM$ deciding $A_{TM}$. So by ...
habedi/stack-exchange-dataset
7,286
is determinism = non determinism for one counter automata?
<p>This language I think is not accepted by a deterministic one counter but accepted by a non-deterministic one counter :</p>&#xA;&#xA;<p>$L = \{a^{i}b^{j}c^{k} \mid (i=j) \vee (j=k) \text{ such that } i\geq0, j\geq0, k\geq0\}$</p>&#xA;&#xA;<p>But how to prove this claim?</p>&#xA;&#xA;<p>Or is it the case that they are...
automata
1
is determinism = non determinism for one counter automata? -- (automata) <p>This language I think is not accepted by a deterministic one counter but accepted by a non-deterministic one counter :</p>&#xA;&#xA;<p>$L = \{a^{i}b^{j}c^{k} \mid (i=j) \vee (j=k) \text{ such that } i\geq0, j\geq0, k\geq0\}$</p>&#xA;&#xA;<p>But...
habedi/stack-exchange-dataset
7,293
Origin of quantum complexity theory
<p>Who was/were the first person/people to introduce the topic of quantum complexity theory and problem classes like BQP and QMA?</p>&#xA;
complexity theory quantum computing history
1
Origin of quantum complexity theory -- (complexity theory quantum computing history) <p>Who was/were the first person/people to introduce the topic of quantum complexity theory and problem classes like BQP and QMA?</p>&#xA;
habedi/stack-exchange-dataset
7,300
Present syntax rules in a more succinct way
<p>I am resuming syntax rules for a small language:</p>&#xA;&#xA;<p>\begin{eqnarray*}&#xA;e_C &amp;::=&amp; \epsilon \mid constant \\&#xA;\textit{prefix-op} &amp;::=&amp; - \\&#xA;\textit{infix-op} &amp;::=&amp; + \mid - \mid * \\&#xA;e_E &amp;::=&amp; e_C \mid \textit{prefix-op} \; e_E \mid e_E \; \textit{infix-op} \;...
formal languages formal grammars semantics
1
Present syntax rules in a more succinct way -- (formal languages formal grammars semantics) <p>I am resuming syntax rules for a small language:</p>&#xA;&#xA;<p>\begin{eqnarray*}&#xA;e_C &amp;::=&amp; \epsilon \mid constant \\&#xA;\textit{prefix-op} &amp;::=&amp; - \\&#xA;\textit{infix-op} &amp;::=&amp; + \mid - \mid * ...
habedi/stack-exchange-dataset
7,308
Advice speeds up computations
<p>I want to show that reasonable advice can really speed up computation.</p>&#xA;&#xA;<p>Show, that every time-constructible function $t$, there exists a set $S$ in time $\text{DTIME}(t^2) \setminus \text{DTIME}(t)$ that can be decided in linear time using an advice of linear length, $S \in \text{DTIME}(l) / l$ (defi...
complexity theory time complexity
1
Advice speeds up computations -- (complexity theory time complexity) <p>I want to show that reasonable advice can really speed up computation.</p>&#xA;&#xA;<p>Show, that every time-constructible function $t$, there exists a set $S$ in time $\text{DTIME}(t^2) \setminus \text{DTIME}(t)$ that can be decided in linear time...
habedi/stack-exchange-dataset
7,309
execises in computational complexity
<p>I am trying to get better in proofs and deep understanding of concept of <strong>computational complexity</strong>. Unfortunately, so far, with no success.</p>&#xA;&#xA;<p>In order to get more intuition, I decided to do more exercises, but most of them are still difficult for me.</p>&#xA;&#xA;<p>I am looking for exe...
complexity theory
1
execises in computational complexity -- (complexity theory) <p>I am trying to get better in proofs and deep understanding of concept of <strong>computational complexity</strong>. Unfortunately, so far, with no success.</p>&#xA;&#xA;<p>In order to get more intuition, I decided to do more exercises, but most of them are ...
habedi/stack-exchange-dataset
7,313
Can there be a perfect chess algorithm?
<p>Current chess algorithms go about 1 or maybe 2 levels down a tree of possible paths depending on the player's move's and the opponent's moves. Let's say that we have the computing power to develop an algorithm that predicts all possible movements of the opponent in a chess game. An algorithm that has all the possibl...
algorithms turing machines
1
Can there be a perfect chess algorithm? -- (algorithms turing machines) <p>Current chess algorithms go about 1 or maybe 2 levels down a tree of possible paths depending on the player's move's and the opponent's moves. Let's say that we have the computing power to develop an algorithm that predicts all possible movement...
habedi/stack-exchange-dataset
7,322
Studying Programming Language Theory
<p>I have recently become extremely interested in understanding and proving aspects of (functional) programming languages.</p>&#xA;&#xA;<p>However as I dive deeper in, things like $\lambda$ calculus, category theory, and denotational semantics are a little difficult to grok without proper explanation.</p>&#xA;&#xA;<p>I...
reference request lambda calculus functional programming books
1
Studying Programming Language Theory -- (reference request lambda calculus functional programming books) <p>I have recently become extremely interested in understanding and proving aspects of (functional) programming languages.</p>&#xA;&#xA;<p>However as I dive deeper in, things like $\lambda$ calculus, category theory...
habedi/stack-exchange-dataset
7,325
why are deterministic PDAs not closed under concatenation?
<p>I can understand that they are not closed under concatenation because without non determinism, PDA cannot decide whether to loop in the first PDA or jump to the next one.&#xA;But can someone prove this with an example. Also prove that the resulting language cannot be accepted by DPDA</p>&#xA;
automata pushdown automata
1
why are deterministic PDAs not closed under concatenation? -- (automata pushdown automata) <p>I can understand that they are not closed under concatenation because without non determinism, PDA cannot decide whether to loop in the first PDA or jump to the next one.&#xA;But can someone prove this with an example. Also pr...
habedi/stack-exchange-dataset