instruction
stringlengths
0
29.8k
⌀
|turing-machines|reductions|
null
For example sets $H$ and $\overline{H}$. Because if $\overline{H} \leq_m H$, then $\overline{H}$ would be recursively enumerable and therefore $H$ would be recursive, which is contradiction. On the other hand $\overline{H} \leq_T H$, because there is Turing machine with oracle $H$ recognizing $\overline{H}$. This...
The key distinction (or at least one important one) is that Turing reductions are *oracle* based, whereas many-one reductions require a *total computable function* (i.e. you need to be able to map all inputs to something). With this in mind we can get a pretty clear example: Consider the set of Turing machines that ...
For example sets $H = \{x \, | $ Turing machine with index $x$ halts on input $x\}$ and $\overline{H} = \{x \, | $ Turing machine with index $x$ doesn't halt on input $x\}$. Because if $\overline{H} \leq_m H$, then $\overline{H}$ would be recursively enumerable and therefore $H$ would be recursive, which is contradi...
I mean not in the respect that the processor is a physical black box whereas interpreter implementation is not that clear. I mean in the aspect that both are functionally the same -- they both execute a program (a stream of commands). There is a long [article on interpretation in Wikipedia][1]. It uses a lot of word...
Can "interpreter" and "processor" be used interchangably?
|terminology|
null
I do not ask you to respect that the processor is a physical black box whereas interpreter implementation is not that clear. As CS, you must look at the functionality aspect -- both processor (physical machine?) and interpreter (virtual machine?) execute a program (a stream of commands). There is a long [article on ...
Can terms "interpreter" and "processor" be used interchangably?
I do not ask you to respect that the processor is a physical black box whereas interpreter implementation is not that clear. As CS, you must look at the functionality aspect -- both processor (physical machine?) and interpreter (virtual machine?) execute a program (a stream of commands). Isn't *to interpret* the cod...
IPv6 addresses in the form of `862A:7373:3386:BF1F:8D77:D3D2:220F:D7E0` are much harder to memorize or even transcribe than the 4 octets of IPv4. There [have](http://blog.jgc.org/2011/07/pronounceable-ipv6-addresses-wpa2-psk.html?m=1) [been](http://www.halfbakery.com/idea/IPv6_20Worded_20Addresses#1260513928) atte...
You fell into the trap of thinking that formal language theory deals with meaning. It doesn't. In formal language theory, a context-free language is ambiguous if some context-free grammar generates exactly that language, while none of them do so in such a way that each string in the language has only a single parse ...
null
Looks like the $\Omega(\dfrac{log\ n}{log\ log\ n})$ barrier has been overcome by modifying the analysis from the chronogram technique. The new [lower] $\Omega(log\ n)$ bound has been proved for similar problems in the cell-probe model`[1]`. From reading that article; it is my understanding that that bound applie...
I think it's hard to beat the CLRS book (Introduction to Algorithms by Cormen, Leiserson, Rivest, Stein) in terms of depth, breadth, or clarity of explanation. Algorithm Design, by Kleinberg and Tardos, is also very good and not nearly as intimidating. Personally, even as someone who enjoys learning out of books mo...
An ambiguous Language is a formal language for which there exists a string that can have more than one meaning (several possible meanings or interpretations). Multiple synthesis structures for a string. **[Question]** Are Roman numbers an example of an ambiguous language? Because there can be more then one...
null
For recursion have a look at this tutorial: - http://learnyouahaskell.com/recursion or - http://learnyousomeerlang.com/recursion It follows somehow the "dummies" way but it is very illustrative and relatively strong (I mean you will get the necessities). The main problems is that you will have to learn a new ...
No. Inside my Mac there is a processor, not an interpreter. ZX Spectrum came with a Basic interpreter built in, not a Basic processor. What is the point of this question?
Genetic algorithms are a metaheuristic and as such there is no general analysis that applies to all genetic algorithms at once (without being super loose). In general, when you are searching for information on the run-time of genetic algorithms, you will have more luck if you use the terms "convergence time", since tha...
I have rank-deficient matrix $M \in \mathbb{R}^{n\times m}$ with $\text{rank}(M) = k$ and I want to find a [rank factorization](http://en.wikipedia.org/wiki/Rank_factorization) $M = PQ$ with $P \in \mathbb{R}^{n \times k}$ and $Q \in \mathbb{R}^{k \times m}$. A popular approach is to compute the singular value deco...
null
Usually, an interpreter is defined in computing terms: it executes instructions by issuing instructions to some lower level of processing. A processor is defined in physical terms: it executes instructions in electronic circuits. It's an interpreter if its behavior is ultimately defined by computer scientists, and a pr...
The key distinction (or at least one important one) is that Turing reductions are *oracle* based, whereas many-one reductions require a *total computable function* (i.e. you need to be able to map all inputs to something). With this in mind we can get a pretty clear example: Consider the set of Turing machines that ...
null
Let $A$ be any nontrivial language such as $\{a\}$ and let $B$ be the empty language $\emptyset$. $A$ is Turing-reducible to $B$ because, given an oracle for the empty language, we can determine if an input string is $a$ or not. But $A$ is not many-one reducible to $B$ because there is nothing to map the input $a...
null
Let $A$ be any nontrivial language such as $\{a\}$ and let $B$ be the empty language $\emptyset$. $A$ is Turing-reducible to $B$ because, given an oracle for the empty language, we can determine if an input string is $a$ or not. (We need not even use the oracle.) But $A$ is not many-one reducible to $B$ because t...
The [Coursera course on Algorithms][1] running currently suggests four books: CLRS - Cormen, Leiserson, Rivest, and Stein, Introdution to Algorithms (3rd edition) DPV - Dasgupta, Papadimitriou, and Vazirani, Algorithms KT - Kleinberg and Tardos, Algorithm Design SW - Sedgewick and Wayne, Algorithms (4th edition) ...
null
I know the general concept of recursion. I came across the concept of **tail recursion** while studying the quicksort algorithm.However I was through this [video of quick sort algorithm from MIT][1] and at 18:30 seconds the professor says that this is tail recursive algorithm. I am not clear in my mind, what is meant ...
null
Tail recursion is a special case of recursion where the calling function does no more computation after making a recursive call. For example, the function <pre> int f(int x, int y) { if (y == 0) { return x; } return f(x*y, y-1); } </pre> is tail recursive (since the final instruction is a recu...
Tail-recursion is a form of recursion in which the recursive calls are the last instructions in the function (that's where the tail part comes from). Moreover, the recursive call must not be composed with references to memory cells storing previous values (references other than the parameters of the function). In this ...
I need to give a talk about [expander codes](http://en.wikipedia.org/wiki/Expander_code) at university (I'm a student of computer science). Since they have been introduced to show a family of codes looking good when thinking of the [Shannon theorem](http://en.wikipedia.org/wiki/Noisy-channel_coding_theorem), I wonder w...
Application of Expander Codes
|coding-theory|
null
Your understanding is correct. 1. Yes, you do create a new neural network for each chromosome (although you're considering the network structure as fixed, so technically you could reuse them by just resetting the weights anew for each chromosome. 2. For the error, you're on the right track. For a GA, generally on...
Hi I want to ask about weight selection in neural network using genetic algorithm. Right now what I understand is 1. Initialize population 2. Encode the weight of the neural network to the chromosome 3. Calculating the error and fitness 4. crossover and mutation 5. looping until satisfy the condition Is ...
Neural Network weight selection using Genetic Algorithm
|untagged|
null
I know the general concept of recursion. I came across the concept of **tail recursion** while studying the quicksort algorithm. In this [video of quick sort algorithm from MIT][1] at 18:30 seconds the professor says that this is a tail recursive algorithm. It is not clear to me what tail recursion really means. ...
null
what kind of heuristics are useful in a tree decomposition of a graph to find k shortest paths from a given source to a vertex? Moreover, the local shortest paths at each node in a tree are precomputed. Here, the graph is undirected and weighted. i'm interested in finding only simple paths i.e., no nodes are repeated i...
Heuristics in tree decomposition for k shortest paths
|graphs|
|graphs|heuristics|
The function $UC$ is well-defined. Of course, the definition is not given by some sort of algorithm but by a formal statement. In particular, the value of $UC(\alpha)$ can be either 1, if some condition $X$ is satisfied, or 0 if condition $Y$ is satisfied. But since $X$ ($M_\alpha(\alpha)=1$) is the negation of $Y$ ($M...
null
I'd really like your help with the proving or refuting the following claim: $BPP(0.90,0.95)=BPP$. In computational complexity theory, BPP, which stands for bounded-error probabilistic polynomial time is the class of decision problems solvable by a probabilistic Turing machine in polynomial time, with an error probabili...
Prove\Refute: $BPP(0.90,0.95)=BPP$
|complexity-theory|time-complexity|
I have frequency data for different events under two conditions, resulting in sets of frequencies F1 and F2. I would like to normalize the frequencies of events under condition 1 by their frequencies under condition 2. However, there are events that occur in condition 1 but not condition 2, resulting in divide-by-zero ...
Smoothing frequencies without count data
|algorithms|probability-theory|
I'd really like your help with the proving or refuting the following claim: $BPP(0.90,0.95)=BPP$. In computational complexity theory, BPP, which stands for [bounded-error probabilistic polynomial time](http://en.wikipedia.org/wiki/BPP_(complexity)) is the class of decision problems solvable by a probabilistic Turing ma...
Prove or refute: BPP(0.90,0.95) = BPP
|complexity-theory|time-complexity|probabilistic-algorithms|
null
My answer is based on the explanation given in the book [Structure and Interpretation of Computer Programs][1]. I highly recommend this book to computer scientists. **Approach A**: Called as a **Linear Recursive Process** (define (factorail n) (if (= n 1) 1 (* n (factorial (- n 1))))) S...
null
I have 2 questions regarding Bipartiteness with corresponding examples. 1) Can a non-connected graph be bipartite if it has an isolated vertex? Let's take the following graph: ![enter image description here][1] <br/> I would say YES with this partition: V<sub>1</sub> = {A, D, G} ; V<sub>2</sub> = {B, C, E, F, H...
Graph Bipartiteness
|graphs|bipartite-matching|
![enter image description here][1] A graph with two sides L and R such that all edges go between L and R is a bipartite graph. Hence, your first part is correct and so is your second part. It doesn't matter as long as both are [independent sets][2]. [1]: https://i.stack.imgur.com/l8YGb.png [2]: http://...
null
|algorithms|asymptotics|approximation|
I went through a question which asked to represent $0.145 * 2^{14}$ in normalized floating point arithmetic with the format 1 - Sign bit 7 - Exponent in Excess-64 form 8 - Mantissa $(0.145)_{10} = (0.00100101001...)_2$ (say A). We shift it 3 bits to left to make it normalized $(1.00101001)_2 * 2^{11...
Normalizing the mantissa in floating point representation
|binary-arithmetic|floating-point|rounding|
What kind of heuristics are useful in a tree decomposition of a graph to find the k shortest paths from a given source to a vertex? Moreover, the local shortest paths at each node in a tree are precomputed. Here, the graph is undirected and weighted. I'm interested in finding only simple paths, i.e., no nodes are r...
Heuristics for tree decomposition into k shortest paths
null
To expand out my comment into an answer: the multiplicative form of Chernoff's bound says that if the expectation $X=\sum_{i=0}^n X_i$ for the sum of independent random binary variables is $\mu$, then the probability of straying 'too far' from that expectation goes as: $Pr(X\gt (1+\delta)\mu) \lt \left(\dfrac{e^\delta}...
null
In the interests of putting up an explicit answer, your approach is correct. The proof is sketched on the [Wikipedia page for Clique Cover](http://en.wikipedia.org/wiki/Clique_cover_problem). The reduction itself is fairly straightforward. The reasoning is that if a graph is $k$-colourable, then it can be partitione...
The *cyclic shift* (also called *rotation* or *conjugation*) of a language $L$ is defined as $\{ yx \mid xy \in L \}$. According to [wikipedia][1] (and [here][2]) the context-free languages are closed under this operation, with references to papers from Oshiba and from Maslov. Is there an easy proof of this fact? ...
context-free languages closed under cyclic shift
|context-free|closure-properties|
Let's consider distributed version of algorithm for finding MIS of any graph $A$. For details, MIS - [Maximimal Independent Set](http://en.wikipedia.org/wiki/Maximal_independent_set). Slow version of distributed algorithm for MIS, page 2 - [Distributed algorithms. Maximal Independent Set](http://disco.ethz.ch/le...
Maximimal Independent Set on Ring and Path
|algorithms|graphs|distributed-systems|
null
Consider [Greibach normal form](http://en.wikipedia.org/wiki/Greibach_normal_form). To construct a shifted language you only need to change productions $S \to \alpha A_1 \dots A_n$ to $S \to A_1\dots A_n \alpha$ and add a new non-terminal $S'$ that behaves like $S$ used to, in case some some production referenced $S$.
Min cost flow finds the minimum weight of the maximum flow in the network. Use {0,1} capacities to turn it to matching. It can be modified for maximum weight. http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=minimumCostFlow1 http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=minimumCostFlow...
Min cost flow finds the minimum weight of the maximum flow in the network. Use {0,1} capacities to turn it to matching. It can be modified for maximum weight. http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=minimumCostFlow1 http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=minimumCostF...
Yes. $\:$ Assume that the counts have the smallest sum that would produce your frequency data. $\:$ (How to do that depends on whether the frequencies were calculated and stored as doubles or something else.)
To expand out my comment into an answer: the multiplicative form of Chernoff's bound says that if the expectation $X=\sum_{i=0}^n X_i$ for the sum of independent random binary variables is $\mu$, then the probability of straying 'too far' from that expectation goes as: $Pr(X\gt (1+\delta)\mu) \lt \left(\dfrac{e^\delta}...
null
No left recursion in an LL(1) grammar. A grammar with A → αβ1 | αβ2 is not LL(1).
I am doing some excercises to train myself in computability. There is one that I am not able to solve, here it is. Consider the following transformation associated to an extended WHILE program: For all $x \in \mathbb{N}$, $\begin{cases} A f(x) = x \cdot f((x+3)/2) & \text{if \(x\) is odd} \\ A f(x) = f(x+...
Fixpoints of a transformation of an extended WHILE program