instruction
stringlengths
0
29.8k
⌀
A question was asked at Stack Overflow ([here][1]): > Given an integer $N$, print out all possible > combinations of integer values of $A,B,C$ and $D$ which solve the equation $A^2+B^2+C^2+D^2 = N$. This question is of course related to [Bachet's Conjecture][2] in number theory (sometimes called Lagrange's Four ...
A question was asked at Stack Overflow ([here][1]): > Given an integer $N$, print out all possible > combinations of integer values of $A,B,C$ and $D$ which solve the equation $A^2+B^2+C^2+D^2 = N$. This question is of course related to [Bachet's Conjecture][2] in number theory (sometimes called Lagrange's Four ...
I feel this problem is $NP$-Hard but I don't see any obvious reductions. Consider a sequence of $n$ positive real numbers $a_0,\ldots,a_{n-1}$. Let $S_n$ be the set of permutations on $\{0,\ldots,n-1\}$. We are interested to find $$ \max_{\pi\in S_n}\left( \min_{i=0}^{n-1}\left( \frac{a_{\pi(n)}}{a_{\pi(n-1)...
Find a permutation that maximize the minimum of $\frac{a_n}{a_{n-1}} + \frac{a_n}{a_{n+1}}$.
|reductions|np-hard|
Your statement follows from Corollary 1 in L Lovász, *Connectivity in digraphs*, Journal of Combinatorial Theory, Series B, Volume 15, Issue 2, October 1973, Pages 174-177
Recall that the typical reason for smoothing in the first place is to handle cases where $\#\{X_i = x_i | Y = y\} = 0$. If this wasn't done, we would always get $P(Y=y|X=x) = 0$ whenever this was the case. This happens when, for example, classifying text documents you encounter a word that wasn't in your training d...
|complexity-theory|reductions|np-hard|
Your statement follows from Corollary 1 in L Lovász, [*Connectivity in digraphs*](http://dx.doi.org/10.1016/0095-8956(73)90018-X), Journal of Combinatorial Theory, Series B, Volume 15, Issue 2, October 1973, Pages 174-177
Consider a sequence of $n$ positive real numbers $a_0,\ldots,a_{n-1}$. Let $S_n$ be the set of permutations on $\{0,\ldots,n-1\}$. We are interested to find $$ \max_{\pi\in S_n}\left( \min_{i=0}^{n-1}\left( \frac{a_{\pi(n)}}{a_{\pi(n-1)}} + \frac{a_{\pi(n)}}{a_{\pi(n+1)}}\right)\right) $$ The addition and s...
Find a permutation that maximize the minimum of $\frac{a_n}{a_{n-1}} + \frac{a_n}{a_{n+1}}$
Consider a sequence of $n$ positive real numbers $a_0,\ldots,a_{n-1}$. Let $S_n$ be the set of permutations on $\{0,\ldots,n-1\}$. We are interested to find $$ \max_{\pi\in S_n}\left( \min_{i=0}^{n-1}\left( \frac{a_{\pi(i)}}{a_{\pi(i-1)}} + \frac{a_{\pi(i)}}{a_{\pi(i+1)}}\right)\right) $$ The addition and s...
Consider a sequence of $n$ positive real numbers $a_0,\ldots,a_{n-1}$. Let $S_n$ be the set of permutations on $\{0,\ldots,n-1\}$. We are interested to find $$ \max_{\pi\in S_n}\left( \min_{i=0}^{n-1}\left( \frac{a_{\pi(i)}}{a_{\pi(i-1)}} + \frac{a_{\pi(i)}}{a_{\pi(i+1)}}\right)\right) $$ The addition and s...
Your statement follows from Corollary 1 in L Lovász, [*Connectivity in digraphs*](http://dx.doi.org/10.1016/0095-8956(73)90018-X), Journal of Combinatorial Theory, Series B, Volume 15, Issue 2, October 1973, Pages 174-177 The Corollary says, that if you have a vertex $u$, and for every other vertex $v$ the number...
Recall that the typical reason for smoothing in the first place is to handle cases where $\#\{X_i = x_i | Y = y\} = 0$. If this wasn't done, we would always get $P(Y=y|X=x) = 0$ whenever this was the case. This happens when, for example, classifying text documents you encounter a word that wasn't in your training d...
In the subset sum problem can some of the given numbers $a_1,a_2,a_3,a_n$ be the same. I.e [1,1,1,2,3,4] and the target is 5?Can i assume that i have a specific solution with numbers 2 and 3 and 1,1,1 and 2 is not?
Is this a subset sum instance?
|complexity-theory|
The typical reason for smoothing in the first place is to handle cases where $\#\{X_i = x_i | Y = y\} = 0$. If this wasn't done, we would always get $P(Y=y|X=x) = 0$ whenever this was the case. This happens when, for example, classifying text documents you encounter a word that wasn't in your training data, or just...
What if the electricity goes off while a file is being renamed? Could you lose the file?
What if the electricity goes off while a file is being renamed?
|filesystems|
I'm currently looking at network clustering algorithms (we're currently looking at both directed and undirected, unweighted networks). The algorithms we've tried produce visually nice clusters. However, we would like to evaluate them against some "gold standard" -- a collection of networks in which the clusters have ...
Seeking "gold standard" to evaluate accuracy of network clustering algorithm
|algorithms|data-sets|network-topology|
null
In the Subset Sum problem can some of the given numbers $a_1,a_2,a_3,\dots,a_n$ be the same? For example, we might have $[1,1,1,2,3,4]$ and the target is $5$? Can I assume that I have a specific solution with numbers $2$ and $3$ and $1,1,1$ and $2$ is not?
Does Subset Sum allow multisets?
|complexity-theory|terminology|
{"Voters":[{"Id":41,"DisplayName":"Kaveh"},{"Id":98,"DisplayName":"Raphael"}]}
What's the complexity of Conflict-Driven Clause Learning SAT solvers, compared to DPLL solvers? Was it proven that CDCL is faster in general? Are there instances of SAT that are hard for CDCL but easy for DPLL?
Running time of CDCL
|satisfiability|sat-solvers|
null
Suppose I'm renaming a file and the electricity goes off right in the middle. Naively, it looks like the file could be in some “half-renamed” state. Maybe the name would have half the old name and half the new name. Or maybe the file could disappear altogether because it no longer exists under the old name but it doesn...
|operating-systems|filesystems|fault-tolerance|
{"Voters":[{"Id":39,"DisplayName":"Gilles"}]}
|algorithms|distributed-systems|computer-networks|fault-tolerance|
null
Both CDCL and DPLL need exponential time in the worst case. I am not sure if it can be proved that CDCL is always faster than DPLL on every instance, but there is *major* empirical data suggesting it dominates. For a nice, short overview see the presentation [*Boolean Satisfiability Solving: Past, Present & Future*](ht...
Search for something called a "Journaling File System", of which variants are used on many popular operating systems. The basics of a journaling system are: 1. Record intended change to the journal 2. Make the change This provides basic corruptiong protection in the case of any kind of failure (including th...
|complexity-theory|time-complexity|efficiency|satisfiability|sat-solvers|
Both CDCL and DPLL need exponential time in the worst case. I am not sure if it can be proved that CDCL is always faster than DPLL on every instance, but there is *major* empirical data suggesting it dominates. For a nice, short overview see the presentation [*Boolean Satisfiability Solving: Past, Present & Future*](ht...
Most filesystems and filesystem implementations are designed to be resistant to a loss of power. When you rename a file, with most operating systems, you can expect to always see the file either under its old name or under its new name. If there is any intermediate stage where the file is so to speak half-renamed, the ...
null
A few years ago, [MapReduce](https://en.wikipedia.org/wiki/Mapreduce) was hailed as revolution of distributed programming. There have also been [critics](http://craig-henderson.blogspot.de/2009/11/dewitt-and-stonebrakers-mapreduce-major.html) but by and large there was an enthusiastic hype. It even got patented! [1] ...
What is the novelty in MapReduce?
|algorithms|distributed-systems|parallel-computing|algorithm-design|
In studying logic to understand verifying programs I have found that there are books on logic targeted at Computer Science e.g. - [Logic in Computer Science: Modelling and Reasoning about Systems ][1] - [Mathematical Logic for Computer Science ][2] - [Computability and Logic ][3] - [Handbook of Practical Logi...
That paper's contribution was 1. identifying two orthogonal operators that can be distributed efficiently and fault-tolerantly 2. demonstrating that they can be combined to solve a large number of distributed computation problems 3. identifying specific useful implementation choices and optimizations 4. benchmar...
I am self studying discte math and I am going through MIT Mathematics for CS lecture notes but they do not have solutions available. I got stuck at Problem 3.14, here you can see the PDF online and read the problem. http://www.scribd.com/doc/101941032/3cf Can any one explain me the solutions of problem A, pro...
3CF 3-conjunctive form satisfiability
|logic|3-sat|
> I can not help but think: this is divide & conquer, plain and simple! Almost every engineering methodology boils down to "divide & conquer". If you don't regard a paper as novel unless it contains a revelation as significant as a third alternative to reductionism vs holism then I think your expectations are too h...
> I can not help but think: this is divide & conquer, plain and simple! Almost every engineering methodology boils down to "divide & conquer". If you don't regard a paper as novel unless it contains a revelation as significant as a third alternative to reductionism vs holism then I think your expectations are too h...
In the general case finding a Maximum Independent Subset of a Graph is NP Hard. However consider the following subset of graphs: Create an NxN grid of unit square cells. Build a graph G by creating a vertex corresponding to every cell. Notice that there are $N^2$ vertices. Create an edge between two vertic...
Maximum Independent Subset of 2D Grid Subgraph
|algorithms|graphs|
> I can not help but think: this is divide & conquer, plain and simple! Almost every engineering methodology boils down to "divide & conquer". If you don't regard a paper as novel unless it contains a revelation as significant as a third alternative to reductionism vs holism then I think your expectations are too h...
null
Let me offer an answer that will be much inferior to Mike's in terms of comprehensiveness, but from a model of computation/algorithmic theory standpoint. *Why there is excitement*: MapReduce interleaves parallel and sequential computation; each processor has access to a nontrivial chunk (e.g. $O(n^\epsilon)$) of the...
Think of the following: count = 0 for i = 1 to n: output[i] = do_something(input[i]) count++ Clearly, this is breaking the problem into smaller pieces. But it's a pain to distribute, because `count` is shared between all the loops. The map-reduce paradigm enforces certain constraints, a...
I fully agree with you. From a conceptual perspective, there is nothing really new: Map/Reduce was originally known in Parallel Computing as a data-flow programming model. However, from a practical point of view, Map/Reduce as proposed by Google and with the subsequent open-source implementations has also fueled Cloud ...
I'm trying to find the Maximum Independent Set of a Biparite Graph. I found this in some notes __"May 13, 1998 - University of Washington - CSE 521 - Applications of network flow"__: > __Problem:__ > > Given a bipartite graph $G = (U,V,E)$, find an independent set $U' \cup V'$ which is as large as possible, whe...
Maximum Independent Set of a Bipartite Graph
|algorithms|graphs|network-flow|
null
I'm learning Haskell and I'm fascinated by the language. However I have no serious math or CS background. But I am an experienced software programmer. I want to learn category theory so I can become better at Haskell. Is this a good strategy? How hard is it to learn the requisite category theory?
How hard is category theory?
|untagged|
{"Voters":[{"Id":39,"DisplayName":"Gilles"}]}
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
In the general case finding a Maximum Independent Subset of a Graph is NP-Hard. However consider the following subset of graphs: * Create an $N \times N$ grid of unit square cells. * Build a graph $G$ by creating a vertex corresponding to every cell. Notice that there are $N^2$ vertices. * Create an edge be...
We're running some benchmarks for an approximative query-answering system. It's sufficient to just think of it as running some SQL queries with joins. We are counting the results returned as part of the benchmark. However, the results often contain a lot of redundancy, so just counting results seems coarse. Consider...
Measuring entropy for a table (e.g., SQL results)
|reference-request|information-theory|database-theory|data-compression|
Let me offer an answer that will be much inferior to Mike's in terms of comprehensiveness, but from a model of computation/algorithmic theory standpoint. *Why there is excitement*: MapReduce interleaves parallel and sequential computation; each processor has access to a nontrivial chunk (e.g. $O(n^\epsilon)$) of the...
We're running some benchmarks for an approximative query-answering system. It's sufficient to just think of it as running some SQL queries with joins. We are counting the results returned as part of the benchmark. However, the results often contain a lot of redundancy, so just counting results seems coarse. Consider...
I am self studying discrete math and I am going through MIT Mathematics for CS lecture notes but they do not have solutions available. I got stuck at [Problem 3.14](http://www.scribd.com/doc/101941032/3cf). The problem is about the construction, given an arbitrary propositional formula $F$, of a proposition $C(F)$ such...
Information-theoretic approach to database dependency theory has long history; here is couple of references: http://homepages.inf.ed.ac.uk/libkin/papers/jacm-pods03.pdf http://doi.acm.org/10.1145/335168.336059
By definition, $ \mathsf{RL} $ is a subset of $ \mathsf{NL} $, and so $ \mathsf{coRL} $ is a subset of $ \mathsf{coNL} $. Since $ \mathsf{NL} = \mathsf{coNL} $, $ \mathsf{coRL} $ is also subset of $ \mathsf{NL} $. Moreover, $ \mathsf{NL} \subseteq \mathsf{P} $. Please also note that although it is widely b...
Wondering about any known relations between [$\mathsf{RL}$][1] complexity class (one sided error with logarithmic space) and its complementary class, $\mathsf{coRL}$. Are they the same class? What are $\mathsf{coRL}$'s relation to $\mathsf{NL}$, $\mathsf{P}$? [1]: http://qwiki.stanford.edu/index.php/Comple...
What is known about coRL and RL?
|complexity-theory|complexity-classes|probabilistic-algorithms|
If you have doubts about whether a certain type of relation exists, a good place to search is Rob van Glabbeek's extensive catalogue of such relations. That article is a bit dated by now, but still extremely comprehensive. - [Linear Time-Branching Time Spectrum II][1], Robert J. van Glabbeek, 1993. There are sev...
null
The complement of a maximum independent set is a minimum vertex cover. To find a minimum vertex cover in a bipartite graph, see [König's theorem](http://en.wikipedia.org/wiki/K%C3%B6nig%27s_theorem_%28graph_theory%29).
null
null
Let me offer an answer that will be much inferior to Mike's in terms of comprehensiveness, but from a model of computation/algorithmic theory standpoint. *Why there is excitement*: MapReduce interleaves parallel and sequential computation; each processor has access to a nontrivial chunk (e.g. $O(n^\epsilon)$) of the...
A few years ago, [MapReduce](https://en.wikipedia.org/wiki/Mapreduce) was hailed as revolution of distributed programming. There have also been [critics](http://craig-henderson.blogspot.de/2009/11/dewitt-and-stonebrakers-mapreduce-major.html) but by and large there was an enthusiastic hype. It even got patented! [1] ...
Information-theoretic approach to database dependency theory has long history; here is couple of references: * [An information-theoretic approach to normal forms for relational and XML data](http://dx.doi.org/10.1145/1059513.1059519) by M. Arenas and L. Libkin (2005) * [Information dependencies](http://doi.acm.o...
null
The following predicate logic formula is invalid: (Valid means tautology) $\forall x,\exists y. P(x,y)\to \exists y, \forall x.P(x,y)$ Which of the following are counter models(examples) for it? 1. The predicate $P(x,y)= \; 'y.x=1' \; $where the domain of discourse is $\mathbb{Q}$. 2. The predicate $P(x,y)=...
Is The following predicate logic formula is valid:
|logic|logical-validity|