instruction stringlengths 0 29.8k ⌀ |
|---|
|untagged| |
There is an obvious similarity in workings between Prim's algorithm and Dijkstra's algorithm, however I see no reason for Prim's algorithm to keep track of a node's parent. In Dijkstra's algorithm, the parent of the node needs to be tracked in order to follow the chain back to the original node to determine the dista... |
Keeping the parent of each vertex is not a requirement to get the minimum spanning tree. For example, the algorithm [as described on Wikipedia](http://en.wikipedia.org/wiki/Prim%27s_algorithm#Description) does not do this.
However, it's worth noting that there is more than one representation of an MST. In certain ap... |
I need help finding an **algorithm** which, given a `Turing machine description <M>`, decides whether it belongs to the following language:
L = { <M> | M is a Turing machine and there exists an input w such that in the
computation of M(w) the head only moves right and M never stops }. |
Decider for the family of Turing machines that move infinitly to the right on some input |
|turing-machines| |
> Is it the case that time complexity is always an increasing function
> in the input size? If so, why is it the case?
No. Consider a Turing machine that halts after $n$ steps when the input size $n$ is even, and halts after $n^2$ steps when $n$ is odd.
If you mean the complexity of a _problem_, the answer is s... |
|data-compression| |
Yes, it is always optimal.
No, there is no threshold where it would use less space to use fixed length non-encoded data.
I found a number of proofs on the Web, but there is sufficient discussion in [the Wikipedia article *Huffman coding*](http://en.wikipedia.org/wiki/Huffman_coding).
This also covers other tec... |
null |
|formal-languages|formal-grammars|parsing| |
|formal-languages|formal-grammars|parsing| |
|algorithms|graphs| |
|computability|turing-machines| |
|information-theory|data-compression| |
null |
I need help finding an algorithm which, given a Turing machine description $\langle M \rangle$, decides whether there exists an input $w$ such that in the computation of $M(w)$, the head only moves right and $M$ never stops. |
I am looking at a modelling tool and are trying to determine all the types of ways that you can model (at a rudimentary level)
I remember seeing a list of ways in which you can connect or categorise information elements. basically the types were as follows:
- Lists - constitute a list of information elements
... |
What are the rudimentary types of information connectivity i.e. model types? |
|data-structures|information-theory|structured-data| |
[Metamath](http://metamath.org/) has a large selection of proofs, built right up from their core in propositional logic.
That said, it is painfully lacking in terms of CS theory. Feel free to expand it! |
[Model theory](http://en.wikipedia.org/wiki/Model_theory), branch of mathematical logic, is based on three things: atoms, functions, and relations. With these you can define pretty much anything. In fact, functions are subsumed by relations, so you only need two.
What is a list but a _next_ relation? What is a hiera... |
At the beginning of **Communicating and Mobile Systems: the Pi-Calculus** by Robin Milner, there is a introduction on automata and how they can simulate each other so that they cannot be distinguished : **Bisimulation**.
cf [Bisimulation][1] on wikipedia.
[1]: http://en.wikipedia.org/wiki/Bisimulation |
At the beginning of **Communicating and Mobile Systems: the Pi-Calculus** by Robin Milner, there is a introduction on automata and how they can simulate each other so that they cannot be distinguished : **Bisimulation**.
cf [Bisimulation][1] on wikipedia.
I don't remember well, I should re-read the chapter, but... |
Can an IEEE-754 floating point number < 1 (i.e. generated with a random number generator which generates a number >= 0.0 and < 1.0) ever be multiplied by some integer (in floating point form) to get a number equal to or larger than that integer due to rounding?
i.e.
double r = random() ; // generates a floati... |
Floating point rounding |
|floating-point|ieee-754|rounding| |
At the beginning of **Communicating and Mobile Systems: the Pi-Calculus** by Robin Milner, there is a introduction on automata and how they can simulate each other so that they cannot be distinguished : **Bisimulation**. (cf [Bisimulation][1] on wikipedia)
I don't remember well, I should re-read the chapter, but th... |
There is an obvious similarity in workings between Prim's algorithm and Dijkstra's algorithm, however I see no reason for Prim's algorithm to keep track of a node's parent. In Dijkstra's algorithm, the parent of the node needs to be tracked in order to follow the chain back to the original node to determine the dista... |
|data-structures|information-theory|modelling|structured-data| |
|numerical-analysis|floating-point|rounding| |
null |
Assuming round-to-nearest and that $N > 0$, then $N * R < N$ always. (Be careful not to convert an integer that's too large.)
Every IEEE 754 integer is normal, so let $c 2^{-q} = N$, where $c \in [1, 2)$ is the significand and $q$ is the integer exponent. Let $1 - 2^{-s} = R$ and derive the bound
$$N R = c 2^{-q}... |
Given a Turing machine $M$ for which such an input exists, what does $M$'s state graph look like?
>! For some input $w$, there is a computation of the form $q_0 \leadsto q (\leadsto q)^\omega$ whose transitions all have movement $R$ (or $N$, depending on the meaning of "only"). Therefore, the state graph has to have... |
Assuming round-to-nearest and that $N > 0$, then $N * R < N$ always. (Be careful not to convert an integer that's too large.)
Every IEEE 754 integer is normal, so let $c 2^{-q} = N$, where $c \in [1, 2)$ is the significand and $q$ is the integer exponent. Let $1 - 2^{-s} = R$ and derive the bound
$$N R = c 2^{-q}... |
Assuming round-to-nearest and that $N > 0$, then $N * R < N$ always. (Be careful not to convert an integer that's too large.)
Every IEEE 754 integer is normal, so let $c 2^{-q} = N$, where $c \in [1, 2)$ is the significand and $q$ is the integer exponent. Let $1 - 2^{-s} = R$ and derive the bound
$$N R = c 2^{-q}... |
Assuming round-to-nearest and that $N > 0$, then $N * R < N$ always. (Be careful not to convert an integer that's too large.)
Let $c 2^{-q} = N$, where $c \in [1, 2)$ is the significand and $q$ is the integer exponent. Let $1 - 2^{-s} = R$ and derive the bound
$$N R = c 2^{-q}(1 - 2^{-s}) \le c 2^{-q} - 2^{-q - s... |
You're right, the superscript in this context means concatenation.
To prove a language isn't regular, you use the fact that any regular language can be "pumped". First, find out what "pumping" a word means (I can't do your homework for you), and then show that your language can not be pumped, and thus, can not be r... |
I need to show that
S = {(10^p)^m | p >= 0, m >= 0}
is not a regular language using pumping lemma.
Can I multiply the product of the powers and express it to: `S= (1^m 0^pm)` and apply the pumping lemma where I pump 1's then say that the language doesn't accept the new string? |
Pumping Lemma: is it valid to "multiply the product of powers" in this case? |
|pumping-lemma| |
|regular-languages|automata|finite-automata|pumping-lemma| |
You might look at it as evolution.
In the beginning, computers were programmed purely with binary codes. After that mnemonics were introduced and assembly languages were introduced, mostly depending heavily on the CPU used.
After that higher level (3th level) languages was introduced (Pascal, C, ADA, Cobol), some... |
I need to show that
$\qquad \displaystyle S = \{(10^p)^m \mid p \geq 0, m \geq 0\}$
is not a regular language using pumping lemma.
Can I multiply the product of the powers and express it to: $S = \{ 1^m 0^{pm} \mid \dots \}$ and apply the pumping lemma where I pump 1's then say that the language doesn't accep... |
|formal-languages|regular-languages|pumping-lemma| |
If I understand the notation correctly, only $ab$ can fit both $(a+b)^{*}$ and $(a^{n}b^{n})^{n}$. I see no other way of stacking more $b$'s after the a's, since $a+$ suggest you should have at least one $a$ in every repetition of the expression in parentheses.
$(a+b)^{*}-ab$ seems like a regular language to me, sin... |
The language is defined by
$$(a+b)^*-\{(a^nb^n)^n\mid n \geq1 \}$$
is Context-Free Language? I believe that the answer is that it is not a CFL's, but I can't prove it by Ogden lemma or pumping lemma.
chazisop, (a+b)* means {a,b}*. That's all strings that you can form with the symbols a or b or both. |
Is this language Context-Free? |
|formal-languages|automata| |
null |
> **Possible Duplicate:**
> [Is this language Context-Free?](http://cs.stackexchange.com/questions/2623/is-this-language-context-free)
<!-- End of automatically inserted text -->
The language is defined by
$$(a+b)^*-\{(a^nb^n)^n\mid n \geq1 \}$$
is Context-Free Language? I believe that the answer is that it i... |
{"OriginalQuestionIds":[2623],"Voters":[{"Id":41,"DisplayName":"Kaveh"},{"Id":157,"DisplayName":"Ran G."},{"Id":2205,"DisplayName":"A.Schulz"},{"Id":98,"DisplayName":"Raphael"}]} |
null |
Yeah; each neuron in the spiking network integrates its input, instead of just summing the input of the previous timestep as in the old analog model. |
This is an AI question regarding "3rd generation neural networks" - Spiking Neural Networks (SNN). I was referred here from [StackOverflow](http://stackoverflow.com/questions/9643581/spiking-neural-networks).
I have been studying this concept online from various papers, mainly <a href="http://mathsci.kaist.ac.kr/~n... |
The essential difference between spiking neural networks and earlier generation ANN's |
|untagged| |
This is an AI question regarding "3rd generation neural networks" - Spiking Neural Networks (SNN). I was referred here from [StackOverflow](http://stackoverflow.com/questions/9643581/spiking-neural-networks).
I have been studying this concept online from various papers, mainly <a href="http://mathsci.kaist.ac.kr/~n... |
|terminology|artificial-intelligence|neural-networks| |
If $P$ is the number of processing units available, consider [$P$-ary heaps](https://en.wikipedia.org/wiki/D-ary_heap)¹. When descending to perform some operation on a *set* of keys, you can fork whenever keys lead to different children. If the heap is balanced, this results in independent taks for a uniformly chosen s... |
null |
A classic application of divide and conquer is to solve the following problem:
*Given an array $a[1\dots n]$ of distinct, comparable elements, count the number of inversion pairs in the array: pairs $(i,j)$ such that $a[i] \gt a[j]$ and $i \lt j$.*
One approach to this is to do a Merge Sort, but also counting of ... |
Counting inversion pairs |
|algorithms|reference-request| |
Where should I look for a good introductory text in algorithm complexity? So far, I have had an Algorithms class, and several language classes, but nothing with a theoretical backbone. I get the whole complexity, but sometimes it's hard for me to differentiate between O(1) and O(n) plus there's the whole theta notation... |
Good text on algorithm complexity |
|complexity-theory| |
hope it's possible for this question to be answered in an objective manner.
I'm not studying in a liberal arts college so basically I only get to study one subject. Which would be the better preparation for future research (probably grad school) into theoretical CS? The standard undergraduate math course with analys... |
Undergraduate studies: Math or CS? |
|education| |
You're right, the superscript in this context means concatenation.
To prove a language isn't regular, you use the fact that any regular language can be "pumped". First, find out what "pumping" a word means (I can't do your homework for you), and then show that your language can not be pumped, and thus, can not be r... |
I have been studying [Spiking Neural Networks](http://en.wikipedia.org/wiki/Spiking_neural_network) online from various papers, mainly [Maass (1997)](http://mathsci.kaist.ac.kr/~nipl/am621/lecturenotes/spiking_neurons_2.pdf). I am not entirely sure I understand what makes SNN's pulse-code in contrast to earlier [ANN](h... |
|complexity-theory|reference-request|education|books| |
|algorithms|reference-request|arrays| |
null |
You can surely bet for the famous book of Cormen's "Introduction To Algorithms".
First of all it's quite difficult to understand the book if you don't have sound mathematical base. But for the shake of easy understanding you can skip those mathematical proofs (not recommended).
Also you can go for "Algorithm Design ... |
You should have a look at M. Sipers's "[Introduction to the Theory of Computation][1]". I did read (and understood) this book when I was in High School, so I think it is suitable for you.
Although it's quite formal, everything is also explained in plain English.
It also has a little introduction to proof techniques... |
You should have a look at M. Sipers's "[Introduction to the Theory of Computation][1]". I did read (and understood) this book when I was in High School, so I think it is suitable for you.
Although it's quite formal, everything is also explained in plain English.
It also has a little introduction to proof techniques... |
[http://en.wikipedia.org/wiki/Pushdown_automaton][1]
This wiki doesnt explain what the receiving state is for the generated PDA it just states that there is but one state.
[1]: http://en.wikipedia.org/wiki/Pushdown_automaton |
When generating a PDA from a CFG do I have a receiving state? |
|formal-languages| |
null |
Assuming that you mean accept state when you say receiving state, the construction given in the wikipedia article has one accept state, being the only state in the machine. It accepts when you reach the end of the input with an empty stack. However, the construction used there requires a slight abuse of notation, as yo... |
Echoing Raphael's comments, this is highly subjective without knowing you personally. However, here are the things I'd consider:
Many schools are flexible for your undergrad program, meaning that what you choose likely won't affect your graduate career too too much, particularly if you take a good number of classes ... |
All of the above is correct, but it's noteworthy that BFS and DFS create their own trees, based on the order they use to traverse the tree. Each of those trees has it's own property which can be useful in some sort of problems.
For example, all the edges in the original graph which are not in the BFS tree are cross... |
Where should I look for a good introductory text in algorithm complexity? So far, I have had an Algorithms class, and several language classes, but nothing with a theoretical backbone. I get the whole complexity, but sometimes it's hard for me to differentiate between O(1) and O(n) plus there's the whole theta notation... |
Its a very basic question.
What is the difference between programming language and a scripting language?
Ex: C Vs Perl.
Is it only difference that scripting languages require only the interpreter and don't require compile and linking?
|
what is the difference between scripting language and a normal programming language? |
|programming-languages| |
All scripting languages are also programming languages. The inverse is not true. Languages that "require only the interpreter" are [interpreted language](http://en.wikipedia.org/wiki/Interpreted_languages) (as opposed to a [compiled language](http://en.wikipedia.org/wiki/Compiled_language) -- note that some languages, ... |
I think the difference has a lot more to do with the intended use of the language.
For example, Python is interpreted, and doesn't require compiling and linking, as is Prolog. I would classify both of these as programming languges.
Programming langauges are meant for writing software. They are designed to manage ... |
All scripting languages are also programming languages. The converse is not true. Languages that "require only the interpreter" are [interpreted language](http://en.wikipedia.org/wiki/Interpreted_languages) (as opposed to a [compiled language](http://en.wikipedia.org/wiki/Compiled_language) -- note that some languages,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.