id int64 1 141k | title stringlengths 15 150 | body stringlengths 43 35.6k | tags stringlengths 1 118 | label int64 0 1 |
|---|---|---|---|---|
2,240 | Do Higher Order Functions provide more power to Functional Programming? | <p><em>I've asked a similar question <a href="https://cstheory.stackexchange.com/questions/11652/does-high-order-functions-provide-more-power-to-functional-programming">on cstheory.SE</a>.</em></p>

<p>According to <a href="https://stackoverflow.com/a/1990580/209629">this answer on Stackoverflow</a> there is an... | complexity theory lambda calculus functional programming turing completeness | 1 |
2,243 | Is a device with restrictive execution policies Turing-complete? | <p>There are devices that do not allow users to load any application they want on it, only run a limited class of applications approved by the device vendor.</p>

<p>Take an iPhone as an example where new applications are loaded (solely) from app-store and programs that would allow execution of arbitrary code b... | computability turing completeness | 0 |
2,244 | Is connecting islands with pontoons NP-complete? | <p>I have a problem in my mind, I think it is a NPC problem but I don't know how to prove it.</p>

<p>Here is the problem:</p>

<p>There are <strong>k</strong> islands in a very big lake, and there are <strong>n</strong> fan-shaped pontoons. Those pontoons are in the same size but have different initia... | complexity theory np complete np hard | 0 |
2,248 | How are threads implemented in different OSs? | <p>I was reading <strong>Linux Kernel Development</strong> by Robert Love, where I came across this</p>

<blockquote>
 <p>Linux takes an interesting approach to thread support: It does not
 differentiate between threads and normal processes.To the kernel, all
 processes are the same— some just ha... | operating systems process scheduling threads | 0 |
2,249 | voting scheme for peaceful coexistence | <p>Many areas in the world suffer from conflicts between two groups (usually ethnic or religious). For the purpose of this question, I assume that most people of both sides want to live in peace, but there are few extremists who incite hatred and violence. The goal of this question is to find an objective way to filter... | reference request game theory voting | 1 |
2,251 | Why is it seemingly easier to resume torrent downloads than browser downloads? | <p>I really wonder how torrent downloads can be resumed at later point of time.
If such a technology exists, then why is it not possible in browsers?</p>

<p>It is often not possible to pause a browser download so that it can be resumed at a later point of time. Often, the download will start again from the... | computer networks communication protocols | 1 |
2,257 | Generating number of possibilites of popping two stacks to two other stacks | <p>Context: I'm working on <a href="https://stackoverflow.com/questions/10875675/how-to-find-out-all-the-popping-out-possibilities-of-two-stacks">this problem</a>:</p>

<blockquote>
 <p>There are two stacks here:</p>

<pre><code>A: 1,2,3,4 <- Stack Top
 B: 5,6,7,8
</code></pre>
 &#... | algorithms combinatorics efficiency | 1 |
2,259 | Finding interesting anagrams | <p>Say that $a_1a_2\ldots a_n$ and $b_1b_2\ldots b_n$ are two strings of the same length. An <strong>anagramming</strong> of two strings is a bijective mapping $p:[1\ldots n]\to[1\ldots n]$ such that $a_i = b_{p(i)}$ for each $i$.</p>

<p>There might be more than one anagramming for the same pair of strings. ... | algorithms strings search algorithms natural language processing | 1 |
2,263 | Probabilities of duplicate mail detection by comparing notes among servers | <p>I have the following problem:</p>
<blockquote>
<p>We want to implement a filtering strategy in e-mail servers to reduce the number of spam messages. Each server will have a buffer, and before sending an e-mail, it checks whether there is a duplicate of the same message in its own buffer and contacts k distin... | combinatorics probability theory | 1 |
2,272 | Representing Negative and Complex Numbers Using Lambda Calculus | <p>Most tutorials on Lambda Calculus provide example where Positive Integers and Booleans can be represented by Functions. What about -1 and i?</p>
 | data structures lambda calculus integers real numbers | 1 |
2,273 | Numbers of ways of expressing the sum of a number between [a,b] | <p>I need an algorithm to calculate the number of ways of expressing a number N as sum of numbers inside the interval [a, b] </p>
 | algorithms combinatorics | 0 |
2,274 | Enumerating all the walks in a graph between a start vertex and a terminal vertex? | <p>I was reading something about the concept of walks in a graph b/w a start vertex and a terminating vertex in a graph and then suddenly a problem struck me, is there any algorithm or a method that can be used to enumerate all the distinct walks from a start vertex to a terminal vertex in a graph, if so can you all po... | algorithms reference request graphs | 0 |
2,280 | Does there exist any work on creating a Real Number/Probability Theory Framework in COQ? | <p><a href="http://en.wikipedia.org/wiki/Coq">COQ</a> is an interactive theorem prover that uses the calculus of inductive constructions, i.e. it relies heavily on inductive types. Using those, discrete structures like natural numbers, rational numbers, graphs, grammars, semantics etc. are very concisely represented.</... | probability theory coq real numbers uncountability | 1 |
2,283 | Why is the complexity of negative-cycle-cancelling $O(V^2AUW)$? | <p>We want to solve a minimal-cost-flow problem with a generic negative-cycle cancelling algorithm. That is, we start with a random valid flow, and then we do not pick any "good" negative cycles such as minimal average cost cycles, but use Bellman-Ford to discover a minimal cycle and augment along the discovered cycle.... | algorithms graphs algorithm analysis runtime analysis network flow | 0 |
2,284 | What's the difference between a bridge, a mediator and a wrapper? | <p>The slides from my course in software architecture hints that these are seperate terms, but I can't seem to find the difference. Aren't all of them just translating interfaces?</p>
 | terminology software engineering | 0 |
