id int64 1 141k | title stringlengths 15 150 | body stringlengths 43 35.6k | tags stringlengths 1 118 | label int64 0 1 |
|---|---|---|---|---|
1,597 | Maximise sum of "non-overlapping" numbers in square array - help with proof | <p>A <a href="https://stackoverflow.com/questions/10378738/maximise-sum-of-non-overlapping-numbers-from-matrix">question was posted on Stack Overflow</a> asking for an algorithm to solve this problem:</p>

<blockquote>
 <p>I have a matrix (call it A) which is nxn. I wish to select a subset
 (call it B... | algorithms dynamic programming check my algorithm | 1 |
1,602 | Distributed Storage for Access and Preservation | <p>My organization wants to maintain multiple copies of data in order to preserve access in the case of localized disasters as well as for the purpose of long term preservation. Are there accepted formal models for determining the appropriate variety of media (eg tape, disk) and their placement in the network? Are curr... | digital preservation distributed systems storage | 0 |
1,603 | Mapping Reductions to Complement of A$_{TM}$ | <p>I have a general question about mapping reductions. I have seen several examples of reducing functions to $A_{TM}$</p>

<p>where $A_{TM} = \{\langle M, w \rangle : \text{ For } M \text{ is a turing machine which accepts string } w\}$</p>

<p>which is great for proving undecidability. But say I want t... | computability proof techniques reductions | 1 |
1,606 | Restricted version of the Clique problem? | <p>Consider the following version of the Clique problem where the input is of size $n$ and we're asked to find a clique of size $k$. The restriction is that the decision procedure cannot change the input graph into any other representation and cannot use any other representation to compute its answer, other than $\log(... | complexity theory time complexity | 1 |
1,607 | Reduction rule for IF? | <p>I'm working through Simon Peyton Jones' "The Implementation of Functional Programming Languages" and on page 20 I see:</p>

<pre>
IF TRUE ((λp.p) 3) ↔ IF TRUE 3 (per β red) (1)
 ↔ (λx.IF TRUE 3 x) (per η red) (2)
 &#... | logic programming languages lambda calculus term rewriting operational semantics | 0 |
1,609 | Example of Soundness & Completeness of Inference | <p>Is the following example correct about whether an <em>inference</em> algorithm is <em>sound</em> and <em>complete</em>? </p>

<p>Suppose we have needles a, b, c in a haystack, and have also an inference algorithm that is designed to find needles.</p>

<ul>
<li><p><em>sound</em> - Only needles a, ... | logic | 1 |
1,616 | Irregularity of $\{a^ib^jc^k \mid \text{if } i=1 \text{ then } j=k \}$ | <p>I read <a href="https://cs.stackexchange.com/questions/1027/using-pumping-lemma-to-prove-language-is-not-regular">on the site</a> on how to use the pumping lemma but still I don't what is wrong with way I'm using it for proving that the following language is not a regular language:</p>

<p>$L = \{a^ib^jc^k \... | formal languages regular languages pumping lemma | 1 |
1,625 | Invariant For Nested Loop in Matrix Multiplication Program | <p>I'm making a graduate thesis about proving correctness of program for multiplying 2 matrices using Hoare logic. For doing this, I need to generate the invariant for nested loop for this program:</p>

<pre><code>for i = 1:n
 for j = 1:n
 for k = 1:n
 C(i,j) = A(i,k)*B(k,j) + C... | algorithms loop invariants correctness proof | 0 |
1,626 | Efficient data structures for building a fast spell checker | <p>I'm trying to write a spell-checker which should work with a pretty large dictionary. I really want an efficient way to index my dictionary data to be used using a <a href="http://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance" rel="noreferrer">Damerau-Levenshtein</a> distance to determine which words ar... | data structures strings string metrics | 0 |
1,632 | All soldiers should shoot at the same time | <p>When I was a student, I saw a problem in a digital systems/logic design textbook, about N soldiers standing in a row, and want to shoot at the same time. A more difficult version of the problem was that the soldiers stand in a general network instead of a row. I am sure this is a classical problem, but I cannot reme... | algorithms distributed systems clocks | 1 |
1,634 | Target-Value Search (& II) | <p>[<em>previously appearing in cstheory, it was closed there and introduced here instead</em>]</p>

<p>Given an edge-weighted graph $G=(V,E)$ the problem of finding the shortest path is known to be in P ---and indeed a simple approach would be Dijkstra's algorithm which can solve this problem in $O(V^2)$. A si... | algorithms complexity theory reference request search algorithms | 0 |
1,636 | Reason to learn propositional & predicate logic | <p>I can understand the importance that computer scientists or any software development related engineers should have understood the study of basic logics as a basis. </p>

<p>But is there any tasks/jobs that explicitly require the knowledge about these, other than the tasks that require any kind of knowledge r... | logic | 1 |
1,640 | Approximate minimum-weighted tree decomposition on complete graphs | <p>Say I have a weighted undirected complete graph $G = (V, E)$. Each edge $e = (u, v, w)$ is assigned with a positive weight $w$. I want to calculate the minimum-weighted $(d, h)$-tree-decomposition. By $(d, h)$-tree-decomposition, I mean to divide the vertices $V$ into $k$ trees, such that the height of each tree is ... | algorithms complexity theory graphs approximation | 0 |
1,643 | How can we assume that basic operations on numbers take constant time? | <p>Normally in algorithms we do not care about comparison, addition, or subtraction of numbers -- we assume they run in time $O(1)$. For example, we assume this when we say that comparison-based sorting is $O(n\log n)$, but when numbers are too big to fit into registers, we normally represent them as arrays so basic o... | algorithms complexity theory algorithm analysis time complexity reference question | 1 |
1,647 | How to scale down parallel complexity results to constantly many cores? | <p>I have had problems accepting the complexity theoretic view of "efficiently solved by parallel algorithm" which is given by the class <a href="https://en.wikipedia.org/wiki/NC_%28complexity%29">NC</a>:</p>

<blockquote>
 <p>NC is the class of problems that can be solved by a parallel algorithm in time $... | complexity theory reference request parallel computing | 1 |
1,652 | The operator $A(L)= \{w \mid ww \in L\}$ | <p>Consider the operator $A(L)= \{w \mid ww \in L\}$. Apparently, the class of context free languages is not closed against $A$. Still, after a lot of thinking, I can't find any CFL for which $A(L)$ wouldn't be CFL. </p>

<p>Does anyone have an idea for such a language?</p>
 | formal languages context free closure properties | 1 |
1,662 | Why are lambda-abstractions the only terms that are values in the untyped lambda calculus? | <p>I am confused about the following claim: "The only values in the untyped lambda calculus are lambda-abstractions".</p>

<p>Why are the other terms not values? What does it mean for a lambda-abstraction to be a value? The first thing that came to my mind was that maybe lambda-abstractions are the only possibl... | logic lambda calculus | 1 |
1,665 | Frame Pointers in Assembler | <p>I am currently learning assembly programming on wombat 4, I am looking at Frame pointers. I understand exactly what a frame pointer is: it is a register and are used to access parameters on a stack. But i'm confused on how they affect the program counter and why they are preferred over normal registers. </p>
&#x... | computer architecture compilers | 1 |
1,666 | Please explain this formal definition of computation | <p>I am trying to attack TAOCP once again, given the sheer literal heaviness of the volumes I have trouble committing to it seriously. In TAOCP 1 Knuth writes, page 8, basic concepts::</p>

<blockquote>
 <p>Let $A$ be a finite set of letters. Let $A^*$ be the set of all strings in $A$ (the set of all order... | formal languages turing machines computation models | 0 |
1,669 | Connection between KMP prefix function and string matching automaton | <p>Let $A_P = (Q,\Sigma,\delta,0,\{m\})$ the <em>string matching automaton</em> for pattern $P \in \Sigma^m$, that is </p>

<ul>
<li>$Q = \{0,1,\dots,m\}$</li>
<li>$\delta(q,a) = \sigma_P(P_{0,q}\cdot a)$ for all $q\in Q$ and $a\in \Sigma$</li>
</ul>

<p>with $\sigma_P(w)$ the length of the ... | algorithms finite automata strings searching | 1 |
1,671 | Connection between castability and convexity | <p>I am wondering if there are any connection between convex polygon and castable object? What can we say about castability of the object if we know that the object is convex polygon and vice versa.</p>
<p>Let's gather together few basic things that we have to know.</p>
<blockquote>
<p>The object is castabl... | complexity theory time complexity computational geometry | 1 |
1,672 | Line separates two sets of points | <p>If there is a way to identify if two sets of points can be separated by a line?</p>

<blockquote>
 <p>We have two sets of points $A$ and $B$ if there is a line that separates $A$ and $B$ such that all points of $A$ and only $A$ on the one side of the line, and all points of $B$ and only $B$ on the other... | algorithms machine learning computational geometry | 1 |
1,680 | Is WPA2 with pre-shared key an example of a zero-knowledge proof? | <p>When setting up an access point and selecting WPA2, one must manually enter a pre-shared key (a password), PSK, into both the AP and the STA. </p>

<p>Both parties, AP and STA, must authenticate each other. But they have to do so without revealing the PSK. Both have to proof to the other party that they know... | cryptography security authentication | 0 |
1,681 | Big-Endian/Little-Endian argument - paper by Danny Cohen | <p>Reading a book I was redirected to <a href="http://www.ietf.org/rfc/ien/ien137.txt" rel="nofollow">"On holy wars and a plea for peace"</a> paper by Danny Cohen, which covers the "holy war" between big-endians and little-endians considering byte-order.</p>

<p>Reaching the summary of the memory section I got ... | terminology computer architecture | 1 |
1,682 | Solving Recurrence Equations containing two Recursion Calls | <p>I am trying to find a $\Theta$ bound for the following recurrence equation:</p>

<p>$$ T(n) = 2 T(n/2) + T(n/3) + 2n^2+ 5n + 42 $$ </p>

<p>I figure Master Theorem is inappropriate due to differing amount of subproblems and divisions. Also recursion trees do not work since there is no $T(1)$ or rathe... | asymptotics recurrence relation master theorem | 0 |
1,689 | Subset sum, pseudo-polynomial time dynamic programming solution? | <p>I found the P vs NP problem some time ago and I have recently worked on the subset sum problem. I have read <a href="http://en.wikipedia.org/wiki/Subset_sum_problem" rel="nofollow noreferrer">Wikipedia article</a> on the Subset Sum problem as well as the question <a href="https://stackoverflow.com/questions/4355955/... | algorithms dynamic programming | 0 |
1,692 | Prove fingerprinting | <p>Let $a \neq b$ be two integers from the interval $[1, 2^n].$ Let $p$ be a random prime with $ 1 \le p \le n^c.$ Prove that
$$\text{Pr}_{p \in \mathsf{Primes}}\{a \equiv b \pmod{p}\} \le c \ln(n)/(n^{c-1}).$$</p>

<p>Hint: As a consequence of the prime number theorem, exactly $n/ \ln(n) \pm o(n/\ln(n))$ ... | probability theory information theory coding theory number theory | 1 |
1,693 | A faster, leaner JavaScript for scientific computing: what features should I keep? | <p>Here I'm really interested in lowering barriers to mathematical education.</p>

<p>Target:</p>

<p>I'd like to see created for the JavaScript community, an equivalent of the Python-based/linked <strong>scientific and high-performance computing</strong> libraries (great lists of which are available th... | programming languages compilers performance | 0 |
1,694 | Is it possible to use dynamic programming to factor numbers | <p>Let's say I am trying to break all the numbers from 1 to N down into their prime factors. Once I have the factors from 1 to N-1, is there an algorithm to give me the factors of 1 to N using dynamic programming?</p>
 | algorithms dynamic programming factoring | 0 |
1,697 | Are there undecidable properties of non-turing-complete automata? | <p>Are there undecidable properties of linear bounded automata (avoiding the empty set language trick)? What about for a deterministic finite automaton? (put aside intractability). </p>

<p>I would like to get an example (if possible) of an undecidable problem that is defined <em>without using Turing machines</... | computability automata undecidability | 1 |
1,698 | Find the minimal number of runs to visit every edge of a directed graph | <p>I am looking for an algorithm to find a minimal traversal of a directed graph of the following type. Two vertices are given, a start vertex and a terminating vertex. The traversal consists of several runs; each run is a path from the start vertex to the terminating vertex. A run may visit a node more than once. The ... | algorithms graphs | 0 |
1,700 | What is meant by interrupts in the context of operating systems? | <p>I've decided to read <a href="http://rads.stackoverflow.com/amzn/click/0470128720" rel="noreferrer">Operating Systems Concepts</a> by Silberschatz, Galvin Gagne (8th edition) over the summer. I've gotten to a topic that's confusing me - interrupts and their role as it relates to operating systems. </p>

<p>T... | operating systems computer architecture process scheduling | 1 |
1,706 | Why is this example a regular language? | <p>Consider this example (taken from this document: <a href="http://www.cs.nott.ac.uk/~txa/g51mal/notes-3x.pdf" rel="nofollow">Showing that language is not regular</a>):</p>

<p>$$L = \{1^n \mid n\text{ is even}\} $$</p>

<p>According to the Pumping Lemma, a language $L$ is regular if :</p>

<ul... | formal languages regular languages proof techniques | 1 |
1,710 | Organisation and Architecture of Quantum Computers | <p>What are devices and their interconnections used alongwith Quantum Processors? Are they compatible with hardware devices like Cache, RAM, Disks of current computers?</p>
 | computer architecture quantum computing | 1 |
1,712 | Randomized String Searching | <p>I need to detect whether a binary pattern $P$ of length $m$ occurs in a binary text $T$ of length $n$ where $m < n$.</p>

<p>I want to state an algorithm that runs in time $O(n)$ where we assume that arithmetic operations on $O(\log_2 n)$ bit numbers can be executed in constant time. The algorithm should ... | algorithms strings searching probabilistic algorithms | 1 |
1,713 | Expected space consumption of skip lists | <p>What is the expected space used by the skip list after inserting $n$ elements?</p>

<p>I expect that in the worst case the space consumption may grow indefinitely.</p>

<p><a href="http://en.wikipedia.org/wiki/Skip_list" rel="nofollow">Wikipedia</a> says space $O(n)$.</p>

<p>How can this be p... | data structures space complexity | 0 |
1,726 | how do you prove that SAT is NP-complete? | <p>As it is, how do you prove that SAT is NP-complete?</p>

<p>I know what it means by NP-complete, so I do not need an explanation on that.</p>

<p>What I want to know is how do you know that one problem, such as SAT, is NP-complete without resorting to reduction to other problems such as hamiltonian p... | complexity theory satisfiability | 1 |
1,727 | How will broadcast behave with a certain capacity? | <p>I wanted to confirm something and will appreciate your help. Suppose we have three nodes called A,B and C. All are connected to a switch whose port supports 1 Gbps. Now suppose, Node's A network card is 100 Mbps while the the remaining have a 1 Gbps. Following are the constraints;</p>

<ol>
<li>A can sen... | computer networks | 0 |
1,729 | What techniques exist for energy-efficient computing and networking? | <p>I am currently reviewing the potentials of cloud computing regarding energy efficiency and green IT. In connection with this review I am having a look on techniques for increasing energy-efficiency in data centers (computing), hardware, networking and storage devices.</p>

<p>Specificially for computing/serv... | reference request computer architecture operating systems computer networks power consumption | 0 |
1,731 | Proving that recursively enumerable languages are closed against taking prefixes | <p>Define $\mathrm{Prefix} (L) = \{x\mid \exists y .xy \in L \}$. I'd love your help with proving that $\mathsf{RE}$ languages are closed under $\mathrm{Prefix}$.</p>

<p>I know that recursively enumerable languages are formal languages for which there exists a Turing machine that will halt and accept when pr... | formal languages turing machines closure properties | 1 |
1,739 | Hashing using search trees instead of lists | <p>I am struggling with hashing and binary search tree material.
And I read that instead of using lists for storing entries with the same hash values, it is also possible to use binary search trees. And I try to understand what the worst-case and average-case running time for the operations</p>

<ol>
<l... | data structures time complexity runtime analysis search trees hash tables | 0 |
1,740 | DFA with limited states | <p>Lets $L_z \ := \{ a^i b^i c^i : 0 \leq i < z \}$</p>

<p>$\{a,b,c\} \in \sum^*$</p>

<p>there is a DFA with $\frac{z(z+1)}{2}+1$ states - How can I prove this?</p>

<p>And I need largest possible number $n_z$, for which i can prove that every NFA, which accepts $L_z$, have $n_z$ states, at... | formal languages regular languages automata finite automata | 1 |
1,745 | Recursion for runtime of divide and conquer algorithms | <p>A divide and conquer algorithm's work at a specific level can be simplified into the equation:</p>

<p>$\qquad \displaystyle O\left(n^d\right) \cdot \left(\frac{a}{b^d}\right)^k$</p>

<p>where $n$ is the size of the problem, $a$ is the number of sub problems, $b$ is the factor the size of the problem... | algorithm analysis asymptotics runtime analysis recursion mathematical analysis | 1 |
1,748 | array median transformation using the min number of steps | <p>Let $A[1...N]$ be an Array of size $N$ with maximum element $\max$.</p>

<p>I want to transform array $A$ such that after transformations all elements of $A$ contain $\max$, i.e. after transformation $A = [\max,\max,\max,\max,\dots,\max]$.</p>

<p>In one step, I can apply the following operation to a... | algorithms arrays | 0 |
1,749 | Dijsktra's algorithm applied to travelling salesman problem | <p>I am a novice(total newbie to computational complexity theory) and I have a question.</p>

<p>Lets say we have 'Traveling Salesman Problem' ,will the following application of Dijkstra's Algorithms solve it?</p>

<p>From a start point we compute the shortest distance between two points. We go to the p... | algorithms graphs | 0 |
1,752 | Optimizing order of graph reduction to minimize memory usage | <p>Having extracted the data-flow in some rather large programs as directed, acyclic graphs, I'd now like to optimize the order of evaluation to minimze the maximum amount of memory used.</p>

<p>That is, given a graph {1 -> 3, 2 -> 3, 4 -> 5, 3 -> 5}, I'm looking for an algorithm that will decide the order of ... | algorithms graphs optimization software engineering program optimization | 0 |
1,753 | Non-regular Languages? | <blockquote>
 <p><strong>Possible Duplicate:</strong><br>
 <a href="https://cs.stackexchange.com/questions/1031/how-to-prove-that-a-language-is-not-regular">How to prove that a language is not regular?</a> </p>
</blockquote>



<p>Why $L_a$ and $L_b$ are not reguluar?</p>

<p>$L... | formal languages regular languages finite automata | 1 |
1,754 | Explain $\log_2(n)$ squared asymptotic run-time for naive nested parallel CREW PRAM mergesort | <p>On from Page 1 of <a href="http://www.inf.ed.ac.uk/teaching/courses/dapa/note3.pdf" rel="nofollow">these lecture notes</a> it is stated in the final paragraph of the section titled CREW Mergesort:</p>

<blockquote>
 <p>Each such step (in a sequence of $\Theta(\log_2\ n)$ steps) takes
 time $\Theta(... | algorithms complexity theory parallel computing | 1 |
1,758 | How many strings are close to a given set of strings? | <p>This question has been prompted by <a href="https://cs.stackexchange.com/questions/1626/efficient-data-structures-for-building-a-fast-spell-checker">Efficient data structures for building a fast spell checker</a>.</p>
<p>Given two strings <span class="math-container">$u,v$</span>, we say they are <em><span class... | algorithms time complexity strings word combinatorics string metrics | 0 |
1,762 | Counting trees (order matters) | <p>As a follow up to this <a href="https://cs.stackexchange.com/questions/368/counting-binary-trees">question</a> (the number of rooted binary trees of size n), how many possible binary trees can you have if the nodes are now labeled, so that abc is different than bac cab etc ? In other words, order matters. Certainly ... | binary trees combinatorics trees | 1 |
1,771 | Why is a regular language called 'regular'? | <p>I have just completed the first chapter of the <a href="http://www-math.mit.edu/~sipser/book.html"><em>Introduction to the Theory of Computation</em></a> by <em>Michael Sipser</em> which explains the basics of finite automata. </p>

<p>He defines a regular language as anything that can be described by a fini... | formal languages regular languages terminology finite automata history | 1 |
1,773 | Recommendation algorithms based on a set of attributes | <p>I'm building an application which should suggest products for the users. I want to base my recommendation on different attributes, like location, weather, date, etc. Each of these attributes can have multiple values so the feature space I need to consider is huge.
I was thinking about two approaches to solve thi... | artificial intelligence recommendation systems | 0 |
1,774 | How do I classify my emulator input optimization problem, and with which algorithm should I approach it? | <p>Due to the nature of the question, I have to include lots of background information (because my question is: how do I narrow this down?) That said, it can be summarized (to the best of my knowledge) as:</p>

<p><strong>What methods exist to find local optimums on extremely large combinatorial search spaces?<... | reference request machine learning combinatorics optimization search problem | 1 |
1,778 | Regular expression for all strings with at least two 0s over alphabet {0,1} | <p>My answer : (0+1)* 0 (0+1)* 0 (0+1)*</p>

<p>Why is this incorrect? Can somebody explain to me what the correct answer is and why?</p>
 | formal languages regular languages regular expressions | 0 |
1,779 | $L(M) = L$ where $M$ is a $TM$ that moves only to the right side so $L$ is regular | <p>Suppose that $L(M) = L$ where $M$ is a $TM$ that moves only to the right side.</p>

<p>I need to Show that $L$ is regular.</p>

<p>I'd relly like some help, I tried to think of any way to prove it but I didn't reach to any smart conclusion. what is it about the only side right moves and the regularit... | formal languages computability turing machines regular languages computation models | 1 |
1,780 | Are the functions always asymptotically comparable? | <p>When we compare the complexity of two algorithms, it is usually the case that either $f(n) = O(g(n))$ or $g(n) = O(f(n))$ (possibly both), where $f$ and $g$ are the running times (for example) of the two algorithms.</p>

<p>Is this always the case? That is, does at least one of the relationships $f(n) = O(g(... | asymptotics mathematical analysis | 0 |
1,785 | Turn one string into another with single letter substitions | <p>I want to turn one string into another with only single letter substitions. What is a good way to do this, passing through only valid words in between (<a href="http://www.wuzzlesandpuzzles.com/wordchange/" rel="nofollow">this</a> website has some examples)?</p>

<p>Valid here means "a word in English" as t... | algorithms strings string metrics | 0 |
1,789 | Quicksort to find median? | <p>Why is the worst scenario $\mathcal{O}\left(n^2\right)$ when using quicksort to find the median of a set of numbers?</p>

<ul>
<li><p>If your algorithm continually picks a number larger than or smaller than <em>all</em> numbers in the list wouldn't your algorithm fail? For example if the list of numbers ... | algorithms algorithm analysis search algorithms | 1 |
1,790 | subsets of infinite recursive sets | <p>A recent exam question went as follows:</p>

<blockquote>
 <ol>
 <li>$A$ is an infinite recursively enumerable set. Prove that $A$ has an infinite recursive subset.</li>
 <li>Let $C$ be an infinite recursive subset of $A$. Must $C$ have a subset that is <em>not</em> recursively enumerable?</li... | computability check my proof | 0 |
1,792 | Cyclic coordinate method: how does it differ from Hook & Jeeves and Rosenbrock? | <p>I have trouble understanding the cyclic coordinate method. How does it differ with the <a href="http://en.wikipedia.org/wiki/Pattern_search_%28optimization%29" rel="nofollow">Hook and Jeeves method</a> and the <a href="http://en.wikipedia.org/wiki/Rosenbrock_methods" rel="nofollow">Rosenbrock method</a>?</p>
&#x... | algorithms reference request optimization numerical analysis | 0 |
1,796 | Fast Poisson quantile computation | <p>I am seeking a fast algorithm to compute the following function, a quantile of the <a href="http://en.wikipedia.org/wiki/Poisson_distribution" rel="nofollow">Poisson distribution</a>:
$$f(n, \lambda) = e^{-\lambda} \sum_{k=0}^{n} \frac{\lambda^k}{k!} $$</p>

<p>I can think of an algorithm in $O(n)$, but ... | algorithms numerical analysis | 1 |
1,797 | Key secrecy vs Algorithm secrecy | <p>it's a well known statement that </p>

<p>"<em>Cryptographic security must rely on a secret key instead of a secret algorithm</em>."</p>

<p>I would like to ask about some details about it. <em>And which are their differences?</em></p>

<p>I see the obvious thing that for a multi user system,... | cryptography security encryption | 1 |
1,801 | From FACTOR To KNAPSACK | <ol>
<li><p>If there were an algorithm that factored in polynomial time by means of examining each possible factor of a complex number efficiently, could one not also use this algorithm to solve unbounded knapsack problems since two factors can be viewed as one value, say within the set for the knapsack problem, an... | complexity theory np complete integers knapsack problems | 1 |
1,803 | Extracting non-duplicate cells in a particular matrix with repeated entries | <p>Consider a board of $n$ x $n$ cells, where $n = 2k, k≥2$. Each of the numbers from $S = \left\{1,...,\frac{n^2}{2}\right\}$ is written to two cells so that each cell contains exactly one number.</p>

<p>How can I show that $n$ cells $c_{i, j}$ can be chosen with one cell per row and one cell per column such ... | combinatorics probability theory | 1 |
1,806 | Weighted Maximum 3-DIMENSIONAL-MATCHING with restricted weights (Approx Algo) | <p>If the weights of the weighted 3-DIMENSIONAL-MATCHING problem are restricted to let's say, 1 and 2, is there a possibility to reduce this case to the unweighted 3-DIMENSIONAL-MATCHING problem?
(Because for the unweighted version, there is a (1.5+$\epsilon$)-approximation<sup>1</sup> algorithm, for the weighted v... | algorithms approximation | 0 |
1,809 | Probabilistic test of matrix multiplication with one-sided error | <p>Given three matrices $A, B,C \in \mathbb{Z}^{n \times n}$ we want to test whether $AB \neq C$. Assume that the arithmetic operations $+$ and $-$ take constant time when applied to numbers from $\mathbb{Z}$.</p>

<p>How can I state an algorithm with one-sided error that runs in $O(n^2)$ time and prove its co... | algorithms probabilistic algorithms matrices linear algebra | 1 |
1,810 | Are there NP problems, not in P and not NP Complete? | <p>Are there any known problems in $\mathsf{NP}$ (and not in $\mathsf{P}$) that aren't $\mathsf{NP}$ Complete? My understanding is that there are no currently known problems where this is the case, but it hasn't been ruled out as a possibility. </p>

<p>If there is a problem that is $\mathsf{NP}$ (and not $\m... | complexity theory np complete p vs np | 1 |
1,814 | An argument for error accumulation during complex DFT | <p>I am doing FFT-based multiplication of polynomials with integer coefficients (long integers, in fact). The coefficients have a maximum value of $BASE-1, \quad BASE \in \mathbb{n},\quad BASE > 1$. </p>

<p>I would like to put forward a formal argument that if we use complex DFT for computing a convolution ... | algorithms proof techniques numerical analysis | 0 |
1,816 | Is there a typed SKI calculus? | <p>Most of us know the correspondence between <a href="http://en.wikipedia.org/wiki/Combinatory_logic">combinatory logic</a> and <a href="http://en.wikipedia.org/wiki/Lambda_calculus">lambda calculus</a>. But I've never seen (maybe I haven't looked deep enough) the equivalent of "typed combinators", corresponding to th... | reference request logic lambda calculus type theory combinatory logic | 1 |
1,822 | dynamic programming exercise on cutting strings | <p>I have been working on the following problem from this <a href="http://www.cs.berkeley.edu/~vazirani/algorithms/chap6.pdf">book</a>.</p>

<blockquote>
 <p>A certain string-processing language offers a primitive operation which splits a string into two
 pieces. Since this operation involves copying ... | algorithms combinatorics strings dynamic programming | 0 |
1,825 | Maximum Enclosing Circle of a Given Radius | <p>I try to find an approach to the following problem:</p>

<blockquote>
 <p>Given the set of point $S$ and radius $r$, find the center point of circle, such that the circle contains the maximum number of points from the set. The running time should be $O(n^2)$.</p>
</blockquote>

<p>At first i... | algorithms computational geometry | 1 |
1,828 | Polytime and polyspace algorithm for determining the leading intersection of n discrete monotonic functions | <p>Some frontmatter: I'm a recreational computer scientist and employed software engineer. So, pardon if this prompt seems somewhat out of left field -- I routinely play with mathematical simulcra and open problems when I have nothing better to do. </p>

<p>While playing with the <a href="http://en.wikipedia.or... | algorithms reference request discrete mathematics | 1 |
1,830 | Why is $L= \{ 0^n 1^n | n \geq 1 \}$ not regular language? | <p>I'm looking for intuition about when a language is regular and when it is not. For example, consider:</p>

<p>$$ L = \{ 0^n 1^n \mid n \geq 1 \} = \{ 01, 0011, 000111, \ldots \}$$</p>

<p>which is not a regular language. Intuitively it seems a very simple language, there doesn't seem to be anything c... | formal languages regular languages intuition | 0 |
1,836 | What is complexity class $\oplus P^{\oplus P}$ | <p>What does the complexity class $\oplus P^{\oplus P}$ mean? I know that $\oplus P$ is the complexity class which contains languages $A$ for which there is a polynomial time nondeterministic Turing machine $M$ such that $x \in A$ iff the number of accepting states of the machine $M$ on the input $x$ is odd.</p>
&#... | complexity theory terminology complexity classes | 0 |
1,838 | Counting different words in text using hashing | <p>I am still fighting with hashing and I am ask myself: what is the most efficient way to count the number of different words in a text using a hash table?</p>

<p>My intuition says that applying the hashcode function to every word in the text, as result we will have words with different hash values in differe... | algorithms strings hash tables | 0 |
1,842 | A context free grammar proof | <p>There is a problem which I cannot solve. If you give a tip I will be very glad.</p>

<p>Prove that following language is <em>not</em> context free:</p>

<p>$L= \{ a^nb^m | \gcd(n,m) = 1 \}$.</p>

<p>It can be proven using the pumping lemma, but how?</p>

<p>If I start with some prime ... | formal languages context free pumping lemma | 0 |
1,843 | Golden Section, Fibonacci and Dichotomic Searches | <p>I wonder if somebody could quickly and briefly outline some of the similarities and differences between the line search methods <a href="http://glossary.computing.society.informs.org/ver2/mpgwiki/index.php/Golden_section_search" rel="nofollow">Golden Section Search</a>, <a href="http://glossary.computing.society.inf... | algorithms optimization | 0 |
1,847 | Pumping lemma for simple finite regular languages | <p><a href="http://en.wikipedia.org/wiki/Pumping_lemma_for_regular_languages">Wikipedia</a> has the following definition of the pumping lemma for regular langauges...</p>

<blockquote>
 <p>Let $L$ be a regular language. Then there exists an integer $p$ ≥ 1
 depending only on $L$ such that every string... | formal languages regular languages pumping lemma finite sets | 0 |
1,852 | How to prove that a constrained version of 3SAT in which no literal can occur more than once, is solvable in polynomial time? | <p>I'm trying to work out an assignment (taken from the book <a href="http://www.cs.berkeley.edu/~vazirani/algorithms.html">Algorithms - by S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani</a>, Chap 8, problem 8.6a), and I'm paraphrasing what it states:</p>

<blockquote>
 <p>Given that 3SAT remains NP-co... | complexity theory satisfiability 3 sat | 1 |
1,853 | NP $\subsetneq$ EXP? | <p>I think I heard in somewhere that it has been proven that $\mathsf{NP}$ is strictly contained in $\mathsf{EXP}$, that is $\mathsf{NP} \subsetneq \mathsf{EXP}$. Is this right? Wikipedia and book resources do not seem to bring me an answer..</p>

<p>I just found a post similar to this, but I am not sure whethe... | complexity theory complexity classes np | 0 |
1,859 | Rule of thumb to know if a problem could be NP-complete | <p>This question was inspired by <a href="https://stackoverflow.com/questions/10589995/algorithm-have-a-set-of-points-g-that-can-see-other-points-c-need-an-al/10590173#comment13716914_10590173">a comment on StackOverflow</a>.</p>

<p>Apart from knowing NP-complete problems of the Garey Johnson book, and many ot... | complexity theory np complete intuition | 1 |
1,860 | Does every NP problem have a poly-sized ILP formulation? | <p>Since Integer Linear Programming is NP-complete, there is a Karp reduction from any problem in NP to it. I thought this implied that there is always a polynomial-sized ILP formulation for any problem in NP.</p>

<p>But I've seen papers on specific NP problems where people write things like "this is the first... | complexity theory np complete reductions linear programming | 0 |
1,864 | Hoare triple for assignment P{x/E} x:=E {P} | <p>I am trying to understand Hoare logic presented at Wikipedia,
<a href="http://en.wikipedia.org/wiki/Hoare_logic" rel="nofollow">Hoare logic at Wikipedia</a>
Apparently, if I understand correctly, a Hoare triple $$\{P\}~ C ~\{Q\}$$ means</p>

<blockquote>
 <p>if P just before C, then Q holds imm... | logic programming languages semantics hoare logic software verification | 1 |
1,868 | Is a PDA as powerful as a CPU? | <p>This is a question I have stumbled upon in my exam revision and I find it intriguing:</p>
<p><strong>My computer is blue and it has a massive graphics card and a DVD and every-
thing so which is more powerful: my computer or a Pushdown Automaton?</strong></p>
<hr />
<h2>My Thoughts</h2>
<p>When w... | computability computation models computable analysis | 0 |
1,872 | Brzozowski's algorithm for DFA minimization | <p>Brzozowski's DFA minimization algorithm builds a minimal DFA for DFA $G$ by:</p>

<ol>
<li>reversing all the edges in $G$, making the initial state an accept state, and the accept states initial, to get an NFA $N'$ for the reverse language, </li>
<li>using powerset construction to get $G'$ fo... | algorithms finite automata runtime analysis | 0 |
1,877 | How not to solve P=NP? | <p>There are lots of attempts at proving either $\mathsf{P} = \mathsf{NP} $ or $\mathsf{P} \neq \mathsf{NP}$, and naturally many people think about the question, having ideas for proving either direction.</p>

<p>I know that there are approaches that have been proven to not work, and there are probably more tha... | complexity theory reference request history p vs np reference question | 0 |
1,878 | Prove fingerprinting | <blockquote>
 <p><strong>Possible Duplicate:</strong><br>
 <a href="https://cs.stackexchange.com/questions/1692/prove-fingerprinting">Prove fingerprinting</a> </p>
</blockquote>



<p>Let $a \neq b$ be two integers from the interval $[1, 2^n].$ Let $p$ be a random prime with $ 1 \le p \le... | randomness | 0 |
1,883 | Reconstructing Graphs from Degree Distribution | <p>Given a degree distribution, how fast can we construct a graph that follows the given degree distribution? A link or algorithm sketch would be good. The algorithm should report a "no" incase no graph can be constructed and any one example if multiple graphs can be constructed.</p>
 | algorithms graphs | 1 |
1,886 | If $L$ is context-free and $R$ is regular, then $L / R$ is context-free? | <p>I'm am stuck solving the next exercise:</p>

<p>Argue that if $L$ is context-free and $R$ is regular, then $L / R = \{ w \mid \exists x \in R \;\text{s.t}\; wx \in L\} $ (i.e. the <a href="https://en.wikipedia.org/wiki/Right_quotient" rel="noreferrer">right quotient</a>) is context-free.</p>

<p>I kn... | formal languages context free finite automata closure properties pushdown automata | 0 |
1,887 | Why isn't this undecidable problem in NP? | <p>Clearly there aren't any undecidable problems in NP. However, according to <a href="http://en.wikipedia.org/wiki/NP_%28complexity%29">Wikipedia</a>:</p>

<blockquote>
 <p>NP is the set of all decision problems for which the instances where the answer is "yes" have [.. proofs that are] verifiable in pol... | complexity theory computability undecidability decision problem | 1 |
1,901 | Common idea in Karatsuba, Gauss and Strassen multiplication | <p>The identities used in multiplication algorithms by</p>

<ul>
<li><p><a href="http://en.wikipedia.org/wiki/Karatsuba_algorithm#The_basic_step">Karatsuba</a> (integers)</p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Multiplication_algorithm#Gauss.27s_complex_multiplication_algorithm">Gauss</a> ... | algorithms matrices | 1 |
1,903 | What is the growth rate of the world wide web? | <p>Is there any way to estimate how much data is added to the world wide web each second? Are there any studies about this? </p>
 | computer networks | 0 |
1,904 | Nilsson's sequence score for 8-puzzle problem in A* algorithm | <p>I am learning the <a href="http://en.wikipedia.org/wiki/A*_search_algorithm" rel="nofollow noreferrer">A* search algorithm</a> on an 8-puzzle problem.</p>

<p>I don't have questions about A*, but I have some for the heuristic score - Nilsson's sequence score.</p>

<p><a href="http://www.heyes-jones.... | algorithms machine learning search algorithms heuristics | 0 |
1,905 | An oracle to separate NP from coNP | <p>How to prove that $\mathsf{NP}^A \neq \mathsf{coNP}^A$ ? I am just looking for a such oracle TM $M$ and a recursive language $L(M) = L$ for which this holds. </p>

<p>I know the proof where you show that there is an oracle $A$ such that $\mathsf{P}^A \neq \mathsf{NP}^A$ and an oracle $A$ such that $\mathsf{P... | complexity theory relativization | 1 |
1,907 | Grammar in formal languages versus programming language theory | <p>Grammars seem to be used for different purposes. In formal languages, they are used to describe sequences of symbols. In programming language theory, they are used to describe objects in a term algebra (possibly enriched with some implicit, extra structure such as variable scoping rules). My question is, are thes... | formal languages programming languages | 0 |
1,913 | Recurrences and Generating Functions in Algorithms | <p>Combinatorics plays an important role in computer science. We frequently utilize combinatorial methods in both analysis as well as design in algorithms. For example one method for finding a $k$-vertex cover set in a graph might just inspect all $\binom{n}{k}$ possible subsets. While the binomial functions grows expo... | algorithms algorithm analysis combinatorics | 1 |
1,914 | Find median of unsorted array in $O(n)$ time | <p>To find the median of an unsorted array, we can make a min-heap in $O(n\log n)$ time for $n$ elements, and then we can extract one by one $n/2$ elements to get the median. But this approach would take $O(n \log n)$ time.</p>

<p>Can we do the same by some method in $O(n)$ time? If we can, then how?</p>
 | algorithms time complexity | 1 |
1,915 | What is postorder traversal on this simple tree? | <p>Given the following tree: </p>

<p><img src="https://i.stack.imgur.com/GbJzO.png" alt="tree"></p>

<p>Which traversal method would give as result the following output: CDBEA?</p>

<p>The answer in my study guide is <em>Postorder</em>, but I think postorder would output: DEBCA. Am I wrong?</p>... | algorithms trees | 1 |
1,917 | Vapnik-Chervonenkis Dimension: why cannot four points on a line be shattered by rectangles? | <p>So I'm reading <em>"Introduction to Machine Learning"</em> 2nd edition, by Bishop, et. all. On page 27 they discuss the Vapnik-Chervonenkis Dimension which is,</p>

<blockquote>
 <p><em>"The maximum number of points that can be shattered by H [the hypothesis class] is called the Vapnik-Chervonenkis (VC... | machine learning vc dimension | 1 |
1,918 | Preprocess an array for counting an element in a slice (reduction to RMQ?) | <p>Given an array $a_1,\ldots,a_n$ of natural numbers $\leq k$, where $k$ is a constant, I want to answer in $O(1)$ queries of the form: "how many times does $m$ appear in the array between indices $i$ and $j$"?</p>

<p>The array should be preprocessed in linear time. In particular I'd like to know if there's a... | algorithms arrays algorithm design | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.