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
93,617
Existence of Optimal Policy for infinite-state MDPs
<p>It is well-know from Puterman's book (1994) that in any finite-state MDP, if there exists an optimal policy, then that policy is stationary and deterministic. How about MDPs with continuous state spaces with finite-action space? Assume that the rewards are bounded.</p>&#xA;
machine learning reinforcement learning
1
Existence of Optimal Policy for infinite-state MDPs -- (machine learning reinforcement learning) <p>It is well-know from Puterman's book (1994) that in any finite-state MDP, if there exists an optimal policy, then that policy is stationary and deterministic. How about MDPs with continuous state spaces with finite-actio...
habedi/stack-exchange-dataset
93,621
What is complexity class language $L$ such that $\forall\varepsilon > 0,L\in\mathcal{O}(n^\varepsilon)$?
<blockquote>&#xA; <p>For language $L$, we have $\forall\varepsilon &gt; 0,L\in\mathcal{O}(n^\varepsilon)$. What is the class of $L$?</p>&#xA;</blockquote>&#xA;&#xA;<p>It is obvious that $L\in$ polynomials. Is there a smaller class for $L$? For example, $L\in\mathcal{O}(\lg(n))$ or $L\in\mathcal{O}(\mathrm{polylog}(n))...
complexity theory time complexity asymptotics
1
What is complexity class language $L$ such that $\forall\varepsilon > 0,L\in\mathcal{O}(n^\varepsilon)$? -- (complexity theory time complexity asymptotics) <blockquote>&#xA; <p>For language $L$, we have $\forall\varepsilon &gt; 0,L\in\mathcal{O}(n^\varepsilon)$. What is the class of $L$?</p>&#xA;</blockquote>&#xA;&#xA...
habedi/stack-exchange-dataset
93,636
Simulated annealing to find the correct permutation of 20 words
<p>I have 20 words. One permutation of these 20 words is the "correct" one. Assume I have a metric to find the correctness of the permutation.</p>&#xA;&#xA;<p>I'm trying to figure out how to use simulated annealing to find the correct permutation of these 20 words. To begin with, I'm not even sure if I understand simul...
algorithms permutations
1
Simulated annealing to find the correct permutation of 20 words -- (algorithms permutations) <p>I have 20 words. One permutation of these 20 words is the "correct" one. Assume I have a metric to find the correctness of the permutation.</p>&#xA;&#xA;<p>I'm trying to figure out how to use simulated annealing to find the ...
habedi/stack-exchange-dataset
93,637
How CompCert "proves" different things in its codebase
<p>In order to understand <a href="https://cs.stackexchange.com/questions/93400/an-example-of-something-you-can-formally-verify-with-proofs-in-software-developm">examples of formal proofs</a>, I am interested in how <a href="https://github.com/AbsInt/CompCert" rel="nofollow noreferrer">CompCert</a> applies "proof" tech...
proof techniques type theory software verification coq
1
How CompCert "proves" different things in its codebase -- (proof techniques type theory software verification coq) <p>In order to understand <a href="https://cs.stackexchange.com/questions/93400/an-example-of-something-you-can-formally-verify-with-proofs-in-software-developm">examples of formal proofs</a>, I am interes...
habedi/stack-exchange-dataset
93,642
Simple example for Higher Order Abstract Syntax (λ-tree syntax)
<p>I am reading <a href="https://www.cs.cmu.edu/~fp/papers/pldi88.pdf" rel="nofollow noreferrer">https://www.cs.cmu.edu/~fp/papers/pldi88.pdf</a> and <a href="https://en.wikipedia.org/wiki/Higher-order_abstract_syntax" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Higher-order_abstract_syntax</a> for trying t...
programming languages syntax syntax trees
1
Simple example for Higher Order Abstract Syntax (λ-tree syntax) -- (programming languages syntax syntax trees) <p>I am reading <a href="https://www.cs.cmu.edu/~fp/papers/pldi88.pdf" rel="nofollow noreferrer">https://www.cs.cmu.edu/~fp/papers/pldi88.pdf</a> and <a href="https://en.wikipedia.org/wiki/Higher-order_abstrac...
habedi/stack-exchange-dataset
93,647
What is the difference between Big O and Theta notation in terms of inputs?
<p>In Coreman , it's written :</p>&#xA;&#xA;<blockquote>&#xA; <p>The $O(n^2)$ bound on worst-case running time of insertion sort also applies to its running time on every input. The $\Theta(n^2)$ bound on the worst-case running time of insertion sort,however, does not imply $\Theta(n^2)$ bound on the running time of i...
algorithm analysis asymptotics runtime analysis
1
What is the difference between Big O and Theta notation in terms of inputs? -- (algorithm analysis asymptotics runtime analysis) <p>In Coreman , it's written :</p>&#xA;&#xA;<blockquote>&#xA; <p>The $O(n^2)$ bound on worst-case running time of insertion sort also applies to its running time on every input. The $\Theta(...
habedi/stack-exchange-dataset
93,659
Clique vs Complete Graph
<p>Is there a difference between a complete graph and a clique topology? As far as I understand, both refer to graphs in which every possible edge between any two vertices is present. Is there a subtle difference between these two concepts?</p>&#xA;
graphs terminology
1
Clique vs Complete Graph -- (graphs terminology) <p>Is there a difference between a complete graph and a clique topology? As far as I understand, both refer to graphs in which every possible edge between any two vertices is present. Is there a subtle difference between these two concepts?</p>&#xA;
habedi/stack-exchange-dataset
93,667
Exponential Time Classification
<p>If I have a list of length 'n' where each element is a successive power of 2 would an algorithm that simply prints each element decremented to 1 be classified as exponential time?</p>&#xA;&#xA;<pre><code>print([2,4,8,16]) #operations:1&#xA;print([1,4,8,16]) #operations:2&#xA;print([1,3,8,16]) #operations:3&#xA;print...
time complexity asymptotics
1
Exponential Time Classification -- (time complexity asymptotics) <p>If I have a list of length 'n' where each element is a successive power of 2 would an algorithm that simply prints each element decremented to 1 be classified as exponential time?</p>&#xA;&#xA;<pre><code>print([2,4,8,16]) #operations:1&#xA;print([1,4,8...
habedi/stack-exchange-dataset
93,668
Linked List fundamental concepts
<p>I am trying to understand the basics of Linked List. The definition of my LinkedList class is as follows:</p>&#xA;&#xA;<pre><code>public class ListNode {&#xA; int val;&#xA; ListNode next;&#xA; ListNode(int x) { val = x; }&#xA;</code></pre>&#xA;&#xA;<p>Now I am facing a problem. My code is as follows:</p>&#xA;&#xA;<p...
memory access linked lists java
1
Linked List fundamental concepts -- (memory access linked lists java) <p>I am trying to understand the basics of Linked List. The definition of my LinkedList class is as follows:</p>&#xA;&#xA;<pre><code>public class ListNode {&#xA; int val;&#xA; ListNode next;&#xA; ListNode(int x) { val = x; }&#xA;</code></pre>&#xA;&#x...
habedi/stack-exchange-dataset
93,671
How to efficiently select the initial node to start a search in a Skip Graph
<p>Checked out a few papers on Skip Graphs:</p>&#xA;&#xA;<ul>&#xA;<li><a href="https://arxiv.org/pdf/1704.00830.pdf" rel="nofollow noreferrer">Locally Self-Adjusting Skip Graphs</a></li>&#xA;<li><a href="http://dspace.thapar.edu:8080/jspui/bitstream/10266/3550/4/3550.pdf" rel="nofollow noreferrer">Adaptive Probabilisti...
algorithms graphs data structures optimization
1
How to efficiently select the initial node to start a search in a Skip Graph -- (algorithms graphs data structures optimization) <p>Checked out a few papers on Skip Graphs:</p>&#xA;&#xA;<ul>&#xA;<li><a href="https://arxiv.org/pdf/1704.00830.pdf" rel="nofollow noreferrer">Locally Self-Adjusting Skip Graphs</a></li>&#xA;...
habedi/stack-exchange-dataset
93,672
Logical characterization of P versus NP problem (and references for least fixed point logic)
<p>Wikipedia says the following (and more) about the logical characterization of the P versus NP problem <a href="https://en.wikipedia.org/wiki/P_versus_NP_problem#Logical_characterizations" rel="nofollow noreferrer">here</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Thus, the question "is P a proper subset of NP" can be ref...
logic p vs np first order logic fixed point
1
Logical characterization of P versus NP problem (and references for least fixed point logic) -- (logic p vs np first order logic fixed point) <p>Wikipedia says the following (and more) about the logical characterization of the P versus NP problem <a href="https://en.wikipedia.org/wiki/P_versus_NP_problem#Logical_charac...
habedi/stack-exchange-dataset
93,673
Can we call deterministic equivalent of all NFA to be finite
<p>Finite automata is defined as a simple machine having small memory. A deterministic equivalent of a NFA with n states will have O(2^n) states,so the number of states grow exponentially. So can we always call the deterministic equivalent to be a finite automata just by saying that as n is finite 2^n will also be fini...
automata finite automata nondeterminism
1
Can we call deterministic equivalent of all NFA to be finite -- (automata finite automata nondeterminism) <p>Finite automata is defined as a simple machine having small memory. A deterministic equivalent of a NFA with n states will have O(2^n) states,so the number of states grow exponentially. So can we always call the...
habedi/stack-exchange-dataset
93,688
How to find the class of a problem?
<p>I've learnt about complexity classes but my knowledge doesn't seem to help much when I am given a problem and need to decide it's complexity. </p>&#xA;&#xA;<p>Here is the problem at hand:&#xA;A set of weights with the same dimensions but with different densities have to be ordered on a plank (on a straight line). Th...
complexity theory
1
How to find the class of a problem? -- (complexity theory) <p>I've learnt about complexity classes but my knowledge doesn't seem to help much when I am given a problem and need to decide it's complexity. </p>&#xA;&#xA;<p>Here is the problem at hand:&#xA;A set of weights with the same dimensions but with different densi...
habedi/stack-exchange-dataset
93,690
Why must a Turing Machine that Repeats the Same Configuration Twice be in an Infinite Loop?
<p>I have seen the following statement, and I don't quite understand the reasoning behind it:</p>&#xA;&#xA;<blockquote>&#xA; <p>If a Turing machine repeats the same configuration twice, it must be in an infinite loop.</p>&#xA;</blockquote>&#xA;&#xA;<p>I thought that a $TM$ can be in a state $q_1$, with the tape on the...
complexity theory turing machines
1
Why must a Turing Machine that Repeats the Same Configuration Twice be in an Infinite Loop? -- (complexity theory turing machines) <p>I have seen the following statement, and I don't quite understand the reasoning behind it:</p>&#xA;&#xA;<blockquote>&#xA; <p>If a Turing machine repeats the same configuration twice, it...
habedi/stack-exchange-dataset
93,694
Find the kth smallest element in an unsorted array of non-negative integers
<p>I need to find the kth smallest element in an unsorted array of non-negative integer. </p>&#xA;&#xA;<p>kth smallest element is the minimum possible n such that there are at least kth elements &lt;= n.</p>&#xA;&#xA;<p>The rub here is that the array is read only so it can't be modified. Also i have to do it in constan...
algorithms time complexity arrays
1
Find the kth smallest element in an unsorted array of non-negative integers -- (algorithms time complexity arrays) <p>I need to find the kth smallest element in an unsorted array of non-negative integer. </p>&#xA;&#xA;<p>kth smallest element is the minimum possible n such that there are at least kth elements &lt;= n.</...
habedi/stack-exchange-dataset
93,698
Regularity under set difference
<p>Let L be a regular language.&#xA;Then $\Sigma^{*} \backslash L^{*} = (\Sigma^{*} \backslash L)^{*}$</p>&#xA;&#xA;<p>How do I prove it is wrong?</p>&#xA;
formal languages regular languages finite automata regular expressions
1
Regularity under set difference -- (formal languages regular languages finite automata regular expressions) <p>Let L be a regular language.&#xA;Then $\Sigma^{*} \backslash L^{*} = (\Sigma^{*} \backslash L)^{*}$</p>&#xA;&#xA;<p>How do I prove it is wrong?</p>&#xA;
habedi/stack-exchange-dataset
93,704
How to resolve issue of circular definition for an `If` statement
<p>I am trying to define an <code>If</code> statement, but am stuck because the definition/implementation of <code>If</code> is circular from what I have tried. For example, here is one definition:</p>&#xA;&#xA;<pre><code>class If {&#xA; provide: Condition&#xA; provide: TrueBlock&#xA; body:&#xA; If (Condition) {&...
programming languages
1
How to resolve issue of circular definition for an `If` statement -- (programming languages) <p>I am trying to define an <code>If</code> statement, but am stuck because the definition/implementation of <code>If</code> is circular from what I have tried. For example, here is one definition:</p>&#xA;&#xA;<pre><code>class...
habedi/stack-exchange-dataset
93,713
Stacking Boxes in topological order
<p><br>recently i was solving a programming question on uva judge Stacking boxes&#xA;<br>link to the problem : <a href="https://uva.onlinejudge.org/index.php?option=com_onlinejudge&amp;Itemid=8&amp;category=3&amp;page=show_problem&amp;problem=39" rel="nofollow noreferrer">https://uva.onlinejudge.org/index.php?option=co...
graphs
1
Stacking Boxes in topological order -- (graphs) <p><br>recently i was solving a programming question on uva judge Stacking boxes&#xA;<br>link to the problem : <a href="https://uva.onlinejudge.org/index.php?option=com_onlinejudge&amp;Itemid=8&amp;category=3&amp;page=show_problem&amp;problem=39" rel="nofollow noreferrer"...
habedi/stack-exchange-dataset
93,716
What the heck is a memory channel "CS bus"?
<p>While I was reading about memory architecture from <a href="https://classes.cs.uchicago.edu/archive/2016/fall/22200-1/lecture_notes/li-cmsc22200-aut16-lecture17.pdf" rel="nofollow noreferrer">the CMSC 22200's Lecture 17 of University of Chicago</a>, I got stuck on determining the meaning of the word "CS" used for de...
computer architecture memory hardware
1
What the heck is a memory channel "CS bus"? -- (computer architecture memory hardware) <p>While I was reading about memory architecture from <a href="https://classes.cs.uchicago.edu/archive/2016/fall/22200-1/lecture_notes/li-cmsc22200-aut16-lecture17.pdf" rel="nofollow noreferrer">the CMSC 22200's Lecture 17 of Univers...
habedi/stack-exchange-dataset
93,720
Finding all edges on any shortest path between two nodes
<p>Given a directed weighted graph with non-negative weights, how can I find all edges that are a part of any of the shortest paths from vertex X to Y?</p>&#xA;&#xA;<p>In the example below the yellow edges are the solution for finding the shortest path between A and D (note that other examples may have more than one pa...
algorithms graphs shortest path
1
Finding all edges on any shortest path between two nodes -- (algorithms graphs shortest path) <p>Given a directed weighted graph with non-negative weights, how can I find all edges that are a part of any of the shortest paths from vertex X to Y?</p>&#xA;&#xA;<p>In the example below the yellow edges are the solution for...
habedi/stack-exchange-dataset
93,747
Is De Bruijn Graph Hyper-cube?
<p>I do not know if I miss something in the definition of a hyper-cube, but as far as I understand, Hyper-cube graphs have 2^n vertices and if written in binary form, "one-bit difference" strings of numbers are linked with an edge. </p>&#xA;&#xA;<p>From this definition, De Bruijn graph does not look like it is a hyper-...
graphs
1
Is De Bruijn Graph Hyper-cube? -- (graphs) <p>I do not know if I miss something in the definition of a hyper-cube, but as far as I understand, Hyper-cube graphs have 2^n vertices and if written in binary form, "one-bit difference" strings of numbers are linked with an edge. </p>&#xA;&#xA;<p>From this definition, De Bru...
habedi/stack-exchange-dataset
93,752
Name for data structure
<p>I have a data structure that implements the following operations all in $O(1)$:</p>&#xA;&#xA;<ul>&#xA;<li>$\text{insert(x)}$, inserts a value into the data structure and returns a unique key $k$ to the value</li>&#xA;<li>$\text{delete(k)}$, deletes the value at key $k$ and returns it</li>&#xA;<li>$\text{get(k)}$, re...
data structures reference request
1
Name for data structure -- (data structures reference request) <p>I have a data structure that implements the following operations all in $O(1)$:</p>&#xA;&#xA;<ul>&#xA;<li>$\text{insert(x)}$, inserts a value into the data structure and returns a unique key $k$ to the value</li>&#xA;<li>$\text{delete(k)}$, deletes the v...
habedi/stack-exchange-dataset
93,762
Why this greedy algorithm does not return the optimal solution to this NP-hard problem?
<p><strong>Problem:</strong>&#xA;In the generalized assignment problem with unit-value items, there are $m$ bins of capacity $C$ each. There are $n$ items where each item $i$ has weight $w_{ij}$ with bin $j$. The objective is to assign the items to the bins (while respecting the bins capacities) such that the number of...
algorithms np hard greedy algorithms
1
Why this greedy algorithm does not return the optimal solution to this NP-hard problem? -- (algorithms np hard greedy algorithms) <p><strong>Problem:</strong>&#xA;In the generalized assignment problem with unit-value items, there are $m$ bins of capacity $C$ each. There are $n$ items where each item $i$ has weight $w_{...
habedi/stack-exchange-dataset
93,772
Virutalization of peripheral device
<p>I have this question to answer: "Please shortly explain how an interface virtualizes a peripheral device to the CPU."</p>&#xA;&#xA;<p>I don't really understand what the question is asking for. I know the theory behind virtual memory. I understand that a harddisk can be seen as a peripheral device. </p>&#xA;&#xA;<p>C...
computer architecture cpu virtual memory
1
Virutalization of peripheral device -- (computer architecture cpu virtual memory) <p>I have this question to answer: "Please shortly explain how an interface virtualizes a peripheral device to the CPU."</p>&#xA;&#xA;<p>I don't really understand what the question is asking for. I know the theory behind virtual memory. I...
habedi/stack-exchange-dataset
93,778
How many different strongly connected graphs can be created given n nodes?
<p>Given some fixed number of nodes $n$, which we will number 1 to $n$ in order to tell them apart, how many different strongly connected graphs can be created? Multiple edges with the same starting and ending nodes should be considered redundant and not contribute to the total.</p>&#xA;&#xA;<p>For example, if $n$ is 2...
graphs combinatorics
1
How many different strongly connected graphs can be created given n nodes? -- (graphs combinatorics) <p>Given some fixed number of nodes $n$, which we will number 1 to $n$ in order to tell them apart, how many different strongly connected graphs can be created? Multiple edges with the same starting and ending nodes sho...
habedi/stack-exchange-dataset
93,783
Is Loop Invariant Proof a form of Induction?
<p>As far as I see, what computer scientists refer to as loop invariant proofs are exact replicas of induction proof. Is it true? Can I state that loop invariant proof implies an induction? Is there a theoretical difference?</p>&#xA;
proof techniques correctness proof induction loop invariants
1
Is Loop Invariant Proof a form of Induction? -- (proof techniques correctness proof induction loop invariants) <p>As far as I see, what computer scientists refer to as loop invariant proofs are exact replicas of induction proof. Is it true? Can I state that loop invariant proof implies an induction? Is there a theoreti...
habedi/stack-exchange-dataset
93,792
Has the concept of using a hand checked simple theorem prover to validate more complex theorem provers been explored before?
<p>More specifically, has anyone used a chain of theorem provers to validate a highly evolved theorem prover, starting with a very simple hand checked prover such that each new theorem prover is used to validate a somewhat more complex theorem prover, rinse repeat?</p>&#xA;&#xA;<p>This would be something along the line...
automated theorem proving
1
Has the concept of using a hand checked simple theorem prover to validate more complex theorem provers been explored before? -- (automated theorem proving) <p>More specifically, has anyone used a chain of theorem provers to validate a highly evolved theorem prover, starting with a very simple hand checked prover such t...
habedi/stack-exchange-dataset
93,798
What is a safe programming language?
<p>Safe programming languages (PL) are gaining popularity. I wonder what is the <strong>formal definition</strong> of safe PL. For example, C is not safe, but Java is safe. I suspect that the property “safe” should be applied to a PL implementation rather than to the PL itself. If so, let’s discuss a definition of safe...
programming languages
1
What is a safe programming language? -- (programming languages) <p>Safe programming languages (PL) are gaining popularity. I wonder what is the <strong>formal definition</strong> of safe PL. For example, C is not safe, but Java is safe. I suspect that the property “safe” should be applied to a PL implementation rather ...
habedi/stack-exchange-dataset
93,805
Are there any computer science encyclopedias?
<p>Consider the volume "The Princeton Companion to Mathematics" which has the broadest range of topics attempted by any book in the field. </p>&#xA;&#xA;<p>Does a Computer Science counterpart exist?</p>&#xA;
reference request books
1
Are there any computer science encyclopedias? -- (reference request books) <p>Consider the volume "The Princeton Companion to Mathematics" which has the broadest range of topics attempted by any book in the field. </p>&#xA;&#xA;<p>Does a Computer Science counterpart exist?</p>&#xA;
habedi/stack-exchange-dataset
93,815
Merge a set of strings based on overlaps
<p>I have a set of strings that are slices of a single, longer string. It is not guaranteed, however, that any two strings from this set must overlap: only that all of them together overlap. I want to reconstruct the original longer string.</p>&#xA;&#xA;<p>For example, suppose the longer string is LGHFDJGHSJGHDFKSJBSFS...
algorithms graphs strings
1
Merge a set of strings based on overlaps -- (algorithms graphs strings) <p>I have a set of strings that are slices of a single, longer string. It is not guaranteed, however, that any two strings from this set must overlap: only that all of them together overlap. I want to reconstruct the original longer string.</p>&#xA...
habedi/stack-exchange-dataset
93,825
Prove that EXPtime contains PSPACE
<p>How to prove that "EXPtime contains PSPACE"?<img src="https://i.stack.imgur.com/dMToF.png" alt="enter image description here"></p>&#xA;
complexity theory
1
Prove that EXPtime contains PSPACE -- (complexity theory) <p>How to prove that "EXPtime contains PSPACE"?<img src="https://i.stack.imgur.com/dMToF.png" alt="enter image description here"></p>&#xA;
habedi/stack-exchange-dataset
93,831
Is it possible for a Turing machine to be able to reduce a grammar and tell where it fits in chomsky hierarchy?
<p>For example:&#xA;This looks like a context free grammar:&#xA; → &#xA; → | &#xA; → | &#xA; → | c</p>&#xA;&#xA;<p>but it can be reduced to this regular language:&#xA; → | &#xA; → | &#xA; → | c</p>&#xA;&#xA;<p>I want to know if it is possible or not and why</p>&#xA;
turing machines formal grammars chomsky hierarchy
1
Is it possible for a Turing machine to be able to reduce a grammar and tell where it fits in chomsky hierarchy? -- (turing machines formal grammars chomsky hierarchy) <p>For example:&#xA;This looks like a context free grammar:&#xA; → &#xA; → | &#xA; → | &#xA; → | c</p>&#xA;&#xA;<p>but it can be reduced to this regul...
habedi/stack-exchange-dataset
93,839
Obtaining a computational history of a Turing Machine
<p>I am currently reading the proof presented in Sipser's "Theory of Computation" for the undecidability of the problem of checking whether the language accepted by a linear bounded automata is empty. In this proof, a contradiction is derived via a reduction from the problem of checking whether a Turing machine, $M$ ac...
turing machines computability undecidability
1
Obtaining a computational history of a Turing Machine -- (turing machines computability undecidability) <p>I am currently reading the proof presented in Sipser's "Theory of Computation" for the undecidability of the problem of checking whether the language accepted by a linear bounded automata is empty. In this proof, ...
habedi/stack-exchange-dataset
93,842
Determine the worst-case complexity that allow you to conclude that a given array with n elements is not sorted
<p>Determine the worst-case complexity (in number of comparisons of two array elements) that allow you to conclude that a given array with n elements is not sorted.</p>&#xA;&#xA;<p>I sort of have a general idea of what is going on. Suppose I have two element array, then make one comparison between these two elements.</...
algorithms
1
Determine the worst-case complexity that allow you to conclude that a given array with n elements is not sorted -- (algorithms) <p>Determine the worst-case complexity (in number of comparisons of two array elements) that allow you to conclude that a given array with n elements is not sorted.</p>&#xA;&#xA;<p>I sort of h...
habedi/stack-exchange-dataset
93,846
Why it is not $O(m)$ but $O(\log m)$?
<p>I am reading the <a href="http://www.wisdom.weizmann.ac.il/~robi/teaching/2018b-SublinearAlgorithms/lecture1.pdf" rel="nofollow noreferrer">lecture notes</a> and have a question. I am trying to understand the beginning of Section 3 on page 2. </p>&#xA;&#xA;<p>Problem: Given an input stream $\sigma$, compute (or appr...
complexity theory space complexity counting
1
Why it is not $O(m)$ but $O(\log m)$? -- (complexity theory space complexity counting) <p>I am reading the <a href="http://www.wisdom.weizmann.ac.il/~robi/teaching/2018b-SublinearAlgorithms/lecture1.pdf" rel="nofollow noreferrer">lecture notes</a> and have a question. I am trying to understand the beginning of Section ...
habedi/stack-exchange-dataset
93,850
How to convert statement with the existential quantifier to statement with universal quantifier?
<p>How to convert the following statement with the existential quantifier to statement with universal quantifier?</p>&#xA;&#xA;<p>$\exists n. n&gt;1\rightarrow x(n)\not=1$</p>&#xA;&#xA;<p>Please give me some suggestion?</p>&#xA;
first order logic
1
How to convert statement with the existential quantifier to statement with universal quantifier? -- (first order logic) <p>How to convert the following statement with the existential quantifier to statement with universal quantifier?</p>&#xA;&#xA;<p>$\exists n. n&gt;1\rightarrow x(n)\not=1$</p>&#xA;&#xA;<p>Please give ...
habedi/stack-exchange-dataset
93,854
Question about Morris' algorithm
<p>I am reading the <a href="http://www.wisdom.weizmann.ac.il/~robi/teaching/2018b-SublinearAlgorithms/lecture1.pdf" rel="nofollow noreferrer">lecture notes</a>. I am trying to understand Morris' algorithm on page 2. The Morris' algorithm is as follows.</p>&#xA;&#xA;<p>Problem: Given an input stream $\sigma$, compute (...
randomized algorithms
1
Question about Morris' algorithm -- (randomized algorithms) <p>I am reading the <a href="http://www.wisdom.weizmann.ac.il/~robi/teaching/2018b-SublinearAlgorithms/lecture1.pdf" rel="nofollow noreferrer">lecture notes</a>. I am trying to understand Morris' algorithm on page 2. The Morris' algorithm is as follows.</p>&#x...
habedi/stack-exchange-dataset
93,860
Shor's algorithm and offset elimination
<p>I am wondering if the second Quantum Fourier Transform (QFT) in Shor's algorithm is necessary. I am probably missing a point but it seems that an offset elimination function would suffice to determine the period?</p>&#xA;&#xA;<p>QFT eliminates the offset value and it changes the period from r to M/r, where M is a su...
quantum computing
1
Shor's algorithm and offset elimination -- (quantum computing) <p>I am wondering if the second Quantum Fourier Transform (QFT) in Shor's algorithm is necessary. I am probably missing a point but it seems that an offset elimination function would suffice to determine the period?</p>&#xA;&#xA;<p>QFT eliminates the offset...
habedi/stack-exchange-dataset
93,862
Connecting strings in a graph is a PSPACE problem
<p>We define the following problem as:</p>&#xA;&#xA;<p>Let $M$ be a TM with alphabet $\Gamma$, with $\{a,b,$ #$\} \subset \Gamma$.</p>&#xA;&#xA;<p>We define, for every natural number $n$ the graph $G_{M,n}$ by:</p>&#xA;&#xA;<p>$V_{M,n} = \{a,b\}^n$, the vertices</p>&#xA;&#xA;<p>$E_{M,n} = \{(x,y) : x,y \in V_{M,n} $ an...
complexity theory computability space complexity
1
Connecting strings in a graph is a PSPACE problem -- (complexity theory computability space complexity) <p>We define the following problem as:</p>&#xA;&#xA;<p>Let $M$ be a TM with alphabet $\Gamma$, with $\{a,b,$ #$\} \subset \Gamma$.</p>&#xA;&#xA;<p>We define, for every natural number $n$ the graph $G_{M,n}$ by:</p>&#...
habedi/stack-exchange-dataset
93,875
Why are linked lists considered O(1) for in-middle insertion/deletion whereas dynamic arrays are considered O(n)?
<p>I am struggling to understand why linked lists seem to be accepted to have better big-O performance than arrays for in-middle insertion/deletion. The performance differences between lists and arrays for front-of and end-of operations make sense intuitively, but for operations in the middle, not so much.</p>&#xA;&#xA...
arrays linked lists
1
Why are linked lists considered O(1) for in-middle insertion/deletion whereas dynamic arrays are considered O(n)? -- (arrays linked lists) <p>I am struggling to understand why linked lists seem to be accepted to have better big-O performance than arrays for in-middle insertion/deletion. The performance differences betw...
habedi/stack-exchange-dataset
93,877
Largest weight-limited connected subgraph: NP-complete?
<p>When playing Terra Mystica, it might be useful to predict how many spades you will get throughout the game, and use this information to decide where to build, such that you stand a good chance of having the longest network. Let's abstract that into the following problem:</p>&#xA;&#xA;<ul>&#xA;<li>Let a graph $G$ be ...
complexity theory graphs optimization np complete np hard
1
Largest weight-limited connected subgraph: NP-complete? -- (complexity theory graphs optimization np complete np hard) <p>When playing Terra Mystica, it might be useful to predict how many spades you will get throughout the game, and use this information to decide where to build, such that you stand a good chance of ha...
habedi/stack-exchange-dataset
93,879
About the turing machine's non-deterministic branches
<p>I have three different cases of non-deterministic turing machine.&#xA;The first machine has:&#xA;Branch "accept" and branch "loop".&#xA;The second has:&#xA;Branch "rejecte" &amp; branch "loop".&#xA;Third has:&#xA;Three branchs "rejecte" "loop" "accept".&#xA;The question is which machines will rejecte and which ones...
complexity theory
1
About the turing machine's non-deterministic branches -- (complexity theory) <p>I have three different cases of non-deterministic turing machine.&#xA;The first machine has:&#xA;Branch "accept" and branch "loop".&#xA;The second has:&#xA;Branch "rejecte" &amp; branch "loop".&#xA;Third has:&#xA;Three branchs "rejecte" "lo...
habedi/stack-exchange-dataset
93,885
Does Provable P equal Provable NP?
<p>My question is a very basic one. It seems feasible to believe that $\mathsf{P = NP}$, because there is some "pathological" good algorithm for SAT, yet it is impossible to prove that the algorithm is actually correct and/or that it runs in polynomial time, in a standard axiomatic system like ZFC.</p>&#xA;&#xA;<p>Let'...
complexity theory logic p vs np
1
Does Provable P equal Provable NP? -- (complexity theory logic p vs np) <p>My question is a very basic one. It seems feasible to believe that $\mathsf{P = NP}$, because there is some "pathological" good algorithm for SAT, yet it is impossible to prove that the algorithm is actually correct and/or that it runs in polyno...
habedi/stack-exchange-dataset
93,886
Which algorithm can calculate an optimal allocation of students to projects?
<p>I am trying to find an algorithm which calculates an optimal and stable allocation of $n$ students to $m$ projects, where each student strictly ranks all projects by preference. The available projects are predetermined and of fixed number and each student needs to be allocated to exactly one project. Each project ne...
algorithms optimization combinatorics matching
1
Which algorithm can calculate an optimal allocation of students to projects? -- (algorithms optimization combinatorics matching) <p>I am trying to find an algorithm which calculates an optimal and stable allocation of $n$ students to $m$ projects, where each student strictly ranks all projects by preference. The availa...
habedi/stack-exchange-dataset
93,895
Why does Travelling Salesman Problem pose the restriction that each vertex can only be visited once?
<p>According to the <a href="https://en.wikipedia.org/wiki/Travelling_salesman_problem#As_a_graph_problem" rel="nofollow noreferrer">wiki</a> page of TSP as a graph problem, </p>&#xA;&#xA;<blockquote>&#xA; <p><em>It is a minimization problem starting and finishing at a specified vertex after having visited each other ...
traveling salesman
1
Why does Travelling Salesman Problem pose the restriction that each vertex can only be visited once? -- (traveling salesman) <p>According to the <a href="https://en.wikipedia.org/wiki/Travelling_salesman_problem#As_a_graph_problem" rel="nofollow noreferrer">wiki</a> page of TSP as a graph problem, </p>&#xA;&#xA;<blockq...
habedi/stack-exchange-dataset
93,897
What does "higher order address bits" and "lower order address bits" mean?
<p>"Assume a system with 4 GB virtual memory and 1 GB physical memory with 32 bit addresses. if the page size is 4 KB, How many bits will be allocated as the Higher Order Address bits and Lower Order Address bits to identify page numbers and corresponding words respectively?"&#xA;My question is, What does "higher order...
memory management paging
1
What does "higher order address bits" and "lower order address bits" mean? -- (memory management paging) <p>"Assume a system with 4 GB virtual memory and 1 GB physical memory with 32 bit addresses. if the page size is 4 KB, How many bits will be allocated as the Higher Order Address bits and Lower Order Address bits to...
habedi/stack-exchange-dataset
93,915
Find the shortest sub-tree with node deletion
<p>Let $T=(V,E)$ be a tree rooted in $r$ and let $L$ denotes the set of leaves of $T$. For a given $v \in V$, let $C(v)$ be the out-neighors of $v$ <em>i.e.</em> its children in $T$ and $p(v)$ be its in-neighbor <em>i.e.</em> its predecessor in $T$. We have a metric $d : V \times V \rightarrow \mathbb{R}^+$ (respecting...
algorithms graphs optimization trees
1
Find the shortest sub-tree with node deletion -- (algorithms graphs optimization trees) <p>Let $T=(V,E)$ be a tree rooted in $r$ and let $L$ denotes the set of leaves of $T$. For a given $v \in V$, let $C(v)$ be the out-neighors of $v$ <em>i.e.</em> its children in $T$ and $p(v)$ be its in-neighbor <em>i.e.</em> its pr...
habedi/stack-exchange-dataset
93,935
Labeling half of a bipartite graph
<p>Consider the following problem: let $(U \cup V, E)$ be a bipartite graph. Is it possible to label the vertices of $U$ with either $``+"$ or $``-"$ such that every vertex of $V$ is adjacent to a vertex labeled $+$ and a vertex labeled $-$?</p>&#xA;&#xA;<p>This seems like a pretty natural problem, and I would be surpr...
algorithms reference request
1
Labeling half of a bipartite graph -- (algorithms reference request) <p>Consider the following problem: let $(U \cup V, E)$ be a bipartite graph. Is it possible to label the vertices of $U$ with either $``+"$ or $``-"$ such that every vertex of $V$ is adjacent to a vertex labeled $+$ and a vertex labeled $-$?</p>&#xA;&...
habedi/stack-exchange-dataset
93,939
If it's Possible to Create the If-Statement from Simpler Primitives
<p>This question is about how to create an <code>if</code> statement (one of the <a href="https://en.wikipedia.org/wiki/Control_flow" rel="nofollow noreferrer">control-flow statements</a>) from scratch.</p>&#xA;&#xA;<p>An if-statement is typically a built-in construct in languages. However, I am wondering if there is a...
algorithms boolean algebra iteration
1
If it's Possible to Create the If-Statement from Simpler Primitives -- (algorithms boolean algebra iteration) <p>This question is about how to create an <code>if</code> statement (one of the <a href="https://en.wikipedia.org/wiki/Control_flow" rel="nofollow noreferrer">control-flow statements</a>) from scratch.</p>&#xA...
habedi/stack-exchange-dataset
93,941
How will the value, A(2) be available in, line 2, if A(2) is being calculated in, line 3?
<p>How will the value, A(2) be available in, line 2, if A(2) is being calculated in, line 3?&#xA;<img src="https://i.stack.imgur.com/arz8L.jpg" alt="enter image description here"></p>&#xA;
computer architecture
1
How will the value, A(2) be available in, line 2, if A(2) is being calculated in, line 3? -- (computer architecture) <p>How will the value, A(2) be available in, line 2, if A(2) is being calculated in, line 3?&#xA;<img src="https://i.stack.imgur.com/arz8L.jpg" alt="enter image description here"></p>&#xA;
habedi/stack-exchange-dataset
93,947
Data structure for a quantity to price multiplier table
<p>Yesterday at work I came across an interesting problem that I wasn't able to figure how to structure properly. I'm relatively new to the field and was wondering if I could get some help around here.&#xA;What i have here is a table like this:</p>&#xA;&#xA;<pre><code> |1-2| 3-5 | 6+ | ($)&#xA; ______...
data structures
1
Data structure for a quantity to price multiplier table -- (data structures) <p>Yesterday at work I came across an interesting problem that I wasn't able to figure how to structure properly. I'm relatively new to the field and was wondering if I could get some help around here.&#xA;What i have here is a table like this...
habedi/stack-exchange-dataset
93,954
Boolean expression to a truth table
<p>How do I fill a truth table from the following expression? I can't decide whether it is SOP or POS.</p>&#xA;&#xA;<pre><code>Y=(A+B)C+AB`+(A+C)C`+(`AB) &#xA;</code></pre>&#xA;
logic boolean algebra
1
Boolean expression to a truth table -- (logic boolean algebra) <p>How do I fill a truth table from the following expression? I can't decide whether it is SOP or POS.</p>&#xA;&#xA;<pre><code>Y=(A+B)C+AB`+(A+C)C`+(`AB) &#xA;</code></pre>&#xA;
habedi/stack-exchange-dataset
93,957
Recognize end of Input in a Turing Machine
<p>If I have a turing machime TM, can I recognize end of input on the tape?</p>&#xA;<p>I know that the &quot;end of input&quot; in a turing machine is signaled with a special character, <span class="math-container">$\sqcup$</span>.</p>&#xA;<p>Can I do this -</p>&#xA;<blockquote>&#xA;<p>Let <span class="math-container">...
complexity theory turing machines
1
Recognize end of Input in a Turing Machine -- (complexity theory turing machines) <p>If I have a turing machime TM, can I recognize end of input on the tape?</p>&#xA;<p>I know that the &quot;end of input&quot; in a turing machine is signaled with a special character, <span class="math-container">$\sqcup$</span>.</p>&#x...
habedi/stack-exchange-dataset
93,960
What is the complexity of this algorithm for sparse matrices?
<p>I am reading a paper on sparse matrices and there is an algorithm for sparse lower triangular systems. In the below pseudo-code $l$ is a sparse matrix and $x,b$ are sparse vectors.</p>&#xA;&#xA;<pre><code>x=b&#xA;for j=0 to n-1 do&#xA; if x[j] != 0&#xA; for i=j+1 to n-1 do&#xA; if l[i][j] != 0&#...
algorithms asymptotics
1
What is the complexity of this algorithm for sparse matrices? -- (algorithms asymptotics) <p>I am reading a paper on sparse matrices and there is an algorithm for sparse lower triangular systems. In the below pseudo-code $l$ is a sparse matrix and $x,b$ are sparse vectors.</p>&#xA;&#xA;<pre><code>x=b&#xA;for j=0 to n-1...
habedi/stack-exchange-dataset
93,972
What are known 3SAT to 2SAT reductions?
<p>Is there a way to convert a 3SAT formula into a equisatisfiable 2SAT formula? Each method is of interest, even those that grow exponentially.&#xA;(So if, for example, my 3SAT formula has 16 variables and 32 clauses, a transformed 2SAT formula would have 2ˆ16 variables and / or 2ˆ32 clauses)</p>&#xA;&#xA;<p>An exampl...
algorithms complexity theory reductions satisfiability 3 sat
1
What are known 3SAT to 2SAT reductions? -- (algorithms complexity theory reductions satisfiability 3 sat) <p>Is there a way to convert a 3SAT formula into a equisatisfiable 2SAT formula? Each method is of interest, even those that grow exponentially.&#xA;(So if, for example, my 3SAT formula has 16 variables and 32 clau...
habedi/stack-exchange-dataset
93,979
Circular queue problem
<p>In ciruclar queue the following command statement is very useful to use the determine the unused location. What is its importance? I know that without this line it won't be a circular queue. But how to say it in theoretical way?</p>&#xA;<h3>rear=(rear+1)%max</h3>&#xA;
data structures programming languages queues
1
Circular queue problem -- (data structures programming languages queues) <p>In ciruclar queue the following command statement is very useful to use the determine the unused location. What is its importance? I know that without this line it won't be a circular queue. But how to say it in theoretical way?</p>&#xA;<h3>rea...
habedi/stack-exchange-dataset
93,980
The well-known classifiers that can be trained/tested in linear time
<p>I am interested in collecting the list of the classifiers that (depending on their setting) <strong>can have</strong> linear time complexity (both in training and testing step) with respect to the number of samples $n$, the number of features of each sample $m$, and the number of classes $c$.</p>&#xA;&#xA;<p>In othe...
complexity theory time complexity machine learning classification pattern recognition
1
The well-known classifiers that can be trained/tested in linear time -- (complexity theory time complexity machine learning classification pattern recognition) <p>I am interested in collecting the list of the classifiers that (depending on their setting) <strong>can have</strong> linear time complexity (both in trainin...
habedi/stack-exchange-dataset
93,985
Why do we discard the constant 1 in proving that $2^{n+1} = O(2^n)$
<p>In <a href="https://stackoverflow.com/questions/4856107/is-22n-o2n">this post</a>&#xA;someone said:</p>&#xA;&#xA;<blockquote>&#xA; <p>$n + 1$ is approximately equal to 1 for $2^{n+1} = O(2^n)$.</p>&#xA;</blockquote>&#xA;&#xA;<p>I don't understand this point. For example, in this example: </p>&#xA;&#xA;<p>$$ n + 1 \...
algorithm analysis
1
Why do we discard the constant 1 in proving that $2^{n+1} = O(2^n)$ -- (algorithm analysis) <p>In <a href="https://stackoverflow.com/questions/4856107/is-22n-o2n">this post</a>&#xA;someone said:</p>&#xA;&#xA;<blockquote>&#xA; <p>$n + 1$ is approximately equal to 1 for $2^{n+1} = O(2^n)$.</p>&#xA;</blockquote>&#xA;&#xA...
habedi/stack-exchange-dataset
93,988
Rows and columns in quantum-gate matrices read the same - why?
<p>I have noticed that for all the matrices representing quantum gates, if we read rows left-to-right and top to bottom, the read the same as columns top to bottom left to right.</p>&#xA;&#xA;<p>Example:</p>&#xA;&#xA;<p>\begin{pmatrix}&#xA;1 &amp; 0 &amp; 0 &amp; 0\\&#xA;0 &amp; 1 &amp; 0 &amp; 0\\&#xA;0 &amp; 0 &amp; ...
quantum computing matrices
1
Rows and columns in quantum-gate matrices read the same - why? -- (quantum computing matrices) <p>I have noticed that for all the matrices representing quantum gates, if we read rows left-to-right and top to bottom, the read the same as columns top to bottom left to right.</p>&#xA;&#xA;<p>Example:</p>&#xA;&#xA;<p>\begi...
habedi/stack-exchange-dataset
93,989
Does the space complexity of a recursive algorithm depend on the total no of recursive calls?
<p>I am confused whether space complexity of a recursive algorithm depends on the total number of recursive calls or not.</p>&#xA;&#xA;<p>Say I have an algorithm which has exponential function calls, but stack size is linear, so in that case we can say that space complexity is not proportional to number of recursive ca...
algorithms algorithm analysis space complexity
1
Does the space complexity of a recursive algorithm depend on the total no of recursive calls? -- (algorithms algorithm analysis space complexity) <p>I am confused whether space complexity of a recursive algorithm depends on the total number of recursive calls or not.</p>&#xA;&#xA;<p>Say I have an algorithm which has ex...
habedi/stack-exchange-dataset
93,991
Why do we consider the order of growth when analyzing algorithms?
<p>Seriously why do we consider how the computation time time increase with the number of inputs as a measure of performance when we can easily measure such as program execution time,power consumption,memory usage etc?Because all of these facts are depends on the hardware and programming language we use in that moment...
algorithms algorithm analysis time complexity
1
Why do we consider the order of growth when analyzing algorithms? -- (algorithms algorithm analysis time complexity) <p>Seriously why do we consider how the computation time time increase with the number of inputs as a measure of performance when we can easily measure such as program execution time,power consumption,m...
habedi/stack-exchange-dataset
94,003
Dependent Type Theory Implementation of a Graph
<p>In Haskell you find <a href="http://www.cs.ox.ac.uk/duncan.coutts/papers/recursive_data_structures_in_haskell.pdf" rel="nofollow noreferrer">graphs defined like this</a>:</p>&#xA;&#xA;<pre><code>data Graph a = GNode a (Graph a)&#xA;</code></pre>&#xA;&#xA;<p><a href="https://hackage.haskell.org/package/algebraic-grap...
graphs type theory dependent types
1
Dependent Type Theory Implementation of a Graph -- (graphs type theory dependent types) <p>In Haskell you find <a href="http://www.cs.ox.ac.uk/duncan.coutts/papers/recursive_data_structures_in_haskell.pdf" rel="nofollow noreferrer">graphs defined like this</a>:</p>&#xA;&#xA;<pre><code>data Graph a = GNode a (Graph a)&#...
habedi/stack-exchange-dataset
94,006
DFA that accepts two more $1$'s than $0$'s
<p>What is the state diagram of a DFA that follows</p>&#xA;&#xA;<p>$L = \{w \in \{0,1\}^*\mid w\text{ has at least two or more 1's than of 0's}\}$.</p>&#xA;&#xA;<p>Examples: $110$ doesn't work, $1110$ works.</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/wLXV0.jpg" alt="enter image description here"></p>&#xA;
automata finite automata
1
DFA that accepts two more $1$'s than $0$'s -- (automata finite automata) <p>What is the state diagram of a DFA that follows</p>&#xA;&#xA;<p>$L = \{w \in \{0,1\}^*\mid w\text{ has at least two or more 1's than of 0's}\}$.</p>&#xA;&#xA;<p>Examples: $110$ doesn't work, $1110$ works.</p>&#xA;&#xA;<p><img src="https://i.sta...
habedi/stack-exchange-dataset
94,009
How does RAMDAC get notified about framebuffer write?
<p>I'm learning computer graphics, and I read <a href="https://1drv.ms/p/s!AiN1sDg8pCWpgUJIEof2M4BvGANo" rel="nofollow noreferrer">this course lecture</a> in order to understand how graphics I/O works under the hood. But the following explanation was not very clear to me:</p>&#xA;&#xA;<blockquote>&#xA; <p>The values i...
computer architecture graphics memory access video
1
How does RAMDAC get notified about framebuffer write? -- (computer architecture graphics memory access video) <p>I'm learning computer graphics, and I read <a href="https://1drv.ms/p/s!AiN1sDg8pCWpgUJIEof2M4BvGANo" rel="nofollow noreferrer">this course lecture</a> in order to understand how graphics I/O works under the...
habedi/stack-exchange-dataset
94,010
polynomial time reducibility - $L_{2} \notin \textbf{P}$ and $L_{1} \leq_{p} L_{2} \implies L_{1} \notin \textbf{P}$
<p>If we have two languages $L_{1} \subseteq \Sigma^{\ast}_{1}$ and $L_{2} \subseteq \Sigma^{\ast}_{2}$ </p>&#xA;&#xA;<p>I proved that when $L_{2} \in \textbf{P}$ and $L_{1} \leq_{p} L_{2}$ then $L_{1} \in \textbf{P}$</p>&#xA;&#xA;<p>Is it also true that when $L_{2} \notin \textbf{P}$ and $L_{1} \leq_{p} L_{2}$ then ...
formal languages reductions polynomial time
1
polynomial time reducibility - $L_{2} \notin \textbf{P}$ and $L_{1} \leq_{p} L_{2} \implies L_{1} \notin \textbf{P}$ -- (formal languages reductions polynomial time) <p>If we have two languages $L_{1} \subseteq \Sigma^{\ast}_{1}$ and $L_{2} \subseteq \Sigma^{\ast}_{2}$ </p>&#xA;&#xA;<p>I proved that when $L_{2} \in \te...
habedi/stack-exchange-dataset
94,019
Optimal meeting point
<p>I'm interested in studying the problem of the optimal meeting point, which can be described as follow: $n$ individuals who want to gather in a restaurant (for example). They want a fair meeting point and to minimize the time/distance for everyone.</p>&#xA;&#xA;<p>I'm looking for information on that problem, but I've...
algorithms graphs optimization
1
Optimal meeting point -- (algorithms graphs optimization) <p>I'm interested in studying the problem of the optimal meeting point, which can be described as follow: $n$ individuals who want to gather in a restaurant (for example). They want a fair meeting point and to minimize the time/distance for everyone.</p>&#xA;&#x...
habedi/stack-exchange-dataset
94,020
Egg dropping puzzle - clarification of problem statement
<p>I was trying to understand the egg dropping puzzle. The problem objective is:</p>&#xA;&#xA;<p>What strategy should you adopt to minimize the number egg drops it takes to find the solution?. (And what is the <strong>worst case</strong> for the number of drops it will take?)</p>&#xA;&#xA;<p>I understand we want to min...
algorithms dynamic programming
1
Egg dropping puzzle - clarification of problem statement -- (algorithms dynamic programming) <p>I was trying to understand the egg dropping puzzle. The problem objective is:</p>&#xA;&#xA;<p>What strategy should you adopt to minimize the number egg drops it takes to find the solution?. (And what is the <strong>worst cas...
habedi/stack-exchange-dataset
94,022
Decidability of L
<p>I have the following problem. If L is decidable and L = L1 u L2 (union). So are L1 and L2 decidable, too? </p>&#xA;&#xA;<p>I know that, if L is decidable, the complement is also. And this means the complement is recursively enumerable. How can I proof it? </p>&#xA;
complexity theory computability
1
Decidability of L -- (complexity theory computability) <p>I have the following problem. If L is decidable and L = L1 u L2 (union). So are L1 and L2 decidable, too? </p>&#xA;&#xA;<p>I know that, if L is decidable, the complement is also. And this means the complement is recursively enumerable. How can I proof it? </p>&#...
habedi/stack-exchange-dataset
94,026
Defining an HTML Template as an Algebraic Type
<p>Wondering if/how you could define a highly nested structure as a <a href="https://en.wikipedia.org/wiki/Dependent_type" rel="nofollow noreferrer">Dependent Type</a> (or an Algebraic or Parameterized type). Specifically, an HTML template. Not that they work like this (HTML <a href="https://www.html5rocks.com/en/tutor...
type theory functional programming dependent types
1
Defining an HTML Template as an Algebraic Type -- (type theory functional programming dependent types) <p>Wondering if/how you could define a highly nested structure as a <a href="https://en.wikipedia.org/wiki/Dependent_type" rel="nofollow noreferrer">Dependent Type</a> (or an Algebraic or Parameterized type). Specific...
habedi/stack-exchange-dataset
94,031
How to get the upper, lower and average bound of a given algorithm?
<p>How to get upper, lower, average bound of given algorithm? What should be the first step I should do? I search on the internet and only give me the definition of those 3. For example if take the algorithm of nlog(n)+2 then how do we find the lower and upper bound of this? What would be the first step? </p>&#xA;
algorithms data structures asymptotics
1
How to get the upper, lower and average bound of a given algorithm? -- (algorithms data structures asymptotics) <p>How to get upper, lower, average bound of given algorithm? What should be the first step I should do? I search on the internet and only give me the definition of those 3. For example if take the algorithm...
habedi/stack-exchange-dataset
94,036
How does cache partitioning prevent covert/side-channel attacks?
<p>In a report on an open-source separation kernel (<a href="https://muen.codelabs.ch/muen-report.pdf" rel="noreferrer">Muen kernel</a>) I was reading,&#xA;in the future work section, it says that cache coloring can be implemented to prevent covert/side-channel attacks.</p>&#xA;&#xA;<p>It is mentioned that</p>&#xA;&#xA...
memory management cpu cache memory hardware memory access caching
1
How does cache partitioning prevent covert/side-channel attacks? -- (memory management cpu cache memory hardware memory access caching) <p>In a report on an open-source separation kernel (<a href="https://muen.codelabs.ch/muen-report.pdf" rel="noreferrer">Muen kernel</a>) I was reading,&#xA;in the future work section, ...
habedi/stack-exchange-dataset
94,061
Why is the graph inside Graham Scan always planar
<p>One of the ways to prove that Graham Scan constructs convex hull in linear time is using planarity of the graph obtained by running the algorithm. This graph is always planar, so according to Euler's formula the number of edges can never be more than $3*n$ (where $n$ is the number of vertices). My question is, how d...
runtime analysis computational geometry proof techniques planar graphs convex hull
1
Why is the graph inside Graham Scan always planar -- (runtime analysis computational geometry proof techniques planar graphs convex hull) <p>One of the ways to prove that Graham Scan constructs convex hull in linear time is using planarity of the graph obtained by running the algorithm. This graph is always planar, so ...
habedi/stack-exchange-dataset
94,063
Finding many different minima of nonlinear cost function
<p>Given a nonlinear cost function $G(\vec{x})$ of many variables, does there exist a method that allows one to find successive local minima $\vec{x}_0, \vec{x}_1, \dots$ so that $\vec{x}_n$ is orthogonal to $\vec{x}_{n-1}, \vec{x}_{n-2}, \dots, \vec{x}_0$?</p>&#xA;&#xA;<p>Sorry for the apparent lack of effort on my pa...
optimization
1
Finding many different minima of nonlinear cost function -- (optimization) <p>Given a nonlinear cost function $G(\vec{x})$ of many variables, does there exist a method that allows one to find successive local minima $\vec{x}_0, \vec{x}_1, \dots$ so that $\vec{x}_n$ is orthogonal to $\vec{x}_{n-1}, \vec{x}_{n-2}, \dots,...
habedi/stack-exchange-dataset
94,064
What algorithm should I use to find a minimal tree that include certain nodes within a graph?
<p>Assume we need to include a certain set of nodes in the tree within the whole graph, the generated tree can contain nodes other than the specified set of nodes. We also need the number of edges (or the total amount of edge weight) included in the tree is minimum.</p>&#xA;
algorithms graphs trees
1
What algorithm should I use to find a minimal tree that include certain nodes within a graph? -- (algorithms graphs trees) <p>Assume we need to include a certain set of nodes in the tree within the whole graph, the generated tree can contain nodes other than the specified set of nodes. We also need the number of edges ...
habedi/stack-exchange-dataset
94,068
Calculating the probability of data loss of a RAID 1+0 system
<p>I have a task where a RAID 1+0 system (A RAID 0 connects two RAID 1's with two disks each = makes 4 disks in total) is given with no further details. Then let p be the probability that one disk shows signs of failure. The variable p is not further defined.</p>&#xA;&#xA;<p>Now I've received the task to calculate the ...
computer architecture
1
Calculating the probability of data loss of a RAID 1+0 system -- (computer architecture) <p>I have a task where a RAID 1+0 system (A RAID 0 connects two RAID 1's with two disks each = makes 4 disks in total) is given with no further details. Then let p be the probability that one disk shows signs of failure. The variab...
habedi/stack-exchange-dataset
94,070
Is $\mathsf{DSPACE}(n)=\mathsf{DSPACE}(n/\log\log n)$?
<p>We know that <span class="math-container">$\mathsf{DSPACE}(\log\log n) = \mathsf{DSPACE}(1)$</span> <a href="https://cs.stackexchange.com/questions/71795/proving-that-mathrmspaceo-log-log-n-mathrmspaceo1">according to this proof</a>.&#xA;Can we claim that <span class="math-container">$\mathsf{DSPACE}(n)=\mathsf{DSPA...
complexity theory complexity classes space complexity
1
Is $\mathsf{DSPACE}(n)=\mathsf{DSPACE}(n/\log\log n)$? -- (complexity theory complexity classes space complexity) <p>We know that <span class="math-container">$\mathsf{DSPACE}(\log\log n) = \mathsf{DSPACE}(1)$</span> <a href="https://cs.stackexchange.com/questions/71795/proving-that-mathrmspaceo-log-log-n-mathrmspaceo1...
habedi/stack-exchange-dataset
94,081
Understanding facts about regular languages, finite sets and subsets of regular languages
<p>I am aware of following two facts related to two concepts: regular languages and finite sets:</p>&#xA;&#xA;<blockquote>&#xA; <ul>&#xA; <li>Regular languages are not closed under subset and proper subset operations.</li>&#xA; <li>It is decidable whether given regular language is finite or not.</li>&#xA; </ul>&#xA...
formal languages regular languages finite sets
1
Understanding facts about regular languages, finite sets and subsets of regular languages -- (formal languages regular languages finite sets) <p>I am aware of following two facts related to two concepts: regular languages and finite sets:</p>&#xA;&#xA;<blockquote>&#xA; <ul>&#xA; <li>Regular languages are not closed u...
habedi/stack-exchange-dataset
94,083
Proving that an equal partition does not exist
<p>We are given a set of $n$ numbers and want to know whether it can be partitioned to two sets with an equal sum.</p>&#xA;&#xA;<p>To prove that an equal partition exists, it is sufficient to show a partition.</p>&#xA;&#xA;<p>What is the shortest way to prove that an equal partition does NOT exist?&#xA;Apparently the o...
np complete partitions
1
Proving that an equal partition does not exist -- (np complete partitions) <p>We are given a set of $n$ numbers and want to know whether it can be partitioned to two sets with an equal sum.</p>&#xA;&#xA;<p>To prove that an equal partition exists, it is sufficient to show a partition.</p>&#xA;&#xA;<p>What is the shortes...
habedi/stack-exchange-dataset
94,084
Finding the maximum possible size of S, where S is a set of pairwise-disjoint subsets of the list, and every element of S sums to k
<p>Say I had a list of numbers in the range of 1-20 for example: [5, 16, 17, 3, 2, 14, 4, 9, 11, 19], and an integer k (let's say k = 40)</p>&#xA;&#xA;<p>How would I find the maximum possible size of S, where S is a set of pairwise-disjoint subsets of the list, and every element of S sums to k?</p>&#xA;&#xA;<p>I believ...
combinatorics packing subset sum
1
Finding the maximum possible size of S, where S is a set of pairwise-disjoint subsets of the list, and every element of S sums to k -- (combinatorics packing subset sum) <p>Say I had a list of numbers in the range of 1-20 for example: [5, 16, 17, 3, 2, 14, 4, 9, 11, 19], and an integer k (let's say k = 40)</p>&#xA;&#xA...
habedi/stack-exchange-dataset
94,091
Solving recurrences by substitution
<p>I'm going through Cormen et al.'s Introduction to Algorithms and I am a little thrown off by some of the subtleties of solving recurrences with the substitution method. Given the recurrence:</p>&#xA;&#xA;<p>$$ T(n) = T(\lfloor n/2 \rfloor) + T(\lceil n/2 \rceil) + 1, $$</p>&#xA;&#xA;<p>We guess that the solution is...
asymptotics recurrence relation
1
Solving recurrences by substitution -- (asymptotics recurrence relation) <p>I'm going through Cormen et al.'s Introduction to Algorithms and I am a little thrown off by some of the subtleties of solving recurrences with the substitution method. Given the recurrence:</p>&#xA;&#xA;<p>$$ T(n) = T(\lfloor n/2 \rfloor) + T...
habedi/stack-exchange-dataset
94,097
Symbolic Evaluation for Type Inference in a Dynamic Language
<p>Say I have the following contrived example code:</p>&#xA;&#xA;<pre><code>a(1)&#xA;&#xA;function a(x) {&#xA; var n = b(x)&#xA; var m = c(x)&#xA; return n + m&#xA;}&#xA;&#xA;function b(x) {&#xA; var n = d(x / 2)&#xA; var m = e(x)&#xA; return n - m&#xA;}&#xA;&#xA;function c(x) {&#xA; var n = d(x)&#xA; var m = e...
type checking type inference
1
Symbolic Evaluation for Type Inference in a Dynamic Language -- (type checking type inference) <p>Say I have the following contrived example code:</p>&#xA;&#xA;<pre><code>a(1)&#xA;&#xA;function a(x) {&#xA; var n = b(x)&#xA; var m = c(x)&#xA; return n + m&#xA;}&#xA;&#xA;function b(x) {&#xA; var n = d(x / 2)&#xA; va...
habedi/stack-exchange-dataset
94,102
Solving the Path Explosion Problem in Symbolic Execution
<p>Looking at the <a href="https://en.wikipedia.org/wiki/Symbolic_execution#Limitations" rel="nofollow noreferrer">Symbolic Execution limitations</a>, there are some good solutions to the "Environment interactions" problems. However, the solutions to the path explosion problem are less than ideal.</p>&#xA;&#xA;<blockqu...
simulation symbolic execution
1
Solving the Path Explosion Problem in Symbolic Execution -- (simulation symbolic execution) <p>Looking at the <a href="https://en.wikipedia.org/wiki/Symbolic_execution#Limitations" rel="nofollow noreferrer">Symbolic Execution limitations</a>, there are some good solutions to the "Environment interactions" problems. How...
habedi/stack-exchange-dataset
94,103
A Turing Machine that Doesn't Move to the left
<p>My question is if the following statement is true or false:</p>&#xA;<blockquote>&#xA;<p>Does every turing-recognized <span class="math-container">$B$</span> language has a turing machine <span class="math-container">$M$</span> that recognizes <span class="math-container">$B$</span> and fullfiles the following statem...
complexity theory turing machines
1
A Turing Machine that Doesn't Move to the left -- (complexity theory turing machines) <p>My question is if the following statement is true or false:</p>&#xA;<blockquote>&#xA;<p>Does every turing-recognized <span class="math-container">$B$</span> language has a turing machine <span class="math-container">$M$</span> that...
habedi/stack-exchange-dataset
94,112
How can I complete my derivation of an algorithm to solve Sudoku puzzles from my formalisation of the rules?
<p>I'm hoping to design and implement an intuitive algorithm that solves 9x9 Sudoku puzzles. I want to do this by first formalising the basic rules of the puzzle, and then deriving principles from these that when followed should be sufficient for solving the problem. I have reproduced my (very rough) work below.</p>&#x...
algorithms sudoku
1
How can I complete my derivation of an algorithm to solve Sudoku puzzles from my formalisation of the rules? -- (algorithms sudoku) <p>I'm hoping to design and implement an intuitive algorithm that solves 9x9 Sudoku puzzles. I want to do this by first formalising the basic rules of the puzzle, and then deriving princip...
habedi/stack-exchange-dataset
94,118
"Or" in regular expressions
<p>I'm a bit new to automata theory, I'm sorry if this question is a bit too simple. If this question has been answered somewhere already, please point me to it.</p>&#xA;&#xA;<p>One basic problem I wanted to solve was defining the minimal set of states need to construct a (minimal) DFA that accepts</p>&#xA;&#xA;<p>$$(a...
formal languages regular languages regular expressions
1
"Or" in regular expressions -- (formal languages regular languages regular expressions) <p>I'm a bit new to automata theory, I'm sorry if this question is a bit too simple. If this question has been answered somewhere already, please point me to it.</p>&#xA;&#xA;<p>One basic problem I wanted to solve was defining the m...
habedi/stack-exchange-dataset
94,127
Are there any context-free languages that are not known to be in $\mathrm{DTIME}(O(n))$?
<p>The problem of determining, given a string $x$ and a context-free grammar $G$, whether $x \in L(G)$ is conjectured to take more than linear time in the length of $x$. Currently the best known algorithm is Valiant's which takes $\Theta(|G||x|^\omega)$.</p>&#xA;&#xA;<p>On the other hand, for a fixed $G$ there may be a...
context free parsers
1
Are there any context-free languages that are not known to be in $\mathrm{DTIME}(O(n))$? -- (context free parsers) <p>The problem of determining, given a string $x$ and a context-free grammar $G$, whether $x \in L(G)$ is conjectured to take more than linear time in the length of $x$. Currently the best known algorithm ...
habedi/stack-exchange-dataset
94,135
Implementing Gauss–Legendre algorithm using arbitrary-length rationals
<p>I am trying to re-implement <a href="https://en.wikipedia.org/wiki/Super_PI" rel="nofollow noreferrer">SuperPI</a> myself in Rust, but the results I get are not very accurate. SuperPI computes pi using the <a href="https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_algorithm" rel="nofollow noreferrer">Gauss-Legen...
algorithms arithmetic floating point mathematical programming
1
Implementing Gauss–Legendre algorithm using arbitrary-length rationals -- (algorithms arithmetic floating point mathematical programming) <p>I am trying to re-implement <a href="https://en.wikipedia.org/wiki/Super_PI" rel="nofollow noreferrer">SuperPI</a> myself in Rust, but the results I get are not very accurate. Su...
habedi/stack-exchange-dataset
94,136
Compilation speed dependent on CPU?
<p>Is the speed of compiling software very dependent on the CPU? I know this question is a bit broad, but I'm to find an answer to the case described below.</p>&#xA;&#xA;<p>If I download a software project that makes use of Node.js, TypeScript, and JavaScript and compile it running <code>yarn</code> it takes a certain ...
compilers cpu
1
Compilation speed dependent on CPU? -- (compilers cpu) <p>Is the speed of compiling software very dependent on the CPU? I know this question is a bit broad, but I'm to find an answer to the case described below.</p>&#xA;&#xA;<p>If I download a software project that makes use of Node.js, TypeScript, and JavaScript and c...
habedi/stack-exchange-dataset
94,139
How to describe an algorithm whose input size diminishes by 1 for each iteration
<p>To elaborate on the title: I have a recursive algorithm whose input is reduced by 1 for every iteration until the input size is 1.</p>&#xA;&#xA;<p>1st iteration: n&#xA;<br />&#xA;2nd iteration: n-1&#xA;<br />&#xA;3rd iteration: n-2&#xA;<br />&#xA;4th iteration: n-3&#xA;<br />&#xA;.&#xA;<br />&#xA;.&#xA;<br />&#xA;.&...
asymptotics
1
How to describe an algorithm whose input size diminishes by 1 for each iteration -- (asymptotics) <p>To elaborate on the title: I have a recursive algorithm whose input is reduced by 1 for every iteration until the input size is 1.</p>&#xA;&#xA;<p>1st iteration: n&#xA;<br />&#xA;2nd iteration: n-1&#xA;<br />&#xA;3rd it...
habedi/stack-exchange-dataset
94,146
What is the relation between Time Sharing operating systems and Round Robin CPU scheduler?
<p>So i have asked this before, but i still didn't get my answer so I'll try to make my question more clear this time : </p>&#xA;&#xA;<p>Based on my O.S book, Time sharing operating systems switch between processes very fast using a time slice and it uses interrupts when the time slice ends and switches to another proc...
operating systems process scheduling
1
What is the relation between Time Sharing operating systems and Round Robin CPU scheduler? -- (operating systems process scheduling) <p>So i have asked this before, but i still didn't get my answer so I'll try to make my question more clear this time : </p>&#xA;&#xA;<p>Based on my O.S book, Time sharing operating syste...
habedi/stack-exchange-dataset
94,166
STCON in L using matrix multipication algorithm?
<p>I'm trying to understand why the following is <strong>incorrect</strong>.</p>&#xA;&#xA;<p>Given a $STCON$ problem, specifically a graph and nodes $(G, s, t)$, we can assume we are given it's adjacency matrix, $A$. By adding self-loop (filling the main diagonal with $1$'s) we can multiple this matrix with itself n ti...
space complexity
1
STCON in L using matrix multipication algorithm? -- (space complexity) <p>I'm trying to understand why the following is <strong>incorrect</strong>.</p>&#xA;&#xA;<p>Given a $STCON$ problem, specifically a graph and nodes $(G, s, t)$, we can assume we are given it's adjacency matrix, $A$. By adding self-loop (filling the...
habedi/stack-exchange-dataset
94,170
Summing two array using FFT: time complexity analysis
<p>This is the problem :</p>&#xA;&#xA;<blockquote>&#xA; <p>Given two arrays of $n$ elements A and B, let's define their sum as &#xA; $$ A + B = \{ a + b \mid a \in A \text{ and } b \in B \}. $$&#xA; Calculate $A + A$ in optimal time given that $A[i] \in [1,10n^{1.5}]$ for all $i$.</p>&#xA;</blockquote>&#xA;&#xA;<p>I...
algorithms time complexity arrays
1
Summing two array using FFT: time complexity analysis -- (algorithms time complexity arrays) <p>This is the problem :</p>&#xA;&#xA;<blockquote>&#xA; <p>Given two arrays of $n$ elements A and B, let's define their sum as &#xA; $$ A + B = \{ a + b \mid a \in A \text{ and } b \in B \}. $$&#xA; Calculate $A + A$ in opti...
habedi/stack-exchange-dataset
94,176
Is there a universal learning rate for NeuralNetworks?
<p>I'm currently creating a <strong>NeuralNetwork</strong> with <strong>backpropagation</strong>/gradient descent. There is this hyperparameter introduced called "<strong>learning rate</strong>" (<strong>η</strong>). Which has to be chosen to guarantee not overshooting the minimum of the cost function when doing gradie...
machine learning neural networks gradient descent
1
Is there a universal learning rate for NeuralNetworks? -- (machine learning neural networks gradient descent) <p>I'm currently creating a <strong>NeuralNetwork</strong> with <strong>backpropagation</strong>/gradient descent. There is this hyperparameter introduced called "<strong>learning rate</strong>" (<strong>η</str...
habedi/stack-exchange-dataset
94,179
Recursion in pi-calculus
<p>In the book by Sangiorgi and Walker ("The $\pi$-calculus: A theory of Mobile Processes"), Subsection 3.2 is devoted to recursion. They state the following constraint (pages 132-133): </p>&#xA;&#xA;<p>"The environment is <em>finitary</em>, in the sense that any process depends on only finitely many constant definitio...
recurrence relation pi calculus
1
Recursion in pi-calculus -- (recurrence relation pi calculus) <p>In the book by Sangiorgi and Walker ("The $\pi$-calculus: A theory of Mobile Processes"), Subsection 3.2 is devoted to recursion. They state the following constraint (pages 132-133): </p>&#xA;&#xA;<p>"The environment is <em>finitary</em>, in the sense tha...
habedi/stack-exchange-dataset
94,184
Are there any algorithms that run in (2 ↑ ↑ n)?
<p>I’m wondering whether there are any algorithms that use so much time that they must be represented using <a href="https://en.wikipedia.org/wiki/Knuth%27s_up-arrow_notation" rel="nofollow noreferrer">Knuth up-arrow notation</a>.</p>&#xA;&#xA;<p>Required: Use more than one up-arrow for time complexity.</p>&#xA;&#xA;<p...
algorithms time complexity
1
Are there any algorithms that run in (2 ↑ ↑ n)? -- (algorithms time complexity) <p>I’m wondering whether there are any algorithms that use so much time that they must be represented using <a href="https://en.wikipedia.org/wiki/Knuth%27s_up-arrow_notation" rel="nofollow noreferrer">Knuth up-arrow notation</a>.</p>&#xA;&...
habedi/stack-exchange-dataset
94,188
Complexity of a graph parity-coloring problem
<p>Suppose I have a positively weighted (bounded-degree) graph $G$ where each vertex in $G$ is colored either black or white. I'm curious about the complexity of the following problem:</p>&#xA;&#xA;<p>Find a subset $S$ of edges of G of maximal weight, subject to the constraint that any node colored black is incident t...
algorithms graphs time complexity colorings
1
Complexity of a graph parity-coloring problem -- (algorithms graphs time complexity colorings) <p>Suppose I have a positively weighted (bounded-degree) graph $G$ where each vertex in $G$ is colored either black or white. I'm curious about the complexity of the following problem:</p>&#xA;&#xA;<p>Find a subset $S$ of ed...
habedi/stack-exchange-dataset
94,189
Why does the copycat strategy work for two parallel chess games?
<p>I'm currently looking into computability logic.&#xA;Japaridze explain that a game !P v P like !Chess v Chess is always winnable thanks to the copycat strategy (<a href="http://www.csc.villanova.edu/~japaridz/CL/3.html#copycat" rel="noreferrer">http://www.csc.villanova.edu/~japaridz/CL/3.html#copycat</a>). However, w...
computability logic
1
Why does the copycat strategy work for two parallel chess games? -- (computability logic) <p>I'm currently looking into computability logic.&#xA;Japaridze explain that a game !P v P like !Chess v Chess is always winnable thanks to the copycat strategy (<a href="http://www.csc.villanova.edu/~japaridz/CL/3.html#copycat" ...
habedi/stack-exchange-dataset
94,196
How to transpile generic functions into language that do not support generics?
<p>Currently, I am developing a transpiler for my own language, however, I find difficulties to transpile generic functions. For example, how would you translate the following Java-like code in to C?</p>&#xA;&#xA;<pre><code>interface Comparable&lt;T&gt; {&#xA; boolean compare(T that);&#xA;}&#xA;&#xA;class Person imp...
programming languages compilers
1
How to transpile generic functions into language that do not support generics? -- (programming languages compilers) <p>Currently, I am developing a transpiler for my own language, however, I find difficulties to transpile generic functions. For example, how would you translate the following Java-like code in to C?</p>&...
habedi/stack-exchange-dataset
94,201
if P=NP, why is P a subset of NPC?
<p><a href="https://i.stack.imgur.com/MaAXV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MaAXV.jpg" alt="venn diagram of P and NP"></a></p>&#xA;&#xA;<p>Assuming P = NP, why should P be a subset of NPC?&#xA;Here is how I understand it:</p>&#xA;&#xA;<ol>&#xA;<li><p>P is a subset of NP</p></li>&#xA;<...
complexity theory automata np complete
1
if P=NP, why is P a subset of NPC? -- (complexity theory automata np complete) <p><a href="https://i.stack.imgur.com/MaAXV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MaAXV.jpg" alt="venn diagram of P and NP"></a></p>&#xA;&#xA;<p>Assuming P = NP, why should P be a subset of NPC?&#xA;Here is how I...
habedi/stack-exchange-dataset
94,206
Master Theorem on oscillating function
<p>Consider a recurrence of the form</p>&#xA;&#xA;<p>$T(n) = a T(n/b) + f(n)$</p>&#xA;&#xA;<p>Master theorem's regularity condition excludes some cases (for example, when $f(n)$ is oscillating).</p>&#xA;&#xA;<p>Suppose, however, that $f(n)$ is always less than or equal to a function $g(n)$ that does not violate the reg...
recurrence relation master theorem
1
Master Theorem on oscillating function -- (recurrence relation master theorem) <p>Consider a recurrence of the form</p>&#xA;&#xA;<p>$T(n) = a T(n/b) + f(n)$</p>&#xA;&#xA;<p>Master theorem's regularity condition excludes some cases (for example, when $f(n)$ is oscillating).</p>&#xA;&#xA;<p>Suppose, however, that $f(n)$ ...
habedi/stack-exchange-dataset