instruction
stringlengths
0
29.8k
⌀
A Standard ML structure is akin to an *algebra*. Its signature describes an entire *class of algebras* of similar shape. A Standard ML functor is a map from a class of algebras to another class of algebras. An analogy is, for instance, with the functors $F : {\bf Mon} \to {\bf Grp}$, which adds an inverse operatio...
Given a $0,1$ (binary) integer program of the form: $$ \begin{array}{lll} \text{min} & f(x) & \\ \text{s.t.} &A\vec{x} = \vec{b} & \quad \forall i\\ &x_i\ge 0 & \quad \forall i\\ &x_i \in \{0,1\} & \quad \forall i \end{array} $$ Note: the size of $A$ is not fixed in either dimension. I believe this probl...
I am looking for an efficient algorithm to find streaming data median. [Median][1] is described as the numerical value separating the higher half of a sample, a population, or a probability distribution, from the lower half. We have stream of data in our system like 1, 10, -40, 20, 2, 6,.....Our task is find median...
Streaming Median
|algorithms|statistics|
Just to list some, all with running time more or less $2^{O(\sqrt{n} \log n)}n^{O(1)}$ or $2^{O(\sqrt{n})}n^{O(1)}$: * Feedback Arc Set on Tournaments [Alon et al ALP 2009] * Minimum Fill-in [Fomin and Villanger SODA 2012] * Chain Completion [ $ - $ ] * Split Edge Deletion [Ghosh et al SWAT 2012] * Cluster ...
|programming-languages|functional-programming|category-theory|
In reading [Uday Reddy's][1] [answer][2] to [What is the relation between functors in SML and Category theory?][3] Uday states > Category theory doesn't yet know how to deal with higher-order > functions. Some day, it will. As I thought Category theory was able to serve as a foundation for math, then it should b...
What is meant by Category theory doesn't yet know how to deal with higher-order functions?
|functional-programming|category-theory|
null
The issue with higher-order functions is simple enough to state. A type-constructor like $T(X) = [X \to X]$ is not a functor. It should have been. A polymorphic function like ${\it twice}_X = T(X) \to T(X)$ is not a natural transformation. It should have been. If you read [Eilenberg and MacLane](http://www.jstor.o...
Are there $\mathsf{NP}$-complete problems which have proven subexponential-time algorithms? I am asking for the general case inputes, I am not talking about tractable special cases here. By sub-exponential, i mean order of growths above polynomial but less than exponential like n^(logn)
null
|automata|finite-automata|
I am concerned with the question of **the asymptotic running time of the Ukkonen's algorithm**, perhaps the most popular algorithm for constructing **suffix trees** in linear (?) time. Here is a citation from the book "Algorithms on strings, trees and sequences" by Dan Gusfield (section 6.5.1): > *"... the Aho-Co...
How does the runtime of the Ukkonen's algorithm depend on the alphabet size?
|algorithms|data-structures|algorithm-analysis|strings|
I am concerned with the question of **the asymptotic running time of the Ukkonen's algorithm**, perhaps the most popular algorithm for constructing **suffix trees** in linear (?) time. Here is a citation from the book "Algorithms on strings, trees and sequences" by Dan Gusfield (section 6.5.1): > *"... the Aho-Co...
null
The issue with higher-order functions is simple enough to state. A type-constructor like $T(X) = [X \to X]$ is not a functor. It should have been. A polymorphic function like ${\it twice}_X : T(X) \to T(X) = \lambda f.\, f \circ f$ is not a natural transformation. It should have been. If you read [Eilenberg and Ma...
I read about time complexity modular arithmetic in many books . there is thing I don't understood . I read in some books the following For any a mod N, a has a multiplicative inverse modulo N if and only if it is relatively prime to N. When this inverse exists, it can be found in time O(n^3) (where as usual n deno...
time complexity for modular arithmatic
|complexity-theory|time-complexity|compilers|
I struggle with few definitions in knowledge representation and seek credible help to distinguish between them. I have been searching on wikipedia and many websites for the difference between ontologies and semantic networks (not to be confused with semantic web). While the [wikipedia][1] page on semantic network never...
null
null
You can find the median approximately with this: [Approximate Medians and other Quantiles in One Pass and With Limited Memory][1], to some degree of confidence. That algorithm works, but it's pretty slow. One of the authors of that paper, Gurmeet Manku, has [some other publications][2] that might be what you're lookin...
A semantic network is a **graphic notation** for representing knowledge in patterns of **interconnected nodes and arcs**. It is one way for **knowledge visualization** and presentation. It was used firstly for for artificial intelligence and machine translation in computer science. What is common to all semantic netw...
I have a simple problem of making a DFA which accepts all inputs starting with double letters (aa, bb) or ending with double letters (aa, bb), given $\Sigma =\{a, b\}$ is the alphabet set of the given language. I tried to solve it in a roundabout way by: 1. Generating a regular expression 2. Making its correspon...
You are fine up to step 3 (the DFA) but your minimization is incorrect. It's clear that the minimized DFA is not right, because both the inputs `ba` and `ab` (which are not in the original language, nor are they accepted by the DFA in step 3) lead to final state `E`. Looking at your minimization steps, it seems t...
>Given a graph G: is there an algorithm, bounded by a polynomial of order k, that can determine if G is 3-colorable-or-non-3-colorable and provide a certificate? I think what you meant here was: given a graph $G$, find whether there is a certificate or short proof for whether it is 3-colorable. What you're missing h...
The running time of a library function depends on the way the library function is implemented. Moreover, oftentimes it is worthwhile to code non-optimal algorithms, since for practical $n$ they might be more efficient. One good example is matrix multiplication, where the fancy algorithms are slower in practice than opt...
Depends on what you mean by subexponential. Below I explain the two meanings that "subexponential" is used to refer to and what happens in each case. ---- ### $2^{O(n^\epsilon)}$ for some $\epsilon>0$: If by subexponential you mean $2^{O(n^\epsilon)}$ for some $\epsilon>0$ then the answer is yes, there are provabl...
Depends on what you mean by subexponential. Below I explain the two meanings that "subexponential" is used to refer to and what happens in each case. ---- ### $2^{O(n^\epsilon)}$ for some $\epsilon<1$: If by subexponential you mean $2^{O(n^\epsilon)}$ for some $\epsilon<1$ then the answer is yes, there are prova...
Depends on what you mean by subexponential. Below I explain the two meanings that "subexponential" is used to refer to and what happens in each case. ---- ### First Meaning: $2^{O(n^\epsilon)}$ for some $\epsilon<1$ If by subexponential you mean $2^{O(n^\epsilon)}$ for some $\epsilon<1$ then the answer is yes, t...
null
I have eye-tracking data on two subjects -- a teacher, and a student. It's in the form (x, y, time), so there is a series of these for each subject. What the teacher looks at influences what the student looks at. What method would I use to predict what the student is looking at, using only teacher data? Lets say I can ...
What learning algorithm is appropriate for predicting one time-series from another?
|machine-learning|
If $A^2$ is regular then A is regular? Answer: Yes. For Contradiction assume that A is not regular. then $A^2$=A.A is also not regular.so if $A^2$ is regular then A is regular. Am i Correct? Can We generalize This to $A^3$,$A^4$ etc... and also if $A^*$ is regular then A need not be regular. Ex: Let A={1^...
Star operation on Regular language
|regular-languages|
I am concerned with the question of **the asymptotic running time of the Ukkonen's algorithm**, perhaps the most popular algorithm for constructing **suffix trees** in linear (?) time. Here is a citation from the book "Algorithms on strings, trees and sequences" by Dan Gusfield (section 6.5.1): > "... the Aho-Cor...
If $A^2$ is regular then `A` is regular? Answer: Yes. For Contradiction assume that `A` is not regular. then $A^2$=A.A Since Concatenation of two non-regular language is not regular $A^2$ is not regular.This contradicts our assumption. So `A` is regular is also not regular.so if $A^2$ is regular then A is regu...
Your proof still makes a huge jump (arguing that concatenation of non-regular languages is non-regular). If the Goldbach conjecture is true, then the answer to the question is no: Consider the non-regular language $A=\{1^p: p\text{ is a prime}\}$. Then by the Goldbach conjecture, $A^2=\{1^{2k}: k>1\}$, which is re...
If $A^2$ is regular, is then $A$ is regular? Answer: Yes. For Contradiction assume that $A$ is not regular. then $A^2$=A.A Since Concatenation of two non-regular language is not regular $A^2$ is not regular.This contradicts our assumption. So $A$ is regular is also not regular.so if $A^2$ is regular then A is regul...
Is $A$ regular if $A^{*}$ is reglular?
The issue with higher-order functions is simple enough to state. - A type-constructor like $T(X) = [X \to X]$ is not a functor. It should have been. - A polymorphic function like ${\it twice}_X : T(X) \to T(X) = \lambda f.\, f \circ f$ is not a natural transformation. It should have been. If you read...
Can someone help with this: L={a^ib^j∣ i,j≥1 and i≠j and i<2j} I'm trying to write a grammar for this language? I tried this: S->S1|S2 S1->aXb X-> aXb|aaXb|aab S2-> aYb Y-> aYb|Yb|b what you think?
Context Free Grammar for language L
|regular-languages|context-free|formal-grammars|finite-automata|pushdown-automata|
There is a trivial example of $A$ irregular and $A^*$ regular, namely $A = \{1^{2^k} | k \geq 0 \}$. Then $A^* = \{1^n | n \geq 1\}$. Consider base 2, if this is not obvious.
Is $A$ regular if $A^{2}$ is reglular?
{"Voters":[{"Id":5167,"DisplayName":"Karolis Juodelė"}]}
[This second answer presents an outline of what a "Category Theory 2.0", that deals with higher-order functions properly, might look like.] We have known for a long time how to deal with higher-order functions in reasoning about them. - When an algebraic structure has higher-order operations, homomorphisms don'...
Consider [Lagrange's four square theorem](http://en.wikipedia.org/wiki/Lagrange's_four-square_theorem). It states that if $B = \{1^{n^2}| n \geq 0\}$ then $B^4 = \{1^n | n \geq 0\}$. If $B^2$ is regular, take $A = B$ else take $A = B^2$. Either way, this proves the existence of irregular $A$ such that $A^2$ is regular.
{"Voters":[{"Id":5167,"DisplayName":"Karolis Juodelė"}]}
I have question , someone can help? If i have L -infinte language that stand Pumping lemma for regular languages and i need to prove that L* also standing in the conditions of the lemma. how can i do it?
Pumping lemma for regular languages
|formal-languages|regular-languages|finite-automata|pumping-lemma|pushdown-automata|
![question][1] Hi, I need to detrmine if the The following language are regular / free content and to explain please help me with that / [1]: https://i.stack.imgur.com/0k9II.jpg
regular / free content language
|regular-languages|context-free|finite-automata|regular-expressions|pushdown-automata|
$L_1$ is finite. $L_2$ is a concatenation of $x^*$ and a finite language. $L_3$ is about a hard as $\{x^iy^j | i > j\}$. I'm leaving these as hints. Add a comment if you can't figure out why this is true.
In order to show the pumping property of a string like $x_1x_2 \dots x_n$, where each $x_i\in L$ you can distinguish two cases. Either $x_1$ is "short", which means you can pump $x_1$ completely and stay within $L^*$, or $x_1$ is "long" and you can pump "inside" $x_1$.
If $A^2$ is regular, does it follow that $A$ is regular? My attempt on a proof: > Yes, for contradiction assume that $A$ is not regular. Then $A^2 = A \cdot A$. > Since concatenation of two non-regular language is not regular $A^2$ cannot be regular. This contradicts our assumption. So $A$ is regular. So ...
null
I need to determine if the following languages are regular / context free and to explain please help me with that. ![question][1] [1]: https://i.stack.imgur.com/0k9II.jpg
The issue with higher-order functions is simple enough to state. - A type-constructor like $T(X) = [X \to X]$ is not a functor. It should have been. - A polymorphic function like ${\it twice}_X : T(X) \to T(X) = \lambda f.\, f \circ f$ is not a natural transformation. It should have been. If you read...
I read about the time complexity for modular arithmetic in many books. There is one thing that I don't understand. I read in some books the following: For any $a \mod N$, $a$ has a multiplicative inverse modulo $N$ if and only if it is relatively prime to $N$. When this inverse exists, it can be found in time $O(n^3...
Time complexity for modular arithmatic
|time-complexity|compilers|
I have question, can someone help? If I have $L$, an infinte language that stands Pumping lemma for regular languages and I need to prove that $L^*$ also stands the conditions of the lemma. How can I do it?
Can someone help with this: $L=\{a^ib^j \mid i,j \ge 1 \text{ and } i \ne j \text{ and } i<2j\}$ I'm trying to write a grammar for this language? I tried this: $S \to S_1 \mid S_2 \\ S_1 \to aXb \\ X \to aXb \mid aaXb \mid aab \\ S_2 \to aYb \\ Y \to aYb \mid Yb \mid b \\ $ What do you think?
|complexity-theory|np-complete|reductions|proof-techniques|
|formal-languages|context-free|formal-grammars|
|complexity-theory|np-complete|approximation|integer-programming|
[This second answer presents an outline of what a "Category Theory 2.0", that deals with higher-order functions properly, might look like.] We have known for a long time how to deal with higher-order functions in reasoning about them. - When an algebraic structure has higher-order operations, homomorphisms don'...
|formal-languages|regular-languages|closure-properties|
I need to determine if the following languages are regular / context free and to explain. Please help me with that. $$L_1 = \{ a^{i_{1}}b a^{i_{2}}b a^{i_{3}}b a^{i_{4}}b a^{i_{5}}b a^{i_{6}}b a^{i_{7}}b a^{i_{8}}b a^{i_{9}}b a^{i_{10}}b \mid i_1 > i_2 > i_3 > i_4 > i_5 > i_6 > i_7 > i_8 > i_9 > i_{10} ; i_1 < 10...
Regular and context free languages
If I have an infinite language $L$ which fulfills the Pumping lemma for regular languages, does $L^*$ also fulfill the same conditions?
Is pumping lemma for regular languages "closed" against Kleene star?
|formal-languages|regular-languages|pumping-lemma|
|formal-languages|regular-languages|context-free|
|formal-languages|context-free|formal-grammars|
Just to list some, all with running time more or less $2^{O(\sqrt{n} \log n)}n^{O(1)}$ or $2^{O(\sqrt{n})}n^{O(1)}$: * [Feedback Arc Set on Tournaments][1] [Noga Alon , Daniel Lokshtanov , Saket Saurabh, ALP 2009] * [Minimum Fill-in and Chain Completion][2] [Fomin and Villanger SODA 2012] * [Split Edge Deletion...
null
The claim is wrong. Let $D$ be non-regular language which is "sparse": if $x \in D$ then any other $y\in D$ satisfies $|y| > 4|x|$ (or $|x|>4|y|$)<sup>$\dagger$</sup>. It's not too difficult to see that many non-regular languages can be sparse. Now define $A = \Sigma^* \setminus D$. From closure properties (com...
Here is an example of a non-computable language $A$ such that $A^2 = \Sigma^*$. Take any non-computable $K$, and define $$ A = \{ w \in \Sigma^* : |w| \neq 4^k \text{ for all } k \in K \}. $$ So $A$ contains all words other than ones of length $4^k$ for some $k \in K$. Claim: $A^2 = \Sigma^*$. Let $w$ be any word ...
I have eye-tracking data on two subjects -- a teacher, and a student. It's in the form (x, y, time), so there is a series of these for each subject. What the teacher looks at influences what the student looks at. What method would I use to predict what the student is looking at, using only teacher data? Lets say I can ...
null
It depends on which part of your question you put the emphasis. If it is specifically the property of being anonymous for anonymous functions, then indeed the only answer is that they are unbound _values_. If you are talking about functions in general, anonymous functions are probably the most visible manifestation of...
Can i use Set Theory principles in order to solve the following question? For every A,B that belong to CO-RE and there is a separating language named C which A belong to C and B intersected with C is Empty set (i.e foreign langs), there exist such a C that belongs to R (recursive).. thanks!
Reducability and Turing machines
|turing-machines|reductions|
null
null
"for infinitely many input sizes $n$, $P(n)$ holds" means there are input sizes $n_1$, $n_2$, $\ldots$, (infinitely many) such that $P(n_i)$ holds for all $i$. In other words, for every integer $k$, there is an input length $n \geq k$ such that $P(n)$ holds. In contrast, "for all input sizes, $P(n)$ holds" means tha...