instruction stringlengths 35 29.1k |
|---|
I was doing a presentation on Rabin's Compression Theorem, when someone in the audience brought up a point I have no answer to.
Rabin's Compression Theorem states that every reasonable complexity class has a problem that can be solved optimally in it. The proof is a little involved, but not horribly difficult.
The aud... |
I've got an algorithm I'm working on that generates, stores, and iterates through a large number of finite sets. I'm finding that memory is a bottleneck long before time is.
The finite sets are subsets of the vertices $V$ in my graph, so each finite set is small, there's just a lot of them.
In an effort to save space, ... |
The problem I have seems fairly simple and I feel it must have some kind of name. I have a (directed cyclic) graph. Each node has an associated reward for visiting it, and each arc costs a certain amount of time to traverse it.
The reward is consumed on visiting once, so a path may visit a node multiple times but recei... |
We are given an $n \times n$ grid with some of the squares darkened.
Our goal is to move from the bottom-left to the top-right corner with the following constraints:
1) We cannot step on a darkened square.
2) Each move must be up or to the right.
3) We cannot move in the same direction consecutively four times.
Design ... |
I know that quantum computers are able to process a superposition of all possible states with a single pass through the logic.
That seems to be what people point to as being what makes quantum computers special or useful.
However after you have processed the superpositional inputs, you have a superpositional result, of... |
So we're using this book by Shlomi Dolev on self-stabilization in class. Not being from a theretical CS background, I think the book is rather terse. Most of it is fine but there's this section on "recomputation of floating output" that I just couldn't get and I would like to know if anyone could help explain the conce... |
I just found out something really quite extraordinary. While looking through Stackoverflow, I came across a question about removing goto from a php function. PHP doesn't have goto I thought and looked it up on php.net.
It turns out I was sort of right. PHP introducted goto in version 5.3 which was release in 2009.... |
I am interested in the complexity of the following problem:
Input: A list $a_1\leq ⋯ \leq a_n$ of positive integers.
Question: Are there two vectors $x, x'\in\{−1,0,1\}^n$, with at least one $x_i$ and one $x'_i$ non-zero (the subsets must be non-empty), such that
$$\sum_{i=1}^nx_ia_i=0, \sum_{i=1}^nx'_ia_i=0 \text{ and... |
Considering plain RSA encryption, assume we have B who wants to send 10 messages to either A1 or A2. The recipients' public key, namely the exponent e1, e2 and prime product n1, n2 for A1/A2 respectively, is publicly known.
When B sends out, he will either encrypt his messages via $c_i = (m_i)^{e_1} mod (n_1)$ or $c_i ... |
From the analysis of Dijkstra there is a $O(mlogn)$ factor that assumes we do a decreasekey for every single edge of the given input graph.
However I find it hard to come up with an instance that can actually require this. All you have to do create the edges and then add the weights in a way that would induce a large n... |
I know by definition that a minimum spanning tree (MST) of a weighted, connected graph has the lowest global value for for sum of all edges in a path that connects all vertices.
I'm curious if all MSTs are also optimized for lowest individual edge value possible. (I know that ones calculated with Kruskal's Algorithm ar... |
Regarding time complexity I've read conflicting things:
1) That it is worst case.
2) That is average case.
For example if I want to know the time complexity for inserting into an arbitrary point in a linked list ( not the beginning or the end ), on average it will take
(n/2) operations so we can drop the constant and s... |
I have a floating point number system and I have a number for which I need to calculate the exact relative error after rounding. The number is clearly an overflow. Does anyone know what I should do?
I've tried converting the number to from the decimal base to the base of the system, then just chopping of and rounding ... |
Apologies, not a computer scientist by trade but I'm playing with linear programming these days.
Let $\{x_i\}$ be $N$ optimization variables with bounds
$$l_i \leq x_i \leq u_i$$
I'm interested in telling if $\exists$ a feasible region under the constraint
$$\sum_i x_i = C$$
for a fixed value of $C$.
This is pretty eas... |
Why are there $2^{2^{n}}$ possible boolean functions of n inputs? How to derive that?
For 3,
I can only write down 16 and cannot go further.
8 of
$f(x_{1},x_{2},x_{3})=0$
000 = 0
001 = 0
010 = 0
110 = 0
111 = 0
110 = 0
101 = 0
011 = 0
and
8 of
$f(x_{1},x_{2},x_{3})=1$
000 = 1
001 = 1
010 = 1
110 = 1
111 = 1
110 = 1... |
Someone asked for examples of context-free languages with non-context-free complements.
The first answer says:
The language $L_1= \{ww \mid w \in \{a,b\}^*\}$ is not context-free (as can be shown using the pumping lemma; see here). Its complement $L_2 = \{a,b\}^* \setminus L_1$ is context-free (as shown here).
Maybe... |
Elementary Cellular Automata and Conway's Game of Life show interesting Cellular structures, suppose we have a computational model {a Cellular Auotmaton} that can simulate both CA types (ECA & Conway's Game of life) from one input.
Meaning that, if we had a system with an input of (x), (x) can show a structure to an EC... |
This problem has been given by Shallit as an open DFA/ complexity theory problem and is currently not even known to be decidable. It seems to be circulating on the internet in a few places (e.g. [1][2]) but not in any papers. Almost nothing seems to be known or published. I am looking for any nontrivial analysis or ref... |
Suppose we are working in ${\mathbb R}^d$ (dimension is not fixed), and we have a set of $n$ points $X = \{x_1,\ldots,x_n\}$ in that space. Given a query point $y$ inside the convex hull of $X$ and an integer $m$ where $m<d+1$, we want to choose $m$ out of the $n$ points so that the residual of the projection of $y$ on... |
I know how to show $\overline{Lx}$ is unrecognizable.
I know how to show Lx is undecidable.
I would like the mapping reduction function that shows that Lx is recognizable or unrecognizable.
For instance, to show $\overline{Lx}$ is unrecognizable, show $\overline{Htm}$ <= $\overline{Lx}$
Given $\overline{Htm}$ = {M desc... |
I can only write down 16 and cannot go further.
8 of
$f(x_{1},x_{2},x_{3})=0$
000 = 0
001 = 0
010 = 0
110 = 0
111 = 0
110 = 0
101 = 0
011 = 0
and
8 of
$f(x_{1},x_{2},x_{3})=1$
000 = 1
001 = 1
010 = 1
110 = 1
111 = 1
110 = 1
101 = 1
011 = 1
That's the maximum I can go. How do I proceed?
|
[Edited] I am reading about matrix grammars from several sources and got confused about its generative power and classification to the Chomsky hierarchy.
In here it is stated that:
A matrix grammar is a quintuple $G = (N, T, M, S, F)$, where $N,T$, and $S$ are specified as for a context-free grammar, $M = \{m_1, m_2,... |
For each language $L \in L(RE)$ there are a homomorphism $h$ and two context-free languages $L_1$ and $L_2$ such that $L = h(L_1 \cap L_2)$.
I understand that this is because context-free languages are not closed under intersection so $L_1 \cap L_2$ will produce non-context-free languages. Since context-sensitive gramm... |
I am learning algorithms from the clrs book. I am having trouble understanding the notation the book has placed.
The book wrote the following:
$t_j$ denote the number of times the while loop test in line 5 is executed for that value of $j$."
So does that mean $t_2$ would represent the entire set time the while loop... |
Suppose I have two sets, A and B, which each have one or more strings.
I'm looking for an algorithm that'll go through each string in A and find the string(s) in B with minimal Levenshtein distance.
Lets assume the following constraints:
Strings won't be too long: probably between 20 and 30 characters.
The alphabet w... |
I was reading operating systems concurrency control topics where I came across TestAndSet() intruction. I first referred this book. But it has got very less coverage on TestAndSet and then I googled. Obviously I came across wiki page.
The wikipedia page gives two code excerpts.
The TestAndSet() function
#define LOCKED ... |
Suppose I want to express Data Encryption Standard(DES) encryption algorithm as a boolean circuit. How can I determine if what I want is practical, and if it is how can I do it?
|
I am writing a small Ruby on Rails engine that does simple full-text search. When someone imports text from a given model (eg. Articles, Posts, etc) an inverted index is built that looks like the following:
Term Doc. info Doc. frequency Spelling suggestions
appear {:title=>[1], :body=>[1, 2, ... |
I've been reading up on quantum computing online from various sources, including this link http://twistedoakstudios.com/blog/Post2644_grovers-quantum-search-algorithm.
I get how quantum gates work, destructive interference, and how you can simulate a quantum computer using matrix math and complex numbers.
Does entangle... |
I just found this sentence on page 6 of Garey and Johnson's "Computers and Intractability".
Any algorithm whose time complexity function cannot be so bounded is called an exponential time algorithm (although it should be noted that this definition includes certain non-polynomial time complexity functions, like $n^{\lo... |
Given a set $S$ of $N$ points on a sphere, and another point $P$ on the sphere, I want to find the $k$ points in $S$ that are the closest (Euclidean or great circle distance).
I'm willing to do a reasonable amount of pre-computation. The solution must be exact and efficient (faster than linear time).
|
I was reading about pure mathematics and I am wondering if there is a relation between it and Cellular Automata.
Broadly speaking, pure mathematics is mathematics that studies entirely abstract concepts.
For example, elementary cellular automata transforms an input of {3 cells} based on a rule set to a fractal like r... |
I am reading the paper "A new approach to intrusion detection using Artificial Neural Networks and fuzzy clustering" by Gang Wang, Jinxing Hao, Jian Ma and Lihua Huang (Expert Systems with Applications, 37(9):6225–6232, 2010, available at Science Direct). I don't understand the term "detection stability". What does tha... |
Given the language
$EQ_{\mathrm{dfa}} =$ $\{\langle A, B\rangle\mid A$ and $B$ are two DFAs and $L(A) = L(B)$ $\}$
Prove that $EQ_{\mathrm{dfa}}$ is decidable by testing the two DFAs on all strings upto a certain size. Calculate a size that works.
(This is from Sipser chapter 4)
I make a directed graph as usual but if ... |
Consider the counting knapsack problem $\mathsf{\#IDKNAP}$ :
Input: $n \in \mathbb{Z_+}$, $s \in \mathbb{Q}_+$, where $s$ is represented by a fraction $\frac{p}{q}$ in its lowest terms.
Output: the number of 0-1 solutions (i.e. those having $s_i\in \{0,1\}$) to $s_1 + s_2 + \dots + s_n \leq s$.
What is the counting... |
Meek's version of the Single Transferable Vote system [.pdf] is used in multiple big elections including those of New Zealand and Stack Exchange.
Demonstration (with thanks to the Department of Internal Affairs of New Zealand).
I have a basic understanding of how the votes are counted, but there's one thing I haven't b... |
I've been recently investigating metacategories (arrows and objects) alongside Automata theory and noticed that a category is a sort of parent container for DFAs, which are just a specific type of function over sets.
If the relationship between automata and categories is significant, does that mean an automata could en... |
You play a TV game in which you have to open one door out of $n$. Behind each door, there is a treasure with probability 1/2, independent of the other doors, so your apriori chance of winning is 1/2.
In order to increase your chances, you can coordinate with a friend. You do the coordination before the game starts. The... |
Take the language $L = \{a b^n c^n \; : \; n \geq 0\}$.
It's obvious that $L$ is non-regular because $\{b^n c^n \; : \; n \geq 0\}$ is non-regular, but I don't know a satisfying way to show that to the hypothetical Devil's advocate reading my proof without dragging out a full argument using the pumping lemma.
Is there ... |
I'm trying to make a simpler version of CARDIAC for only performing addition. Now, I am encountering several problems in making something similar and looking for some ideas (I'm new to Computer Architecture).
Here's an excerpt of what CARDIAC is (Wikipedia):
CARDIAC (CARDboard Illustrative Aid to Computation) was a le... |
I was reading about the history of computers where i came by machine code
A Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU r... |
Consider the following problem: you are given a set of one million machines (hosts), and you would like to have the ability to execute at will an arbitrary command against the whole set; for the moment, let us suppose you want to run one command at a time. How to do that efficiently?
Is also desirable to have the abil... |
If I understand correctly, quantum computers work by trying multiple methods of solving a problem simultaneously, using quantum superposition. However, if you try to "look" at a superposition-ed atom, you will find either one or the other-1 or 0. What I've heard is that this is random.
So, if you compute all these solu... |
Why does the following procedure not work?
Let given vertices be $(u,v)$
Run a dfs from any vertex.
Compute : $low[u]$ for all vertices in the graph
$low[u] = min(disc[u], disc[w]) $
where w is an ancestor of u and there is a back edge from
some descendant of u to w.
In the tree formed by dfs, find the $lca(u,v)$ ... |
I am confused about 'single' vs 'multiple' agent reinforcement learning.
Let's say that I have 1 hunter who I am training to hunt 1 static prey, so that only the hunter is moving around. This is definitely single-agent RL.
If there are two hunters and two preys (moving or static), then this becomes multiple agent RL.... |
I have a thermal camera that I would like to overlay, automatically, to the output of a RGB-D camera (e.g. Kinect).
I have retrieved the intrinsic and extrinsics parameters of both cameras.
My objective is to calculate the disparity map between the two. That is, to map the matrix resulting from the depth image to the t... |
If I am correct, programming language theory studies
syntax and semantics of programming languages, and
design and implementation of programming languages (e.g. compiler, ...)
Does programming in programming languages, i.e. creating programs in
programming languages, belong to programming language theory?
Does pro... |
I've had multiple lectures on the pumping lemma but still can't grasp exactly what it is...my main questions are as follows
What is the pumping lemma for?
How do you use it to prove a language is not regular (with an example please)
e.g. if L is in sigma and L is regular, prove that sigma*-L is regular
It doesn't need... |
I was reading about dynamic programming and I understood that we should not be using dynamic programming approach if the optimal solution of a problem does not contain the optimal solution of the subproblem.
The Longest path problem is very clear example on this and I understood why.
But I am not able to find out any o... |
This particular language:
$$L = \{ u u^R v \,:\, u, v \in \{0, 1\}^+\}$$
is giving me a lot of trouble.
I highly suspect that its non-regular, considering that $\{ u u^R : u \in \{0, 1\}^+\}$ is non-regular, and I can't seem to reason out a DFA for it.
However, trying to achieve a contradiction with the pumping lemma i... |
I am reading the paper Measuring the hardness of SAT instances by Ansótegui, Bonet, Levy and Manyà (Proc. 23rd AAAI Conf. on AI, pp. 222–228, 2008) (PDF). I am trying to understand the last part of the demonstration of the Lemma 3 (in bold). For this, I get an example. Let be $\Gamma = (a+b)(a+b')(a'+c)(a'+c')$ then it... |
From various sources (one being this), I've heard that quantum computers find the correct answer in a sea of possible ones by destructively interfering the wrong ones with each other, and the right one keeps building on itself. How does this work? Does every wrong answers have an opposite, but still wrong, answer? How ... |
I wonder, how is that operating systems make use of libraries as stdio.h if they themselves are the services? I am right? Is the operating system that interacts with the hardware to operations of I/O? How you write to a file system with the C library, for example?
|
A process was running on a uniprocessor system. It is being context switched. While the scheduler is performing this context switch can another process be allocated the CPU while the context switch is being performed?
|
What is the best algorithm for computing the number of ways an integer $n$ can be split into a product of $k$ distinct integers given a prime factorization $n=p_1^{a_1}p_2^{a_2} \ldots p_i^{a_i}$?
Clearly, there are simple exponential time algorithms, but I'm wondering if any algorithms polynomial in $\log n$ are known... |
With $\Sigma = \{a\}$ I want to see if a language $C = \{a^p \ | \ p \ \text{is prime}\}$ is regular and whether or not $C^*$ is regular.
How would I go about showing whether $C$ or $C^*$ are regular? I know I can construct a DFA/NFA to accept them but I am very confused about the fact that there are an infinite number... |
If we know that a language is regular, we can solve the set membership question for a given string by running it through the corresponding DFA for that language.
But what about the other way? Means, if set membership question can be solved for a particular language does this imply that the language is regular?
|
I was browsing the forum where i came by this question, it says that rule 110 from {ECA} is a computation model.
What is the difference between a computation model and model of computation and how can we relate them to computers ?
A model of computation is the definition of the set of allowable operations used in comp... |
This is an exercise problem from the book "Learning from Data".
Given $w_1$ and $\epsilon \gt 0$, find $w_2$ such that, $$\lvert \mbox{sign}(w_1^Tx_n)-\tanh(w_2^Tx_n)\rvert \le \epsilon$$ Where $w_1, w_2, x_n$ are all real vectors.
I know that for large $y$, $\mbox{sign}(y) \approx \tanh(y)$. But I am unable to proc... |
When solving backward data-flow problems, many resources (Wikipedia and many presentations found online) recommend traversing the control-flow graph (CFG) in post-order for fastest convergence, which makes sense.
Other resources (such as the "Engineering a Compiler" book) suggest to use reverse post-order (RPO) on the ... |
Let a input string be given as $w_1w_2...w_n$. Then if a NFA is currently in state $r$ ( and has read the input upto alphabet $w_i$ ) then before reading the next input symbol the NFA splits into two NFA, one being in state $r$ and other being in $s$, if there is a transition of the type $r \xrightarrow{\epsilon} s$. I... |
The current state of video buffering technology is to encode a video multiple times at different resolutions, then when your network speed changes you change which video you are buffering from.
Would it be possible to give this same user experience but implement something like the interlacing method used in PNGs or in ... |
The paper _Fast Approximation Algorithms for Knapsack Problems (E. Lawler, 1979) gives an FPTAS (fully polynomial time approximation scheme) for the multiple choice knapsack problem (MKP). But MKP is strongly NP-hard, so it cannot have an FPTAS unless P=NP. Is the result of this paper wrong?
|
I am newbie in Machine learning.
As we know, in machine learning the aim of an algorithm is to find out (approximate) the output from some examples as training example. these training examples help the algorithm to predict the output of other examples which have not occurred yet. According to Wikipedia, we need "induct... |
So i know that rule 110 from Elementary Cellular Automata is universal but i am wondering if we had other chaotic behaviors let's say there exists a system that shows nearly infinite chaotic behaviors {a structure at a time} similar to ECA structures, how can we prove or disprove universality from that system ?
Suppose... |
For instance, why is it hard to accurately compute sin(1e99)? I suspect it has something to do with rounding error.
|
I am trying to learn how to construct an NFA state diagram.
$$M = \{q0, q1, q2\}, \{a,b\}, \delta, q0 , \{q2\}$$
$δ(q0,a) = q0; \delta(q0,b) = {q0,q1}; \delta(q1,a)= {q0, q2}; \delta(q1,b) = {q1}; \delta(q2,b) = {q1}$
From the above notation, I drew the state diagram below. Is this diagram correct?
In state $q1$ I do... |
I don't know how to state it elegantly, but basically, I want to implement a brute force search algorithm, but there are many different ways that I could enumerate through the search space. This might be naive of me, but I imagine that how I choose to enumerate through the search space could greatly affect whether or ... |
I have a graph with V vertices and E edges. Each edge is a road that takes fuel F to travel. I have a gas tank of capacity K, and want to find the fewest number of refills needed to go from any vertex to any other vertex. If I choose to refuel, I can fill the tank completely.
My thought is to modify the Floyd - Warsha... |
INPUT: weighted undirected graph in the form of adjacency list
OUTPUT: adjacency list without the edge e
Naive approach is:
for(int i = 0; i < adj.get(e.s).size(); i++) { // loop through adjacent of s
if(adj.get(e.s).get(i).v == e.t) { // find t and remove it
adj.get(e.s).remove(i);
break;
}
}
fo... |
Elementary cellular automata show different systems and fractals like rule 30, rule 90, and rule 110. I want to know if there is another classification or type which shows similar structures just like in elementary cellular automata (ECA).
For example what other systems can show structures similar to Sierpinski triang... |
Given the language $L = \{w \in \{a,b\}^* \, | \, |w| = n \cdot \sqrt{n} \text{ and } n \geq 42\}$ and the assignement to proof that $L \notin CFL$ with the Pumping lemma.
Assuming $L \in CFL$, would it be possible to start with defining a language $L' := L \cap a^+$ which has to be context-free since $CFL$ is closed ... |
I am an undergraduate student in Computer Engineering and going through one of the textbook examples, I am asked to prove that
$T(n)$ is $O(\log{}n)$
Where $T(n)= 5\log_{2} 2n +7$.
I understand that this means that I must prove that $5\log_{2} 2n +7 \leq\lambda log(n)$
For some in n in a neighborhood of infinity. How ... |
I've been reading book on Operating System, in which author writes :
Somewhat surprisingly, it(Best fit) also results in more wasted memory than first fit or next fit because it tends to fill up memory with tiny, useless holes. First fit generates larger holes on average.
I want to understand how generating larger ho... |
I am currently learning about caches in Systems class, and I had a few doubts about what exactly happens when a Computer reads a PDF. This is the sequence that happens in my mind:
The CPU checks if the pages of the PDF I want to read are there in cache.
It is not, so we keep going down the Cache hierarchy until we get... |
I'm still new to CFG and CNF and have trouble sometimes understanding the concepts.
I'm trying to convert this CFG into Chomsky Normal Form:
G: S -> aSbS | bSaS | epsilon
I think the language generates all strings with same number of a and b, i.e. {a^n b^n |n>-0}.
But to convert it into CNF, I've finished adding a ne... |
I am working on this project where I am required to find the theoretical proof for following.
I have a particular type of binary trees, where
1) each internal node will definitely have two children.
2) There are n leaf nodes and can be assumed in order 1 to n from left most to right most.
Now this is clear that there a... |
I had a test today, there was a question that was a bit confusing. Anyway I am asking the question, from memory, and explaining what I answered. It would be great if someone could explain if I did answer it correctly or not.
The question is that assume a ring of 6 processes in an asynchronous system(each process runs ... |
I am confused as to how this is true:
O(n log n) + mO(log n) = O((m + n) log n)
I understand that O(n) + O(m) = O(n + m). I'm mostly confused as to how to deal with the coefficient preceding O(log n).
|
In the question Matrix Chain Multiplication you are given a chain of Matrices and is required to find the optimal way to multiply the matrices together. Normally this is solved using Dynamic Programming but I have found a greedy approach to this problem.
For example a chain of Matrices of the size of:
A B ... |
I'm studying my notes for a formal language course and it them it states
The vast majority of languages over a finite alphabet cannot be
represented by a finite specification.
I don't understand this. What is meant by "specification"? It then goes on to show why this is true by showing some sets of the alphabet are... |
Maximum directed cut: Given a directed graph $G = (V, E)$ with nonnegative edge costs, find a subset $S \subseteq V$ to maximize the total cost of edges out of $S$: $\mathrm{cost}( \{ (u \to v) \mid u \in S \text{ and } v \in \bar{S} \})$.
I am trying to come up with a greedy algorithm for Maximum directed cut with fa... |
Assuming we have two integers a and b, if we do bitwise operations like a & b or a | b, is the running time O(1) (constant) or is it O(b) where b is the number of bits in a and b?
Thanks!
|
I am reading Sipsers. The book introduces halting problem and proves that is a turing recognisable language but not a turing decidable language. Thus giving a Turing machine which does not halt on some inputs. The language to be precise is
$L=\{\langle M,w \rangle| \ M \text{is a turing machine and } w \text{ is a stri... |
I just have general questions about sets and determining if they are regular languages.
i) If A is regular, and A is a subset of B, then B must be regular.
ii) If B is regular, and A is a subset of B, then A must be regular.
iii) If A and AB are regular, than B must be regular
iv) If Ai is an infinite family of regular... |
Let's say I have a tree comprised of nodes where each node is of some type (T), where there is a known/fixed number of types (i.e. similar to attributes in an xml document), and where a node can only have one type. Let's also assume that our tree is somewhat balanced, and that there are far more nodes in the tree than ... |
For a certain problem I am trying to solve given a list of integers, it is advantageous to me to first identify as many of the integers that are mutually coprime as possible. I'm having trouble thinking of a good general algorithm for this, and everything I've found online seems to relate to problems that are slightly ... |
The question I'm faced with:
Let $A[1], A[2], ...,A[n]$ be an array containing $n$ very large positive integers.
Describe an efficient algorithm to find the minimum positive difference between any two integers in the array.
What is the complexity of your algorithm? Explain.
I would assume you apply a Merge Sort or Qu... |
How can the maximum flow of a graph be computed when all nodes of the graph are connected to both sink and source nodes (two hypothetical nodes), and the maximum flow method should ignore such paths as $\text{source} \to \text{node} \to \text{sink}$, where $\to$ is a single edge?
A valid path containing a positive flow... |
Consider a static set $S$ of positive numbers from range $[1..10^9]$. Is there an efficient algorithm to answer queries of the form: "Given a number $d$ is there an element $x \in S$ such that $d | x$".
Simple straightforward check takes $O(|S|)$ time per query and uses $O(|S|)$ memory.
Storing all the divisors for ... |
I am reading the paper Measuring the hardness of SAT instances by Ansótegui, Bonet, Levy and Manyà (Proc. 23rd AAAI Conf. on AI, pp. 222–228, 2008) (PDF). I am trying to understand the decision algorithm beame_pitassi described in the Figure 1 in paper and showed below. This algorithm searches for the space of an UNSAT... |
Is it possible to test algorithmically whether the language of a given automaton is empty?
If I have a language L, could I say that L intersection with the empty set is L?
|
I´ve been thinking about this particular computing/crypto/database problem for years and I just want to know if there are already solutions to it. To be honest I don´t even know what field this problem belongs to exactly.
In a nutshell: person A has a list of data, another person (B) has an algorithm that gives each it... |
Algorithm A divides the problem into 5 sub-problems of half the size. Solving each sub-problem then combining the solutions in linear time.
Algorithm B solves problems of size n by dividing them into 9 sub-problems of size n/3, and recursively solving each sub-problem then combines solutions in 26*n^2 time.
Algorithm C... |
I was trying to calculate cosine series :
cos x = 1 - x^2/2! + x^4/4! - x^8/8! .... , where x is in radians:
include iostream
include math.h
using namespace std;
long factorial (long num)
{
if (num >1)
return num*factorial(num-1);
else return 1;
}
int main()
{int X,sum=0;
cout<<"Enter value of x in radians : ";
cin>... |
A graph is almost Hamiltonian if it contains a cycle that visits every node at least once and at most twice.
Is the problem of determining whether a graph is almost Hamiltonian NP-complete?
|
There are a set $A$ of trees. There is another set $B$ of trees that is the collection of all possible subtrees of the trees in $A$. I don't have $A$ but only have $B$, and I need to figure out the size of $A$. A brute-force way is making a graph of the trees. For each root node in $B$, find a tree that contains the no... |
I am study this lecture The Complexity of Propositional Proofs. Here there is a term size of propositional formula (page 2),
Every tautology $\tau$ on $n$ variables has an $F$-proof in which thera are at most $2^{O(n)}$ formulas, each of which has size polynomial in the size of $\tau$
but here doesn't define that te... |
The standard usage cases for the Hadamard gate seem to be passing a pure $|0\rangle$ or $|1\rangle$ state in to get an even amplitude (probability) mixed state which has either matching or mismatching phase.
The other use of course, is to take such an even amplitude mixed state, pass it through the Hadamard gate, and g... |
I was looking over stephen wolfram's work mainly about Elementary Cellular Automata, i see that for all rules with N steps {i.e 200 steps} they show the same pattern {i,e rule 90 running on 20 steps and 100 steps are the same, like Here}.
Unlike rule 110 which shows different behavior when N = 20, 100 or 200, i know th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.