instruction
stringlengths
0
29.8k
⌀
As I know, there are several upper bounds on the generalization error of hypothesis set with respect to sample complexity. For hypothesis space $V$, if the learning algorithm output the set of hypotheses that are consistent with the training data, i.e., $\sum\limits_{1 \leq i \leq n}{\frac{I[h(x_i) \not= y_i]}{n}} = 0$...
What Properties Matter For the Bound on Generalization Error of Hypothesis Set?
|machine-learning|artificial-intelligence|
null
Your coin flips form a one-dimensional random walk $X_0,X_1,\ldots$ starting at $X_0 = 0$, with $X_{i+1} = X_i \pm 1$, each of the options with probability $1/2$. Now $H_i = |X_i|$ and so $H_i^2 = X_i^2$. It is easy to calculate $E[X_i^2] = i$ (this is just the variance), and so $E[H_i] \leq \sqrt{E[H_i^2]} = \sqrt{i}$...
As I know, there are several upper bounds on the generalization error of hypothesis set with respect to sample complexity. For hypothesis space $V$, if the learning algorithm output the set of hypotheses that are consistent with the training data, i.e., $\sum\limits_{1 \leq i \leq n}{\frac{I[h(x_i) \not= y_i]}{n}} = 0$...
null
|graphs|shortest-path|
null
this grammar is equivalent with $$ \begin{align} S \rightarrow &0A1B\mid 1B \\ A \rightarrow & 0A \mid \varepsilon \\ B \rightarrow & 0B \mid 1B \mid \varepsilon \\ \end{align} $$ and so *like* a simple grammar we can show this grammar is not ambiguous. of course this grammar is not simple
null
This grammar is equivalent with $$ \begin{align} S \rightarrow &0A1B\mid 1B \\ A \rightarrow & 0A \mid \varepsilon \\ B \rightarrow & 0B \mid 1B \mid \varepsilon \\ \end{align} $$ and so *like* a simple grammar we can show that this grammar is not ambiguous. Of course this grammar is not simple.
null
null
You can use the [half-normal distribution][1] to prove the answer. The half-normal distribution states that if $X$ is a normal distribution with mean 0 and variance $\sigma^2$, then $|X|$ follows a _half distribution_ with mean $\sigma \sqrt{\frac{2}{\pi}}$, and variance $\sigma^2 (1-2/\pi)$. This gives the requir...
Why are computable numbers (in Turing's sense) enumerable? It must be very obvious, but I'm currently just not seeing it.
Why are computable numbers (in Turing's sense) enumerable?
|computability|turing-machines|
I'm assuming that your definition of a computable number is this: there is a Turing machine that on input $n$, halts with the $n$th bit of the number. Suppose there were a recursive enumeration of Turing machines that produce computable numbers. You can use diagonalization to come up with a new computable number whi...
G=({S,A,B},{0,1},P,S) Where P: - S→A1B - A→0A|ε - B→0B|1B|ε I have to list the first 25 strings from L(G). So far I've made the tree, but I'm not sure that it's correct. ![enter image description here][1] [1]: https://i.stack.imgur.com/yZlK7.jpg
It has been a long time, honestly. But I am following the pseudocode given in [wikipedia][1]. It is basically the same standard proof that depends on _directed graph_ argument and a triangle graph, but simply consider longer paths. Consider an _undirected_ ring graph $G = (V,E)$ where: - $V = \{a,b,c,d,e,f,...
Recursion problem involving head, tail and xor
Here is an attempt at disproof: Suppose we have a max-heap of $n$ elements such that that $k<\log n$ and I inform you that the $k^{th}$ smallest element is at the greatest depth of the tree. Without this detail, it could be elsewhere in the tree, but if we cannot solve this special case in time $O(k)$, the more gen...
Think about a "triangle"(3-clique): a graph $G(V,E)$ with three vertices $a,b,c$ and edges $(a,b),(b,c),(c,a)$. Assign cost $w_{a,b} = 1$, $w_{b,c} = 100$, $w_{c,a} = -100$. If we want to find the shortest path from $a$ to $b$, Dijikstra greedily chooses $c$ via edge $(a,c)$, which has cost one. However, the shortest p...
null
Think about a "triangle"(3-clique): an undirected graph $G(V,E)$ with three vertices $a,b,c$ and edges $(a,b),(b,c),(c,a)$. Assign cost $w_{a,b} = 1$, $w_{b,c} = -100$, $w_{c,a} = 100$. If we want to find the shortest path from $a$ to $b$, Dijikstra greedily chooses $b$ via edge $(a,b)$, which has cost one. However, th...
null
It has been a long time, honestly. But I am following the pseudocode given in [wikipedia][1]. It is basically the same standard proof that depends on _directed graph_ argument and a triangle graph, but simply consider longer paths. (Actually, after reading this solution below, you will realize that even a triangle ...
It has been a long time, honestly. But I am following the pseudocode given in [wikipedia][1]. It is basically the same standard proof that depends on _directed graph_ argument and a triangle graph, but simply consider longer paths. (Actually, after reading this solution below, you will realize that even a triangle ...
null
Think about a "triangle"(3-clique): an undirected graph $G(V,E)$ with three vertices $a,b,c$ and edges $(a,b),(b,c),(c,a)$. Assign cost $w_{a,b} = 1$, $w_{b,c} = -100$, $w_{c,a} = 100$. If we want to find the shortest path from $a$ to $b$, Dijikstra greedily chooses $b$ via edge $(a,b)$, which has cost one. However, th...
null
[Rademacher complexity][1] is also a tool used to bound [generalization error][2]. [1]: http://en.wikipedia.org/wiki/Rademacher_complexity [2]: http://cs.nyu.edu/~rostami/ml/2007/rademacher.pdf
It is known that P$\subseteq$NP$\subset$R, where R is the set of recursive languages. Since R is countable and P is infinite (e.g. the languages $\{n\}$ for $n \in \mathbb{N}$ are in P), we get that P and NP are both countable.
So, I work in mathematics mainly and have only a bit of familiarity with this type of problem. However, set theory is one of my favorite areas of study, and this seems to be a set theory question. So, to begin with, both P and NP are countably infinite as others have pointed out before. So, it does not make sense to...
Is it possible that P != NP and the cardinality of P is the same as the cardinality of NP? Or does P != NP mean that P and NP must have different cardinalities?
Does P != NP imply that | NP | > | P |?
|complexity-classes|p-vs-np|
I have a question that I still struggle with. It would be really appreciated if you guys could give me some hints. Here is the problem : Assume that we have $ a[n]$ is an array of n positive real numbers. Let $\alpha >0$ and $\beta <0$ - a subarray $a_1$ with m elements of $a[n]$ is call is increasing $\frac{...
find all increasing/decreasing sub array
|algorithms|
I have a question that I still struggle with. It would be really appreciated if you guys could give me some hints. Here is the problem : Assume that $a[1\dots n]$ is an array of $n$ positive real numbers. Let $\alpha >0$ and $\beta <0$ - a subarray $a_1$ with $m$ elements of $a[1 \dots n]$ is called increasin...
Find all increasing/decreasing sub array
null
I have a question that I still struggle with. It would be really appreciated if you guys could give me some hints. Here is the problem : Assume that $a[1\dots n]$ is an array of $n$ positive real numbers. Let $\alpha >0$ and $\beta >0$ - a subarray $a_1$ with $m$ elements of $a[1 \dots n]$ is called increasin...
Programming languages are typically defined in several stages. A language in formal language theory is a set of strings, but that isn't a very useful concept to explain programming languages. The meaning of a source program is defined by several stages of translation; here are typical stages in the compilation of a tra...
This is a basic brute force solution. Keep two nested for loops. In the outer loop, iterate the loop variable $i$ from $1$ to $n$. In the inner loop, iterate the loop variable $j$ from $i+1$ to $n$. Inside the inner loop, check for the ratio of $\frac{a[j]}{a[i]}$ and declare the sequence of $a[i \dots j]$ to be incre...
This is a basic brute force solution. Keep two nested for loops. In the outer loop, iterate the loop variable $i$ from $1$ to $n$. In the inner loop, iterate the loop variable $j$ from $i$ to $n$. Inside the inner loop, check for the ratio of $\frac{a[j]}{a[i]}$ and declare the sequence of $a[i \dots j]$ to be increas...
null
I have a question that I still struggle with. It would be really appreciated if you guys could give me some hints. Here is the problem : Assume that $a[1\dots n]$ is an array of $n$ positive real numbers. Let $\alpha >0$ and $\beta >0$ - a subarray $a_1$ with $m$ elements of $a[1 \dots n]$ is called increasin...
Note: This answer was given before the OP substantially changed the question by requiring that the inequality holds for any pair of elements in the sub-array. This is a basic brute force solution. Keep two nested for loops. In the outer loop, iterate the loop variable $i$ from $1$ to $n$. In the inner loop, iterate...
3-Coloring problem can be proved NP-Complete making use of the reduction from 3SAT [Graph Coloring (from 3SAT)][1]. As a consequence, 4-Coloring problem is NP-Complete using the reduction from 3-Coloring: > Reduction from 3-Coloring instance: adding an extra vertex to the graph of 3-Coloring problem, and making it a...
How to understand the reduction from 3-Coloring problem to general $k$-Coloring problem?
|complexity-theory|graphs|np-complete|
The $k$-coloring problem is usually defined only for constant $k$, so $n$-coloring doesn't make sense. For every constant $k \geq 3$, the reduction you mention works. By adding a superconstant number of vertices you can show, for example, that $(n/2+3)$-coloring is NP-complete.
The $k$-coloring problem is to color *any* graph. You can certainly find graphs for which $k$-coloring is trivial as well as formulas for which SAT is trivial or etc. This does not impact the complexity of the problems in general though.
We commonly create sub-groups of strings in one particular algorithm implementation. I just want to know in CS literature is there any standard name for such kind of grouping. For e.g. Hello World! This is May from the dairy farm. Strings with sub-groups of two: Hello World! World! This This ...
terminology for grouping words in a string?
|terminology|strings|substrings|
You are probably looking for the term [n-grams][1], with $n = 2$ in your case. This is very useful in natural language processing and speech recognition. [1]: http://en.wikipedia.org/wiki/N-gram
null
Programming languages are typically defined in several stages. A language in formal language theory is a set of strings, but that isn't a very useful concept to explain programming languages. The meaning of a source program is defined by several stages of translation; here are typical stages in the compilation of a tra...
I have a question that I still struggle with. It would be really appreciated if you guys could give me some hints. Here is the problem : Assume that $a[1\dots n]$ is an array of $n$ positive real numbers. Let $\alpha >0$ and $\beta >0$ - a subarray $a_1$ with $m$ elements of $a[1 \dots n]$ is called increasin...
|algorithms|substrings|
null
If P=NP then any non-trivial set is NP-hard (other than the empty set and the complete set), so assume P$\neq$NP. If $A$ is a set and $f_i$ reduces SAT to $A$ in polytime, then $f_i$ must have infinite range. Otherwise, we can hardcode the relevant values of $f_i$ to get a polytime algorithm for SAT. We can construc...
Is there an undecidable problem which is not NP-hard?
Is undecidable(complement of R) a subset of NP-hard?
|complexity-theory|undecidability|
It's not just Dijkstra's algorithm that doesn't work. Other standard shortest-path algorithms like [Bellman-Ford](http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm) don't work on undirected graphs with negative edges either. The problem is that these algorithms compute a [shortest path tree](http://en.wik...
null
Which tools or softwares are mostly used for the purpose of modeling a computer network?
Names of Softwares used for modeling
|computer-networks|
I suppose you mean simulating computer networks? because modelling is different (you can model your network as a graph for instance). If this is the case have a look at these simulators: - _NS2_: built with C++, a discrete-event simulator, open source, and perhaps the most useful. You would need to use Tcl to writ...
I suppose you mean simulating computer networks? because modelling is different (you can model your network as a graph for instance). If this is the case have a look at these simulators: - _NS2_: built with C++, a discrete-event simulator, open source, and perhaps the most useful. You would need to use Tcl to writ...
null
I need help with the following question: Order the following formalisms according to their expressive power: placing A before B means that any language definable by A is definable by B. Also state which, if any, of them are equivalent. • Turing Machines (TM) • Regular expressions (reg.exp.) • Turi...
Formal Languages - Expressive power of Formalisms
|formal-languages|regular-languages|context-free|regular-expressions|pushdown-automata|
> NFAe=NFA=DFA=Reg.exp, LR(1)-Grammar=DPDA, CFG=PDA, TM=NTM=TM+ Seems OK to me.
null
I have a background in computer architecture and only cursory understanding of process networks. For a paper I am writing I need to understand prefix monotonicity properly. For now I have "a stream transformer is prefix monotonic if its output for a given input record r is dependent only on the input stream up to a...
What is prefix monotonicity?
|reference-request|terminology|nondeterminism|
null
The [universal Turing machine][1] $U_{TM}$ is a TM that takes in as input an encoding of a TM and a string, then runs the TM on the string and does whatever the simulated TM does. The language of the universal TM is the set of all encodings of a TM/string pair as a string for which the TM accepts the string. I have...
Standard notation for the language of the universal Turing machine?
|computability|terminology|turing-machines|
No, there is no general term for this.
What are the key differences between these three terms isomorphism, automorphism and homomorphism in simple layman language and why we do isomorphism, automorphism and homomorphism ?
Why we do isomorphism, automorphism and homomorphism?
|graphs|