instruction stringlengths 0 29.8k ⌀ |
|---|
|terminology|distributed-systems| |
I want to determine which parts of an audio file contain speech respectively music.
I hope someone has a made something like this or can tell me where to start. Can you please suggest some method or tutorial for doing the same?
|
Speech vs Music classification |
|reference-request|pattern-recognition| |
There are differences. Most of them are subtle enough that you wouldn't care, but they generally differ either in intent or in implementation. The overarching idea is to provide class A with access to the functionality of class B, without A having to care that it's B doing the work (so that a class C can be substituted... |
There are differences. Most of them are subtle enough that you wouldn't care, but they generally differ either in intent or in implementation. The overarching idea is to provide class A with access to the functionality of class B, without A having to care that it's B doing the work (so that a class C can be substituted... |
It is proven that neural networks with rational weights has the computational power of the Universal Turing Machine [Turing computability with Neural Nets][1]. From what I get, it seems that using real-valued weights yields even more computational power, though I'm not certain of this one.
However, is there any corr... |
Is computational power of Neural networks related to the activation function |
|complexity-theory|computability|neural-networks| |
null |
I'm going to take the easy solution and say "Yes". Consider an activation function which accepts any inputs and simply returns a constant value (that is, it ignores the inputs). This network always results in a constant output, and thus the computational power (likely by any definition) of this network is zero. It is n... |
null |
Just a note:
* rational-weighted recurrent $NN$s having boolean activation functions (simple thresholds) are equivalent to finite state automata (Minsky, "Computation: finite and infinite machines", 1967);
* rational-weighted recurrent $NN$s having linear sigmoid activation functions are equivalent to Turing ... |
This standard definition of pumping lemma from Wikipedia.
> Let $L$ be a regular language. Then there exists an integer $p\ge 1$ (depending only on $L$) such that every string $w$ in $L$ of length at least $p$ ($p$ is called the "pumping length") can be written as $w = xyz$ (i.e., $w$ can be divided into three subs... |
Length of mid part of the string in Pumping Lemma |
|pumping-lemma| |
Any finite state automaton that accepts an infinite number of words will necessarily have a loop in it. One such loop may go from state $q$ to state $q$ consuming word $y$ – that is, $y$ is the word based on the symbols on the transitions going from $q$ back to $q$.
The pumping lemma says, more or less, that you ca... |
I wrote a [blogpost][1] about using minimax to play connect four a while ago. You can see the code in action [here][2]. If you need to train your models, you can perhaps let it play a couple of thousand games against my minimax implementation.
[1]: http://lukasvermeer.wordpress.com/2011/09/24/connect-four-and-mini... |
Any algorithm that compares the same two elements twice is not a very clever algorithm, and in particular such an algorithm would perform less well than the [most common sorting algorithms][1] (merge-sort, quicksort, bubble-sort, insertion-sort). Any algorithm that compares pairs of elements at most once has the same (... |
Any algorithm that compares the same two elements twice is not a very clever algorithm, and in particular such an algorithm would perform less well than the [most common sorting algorithms][1] (merge-sort, quicksort, bubble-sort, insertion-sort). Any algorithm that compares pairs of elements at most once has the same (... |
This standard definition of pumping lemma from Wikipedia.
> Let $L$ be a regular language. Then there exists an integer $p\ge 1$ (depending only on $L$) such that every string $w$ in $L$ of length at least $p$ ($p$ is called the "pumping length") can be written as $w = xyz$ (i.e., $w$ can be divided into three subs... |
|formal-languages|regular-languages|pumping-lemma| |
null |
It seems to me that an efficient way to enumerate those sequences is simply by constructing all possible stacks recursively. See Python example below (n.b. my stacks have the top on the right-hand side).
def enumerate_stacks(A, B, C=[], D=[], seq=[]):
if len(A)+len(B) == 0:
print seq, C, D
... |
I'm not sure these two concepts are really comparable.
*monotonic writes* is a client based consistency model. It defines what a process sees.
*per-record timeline consistency* strikes me as a memory based model. It doesn't even mention what a client sees or does.
So I would say they are not same or even compa... |
It is proven that neural networks with rational weights has the computational power of the Universal Turing Machine [Turing computability with Neural Nets][1]. From what I get, it seems that using real-valued weights yields even more computational power, though I'm not certain of this one.
However, is there any corr... |
null |
Are there any problems in $P$ that have randomized algorithms beating lower bounds on deterministic algorithms? More concretely, do we know any $k$ for which $DTIME(n^k) \subsetneq PTIME(n^k)$? Does randomness buy us anything inside $P$? |
Problems in P with provably faster randomized algorithms |
|randomized-algorithms| |
So basically, you want to know if there is any sorting algorithm which wouldn't degrade from its average case if given a compare function similar to:
int Compare(object a, object b) { return Random.Next(-1,1); }
... where Random.Next() is some method that will produce a randomly-generated number between a spe... |
Are there any problems in $P$ that have randomized algorithms beating lower bounds on deterministic algorithms? More concretely, do we know any $k$ for which $DTIME(n^k) \subsetneq PTIME(n^k)$? Does randomness buy us anything inside $P$?
**EDIT**: Sorry for making up notation. PTIME(f(n)) means the set of languages ... |
Are there any problems in $P$ that have randomized algorithms beating lower bounds on deterministic algorithms? More concretely, do we know any $k$ for which $DTIME(n^k) \subsetneq PTIME(n^k)$? Does randomness buy us anything inside $P$?
**EDIT**: Sorry for making up notation. PTIME(f(n)) means the set of languages ... |
Are there any problems in $P$ that have randomized algorithms beating lower bounds on deterministic algorithms? More concretely, do we know any $k$ for which $DTIME(n^k) \subsetneq PTIME(n^k)$? Does randomness buy us anything inside $P$?
**EDIT**: Sorry for making up notation. $PTIME(f(n))$ means the set of language... |
There are differences. Most of them are subtle enough that you wouldn't care, but they generally differ either in intent or in implementation. The overarching idea is to provide class A with access to the functionality of class B, without A having to care that it's B doing the work (so that a class C can be substituted... |
The paper Uday Reddy found in his answer, [On Understanding Types, Data Abstraction, and Polymorphism](http://dl.acm.org/citation.cfm?id=6041.6042) (1985), gives the following answers:
> Programming languages in which the type of every expression can be determined by static program analysis are said to be statically... |
null |
Context: I'm working on [this problem](http://stackoverflow.com/questions/10875675/how-to-find-out-all-the-popping-out-possibilities-of-two-stacks):
> There are two stacks here:
> A: 1,2,3,4 <- Stack Top
B: 5,6,7,8
> A and B will pop out to other two stacks: C and D. For example:
> pop(A),p... |
null |
*Polynomial Identity testing* admits a randomised polynomial time algorithm (see
[schwartz-zippel lemma][1] ), and we currently don't have a deterministic
polynomial time or even a sub-exponential time algorithm for it.
[1]: http://en.wikipedia.org/wiki/Schwartz%E2%80%93Zippel_lemma |
The following rank-2 type
$$\text{compose}:\forall ABC\delta. \delta\ (\forall \alpha.\alpha\ A\to \alpha B)\ (\forall \beta.\beta\ B\to \beta C) \to \delta\ (\forall \gamma.\gamma\ A\to \gamma C)$$ seems to be sufficiently general. It is much more polymorphic than the type proposed in the question. Here variable qu... |
***Polynomial Identity testing*** admits a randomised polynomial time algorithm (see
[schwartz-zippel lemma][1] ), and we currently don't have a deterministic
polynomial time or even a sub-exponential time algorithm for it.
***Game Tree evaluation*** Consider a complete binary tree with $n$ leaf nodes each
stori... |
***Polynomial Identity testing*** admits a randomised polynomial time algorithm (see
[Schwartz-Zippel lemma][1] ), and we currently don't have a deterministic
polynomial time or even a sub-exponential time algorithm for it.
***Game Tree evaluation*** Consider a complete binary tree with $n$ leaf nodes each
stori... |
Are there any problems in $\mathsf{P}$ that have randomized algorithms beating lower bounds on deterministic algorithms? More concretely, do we know any $k$ for which $\mathsf{DTIME}(n^k) \subsetneq \mathsf{PTIME}(n^k)$? Here $\mathsf{PTIME}(f(n))$ means the set of languages decidable by a randomized TM with constant-b... |
First, generate all subsets $A_1$ of $A$. $A_1$ will go in $C$ and $A_2=A\backslash A_1$ in $D$. Likewise, generate all subsets $B_1$ of $B$. You then have to generate all possible ordered combinations of $A_1$ and $B_1$ for $C$ and the same for $A_2$ and $B_2$ in $D$.
This amounts to enumerate, given $(a_1,…,a_n)$ ... |
***Polynomial Identity testing*** admits a randomised polynomial time algorithm (see
[Schwartz-Zippel lemma][1] ), and we currently don't have a deterministic
polynomial time or even a sub-exponential time algorithm for it.
***Game Tree evaluation*** Consider a complete binary tree with $n$ leaf nodes each
stori... |
The following rank-2 type
$$\text{compose}:\forall ABC\delta. \delta\ (\forall \alpha.\alpha\ A\to \alpha B)\ (\forall \beta.\beta\ B\to \beta C) \to \delta\ (\forall \gamma.\gamma\ A\to \gamma C)$$ seems to be sufficiently general. It is much more polymorphic than the type proposed in the question. Here variable qu... |
The paper Uday Reddy found in his answer, [On Understanding Types, Data Abstraction, and Polymorphism](http://dl.acm.org/citation.cfm?id=6041.6042) (1985), gives the following answers:
> Programming languages in which the type of every expression can be determined by static program analysis are said to be statically... |
Just a note:
* rational-weighted recurrent $NN$s having boolean activation functions (simple thresholds) are equivalent to finite state automata (Minsky, "Computation: finite and infinite machines", 1967);
* rational-weighted recurrent $NN$s having linear sigmoid activation functions are equivalent to Turing ... |
Can you specify a programming language without implementation? |
|programming-languages| |
Is it theoretically possible to specify a programming language for which no implementation could exist? What is are the minimal requirements of such a language? |
Let us call your problem as RESVC. RESVC is ***NP-Complete***.
Given a subset $S \in L$ its easy to verify in poly. time whether it forms a
valid cover of size k. Hence, RESVC $\in NP$
***RESVC is also NP-Hard***
Because, *Decision version* of Minimum Dominating set
problem reduces to it. And, We know that ... |
***Polynomial Identity testing*** admits a randomised polynomial time algorithm (see
[Schwartz-Zippel lemma][1] ), and we currently don't have a deterministic
polynomial time or even a sub-exponential time algorithm for it.
***Game Tree evaluation*** Consider a complete binary tree with $n$ leaf nodes each
stori... |
Are there any problems in $\mathsf{P}$ that have randomized algorithms beating lower bounds on deterministic algorithms? More concretely, do we know any $k$ for which $\mathsf{DTIME}(n^k) \subsetneq \mathsf{PTIME}(n^k)$? Here $\mathsf{PTIME}(f(n))$ means the set of languages decidable by a randomized TM with constant-b... |
null |
First, generate all subsets $A_1$ of $A$. $A_1$ will go in $C$ and $A_2=A\backslash A_1$ in $D$. Likewise, generate all subsets $B_1$ of $B$. You then have to generate all possible ordered combinations of $A_1$ and $B_1$ for $C$ and the same for $A_2$ and $B_2$ in $D$.
This amounts to enumerate, given $(a_1,…,a_n)$ ... |
The problem can be solved using 2 Dimensional [Range Trees][1] with a slight augmentation.
2D Range Tree supports pre-processing of the $n$ points in $O(n*\log{n})$ time.
The query for enumerating all points in a rectangle defined by 4 points can be done in $O(k+\log{n})$ time. Where $k$ is the number of points... |
Usually, implementing a programming language is at least giving a interpreter in a language (or a compiler to a language) that is no more than Turing-complete.
Using this "definition" we can specify a programming language like this:
- there only one possible program that is `HALT`;
- specification of `HALT`: i... |
Is it theoretically possible to specify a programming language for which no implementation could exist? A programming language is a way of defining functions. An implementation means a method to execute a given program in that language on a given input to the output of the function corresponding to the program on that ... |
null |
null |
null |
(answer for another problem, see the edit below)
First, generate all subsets $A_1$ of $A$. $A_1$ will go in $C$ and $A_2=A\backslash A_1$ in $D$. Likewise, generate all subsets $B_1$ of $B$. You then have to generate all possible ordered combinations of $A_1$ and $B_1$ for $C$ and the same for $A_2$ and $B_2$ in $D$... |
null |
Is there any scientific work about deep copying? So far I have only found source codes (Java, Python, ...). However, there are various approaches and nobody seems to evaluate them.
- Reflection-based (Python)
- Auto-generated shallow-copy-based (Java)
- Compiler-generated polymorphic deep copy (anybody?)
The... |
How to implement deep copy? |
|programming-languages|compilers| |
Partial answer for functional languages:
In Ocaml, I believe this could be done even at runtime, because even if types are removed, we know if a word is a pointer or some data. However, it is not that good of an idea, because in the pure part of Ocaml (which is often well-understood) you don't need deep copy: the da... |
You have to be very careful of what you mean when you say "deep-copying". This came up in a [thread][1] at StackOverflow in relation to C++. The first question you need to address is can an automatic "deep-copy" even be done? Consider just a few basic quesetions:
1. If the type of a data element is a referential t... |
null |
Just a curious side note: the [C++ template engine is Turing-complete][1]
**Theorem 1:** *In the absence of instantiation bounds, C++
templates are Turing-complete.*
**Corollary 1:** *In the absence of instantiation limits, whether
a C++ compiler will halt when compiling a given program
is undecidable.*
.... |
Just a curious side note: the [C++ template engine is Turing-complete][1]
**Theorem 1:** *In the absence of instantiation bounds, C++
templates are Turing-complete.*
**Corollary 1:** *In the absence of instantiation limits, whether
a C++ compiler will halt when compiling a given program
is undecidable.*
.... |
Before touching with *The Art of Computer Programming (TAOCP)*, I have not consider these questions deeply. I use pseudo code to describe algorithms, understand them and estimate the running time only about orders of growth. The *TAOCP* thoroughly changes my mind.
*TAOCP* sticks to use English mixed with steps and *... |
How to describe algorithms, prove and analyse them? |
|algorithms|proof-techniques|runtime-analysis| |
null |
Before reading *The Art of Computer Programming (TAOCP)*, I have not considered these questions deeply. I would use pseudo code to describe algorithms, understand them and estimate the running time only about orders of growth. The *TAOCP* thoroughly changes my mind.
*TAOCP* uses English mixed with steps and *goto* t... |
null |
|computability|programming-languages| |
It is unclear what you mean by a "programming language" and "an implementation of a language". You need to provide rigorous definitions of these two to get an answer.
A "programming" language for computing a (partial) functions over strings can be considered a mapping from $\Sigma^*$ to $2^{\Sigma^*}$. As long as on... |
|formal-languages|computability|programming-languages| |
null |
|computability|neural-networks| |
Let us call your problem as $\mathsf{RESVC}$. $\mathsf{RESVC}$ is NP-Complete.
* Given a subset $S \in L$ its easy to verify in poly. time whether it forms a
valid cover of size k. Hence, $\mathsf{RESVC} \in \mathsf{NP}$
* $\mathsf{RESVC}$ is also NP-hard because the decision version of the *Minimum Dominatin... |
(answer for another problem, see the edit below)
First, generate all subsets $A_1$ of $A$. $A_1$ will go in $C$ and $A_2=A\backslash A_1$ in $D$. Likewise, generate all subsets $B_1$ of $B$. You then have to generate all possible ordered combinations of $A_1$ and $B_1$ for $C$ and the same for $A_2$ and $B_2$ in $D$... |
Before reading *The Art of Computer Programming (TAOCP)*, I have not considered these questions deeply. I would use pseudo code to describe algorithms, understand them and estimate the running time only about orders of growth. The *TAOCP* thoroughly changes my mind.
*TAOCP* uses English mixed with steps and *goto* t... |
null |
Let us call your problem as $\mathsf{RESVC}$. $\mathsf{RESVC}$ is NP-Complete.
* Given a subset $S \in L$ its easy to verify in poly. time whether it forms a
valid cover of size k. Hence, $\mathsf{RESVC} \in \mathsf{NP}$
* $\mathsf{RESVC}$ is also NP-hard because the decision version of the *Minimum Dominatin... |
"The way I read it, that we are required to have $y$ length be equal to one or great, and at the same time, we can completely skip it, since $i\geq 0$, i.e. effectively $|y|=0$."
If $y$ had length $0$, then it would be the empty word, and so it would not be _useful_ that we can skip it (or pump it as many times as w... |
In Logic In Computer Science (2nd Edition - Michael Huth and Mark Ryan), exercise 2.4.12.k is the following:
For each of the formulas of predicate logic below, either find a model which
does not satisfy it, or prove it is valid:
Difficult: (∀x ∃y (P (x) → Q(y))) → (∃y ∀x (P (x) → Q(y)))
Not only am I not sure... |
'Difficult' predicate logic exercise |
|logic| |
In Logic In Computer Science (2nd Edition - Michael Huth and Mark Ryan), exercise 2.4.12.k is the following:
For each of the formulas of predicate logic below, either find a model which
does not satisfy it, or prove it is valid. This one is difficult:
(∀x ∃y (P(x) → Q(y))) → (∃y ∀x (P(x) → Q(y)))
Not only am... |
Is switching quantifiers allowed in this instance? |
There are differences. Most of them are subtle enough that you wouldn't care, but they generally differ either in intent or in implementation. The overarching idea is to provide class A with access to the functionality of class B, without A having to care that it's B doing the work (so that a class C can be substituted... |
The key issue here is whether switching quantifiers is okay. Turn the top-level implication around and see what happens then.
As for this formula, think about what the left- resp. the right-hand side say.
* Left: "Every $x$ has a $y$ so that... holds."
* Right: "There is a $y$ so that ... holds for all $x$."
... |
So basically, you want to know if there is any sorting algorithm which wouldn't degrade from its average case if given a compare function similar to:
int Compare(object a, object b) { return Random.Next(-1,1); }
... where Random.Next() is some method that will produce a randomly-generated number between a spe... |
So basically, you want to know if there is any sorting algorithm which wouldn't degrade from its average case if given a compare function similar to:
int Compare(object a, object b) { return Random.Next(-1,1); }
... where Random.Next() is some method that will produce a randomly-generated number between a spe... |
So basically, you want to know if there is any sorting algorithm which wouldn't degrade from its average case if given a compare function similar to:
int Compare(object a, object b) { return Random.Next(-1,1); }
... where Random.Next() is some method that will produce a randomly-generated number between a spe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.