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
59,397
Languages reducible to and from context-free
<p>Let $L'$ be a context-free language. If $L \leq_M L' \leq_M L''$, where $\leq_M$ denotes mapping reducibility (aka many-one reducibility), what can we know about $L$ and $L''$?</p>&#xA;&#xA;<p>I think they're both decidable languages but that's all I can say.</p>&#xA;
formal languages context free reductions
1
Languages reducible to and from context-free -- (formal languages context free reductions) <p>Let $L'$ be a context-free language. If $L \leq_M L' \leq_M L''$, where $\leq_M$ denotes mapping reducibility (aka many-one reducibility), what can we know about $L$ and $L''$?</p>&#xA;&#xA;<p>I think they're both decidable l...
habedi/stack-exchange-dataset
59,399
In which O-class does my Θ-result belong?
<p>In a multiple-choice test, I'm asked to solve the recurrence $T(n)=2T(n/2)+n/2$.&#xA;I've done this using the master theorem: $f(n)=n/2$, $a=2$, $b=2$, so we're in the second case and $T(n)=\Theta(n\log n)$.</p>&#xA;&#xA;<p>But the possible answers are $O(\log n)$, $O(n)$, $O(n \log n)$, $O(n^2)$ and $O(n^2/\log n)$...
asymptotics landau notation
1
In which O-class does my Θ-result belong? -- (asymptotics landau notation) <p>In a multiple-choice test, I'm asked to solve the recurrence $T(n)=2T(n/2)+n/2$.&#xA;I've done this using the master theorem: $f(n)=n/2$, $a=2$, $b=2$, so we're in the second case and $T(n)=\Theta(n\log n)$.</p>&#xA;&#xA;<p>But the possible a...
habedi/stack-exchange-dataset
59,410
Can a RAM calculate its own Gödel number?
<p>You can get the Gödel number of a RAM by making it a list of commands and making this list an integer.</p>&#xA;&#xA;<p>So, what I thought is something like "The RAM that would return its own Gödel number (say, $x$) would have to have the information $x$ in it, so the integer would be greater than $x$, so it would no...
computability
1
Can a RAM calculate its own Gödel number? -- (computability) <p>You can get the Gödel number of a RAM by making it a list of commands and making this list an integer.</p>&#xA;&#xA;<p>So, what I thought is something like "The RAM that would return its own Gödel number (say, $x$) would have to have the information $x$ in...
habedi/stack-exchange-dataset
59,421
Reinforcement Learning - Q Learning
<p>I am having trouble understanding the following problem and Q learning in general. </p>&#xA;&#xA;<p>What I know so far about Q learning is that Q-learning is a model free method, i.e., it doesn’t need to learn P(s’|s,a). Thus it can compare the expected utility of the available actions without the model of the envir...
artificial intelligence reinforcement learning
1
Reinforcement Learning - Q Learning -- (artificial intelligence reinforcement learning) <p>I am having trouble understanding the following problem and Q learning in general. </p>&#xA;&#xA;<p>What I know so far about Q learning is that Q-learning is a model free method, i.e., it doesn’t need to learn P(s’|s,a). Thus it ...
habedi/stack-exchange-dataset
59,422
Initializing non-deterministic variables in QBF
<p>I'm trying to translate the following pseudocode to QBF. The integers are encoded as simple fixed-width bitvectors, and the entire procedure runs in polynomial space ensuring QBF has enough representational power for a compact formula.</p>&#xA;&#xA;<p>The following formula is nested to a linear depth in n, producing...
satisfiability model checking
1
Initializing non-deterministic variables in QBF -- (satisfiability model checking) <p>I'm trying to translate the following pseudocode to QBF. The integers are encoded as simple fixed-width bitvectors, and the entire procedure runs in polynomial space ensuring QBF has enough representational power for a compact formula...
habedi/stack-exchange-dataset
59,424
Solving the recurrence T(n) = 4T(n/4) + n log n with the iterative method
<p>I'm trying to solve</p>&#xA;&#xA;<p>$$ T(n) = 4T(n/4) + n \log_{10}n.$$</p>&#xA;&#xA;<p>I'm having trouble with Iteration Method near the end.&#xA;As far as I went, I obtained the General Formula as:</p>&#xA;&#xA;<p>$$4^kT(n/4^k)+n\log n+\sum (n/4^k)\log(n/4^k)$$</p>&#xA;&#xA;<p>And trying to get the moment when it ...
recurrence relation discrete mathematics
1
Solving the recurrence T(n) = 4T(n/4) + n log n with the iterative method -- (recurrence relation discrete mathematics) <p>I'm trying to solve</p>&#xA;&#xA;<p>$$ T(n) = 4T(n/4) + n \log_{10}n.$$</p>&#xA;&#xA;<p>I'm having trouble with Iteration Method near the end.&#xA;As far as I went, I obtained the General Formula a...
habedi/stack-exchange-dataset
59,429
Efficient algorithm for getting from 1 to n with 3 specific operations
<p><strong>The question:</strong></p>&#xA;&#xA;<blockquote>&#xA; <p>Given those 3 valid operations over numbers and an integer $n$:</p>&#xA; &#xA; <ul>&#xA; <li>add $1$ to the number</li>&#xA; <li>multiply the number by $2$</li>&#xA; <li>multiply the number by $3$</li>&#xA; </ul>&#xA; &#xA; <p>describe an effi...
algorithms recursion integers
1
Efficient algorithm for getting from 1 to n with 3 specific operations -- (algorithms recursion integers) <p><strong>The question:</strong></p>&#xA;&#xA;<blockquote>&#xA; <p>Given those 3 valid operations over numbers and an integer $n$:</p>&#xA; &#xA; <ul>&#xA; <li>add $1$ to the number</li>&#xA; <li>multiply the...
habedi/stack-exchange-dataset
59,453
Why is b-tree search O(log n)?
<p>B-tree is a data structure, which looks like this:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/KNkwl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KNkwl.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>If I want to look for some specific value in this structure, I need to go t...
algorithm analysis data structures search trees balanced search trees
1
Why is b-tree search O(log n)? -- (algorithm analysis data structures search trees balanced search trees) <p>B-tree is a data structure, which looks like this:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/KNkwl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KNkwl.png" alt="enter image descript...
habedi/stack-exchange-dataset
59,459
Why should small o notation has to satisfy the equation for all values of the constant
<p>Big-O of a function i.e. f(n) = O(g(n)) is such that both <strong>c</strong> and <span class="math-container">$\textbf{n}_0$</span> can be assigned values depending upon the function f(n). If such is the case for Big-O, then why for small-o, the following condition exists:</p>&#xA;<blockquote>&#xA;<p>f(n) = o(g(n)) ...
algorithms algorithm analysis asymptotics
1
Why should small o notation has to satisfy the equation for all values of the constant -- (algorithms algorithm analysis asymptotics) <p>Big-O of a function i.e. f(n) = O(g(n)) is such that both <strong>c</strong> and <span class="math-container">$\textbf{n}_0$</span> can be assigned values depending upon the function ...
habedi/stack-exchange-dataset
59,465
Can QBF encode #QBF?
<p>In another question <a href="https://cs.stackexchange.com/q/59422/23893">Initializing non-deterministic variables in QBF</a>, I was interested about translating assertion-based pseudocode to QBF in order to have an exponentially more compact encoding compared to unrolling deeply nested loops into SAT.</p>&#xA;&#xA;<...
complexity theory satisfiability model checking
1
Can QBF encode #QBF? -- (complexity theory satisfiability model checking) <p>In another question <a href="https://cs.stackexchange.com/q/59422/23893">Initializing non-deterministic variables in QBF</a>, I was interested about translating assertion-based pseudocode to QBF in order to have an exponentially more compact e...
habedi/stack-exchange-dataset
59,466
What is the cardinality of the set of regular grammars?
<p>What is the cardinality of the set of regular grammars? The caveat is that I'm only interested in grammars which are 'structurally' different. Sorry I don't know how to talk about this in a formal way, but what I mean is that the actual symbols are arbitrary to me.</p>&#xA;&#xA;<p>So for example the grammar with:&...
regular languages formal grammars combinatorics
1
What is the cardinality of the set of regular grammars? -- (regular languages formal grammars combinatorics) <p>What is the cardinality of the set of regular grammars? The caveat is that I'm only interested in grammars which are 'structurally' different. Sorry I don't know how to talk about this in a formal way, but ...
habedi/stack-exchange-dataset
59,470
Project to L1 ball of specified radius
<h2>The task</h2>&#xA;&#xA;<p>If $x \in \mathbb{R}^d$ is a $d$-dimensional vector, recall that <a href="https://en.wikipedia.org/wiki/Norm_%28mathematics%29#Taxicab_norm_or_Manhattan_norm" rel="nofollow">the $\ell_1$ norm</a> of $x$ is given by</p>&#xA;&#xA;<p>$$||x||_1 = |x_1| + |x_2| + \dots + |x_d|.$$</p>&#xA;&#xA;<...
optimization machine learning numerical algorithms
1
Project to L1 ball of specified radius -- (optimization machine learning numerical algorithms) <h2>The task</h2>&#xA;&#xA;<p>If $x \in \mathbb{R}^d$ is a $d$-dimensional vector, recall that <a href="https://en.wikipedia.org/wiki/Norm_%28mathematics%29#Taxicab_norm_or_Manhattan_norm" rel="nofollow">the $\ell_1$ norm</a>...
habedi/stack-exchange-dataset
59,487
Are there any known lower-bounds for complexity on Non-determinsitic machines
<p>For some problems, like sorting, we know that on a deterministic RAM Machine, any comparison sort must take at least $\Omega(n\log n)$ time.</p>&#xA;&#xA;<p>Are they any problems where we have known lower bounds for the complexity of a problem when using non-deterministic machines? </p>&#xA;&#xA;<p>$NP$-hard or -int...
complexity theory np nondeterminism lower bounds
1
Are there any known lower-bounds for complexity on Non-determinsitic machines -- (complexity theory np nondeterminism lower bounds) <p>For some problems, like sorting, we know that on a deterministic RAM Machine, any comparison sort must take at least $\Omega(n\log n)$ time.</p>&#xA;&#xA;<p>Are they any problems where ...
habedi/stack-exchange-dataset
59,494
Is applying a formula a kind of reasoning?
<p>Supposed I have a set of simple rules, e.g. </p>&#xA;&#xA;<pre><code>if A is between 10 and 20 and B is between 3 and 5, then use 3&#xA;</code></pre>&#xA;&#xA;<p>and this rules are used in some kind of (more or less) mathematical formula (for example, A + B = C), would you count this as a form of reasoning or infere...
terminology artificial intelligence reasoning
1
Is applying a formula a kind of reasoning? -- (terminology artificial intelligence reasoning) <p>Supposed I have a set of simple rules, e.g. </p>&#xA;&#xA;<pre><code>if A is between 10 and 20 and B is between 3 and 5, then use 3&#xA;</code></pre>&#xA;&#xA;<p>and this rules are used in some kind of (more or less) mathem...
habedi/stack-exchange-dataset
59,502
How do I do sum of first k elements of a row of a Pascal's Triangle efficiently?
<p>More specifically, I want to:</p>&#xA;&#xA;<p>$^nC_0 + ^nC_1 + ^nC_2 + ..... + ^nC_k$</p>&#xA;&#xA;<p>I tried doing it linearly by calculating $^nC_{j+1}$ by multiplying $^nC_{j}$ with (n-j+1)/j.</p>&#xA;&#xA;<p>The answer it gives is correct for small numbers. Since n and k can be large, I need have keep modding wi...
algorithms combinatorics
1
How do I do sum of first k elements of a row of a Pascal's Triangle efficiently? -- (algorithms combinatorics) <p>More specifically, I want to:</p>&#xA;&#xA;<p>$^nC_0 + ^nC_1 + ^nC_2 + ..... + ^nC_k$</p>&#xA;&#xA;<p>I tried doing it linearly by calculating $^nC_{j+1}$ by multiplying $^nC_{j}$ with (n-j+1)/j.</p>&#xA;&#...
habedi/stack-exchange-dataset
59,506
What is the simplest known NP-Complete problem for testing P=NP solutions?
<p>About a year and a half ago I asked <a href="https://cs.stackexchange.com/q/35759/21051">this question</a> regarding <span class="math-container">$\mathsf{P}=\mathsf{NP}$</span>. The answers have helped me understand the problem tremendously and since then I've dabbled further into the topic.</p>&#xA;&#xA;<p>With t...
complexity theory np complete p vs np
1
What is the simplest known NP-Complete problem for testing P=NP solutions? -- (complexity theory np complete p vs np) <p>About a year and a half ago I asked <a href="https://cs.stackexchange.com/q/35759/21051">this question</a> regarding <span class="math-container">$\mathsf{P}=\mathsf{NP}$</span>. The answers have he...
habedi/stack-exchange-dataset
59,515
Binary rooted tree isomorphism
<p>My trees are rooted and have at most two children at every vertex. I need references that help me solve any or all of the questions below:</p>&#xA;&#xA;<ul>&#xA;<li>How many isomorphism classes of trees with n vertices are there?</li>&#xA;<li>What are the classical algorithms to decide if two given trees are isomorp...
algorithms graphs reference request combinatorics trees
1
Binary rooted tree isomorphism -- (algorithms graphs reference request combinatorics trees) <p>My trees are rooted and have at most two children at every vertex. I need references that help me solve any or all of the questions below:</p>&#xA;&#xA;<ul>&#xA;<li>How many isomorphism classes of trees with n vertices are th...
habedi/stack-exchange-dataset
59,520
Why isn't a binary counter used for generating $k$-combinations?
<p>I have been looking at algorithms that allow you to generate $k$-combinations of a given string.</p>&#xA;&#xA;<p>My question is that why isn't the algorithm used to generate <a href="https://en.wikipedia.org/wiki/Power_set#Representing_subsets_as_functions" rel="nofollow noreferrer">power sets</a> used to generate t...
algorithms strings enumeration
1
Why isn't a binary counter used for generating $k$-combinations? -- (algorithms strings enumeration) <p>I have been looking at algorithms that allow you to generate $k$-combinations of a given string.</p>&#xA;&#xA;<p>My question is that why isn't the algorithm used to generate <a href="https://en.wikipedia.org/wiki/Pow...
habedi/stack-exchange-dataset
59,521
On the fly manipulation of operators
<p>Assume that you are writing sorting algorithms, and that you want the ability to select between ascending and descending order. The only change required to do this for comparison sorts is to use the inverse of the comparison operator (for example: > becomes &lt;). This begs the question, why is it not possible to ch...
programming languages sorting api design
1
On the fly manipulation of operators -- (programming languages sorting api design) <p>Assume that you are writing sorting algorithms, and that you want the ability to select between ascending and descending order. The only change required to do this for comparison sorts is to use the inverse of the comparison operator ...
habedi/stack-exchange-dataset
59,524
Help in understanding how to apply nonlinear function in hashing
<p>Can somebody help in brainstorming how to apply the map as a hashing function?&#xA;I am aware that chaos is used in cryptography but I fail to understand how to apply it. Most popular hashing techniques is the modulo hash function <a href="https://cs.stackexchange.com/questions/11029/why-is-it-best-to-use-a-prime-nu...
mathematical foundations hashing
1
Help in understanding how to apply nonlinear function in hashing -- (mathematical foundations hashing) <p>Can somebody help in brainstorming how to apply the map as a hashing function?&#xA;I am aware that chaos is used in cryptography but I fail to understand how to apply it. Most popular hashing techniques is the modu...
habedi/stack-exchange-dataset
59,528
Why is Knapsack and ILP NP-complete
<p>I have a question concerning several NP-hard problems and why they are (or are not NP-complete).</p>&#xA;&#xA;<p>I understand the concepts behind NP-hard and NP-complete: Problem lies in NPC if it is NP-hard and also in NP (we can verify its solution in polynomial time).</p>&#xA;&#xA;<p>I know that <strong>Traveling...
complexity theory np complete np hard
1
Why is Knapsack and ILP NP-complete -- (complexity theory np complete np hard) <p>I have a question concerning several NP-hard problems and why they are (or are not NP-complete).</p>&#xA;&#xA;<p>I understand the concepts behind NP-hard and NP-complete: Problem lies in NPC if it is NP-hard and also in NP (we can verify ...
habedi/stack-exchange-dataset
59,545
What are the hardest problems that are in P if and only if P=NP?
<p>I used to think that NP complete problems are the "hardest" problems of all problems that would still be in P if P=NP. Now I think otherwise. What I'm asking is if there are any problems that are proved (/believed/maybe) to be harder than NP-Complete if $P\neq NP$, but are certainly in P if $P=NP$.</p>&#xA;&#xA;<p>I...
complexity theory np complete np hard
1
What are the hardest problems that are in P if and only if P=NP? -- (complexity theory np complete np hard) <p>I used to think that NP complete problems are the "hardest" problems of all problems that would still be in P if P=NP. Now I think otherwise. What I'm asking is if there are any problems that are proved (/beli...
habedi/stack-exchange-dataset
59,548
Why is particular token missing in LALR lookahead set?
<p>I ran the following grammar (pulled from the dragon book) in the Java Cup Eclipse plugin:</p>&#xA;&#xA;<pre><code>S' ::= S&#xA;S ::= L = R | R&#xA;L ::= * R | id&#xA;R ::= L&#xA;</code></pre>&#xA;&#xA;<p>The items associated with state 0 given in the Automaton View are as follows:</p>&#xA;&#xA;<pre><code>S ::= ⋅S, E...
parsers
1
Why is particular token missing in LALR lookahead set? -- (parsers) <p>I ran the following grammar (pulled from the dragon book) in the Java Cup Eclipse plugin:</p>&#xA;&#xA;<pre><code>S' ::= S&#xA;S ::= L = R | R&#xA;L ::= * R | id&#xA;R ::= L&#xA;</code></pre>&#xA;&#xA;<p>The items associated with state 0 given in th...
habedi/stack-exchange-dataset
59,557
Does every procedure have a structural equivalent?
<p>Suppose I have a basic mathematical function like:</p>&#xA;&#xA;<p>$ f(x) = x^2 + 2$</p>&#xA;&#xA;<p>implemented in typed pseudo-code as:</p>&#xA;&#xA;<pre><code>int f(x) {&#xA; return x*x + 2;&#xA;}&#xA;</code></pre>&#xA;&#xA;<p>If we were to break out this procedure into a step-by-step sequence of actions, we hav...
computability programming languages decision problem
1
Does every procedure have a structural equivalent? -- (computability programming languages decision problem) <p>Suppose I have a basic mathematical function like:</p>&#xA;&#xA;<p>$ f(x) = x^2 + 2$</p>&#xA;&#xA;<p>implemented in typed pseudo-code as:</p>&#xA;&#xA;<pre><code>int f(x) {&#xA; return x*x + 2;&#xA;}&#xA;</c...
habedi/stack-exchange-dataset
59,565
Would removing the branch delay slots change the instructions set architecture?
<p>I am trying to study for an exam and I noticed a lot of the questions follow the idea of "Changing the <a href="https://en.wikipedia.org/wiki/Instruction_set" rel="nofollow">ISA</a>". From my understanding the ISA dictates the structure and format of instructions, so changing instructions or the format (32 to 64 bi...
computer architecture cpu
1
Would removing the branch delay slots change the instructions set architecture? -- (computer architecture cpu) <p>I am trying to study for an exam and I noticed a lot of the questions follow the idea of "Changing the <a href="https://en.wikipedia.org/wiki/Instruction_set" rel="nofollow">ISA</a>". From my understanding...
habedi/stack-exchange-dataset
59,576
How to Trace Path in Proof that Regular Languages are Closed Under Reversal
<p>I'm self studying automata theory and I need help with proving that regular languages are closed under reversal.</p>&#xA;&#xA;<p>I have a basic proof, but am unsure about last statement in my proof. Is this sufficient? Could you help me explain why it works? Is it rigorous enough?</p>&#xA;&#xA;<p>Problem:&#xA;For an...
formal languages regular languages automata finite automata closure properties
1
How to Trace Path in Proof that Regular Languages are Closed Under Reversal -- (formal languages regular languages automata finite automata closure properties) <p>I'm self studying automata theory and I need help with proving that regular languages are closed under reversal.</p>&#xA;&#xA;<p>I have a basic proof, but am...
habedi/stack-exchange-dataset
59,580
Computing maximum-cost subtree that uses at most k edges
<p>I'm looking for an efficient algorithm for the following problem:</p>&#xA;&#xA;<p>Input: a binary, complete tree with a cost on each edge, an integer $k$<br>&#xA;Output: the maximum-cost subtree containing $\le k$ edges</p>&#xA;&#xA;<p>For purposes of this problem, a subtree is defined to be a connected subset of ed...
algorithms graphs optimization trees
1
Computing maximum-cost subtree that uses at most k edges -- (algorithms graphs optimization trees) <p>I'm looking for an efficient algorithm for the following problem:</p>&#xA;&#xA;<p>Input: a binary, complete tree with a cost on each edge, an integer $k$<br>&#xA;Output: the maximum-cost subtree containing $\le k$ edge...
habedi/stack-exchange-dataset
59,583
It is necessary to minimize the functional
<p>Consider the town as a grid $N$ x $N$. Thus, there are $(N+1)(N+1)$ of junctions and $2N(N+1)$ two-way roads. Every intersection has a height. It is known that the upper left intersection has a height of $0$, and the lower right the height $1$. For each road we know how many people go in each direction on this road....
optimization network flow max flow
1
It is necessary to minimize the functional -- (optimization network flow max flow) <p>Consider the town as a grid $N$ x $N$. Thus, there are $(N+1)(N+1)$ of junctions and $2N(N+1)$ two-way roads. Every intersection has a height. It is known that the upper left intersection has a height of $0$, and the lower right the h...
habedi/stack-exchange-dataset
59,597
About the MNIST data-set
<p>Is this known as a fact or from some analysis that the MNIST data-set is almost as if its sampled from some low (~10?) dimensional manifold? Is there a locally linear embedding to a low-dimensional space? Of course I don't expect the data will be exactly on some low dimensional manifold; there will be some noise.</...
reference request machine learning data mining data sets
1
About the MNIST data-set -- (reference request machine learning data mining data sets) <p>Is this known as a fact or from some analysis that the MNIST data-set is almost as if its sampled from some low (~10?) dimensional manifold? Is there a locally linear embedding to a low-dimensional space? Of course I don't expect...
habedi/stack-exchange-dataset
59,618
Two recurrences for the change-making problem with repetition
<p>The change-making problem with unbounded repetition is:</p>&#xA;&#xA;<blockquote>&#xA; <ul>&#xA; <li>Input: Unlimited quantities of coins with values $x_1, \ldots, x_n$ and an amount $v$.</li>&#xA; <li>Output: Can the given $v$ amount of money be made with these coins?</li>&#xA; </ul>&#xA;</blockquote>&#xA;&#xA;...
algorithms recurrence relation dynamic programming knapsack problems
1
Two recurrences for the change-making problem with repetition -- (algorithms recurrence relation dynamic programming knapsack problems) <p>The change-making problem with unbounded repetition is:</p>&#xA;&#xA;<blockquote>&#xA; <ul>&#xA; <li>Input: Unlimited quantities of coins with values $x_1, \ldots, x_n$ and an amo...
habedi/stack-exchange-dataset
59,625
Numerical stability of linear interpolation
<p>Is one of these two functions more numerically stable than the other?</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>def interpolate_a(x, y, z):&#xA; return y + (z - y) * x&#xA;&#xA;&#xA;def interpolate_b(x, y, z):&#xA; return y * (1 - x) + z * x&#xA;</code></pre>&#xA;&#xA;<p>If so, which one is ...
number theory numerical algorithms
1
Numerical stability of linear interpolation -- (number theory numerical algorithms) <p>Is one of these two functions more numerically stable than the other?</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>def interpolate_a(x, y, z):&#xA; return y + (z - y) * x&#xA;&#xA;&#xA;def interpolate_b(x, y, z):&#...
habedi/stack-exchange-dataset
59,642
Resource bounded reductions for RE-Complete problems
<p>Given that the halting problem is RE-Complete, we can reduce any problem in RE to an instance of the halting problem. Are there are any results on the time-bounds for this reduction? Can we do this reduction in polynomial time in general? Exponential time? Polynomial space?</p>&#xA;&#xA;<p>On the surface, defining a...
complexity theory polynomial time halting problem oracle machines
1
Resource bounded reductions for RE-Complete problems -- (complexity theory polynomial time halting problem oracle machines) <p>Given that the halting problem is RE-Complete, we can reduce any problem in RE to an instance of the halting problem. Are there are any results on the time-bounds for this reduction? Can we do ...
habedi/stack-exchange-dataset
59,647
Is the punctuation part of the alphabet?
<p>Given a language $L \subseteq \Sigma^*$, (it could be Italian, English, C++ or anything else), should we consider the punctuation (".", ";", "->") as a part of the alphabet&nbsp;$\Sigma$ upon the language is built on or not?</p>&#xA;
formal languages programming languages
1
Is the punctuation part of the alphabet? -- (formal languages programming languages) <p>Given a language $L \subseteq \Sigma^*$, (it could be Italian, English, C++ or anything else), should we consider the punctuation (".", ";", "->") as a part of the alphabet&nbsp;$\Sigma$ upon the language is built on or not?</p>&#xA...
habedi/stack-exchange-dataset
59,651
Knapsack: there is a polynomial solution in bit terms?
<p>I'm reading about Knapsack problem. The approaches to solve that I found:</p>&#xA;&#xA;<ul>&#xA;<li>Branch and bound</li>&#xA;<li>Brute force</li>&#xA;<li>Dynamic programming</li>&#xA;<li>Memory functions</li>&#xA;<li>Greedy</li>&#xA;</ul>&#xA;&#xA;<p>All solutions have exponential time in terms of bits. There is a ...
time complexity np complete knapsack problems
1
Knapsack: there is a polynomial solution in bit terms? -- (time complexity np complete knapsack problems) <p>I'm reading about Knapsack problem. The approaches to solve that I found:</p>&#xA;&#xA;<ul>&#xA;<li>Branch and bound</li>&#xA;<li>Brute force</li>&#xA;<li>Dynamic programming</li>&#xA;<li>Memory functions</li>&#...
habedi/stack-exchange-dataset
59,665
Martin-Löf randomness characterization
<p>In his 1973 paper <a href="http://www.cs.bu.edu/fac/lnd/dvi/ran72.pdf" rel="nofollow">On the notion of a random sequence</a>, Levin states (without proving) a characterization of Martin-Löf randomness by writing</p>&#xA;&#xA;<blockquote>&#xA; <p><strong>Theorem 3.</strong> A sequence $\alpha$ is random w.r.t. the d...
randomness kolmogorov complexity
1
Martin-Löf randomness characterization -- (randomness kolmogorov complexity) <p>In his 1973 paper <a href="http://www.cs.bu.edu/fac/lnd/dvi/ran72.pdf" rel="nofollow">On the notion of a random sequence</a>, Levin states (without proving) a characterization of Martin-Löf randomness by writing</p>&#xA;&#xA;<blockquote>&#x...
habedi/stack-exchange-dataset
59,681
Why the Smallest Operable Data Type in Most Programming Languages Is One-Byte Sized?
<p>Why the smallest operable data type in most programming languages is one-byte sized? Is it possible that to operate with a single bit? If it is possible, how to do it in practical?</p>&#xA;
programming languages computer architecture
1
Why the Smallest Operable Data Type in Most Programming Languages Is One-Byte Sized? -- (programming languages computer architecture) <p>Why the smallest operable data type in most programming languages is one-byte sized? Is it possible that to operate with a single bit? If it is possible, how to do it in practical?</p...
habedi/stack-exchange-dataset
59,684
Why do we use multiple data structures?
<p>I'm studying elementary data structures like Linked List, Doubly Linked List and Binary Trees like Binary Search Trees.</p>&#xA;&#xA;<p>Both runs in worst case O(n) in the same operations, so why don't we use only one data structure?</p>&#xA;
algorithms algorithm analysis linked lists binary search trees
1
Why do we use multiple data structures? -- (algorithms algorithm analysis linked lists binary search trees) <p>I'm studying elementary data structures like Linked List, Doubly Linked List and Binary Trees like Binary Search Trees.</p>&#xA;&#xA;<p>Both runs in worst case O(n) in the same operations, so why don't we use...
habedi/stack-exchange-dataset
59,686
How to prove that a language $A$ is decidable?
<p>How to prove: A language $A$ is decidable $\Leftrightarrow$ if there is a turing machine which lists $A$ in a word length alphabetically ordering. </p>&#xA;&#xA;<p>Word length alphabetically means a sorting first after the word length and then after the character ordering $(\epsilon,a,b,aa,ab,ba,bb, ...)$.</p>&#xA;&...
formal languages proof techniques decision problem
1
How to prove that a language $A$ is decidable? -- (formal languages proof techniques decision problem) <p>How to prove: A language $A$ is decidable $\Leftrightarrow$ if there is a turing machine which lists $A$ in a word length alphabetically ordering. </p>&#xA;&#xA;<p>Word length alphabetically means a sorting first a...
habedi/stack-exchange-dataset
59,690
Is this probability distribution data structure already discovered?
<p><strong>Problem formulation</strong></p>&#xA;&#xA;<p>I have implemented an interesting probability distribution data structure: having $n$ elements $a_1, a_2, \dots, a_n$ in the data structure with respective positive weights $w_1, w_2, \dots, w_n &gt; 0$, upon request each $a_i$ may be returned with probability &#x...
algorithms data structures reference request
1
Is this probability distribution data structure already discovered? -- (algorithms data structures reference request) <p><strong>Problem formulation</strong></p>&#xA;&#xA;<p>I have implemented an interesting probability distribution data structure: having $n$ elements $a_1, a_2, \dots, a_n$ in the data structure with r...
habedi/stack-exchange-dataset
59,692
Equality of cardinality of maximum matching and minimum vertex cover in general
<p>I'm preparing for exam and I came across this problem:</p>&#xA;&#xA;<blockquote>&#xA; <p>We say that a graph is <em>König's graph</em> when the sizes of its minimum vertex cover and maximum matching are equal. Find a polynomial time algorithm deciding if a graph is <em>König's graph</em>.</p>&#xA;</blockquote>&#xA;...
algorithms polynomial time matching
1
Equality of cardinality of maximum matching and minimum vertex cover in general -- (algorithms polynomial time matching) <p>I'm preparing for exam and I came across this problem:</p>&#xA;&#xA;<blockquote>&#xA; <p>We say that a graph is <em>König's graph</em> when the sizes of its minimum vertex cover and maximum match...
habedi/stack-exchange-dataset
59,693
How to handle an undefined case with µ-recursive functions?
<p>How to construct my proof and generally what should I aim to get when showing a function is $\mu$-recursive? Should I transform it in some of the basic functions using the given <a href="https://en.wikipedia.org/wiki/%CE%9C-recursive_function#Equivalence_with_other_models_of_computability" rel="nofollow">operators</...
computability turing machines proof techniques recursion primitive recursion
1
How to handle an undefined case with µ-recursive functions? -- (computability turing machines proof techniques recursion primitive recursion) <p>How to construct my proof and generally what should I aim to get when showing a function is $\mu$-recursive? Should I transform it in some of the basic functions using the giv...
habedi/stack-exchange-dataset
59,711
Type-system combining type-states and typed effects?
<p>Has anyone succeeded in implementing or designing a type-system that combines both type-state (linear types) and effect types (e.g. <a href="http://research.microsoft.com/en-us/projects/koka/" rel="noreferrer">Koka</a>)?</p>&#xA;
reference request type theory
1
Type-system combining type-states and typed effects? -- (reference request type theory) <p>Has anyone succeeded in implementing or designing a type-system that combines both type-state (linear types) and effect types (e.g. <a href="http://research.microsoft.com/en-us/projects/koka/" rel="noreferrer">Koka</a>)?</p>&#xA;
habedi/stack-exchange-dataset
59,720
Can this algorithm still be considered a Binary Search algorithm?
<p>While doing the second <a href="http://codekata.com/kata/kata02-karate-chop/">code kata</a> (which asks you to implement a binary search algorithm five times, each time with a different method), I've come up with a slightly different solution which works as follows:</p>&#xA;&#xA;<p>If i have a sorted array of lenght...
algorithms terminology search algorithms binary search
1
Can this algorithm still be considered a Binary Search algorithm? -- (algorithms terminology search algorithms binary search) <p>While doing the second <a href="http://codekata.com/kata/kata02-karate-chop/">code kata</a> (which asks you to implement a binary search algorithm five times, each time with a different metho...
habedi/stack-exchange-dataset
59,724
Go Back N ARQ Question
<p>I am a computer science under graduation student, and was going through some Go Back N ARQ (Computer Networking) videos on YouTube, and got a doubt in a question, which according to me should have a different answer than what the instructor on the video is arriving at (given that no other comment in the comments sec...
computer networks
1
Go Back N ARQ Question -- (computer networks) <p>I am a computer science under graduation student, and was going through some Go Back N ARQ (Computer Networking) videos on YouTube, and got a doubt in a question, which according to me should have a different answer than what the instructor on the video is arriving at (g...
habedi/stack-exchange-dataset
59,728
How is the oracle function for Grover's Search algorithm obtained?
<p>I've been using the IBM quantum experience to learn about and simulate Grover's algorithm. When they create the algorithm, they use a different set of gates depending on which oracle function $f(x)$ they want to use. In other words, they are explicitly putting in a set of gates of what they want to find before they ...
search algorithms quantum computing
1
How is the oracle function for Grover's Search algorithm obtained? -- (search algorithms quantum computing) <p>I've been using the IBM quantum experience to learn about and simulate Grover's algorithm. When they create the algorithm, they use a different set of gates depending on which oracle function $f(x)$ they want ...
habedi/stack-exchange-dataset
59,736
Community detection in weighted directed graphs for fixed number of communities
<p>I have a weighted directed graph $G=(V,E)$ with positive weights. Say these vertices represent cities and the weight $w : V_1 \rightarrow V_2$ represents number of students moving into other cities for college. Note here that a city $A$ may have a small population and it may be sending a major proportion of it's out...
algorithms cluster clustering
1
Community detection in weighted directed graphs for fixed number of communities -- (algorithms cluster clustering) <p>I have a weighted directed graph $G=(V,E)$ with positive weights. Say these vertices represent cities and the weight $w : V_1 \rightarrow V_2$ represents number of students moving into other cities for ...
habedi/stack-exchange-dataset
59,738
Is there any difference between extensible records and dependent maps
<p>In a typed setting, records can be thought of as a map from field to type. If there is a well-typed record merge operation (which allows overlapping fields), is there any real difference between the resulting type and a dependent map in a dependently typed language?</p>&#xA;
type theory dependent types
1
Is there any difference between extensible records and dependent maps -- (type theory dependent types) <p>In a typed setting, records can be thought of as a map from field to type. If there is a well-typed record merge operation (which allows overlapping fields), is there any real difference between the resulting type ...
habedi/stack-exchange-dataset
59,741
How to match two sets of points based on the closeset distance?
<p>I have a set of points (tiny triangles) $K=\{1,2,\ldots, k\}$ and a set points (tiny circles) $N=\{1,2,\ldots, n\}$ and a matrix of positive real values $\mathbf{D}=\left[d_{ij}\right]$ for all $i\in K$ and for all $j\in N$. The entry of the matrix $d_{ij}$ can be viewed as the Euclidean distance between triangle $i...
algorithms assignment problem
1
How to match two sets of points based on the closeset distance? -- (algorithms assignment problem) <p>I have a set of points (tiny triangles) $K=\{1,2,\ldots, k\}$ and a set points (tiny circles) $N=\{1,2,\ldots, n\}$ and a matrix of positive real values $\mathbf{D}=\left[d_{ij}\right]$ for all $i\in K$ and for all $j\...
habedi/stack-exchange-dataset
59,747
Simple regular expression problem
<p>new to automata theory and this is quite difficult for me so I'd appreciate a hint in the right direction if possible.</p>&#xA;&#xA;<p>We want to find a regular expression for the language $L$ over $\Sigma = {a,b,c}$ where $L$ is the language of all strings of even length, contain $a$ at least once, and after the fi...
automata finite automata regular expressions
1
Simple regular expression problem -- (automata finite automata regular expressions) <p>new to automata theory and this is quite difficult for me so I'd appreciate a hint in the right direction if possible.</p>&#xA;&#xA;<p>We want to find a regular expression for the language $L$ over $\Sigma = {a,b,c}$ where $L$ is the...
habedi/stack-exchange-dataset
59,749
python, learn from users erros// multiple choice quiz
<p>I am making a multiple choice quiz however I am finding difficulty on how to impletement a machine learning algrithm of somesort where by it can see which questions the user gets wrong and make a custom quiz for them for those questions.</p>&#xA;&#xA;<p>many thanks</p>&#xA;
algorithms machine learning
1
python, learn from users erros// multiple choice quiz -- (algorithms machine learning) <p>I am making a multiple choice quiz however I am finding difficulty on how to impletement a machine learning algrithm of somesort where by it can see which questions the user gets wrong and make a custom quiz for them for those que...
habedi/stack-exchange-dataset
59,750
Is there any study or theory behind combining binary search and interpolation search?
<p>I just read <a href="https://cs.stackexchange.com/questions/59720/can-this-algorithm-still-be-considered-a-binary-search-algorithm">Can this algorithm still be considered a Binary Search algorithm?</a> and recalled that a few years back I wrote an indexer/search for log files to find log entries in large plain text ...
algorithms search algorithms binary search
1
Is there any study or theory behind combining binary search and interpolation search? -- (algorithms search algorithms binary search) <p>I just read <a href="https://cs.stackexchange.com/questions/59720/can-this-algorithm-still-be-considered-a-binary-search-algorithm">Can this algorithm still be considered a Binary Sea...
habedi/stack-exchange-dataset
59,758
Converting a non-planar graph to planar
<p>Suppose that we have a non-planar graph $G$ which is undirected and connected. Our aim is to remove a set of edges and/or a set of vertices and convert make $G$ planar while keeping the connectedness.</p>&#xA;&#xA;<p>Besides connectedness, $G$ is guaranteed to have enough connectivity so that removal of a reasonably...
graphs reference request planar graphs
1
Converting a non-planar graph to planar -- (graphs reference request planar graphs) <p>Suppose that we have a non-planar graph $G$ which is undirected and connected. Our aim is to remove a set of edges and/or a set of vertices and convert make $G$ planar while keeping the connectedness.</p>&#xA;&#xA;<p>Besides connecte...
habedi/stack-exchange-dataset
59,763
Difference between word logical addressing and byte logical addressing in this exercise?
<p>I´m new here and this is the first question I´m posting (hopefully this is the correct site). </p>&#xA;&#xA;<p>I have the exercise below:<br>&#xA;Consider a virtual address space of 10 pages of 1024 words each (1 word = 2 bytes), mapped onto a physical memory of 32 frames. How many bits are needeed for each virtual...
operating systems virtual memory
1
Difference between word logical addressing and byte logical addressing in this exercise? -- (operating systems virtual memory) <p>I´m new here and this is the first question I´m posting (hopefully this is the correct site). </p>&#xA;&#xA;<p>I have the exercise below:<br>&#xA;Consider a virtual address space of 10 page...
habedi/stack-exchange-dataset
59,766
Rules to follow to create edges in graph
<p>I am currently writing a graph object in Swift, I see that there are different types of graphs, some that are undirected and some that are directed. Here are my questions :</p>&#xA;&#xA;<ul>&#xA;<li>Can a graph be both directed and undirected, is there a specific name for such graph?</li>&#xA;<li>What is the common ...
graphs
1
Rules to follow to create edges in graph -- (graphs) <p>I am currently writing a graph object in Swift, I see that there are different types of graphs, some that are undirected and some that are directed. Here are my questions :</p>&#xA;&#xA;<ul>&#xA;<li>Can a graph be both directed and undirected, is there a specific ...
habedi/stack-exchange-dataset
59,775
Generalized sorting algorithm on partially ordered set generated by a relation
<p>Assume we have a finite set $X$ of elements and any relation $\preceq$ on $X$. Such a relation may or may not generate a reflexive transitive anti-symmetric relation $\leq$ on $X$ (a partial order). Recall:</p>&#xA;&#xA;<p><em>reflexive</em>: We always have $x\leq x$.</p>&#xA;&#xA;<p><em>transitive</em>: If $x\leq y...
algorithms sorting partial order
1
Generalized sorting algorithm on partially ordered set generated by a relation -- (algorithms sorting partial order) <p>Assume we have a finite set $X$ of elements and any relation $\preceq$ on $X$. Such a relation may or may not generate a reflexive transitive anti-symmetric relation $\leq$ on $X$ (a partial order). R...
habedi/stack-exchange-dataset
59,776
Is Euler's totient function a primitive recursive function?
<p>We consider the function $g$ which associates the number of prime integers with $n$ in the set $\{0,...,n\}$. I have to prove that $g$ is a primitive recursive function.</p>&#xA;&#xA;<p>First I defined the set $A=\{i∈\{0,...,n\}:\gcd(i,n)=1\}$. To show that $A$ is a primitive recursive set I said that : $\{0,...,n\}...
computability primitive recursion
1
Is Euler's totient function a primitive recursive function? -- (computability primitive recursion) <p>We consider the function $g$ which associates the number of prime integers with $n$ in the set $\{0,...,n\}$. I have to prove that $g$ is a primitive recursive function.</p>&#xA;&#xA;<p>First I defined the set $A=\{i∈\...
habedi/stack-exchange-dataset
59,793
Poly-time reduction from HAMPATH to HAMPATH-E
<p>I need to prove that &#xA;HAMPATH-e = { &lt; G,s,t,e > | G is directed graph, s, t are vertices and e a edge }&#xA;there is hamiltonian path between s to t that cross the edge e&#xA;is an NP complete.&#xA;i've already prove it's in NP.&#xA;now i need to show poly-time reduction from HAMPATH to HAMPATH-e but i cant f...
complexity theory np complete reductions
1
Poly-time reduction from HAMPATH to HAMPATH-E -- (complexity theory np complete reductions) <p>I need to prove that &#xA;HAMPATH-e = { &lt; G,s,t,e > | G is directed graph, s, t are vertices and e a edge }&#xA;there is hamiltonian path between s to t that cross the edge e&#xA;is an NP complete.&#xA;i've already prove i...
habedi/stack-exchange-dataset
59,800
Concatenation of $a^p$ and $a^m$ where $p$ and $m$ are primes, is irregular?
<p>I believe that the concatenation $a^pa^m$ where $p$ and $m$ are primes is not regular, since I can show that $a^p$ is not regular using the pumping lemma, therefore there is no NFA for the 1st part, therefore the concatenation cannot be regular (I.e. there is no NFA to do the lambda transition)</p>&#xA;&#xA;<p>Is th...
formal languages regular languages
1
Concatenation of $a^p$ and $a^m$ where $p$ and $m$ are primes, is irregular? -- (formal languages regular languages) <p>I believe that the concatenation $a^pa^m$ where $p$ and $m$ are primes is not regular, since I can show that $a^p$ is not regular using the pumping lemma, therefore there is no NFA for the 1st part, t...
habedi/stack-exchange-dataset
59,811
How do you call alternatives in the grammatical productions?
<p>I have encountered a question, which asks <a href="https://stackoverflow.com/questions/26885679/definition-of-the-term-syntactic-form">what is a <em>syntactic form</em></a>. This motivated me to ask myself, what is the <a href="https://cs.stackexchange.com/questions/51107/anatomy-of-a-production-rule">anatomy of the...
terminology formal grammars
1
How do you call alternatives in the grammatical productions? -- (terminology formal grammars) <p>I have encountered a question, which asks <a href="https://stackoverflow.com/questions/26885679/definition-of-the-term-syntactic-form">what is a <em>syntactic form</em></a>. This motivated me to ask myself, what is the <a h...
habedi/stack-exchange-dataset
59,828
How many pages does the page table require?
<p>I have found this exercise on the Internet but I´m having problems with sections 4 and 5, because I don´t understand where do the solutions appear from.</p>&#xA;&#xA;<p><strong>Example: Mapping VAs to PAs</strong></p>&#xA;&#xA;<p><strong>Suppose</strong><br>&#xA; - Virtual memory of 2^32 bytes<br>&#xA; - Physical me...
operating systems virtual memory
1
How many pages does the page table require? -- (operating systems virtual memory) <p>I have found this exercise on the Internet but I´m having problems with sections 4 and 5, because I don´t understand where do the solutions appear from.</p>&#xA;&#xA;<p><strong>Example: Mapping VAs to PAs</strong></p>&#xA;&#xA;<p><stro...
habedi/stack-exchange-dataset
59,829
Is it possible to prevent arithmetic errors with a dependent type system?
<p>In a functional programming language I have functions like &#xA;$$f\colon Int \times Int \times \cdots \times Int \to Int$$ which do some computation. However for certain arguments $(x_0, \dots, x_n)$ the function will cause arithmetic errors like <em>Integer overflows</em>, <em>Integer underflow</em> or even <em>Di...
programming languages functional programming dependent types
1
Is it possible to prevent arithmetic errors with a dependent type system? -- (programming languages functional programming dependent types) <p>In a functional programming language I have functions like &#xA;$$f\colon Int \times Int \times \cdots \times Int \to Int$$ which do some computation. However for certain argume...
habedi/stack-exchange-dataset
59,832
Data Flow Analysis with exceptions
<p>Data flow analysis work over a control flow graph. When a language under consideration supports exceptions, control flow graph can explode. </p>&#xA;&#xA;<p>What are the standard techniques for dealing with this blow-up?&#xA;Can we soundly disregard edges induced by exception? Data flow analyses anyhow compute over-...
programming languages program optimization software verification
1
Data Flow Analysis with exceptions -- (programming languages program optimization software verification) <p>Data flow analysis work over a control flow graph. When a language under consideration supports exceptions, control flow graph can explode. </p>&#xA;&#xA;<p>What are the standard techniques for dealing with this ...
habedi/stack-exchange-dataset
59,842
A question on the power of the operator in Grover's quantum algoritm
<p>I'm new to quantum computing, so while studying Grover's algorithm I (and, I think a lot of other people too) could not help but notice that exactly the same operator is applied $\sqrt{N}$ times:</p>&#xA;&#xA;<p>$$U = [2 \left| \psi \right&gt; \left&lt;\psi \right| - I ]\mathcal{O} $$</p>&#xA;&#xA;<p>Of course, it d...
quantum computing
1
A question on the power of the operator in Grover's quantum algoritm -- (quantum computing) <p>I'm new to quantum computing, so while studying Grover's algorithm I (and, I think a lot of other people too) could not help but notice that exactly the same operator is applied $\sqrt{N}$ times:</p>&#xA;&#xA;<p>$$U = [2 \lef...
habedi/stack-exchange-dataset
59,843
Qualifications for a problem to be solved as a single source shortest path problem
<p>What are the pre-conditions for any problem X to be qualified for being solved in a single source shortest path problem (SSSP) setting?</p>&#xA;&#xA;<p>Lets, say we have a problem X. What should be the pre-conditions that we check in problem X definition that would allow us to formulate it as a SSSP. </p>&#xA;&#xA;<...
graphs shortest path
1
Qualifications for a problem to be solved as a single source shortest path problem -- (graphs shortest path) <p>What are the pre-conditions for any problem X to be qualified for being solved in a single source shortest path problem (SSSP) setting?</p>&#xA;&#xA;<p>Lets, say we have a problem X. What should be the pre-co...
habedi/stack-exchange-dataset
59,862
A multi-user, multi-processing operating system cannot be implemented on hardware that does not support
<p>A multi-user, multi-processing operating system cannot be implemented on hardware that does not support</p>&#xA;&#xA;<ol>&#xA;<li>Address translation</li>&#xA;<li>DMA for disk transfer</li>&#xA;<li>At least two modes of CPU execution (privileged and non-privileged)</li>&#xA;<li>Demand paging</li>&#xA;</ol>&#xA;&#xA;...
computer architecture operating systems cpu
1
A multi-user, multi-processing operating system cannot be implemented on hardware that does not support -- (computer architecture operating systems cpu) <p>A multi-user, multi-processing operating system cannot be implemented on hardware that does not support</p>&#xA;&#xA;<ol>&#xA;<li>Address translation</li>&#xA;<li>D...
habedi/stack-exchange-dataset
59,863
How does TCP manage to discard segment received from a source other than the one with which the connection has been established?
<p>It is known that TCP is a connection <em>oriented</em> transport layer protocol of the TCP/IP suite. But TCP (and UDP) operate over a connection <em>less</em> network layer protocol, the IP (internet protocol). What this means is that in TCP, if a sender sends data to the receiver, at the network layer, the receiver...
computer networks communication protocols
1
How does TCP manage to discard segment received from a source other than the one with which the connection has been established? -- (computer networks communication protocols) <p>It is known that TCP is a connection <em>oriented</em> transport layer protocol of the TCP/IP suite. But TCP (and UDP) operate over a connect...
habedi/stack-exchange-dataset
59,869
Comparison of running times: Determine largest n to run in given time
<p>I am browsing the "Introduction to Algorithms" book by Thomas H. Cormen. One of the very first tasks in the introduction chapter gives a couple of running time functions like</p>&#xA;&#xA;<pre><code>f(n)=lg n&#xA;f(n)=n!&#xA;f(n)=2^n&#xA;</code></pre>&#xA;&#xA;<p>and the following durations: 1second, 1minute, 1hour,...
time complexity
1
Comparison of running times: Determine largest n to run in given time -- (time complexity) <p>I am browsing the "Introduction to Algorithms" book by Thomas H. Cormen. One of the very first tasks in the introduction chapter gives a couple of running time functions like</p>&#xA;&#xA;<pre><code>f(n)=lg n&#xA;f(n)=n!&#xA;f...
habedi/stack-exchange-dataset
59,874
Zero-based array implementation with logarithmic insertion time
<p>Normal zero-based arrays (ie not those with a sort order) have constant lookup time, but linear insertion time.</p>&#xA;&#xA;<p>For a specific problem I was musing about a balanced tree that would allow for an zero-based array implementation with logarithmic time for all of the following operations: insertion, remov...
data structures binary trees balanced search trees
1
Zero-based array implementation with logarithmic insertion time -- (data structures binary trees balanced search trees) <p>Normal zero-based arrays (ie not those with a sort order) have constant lookup time, but linear insertion time.</p>&#xA;&#xA;<p>For a specific problem I was musing about a balanced tree that would ...
habedi/stack-exchange-dataset
59,885
Correct way to implement linked list
<p>I'm doing <a href="https://www.hackerrank.com/challenges/30-linked-list?h_r=next-challenge&amp;h_v=zen" rel="nofollow">this challenge</a> on Hacker Rank that wants me to implement a linked list.</p>&#xA;&#xA;<p>It seems to want me to find the last-added instance of node and change its head to link to my new instance...
data structures linked lists
1
Correct way to implement linked list -- (data structures linked lists) <p>I'm doing <a href="https://www.hackerrank.com/challenges/30-linked-list?h_r=next-challenge&amp;h_v=zen" rel="nofollow">this challenge</a> on Hacker Rank that wants me to implement a linked list.</p>&#xA;&#xA;<p>It seems to want me to find the las...
habedi/stack-exchange-dataset
59,886
Is intersection of regular language and context free language is "always" context free language
<p>I have read that intersection of regular language and context-free language is always context-free. Most of the places an standard example has been used to prove this, e.g., &#xA;\begin{align*}&#xA;L_1 &amp;= L(a^*b^*)\\&#xA;L_2 &amp;= \{a^nb^n\mid n\geq 0\} \quad\text{(which is context free)}\\&#xA;L_1\cap L_2 &amp...
formal languages regular languages context free closure properties
1
Is intersection of regular language and context free language is "always" context free language -- (formal languages regular languages context free closure properties) <p>I have read that intersection of regular language and context-free language is always context-free. Most of the places an standard example has been u...
habedi/stack-exchange-dataset
59,905
When reducing from HALT, can you create a Turing machine that asks whether a simulation stops?
<p>Lets say I am doing a reduction from $\mathrm{HALT}_{\mathrm{TM}}$ to another language $S$, in order to prove that $S$ is not decidable. For this I need to build a new Turing machine, $M'$. Can I create $M'$ in such a way that the next step is depended upon whether or not a simulation stops? Take the following two e...
computability reductions proof techniques halting problem
1
When reducing from HALT, can you create a Turing machine that asks whether a simulation stops? -- (computability reductions proof techniques halting problem) <p>Lets say I am doing a reduction from $\mathrm{HALT}_{\mathrm{TM}}$ to another language $S$, in order to prove that $S$ is not decidable. For this I need to bui...
habedi/stack-exchange-dataset
59,914
Amortised analysis of binary heap insert and delete-min
<p>I'm trying to figure out how to do amortised analysis of heap insert and heap delete-min using potential function. </p>&#xA;&#xA;<p>We can assume, that insert is <em>O(logn)</em> and delete-min is <em>O(logn)</em> too.</p>&#xA;&#xA;<p>The goal is to prove, that amortised price of insert is <em>O(logn)</em> and amort...
algorithm analysis data structures runtime analysis heaps amortized analysis
1
Amortised analysis of binary heap insert and delete-min -- (algorithm analysis data structures runtime analysis heaps amortized analysis) <p>I'm trying to figure out how to do amortised analysis of heap insert and heap delete-min using potential function. </p>&#xA;&#xA;<p>We can assume, that insert is <em>O(logn)</em> ...
habedi/stack-exchange-dataset
59,917
Repeated point in polygon: preprocessing complexity given logarithmic query time?
<p>I am interested in the repeated point in polygon problem, where one is given a polygon in a preprocessing phase and in the online phase, one is asked whether a point is in that polygon. The polygon is not necessarily simple. I am interested in the case where a polygon has many edges.</p>&#xA;&#xA;<p>Let $n$ be the n...
algorithms computational geometry polygons
1
Repeated point in polygon: preprocessing complexity given logarithmic query time? -- (algorithms computational geometry polygons) <p>I am interested in the repeated point in polygon problem, where one is given a polygon in a preprocessing phase and in the online phase, one is asked whether a point is in that polygon. T...
habedi/stack-exchange-dataset
59,932
What is an example for a decidable language not in P?
<p>I'm having trouble showing that $P\neq R$. Obviously $P\subseteq R$, but is there a decidable language which is definitely not (under all answers to open questions s.t. $P=NP$ or $NP=PSPACE$) in $P$ ?</p>&#xA;
complexity theory polynomial time
1
What is an example for a decidable language not in P? -- (complexity theory polynomial time) <p>I'm having trouble showing that $P\neq R$. Obviously $P\subseteq R$, but is there a decidable language which is definitely not (under all answers to open questions s.t. $P=NP$ or $NP=PSPACE$) in $P$ ?</p>&#xA;
habedi/stack-exchange-dataset
59,942
What is the compleixty of this algorithm?
<p>The algorithm is as follows:</p>&#xA;&#xA;<pre><code>a = rand % a random number between 0 and 1&#xA;b = a&#xA;while b == a&#xA; b = rand&#xA;end&#xA;</code></pre>&#xA;&#xA;<p>Here <code>rand</code> is a function that returns a random number, generated uniformly, between 0 and 1. Let us say that this is the <a hr...
algorithm analysis runtime analysis
1
What is the compleixty of this algorithm? -- (algorithm analysis runtime analysis) <p>The algorithm is as follows:</p>&#xA;&#xA;<pre><code>a = rand % a random number between 0 and 1&#xA;b = a&#xA;while b == a&#xA; b = rand&#xA;end&#xA;</code></pre>&#xA;&#xA;<p>Here <code>rand</code> is a function that returns a ran...
habedi/stack-exchange-dataset
59,945
Shorten Length Reduction
<p>I've stumbled upon this Question: </p>&#xA;&#xA;<ul>&#xA;<li>We say that a reduction $f$ of a language $A$ to a language $B$ is a Shorten length reduction, if there exists a number $ n\in N $ s.t for every &#xA;$ w\in A $, s.t if $ |w| \geq n \ than \ |f(w)| &lt; |w| $. Also, $A,B \notin \{\Sigma^*,\emptyset \} $. ...
complexity theory reductions polynomial time
1
Shorten Length Reduction -- (complexity theory reductions polynomial time) <p>I've stumbled upon this Question: </p>&#xA;&#xA;<ul>&#xA;<li>We say that a reduction $f$ of a language $A$ to a language $B$ is a Shorten length reduction, if there exists a number $ n\in N $ s.t for every &#xA;$ w\in A $, s.t if $ |w| \geq ...
habedi/stack-exchange-dataset
59,948
Project to nearest point in convex polytope
<p>Is there a reasonably efficient algorithm for the following task?</p>&#xA;&#xA;<p>Input: a point $x \in \mathbb{R}^d$; a convex polytope $\mathcal{C} \subseteq \mathbb{R}^d$<br>&#xA;Find: a point $y \in \mathcal{C}$ that is as close to $x$ as possible</p>&#xA;&#xA;<p>Assume that $\mathcal{C}$ is specified by a colle...
algorithms optimization linear programming numerical algorithms
1
Project to nearest point in convex polytope -- (algorithms optimization linear programming numerical algorithms) <p>Is there a reasonably efficient algorithm for the following task?</p>&#xA;&#xA;<p>Input: a point $x \in \mathbb{R}^d$; a convex polytope $\mathcal{C} \subseteq \mathbb{R}^d$<br>&#xA;Find: a point $y \in \...
habedi/stack-exchange-dataset
59,950
Is it okay to select the best performers of test cases for scientific publication in neural network machine learning
<p>If I split my data properly into 75% train, 15% test, and 15% validation, and there are over 100,000 samples, is it appropriate for me to train 100s of neural networks then select only a couple based on their testing set grades for publication in a research article?</p>&#xA;&#xA;<p>The question is for neural networ...
neural networks statistics research
1
Is it okay to select the best performers of test cases for scientific publication in neural network machine learning -- (neural networks statistics research) <p>If I split my data properly into 75% train, 15% test, and 15% validation, and there are over 100,000 samples, is it appropriate for me to train 100s of neural ...
habedi/stack-exchange-dataset
59,975
L ={a^n.b^n | n>=0} , what is difference between L^2 and L.L?
<p><a href="https://i.stack.imgur.com/NrbAr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NrbAr.png" alt="enter image description here" /></a></p>&#xA;<p>which option is correct? please explain why other are wrong if any one is correct</p>&#xA;
formal languages
1
L ={a^n.b^n | n>=0} , what is difference between L^2 and L.L? -- (formal languages) <p><a href="https://i.stack.imgur.com/NrbAr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NrbAr.png" alt="enter image description here" /></a></p>&#xA;<p>which option is correct? please explain why other are wrong i...
habedi/stack-exchange-dataset
59,979
Online sorting without modifications
<p>There is an array with $n$ places. There is a stream of $n$ unique numbers that arrive at a random order (permutation selected uniformly at random).</p>&#xA;&#xA;<p>Whenever a number arrives, we must put it somewhere in the array, and we are not allowed to move it later. The goal is to have as many numbers as possib...
reference request sorting randomness online algorithms
1
Online sorting without modifications -- (reference request sorting randomness online algorithms) <p>There is an array with $n$ places. There is a stream of $n$ unique numbers that arrive at a random order (permutation selected uniformly at random).</p>&#xA;&#xA;<p>Whenever a number arrives, we must put it somewhere in ...
habedi/stack-exchange-dataset
59,981
System f-sub, how to do type checking?
<p>I was reading that system f-sub (polymorphic lambda calculus with sub-typing) and I was quite confused with its one checking rule called "T-TAPP".</p>&#xA;&#xA;<p>This rule as following (ctx denotes the typing context)</p>&#xA;&#xA;<pre><code> ctx |- t1 : ∀X&lt;:T11. T12 , ctx |- T2&lt;:T11&#xA; ----------...
type theory type checking type inference
1
System f-sub, how to do type checking? -- (type theory type checking type inference) <p>I was reading that system f-sub (polymorphic lambda calculus with sub-typing) and I was quite confused with its one checking rule called "T-TAPP".</p>&#xA;&#xA;<p>This rule as following (ctx denotes the typing context)</p>&#xA;&#xA;...
habedi/stack-exchange-dataset
59,983
What is the regular expression of this language?
<p>$\Sigma = \{0, 1\}$</p>&#xA;&#xA;<p>$L = \{x$| $x \in \Sigma^* $ $\&amp;$ $ \#_0(x) = 3$ $or$ $ \#_1(x) = 3 \}$ </p>&#xA;&#xA;<p>What is the regular expression of this language?</p>&#xA;&#xA;<p>At first I thought $r = (0+1)^*0(0+1)^*0(0+1)^*0$ $ or$ $ $ $r = (0+1)^*1(0+1)^*1(0+1)^*1$</p>&#xA;&#xA;<p>And what is it'...
regular languages finite automata regular expressions
1
What is the regular expression of this language? -- (regular languages finite automata regular expressions) <p>$\Sigma = \{0, 1\}$</p>&#xA;&#xA;<p>$L = \{x$| $x \in \Sigma^* $ $\&amp;$ $ \#_0(x) = 3$ $or$ $ \#_1(x) = 3 \}$ </p>&#xA;&#xA;<p>What is the regular expression of this language?</p>&#xA;&#xA;<p>At first I tho...
habedi/stack-exchange-dataset
59,992
What are some approaches to solve these classes of problems efficiently
<p>Good day, </p>&#xA;&#xA;<p>Please consider the following problem:&#xA;3 friends named Alice, Bob and Cindy have 3 food items (cheese, tomato, bread) in the fridge. </p>&#xA;&#xA;<p>Each person has a particular numerical preference score (any positive number) for each food item.</p>&#xA;&#xA;<p>It has been agreed upo...
algorithms approximation
1
What are some approaches to solve these classes of problems efficiently -- (algorithms approximation) <p>Good day, </p>&#xA;&#xA;<p>Please consider the following problem:&#xA;3 friends named Alice, Bob and Cindy have 3 food items (cheese, tomato, bread) in the fridge. </p>&#xA;&#xA;<p>Each person has a particular numer...
habedi/stack-exchange-dataset
59,995
Understanding The Mapping Of Edges to Nodes In A Graph Theory Problem
<p>I am really confused with this <a href="https://community.topcoder.com/stat?c=problem_statement&amp;pm=13707" rel="nofollow">problem</a>.</p>&#xA;&#xA;<p><strong>Here's the problem:</strong> <br></p>&#xA;&#xA;<p>You have $N$ points numbered $1$ through $N$,inclusive, and $N$ arrows again numbered $1$ through $N$,inc...
graphs dynamic programming
1
Understanding The Mapping Of Edges to Nodes In A Graph Theory Problem -- (graphs dynamic programming) <p>I am really confused with this <a href="https://community.topcoder.com/stat?c=problem_statement&amp;pm=13707" rel="nofollow">problem</a>.</p>&#xA;&#xA;<p><strong>Here's the problem:</strong> <br></p>&#xA;&#xA;<p>You...
habedi/stack-exchange-dataset
59,996
Applying Master Theorem to: T(n) = T(n - 2) + n^2
<p>I've been learning master theorem in school now and have learnt how to apply it to a number of recurrence relations. However one of my assignments has the following recurrence relation:</p>&#xA;&#xA;<p>T(n) = T(n-2) + n^2</p>&#xA;&#xA;<p>Am I wrong in thinking that I cannot apply Master Theorem to this equation? If ...
recurrence relation master theorem
1
Applying Master Theorem to: T(n) = T(n - 2) + n^2 -- (recurrence relation master theorem) <p>I've been learning master theorem in school now and have learnt how to apply it to a number of recurrence relations. However one of my assignments has the following recurrence relation:</p>&#xA;&#xA;<p>T(n) = T(n-2) + n^2</p>&#...
habedi/stack-exchange-dataset
60,007
Is $\{a^nb^n\}\cup\{a^nb^{2n}\}$ LR(k)?
<p>I was reading Knuth's paper "On The Translation of Languages from Left to Right", my particular interest being on RL($k$) languages (not a typo). By the end of the paper, he puts the grammar:</p>&#xA;&#xA;<p>$$&#xA;S \rightarrow Ac&#xA;\\&#xA;S \rightarrow B&#xA;\\&#xA;A \rightarrow aAbb&#xA;\\&#xA;A \rightarrow ab...
context free formal grammars lr k
1
Is $\{a^nb^n\}\cup\{a^nb^{2n}\}$ LR(k)? -- (context free formal grammars lr k) <p>I was reading Knuth's paper "On The Translation of Languages from Left to Right", my particular interest being on RL($k$) languages (not a typo). By the end of the paper, he puts the grammar:</p>&#xA;&#xA;<p>$$&#xA;S \rightarrow Ac&#xA;\\...
habedi/stack-exchange-dataset
60,008
What kinds of problems are modeled by a recursive definition of a set of strings?
<p>Given this definition:</p>&#xA;&#xA;<blockquote>&#xA; <p>The set $\Sigma^*$ of strings over the alphabet $\Sigma$ is defined recursively by:<br>&#xA; BASIS STEP: $\lambda \in \Sigma^*$ (where $\lambda$ is the empty string)<br>&#xA; RECURSIVE STEP: If $w \in \Sigma^*$ and $x \in \Sigma$ then $wx \in \Sigma^*$</p>&...
strings recursion sets mathematical foundations inductive datatypes
1
What kinds of problems are modeled by a recursive definition of a set of strings? -- (strings recursion sets mathematical foundations inductive datatypes) <p>Given this definition:</p>&#xA;&#xA;<blockquote>&#xA; <p>The set $\Sigma^*$ of strings over the alphabet $\Sigma$ is defined recursively by:<br>&#xA; BASIS STEP...
habedi/stack-exchange-dataset
60,036
Decidability Turing Machines
<p>Let $\Sigma$ be an alphabet, and suppose that $A$, $B \subseteq \Sigma^*$ are Turing recognizable languages where both $A \cup B$ and $A \cap B$ are decidable. Prove that $A$ is decidable.</p>&#xA;&#xA;<p>Is this true? I have tried to prove it by considering the intersection and complement of the sets, but I think I...
computability
1
Decidability Turing Machines -- (computability) <p>Let $\Sigma$ be an alphabet, and suppose that $A$, $B \subseteq \Sigma^*$ are Turing recognizable languages where both $A \cup B$ and $A \cap B$ are decidable. Prove that $A$ is decidable.</p>&#xA;&#xA;<p>Is this true? I have tried to prove it by considering the inters...
habedi/stack-exchange-dataset
60,039
Turing Completeness of System Which Randomly Fails to Complete Calculations
<p>If one were to create a variant of a turing complete language which upon completing a calculation randomly changes the answer by one, would it be Turing complete? For example, say I had a Python implementation which, upon every variable assignment, with probability $\frac13$ decreased the value by $1$, with probabil...
turing machines computation models randomness turing completeness
1
Turing Completeness of System Which Randomly Fails to Complete Calculations -- (turing machines computation models randomness turing completeness) <p>If one were to create a variant of a turing complete language which upon completing a calculation randomly changes the answer by one, would it be Turing complete? For exa...
habedi/stack-exchange-dataset
60,051
I know the algorithms, but i still don't know how to approach the questions
<p>I study Graphs Analysis by myself and i understood most of the material just fine. But, there is one huge problem with my approach that prevents me from solving tests. I don't know how to build new Graphs based on requirements and i'll give an examples:</p>&#xA;&#xA;<p>Question: G = (V,E) is a directed graph with no...
graphs weighted graphs
1
I know the algorithms, but i still don't know how to approach the questions -- (graphs weighted graphs) <p>I study Graphs Analysis by myself and i understood most of the material just fine. But, there is one huge problem with my approach that prevents me from solving tests. I don't know how to build new Graphs based on...
habedi/stack-exchange-dataset
60,055
How to compare two objects for percentage of equivalence
<p>I'm trying to create a nodeJS application. It allows users to rate a bunch of songs and it stores them in their user profiles. I use this information to compare them to other users, and try to find users with similar interests in songs, and I suggest them new songs based on that.</p>&#xA;&#xA;<p>Each user profile ba...
algorithms comparison recommendation systems
1
How to compare two objects for percentage of equivalence -- (algorithms comparison recommendation systems) <p>I'm trying to create a nodeJS application. It allows users to rate a bunch of songs and it stores them in their user profiles. I use this information to compare them to other users, and try to find users with s...
habedi/stack-exchange-dataset
60,059
If the Clique-k Problem is in P, why not Clique as well?
<p>I have looked at the other answers to this but I still don't get it. (for instance: <a href="https://cs.stackexchange.com/questions/7420/why-is-the-clique-problem-np-complete">Why is the clique problem NP-complete?</a>)</p>&#xA;&#xA;<p>The general clique problem is defined as</p>&#xA;&#xA;<p>$\text{CLIQUE} = \left\{...
np complete polynomial time clique
1
If the Clique-k Problem is in P, why not Clique as well? -- (np complete polynomial time clique) <p>I have looked at the other answers to this but I still don't get it. (for instance: <a href="https://cs.stackexchange.com/questions/7420/why-is-the-clique-problem-np-complete">Why is the clique problem NP-complete?</a>)<...
habedi/stack-exchange-dataset
60,069
Problems that become far easier when restricted to only integer values
<p>I know that there are some problems that are very hard to solve in general, but become much easier and asymptotically faster if restricted to only integer values.</p>&#xA;&#xA;<p>One such example would be sorting which can be done in <a href="https://en.wikipedia.org/wiki/Counting_sort" rel="nofollow"><em>O</em>(n+M...
algorithms time complexity integers
1
Problems that become far easier when restricted to only integer values -- (algorithms time complexity integers) <p>I know that there are some problems that are very hard to solve in general, but become much easier and asymptotically faster if restricted to only integer values.</p>&#xA;&#xA;<p>One such example would be ...
habedi/stack-exchange-dataset
60,072
Predicate Logic Notation: What does a "dot" mean?
<p>What does a dot (.) mean in predicates?</p>&#xA;&#xA;<p>$\forall a \in A. \exists d \in D. H(a,d)$</p>&#xA;&#xA;<p>Especially, how is the above different to </p>&#xA;&#xA;<p>$ \exists d \in D. \forall a \in A. H(a,d)$</p>&#xA;&#xA;<p>I've never seen this used in German lecture scripts.</p>&#xA;
logic first order logic mathematical foundations
1
Predicate Logic Notation: What does a "dot" mean? -- (logic first order logic mathematical foundations) <p>What does a dot (.) mean in predicates?</p>&#xA;&#xA;<p>$\forall a \in A. \exists d \in D. H(a,d)$</p>&#xA;&#xA;<p>Especially, how is the above different to </p>&#xA;&#xA;<p>$ \exists d \in D. \forall a \in A. H(a...
habedi/stack-exchange-dataset
60,074
Is there a name for "density" of information?
<p>If we compare multimedia and text, if we have n bytes of text and compare it with n bytes of video, then we would be likely to think that n bytes of text is "more" information than n bytes of video data. Is there a name or measure of this difference in data? Loosely speaking it is a "density" or a "quality" of infor...
information theory storage
1
Is there a name for "density" of information? -- (information theory storage) <p>If we compare multimedia and text, if we have n bytes of text and compare it with n bytes of video, then we would be likely to think that n bytes of text is "more" information than n bytes of video data. Is there a name or measure of this ...
habedi/stack-exchange-dataset
60,077
Why "reduce to", not the other way around?
<p>This action confuses me for a while. As you know, once we come up with a problem and we want to know how hard it is, we will do the "reduction". Intuitively, if we prove <em>problem B</em> is as hard as <em>problem A</em>, we can know the complexity boundary of <em>B</em>. But if <em>problem B</em> is harder than <e...
terminology reductions
1
Why "reduce to", not the other way around? -- (terminology reductions) <p>This action confuses me for a while. As you know, once we come up with a problem and we want to know how hard it is, we will do the "reduction". Intuitively, if we prove <em>problem B</em> is as hard as <em>problem A</em>, we can know the complex...
habedi/stack-exchange-dataset
60,089
Are there data structures that mix a tree structure with lists?
<p>I suppose something like this could probably be easily designed, however I was wondering if there's a data structure that somehow uses both list and tree to access data.</p>&#xA;&#xA;<p>Something like this (I'll be informal, but I hope I can give you some idea of what I mean).</p>&#xA;&#xA;<p>Suppose we have a tree ...
data structures trees lists
1
Are there data structures that mix a tree structure with lists? -- (data structures trees lists) <p>I suppose something like this could probably be easily designed, however I was wondering if there's a data structure that somehow uses both list and tree to access data.</p>&#xA;&#xA;<p>Something like this (I'll be infor...
habedi/stack-exchange-dataset
60,094
call by value: what is a value?
<p>In the 'call by value' evaluation of lambda-calculus, I am bit confused with 'value'.</p>&#xA;&#xA;<p>On page 57 of the book <a href="https://www.cis.upenn.edu/~bcpierce/tapl/" rel="nofollow">Types and Programming languages</a>, it is said:</p>&#xA;&#xA;<blockquote>&#xA; <p>The definition of call by value, in whic...
lambda calculus functional programming term rewriting
1
call by value: what is a value? -- (lambda calculus functional programming term rewriting) <p>In the 'call by value' evaluation of lambda-calculus, I am bit confused with 'value'.</p>&#xA;&#xA;<p>On page 57 of the book <a href="https://www.cis.upenn.edu/~bcpierce/tapl/" rel="nofollow">Types and Programming languages</...
habedi/stack-exchange-dataset
60,096
Discrete optimisation in 5 variables
<p>I need to solve the following optimisation problem and I can't come up with any solutions. Is there any algorithm to solve this type of problem. I tried to think of a greedy algorithm or brute force, but couldn't solve it.</p>&#xA;&#xA;<p><strong>Input :</strong><br>&#xA;$ n_1, n_2, n_3, n_4, n_5$ : Positive integer...
algorithms optimization dynamic programming discrete mathematics greedy algorithms
1
Discrete optimisation in 5 variables -- (algorithms optimization dynamic programming discrete mathematics greedy algorithms) <p>I need to solve the following optimisation problem and I can't come up with any solutions. Is there any algorithm to solve this type of problem. I tried to think of a greedy algorithm or brute...
habedi/stack-exchange-dataset
60,098
error computation in multi layered perceptron
<p>I was reading about Multi Layered Perceptron(MLP) and how can we learn pattern using it. Algorithm was stated as</p>&#xA;&#xA;<ul>&#xA;<li>Initiate all weight to small values. Compute activation of each&#xA;neuron</li>&#xA;<li>using sigmoid function. Compute the error at the output layer using</li>&#xA;<li>$\delta_{...
machine learning neural networks
1
error computation in multi layered perceptron -- (machine learning neural networks) <p>I was reading about Multi Layered Perceptron(MLP) and how can we learn pattern using it. Algorithm was stated as</p>&#xA;&#xA;<ul>&#xA;<li>Initiate all weight to small values. Compute activation of each&#xA;neuron</li>&#xA;<li>using ...
habedi/stack-exchange-dataset