2,292 | Computing follow sets conservatively for a PEG grammar | <p>Given a <a href="https://en.wikipedia.org/wiki/Parsing_expression_grammar" rel="nofollow">parsing expression grammar</a> (PEG) grammar and the name of the start production, I would like to label each node with the set of characters that can follow it. I would be happy with a good approximation that is conservative ... | formal languages reference request formal grammars parsers | 1 |
2,293 | Can the encodings set of a non-trivial class of languages which contains the empty set be recursively enumerable? | <p>Let $C$ be a non-trivial set of recursively enumerable languages ($\emptyset \subsetneq C \subsetneq \mathrm{RE}$) and let $L$ be the set of encodings of Turing machines that recognize some language in $C$: $$L=\{\langle M \rangle \mid L(M) \in C \}$$</p>

<p>Suppose that $\langle M_{loopy}\rangle \in L$, wh... | computability turing machines | 1 |
2,295 | Is the following recurrence for this program's runtime correct? | <p>Let $f$ and $g$ be two functions and $p$ a number. Consider the following program:</p>

<pre><code>Recurs(v,p) :
 find s < v such that f(s,v) < v/2 and g(s,v-s) < p

 if no such s exists then
 return v
 else if s <= v/4 then 
 return v-s U Recurs(s,p)
 else i... | algorithms algorithm analysis runtime analysis recurrence relation | 0 |
2,296 | How to use greedy algorithm to solve this? | <blockquote>
 <p><strong>Possible Duplicate:</strong><br>
 <a href="https://cs.stackexchange.com/questions/2188/how-to-use-greedy-algorithm-to-solve-this">How to use greedy algorithm to solve this?</a> </p>
</blockquote>



<p>You are given $n$ integers $a_1, \ldots, a_n$ all between $0$ ... | algorithms optimization greedy algorithms | 0 |
2,300 | Theoretical speed gain of quad core vs. single core | <p>I first asked this question at cstheory, but they suggested to ask my question here, so here it goes ...</p>

<p>I'm working on my masters thesis and I need to have theoretical value of the (average) speed gain that a quadcore processor brings compared to a singlecore processor, when they both use the same f... | computer architecture performance | 0 |
2,301 | Categorisation of type systems (strong/weak, dynamic/static) | <p>In short: how are type systems categorised in academic contexts; particularly, where can I find reputable sources that make the distinctions between different sorts of type system clear?</p>

<p>In a sense the difficulty with this question is not that I can't find an answer, but rather that I can find too ma... | reference request programming languages type theory | 1 |
2,302 | Restricted version of vertex cover | <p>I am interested in the complexity of the restricted version of the vertex cover problem below:</p>
<blockquote>
<p><strong>Instance:</strong> A bipartite graph <span class="math-container">$G =(L, R, E)$</span> and an integer <span class="math-container">$K$</span>.</p>
<p><strong>Question:</strong> Is t... | complexity theory algorithms graphs | 0 |
2,303 | Non-linear grammars | <p>I look for information about grammars which can be described by a non-linear equation such as a quadratic equation:</p>

<p>$\qquad \displaystyle G \to G G a \mid b$</p>

<p>or</p>

<p>$\qquad \displaystyle G \to G G \mid y G z \mid z G y \mid \varepsilon$</p>

<p>While there is lots ... | reference request formal grammars | 0 |
2,304 | Recursive, Recursively Enumerable and None of the Above | <p>Let </p>

<ul>
<li>$A = \mathrm{R}$ be the set of all languages that are recursive,</li>
<li>$B = \mathrm{RE} \setminus \mathrm{R}$ be the set of all languages that are recursively enumerable but not recursive and</li>
<li>$C = \overline{\mathrm{RE}}$ be the set of all languages that are not recu... | formal languages computability | 1 |
2,306 | "Flow layouts" inside a GUI -- how do I come up with a good algorithm? | <p>I was trying to write some simple code for a "flow layout" manager and what I came up with initially was something like the following (semi-pseudocode):</p>

<pre><code>int rowHeight = 0;
RECT rect = parent.getClientRect();
POINT pos = rect.position; // Start at top-left corner, row by row

