instruction stringlengths 0 29.8k ⌀ |
|---|
|data-mining|data-sets| |
I am looking for practical applications of Finite State Machines like DFA, NFA, Moore, Mealy machines...
It would be helpful if someone point to examples from Linux Kernel. I know that DFA is used in string matching like KMP algorithm.
What is the significance of NFA, Moore and Mealy machines? |
Practical application of Finite State Machines |
|reference-request|automata|finite-automata| |
I don't understand why $\ n log log n $ is not $\theta (n)$.
Suppose we give n a value of 10,000. Then n log log n is 6020.6. So isn't n log log n upper bound and lower bounded by n, as $n \log \log n$ >= C.n |
why is n log log n not tightly bounded by n |
|algorithms|algorithm-analysis| |
null |
As $n$ grows bigger, the ratio between $n\log\log n$ and $n$, namely $\log\log n$, tends to infinity. Hence it is not possible to upper bound $n\log\log n \leq Cn$ for any constant $C$. If you stare at this inequality, you discover that the constant $C$ must satisfy $\log\log n \leq C$ for all $n$, yet the function $\l... |
I don't understand why $n \log \log n $ is not $\Theta (n)$.
Suppose we give $n$ a value of $10,000$. Then $n \log \log n$ is $6020.6$. So isn't $n \log \log n$ upper- and lower-bounded by $n$, as $n \log \log n \geq Cn$? |
You could not narrow $f(x) = x\log \log x$ with $ g = n $, because inequalities that must be met for this, never occur. Remember that the logarithm function is always increasing.
So, If We had it, $f$ should perform the next inequalite for some constants.
$$ cn\leq f \leq Cn$$
Let's see that, for example a right ... |
You could not narrow $f(x) = x\log \log x$ with $ g = n $, because inequalities that must be met for this, never occur. Remember that the logarithm function is always increasing.
So, If We had it, $f$ should perform the next inequalite for some constants $c$ and $C$.
$$ cn\leq f \leq Cn$$
Let's see that, for exam... |
Consider the language
$$L_{\times 2} = \{ x\bot y\bot z \mid x,y,z\in \{0,1\}, \#_0(x)=\#_0(y) \text{ and } |x|+|y|=z\}$$
(where $\#_0(x)$ denotes the number of zeroes in $x$).
It is easy to decide $L_{\times 2}$ using a HAL machine -- observe that the machine needs to keep track of two properties, the number ... |
Simply, because $\log\log n$ is **not** a constant! actually,
$$\lim_{n\to \infty} \log\log n = \infty$$
while for some function to be $\Theta(n)$ it is required that it is bounded by $cn$ for some **constant** $c$.
**tl;dr** you didn't look at large enough $n$'s. try $n$ = [Graham's number](http://en.wikipedi... |
(the concepts of) DFA/NFA have some applications in the field of compilers and in construction of parsers. They are also use to identify strings according to regular-expressions (i.e. searching "patterns" over the web or over databases)
Moore/Mealy machines, are DFAs that have also output at any tick of the clock. T... |
|asymptotics|recurrence-relation| |
|efficiency|computer-games| |
|asymptotics|recurrence-relation| |
|algorithms|complexity-theory|np-complete| |
|formal-languages|regular-languages| |
Let $\operatorname{value}(x)$ be the result when the symbols of $x$ are multiplied from left to right according to
<p>$\qquad \displaystyle\begin{array}{c|ccc}
\times & a & b & c \\
\hline
a & a & a & c \\
b & c & a & b \\
c & b & c & a
\end{array}$</p>
<p> Is $L=\{xy \mid |x|=|y| \l... |
|algorithms|complexity-theory|graphs|trees| |
> Given a tree $T = (V , F)$, find an algorithm which finds $u \in V$, so in the graph $T = (V \setminus \{u\} , F)$ the size of each connected component is $\lceil |V| / 2 \rceil$ at most. What is the complexity?
Can I please have a hint? |
Find node that splits tree in half |
|context-free|formal-grammars|parsing| |
Based on the comments:
$$S \to 1S00 \mid 100$$ |
Maximum variance and useful information of dataset |
|terminology|asymptotics| |
null |
Use dynamic programming to find division number of each node, For leaf nodes set it to $0$
Then recursively for parent of each leaf node set it to
$division(v) = \Sigma (\text{ }child_i+1)$, and use this recursion structure to set division number of each node, but if in some point if you have division number bigger... |
Use dynamic programming to find division number of each node, For leaf nodes set it to $0$
Then recursively for parent of each leaf node set it to sum of division of it's child, and for each child because it's not calculated in division number of itself add one $+1$:
$$\text{division}(v) = \Sigma (\text{ division(}c... |
|terminology|data-mining|data-sets| |
null |
How do we determine minimum $k$ such that $G$ is a strong $LL(k)$ Grammar
Like for grammar $G$ with the following rules
$S\rightarrow aAcaa \mid bAbcc,A\rightarrow a \mid bb \mid \epsilon$ |
How do we determine minimum $k$ such that $G$ is a strong $LL(k)$ Grammar
Like for grammar $G$ with the following rules
$S\rightarrow aAcaa \mid bAbcc,A\rightarrow a \mid ab \mid \epsilon$ |
What I only got currently from PCP theorem is that it needs at most $O(\log n)$ randomness and $O(1)$ query of proof to approximate. So how does this result relate to the fact that solution to NP problems are hard to approximate? |
Why does PCP theorem imply that NP problems are hard to approximate? |
|complexity-theory|randomized-algorithms| |
Each time you do a search (particularly a "pattern search") in your favorite editor/tool, the pattern is translated into some form of finite state machine, which does the matching.
The lexical analysis part of your compiler/interpreter (yes, even your shell) is again a finite automaton which matches keywords and oth... |
If you compute the numbers
$\qquad a_i = i \cdot \frac{\sqrt{5} - 1}{2} - i \cdot \left\lfloor \frac{\sqrt{5} - 1}{2} \right\rfloor$
for $i=1,\dots,n$ you get $n$ pairwise-distinct numbers (about) evenly spread in $[0,1]$. By scaling to your target set and rounding (down), you get about evenly spread numbers in t... |
If you compute the numbers
$\qquad a_i = i \cdot \frac{\sqrt{5} - 1}{2} - \left\lfloor i \cdot \frac{\sqrt{5} - 1}{2} \right\rfloor$
for $i=1,\dots,n$ you get $n$ pairwise-distinct numbers (about) evenly spread in $[0,1]$. By scaling to your target set and rounding (down), you get about evenly spread numbers in ... |
null |
null |
It means that there exists a polynomial $f(x,y,z)$ such that the algorithm runs in time $f(|S|,n,\frac{1}{\epsilon})$.
Specifically, it means that there are constants $c_1,c_2,c_3\ge 0$ such that the algorithm runs in time $O(|S|^{c_1}\cdot n^{c_2}\cdot (\frac{1}{\epsilon})^{c_3})$.
|
What is meant by saying an algorithm runs in $Poly(|S|,n,\frac{1}{\epsilon})$
Can somebody explain with an example.
Thank you. |
What is the Meaning of the Notation |
|complexity-theory|machine-learning| |
null |
What is meant by saying an algorithm runs in time $Poly(|S|,n,\frac{1}{\epsilon})$.
Can somebody explain with an example.
|
null |
I'm very new to neural networks, and have been trying to figure some things out. So, let's say you come across a neural network which has 100 inputs, a hidden layer with 200 nodes, and 32 outputs. Let's also say that you, the "discoverer" of this particular instance of a neural network, are able to read the weights of... |
What can be learned from the weights in a neural network? |
|machine-learning|neural-networks| |
> Are you able to determine what the algorithm or logic is contained within the neural network? Other than feeding in all possible inputs and studying the outputs it produces.
No, I don't think so, not in a meaningful way. That would be akin to studying the bits in each individual byte of a computer program in an e... |
Why is $n \log \log n$ not tightly bounded by $n$? |
You can use *Fibonacci hashing*, namely
$\qquad h_F(k) = k \cdot \frac{\sqrt{5} - 1}{2} - \left\lfloor k \cdot \frac{\sqrt{5} - 1}{2} \right\rfloor$.
For $k=1,\dots,n$ you get $n$ pairwise-distinct numbers (about) evenly spread in $[0,1]$. By scaling to $[1..M]$ and rounding (down), you get about evenly spread ... |
I think half the battle in answering this question lies in formulating it precisely! A search engine doesn't turn up much, so I was wondering if this is a well-known or well-studied question.
My thoughts: I think the most straightforward way to formulate this question is as in my title: Given constants $t,s,k \in \m... |
How many Turing Machines are there that run in time $t$ or in space $s$ on inputs of length $k$? |
|complexity-theory|reference-request|turing-machines| |
{"OriginalQuestionIds":[9295],"Voters":[{"Id":472,"DisplayName":"Juho"},{"Id":98,"DisplayName":"Raphael"}]} |
Take as an example SAT. The PCP theorem (in one formulation) shows that there is a PCP for SAT which uses $O(\log n)$ bits of randomness, queries $O(1)$ places, always accepts on YES instances, and rejects on NO instances with probability at least $\alpha > 0$. The PCP queries at most $2^{O(\log n)} = n^{O(1)}$ differe... |
I am currently confused by the following situation:
1) The metric $k$-center problem is inapproximable in polynomial time within $2-\epsilon$ unless $P=NP$. <br>
2) The metric $k$-center problem can approximated within $1+\epsilon$ in time $O(k^{O(k/ \epsilon)})$
Did I just win a million dollars or why isn't ... |
$1+\epsilon$ approximation for inapproximable problem (k-center) |
|complexity-theory|approximation|p-vs-np| |
null |
I have two datasets that I am trying to match to one another. One dataset's contents is a subset of the other, but contains typographical errors of varying types and magnitude.
I am applying the following logic to the data linkage process:
Apply regular expressions in an iterative manner with increasing flexibili... |
Distinguishing probabilistic, deterministic, and fuzzy matching methods |
|regular-expressions|fuzzy-logic| |
The first sentence says there is no approximation algorithm with $2-\epsilon$ for k-center, which means $k$ is part of a input, because there is no limitation on $k$, so $k$ can be arbitrary large (as $n$), this is common mistake in context of approximation algorithms and parametrized complexity, this doesn't mean the ... |
Use dynamic programming to find division number of each node, For leaf nodes set it to $0$
Then recursively for parent of each leaf node set it to sum of division of it's child, and for each child because that child is not counted in division number of itself we should add its division number by one to calculate the ... |
Consider the language
$$L_{\times 2} = \big\{ x\bot y\bot z \mid x,y,z\in \{0,1\}, \#_0(x)=\#_0(y) \text{ and } |x|+|y|=z\big \}$$
(where $\#_0(x)$ denotes the number of zeros in $x$).
It is easy to decide $L_{\times 2}$ using a HAL machine — observe that the machine needs to keep track of two properties: the nu... |
null |
You are trying to find the *width* of the poset defined by the given subset of integers and the divisibility relation. The *width* is the maximum number of anti-chains, which is the same as the maximum set of incomparable elements in the poset.
This corresponds exactly to the maximum independent set in the [Comparab... |
$1+\epsilon$ approximation for inapproximable problems |
null |
I am learning the SVM classification and encounter a problem. I am not sure if this dilemma has a terminology for it.
Assume we would like to classify patient by SVM given the samples of healthy people ( of both gender) and people with liver cancer ( of both gender). If we label healthy people sample as class 1 and ... |
Which classifier is more accurate for a SVM classification? |
|machine-learning| |
null |
Nice idea! The problem seems to be in step $(b)$. Replacing $(X_1,B,X_2)$ in an $N$-path by $(X_1,X_2)$ gives an $\bar{N}$-path, but not every $\bar{N}$-path will contain $(X_1,X_2)$. So this is not a bijection. This only says $N(n) \leq \bar{N}(n)$.
**Edit:**
You can in fact show that $\bar{N}(n) = 3N(n)/2$, res... |
I am new to this forum and just a physicist who does this to keep his brain in shape, so please show grace if I do not use the most elegant language. Also please leave a comment, if you think other tags would be more appropriate.
I am trying to solve [this problem][1] for which I need to compute the number of Hamilt... |
Number of Hamiltonian cycles on a Sierpiński graph |
|graphs| |
null |
I'll answer this, even thought the question is not well defined and would possibly be better suited for cross validated. But since it has some connection to information it's not totally off topic here.
Short version: Variance alone is not a good measure of information. PCA chooses the components with the highest eig... |
I'm trying to solve the following problem:
$$ 6AD3 - AF20 $$
Both of these are hex values in two's complement.
I keep getting one answer but it's turning out worng. What I tried to do, was take the complement of AF20, which I got as 50D1, and instead of subtracting, I added it to 6AD3, and I got BBA4, however... |
Subtracting a two's complement value from another two's complement value |
|binary-arithmetic| |
I'm trying to solve [this problem][1].
>**Problem**: Given $n$ positive integers, your task is to select a maximum number of integers so that there are no two numbers $a, b$ in which $a$ is divisible by $b$.
I have to find the Maximum independent set and the size of this set. The size can be found by [König's t... |
How to find the maximum independent set of a directed graph? |
null |
"it depends". weights of neural networks can be graphed or visualized for some insight. this is especially useful if the neural network works with visual processing. it is possible to "derive" what low-level inputs to the neural network create particular neurons in higher levels to "fire" by working backwards through t... |
Consider the language
$$L_{\times 2} = \big\{ x\bot y\bot z \mid x,y,z\in \{0,1\}, \#_0(x)=\#_0(y) \text{ and } |x|+|y|=z\big \}$$
(where $\#_0(x)$ denotes the number of zeros in $x$).
It is easy to decide $L_{\times 2}$ using a HAL machine — observe that the machine needs to keep track of two properties: the nu... |
"it depends". weights of neural networks can be graphed or visualized for some insight. this is especially useful if the neural network works with visual processing. it is possible to "derive" what low-level inputs to the neural network create particular neurons in higher levels to "fire" by working backwards through t... |
I think half the battle in answering this question lies in formulating it precisely! A search engine doesn't turn up much, so I was wondering if this is a well-known or well-studied question.
My thoughts: I think the most straightforward way to formulate this question is as in my title: Given constants $t,s,k \in \m... |
A homework assignment asks me to state the complexity in Big-O notation of the function
$$f(n) = 7n – 3n log n + 100000 $$
I graphed this function and decreases all the way down to zero nearly its entire lifespan.
Therefore I concluded that the complexity is bounded by a constant and has the complexity O(1).
... |
Complexity of an algorithm that decreases as n increases |
|complexity-theory|algorithm-analysis| |
null |
Converting 6AD3 to binary gives 0110 1010 1101 0011 (the division to 4's is just to make it readable)
Converting AF20 to binary gives 1010 1111 0010 0000
To complement the latter in two's complement, we take the bitwise negation (one's complement) and add 1.
So the one's complement is 0101 0000 1101 1111, and ad... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.