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
37,321
The number of operations of Explicit and Implicit Euler for 1D hear equation
<p>I'm studying with "Numerical Solution of Partial Differential Equations by K.W.Morton and D.F.Mayers". On page 25, it says "2(add) + 2(multiply) operations per mesh point for the explicit algorithm (2.19)", but it seems 3(add) + 2(multiply) to me, how did I get wrong?</p>&#xA;&#xA;<p>(2.19) $U_j^{n+1}=U_j^{n}+\mu(U...
complexity theory numerical algorithms
1
The number of operations of Explicit and Implicit Euler for 1D hear equation -- (complexity theory numerical algorithms) <p>I'm studying with "Numerical Solution of Partial Differential Equations by K.W.Morton and D.F.Mayers". On page 25, it says "2(add) + 2(multiply) operations per mesh point for the explicit algorith...
habedi/stack-exchange-dataset
37,332
Why is $\sum_{j=1}^{n-1}[\Pi_{k=1}^{j}[(n-k)]]=2^n$?
<p>In CLRS book, in the road cutting example there is a recursion formula </p>&#xA;&#xA;<p>$$&#xA; 1+\sum_{j=0}^{n-1}T(j) &#xA;$$&#xA;and it can be proved that the sum is &#xA;$$ &#xA; 2^n &#xA;$$</p>&#xA;&#xA;<p>by simple induction. In 3-rd edition it is a formula 15.3 on a page 364.</p>&#xA;&#xA;<p>As I can ...
recurrence relation
1
Why is $\sum_{j=1}^{n-1}[\Pi_{k=1}^{j}[(n-k)]]=2^n$? -- (recurrence relation) <p>In CLRS book, in the road cutting example there is a recursion formula </p>&#xA;&#xA;<p>$$&#xA; 1+\sum_{j=0}^{n-1}T(j) &#xA;$$&#xA;and it can be proved that the sum is &#xA;$$ &#xA; 2^n &#xA;$$</p>&#xA;&#xA;<p>by simple induction....
habedi/stack-exchange-dataset
37,333
Decrease space complexity, how will time complexity increase?
<p>I have a problem whose lower bound of problem complexity is proven to be $O(n+m)$ (n &lt; m) and I also come up with an algorithm whose time complexity is $ O(n+m)$, space complexity is $ O(n)$. (All on deterministic turning machine)</p>&#xA;&#xA;<p>If there exists an algorithm that uses O(1) space to solve the same...
complexity theory
1
Decrease space complexity, how will time complexity increase? -- (complexity theory) <p>I have a problem whose lower bound of problem complexity is proven to be $O(n+m)$ (n &lt; m) and I also come up with an algorithm whose time complexity is $ O(n+m)$, space complexity is $ O(n)$. (All on deterministic turning machine...
habedi/stack-exchange-dataset
37,336
How do I continue learning programming, beyond the basics?
<p>DISCLAIMER: I understand that I might not be posting in the right part of StackExchange, or this question might have been asked before (I haven't found it). If this offends anybody, I apologize.</p>&#xA;&#xA;<p>I'm 15 and a sophomore in High School. I have an interest in Computer Science in general. The thing is, I'...
learning theory
1
How do I continue learning programming, beyond the basics? -- (learning theory) <p>DISCLAIMER: I understand that I might not be posting in the right part of StackExchange, or this question might have been asked before (I haven't found it). If this offends anybody, I apologize.</p>&#xA;&#xA;<p>I'm 15 and a sophomore in ...
habedi/stack-exchange-dataset
37,349
Articulation vertex in complementary graph
<p>I need to implement an algoritm, but I can't understand the theory behind it.</p>&#xA;&#xA;<p>How can I prove that if v is an articulation vertex in a graph G , that it will not be an articulation vertex in G' complimentary graph ?</p>&#xA;&#xA;<p>I know that an articulation vertex , is one which when removed discon...
graphs
1
Articulation vertex in complementary graph -- (graphs) <p>I need to implement an algoritm, but I can't understand the theory behind it.</p>&#xA;&#xA;<p>How can I prove that if v is an articulation vertex in a graph G , that it will not be an articulation vertex in G' complimentary graph ?</p>&#xA;&#xA;<p>I know that an...
habedi/stack-exchange-dataset
37,354
How can I evaluate an algorithm for a NP-Hard problem?
<p>I have written a program to calculate the number of stable partition in a graph.&#xA; ( That is: find which partition of the nodes does not have edges between nodes of the same block. )</p>&#xA;&#xA;<p>The professor, asked me a way to evaluate the performance of my algorithm (not the program), but my algorithm is si...
graphs algorithm analysis performance
1
How can I evaluate an algorithm for a NP-Hard problem? -- (graphs algorithm analysis performance) <p>I have written a program to calculate the number of stable partition in a graph.&#xA; ( That is: find which partition of the nodes does not have edges between nodes of the same block. )</p>&#xA;&#xA;<p>The professor, as...
habedi/stack-exchange-dataset
37,357
A proof that P != NP
<p>I came up with the following. Am I doing something wrong?</p>&#xA;&#xA;<p>Suppose $P=NP$. Let $A$ be an NP hard problem. Let $A'$ be the polynomial reduction of $A$. By the assumtions, the Halting problem holts for $A$. Let $T'$ be the running time of $A'$. Clearly, $T' \in O(P(n))$, with $n$ as input size for $A'$ ...
algorithms halting problem
1
A proof that P != NP -- (algorithms halting problem) <p>I came up with the following. Am I doing something wrong?</p>&#xA;&#xA;<p>Suppose $P=NP$. Let $A$ be an NP hard problem. Let $A'$ be the polynomial reduction of $A$. By the assumtions, the Halting problem holts for $A$. Let $T'$ be the running time of $A'$. Clearl...
habedi/stack-exchange-dataset
37,363
Reducing a non-RE language to its complement
<p>Is there a language $L$ such that both $L$ and $L$'s complement are non turing recognizable languages, but there is a reduction between them?&#xA;I couldn't find one...</p>&#xA;
formal languages reductions undecidability
1
Reducing a non-RE language to its complement -- (formal languages reductions undecidability) <p>Is there a language $L$ such that both $L$ and $L$'s complement are non turing recognizable languages, but there is a reduction between them?&#xA;I couldn't find one...</p>&#xA;
habedi/stack-exchange-dataset
37,366
Is it Regular Language?
<p>According to Wikipedia, Regular Language is Recognized by Some DFAs, or expressed by Regular Expression .. and all finite Language are regular but, not all regular is finite ..</p>&#xA;&#xA;<p>that's mean it may be infinite language is regular ?</p>&#xA;&#xA;<p>my example is L = {a^n b^n+1, n >0 } is it regular ? &#...
regular languages formal grammars finite automata regular expressions
1
Is it Regular Language? -- (regular languages formal grammars finite automata regular expressions) <p>According to Wikipedia, Regular Language is Recognized by Some DFAs, or expressed by Regular Expression .. and all finite Language are regular but, not all regular is finite ..</p>&#xA;&#xA;<p>that's mean it may be inf...
habedi/stack-exchange-dataset
37,368
Reduction from a further constrained problem
<p>If I find an NP Hard problem that is equivalent to my problem with an additional constraint or bound, can I still prove that my problem is NP Hard?</p>&#xA;&#xA;<p>Generally, this is probably not the case. For example, the NP Hard TSP is just a further constrained version of the shortest path problem.</p>&#xA;&#xA;<...
graphs reductions np hard set cover
1
Reduction from a further constrained problem -- (graphs reductions np hard set cover) <p>If I find an NP Hard problem that is equivalent to my problem with an additional constraint or bound, can I still prove that my problem is NP Hard?</p>&#xA;&#xA;<p>Generally, this is probably not the case. For example, the NP Hard ...
habedi/stack-exchange-dataset
37,375
Understanding Multilevel Caches
<p>I'm reading multi-level cache and came across a question through which i got confused. I've read that</p>&#xA;&#xA;<blockquote>&#xA; <ul>&#xA; <li>Between processor and Cache Word/ Byte is transfered</li>&#xA; <li>Between Cache and Main memory Block(Block of words) is transfered.</li>&#xA; <li>If there is a mis...
computer architecture cpu cache
1
Understanding Multilevel Caches -- (computer architecture cpu cache) <p>I'm reading multi-level cache and came across a question through which i got confused. I've read that</p>&#xA;&#xA;<blockquote>&#xA; <ul>&#xA; <li>Between processor and Cache Word/ Byte is transfered</li>&#xA; <li>Between Cache and Main memory ...
habedi/stack-exchange-dataset
37,380
Who coined the term "artificial intelligence"?
<p>The most obvious (and commonly given) answer to this question is John McCarthy, but I have traced the first usage of this term to a <a href="http://web.cs.swarthmore.edu/~meeden/cs63/f11/AIproposal.pdf" rel="nofollow">1955 paper</a>, which McCarthy co-authored with Marvin Minsky, Nathaniel Rochester, and Claude Shan...
terminology reference request artificial intelligence history
1
Who coined the term "artificial intelligence"? -- (terminology reference request artificial intelligence history) <p>The most obvious (and commonly given) answer to this question is John McCarthy, but I have traced the first usage of this term to a <a href="http://web.cs.swarthmore.edu/~meeden/cs63/f11/AIproposal.pdf" ...
habedi/stack-exchange-dataset
37,384
Lambda Calculus Notation
<p>I'm reading through the paper <code>Transactors: A Programming Model for Maintaining&#xA;Globally Consistent Distributed State in Unreliable&#xA;Environments</code> by John Field and Carlos Varela.</p>&#xA;&#xA;<p>I have basic knowledge about the lambda calculus (typed lambda calculus to be more precise) thanks to a...
lambda calculus
1
Lambda Calculus Notation -- (lambda calculus) <p>I'm reading through the paper <code>Transactors: A Programming Model for Maintaining&#xA;Globally Consistent Distributed State in Unreliable&#xA;Environments</code> by John Field and Carlos Varela.</p>&#xA;&#xA;<p>I have basic knowledge about the lambda calculus (typed l...
habedi/stack-exchange-dataset
37,387
Algorithm to find shortest path between two nodes
<p>I want an algorithm similar to Dijkstra or Bellman-Ford for finding the shortest path between two nodes in a directed graph, but with an additional constraint. </p>&#xA;&#xA;<p>The additional constraint is that there are $N$ sets of special edges with weight $0$ such that a path is not considered valid if it travers...
algorithms graphs shortest path
1
Algorithm to find shortest path between two nodes -- (algorithms graphs shortest path) <p>I want an algorithm similar to Dijkstra or Bellman-Ford for finding the shortest path between two nodes in a directed graph, but with an additional constraint. </p>&#xA;&#xA;<p>The additional constraint is that there are $N$ sets ...
habedi/stack-exchange-dataset
37,388
What happens to multi-qubit quantum state after one of qubits is measured?
<p>If we have a quantum state consisting of (let's say) 3 entangled qubits and we read the value of one of them, what happens to the probabilities of the remaining possible states?</p>&#xA;&#xA;<p>For example, if we have three entangled qubits and have an amplitude for every state from $|000\rangle$ to $|111\rangle$ an...
quantum computing
1
What happens to multi-qubit quantum state after one of qubits is measured? -- (quantum computing) <p>If we have a quantum state consisting of (let's say) 3 entangled qubits and we read the value of one of them, what happens to the probabilities of the remaining possible states?</p>&#xA;&#xA;<p>For example, if we have t...
habedi/stack-exchange-dataset
37,389
Efficient algorithm to fulfil a set of coordinate constraints
<p>I have a set of labelled points and a set of distance constraints between pairs of points, consisting of a lower and upper distance bound. There is definitely an arrangement of the points in 3D space that fulfils all distance constraints.</p>&#xA;&#xA;<p>I wish to generate arrangements of the points where all constr...
constraint programming euclidean distance
1
Efficient algorithm to fulfil a set of coordinate constraints -- (constraint programming euclidean distance) <p>I have a set of labelled points and a set of distance constraints between pairs of points, consisting of a lower and upper distance bound. There is definitely an arrangement of the points in 3D space that ful...
habedi/stack-exchange-dataset
37,411
Getting minimum DFA for regular expression (11)*+(111)*
<p>(sorry beforehand I know putting scanned diagrams may seem not-so-professional but this problem is sticking for long and its interesting too)</p>&#xA;&#xA;<p>The language corresponding to given regex seems to accepts all strings of 1's with length in multiple of 2 or 3 (i.e.4,6,8,9,10,12,...)</p>&#xA;&#xA;<p>I prepa...
automata finite automata
1
Getting minimum DFA for regular expression (11)*+(111)* -- (automata finite automata) <p>(sorry beforehand I know putting scanned diagrams may seem not-so-professional but this problem is sticking for long and its interesting too)</p>&#xA;&#xA;<p>The language corresponding to given regex seems to accepts all strings of...
habedi/stack-exchange-dataset
37,419
Fastest possible way to check what of X is in a string
<p>I am trying to speed up one of my application, one of the places where I can speed up is in my test if a string contains an array of strings.</p>&#xA;&#xA;<p>example: I have the matches "dog", "cat" "apple" and the string "The dog chases the cat".</p>&#xA;&#xA;<p>In this example would I like an algorithm that return...
algorithms search algorithms strings
1
Fastest possible way to check what of X is in a string -- (algorithms search algorithms strings) <p>I am trying to speed up one of my application, one of the places where I can speed up is in my test if a string contains an array of strings.</p>&#xA;&#xA;<p>example: I have the matches "dog", "cat" "apple" and the strin...
habedi/stack-exchange-dataset
37,420
Travelling with the most efficient path
<p>A friend of mine actually asked me a very interesting computer science related question, and I have been stuck on it for a long time.</p>&#xA;&#xA;<p>The problem is: you have to travel $1000$ km. The only gas station is at the starting point. Your maximum fuel tank capacity is just enough for $50$ km traveling, you ...
algorithms complexity theory efficiency applied theory
1
Travelling with the most efficient path -- (algorithms complexity theory efficiency applied theory) <p>A friend of mine actually asked me a very interesting computer science related question, and I have been stuck on it for a long time.</p>&#xA;&#xA;<p>The problem is: you have to travel $1000$ km. The only gas station ...
habedi/stack-exchange-dataset
37,450
Three languages and how to decide if they are regular
<p>From following languages which one is regular and why others are not?And what is the regular expression for regular one.</p>&#xA;&#xA;<p>$L_1= \{wxwy | x,y,w \in (a+b)^+\}$</p>&#xA;&#xA;<p>$L_2 = \{xwyw | x,y,w \in (a+b)^+\}$</p>&#xA;&#xA;<p>$L_3 = \{wxyw | x,y,w \in (a+b)^+\}$</p>&#xA;&#xA;<p>Also where can I find...
formal languages regular languages
1
Three languages and how to decide if they are regular -- (formal languages regular languages) <p>From following languages which one is regular and why others are not?And what is the regular expression for regular one.</p>&#xA;&#xA;<p>$L_1= \{wxwy | x,y,w \in (a+b)^+\}$</p>&#xA;&#xA;<p>$L_2 = \{xwyw | x,y,w \in (a+b)^+...
habedi/stack-exchange-dataset
37,453
If $f$ and $g$ are increasing functions, are we guaranteed that $f=O(g)$ or $g=O(f)$?
<p>Given two <strong>increasing</strong> functions $f$ and $g$ with values in the <strong>natural numbers</strong>, is it always the case that either $f\in O(g)$ or $g\in O(f)$.</p>&#xA;&#xA;<p>If the statement is true, then can anyone provide a counterexample for when any of the two conditions in bold are relaxed.</p>...
asymptotics proof techniques check my answer
1
If $f$ and $g$ are increasing functions, are we guaranteed that $f=O(g)$ or $g=O(f)$? -- (asymptotics proof techniques check my answer) <p>Given two <strong>increasing</strong> functions $f$ and $g$ with values in the <strong>natural numbers</strong>, is it always the case that either $f\in O(g)$ or $g\in O(f)$.</p>&#x...
habedi/stack-exchange-dataset
37,454
Particle Swarm Optimization Algorithm
<p>I am studying about Particle Swarm Optimization (PSO) and I was wondering what the user-defined constants in the update equations are for. </p>&#xA;&#xA;<p>First update equations: &#xA;$v(t) = w*v(t) + c_1*rand*(x_{best} - x) + c_2*rand*(g_{best} - x)$</p>&#xA;&#xA;<p>$w$ is known as the weight/inertial constant. Us...
algorithms
1
Particle Swarm Optimization Algorithm -- (algorithms) <p>I am studying about Particle Swarm Optimization (PSO) and I was wondering what the user-defined constants in the update equations are for. </p>&#xA;&#xA;<p>First update equations: &#xA;$v(t) = w*v(t) + c_1*rand*(x_{best} - x) + c_2*rand*(g_{best} - x)$</p>&#xA;&#...
habedi/stack-exchange-dataset
37,459
ILP and number of variables in constraints
<p>This question is about the time impact of the length (i.e. number of variables) of the constraints in an Integer Linear Programming formulation.&#xA;Most people try to reach the minimum number of constraints/variables, but I couldn't find anything that considers the size of the constraints.</p>&#xA;&#xA;<p>In more c...
linear programming integer programming
1
ILP and number of variables in constraints -- (linear programming integer programming) <p>This question is about the time impact of the length (i.e. number of variables) of the constraints in an Integer Linear Programming formulation.&#xA;Most people try to reach the minimum number of constraints/variables, but I could...
habedi/stack-exchange-dataset
37,460
Is Starvation Possible in LOOK Algorithm
<p><a href="https://en.wikipedia.org/wiki/LOOK_algorithm#Description" rel="nofollow">The LOOK algorithm (wiki)</a> is the same as the SCAN algorithm in that it also honors requests on both sweep direction of the disk head, however, this algorithm "Looks" ahead to see if there are any requests pending in the direction o...
operating systems scheduling
1
Is Starvation Possible in LOOK Algorithm -- (operating systems scheduling) <p><a href="https://en.wikipedia.org/wiki/LOOK_algorithm#Description" rel="nofollow">The LOOK algorithm (wiki)</a> is the same as the SCAN algorithm in that it also honors requests on both sweep direction of the disk head, however, this algorith...
habedi/stack-exchange-dataset
37,462
Why is the object destructor paradigm in garbage collected languages pervasively absent?
<p>Looking for insight into decisions around garbage collected language design. Perhaps a language expert could enlighten me? I come from a C++ background, so this area is baffling to me.</p>&#xA;&#xA;<p>It seems nearly all modern garbage collected languages with OOPy object support like Ruby, Javascript/ES6/ES7, Actio...
programming languages memory management garbage collection language design
1
Why is the object destructor paradigm in garbage collected languages pervasively absent? -- (programming languages memory management garbage collection language design) <p>Looking for insight into decisions around garbage collected language design. Perhaps a language expert could enlighten me? I come from a C++ backgro...
habedi/stack-exchange-dataset
37,470
How does an NFA use epsilon transitions?
<p>In the picture below, I'm trying to figure out what exactly this NFA is accepting. </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/XHuWu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XHuWu.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>What's confusing me is the $\epsilon$ jump at $q_0$...
automata finite automata nondeterminism
1
How does an NFA use epsilon transitions? -- (automata finite automata nondeterminism) <p>In the picture below, I'm trying to figure out what exactly this NFA is accepting. </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/XHuWu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XHuWu.png" alt="enter image desc...
habedi/stack-exchange-dataset
37,495
Can this question be solved without knowing the Page Table Entry?
<p>I'm preparing for the exams and this question came up -<br></p>&#xA;&#xA;<blockquote>&#xA; <p>Consider a machine with $64MB$ physical memory and a $32$-bit virtual address space. If the page size is $4KB$, what is the approximate size of the page table?<br>&#xA; (A) 16MB<br>&#xA; (B) 8MB<br>&#xA; (C) 2MB<br>&#xA...
operating systems memory management paging
1
Can this question be solved without knowing the Page Table Entry? -- (operating systems memory management paging) <p>I'm preparing for the exams and this question came up -<br></p>&#xA;&#xA;<blockquote>&#xA; <p>Consider a machine with $64MB$ physical memory and a $32$-bit virtual address space. If the page size is $4K...
habedi/stack-exchange-dataset
37,496
NP-Complete Proof of k sized common set
<p><strong>Input:</strong> A set $U= \{w_1, w_2, \ldots, w_n\}$, subsets $S_1, S_2, \ldots, S_m$ of $U$ and integer $k$.<br>&#xA;<strong>Question:</strong> Is there a subset with $k$ elements of $U$ which intersects of every $S_i$?</p>&#xA;&#xA;<p>Which reduction should i use to prove that this is np-complete ?</p>&#xA...
np complete proof techniques
1
NP-Complete Proof of k sized common set -- (np complete proof techniques) <p><strong>Input:</strong> A set $U= \{w_1, w_2, \ldots, w_n\}$, subsets $S_1, S_2, \ldots, S_m$ of $U$ and integer $k$.<br>&#xA;<strong>Question:</strong> Is there a subset with $k$ elements of $U$ which intersects of every $S_i$?</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
37,498
CTL vs LTL - when a formula satisfy a model
<p>I'm trying to understand the difference between LTL and CTL. In particular, i'm trying to understand when a model (a transition system eg. Kripke structure) satisfy a formula.&#xA;This is my point of view:</p>&#xA;&#xA;<ul>&#xA;<li>a model satisfy an LTL formula if an only if all its path starting&#xA;from its initi...
logic linear temporal logic temporal logic computation tree logic
1
CTL vs LTL - when a formula satisfy a model -- (logic linear temporal logic temporal logic computation tree logic) <p>I'm trying to understand the difference between LTL and CTL. In particular, i'm trying to understand when a model (a transition system eg. Kripke structure) satisfy a formula.&#xA;This is my point of vi...
habedi/stack-exchange-dataset
37,501
Multi-qubit gates matrix representation
<p>Consider the gate used in Simon's Algorithm. It operates on a control register and target register, changing state like: $|\textbf{x}\rangle|\textbf{y}\rangle-&gt;|\textbf{x}\rangle|\textbf{y}\oplus f(x)\rangle$.</p>&#xA;&#xA;<p>As I am working on an universal way to simulate operations on qubits, I've been using a ...
quantum computing
1
Multi-qubit gates matrix representation -- (quantum computing) <p>Consider the gate used in Simon's Algorithm. It operates on a control register and target register, changing state like: $|\textbf{x}\rangle|\textbf{y}\rangle-&gt;|\textbf{x}\rangle|\textbf{y}\oplus f(x)\rangle$.</p>&#xA;&#xA;<p>As I am working on an uni...
habedi/stack-exchange-dataset
37,502
What's the meaning of the name P/poly?
<p>I understand the normal definitions of the P/poly class, but I'm curious how the name came about.</p>&#xA;&#xA;<p>The syntax of the name looks like a quotient group, but I can't think of any way to define P/poly that would use a quotient. Is 'A/B' defined to be something like "the class of problems that would be sol...
terminology complexity classes
1
What's the meaning of the name P/poly? -- (terminology complexity classes) <p>I understand the normal definitions of the P/poly class, but I'm curious how the name came about.</p>&#xA;&#xA;<p>The syntax of the name looks like a quotient group, but I can't think of any way to define P/poly that would use a quotient. Is ...
habedi/stack-exchange-dataset
37,510
Filling a matrix with the sum of conditional values
<p>I have $P$ vectors of size $N$ with elements in $\{0,1\}$. Each vector $v$ has a value $\alpha_v$.</p>&#xA;&#xA;<p>I would like to Fill a square matrix $M$ of size $N\times N$ in the following way:</p>&#xA;&#xA;<p>$$\forall i,j \in \{1,2,...,N\}~ M_{i,j} = \sum_{\text{vectors}~v : v_i v_j =1} \alpha_v$$ </p>&#xA;&#...
algorithms combinatorics
1
Filling a matrix with the sum of conditional values -- (algorithms combinatorics) <p>I have $P$ vectors of size $N$ with elements in $\{0,1\}$. Each vector $v$ has a value $\alpha_v$.</p>&#xA;&#xA;<p>I would like to Fill a square matrix $M$ of size $N\times N$ in the following way:</p>&#xA;&#xA;<p>$$\forall i,j \in \{1...
habedi/stack-exchange-dataset
37,512
IS and matching
<p>I have 2 different but similar problems, one belongs to NP and one to L and I don't understand why.</p>&#xA;&#xA;<p>First problem: Input: an undirected graph G with n^2 vertices. Question: Is there exist in G a matching of size n AND an independent set of size n?</p>&#xA;&#xA;<p>Second problem: Input: an undirected ...
complexity theory time complexity space complexity np
1
IS and matching -- (complexity theory time complexity space complexity np) <p>I have 2 different but similar problems, one belongs to NP and one to L and I don't understand why.</p>&#xA;&#xA;<p>First problem: Input: an undirected graph G with n^2 vertices. Question: Is there exist in G a matching of size n AND an indep...
habedi/stack-exchange-dataset
37,527
Reduce Clique to Vertex Cover
<p>I read on the internet that it's possible to reduce <em>clique</em> to <em>vertex cover</em>. Almost everyone use this theorem: </p>&#xA;&#xA;<blockquote>&#xA; <p>if a graph $G$ has a clique of size $k$ then the complement of $G$ has a vertex cover of size $n-k$, where $n$ is the number of vertices.</p>&#xA;</block...
np complete reductions
1
Reduce Clique to Vertex Cover -- (np complete reductions) <p>I read on the internet that it's possible to reduce <em>clique</em> to <em>vertex cover</em>. Almost everyone use this theorem: </p>&#xA;&#xA;<blockquote>&#xA; <p>if a graph $G$ has a clique of size $k$ then the complement of $G$ has a vertex cover of size $...
habedi/stack-exchange-dataset
37,529
Computing modular exponent given order
<p>I want to compute $g^{mn}$ mod $n^2$ where $n=pq$ and I know that $g$ has order $kn$ mod $n^2$ where $m&lt;k$. Is there any clever way of doing it utilizing the order? I have tried other methods of computing $g^{mn}$ directly.</p>&#xA;&#xA;<p>My question stems from an implementation of the Paillier cryptosystem that...
algorithms cryptography modular arithmetic
1
Computing modular exponent given order -- (algorithms cryptography modular arithmetic) <p>I want to compute $g^{mn}$ mod $n^2$ where $n=pq$ and I know that $g$ has order $kn$ mod $n^2$ where $m&lt;k$. Is there any clever way of doing it utilizing the order? I have tried other methods of computing $g^{mn}$ directly.</p>...
habedi/stack-exchange-dataset
37,545
Understanding Regular Grammers
<p>I know a regular language is the one which can be expressed as a regular expression or we can create a DFA corresponding to it. Unless a language has a pattern in which one part has to match with other like in $$a^nb^n|n\geq 0 (CFG)$$ It'll be regular. Like AP Series of symbols can be easily expressed as Regular exp...
regular languages regular expressions
1
Understanding Regular Grammers -- (regular languages regular expressions) <p>I know a regular language is the one which can be expressed as a regular expression or we can create a DFA corresponding to it. Unless a language has a pattern in which one part has to match with other like in $$a^nb^n|n\geq 0 (CFG)$$ It'll be...
habedi/stack-exchange-dataset
37,550
Fastest known complexity for combinatorial ILP algorithm?
<p>I'm wondering, what is the best known algorithm, in terms of Big-$O$ notation, to solve Integer Linear Programming?</p>&#xA;&#xA;<p>I know that the problem is $NP$-complete, so I'm not expecting anything polynomial. And I know there are lots of heuristics and such that are used in practical applications like CPLEX, ...
algorithms complexity theory reference request np complete integer programming
1
Fastest known complexity for combinatorial ILP algorithm? -- (algorithms complexity theory reference request np complete integer programming) <p>I'm wondering, what is the best known algorithm, in terms of Big-$O$ notation, to solve Integer Linear Programming?</p>&#xA;&#xA;<p>I know that the problem is $NP$-complete, s...
habedi/stack-exchange-dataset
37,556
Contradiction between best-case running time of insertion sort and $n\log n$ lower bound?
<p>If the best case for Insertion sort &amp; bubble sort is $O(n)$ then how is lower bound for any comparison sort is $\Omega(n\log n)$? I mean, $O(n)$ is obviously smaller than $\Omega(nlogn)$. What am I missing here?</p>&#xA;
time complexity
1
Contradiction between best-case running time of insertion sort and $n\log n$ lower bound? -- (time complexity) <p>If the best case for Insertion sort &amp; bubble sort is $O(n)$ then how is lower bound for any comparison sort is $\Omega(n\log n)$? I mean, $O(n)$ is obviously smaller than $\Omega(nlogn)$. What am I miss...
habedi/stack-exchange-dataset
37,557
Big Omega Counterexample?
<p>I am doing homework to practice for my midterm exam and cannot answer this question. I need to decide whether or not this statement is true of false and either give a proof or counter example. </p>&#xA;&#xA;<p>For this particular question, I am leaning more towards saying it is false as the question does not really ...
asymptotics landau notation
1
Big Omega Counterexample? -- (asymptotics landau notation) <p>I am doing homework to practice for my midterm exam and cannot answer this question. I need to decide whether or not this statement is true of false and either give a proof or counter example. </p>&#xA;&#xA;<p>For this particular question, I am leaning more ...
habedi/stack-exchange-dataset
37,558
Does immutability in functional programming really exist?
<p>Although I work as a programmer in my daily life and use all the trendy languages (Python, Java, C, etc) I still have no clear view of what functional programming is. From what I've read, one property of functionally languages is that <strong>data structures are immutable</strong>. For me this alone raises a lot of ...
data structures functional programming
1
Does immutability in functional programming really exist? -- (data structures functional programming) <p>Although I work as a programmer in my daily life and use all the trendy languages (Python, Java, C, etc) I still have no clear view of what functional programming is. From what I've read, one property of functionall...
habedi/stack-exchange-dataset
37,561
Merge Sort proof
<p>I am trying to prove that merge sort is indeed $O(n \log n)$.</p>&#xA;&#xA;<p>I was able to extract a pattern using constants, however now I am stuck. This is as far as I can get:</p>&#xA;&#xA;<ol>&#xA;<li><p>$T(n) = 2T(n/2) + cn$</p></li>&#xA;<li><p>$T(n/2) = 2T(n/4) + c(n/2)$</p></li>&#xA;</ol>&#xA;&#xA;<p>Now plu...
asymptotics recurrence relation
1
Merge Sort proof -- (asymptotics recurrence relation) <p>I am trying to prove that merge sort is indeed $O(n \log n)$.</p>&#xA;&#xA;<p>I was able to extract a pattern using constants, however now I am stuck. This is as far as I can get:</p>&#xA;&#xA;<ol>&#xA;<li><p>$T(n) = 2T(n/2) + cn$</p></li>&#xA;<li><p>$T(n/2) = 2T...
habedi/stack-exchange-dataset
37,563
How does this proof show that sequences of $O(1)$ polynomially bounded Kolmogorov complexity are NOT the polynomial computable ones?
<p>I'm trying to understand a proof from the paper: Balcázar, José L.; Gavaldà, Ricard; Hermo, Montserrat: <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.53.5315" rel="nofollow noreferrer">Compressiblity of infinite binary sequences</a>, Published in: <em>Complexity, Logic, and Recursion Theory</em>, ...
polynomial time kolmogorov complexity
1
How does this proof show that sequences of $O(1)$ polynomially bounded Kolmogorov complexity are NOT the polynomial computable ones? -- (polynomial time kolmogorov complexity) <p>I'm trying to understand a proof from the paper: Balcázar, José L.; Gavaldà, Ricard; Hermo, Montserrat: <a href="http://citeseerx.ist.psu.edu...
habedi/stack-exchange-dataset
37,571
Efficient algorithm to compute the $n$th Fibonacci number
<p>The $n$th Fibonacci number can be computed in linear time using the following recurrence:</p>&#xA;&#xA;<pre><code>def fib(n):&#xA; i, j = 1, 1&#xA; for k in {1...n-1}:&#xA; i, j = j, i+j&#xA; return i&#xA;</code></pre>&#xA;&#xA;<p>The $n$th Fibonacci number can also be computed as $\left[\varphi^n / ...
algorithms time complexity recurrence relation
1
Efficient algorithm to compute the $n$th Fibonacci number -- (algorithms time complexity recurrence relation) <p>The $n$th Fibonacci number can be computed in linear time using the following recurrence:</p>&#xA;&#xA;<pre><code>def fib(n):&#xA; i, j = 1, 1&#xA; for k in {1...n-1}:&#xA; i, j = j, i+j&#xA; ...
habedi/stack-exchange-dataset
37,579
Mutations as a crossover by product
<p>Let's say I'm writing a GA to find an optimal path to travel from point $A$ to point $B$. Genotypes are a list of directions (north, south, east, west) to follow. </p>&#xA;&#xA;<p>So a genotype "NENWEE" will move north once, east once, then north again, west once, and finally east twice.</p>&#xA;&#xA;<p>The directio...
genetic algorithms
1
Mutations as a crossover by product -- (genetic algorithms) <p>Let's say I'm writing a GA to find an optimal path to travel from point $A$ to point $B$. Genotypes are a list of directions (north, south, east, west) to follow. </p>&#xA;&#xA;<p>So a genotype "NENWEE" will move north once, east once, then north again, wes...
habedi/stack-exchange-dataset
37,584
Which class of languages is accepted by PDA when we restrict the stack to logarithmic size?
<p>Let $\mathrm{LOG}_{\mathrm{CF}}$ be the class of all languages recognized by a Pushdown-automaton that uses $\leq \log n$ cells of its stack for each input of length $n$.</p>&#xA;&#xA;<p>Obviously, this class is a proper subset of the class of context-free languages. Which languages are in this class, and what (clos...
complexity theory automata pushdown automata space complexity
1
Which class of languages is accepted by PDA when we restrict the stack to logarithmic size? -- (complexity theory automata pushdown automata space complexity) <p>Let $\mathrm{LOG}_{\mathrm{CF}}$ be the class of all languages recognized by a Pushdown-automaton that uses $\leq \log n$ cells of its stack for each input of...
habedi/stack-exchange-dataset
37,591
What is meant by the notation $L(...)$?
<p>I am currently studying about formal languages and automata.&#xA;I am trying to solve a problem but there is a notation whose meaning I'm not sure of.</p>&#xA;&#xA;<p>I have a question to find out the relationship between two languages $L_1$ and $L_2$:</p>&#xA;&#xA;<p>$L_1:$</p>&#xA;&#xA;<p>$S \to aSa|bS|e$</p>&#xA;...
formal languages regular languages notation
1
What is meant by the notation $L(...)$? -- (formal languages regular languages notation) <p>I am currently studying about formal languages and automata.&#xA;I am trying to solve a problem but there is a notation whose meaning I'm not sure of.</p>&#xA;&#xA;<p>I have a question to find out the relationship between two la...
habedi/stack-exchange-dataset
37,594
Birkhoff-von Neumann theorem for bistochastic digraphs
<p>A weighted digraph (with loops) is <em>bistochastic</em>, iff</p>&#xA;&#xA;<ol>&#xA;<li>the weights are non-negative,</li>&#xA;<li>for all non-sink nodes, the sum of the edge weights of the out-edges is $1$, and</li>&#xA;<li>for all non-source nodes, the sum of the edge weights of the in-edges is $1$.</li>&#xA;</ol>...
graphs proof techniques
1
Birkhoff-von Neumann theorem for bistochastic digraphs -- (graphs proof techniques) <p>A weighted digraph (with loops) is <em>bistochastic</em>, iff</p>&#xA;&#xA;<ol>&#xA;<li>the weights are non-negative,</li>&#xA;<li>for all non-sink nodes, the sum of the edge weights of the out-edges is $1$, and</li>&#xA;<li>for all ...
habedi/stack-exchange-dataset
37,595
Why is the complexity of this nested for loop not $O(n^2)$?
<p>I have the following pseudo-code:</p>&#xA;&#xA;<pre><code>mystery(n):&#xA;if n &lt;= 50 :&#xA; for i = 1 ... n :&#xA; for j = 1 ... n :&#xA; print i*j&#xA;else :&#xA; mystery(n-1)&#xA;</code></pre>&#xA;&#xA;<p>For the following nested for loop:</p>&#xA;&#xA;<pre><code>for i = 1 ... n :&#xA; ...
algorithm analysis time complexity asymptotics
1
Why is the complexity of this nested for loop not $O(n^2)$? -- (algorithm analysis time complexity asymptotics) <p>I have the following pseudo-code:</p>&#xA;&#xA;<pre><code>mystery(n):&#xA;if n &lt;= 50 :&#xA; for i = 1 ... n :&#xA; for j = 1 ... n :&#xA; print i*j&#xA;else :&#xA; mystery(n-1)&#...
habedi/stack-exchange-dataset
37,596
Arbitrary precision integer square root algorithm?
<p>Are there any known subquadratic algorithms for calculating the floor of the square root of an <code>n</code> bit integer?</p>&#xA;&#xA;<p>The naive algorithm would be something like</p>&#xA;&#xA;<pre><code>def sqrt(x):&#xA; r = 0&#xA; i = x.bit_length() // 2&#xA; while i &gt;= 0:&#xA; inc = (r &lt;&...
algorithms numerical algorithms
1
Arbitrary precision integer square root algorithm? -- (algorithms numerical algorithms) <p>Are there any known subquadratic algorithms for calculating the floor of the square root of an <code>n</code> bit integer?</p>&#xA;&#xA;<p>The naive algorithm would be something like</p>&#xA;&#xA;<pre><code>def sqrt(x):&#xA; r...
habedi/stack-exchange-dataset
37,603
Reweight general weighted graph to distinct graph for using Borůvka's
<p>Is it possible to re-weight a generally-weighted graph to a distinctly-weighted graph to apply <a href="https://en.wikipedia.org/wiki/Bor%C5%AFvka&#39;s_algorithm" rel="nofollow">Borůvka's algorithm (wiki)</a> for minimum spanning tree to it?</p>&#xA;&#xA;<p>I can't seem to think of a way to make a distinction betwe...
graphs weighted graphs
1
Reweight general weighted graph to distinct graph for using Borůvka's -- (graphs weighted graphs) <p>Is it possible to re-weight a generally-weighted graph to a distinctly-weighted graph to apply <a href="https://en.wikipedia.org/wiki/Bor%C5%AFvka&#39;s_algorithm" rel="nofollow">Borůvka's algorithm (wiki)</a> for minim...
habedi/stack-exchange-dataset
37,606
What is the exact meaning of a Predicate, decidability and computability?
<p>In the <code>Computability, Complexity and Languages</code> book written by Davis in page 5 he defines a predicate as:</p>&#xA;&#xA;<blockquote>&#xA; <p>By a predicate or a Boolean-valued function on a set $S$ we mean a <em>total function</em> $P$ on $S$ such that for each $a \in S$, either $P(a) = True$ or $P(a)=F...
computability undecidability halting problem
1
What is the exact meaning of a Predicate, decidability and computability? -- (computability undecidability halting problem) <p>In the <code>Computability, Complexity and Languages</code> book written by Davis in page 5 he defines a predicate as:</p>&#xA;&#xA;<blockquote>&#xA; <p>By a predicate or a Boolean-valued func...
habedi/stack-exchange-dataset
37,607
Complexity of BST
<p>I have the following pseudo-code for printing all nodes of a BST :</p>&#xA;&#xA;<pre><code>traverse(x):&#xA; if x == nil:&#xA; return&#xA; else:&#xA; print x&#xA; traverse(x.left)&#xA; traverse(x.right)&#xA;</code></pre>&#xA;&#xA;<p>I want to find its complexity. I have an idea, but...
time complexity asymptotics search algorithms search trees
1
Complexity of BST -- (time complexity asymptotics search algorithms search trees) <p>I have the following pseudo-code for printing all nodes of a BST :</p>&#xA;&#xA;<pre><code>traverse(x):&#xA; if x == nil:&#xA; return&#xA; else:&#xA; print x&#xA; traverse(x.left)&#xA; traverse(x.right...
habedi/stack-exchange-dataset
37,611
Why is $f(n) = \Theta(g(n))$ where $f(n) = n(n+1)/2$ and $g(n) = \sum_{i=1}^n (n/i)^2$?
<p>Why is $f(n) = \Theta(g(n))$ where $f(n) = n(n+1)/2$ and $g(n) = \sum_{i=1}^n (n/i)^2$?</p>&#xA;&#xA;<p>Also, why is $f(n) = \Theta(g(n))$ where $f(n) = n^{\log_49}$ and $g(n) = 3^{\log_2 n}$?</p>&#xA;&#xA;<p>I know what notations mean - I just want to prove them.</p>&#xA;
asymptotics
1
Why is $f(n) = \Theta(g(n))$ where $f(n) = n(n+1)/2$ and $g(n) = \sum_{i=1}^n (n/i)^2$? -- (asymptotics) <p>Why is $f(n) = \Theta(g(n))$ where $f(n) = n(n+1)/2$ and $g(n) = \sum_{i=1}^n (n/i)^2$?</p>&#xA;&#xA;<p>Also, why is $f(n) = \Theta(g(n))$ where $f(n) = n^{\log_49}$ and $g(n) = 3^{\log_2 n}$?</p>&#xA;&#xA;<p>I k...
habedi/stack-exchange-dataset
37,614
2-SAT or 3-SAT or k-SAT in AC-0
<p>This may be an elementary question, but I'm new to circuit complexity. Does 2-SAT in CNF form belong to the complexity class AC$^0$?</p>&#xA;&#xA;<p>It seems simple enough to construct an AC$^0$ circuit of depth 2 of polynomial size for 2-SAT. $~$Given $n$ variables (which means $2n$ literals), there can be at most...
circuits
1
2-SAT or 3-SAT or k-SAT in AC-0 -- (circuits) <p>This may be an elementary question, but I'm new to circuit complexity. Does 2-SAT in CNF form belong to the complexity class AC$^0$?</p>&#xA;&#xA;<p>It seems simple enough to construct an AC$^0$ circuit of depth 2 of polynomial size for 2-SAT. $~$Given $n$ variables (wh...
habedi/stack-exchange-dataset
37,621
Sorted-greedy for Load Balancing Problem
<p>In load balancing problem we have $m$ machines and $n$ jobs, each taking processing time $t_j$. Total processing time on the machine $i$ is $T_i =\sum_{j\in A(i)}{t_j}$, where $A(i)$ is the set of jobs assigned to machine $i$. Goal is to provide an assignment of jobs, such that $\max T_i$ is minimized.</p>&#xA;&#xA;...
approximation greedy algorithms
1
Sorted-greedy for Load Balancing Problem -- (approximation greedy algorithms) <p>In load balancing problem we have $m$ machines and $n$ jobs, each taking processing time $t_j$. Total processing time on the machine $i$ is $T_i =\sum_{j\in A(i)}{t_j}$, where $A(i)$ is the set of jobs assigned to machine $i$. Goal is to p...
habedi/stack-exchange-dataset
37,622
Turing Machine notation
<p>I'm a bit confused on some of the notation being used for turing machines in one of our exercises in class.</p>&#xA;&#xA;<p>The question gives us a string $\alpha \in \{0,1\}$* and the function $\mathsf{int}(\alpha)$ that changes a binary number to its base 10 form. (example, $\mathsf{int}(00010) = \mathsf{int}(10) ...
turing machines notation
1
Turing Machine notation -- (turing machines notation) <p>I'm a bit confused on some of the notation being used for turing machines in one of our exercises in class.</p>&#xA;&#xA;<p>The question gives us a string $\alpha \in \{0,1\}$* and the function $\mathsf{int}(\alpha)$ that changes a binary number to its base 10 fo...
habedi/stack-exchange-dataset
37,626
Why is this argument for $P\neq NP$ wrong?
<p>I know its silly, but i managed to confuse myself and i need help settling this</p>&#xA;&#xA;<p>Suppose $P=NP$, then clearly for every oracle $A$ we have $P^A=NP^A$ which contradicts the &#xA;fact that there exists some oracle $A$ for which $P^A\neq NP^A$, hence $P\neq NP$</p>&#xA;&#xA;<p>Whats wrong?&#xA;Thanks! </...
complexity theory p vs np oracle machines
1
Why is this argument for $P\neq NP$ wrong? -- (complexity theory p vs np oracle machines) <p>I know its silly, but i managed to confuse myself and i need help settling this</p>&#xA;&#xA;<p>Suppose $P=NP$, then clearly for every oracle $A$ we have $P^A=NP^A$ which contradicts the &#xA;fact that there exists some oracle ...
habedi/stack-exchange-dataset
37,630
Proving $DTime(n^3) \subset PSpace$
<p>It is pretty obvious that $DTime(n^3) \subseteq PSpace$, since $DTime(n^3) \subseteq DSpace(n^3) \subseteq PSpace$, but I fail to see how to find such a language $L$ so that $L\in PSpace\,\,\,$ yet $\,\,L\notin DTime(n^3) $. Can someone assist with an idea of how to find such $L$?</p>&#xA;
complexity theory
1
Proving $DTime(n^3) \subset PSpace$ -- (complexity theory) <p>It is pretty obvious that $DTime(n^3) \subseteq PSpace$, since $DTime(n^3) \subseteq DSpace(n^3) \subseteq PSpace$, but I fail to see how to find such a language $L$ so that $L\in PSpace\,\,\,$ yet $\,\,L\notin DTime(n^3) $. Can someone assist with an idea ...
habedi/stack-exchange-dataset
37,632
Finding a solution to the following conditions?
<p>So for these 5 conditions, I am trying to find the solution/formula for them. &#xA;What would $a_n$ equal basically? If it helps, the recurrence relation these 5 conditions were generated from was $a_n = a_{n - 1} + 2n$. Any help would be greatly appreciated. </p>&#xA;&#xA;<p>$$&#xA;\begin{align*}&#xA;a_0 &amp;= 4...
recurrence relation
1
Finding a solution to the following conditions? -- (recurrence relation) <p>So for these 5 conditions, I am trying to find the solution/formula for them. &#xA;What would $a_n$ equal basically? If it helps, the recurrence relation these 5 conditions were generated from was $a_n = a_{n - 1} + 2n$. Any help would be gre...
habedi/stack-exchange-dataset
37,637
Common method for solving satisfiability problems which lie in P
<p>I know from Schaefer's Dichotomy Theorem that only a few types of satisfiability problems are in P and any other problem is NP-complete. However, all of the algorithms I know for them use specific techniques unique to that type of problem- e.g. unit propagation for Hornsat, linear algebraic techniques mod 2 for XO...
complexity theory satisfiability polynomial time sat solvers
1
Common method for solving satisfiability problems which lie in P -- (complexity theory satisfiability polynomial time sat solvers) <p>I know from Schaefer's Dichotomy Theorem that only a few types of satisfiability problems are in P and any other problem is NP-complete. However, all of the algorithms I know for them u...
habedi/stack-exchange-dataset
37,658
A Combinational circuit Problem
<p>A circuit outputs a digit in the form of 4 bits. 0 is represented by 0000, 1 by 0001, …, 9 by 1001. A Combinational circuit is to be designed which takes these 4 &#xA;bits as input and outputs 1 if the digit $\geq$ 5, and 0 otherwise. If only AND, OR and &#xA;NOT gates may be used, what is the minim...
boolean algebra
1
A Combinational circuit Problem -- (boolean algebra) <p>A circuit outputs a digit in the form of 4 bits. 0 is represented by 0000, 1 by 0001, …, 9 by 1001. A Combinational circuit is to be designed which takes these 4 &#xA;bits as input and outputs 1 if the digit $\geq$ 5, and 0 otherwise. If only AND,...
habedi/stack-exchange-dataset
37,660
Maximum chromatic number of sparse graphs
<p>It is well-known that the chromatic number of a graph can be as high as $n$.</p>&#xA;&#xA;<p>But what is the maximum chromatic number of a graph with $m = O(n)$?</p>&#xA;
algorithms graphs
1
Maximum chromatic number of sparse graphs -- (algorithms graphs) <p>It is well-known that the chromatic number of a graph can be as high as $n$.</p>&#xA;&#xA;<p>But what is the maximum chromatic number of a graph with $m = O(n)$?</p>&#xA;
habedi/stack-exchange-dataset
37,665
Problem on Floating Point Representation
<p>Consider the floating-point representation</p>&#xA;&#xA;<pre><code>31-24 : Exponent&#xA;23-0 : Mantissa&#xA;</code></pre>&#xA;&#xA;<p>The exponent is in 2's complement representation and mantissa is in the sign magnitude representation. the range of the magnitude of the normalized numbers in this represntaion is</p...
floating point
1
Problem on Floating Point Representation -- (floating point) <p>Consider the floating-point representation</p>&#xA;&#xA;<pre><code>31-24 : Exponent&#xA;23-0 : Mantissa&#xA;</code></pre>&#xA;&#xA;<p>The exponent is in 2's complement representation and mantissa is in the sign magnitude representation. the range of the m...
habedi/stack-exchange-dataset
37,670
Heuristic for sokoban puzzle problem
<p>I am trying to write IDA* for Sokoban puzzle problem (<a href="http://en.wikipedia.org/wiki/Sokoban" rel="nofollow">http://en.wikipedia.org/wiki/Sokoban</a>) but It seems that my heuristic is not so good for making the algorithm fast.</p>&#xA;&#xA;<p>My heuristic is to consider $h(s)$ as minimum distance between th...
search algorithms heuristics
1
Heuristic for sokoban puzzle problem -- (search algorithms heuristics) <p>I am trying to write IDA* for Sokoban puzzle problem (<a href="http://en.wikipedia.org/wiki/Sokoban" rel="nofollow">http://en.wikipedia.org/wiki/Sokoban</a>) but It seems that my heuristic is not so good for making the algorithm fast.</p>&#xA;&#x...
habedi/stack-exchange-dataset
37,688
Quantum state probabilities and amplitudes - absolute value squared?
<p>It has just appeared to me that I've overlooked a possibly important fact. When we want to calculate probability $p_x$ of measuring the state $X$ and we know the amplitude of $X$ is $\alpha$, we know that $p_x = |\alpha|^2$. Until today I thought that absolute value was not necessary anyway. However, it brings signi...
quantum computing
1
Quantum state probabilities and amplitudes - absolute value squared? -- (quantum computing) <p>It has just appeared to me that I've overlooked a possibly important fact. When we want to calculate probability $p_x$ of measuring the state $X$ and we know the amplitude of $X$ is $\alpha$, we know that $p_x = |\alpha|^2$. ...
habedi/stack-exchange-dataset
37,691
A* graph search heuristicfor pathfinding
<p>A* needs a consistent heuristic to work on a graph.</p>&#xA;&#xA;<p>So I'm not sure if the heuristic of a straight line (bird flight) can be used.</p>&#xA;&#xA;<p>For example: the costs to travel to a neighbors node is always positive.</p>&#xA;&#xA;<pre><code> GOAL&#xA;&#xA; --------------------&#xA; | ...
algorithms graphs
1
A* graph search heuristicfor pathfinding -- (algorithms graphs) <p>A* needs a consistent heuristic to work on a graph.</p>&#xA;&#xA;<p>So I'm not sure if the heuristic of a straight line (bird flight) can be used.</p>&#xA;&#xA;<p>For example: the costs to travel to a neighbors node is always positive.</p>&#xA;&#xA;<pre...
habedi/stack-exchange-dataset
37,705
$3EQ \leq _P 2EQ$
<p>Let:</p>&#xA;&#xA;<ul>&#xA;<li>$2EQ$ - The language of all binary ($\mathbb{Z}_2$) equation sets that have a solution in $\mathbb{Z}_2$, where each multiplication is of at most two $x_i,\, x_j$. Meaning a set of equations of the form: $\Sigma a_i \cdot x_i + \Sigma \, \Sigma \, a_{i,j} \cdot x_i \cdot x_j = b $.</li...
complexity theory turing machines reductions
1
$3EQ \leq _P 2EQ$ -- (complexity theory turing machines reductions) <p>Let:</p>&#xA;&#xA;<ul>&#xA;<li>$2EQ$ - The language of all binary ($\mathbb{Z}_2$) equation sets that have a solution in $\mathbb{Z}_2$, where each multiplication is of at most two $x_i,\, x_j$. Meaning a set of equations of the form: $\Sigma a_i \c...
habedi/stack-exchange-dataset
37,709
Why are HMMs appropriate for speech recognition when the problem doesn't seem to satisfy the Markov property
<p>I'm learning about HMMs and their applications and trying to understand their usages. My knowledge is a bit spotty, so please correct any incorrect assumptions I'm making. The specific example I'm wondering about is for using HMMs for speech detection, which is a common example in literature.</p>&#xA;&#xA;<p>The bas...
hidden markov models markov chains speech recognition
1
Why are HMMs appropriate for speech recognition when the problem doesn't seem to satisfy the Markov property -- (hidden markov models markov chains speech recognition) <p>I'm learning about HMMs and their applications and trying to understand their usages. My knowledge is a bit spotty, so please correct any incorrect a...
habedi/stack-exchange-dataset
37,710
Integer factorization: comparing with floor
<p>While working on <a href="https://math.stackexchange.com/questions/1118529/integer-factorization-possible-progress">integer factorization algorithm</a> I came to the next problem:</p>&#xA;&#xA;<p>$$\frac{a}{ex} = \lfloor{\frac{a}{ex}\rfloor} + c$$</p>&#xA;&#xA;<ul>&#xA;<li>$a$ the number I want to factor</li>&#xA;<l...
integers factoring
1
Integer factorization: comparing with floor -- (integers factoring) <p>While working on <a href="https://math.stackexchange.com/questions/1118529/integer-factorization-possible-progress">integer factorization algorithm</a> I came to the next problem:</p>&#xA;&#xA;<p>$$\frac{a}{ex} = \lfloor{\frac{a}{ex}\rfloor} + c$$</...
habedi/stack-exchange-dataset
37,715
$25_r = 23_{10}$ solve for the base r
<p>first of all this is a homework question and I don't want the solution. I just want a reference to how to solve similar questions like this. I believe it's explained my course textbook, "Computer Organization &amp; Architecture: Themes and Variations" but I currently cannot afford the textbook.</p>&#xA;&#xA;<p>Here'...
base conversion
1
$25_r = 23_{10}$ solve for the base r -- (base conversion) <p>first of all this is a homework question and I don't want the solution. I just want a reference to how to solve similar questions like this. I believe it's explained my course textbook, "Computer Organization &amp; Architecture: Themes and Variations" but I ...
habedi/stack-exchange-dataset
37,721
Prove transitivity of big-O notation
<p>I'm doing a practice question (<strong>not</strong> graded HW) to understand mathematical proofs and their application to Big O proofs. So far, however, the very first problem in my text is stumping me wholly.</p>&#xA;&#xA;<p>Suppose $f(n) = O(g(N))$ and $g(n) = O(h(n))$ (all functions are positive). </p>&#xA;&#xA;<...
asymptotics closure properties landau notation
1
Prove transitivity of big-O notation -- (asymptotics closure properties landau notation) <p>I'm doing a practice question (<strong>not</strong> graded HW) to understand mathematical proofs and their application to Big O proofs. So far, however, the very first problem in my text is stumping me wholly.</p>&#xA;&#xA;<p>Su...
habedi/stack-exchange-dataset
37,722
CTL - model checking for formula $A [a \cup b]$
<p>I'm trying to verify if the following model satisfy $A [a \cup b]$:</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/RY7JA.png" alt="The model on which i want to verify the formula"></p>&#xA;&#xA;<p>The algorithm I'm using is taken from "Concepts, Algorithms, and Tools for Model Checking", Joost-Pieter Katoen. In...
logic computation tree logic temporal logic
1
CTL - model checking for formula $A [a \cup b]$ -- (logic computation tree logic temporal logic) <p>I'm trying to verify if the following model satisfy $A [a \cup b]$:</p>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/RY7JA.png" alt="The model on which i want to verify the formula"></p>&#xA;&#xA;<p>The algorithm I'm ...
habedi/stack-exchange-dataset
37,731
Is this combinatorial optimisation problem similar to any known problem?
<p>The problem is as follows:</p>&#xA;&#xA;<p>We have a two dimensional array/grid of numbers, each representing some "benefit" or "profit." We also have two fixed integers $w$ and $h$ (for "width" and "height".) And a fixed integer $n$.</p>&#xA;&#xA;<p>We now wish to overlay $n$ rectangles of dimensions $w \times h$ o...
algorithms optimization combinatorics approximation
1
Is this combinatorial optimisation problem similar to any known problem? -- (algorithms optimization combinatorics approximation) <p>The problem is as follows:</p>&#xA;&#xA;<p>We have a two dimensional array/grid of numbers, each representing some "benefit" or "profit." We also have two fixed integers $w$ and $h$ (for ...
habedi/stack-exchange-dataset
37,737
Lower bounds for space with some probability of error
<p>There is an information theoretic lower bound of $\log_2 {U \choose x}$ for the number of bits to represent a subset of $x$ elements chosen from a universe of size $U$. We can in principle use this representation (perhaps inefficiently) as a data structure to test if any query is part of this subset. </p>&#xA;&#...
data structures information theory lower bounds
1
Lower bounds for space with some probability of error -- (data structures information theory lower bounds) <p>There is an information theoretic lower bound of $\log_2 {U \choose x}$ for the number of bits to represent a subset of $x$ elements chosen from a universe of size $U$. We can in principle use this represent...
habedi/stack-exchange-dataset
37,738
What does it mean for a function $f\colon M → N$ between *any* sets $M, N$ to be computable?
<p>In our lecture notes on lamdba calculus, I encountered the sentence:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $M$ be a set and $f\colon ℕ → M$ be computable.</p>&#xA;</blockquote>&#xA;&#xA;<p>Does this even make sense? Don’t we need aditional structure on $ℕ$ and $M$ to talk about computability and decidability? How c...
terminology computability
1
What does it mean for a function $f\colon M → N$ between *any* sets $M, N$ to be computable? -- (terminology computability) <p>In our lecture notes on lamdba calculus, I encountered the sentence:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $M$ be a set and $f\colon ℕ → M$ be computable.</p>&#xA;</blockquote>&#xA;&#xA;<p>Doe...
habedi/stack-exchange-dataset
37,742
How can I fill bookcases with shelves of books using the least number of bookcases?
<p>Sorry for layman's term question, my background in computer science is weak.</p>&#xA;&#xA;<p>What I have is a list of shelves with books of varying height. Each shelf stores a value that describes how many shelves (of that height) can fit on a bookcase. The bookcases have adjustable shelves so that we can maximize...
optimization heuristics packing
1
How can I fill bookcases with shelves of books using the least number of bookcases? -- (optimization heuristics packing) <p>Sorry for layman's term question, my background in computer science is weak.</p>&#xA;&#xA;<p>What I have is a list of shelves with books of varying height. Each shelf stores a value that describe...
habedi/stack-exchange-dataset
37,747
Is Universality Theorem applicable to Halting problem?
<p>This is Universality theorem In the <code>Computability, Complexity and Languages book written by Davis in page 70</code>:</p>&#xA;<blockquote>&#xA;<p>If <span class="math-container">$\phi^{(n)}(x_1,...,x_n,y) = \psi_P(x_1,...,x_n)$</span>        <span class="math-container">$where$</span>  #<span class="math-contai...
computability halting problem
1
Is Universality Theorem applicable to Halting problem? -- (computability halting problem) <p>This is Universality theorem In the <code>Computability, Complexity and Languages book written by Davis in page 70</code>:</p>&#xA;<blockquote>&#xA;<p>If <span class="math-container">$\phi^{(n)}(x_1,...,x_n,y) = \psi_P(x_1,...,...
habedi/stack-exchange-dataset
37,748
Why Halting problem is Recursively Enumerable?
<p>If we take this definition as R.E. set definition (<code>Computability, Complexity and Languages book written by Davis in page 79</code>)</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$Definition.$</span>The set <span class="math-container">$B\subseteq N$</span> is called r.e. if there is partially comput...
computability halting problem
1
Why Halting problem is Recursively Enumerable? -- (computability halting problem) <p>If we take this definition as R.E. set definition (<code>Computability, Complexity and Languages book written by Davis in page 79</code>)</p>&#xA;<blockquote>&#xA;<p><span class="math-container">$Definition.$</span>The set <span class=...
habedi/stack-exchange-dataset
37,759
Understanding the definition of SPMD
<p>From <a href="http://en.wikipedia.org/wiki/SPMD" rel="nofollow">Wikipedia</a></p>&#xA;&#xA;<blockquote>&#xA; <p>SPMD (single program, multiple data) is a technique employed to achieve parallelism; it is a subcategory of MIMD. <strong>Tasks are split up and run simultaneously on multiple processors with different in...
computer architecture parallel computing
1
Understanding the definition of SPMD -- (computer architecture parallel computing) <p>From <a href="http://en.wikipedia.org/wiki/SPMD" rel="nofollow">Wikipedia</a></p>&#xA;&#xA;<blockquote>&#xA; <p>SPMD (single program, multiple data) is a technique employed to achieve parallelism; it is a subcategory of MIMD. <strong...
habedi/stack-exchange-dataset
37,764
Are regular grammars always LR(1)
<p>The question is fairly straight forward. I just found a question on the internet that asks whether all regular grammars are</p>&#xA;&#xA;<ol>&#xA;<li><p>LL(1)</p></li>&#xA;<li><p>LR(1)</p></li>&#xA;</ol>&#xA;&#xA;<p>I guess they can't be LL(1) because of left recursion, but how do we prove that they are LR(1) if so....
context free parsers
1
Are regular grammars always LR(1) -- (context free parsers) <p>The question is fairly straight forward. I just found a question on the internet that asks whether all regular grammars are</p>&#xA;&#xA;<ol>&#xA;<li><p>LL(1)</p></li>&#xA;<li><p>LR(1)</p></li>&#xA;</ol>&#xA;&#xA;<p>I guess they can't be LL(1) because of le...
habedi/stack-exchange-dataset
37,771
Relaxation of the null production restriction in Regular and Context Free Grammars
<p>I am convinced of the fact that allowing productions of the form $S \rightarrow \epsilon$ in a context sensitive grammar would allow RE languages to be expressed if $S$ were on the right hand side of some production.</p>&#xA;&#xA;<p>However, in most definitions of <a href="http://en.wikipedia.org/wiki/Regular_gramma...
formal languages context free regular languages formal grammars
1
Relaxation of the null production restriction in Regular and Context Free Grammars -- (formal languages context free regular languages formal grammars) <p>I am convinced of the fact that allowing productions of the form $S \rightarrow \epsilon$ in a context sensitive grammar would allow RE languages to be expressed if ...
habedi/stack-exchange-dataset
37,788
Finding set of disjoint sets with additional value optimization
<p>I've got a set $Q$ of pairs $[S, v]$ where $S$ is a nonempty set and $v$ is a value ($v \in \mathbb{N}_{+}$). I need to find a subset $R$ of $Q$ with following properties:</p>&#xA;&#xA;<ul>&#xA;<li>Sum of all $v$'s is maximum</li>&#xA;<li>$S$ from all pairs construct a disjoint set</li>&#xA;</ul>&#xA;&#xA;<p>Example...
optimization sets
1
Finding set of disjoint sets with additional value optimization -- (optimization sets) <p>I've got a set $Q$ of pairs $[S, v]$ where $S$ is a nonempty set and $v$ is a value ($v \in \mathbb{N}_{+}$). I need to find a subset $R$ of $Q$ with following properties:</p>&#xA;&#xA;<ul>&#xA;<li>Sum of all $v$'s is maximum</li>...
habedi/stack-exchange-dataset
37,795
Why is 'Manhattan distance' a better heuristic for 15 puzzle than 'number of tiles misplaced'?
<p>Consider two heuristics $h_1$ and $h_2$ defined for the 15 puzzle problem as:</p>&#xA;&#xA;<ol>&#xA;<li>$h_1(n)$ = number of misplaced tiles</li>&#xA;<li>$h_2(n)$ = total Manhatten distance</li>&#xA;</ol>&#xA;&#xA;<p><img src="https://i.stack.imgur.com/0TKFh.png" alt="15 Puzzle"></p>&#xA;&#xA;<p>Could anyone tell wh...
algorithms heuristics
1
Why is 'Manhattan distance' a better heuristic for 15 puzzle than 'number of tiles misplaced'? -- (algorithms heuristics) <p>Consider two heuristics $h_1$ and $h_2$ defined for the 15 puzzle problem as:</p>&#xA;&#xA;<ol>&#xA;<li>$h_1(n)$ = number of misplaced tiles</li>&#xA;<li>$h_2(n)$ = total Manhatten distance</li>&...
habedi/stack-exchange-dataset
37,805
Closure properties between 2 languages of different types
<p>Whenever said - The intersection between a Context Free Language and a Regular Language is always Context Free, what is the best logical way to confirm the statement?<br>&#xA;I have <a href="http://ccl.pku.edu.cn/doubtfire/Syntax/Introduction/Chomsky/Chomsky_Hierarchy/Chapter%2024%20The%20Chomsky%20Hierarchy.files/c...
formal languages context free regular languages finite automata
1
Closure properties between 2 languages of different types -- (formal languages context free regular languages finite automata) <p>Whenever said - The intersection between a Context Free Language and a Regular Language is always Context Free, what is the best logical way to confirm the statement?<br>&#xA;I have <a href=...
habedi/stack-exchange-dataset
37,808
Is this problem P or NP?
<p>Given a set of whole numbers $M=\{z_0, ..., z_n\}$ Are there $z_i$ and $z_j$ with $i \neq j$ but $z_i = z_j$?</p>&#xA;&#xA;<p>Is this Problem (surely or only probably) in $P$ or in $NP$? Is it $NP-hard$?</p>&#xA;
algorithms complexity theory time complexity np hard np
1
Is this problem P or NP? -- (algorithms complexity theory time complexity np hard np) <p>Given a set of whole numbers $M=\{z_0, ..., z_n\}$ Are there $z_i$ and $z_j$ with $i \neq j$ but $z_i = z_j$?</p>&#xA;&#xA;<p>Is this Problem (surely or only probably) in $P$ or in $NP$? Is it $NP-hard$?</p>&#xA;
habedi/stack-exchange-dataset
37,813
Probability of having a log(n) length monotone subsequence in a random permutation of {1,...,n}
<p>How can I compute the probability of having a $\log(n)$ length monotone consecutive subsequence in a random permutation of $\{1,...,n\}$.</p>&#xA;&#xA;<p>I wish to upperbound it with $1/n$.</p>&#xA;
combinatorics probabilistic algorithms permutations
1
Probability of having a log(n) length monotone subsequence in a random permutation of {1,...,n} -- (combinatorics probabilistic algorithms permutations) <p>How can I compute the probability of having a $\log(n)$ length monotone consecutive subsequence in a random permutation of $\{1,...,n\}$.</p>&#xA;&#xA;<p>I wish to ...
habedi/stack-exchange-dataset
37,815
Basic linear programming question
<p>Trying to answer this question:</p>&#xA;&#xA;<p><em>A factory produces chocolate and candy. In order to produce 100 kilograms of chocolate, the factory has to use machine A for 1 hour, machine B for 4 hours, and machine C for 2 hours. In order to produce 100 kilograms of candy, the factory has to use machine A&#xA;f...
linear programming
1
Basic linear programming question -- (linear programming) <p>Trying to answer this question:</p>&#xA;&#xA;<p><em>A factory produces chocolate and candy. In order to produce 100 kilograms of chocolate, the factory has to use machine A for 1 hour, machine B for 4 hours, and machine C for 2 hours. In order to produce 100 ...
habedi/stack-exchange-dataset
37,818
Language consisting of all Turing machine encodings
<p>$A=${$ ⟨M⟩$:$M$ $is$ $a$ $Turing$ $Machine$ }</p>&#xA;&#xA;<p>What can be said about $A$ ? Specifically, is $A$ decidable,regular,CFL,CSL?</p>&#xA;&#xA;<p>I would say $A$ is decidable since we can write an algorithm to check whether a string is a valid encoding of a Turing machine .</p>&#xA;&#xA;<p>But, is $A$ Regul...
formal languages computability turing machines
1
Language consisting of all Turing machine encodings -- (formal languages computability turing machines) <p>$A=${$ ⟨M⟩$:$M$ $is$ $a$ $Turing$ $Machine$ }</p>&#xA;&#xA;<p>What can be said about $A$ ? Specifically, is $A$ decidable,regular,CFL,CSL?</p>&#xA;&#xA;<p>I would say $A$ is decidable since we can write an algorit...
habedi/stack-exchange-dataset
37,822
Potential method for dynamic binary search
<p>I'm trying to solve 17-2(b) problem from Cormen(CLRS) using potential method.</p>&#xA;&#xA;<p>Problem from Cormen:</p>&#xA;&#xA;<p>17-2 Making binary search dynamic&#xA;Binary search of a sorted array takes logarithmic search time, but the time to insert a new element is linear in the size of the array. We can impro...
amortized analysis binary search
1
Potential method for dynamic binary search -- (amortized analysis binary search) <p>I'm trying to solve 17-2(b) problem from Cormen(CLRS) using potential method.</p>&#xA;&#xA;<p>Problem from Cormen:</p>&#xA;&#xA;<p>17-2 Making binary search dynamic&#xA;Binary search of a sorted array takes logarithmic search time, but ...
habedi/stack-exchange-dataset
37,831
Prove by Induction that $r_n$ is $O(\log_2(\log_2n))$
<p>Let the sequence $r$ be defined by:</p>&#xA;&#xA;<p>$$\begin{align*}r_{1} &amp;= 1\\&#xA;r_n&amp;= 1 + r_{\lfloor\sqrt{n}\rfloor}\,,\quad n\geq 2\,.\end{align*}$$</p>&#xA;&#xA;<p>Prove by induction that $r_n$ is $O(\log_2(\log_2n))$.</p>&#xA;&#xA;<p>My idea is to find the closed form function of r and then use the b...
recurrence relation induction
1
Prove by Induction that $r_n$ is $O(\log_2(\log_2n))$ -- (recurrence relation induction) <p>Let the sequence $r$ be defined by:</p>&#xA;&#xA;<p>$$\begin{align*}r_{1} &amp;= 1\\&#xA;r_n&amp;= 1 + r_{\lfloor\sqrt{n}\rfloor}\,,\quad n\geq 2\,.\end{align*}$$</p>&#xA;&#xA;<p>Prove by induction that $r_n$ is $O(\log_2(\log_2...
habedi/stack-exchange-dataset
37,837
Term for a matching which is perfect on one side only
<p>What is a standard term for a matching in a bipartite graph, in which one part has less vertices than the other part, and the part with less vertices is fully matched (but the other part is, obviously, not fully matched)?</p>&#xA;&#xA;<p>It is not exactly perfect, but it is "one-sided perfect", or "as perfect as it ...
graphs terminology bipartite matching
1
Term for a matching which is perfect on one side only -- (graphs terminology bipartite matching) <p>What is a standard term for a matching in a bipartite graph, in which one part has less vertices than the other part, and the part with less vertices is fully matched (but the other part is, obviously, not fully matched)...
habedi/stack-exchange-dataset
37,838
Pumping Lemma for Regular Language seems to Fail
<p>Let $L = \{ab^ncd \mid n \geq 0\}$. If we take $p = 5$ and $w = abbcd$ and write &#xA;$w_i = xy^iz$, where $x = abb$, $y=c$, $z=d$, then $w_2 = abbccd$ which is not in&nbsp;$L$. We conclude that $L$&nbsp;is not regular but it obviously is!</p>&#xA;&#xA;<p>What am I doing wrong?</p>&#xA;
regular languages pumping lemma
1
Pumping Lemma for Regular Language seems to Fail -- (regular languages pumping lemma) <p>Let $L = \{ab^ncd \mid n \geq 0\}$. If we take $p = 5$ and $w = abbcd$ and write &#xA;$w_i = xy^iz$, where $x = abb$, $y=c$, $z=d$, then $w_2 = abbccd$ which is not in&nbsp;$L$. We conclude that $L$&nbsp;is not regular but it obv...
habedi/stack-exchange-dataset
37,845
Logical Reduction
<p>Reducing one computable problem to another by providing an algorithm which transforms an instance of one problem to one of the other (and limiting the time or space of that algorithm) is clear to me. However, I fail to understand how reductions via logic work, e.g. a reduction in FO. My biggest problem is that the s...
reductions logic
1
Logical Reduction -- (reductions logic) <p>Reducing one computable problem to another by providing an algorithm which transforms an instance of one problem to one of the other (and limiting the time or space of that algorithm) is clear to me. However, I fail to understand how reductions via logic work, e.g. a reduction...
habedi/stack-exchange-dataset
37,847
Direct Cache Mapping - Addressing
<p>I've looked through all the other similar questions, but I don't feel like I understood exactly what I'm supposed to do with my case, so I'm hoping I'm not the only one.</p>&#xA;&#xA;<p>In an exercise I'm doing, I'm told to consider a computational system with a direct mapping cache, that can store 16 blocks of 4 by...
computer architecture cpu cache
1
Direct Cache Mapping - Addressing -- (computer architecture cpu cache) <p>I've looked through all the other similar questions, but I don't feel like I understood exactly what I'm supposed to do with my case, so I'm hoping I'm not the only one.</p>&#xA;&#xA;<p>In an exercise I'm doing, I'm told to consider a computation...
habedi/stack-exchange-dataset
37,851
Is Everything a Hardware Interrupt?
<p>Just need a little help understanding hardware interrupts.</p>&#xA;&#xA;<p>As I understand (feel free to correct) a hardware interrupts occurs when hardware wants attention of the computer. In basic terms the hardware sends a message down the interrupt line which is then controlled by the PIC. The CPU receives the i...
operating systems
1
Is Everything a Hardware Interrupt? -- (operating systems) <p>Just need a little help understanding hardware interrupts.</p>&#xA;&#xA;<p>As I understand (feel free to correct) a hardware interrupts occurs when hardware wants attention of the computer. In basic terms the hardware sends a message down the interrupt line ...
habedi/stack-exchange-dataset
37,854
Solving Recurrence Relations 3
<p>Consider the following recurrence&#xA;$$T(n)=T(n-1)+n\log n$$</p>&#xA;&#xA;<p>My approach:&#xA;Solving using Substitution&#xA;$T(n)=n \log n+(n-1) \log (n-1)+(n-2) \log (n-2)+(n-3) \log (n-3)+...$</p>&#xA;&#xA;<p>$=[n\log n + n \log(n-1)+ n \log(n-2)+ n \log(n-3)+...]-[\log(n-1)+2\log(n-2)+3\log(n-3)+...]$</p>&#xA;&...
recurrence relation
1
Solving Recurrence Relations 3 -- (recurrence relation) <p>Consider the following recurrence&#xA;$$T(n)=T(n-1)+n\log n$$</p>&#xA;&#xA;<p>My approach:&#xA;Solving using Substitution&#xA;$T(n)=n \log n+(n-1) \log (n-1)+(n-2) \log (n-2)+(n-3) \log (n-3)+...$</p>&#xA;&#xA;<p>$=[n\log n + n \log(n-1)+ n \log(n-2)+ n \log(n-...
habedi/stack-exchange-dataset
37,860
Build Automatic Speech Recognition (ASR) from scratch
<p>I want to build a Automatic Speech Recognition (ASR) engine for myself, but I've no idea from where to start. </p>&#xA;&#xA;<p>I've read that most ASR's are build upon Hidden Markov Models, but also I've read that HMM is limited somehow and a better approach is to build a ASR upon Machine Learning features.</p>&#xA;...
machine learning hidden markov models speech recognition
1
Build Automatic Speech Recognition (ASR) from scratch -- (machine learning hidden markov models speech recognition) <p>I want to build a Automatic Speech Recognition (ASR) engine for myself, but I've no idea from where to start. </p>&#xA;&#xA;<p>I've read that most ASR's are build upon Hidden Markov Models, but also I'...
habedi/stack-exchange-dataset
37,861
When should you use the existential and universal quantifiers for Relational Calculus?
<p>Could someone explain to me WHEN do you use existential and universal quantifiers for Relational Calculus? </p>&#xA;&#xA;<p><strong>Given this schema:</strong></p>&#xA;&#xA;<pre><code>Hotel(hotelNo, hotelName, city)&#xA;</code></pre>&#xA;&#xA;<p>The expression below gets all hotel names based in London (expressed in...
database theory databases relational algebra
1
When should you use the existential and universal quantifiers for Relational Calculus? -- (database theory databases relational algebra) <p>Could someone explain to me WHEN do you use existential and universal quantifiers for Relational Calculus? </p>&#xA;&#xA;<p><strong>Given this schema:</strong></p>&#xA;&#xA;<pre><c...
habedi/stack-exchange-dataset
37,867
Combinational Logic Circuits and Theory of Computation
<p>I'm trying to link Combinational Logic Circuits ( computers based on logical gates only ) with everything I have learned recently in Theory of Computation. </p>&#xA;&#xA;<p>I was wondering whether combinational logic circuits can implement computations in the same way finite state machines can. They seem radically...
complexity theory turing machines computation models circuits
1
Combinational Logic Circuits and Theory of Computation -- (complexity theory turing machines computation models circuits) <p>I'm trying to link Combinational Logic Circuits ( computers based on logical gates only ) with everything I have learned recently in Theory of Computation. </p>&#xA;&#xA;<p>I was wondering whet...
habedi/stack-exchange-dataset
37,877
Why Iterative-Deepening-DFS requires O(b*d) memory?
<p>After reading about <a href="http://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search" rel="nofollow">iterative deepening depth-first search on Wikipedia</a>, I could understand that it just limits the depth upto which dfs can go in one iteration/call.</p>&#xA;&#xA;<p>However, I could not understand why i...
graphs graph traversal
1
Why Iterative-Deepening-DFS requires O(b*d) memory? -- (graphs graph traversal) <p>After reading about <a href="http://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search" rel="nofollow">iterative deepening depth-first search on Wikipedia</a>, I could understand that it just limits the depth upto which dfs can...
habedi/stack-exchange-dataset