... | algorithms computational geometry greedy algorithms user interface | 0 |
2,311 | Turing Machine-Like Formalism for The Actor Model | <p>Turing machines have a <a href="https://en.wikipedia.org/wiki/Turing_machine#Formal_definition">formal</a> symbol alphabet, state and transition-rules based description of how a computation is done. </p>

<p><a href="https://en.wikipedia.org/wiki/Actor_model">The Actor Model</a> is sometimes mentioned as a... | terminology computability reference request programming languages computation models | 0 |
2,312 | Solve a problem through reduction | <p>I am aware that for a problem to be considered NP-Hard, any problem in NP must be reduceable to your problem (problem which you are trying to prove is NP-Hard).</p>

<p>Let's assume that you have proven that a problem <code>Y</code> is NP-Hard, and you have a problem <code>X</code> which you know is in NP, a... | algorithms complexity theory reductions np hard | 0 |
2,317 | Complexity of space density and sequentiality | <p>I'm looking for some standard terminology, metrics and/or applications of the consideration of density and sequentiality of algorithms.</p>

<p>When we measure algorithms we tend to give the big-Oh notation such as $O(n)$ and usually we are measuring time complexity. Somewhat less frequently, though still of... | complexity theory reference request terminology space complexity | 1 |
2,319 | How can a TM M' have a property P if it only accepts a single string x from language of P? | <p>Here is the document: <a href="http://spark-public.s3.amazonaws.com/automata/slides/19_tm4.pdf" rel="nofollow">More Undecidable Problems</a></p>

<p>For a given property $P$ of languages, define $L_P$ as the set of all Turing machines (resp. their encodings) that accept languages with $P$, that is</p>
&#... | computability turing machines | 0 |
2,320 | How to prove that a grammar is unambiguous? | <p>My problem is how can I prove that a grammar is unambiguous?
I have the following grammar:
$$S
→ statement
∣ \mbox{if } expression \mbox{ then } S
∣ \mbox{if } expression \mbox{ then } S \mbox{ else } S$$</p>

<p>and make this to an unambiguous grammar, I think its correct:</p>

<... | context free formal grammars proof techniques ambiguity | 0 |
2,321 | Where should we place action symbols in a grammar? | <p>In the following grammar that is used for math expressions(and other grammars) how do I know where should I place action symbols(@add, @mul, @pushID)? Is there a algorithm for it?</p>

<pre>
E -> TE`
E'-> +T @add E'|ϵ
T -> FT`
T'-> xF @mul T'|ϵ
F -> (E)|@pushID id
</pre>

<p>F... | formal grammars compilers | 0 |
2,326 | Type inference with product types | <p>I’m working on a compiler for a concatenative language and would like to add type inference support. I understand Hindley–Milner, but I’ve been learning the type theory as I go, so I’m unsure of how to adapt it. Is the following system sound and decidably inferable?</p>

<p>A term is a literal, a composition... | programming languages logic compilers type theory type checking | 1 |
2,332 | Expression Problem – looking for a similar standard problem | <p>The <a href="http://en.wikipedia.org/wiki/Expression_problem" rel="nofollow">Expression Problem</a>, populated by Philip Wadler, is a often used to standard problem to evaluate programming languages.</p>

<p>I think it is a very clear and popular example and I wonder if there are any similar standard proble... | reference request programming languages software engineering | 0 |
2,336 | Sorting algorithms which accept a random comparator | <p>Generic sorting algorithms generally take a set of data to sort and a comparator function which can compare two individual elements. If the comparator is an order relation¹, then the output of the algorithm is a sorted list/array.</p>

<p>I am wondering though which sort algorithms would actually <em>work</e... | algorithms randomized algorithms sorting | 1 |
2,338 | How to prove that ε-loops are not necessary in PDAs? | <p>In the context of our investigation of <a href="https://cs.stackexchange.com/questions/110/determining-capabilities-of-a-min-heap-or-other-exotic-state-machines">heap automata</a>, I would like to prove that a particular variant can not accept non-context-sensitive languages. As we have no equivalent grammar model, ... | automata pushdown automata | 1 |
2,339 | per-record timeline consistency vs. monotonic writes | <p>It seems to me that the <em>per-record timeline consistency</em> as defined by Cooper et al. in "PNUTS: Yahoo!’s Hosted Data Serving Platform" mimics the (older?) definition of <em>monotonic writes</em>. From the paper:</p>

<blockquote>
 <p>per-record timeline consistency: all replicas of a given recor... | terminology distributed systems | 1 |
2,341 | Can exactly one of NP and co-NP be equal to P? | <p>Maybe I am missing something obvious, but can it be that P = co-NP $\subsetneq$ NP or vice versa? My feeling is that there must be some theorem that rules out this possibility.</p>
 | complexity theory p vs np | 1 |
2,344 | Mixed-strategy Nash equilibria | <p>Is the following statement always true:</p>

<blockquote>
 <p>if there is a mixed-strategy Nash equilibria then it is unique.</p>
</blockquote>

<p>I know that there can be several pure strategy Nash equilibrias.</p>
 | game theory | 0 |
