instruction stringlengths 0 29.8k ⌀ |
|---|
null |
VC dimension covers the binary classification case, i.e. when we want to get a predictor $X \to \{0, 1\}$.
Using VC dimension, we can get the upper bound on the sample complexity for PAC-learning.
In our problem, we have 3 classes, i.e. we want to train a predictor $X \to \{0, 1, 2\}$.
We know a "VC dimension" for... |
Multi-class sample complexity for PAC learning using "VC dimension" |
VC dimension covers the binary classification case, i.e. when we want to get a predictor $X \to \{0, 1\}$.
Using VC dimension, we can get the upper bound on the sample complexity for PAC-learning.
In our problem, we have 3 classes, i.e. we want to train a predictor $X \to \{0, 1, 2\}$.
We know a "VC dimension" for... |
null |
null |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace is... |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace is... |
The answer above which claims "it doesn't work" doesn't quite make sense. Doesn't work for what? Which implementation of it? I realize I'm writing this with the luxury of 7 years having passed, but it's worth updating.
Scott Aaronson assumed in his 2015 blogpost that a MemComputer is purely an analog machine (which... |
The problem is equivalent to the node-weighted version of the [Steiner tree problem](https://en.wikipedia.org/wiki/Steiner_tree_problem).
Happy nodes correspond to terminals, and non-removed unhappy nodes correspond to Steiner vertices.
This problem is NP-hard even for planar graphs. The NP-hardness can be proven b... |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace is... |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace is... |
null |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace is... |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace is... |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs, "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace i... |
null |
I'm somewhat confused about the Wikipedia terms about the meaning of 'reversed' in the context of tree & graph treversals
Suppose I have a tree:
```
1
/ \
/ \
/ \
/ \
2 3
/ \ /
4 5 6
/ \ / \
7 8 9 10
```
[Tree ... |
null |
VC dimension covers the binary classification case, i.e. when we want to get a predictor $X \to \{0, 1\}$.
Using VC dimension, we can get the upper bound on the sample complexity for PAC-learning.
In our problem, we have 3 classes, i.e. we want to train a predictor $X \to \{0, 1, 2\}$.
We know a "VC dimension" for... |
A redex is an expressions on which we can perform a computation step, such as:
1. `fst (a, b)` is a redex, it computes to `a`
2. `snd (a, b)` is a redex, it computes to `b`
3. `(λ x . x + x) 6` is a redex, it computes to `6 + 6`
4. `if true then A else B` is a redex, it computes to `A`
Here are some examples... |
Let there is an algorithm whose running time is $O(n^2)$. Suppose we apply a preprocessing step on the algorithm in $O(n)$ so that it reduces the input size to $O(\sqrt{n})$ but doesn't effect the true answer of the algorithm. It is just for optimization. Now is it true to say that the running time of the algorithm is ... |
What happens to the running time if we reduce the size of input? |
|algorithms|time-complexity|runtime-analysis| |
Yes. That is correct.
Also, I think that "yes/no" questions are discouraged. |
You are right. "Reverse" in the context of *binary trees* does not mean the same as "reverse" in the context of general graphs. In general graphs, "reverse" preorder/postorder simply means putting the nodes in the opposite order as they appear in the normal preorder/postorder trace. For example, if the preorder trace i... |
null |
null |
I want to find out how to check, if the following relationships are true or false.
f(n) = nlog(n!); g(n) = nlog(2n^3n); Check, if f(n) = O(g(n)) and/or f(n) = Ω(g(n)) true/false;
f(n) = 3n^2; g(n) = 9^(base3-logn); Check, if f(n) = O(g(n)) and/or f(n) = Ω(g(n)) true/false;
I am very new to this topic, so i wou... |
Big O- and Omega-Notation for functions |
|time-complexity|big-o-notation| |
Given an undirected graph $G=(V,E)$ where $V$ is a set of vertices, and $E$ is a set of edges and
\
given a set $D$ where $D \subseteq V $ and $ \forall v \in V \setminus D \: \mid \: \exists w \in D : \{v,w\} \in E$
**INPUT** undirected graph $G=(V,E)$ and a number $k \in \mathbb{N}$
\
**PROBLEM $X$ :** Does ... |
Polynomial Reduction to 3SAT |
|complexity-theory|reductions|satisfiability|3-sat|polynomial-time-reductions| |
Given an undirected graph $G=(V,E)$ where $V$ is a set of vertices, and $E$ is a set of edges and
\
given a set $D$ where $D \subseteq V $ and $ \forall v \in V \setminus D \: \mid \: \exists w \in D : \{v,w\} \in E$
**INPUT** undirected graph $G=(V,E)$ and a number $k \in \mathbb{N}$
\
**PROBLEM $X$ :** Does ... |
Given an undirected graph $G=(V,E)$ where $V$ is a set of vertices, and $E$ is a set of edges and
\
given a set $D$ where $D \subseteq V $ and $ \forall v \in V \setminus D \: \mid \: \exists w \in D : \{v,w\} \in E$
**INPUT** undirected graph $G=(V,E)$ and a number $k \in \mathbb{N}$
\
**PROBLEM $X$ :** Does ... |
The answer above which claims "it doesn't work" doesn't quite make sense. Doesn't work for what? Which implementation of it? I realize I'm writing this with the luxury of 7 years having passed, but it's worth updating.
Scott Aaronson assumed in his 2015 blogpost that a MemComputer is purely an analog machine (which... |
Okay so imma noob as my question itself will suggest . And I know that of If I want to access a public class member we have to use the dot operator with the object .
So we know that int , float etc are also classes ..so why don't we use dot operators with the variables of that data type...? |
Why we dont use dot operator with int or any other datatype |
|object-oriented| |
Polynomial Reduction from 3SAT |
null |
Before I answer your general question, let me first take a step back, give some history background, and answer a preliminary question: Do non-computable functions even exist?
<sup>
[notational note: we can relate any function $f$ with a language $L_f=\{ (x,y) \mid y=f(x) \}$ and then discuss the decidability of $L_... |
I know that there exists a Turing Machine, if a function is computable. Then how to show that the function is *not* computable or there aren't any Turing Machine for that. Is there anything like a Pumping lemma?
Similarly, how can we show a language is *not* recursively enumerable?
|
How to show that a function is not computable? How to show a language is not computably enumerable? |
|computability|undecidability|proof-techniques|reference-question|turing-recognizable| |
In second example if you have $f(n)=3n^2$ and $g(n)=n^2$, then, of course $f(n)=\Theta(g(n))$.
For first enough to note, that $n! < (2n)^{3n}$. |
null |
Definitions: Let $\Sigma$ be a fixed finite alphabet. If a string $s = vw$, then $v$ is a $\textit{prefix}$ of $s$ and $w$ is a $\textit{suffix}$ of $s$. For a language $L \subseteq \Sigma^*$, define $L_n \subseteq L$ to consist of strings in $L$ of length $n$: $L_n = \{s \mid s \in L \; \textrm{and} \; |s| = n \}$. N... |
State Complexity of DFAs for Restricted Languages |
|regular-languages|automata|finite-automata| |
>This question is from Sisper (5.33). Let $S = \{\langle M\rangle | M \text{ is a TM and } L(M) = \{ \langle M\rangle\}\}$. Prove that neither $S$ nor $\overline{S}$ is Turing-recognizable.
I think the statement can be proved via a contradiction. Suppose $S$ is Turing recognizable and let $M$ be a TM recognizing it... |
show that neither $S$ nor $\overline{S}$ is turing recognizable |
|formal-languages|turing-machines|computability| |
null |
1. >What exactly is the reason for rule P1?
P1 satisfies liveness property only in cases without failure or message loss. That is what the paper says:
> In the absence of failure or message loss, we want a value to be chosen
even if only one value is proposed by a single proposer.
Unlike P2 which guarantees... |
null |
We can reduce from $A_{TM}$ to prove $A$ is undecidable and also from $\overline{A_{TM}}$ to prove $A$ is unrecognizable. We proceed with the first claim. I recommend you pause here and think about how it could be done before moving forward. The core idea is excatly what Steven suggested that is to specify a Turing mac... |
The algorithm snippet you linked is wrong. Processes in Peterson's algorithm are humble. So, when P0 wants to enter critical section, it sets `interested[0] = TRUE` and `turn = 1`. Yes, it lets other process to have a turn. Similar for P1. [Here is the correct pseudocode.][1]
<code> P0 P1 ... |
There are languages where "everything is an object". The archetype is Smalltalk, although Smalltalk does not think in terms of "method calls", but rather "messages".
In Smalltalk (and its offshoots like Squeak), mathematical operations on numeric classes are binary messages. This has interesting implications when it... |
null |
This is from Ex. 0.2.(b) from "Computational Complexity" by Arora and Barak (2009):
One needs to find a non-recursively defined function $g$ s.t. (1) $f = O(g)$ and (2) $g = O(f)$, where $f(n)=f(n-1)+n$ for $n > 10$ (and $f(1) = ... = f(10) = 1$). Solution booklet says that $g(n) = n^2$, but I cannot see how to pro... |
How to show that $n^2 = O(f(n-1)+n)$? |
|big-o-notation| |
$$f(n)=f(n-1)+n = f(n-2)+(n-1)+n = \\
=\cdots =\\
=n + (n-1) + (n-2)+ \cdots +(n-(n-10)+1)+f(n-(n-10))$$
Hope, You can finish from here. |
From what I've read, there are $C$-complete problems for all the complexity classes $C$ that I have looked at: $P$, $NP$, $EXPTIME$, $PSPACE$. But I also know that there is an infinite hierarchy of complexity classes. I'm wondering if there is a uniform/general reason that a complexity class must have problems that are... |
Is there a theorem of the form "for any complexity class $C$, there exist $C$-complete problems"? |
|complexity-theory|time-complexity|np-complete|complexity-classes| |
> Is there a general proof that "for any complexity class , there exist -complete problems"
No, there is no general proof of this. In fact, while the complexity classes you mention (P, NP, PSPACE, EXPTIME) are known to have complete problems, beyond these many complexity classes don't.
Probably the simplest case ... |
A computable function, formulated in the sense of mu recursion, can compute a for or do loop over some (possibly infinite) integer range.
I was wondering if a suitable generalization exists that allows the computation of a real-domain function $f$ where $f(x)$ can be calculated given the values of $f(y)$ for all rea... |
Generalization of computability to continuous for loops? |
|turing-machines|computability|church-turing-thesis|physics|mu-calculus| |
From what I've read, there are $C$-complete problems for all the complexity classes $C$ that I have looked at: $P$, $NP$, $EXPTIME$, $PSPACE$. But I also know that there is an infinite hierarchy of complexity classes. I'm wondering if there are uniform/general reasons that complexity classess have problems that are com... |
Is there a theorem of the form "for any complexity class $C$ satisfying $X$, there exist $C$-complete problems"? |
Given a geometric graph (interval, circular arc, disk, etc.), is there a difference between the realization of that graph and the embedding of that graph? |
Is there a difference between realization and embedding of a graph? |
|graphs|computational-geometry| |
This question is from Sisper (5.33):
>Let $S = \{\langle M\rangle | M \text{ is a TM and } L(M) = \{ \langle M\rangle\}\}$. Prove that neither $S$ nor $\overline{S}$ is Turing-recognizable.
I think the statement can be proved via a contradiction. Suppose $S$ is Turing recognizable and let $M$ be a TM recognizing... |
The question is: How long does it actually take to solve the problem given the compressed data as the input?
Let’s say your original problem takes a square matrix with n elements as it’s input (that is sqrt(n) rows and columns) and your algorithm calculates a function of the diagonal in O(n^2). If you compress your... |
I have a minimax problem of the form $$\max_{\substack{u_1,\dots,u_n \ge 0 \\ u_1+\dots+u_n = 1}} \min_{\substack{v_1,\dots,v_m \ge 0 \\ v_1+\dots+v_m = 1 \\ v_{j_1} \le v_{j_2} \hspace{1mm} \forall (j_1,j_2) \in J}} \sum_{i=1}^n \sum_{j=1}^m c_{i,j} u_i v_j,$$ where $J$ is some (given) subset of $[m]\times[m]$ and the... |
How to find optimizers with computer in this kind of minimax problem |
|optimization|linear-programming|game-theory|optimal-strategy|minimax| |
I am trying to understand why some combinatorial games are EXPTIME complete. In particular I would like to see a "direct" proof, where arbitrary exptime problems are encoded as instances of some combinatorial game. Hence I tried to read the original paper "Provably Difficult Combinatorial Games" by Stockmeyer and Chand... |
An intuitive explanation of "provably complex combinatorial games" |
|complexity-theory|np-complete|reductions| |
Undisputably, the global time is
$$O(n)+O((c\sqrt n)^2)=O(n).$$ |
I'm using Bayesian optimization for a pretty cost expensive function in the context of neural networks in order to optimize hyperparameters for the neural net.
Is there a general, quantitative way to distinguish between becoming stuck in a local minimum in the optimization or just long running time of the process? |
What are common ways to distinguish between local minima and long run-time in hyperparamteer optimization |
|optimization|machine-learning|neural-networks|program-optimization| |
I have a minimax problem of the form $$\max_{\substack{u_1,\dots,u_n \ge 0 \\ u_1+\dots+u_n = 1}} \min_{\substack{v_1,\dots,v_m \ge 0 \\ v_1+\dots+v_m = 1 \\ v_{j_1} \le v_{j_2} \hspace{1mm} \forall (j_1,j_2) \in J}} \sum_{i=1}^n \sum_{j=1}^m c_{i,j} u_i v_j,$$ where $J$ is some (given) subset of $[m]\times[m]$ and eac... |
In general, no. Perhaps here is only one unique input that makes the function produce an enormously negative output; or perhaps there is none. You can't tell the two apart without having examined a large fraction of all possible inputs to the function. |
The question is: How long does it actually take to solve the problem given the compressed data as the input?
Let’s say your original problem takes a square matrix with n elements as it’s input (that is sqrt(n) rows and columns) and your algorithm calculates a function of the diagonal in O(n^2). If you compress your... |
Consider a real-valued $L$-smooth and **non-convex** objective function $f: \mathbb{R}^n \mapsto \mathbb{R}$. There exists a bound on number of iterations in order to find a (local) minima using ordinary gradient descent (see page 15-20 [here][1]). The basic idea is to combine the condition of $L$-smooth and gradient d... |
Convergence rate of quasi-newton method for non-convex objective function |
|algorithms|optimization|gradient-descent| |
Consider a real-valued $L$-smooth and **non-convex** objective function $f: \mathbb{R}^n \mapsto \mathbb{R}$. There exists a bound on number of iterations in order to find a (local) minima using ordinary gradient descent (see page 15-20 [here][1]). The basic idea is to combine the condition of $L$-smooth and gradient d... |
Consider a real-valued $L$-smooth and **non-convex** objective function $f: \mathbb{R}^n \mapsto \mathbb{R}$. There exists a bound on number of iterations in order to find a (local) minima using ordinary gradient descent (see page 15-20 [here][1]). The basic idea is to combine the condition of $L$-smooth and gradient d... |
Consider a real-valued $L$-smooth and **non-convex** objective function $f: \mathbb{R}^n \mapsto \mathbb{R}$. There exists a bound on number of iterations in order to find a (local) minima using ordinary gradient descent (see page 15-20 [here][1]). The basic idea is to combine the condition of $L$-smooth and gradient d... |
null |
**Introduction:**
Hi, I'm quite new to types so apologies in advance for the basic question and for any abuse of terminology. I believe I have a critical misunderstanding of dependent product types (and probably about types in general to be quite honest). My questions is based on a reading of Andrej's very helpful a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.