2,345 | Uni-directional synchronization and locking issues | <p>Suppose there are two databases, $D_1$ and $D_2$. Let's further assume $D_1$ is always up and $D_2$ can be down sometimes. When it goes up again, it has to restart.</p>

<p>$D_1$ is filled by say a dozen other systems with event messages. Those messages have IDs and might be updated or deleted. $D_2$ needs... | distributed systems database theory | 0 |
2,347 | Reduction to equipartition problem from the partition problem? | <p>Equipartition Problem:</p>

<p>Instance: $2n$ positive integers $x_1,\dots,x_{2n}$ such that their sum is even. Let $B$ denote half their sum, so that $\sum x_{i} = 2B$.</p>

<p>Query: Is there a subset $I \subseteq [2n]$ of size $|I| = n$ such that $\sum_{i \in I} x_{i} = B$?</p>

<p>Can the... | complexity theory reductions np hard | 0 |
2,348 | Can you specify a programming language without implementation? | <p>Is it theoretically possible to specify a programming language for which no implementation could exist? A programming language is a way of defining functions. An implementation means a method to execute a given program in that language on a given input to the output of the function corresponding to the program on th... | formal languages computability programming languages | 0 |
2,351 | Speech vs Music classification | <p>I want to determine which parts of an audio file contain speech respectively music.</p>

<p>I hope someone has a made something like this or can tell me where to start. Can you please suggest some method or tutorial for doing the same?</p>
 | reference request pattern recognition | 0 |
2,353 | Is computational power of Neural networks related to the activation function | <p>It is proven that neural networks with rational weights has the computational power of the Universal Turing Machine <a href="http://www.math.rutgers.edu/~sontag/FTP_DIR/aml-turing.pdf" rel="noreferrer">Turing computability with Neural Nets</a>. From what I get, it seems that using real-valued weights yields even mor... | computability neural networks | 0 |
2,357 | Length of mid part of the string in Pumping Lemma | <p>This statement of the pumping lemma from Wikipedia.</p>

<blockquote>
 <p>Let <span class="math-container">$L$</span> be a regular language. Then there exists an integer <span class="math-container">$p \ge 1$</span> (depending only on <span class="math-container">$L$</span>) such that every string <spa... | formal languages regular languages pumping lemma | 0 |
2,362 | Problems in P with provably faster randomized algorithms | <p>Are there any problems in $\mathsf{P}$ that have randomized algorithms beating lower bounds on deterministic algorithms? More concretely, do we know any $k$ for which $\mathsf{DTIME}(n^k) \subsetneq \mathsf{PTIME}(n^k)$? Here $\mathsf{PTIME}(f(n))$ means the set of languages decidable by a randomized TM with constan... | algorithms complexity theory randomized algorithms | 0 |
2,370 | How to implement deep copy? | <p>Is there any scientific work about deep copying? So far I have only found source codes (Java, Python, ...). However, there are various approaches and nobody seems to evaluate them.</p>

<ul>
<li>Reflection-based (Python)</li>
<li>Auto-generated shallow-copy-based (Java)</li>
<li>Compiler-generate... | programming languages compilers | 0 |
2,374 | How to describe algorithms, prove and analyse them? | <p>Before reading <em>The Art of Computer Programming (TAOCP)</em>, I have not considered these questions deeply. I would use pseudo code to describe algorithms, understand them and estimate the running time only about orders of growth. The <em>TAOCP</em> thoroughly changes my mind.</p>

<p><em>TAOCP</em> uses ... | algorithms proof techniques runtime analysis | 1 |
2,379 | Is switching quantifiers allowed in this instance? | <p>In Logic In Computer Science (2nd Edition - Michael Huth and Mark Ryan), exercise 2.4.12.k is the following:</p>

<blockquote>
 <p>For each of the formulas of predicate logic below, either find a model which
 does not satisfy it, or prove it is valid. </p>
</blockquote>

<p>This one is ... | logic logical validity | 0 |
2,382 | Methods to evaluate a system of written rules | <p>I was trying to come up with a system that would evaluate bylaws for an organization as to determine their underlying logic.</p>

<p>I think a first-order predicate system would work for representing the rules, which could be translated from the text via part-of-speech tagging and other NLP techniques. </p>... | machine learning algorithms pattern recognition logic | 1 |
2,383 | Has anyone found polynomial algorithm on Hamiltonian cycle isomorphism? | <p>As the title says, has anyone found a polynomial time algorithm for checking whether two graphs having a Hamiltonian cycle are isomorphic? Is this problem NP-complete?</p>
 | complexity theory graphs time complexity | 0 |
2,385 | Which is the minimal number of operations for intractability? | <p>If we have an algorithm that need to run $n=2$ operations and then halt, I think we could say the problem it solves, is tractable, but if $n=10^{120}$ althought It could be theoretically solvable it seems to be intractable, and what about a problem that needs $n=10^{1000}$, or $n=10^{10^{1000}}$ operations, that's s... | complexity theory church turing thesis | 1 |
2,393 | How to feel intuitively that a language is regular | <p>Given a language $ L= \{a^n b^n c^n\}$, how can I say directly, without looking at production rules, that this language is not regular?</p>

<p>I could use pumping lemma but some guys are saying just looking at the grammar that this is not regular one. How is it possible?</p>
 | formal languages regular languages pumping lemma intuition | 1 |
2,394 | Algorithm to check the 2∀-connectness property of a graph | <p>A graph is 2∀-connected if it remains connected even if any single edge is removed. Let G = (V, E) be a connected undirected graph. Develop an algorithm as fast as possible to check 2∀-connectness of G.</p>

<p>I know the basic idea is to build a DFS searching tree and then check each edge is not on a circle... | algorithms graphs efficiency | 1 |
2,400 | Brute force Delaunay triangulation algorithm complexity | <p>In the book <a href="http://www.cs.uu.nl/geobook/" rel="noreferrer">"Computational Geometry: Algorithms and Applications"</a> by Mark de Berg et al., there is a very simple brute force algorithm for computing Delaunay triangulations. The algorithm uses the notion of <em>illegal edges</em> -- edges that may... | algorithms time complexity algorithm analysis computational geometry runtime analysis | 0 |
2,404 | Online Learning Resources for Discrete Mathematics | <p>Are there any good Discrete mathematics learning web resources with problem sets?</p>
 | reference request education discrete mathematics | 1 |
2,406 | Must Neural Networks always converge? | <h2>Introduction</h2>

<p><strong>Step One</strong></p>

<p>I wrote a standard backpropegating neural network, and to test it, I decided to have it map XOR.</p>

<p>It is a 2-2-1 network (with tanh activation function)</p>

<pre><code>X1 M1
 O1
X2 M2

B1 B2
... | machine learning neural networks | 1 |
2,407 | Time complexity of a triple nested loop with squared indices | <p>I have seen this function in past year exam paper.</p>

<pre><code>public static void run(int n){
 for(int i = 1 ; i * i < n ; i++){
 for(int j = i ; j * j < n ; j++){
 for(int k = j ; k * k < n ; k++){

 }
 }
 }
}
</code>... | algorithm analysis runtime analysis loops | 1 |
2,411 | Attempt to write a function with cubed log runtime complexity $O(\log^3 n)$ | <p>I'm learning Data Structures and Algorithms now, I have a practical question that asked to write a function with O(log<sup>3</sup>n), which means log(n)*log(n)*log(n).</p>

<pre><code>public void run(int n) {
 for (int i = 1; i < n; i *= 2) {
 for (int j = 1; j < n; j *= 2) {
 ... | time complexity | 1 |
2,415 | Shortest distance between a point in A and a point in B | <blockquote>
 <p>Given two sets $A$ and $B$ each containing $n$ disjoint points
 in the plane, compute the shortest distance between a point in $A$ and a point in $B$, i.e., $\min \space \{\mbox{ } \text{dist}(p, q) \mbox{ } | \mbox{ } p \in A \land q \in B \space \} $.</p>
</blockquote>

<p>I am ... | algorithms computational geometry | 1 |
2,417 | Are tamper attacks considered side-channel? | <p><a href="https://en.wikipedia.org/wiki/Side_channel_attack" rel="nofollow">Wikipedia</a> defines <em>side-channel attacks</em> as:</p>

<blockquote>
 <p>any attack based on information gained from the physical implementation of a cryptosystem</p>
</blockquote>

<p>Usually in side channel att... | terminology cryptography | 0 |
2,422 | How to prove 2-EXP != EXP | <p>I am guessing that this is correct for <code>3-EXP</code>, <code>4-EXP</code> etc...</p>

<p>Basically I should find a problem in <code>2-EXP</code> that is not in <code>EXP</code>.
Any examples ?</p>
 | complexity theory | 1 |
2,425 | Semi-decidable problems with linear bound | <p>Take a semi-decidable problem and an algorithm that finds the positive answer in finite time. The run-time of the algorithm, restricted to inputs with a positive answer, cannot be bounded by a computable function. (Otherwise we’d know how long to wait for a positive answer. If the algorithm runs longer than that we ... | computability time complexity undecidability | 1 |
2,433 | A concrete example about string w and string x used in the proof of Rice's Theorem | <p>So, in lectures about Rice's Theorem, reduction is usually used to proved the theorem. Reduction usually consists a construction of $M'$, using a TM $M$ which is in the form $\langle M,w \rangle$ to be simulated first, an input $x$ to be simulated if $M$ accepts. $M'$ accepts if x is accepted. </p>

<p>I re... | computability | 1 |
2,437 | What is the type theory judgement symbol? | <p>In type theory judgements are often presented with the following syntax:</p>

<p><img src="https://i.stack.imgur.com/7V5r2.png" alt="enter image description here"></p>

<p>My question is what is that symbol in the middle called? All the papers I've found seem to use an image rather than a unicode cha... | logic terminology type theory | 1 |
2,442 | Does a collision oracle for the pigeonhole subset sum problem produce solutions? | <p>I am reading "Efficient Cryptographic Schemes Provably as Secure as Subset Sum" by R. Impagliazzo and M. Naor (<a href="http://www.stevens.edu/algebraic/Files/SubsetSum/impagliazzo96efficient.pdf" rel="nofollow">paper</a>) and came across the following statement in the proof of Theorem 3.1 (pages 10-11):</p>
&#x... | complexity theory computability np complete reductions | 0 |
2,443 | Finding the number of distinct permutations of length N with n different symbols | <p>I have one puzzle whose answer I have boiled down to finding the total number and which type of permutation they are.</p>

<p>For example if the string is of length ten as $w = aabbbaabba$, the total number of permutations will be </p>

<p>$\qquad \displaystyle \frac{|w|}{|w|_a! \cdot |w|_b!} = \frac... | algorithms combinatorics strings word combinatorics | 0 |
2,444 | constrained cover on biparite graphs | <blockquote>
 <p><strong>Possible Duplicate:</strong><br>
 <a href="https://cs.stackexchange.com/questions/2302/restricted-version-of-vertex-cover">Restricted version of vertex cover</a> </p>
</blockquote>



<p>Suppose we have a $(A,B,E)$ bipartite graph and a positive integer k. Suppose... | algorithms graphs | 0 |
2,449 | Proving that the cover time for graph is exponential in the worst case | <p>How can I prove that the cover time for a directed graph $G$ can be exponential in the size of $G$?</p>

<p>The cover time is the expected length of a random walk that visits all vertices.</p>
 | algorithms graphs random walks | 0 |
2,450 | How do I construct a doubly connected edge list given a set of line segments? | <blockquote>
 <p>For a given planar graph $G(V,E)$ embedded in the plane, defined by a set of line segments $E= \left \{ e_1,...,e_m \right \} $, each segment $e_i$ is represented by its endpoints $\left \{ L_i,R_i \right \}$. Construct a DCEL data structure for the planar subdivision, describe an algorithm, prove... | algorithms data structures computational geometry doubly connected edge list | 1 |
2,452 | Beating fair colorings with few edges | <p>I have been investigating parallel algorithms to compute certain two-dimensional dynamic programming recursions (on natural parameters); see also <a href="https://cs.stackexchange.com/questions/196/a-case-distinction-on-dynamic-programming-example-needed">here</a>. Under certain assumptions, cases one and two can ac... | graphs colorings | 0 |
2,453 | If any 3 points are collinear | <blockquote>
 <p>Given a set $S$ of points $p_1,..,p_2$ give the most efficient algorithm for determining if any 3 points of the set are collinear.</p>
</blockquote>

<p>The problem is I started with general definition but I cannot continue to actually solving the problem.</p>

<p>What can we s... | algorithms computational geometry | 1 |
2,457 | Improve Markov Chain results | <p>Apologies for another Markov Chain question but this one is best given its own question to avoid confusion. I am using a Markov Chain to get the 10 best search results from the union of 3 different search engines. The top 10 results are taken from each engine to form a set of 30 results.</p>

<p>The chain st... | algorithms machine learning markov chains | 0 |
2,459 | Prove that for a general data structure - operations Extract_min() and Insert(x) cost $\Omega(\log n)$? | <p>I've been given the following problem:</p>

<p>Given a data structure $M$ that is based on comparisons and supports the following methods on a group of numbers $S$:</p>

<ul>
<li>$\text{Insert}(x)$ – add $x$ to $S$</li>
<li>$\text{Extract_min}()$ – remove the minimal element in $S$ and return... | algorithms data structures binary trees search trees | 0 |
2,462 | Why is Turing completeness right? | <p>I am using a digital computer to write this message. Such a machine has a property which, if you think about it, is actually quite remarkable: It is <em>one machine</em> which, if programmed appropriately, can perform <em>any possible computation</em>.</p>

<p>Of course, calculating machines of one kind or a... | computability turing machines history | 1 |
2,464 | Time-space tradeoff for missing element problem | <p>Here is a well-known problem.</p>

<p>Given an array $A[1\dots n]$ of positive integers, output the smallest positive integer not in the array.</p>

<p>The problem can be solved in $O(n)$ space and time: read the array, keep track in $O(n)$ space whether $1,2,\dots,n+1$ occured, scan for smallest ele... | complexity theory time complexity space complexity | 1 |
2,466 | Fastest algorithm for finding the longest palindrome subsequence | <p>First of all we must read a word, and a desired size.<br>
Then we need to find the longest palindrome created by characters in this word used in order.<br>
For example for size = 7 and word = "abcababac" the answer is 7 ("abababa"). </p>

<p>Postscript: the size of the word is smaller than 3000.</p... | algorithms strings subsequences | 0 |
2,470 | Efficient bandwidth algorithm | <p>Recently I sort of stumbled on a problem of finding an efficient topology given a weighted directed graph. Consider the following scenario:</p>

<ol>
<li><p>Node 1 is connected to 2,3,4 at 50 Mbps. Node 1 has 100 Mbps network card.</p></li>
<li><p>Node 3 is connected to 5 at 50 Mbps. Node 3 has 100 M... | algorithms graphs optimization linear programming | 1 |
2,471 | What is the bitwise xor of an interval? | <p>Let $\oplus$ be bitwise xor. Let $k,a,b$ be non-negative integers. $[a..b]=\{x\mid a\leq x, x\leq b\}$, it is called a integer interval.</p>

<p>What is a fast algorithm to find 
$\{ k\oplus x\mid x\in [a..b]\}$ as a union of set of integer intervals.</p>

<p>One can prove that $[a+k..b-k]\subset... | algorithms integers | 1 |
2,476 | What are the minimum requirements for a language to be considered Turing Complete? | <blockquote>
 <p><strong>Possible Duplicate:</strong><br>
 <a href="https://cs.stackexchange.com/questions/991/are-there-minimum-criteria-for-a-programming-language-being-turing-complete">Are there minimum criteria for a programming language being Turing complete?</a> </p>
</blockquote>


&#x... | computability programming languages turing completeness | 0 |
2,482 | Using Dijkstra's algorithm with negative edges? | <p>Most books explain the reason the algorithm doesn't work with negative edges as nodes are deleted from the priority queue after the node is arrived at since the algorithm assumes the shortest distance has been found. However since negative edges can reduce the distance, a future shorter distance might be found; but ... | algorithms graphs shortest path | 0 |
2,487 | What is the time complexity of this function? | <p>This is an example in my lecture notes.
Is this function with time complexity $O(n \log n)$?.
Because the worst case is the funtion goes into <code>else</code> branch, and 2 nested loops with time complexity of $\log n$ and $n$, so it is $O(n \log n)$. Am I right?</p>

<pre><code>int j = 3;
int k... | complexity theory time complexity algorithm analysis runtime analysis | 1 |
2,489 | Is NP-hard closed against cartesian product with arbitrary languages? | <p>If $L_1$ is NP-hard, $L_1 \times L_2$ is NP-hard for every $L_2 \neq \emptyset$, where</p>

<p>$\qquad \displaystyle L_1 \times L_2 = \{(w_1,w_2) \mid w_1 \in L_1, w_2 \in L_2\}$</p>

<p>Is it true or false and why?</p>

<p>I can't prove it but I also don't find counter example.</p>
 | complexity theory np hard | 0 |
2,492 | CLRS - Maxflow Augmented Flow Lemma 26.1 - don't understand use of def. in proof | <p>In Cormen et. al., <em>Introduction to Algorithms</em> (3rd ed.), I don't get a line in the proof of Lemma 26.1 which states that the augmented flow $f\uparrow f'$ is a flow in $G$ and is s.t. $|f\uparrow f'| =|f|+|f'|$ (this is pp. 717-718).</p>

<p>My confusion: When arguing <em>flow-conservation</em> the... | algorithms network flow | 1 |
2,495 | Book for algorithms beyond Cormen | <p>I've finished most of the material in Cormen's Intro to Algorithms book and I am looking for an algorithms book that covers material beyond Corman's book. Are there any recommendations?</p>

<p>NOTE: I asked this on stackoverflow but wasn't all too happy with the answer. </p>

<p>NOTE: Looking at mos... | algorithms reference request books | 1 |
2,498 | Finding at least two paths of same length in a directed graph | <p>Suppose we have a directed graph $G=(V,E)$ and two nodes $A$ and $B$.
I would like to know if there are already algorithms for calculating the following decision problem: </p>

<blockquote>
 <p>Are there at least two paths between $A$ and $B$ of the same length?</p>
</blockquote>

<p>How... | complexity theory graphs time complexity | 0 |
2,501 | Neighbourhood in local search metaheuristic | <p>I cannot seem to find an answer to this question with Google, so I am going to ask here: is it required for a good neighbourhood function that it in principle (i. e. by recursively considering all neighbours of a certain solution - which is not practical) can reach all possible solutions?</p>

<p>My questio... | optimization heuristics | 1 |
2,503 | Eliminating useless productions resulting from PDA to CFG converison | <p>In my class we used a Pushdown Automata to Context Free Grammar conversion algorithm that produces a lot extraneous states.</p>

<p>For example, for two transitions, I am getting the following productions</p>

<blockquote>
 <p>$$\begin{gather*}
 \delta(q_0,1,Z) = (q_0,XZ) \\
 {}[q_0,Z,... | automata formal grammars context free pushdown automata | 1 |
2,507 | How to use dynamic programming to solve this? | <p>Here is the question: suppose we are given x cents, the amount we want to pay, and a 6-tuple (p, n, d, q, l, t) that represents respectively the number of pennies, nickels, dimes, quarters, loonies and toonies you have. Assume that you have enough coins to pay x cents. You do not have to pay exactly x cents; you can... | algorithms optimization dynamic programming | 0 |
2,508 | Could an artificial neural network algorithm be expressed in terms of map-reduce operations? | <p>Could an artificial neural network algorithm be expressed in terms of map-reduce operations? I am also interested more generally in methods of parallelization as applied to ANNs and their application to cloud computing. </p>

<p>I would think one approach would involve running a full ANN on each node and som... | parallel computing artificial intelligence neural networks | 1 |
2,511 | Find all the special graphs which can reduced to the shortest paths graph | <p>I have a directed weighted graph $G = (V, E, W)$. There is always an edge from a vertex $i$ to another one $j$, the weight $w(i,j)$ could be positive infinity, and there does not exist any negative cycle. </p>

<p>An execution of some algorithms will find the lengths (summed weights) of the shortest paths be... | algorithms graphs | 0 |
2,517 | Is there a formal name for this graph operation? | <p>I'm writing a small function to alter a graph in a certain way and was wondering if there is a formal name for the operation. The operation takes two distinct edges, injects a new node between the existing nodes of each edge and then adds an edge between the two new nodes. For example:</p>

<pre><code>add ... | graphs terminology combinatorics | 0 |
2,519 | Efficiently calculating minimum edit distance of a smaller string at each position in a larger one | <p>Given two strings, $r$ and $s$, where $n = |r|$, $m = |s|$ and $m \ll n$, find the minimum edit distance between $s$ for each beginning position in $r$ efficiently.</p>

<p>That is, for each suffix of $r$ beginning at position $k$, $r_k$, find the <a href="http://en.wikipedia.org/wiki/Levenshtein_distance" r... | algorithms runtime analysis strings dynamic programming string metrics | 1 |
2,521 | Is the type inference here really complicated? | <p>There's a <a href="https://stackoverflow.com/questions/9058430/why-doesnt-immutablemap-builder-build-pick-the-correct-type-parameters">question on SO</a> asking why in Java the right type doesn't get picked in a concrete case. I know that Java can't do it in such "complicated" cases, but I'm asking myself <em>WHY</e... | programming languages typing java type inference | 1 |
2,524 | Getting parallel items in dependency resolution | <p>I have implemented a topological sort based on the <a href="http://en.wikipedia.org/wiki/Topological_sort">Wikipedia article</a> which I'm using for dependency resolution, but it returns a linear list. What kind of algorithm can I use to find the independent paths?</p>
 | algorithms graphs parallel computing scheduling | 1 |
2,527 | Algorithm to test a graph for $t$-transitivity | <p>I am looking for an algorithm, which given a graph $G$ and a natural number $t$, determines if $G$ is <a href="http://en.wikipedia.org/wiki/Symmetric_graph">$t$-transitive</a>.</p>

<p>I am also interested in knowing if this problem is in P, NP, NPC or some other interesting facts about its complexity class.... | algorithms graphs | 0 |
2,528 | Are supersets of non-regular languages also non-regular? | <p>I have to proof that if $L_1 \subset L_2$ and $L_1$ is not regular then $L_2$ it not regular. This is my proof. Is it valid? </p>

<p>Since $L_1$ is not regular, there does not exists a finite automata $M_1$ such that $L_1$ is the language of $M_1$. Pick $x\in L_1$. So $x \in L_2$ and suppose that $L_2$ is r... | formal languages regular languages automata finite automata check my proof | 0 |
2,531 | Time to construct a GNBA for LTL formula | <p>I have a problem with the proof for constructing a GNBA (<a href="https://en.wikipedia.org/wiki/Generalized_B%C3%BCchi_automaton" rel="nofollow">generalized nondeterministic Büchi automaton</a>) for a <a href="https://en.wikipedia.org/wiki/Linear_temporal_logic" rel="nofollow">LTL formula</a>:</p>

<p><stron... | logic automata formal methods model checking linear temporal logic | 1 |
2,532 | What is the number of expressions containing n pairs of matching brackets with nesting limit? | <p>I know the answer <em>without</em> nesting limit is the Catalan number. My question is, specifically, is there a recurrence relation that gives the number of expression containing $n$ pairs of matching brackets such that no more than $l$ open brackets are not closed at any given point?</p>

<p>For instance, ... | formal languages combinatorics recurrence relation word combinatorics | 0 |
2,536 | How does worst-fit memory allocation react when encountering contiguous empty memory blocks? | <p>So I have a problem understanding how the <a href="http://courses.cs.vt.edu/csonline/OS/Lessons/MemoryAllocation/index.html" rel="nofollow">worst-fit protocol for memory allocation</a> reacts to contiguous blocks of empty memory. None of the examples I have found address this possibility.</p>

<p>For exampl... | algorithms operating systems memory allocation | 0 |
2,537 | Intersection and union of a regular and a non-regular language | <blockquote>
 <p>Let $L_1$ be regular, $L_1 \cap L_2$ regular, $L_2$ not regular. Show that $L_1 \cup L_2$ is not regular or give a counterexample.</p>
</blockquote>

<p>I tried this: Look at $L_1 \setminus (L_2 \cap L_1)$. This one is regular. I can construct a finite automaton for this: $L_1$ is regu... | formal languages regular languages | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.