instruction stringlengths 35 29.1k |
|---|
Problem
I am trying to come up with an algorithm that will dynamically throttle a client's number of outstanding requests based on the response times of completed requests. Response times are unpredictable and can be between 7 and 90 seconds. The response times are greatly affected by the total of outstanding requests,... |
I have an undirected graph, whose nodes have some sorting order defined on
them.
I have to split it into subgraphs such none of the subgraphs have any cycle.
I am trying the following procedure
listOfSubGraphs = empty
currentSubGraph = empty
for each node do
if "node + currentSubGraph" do not form a cycle
... |
What is supposed to be the right result of an SCC algorithm running on a DAG.
should it return "no components" or "there are V components of size 1"?
I suspect it will return the latter (since it will start with the last sink, and then go back and mark each single sized vertex as a component, since each DFS will be of... |
From a comment, an interesting question popped up. The class of CFLs (the languages recognized by PDAs) are obviously not closed under nondeterminism - what I mean by this is that deterministic PDAs are not equivalent in power to nondeterministic PDAs.
However, all CFLs are decidable, and in this case, any deterministi... |
So Kadane's dynamic programming solution for finding the maximum sum contiguous subinterval in a 1-d array runs in linear time, and can be adapted to give a best-known $O(m^2n)$ time solution to find a maximum sum contiguous rectangle in a 2-d array of size $m \times n$. (i.e. find max sum subarray defined by all entri... |
So my assignment is to write a program that prompts the user for two different times on the same day (with 0 being midnight, 0700 being 7:00 am and 2200 being 10 pm) and then returns the difference between the two times with the amount of hours and amount of minutes elapsed. For example, if the user inputted 1255 and 1... |
When you call decrease-key in a min priority queue, you are basically setting the key, you can accidentally put a higher key, right? so why isn't it called "set-key" or "update-key"? why (according to Wikipedia and other sources) a min priority queue has "decrease-key" and a max priority queue has "increase-key"? why n... |
I'm studying computational complexity and I was wondering why the NP-Complete (NPC) problems is an important class at all. I find it obvious why we're interested in showing a given NP problem is NP-hard.
I also understand the definition of NPC, and that showing a given decision problem is NP-hard, knowing it is in NP... |
Wikipedia says that the number of nodes in a ORBDD (Order Reduced Binary Decision Diagrams) of order $x_1 < x_2 < \dots < x_{2n}$ is $2n + 2$.
But I can't find proof. Anyone?
|
I have two client-server protocols which perform the same function but they have different complexities in time (in terms of number of operations) and space (in terms of number of objects of same type). The size on which are based the complexities is $n$.
In the fist one, the server has to send only one object and the... |
$f(x,y)= 0$ if $x>y$ and $1$ otherwise.
How can prove formally that this function is primitive recursive?
|
This is a homework question. I need to prove that the following language is in NP Complete:
3-VERTEX-COVER = $\{\langle G,k\rangle \mid$ G is an undirected graph, each vertex in $G$ has at most $3$ incident edges, and there is a vertex cover of size $k$ in $G\}$
Showing that it is in NP is easy. Now, to show that it ... |
Dynamic programming algorithm for Knapsack is stated to have complexity $\mathcal O (nW)$.
However, I've also seen the complexity stated as $\mathcal O (n^2V)$, where $V=\max v_i$.
(Here $n$ is the number of items and $W$ the weight limit).
I see from the algorithm that the first complexity measure is correct:
http://e... |
There is no general analytic solution to the n-body problem that can produce an analytic function which can be used to give an n-body system's state at arbitrary time t with exact precision. However, there are some special cases of n-body systems for which an analytic function is known.
In much the same way, there is n... |
I have a list of points in $R^n$, and for each point I want to find the Euclidean distance to the nearest other point in the list. I don't need to know the coordinates of the nearest neighbor; I only need the distance. The naive approach would be to compare each point to every other, resulting in quadratic running time... |
Prove that the language Loop Turning Machine = { < M > | M is a TM that loops on all inputs} is recognizable.
I feel like $M$ would never halt. To make $M$ recognizable it needs to accept or reject. Do I need to establish a decider?
EDIT:
Can I say that a halting Turing Machine $M$ is a machine for which exis... |
Given a NP-complete problem $A$, with parameter $a$ and a problem $B$ with parameter $b$, such that a problem in $A$ of size $\mathcal{O}(2^a)$ is $\mathcal{O}(b)$ when translated to $B$, is $B$ EXPTIME or NEXPTIME complete? I.e. If a problem of exponential size relative to a NPC problem is of linear size in another pr... |
I'm trying to learn a little bit about Isabelle and proofs in general, and it's uses in Programming Language Theory. I'm following a book, "Concrete Semantics with Isabelle/HOL". I'm still in the beggining.
I was able to do the first exercises, but I got to a point where I noticed I just don't know what I'm doing. I j... |
Point-Cover-Interval Problem: Given a set $\mathcal{I}$ of $n$ intervals $[s_1, f_1], \ldots, [s_n, f_n]$ along a real line, find a minimum number of points $P$ such that each interval contains some point, that is $\forall I \in \mathcal{I}: \exists p \in P, p \in I$.
Interval Scheduling Problem: Given a set $\mathcal... |
I recently needed something like a state machine, but with a slightly different use case.
In general, I would say a state machine knows about a set of states, and different events. Depending on the current state and the event, a state machine is able to decide if this is a valid event for this state, and to which state... |
Does MD5 map to all possible 128 bit numbers? To put it another way:
For every 128 bit number y, does there exist at least one x for which md5(x) = y?
The answer probably is yes, for arbitrary x, and probably no proof exists. However, feel free to prove me wrong :)
But what if I impose some kind of limit on x, e.g. x <... |
I was trying to look my book computer architecture and design, but I can not find the answer for this question.
what are-the key-advantages of pipelining?
|
I have a programming assignment that says we should use the MVC architecture but we never really learned what that is.
I looked up MVC architecture on google but nothing was helpful. So can someone explain MVC architecture?
|
Can the split operation be implemented for AVL trees with complexity $O(\log n)$? I'm interested in links to articles or any specific information about this subject.
The split operation divides the AVL tree into two derived AVL trees, based on key. One of the derived trees should contain all the vertices in which all k... |
It is well-known due to Tarski that the theory of reals $(\mathbb{R},+,\cdot,<,=)$ is decidable. I was asking my self whether one would lose the decidability by adding all real constants. More formally, is the theory $(\mathbb{R},\{\underline{r} \mid r \in \mathbb{R}\} +,\cdot,<,=)$ evaluated in the standard model of t... |
I am working on a computer organization caching problem
The Problem: What happens if the associativity level is greater than the cache size?
I know that associativity level is how many blocks are in a set. Say we have a 16 way set associative cache and a cache size of 15. What would happen? Would the cache break or w... |
I have a question about a specific amortized accounting algorithm and to be specific the variant with Reset operation.
First, 9th line of increment sets $\max[A]$ to -1 if $i \le \max[A]$ because for example going from 100 to 101 would set $\max[A]$ to $-1$ which does not make much sense.
Then, "if max[A] increases pl... |
I am trying to compare asymptotic runtime bounds of a few algorithms presented in this research paper, A quasi-polynomial algorithm for discrete
logarithm in finite fields of small characteristic. The functions are,
$L(\alpha) = \exp(O(\log(n)^{a}(\log\log(n))^{1-\alpha}))$,
which I'd like to plot for $\alpha = 1/3,... |
Given $(U,V)$ two integers of finite size, I have a question about the complexity of calculating the $V^U$, i.e. $V$ raised to the power $U$. Is their a polynomial time algorithm to do this? If not is this an NP-hard problem?
|
Ultimately, my question is whether it's possible to exactly characterize the regular languages in terms of fooling sets. To help explain my motivation for asking this, here's a quick exposition.
Let $L$ be a language. A set of strings $S$ is called pairwise distinguishable relative to $L$ if for any two distinct string... |
The Problem: A CPU produces the following sequence of read addresses in hex. Suppose the cache is empty to begin with and assuming an LRU replacement, determine whether each address produces a hit or miss for fully associative cache
20 0010 0000
04 0000 0100
28 0010 1000
4C 0100 1100
Here is the format that we use fo... |
The Problem: If I have a 3 address machine, is my machine more likely to follow RISC or CISC design? 2 addresses? 1 address? 0 address.
To solve this problem I first looked up the different terms.
RISC is a microprocessor architecture that has smaller/simpler set of instructions
CISC is a microprocessor architect... |
I've come across a way of implementing a circular array that represents a double ended queue.
Let the circular array have the following instance variables:
int[] array;
int front = 0;
int rear = -1;
int size = 0;
int capacity = x; // where x is a parameter in the constructor
The operations of the queue are:
dequeue -... |
I am a bit confused about what it means for a permutation to be k-wise independent.
If I pick a permutation uniformly at random from $\sigma \in S_n$ then isn't it true that for any $k$ integers, $i_1,i_2,..,i_k$ $\in \{1,2,..,n\}$, the numbers $\sigma(i_1),\sigma(i_2),..,\sigma(i_k)$ are k-wise independent?
|
Finding the shortest path in a DAG is extremely easy:
See the example here http://www.utdallas.edu/~sizheng/CS4349.d/l-notes.d/L17.pdf
However, I cannot find a way of parallelising this code. Is there a way of doing that?
|
For $0 \leq a \leq n$ the VT code $VT_a(n)$ consists of all tuples $(x_1,x_2,..,x_n) \in \{ 0,1\}^n$ such that $ \sum_{i=1}^{n} ix_i = a (mod (n+1))$
For example $VT_0(4) = \{ 0000,1001,0110,1111 \}$
Say someone has $x = 1001$ and deletes the first zero and transmits $x' = 101$. Now is the claim that a receiver who o... |
The Problem: A high speed workstation has 64 bit words and 64 bit addresses with address resolution at the byte level. Assuming a direct mapped cache with 8192 64 byte lines, how many bits are in each of the following address fields for the cache? 1) byte 2) Index 3) Tag?
I know that an address for specifying data wi... |
Suppose I have programs A and B defined in this way:
A = let F:Tf = (fn f:T ==> (fn(x:unit => x || fx))) in (fix.F)(m=!l+1;l=!m+1)
B = let F:Tf = (fn f:T ==> (fn(x:unit => x;fx))) in (fix.F)(m=!l+1;l=!m+1)
where || indicates concurrency and ; is the sequence symbol.
How can I prove (not formally) whether these tw... |
How to solve the recurrence equation $T(n)=2T(n/2) + n \lg n$
For ex: I implemented "Counting inversions" with a full mergesort instead of just using merge part, So the outer complexity will be $n \lg n$.
Also, What is the $O$(complexity) of above ?
Introduction to Algorithms, 3rd edition (p.95) has an example of how ... |
What would be a good way representing:
i. Given a key, return all the data values associated with that key
AND
ii. Given a data value, return all the keys that are associated with that data.
So far, all I can think of is to maintain all keys in a sorted linked list where each "key" node has a key value and a vector of ... |
I'm both interested in practical and theoretical aspects of the problem. How do you store linguistic data. Suppose you have stemmed, parsed, tagged and, perhaps even did some preliminary analysis, such as clustering by topics, how then do you store this information for reuse?
I've been looking at knowledge representati... |
A language $L$ is defined recursively according to the following rules:
$λ ∈ L$
If $w ∈ L$, then $bw ∈ L$ and $waa ∈ L$
I am not sure if strings from this language should mix from this definition. Would strings only consist of $bbbb$ and $aaaa$, or can it also consist of $bbaa$, $aabb$, and so on?
|
If I have these languages:
$$\begin{align*}
S&=\{a,b,c,d,e,f,g,h\}\\
A&=\{b,g\}\\
B&=\{a,b,c,d,f,h\}\\
C&=\{a,c,g\}\,,
\end{align*}$$
Writing $X'$ for the complement of a set $X$, what would B'∪ C consist of? Would the elements of this language then be C = {c g}?
Also if I have B ∩ (A ∪ C'), would the elements of this... |
I have a problem that is a bit complex, and I don't know what method/model I should use to express it (much less solve it).
Let's say we have a lot of employees and a few jobs to be done. Each employee ranks the jobs they want most.
Easy. Bipartite matching, with weighted edges. Or Hungarian algorithm. Right?
Now thing... |
According to the Ford-Fulkerson algorithm, I thought that if there was no path from $s$ to $t$, then the flow would be a max flow. In the flow below, there are two paths between $s$ and $t$. Then, how can this be the max flow?
|
Probelm:
Deciding whether a network flow graph has more than one min cut.
Optimal running time: O(V^2*E).
I trying to prove the correctness of the next algorithm: run Dinitz to find max-flow and build the residual graph. One min cut will be all the vertices reachable from s (as T will be all other vertices) and second ... |
I am studying the firefly algorithm and I would like to ask about the Intensity function that is defined at the beginning of the algorithm.
What is it for? Some literature give different functions for $I$. Wouldn't it be easier if the intensity be just the function itself (for example in a maximization problem)?
|
Suppose that the processor reads cache memory in one clock cycle.In case of cache miss the processor needs 5 clock cycles to read the information in the main memory.What should be the value of Cache hit rate so that AMAT=2?
We know that
AMAT=Hit time+ (Hit rate)*(Miss penalty)
Hit rate= (AMAT-Hit time)/Miss penalty= ... |
My intention is to optimise buffer allocation in a shared buffer (with total max capacity) where each incoming and outgoing packet belongs to a category (we have a finite number of categories < total buffer size), and the packets are inserted and removed so that each category has a different and independent input and... |
Looking for a book that describes the path the code takes from high-level to compiler to memory etc.
Doesn't matter which programming language is used, just would really like a nice breakdown of the steps the computer takes to execute it in thorough detail.
Thanks!
|
The Rosetta spacecraft has reached a comet in August 2014 and sent a
lander on its surface. It was one of the greatest science news of the year.
Automated Planning and Scheduling techniques are really important in the operations of these kinds of missions. At the last ICAPS there was even an invited talk by one of the ... |
When working with undirected graph algorithms using an adjacency-list type structure, it's sometimes enough to store a given edge (i, j) just stored in the list of edges of i or on the list of edges of j. Other times, it's important to have an (i, j) on i and a (j, i) on j.
I was wondering how do you call graph repres... |
How can I show that $L = \{a^m b^n \mid (m > n \text{ or } m < n) \text{ and } m, n ≥ 1\}$ is not a regular language.
|
What's the fundamental difference(s) between small and big-step operational semantics?
I'm having a hard time grasping what it is and the motivation for having the two.
|
I have a problem where I'm given the input of a graph. The output would be a set of vertices such that I have the minimum number of vertices to cover other vertices and if there is more than one option then then I'd have to choose the maximum weighted vertex set. I'm trying to approach this in a Dynamic programming tho... |
For what I know of complexity measures in CS, they are aimed at rather large problems. With today's computing power, most people don't care about comparing the complexity of simple problems as they would all be solved in about the same time.
Yet, I turn out to be interested in some cost measures for small problems. For... |
What is a contiguous subarray? I have tried searching online and have found pages about solving the largest contiguous subarray problem but none with a definition or explanation of what contiguous in this actually is.
Ex: Wikipedia: Maximm subarray problem has no explanation of why the given "subarray" is contiguous o... |
It seems that in CA context nondeterministic (ND) means probabilistic, not ND as in NFSMs. At least I haven't seen a paper or book which discusses NCAs, without talking about probabilistic CAs.
I haven't even found a definition anywhere. It feels like NCAs can't be equivalent to CAs (not in the same lattice at least), ... |
I am trying to build a generic data structure that needs to hold keys and values and in the same time keep track on the indices in which keys and values were put in, like arraylists do but in a complexity of $O(\log n)$ or less.
I tried to work around a solution to this problem and created various TreeMaps that has Int... |
Given an undirected, connected, weighted graph $G = (V,E,w)$ where $w$ is the weight function $w: E \to \mathbb{R}$ and a minimum spanning tree (MST) $T$ of $G$.
Now we decrease the weight by $k$ of an edge $e$ which does not belong to $T$.
How to efficiently update $T$ to make it an MST (denoted $T'$) of $G'=... |
A Markov algorithm is a string rewriting system (well, not a set of rules but a list of rules since they need to be ordered) with a strategy for applying rules that ensures determinism.
I think the usual definition (1) is
Find the first rule that matches, and then replace its leftmost occurence.
Another definition ... |
Sometimes problems can be solved in $O(n^c)$ time for any $c > 1$, but not for $c=1$. Typically this is written as $O(n^{1 + \epsilon})$, since $\epsilon$ is understood to be some small positive constant. I want to know the terminology for describing this complexity class.
For example, I would call a $\Theta(n)$ algori... |
Hash tables resolve collisions through two mechanisms,
separate chaining or open hashing and
open addressing or closed hashing.
Though the first method uses lists (or other fancier data structure) in hash table to maintain more than one entry having same hash values, the other uses complex ways of skipping n elements... |
Given an unweighted, undirected graph, what is the time complexity to decide if its radius is at most 2? Are there any faster algorithms than doing BFS on each node?
|
The Problem: Indicate whether the following statements are true or false:
a. If e is a minimum-weight edge in a connected weighted graph, it must be among edges of at least one minimum spanning tree of the graph.
b. If e is a minimum-weight edge in a connected weighted graph, it must be among edges of each minimum sp... |
The Problem: Let T be a tree constructed by Dijkstra's algorithm in the process of solving the single source shortest-paths problem for a weighted connected graph G.
a. True of false: T is a spanning tree of G?
b. True of false: T is a minimum spanning tree of G?
I read from Single source shortest path... |
Last fall I went on a tour of the Blue Waters supercomputer at the University of Illinois. I asked whether anyone ever used the entire computer. I was told that it was always working on multiple projects. That made me wonder about the usefulness of supercomputers. Perhaps Blue Waters is unusual in that it has to be... |
I went through lots of blogs and posts but could not exactly figure out how the machine code is converted to electrical signals?
Any software program is compiled to machine code which is nothing but lots of 1s and 0s.
1 means high voltage e.g 5V and 0 means comparatively low voltage e.g. 0V or ground, what's the compo... |
We know that $NC^1 \subseteq NL \subseteq AC^1$ and that 2-SAT is complete for $NL$.
How does one construct an $AC^1$ circuit for 2-SAT?
Recall that $AC^1$ circuits have $O(\log n)$ depth where $n$ is the number of bits in the input.
I have read Herbert Vollmer's book on Circuit Complexity as well as the chapter in A... |
I read several times of Scott Aaronson saying that P=NP implies that human creativity is boring and something like that, and that P=NP has something to do with proof automation. I don't get his argument, despite having studied basic complexity theory. What is he talking about?
|
xor gate, now I need to construct this gate using only 4 nand gate
a b out
0 0 0
0 1 1
1 0 1
1 1 0
the xor = (a and not b) or (not a and b), which is
\begin{split}\overline{A}{B}+{A}\overline{B}\end{split}
I know the answer but how to get the gate diagram from the formula?
EDIT
I mean intuitively, to me, I should get... |
Given a vector of elements, how can I calculate the length of the Huffman codewords without generating the Huffman code itself?
Using Matlab, I was able to compute the Huffman code and and get the length of the codewords but is it possible to get the lengths alone without computing the codewords?
|
Suppose that we have $ \\ T(n)=\left\{\begin{matrix}
c, & \ \text{if } n<d\\
aT\left( \frac{n}{b} \right )+f(n), & \ \ \text{if } n \geq d
\end{matrix}\right.$
The Master theorem is the following:
If $f(n)=O(n^{\log_b a- \epsilon})$, then $T(n)= \Theta(n^{\log_ba})$
If $f(n)= \Theta(n^{\log_b a} \log^k n)$, then $T... |
Suppose you want to introduce a format for a language, commands, ... etc. (Specially in the filed of computer science) in a paper
for example something like below:
X | Y = [ Z ] <W> [ / ] $P
By this, I mean, X or Y could be at the left side of an equation, Z is an optional argument at the right side, <W> is another sy... |
I am looking for effective and reliable algorithm which is able to generate random samples of permutations by square doubly stochastic probability matrix $P$ (n x n) distribution ($\sum_{i}p_{i,j} = \sum_{j}p_{i,j} = 1$, $i,j = 1,2,...,n$).
Probability matrix elements $p_{i,j}$ define probability of $i = \pi(j)$ and $0... |
I am fairly new to formal language theory but understand how to convert simple CFGs into both Chomsky normal form and Greibach normal form. However, I have not seen any examples of how to do that when you add the Kleene Star *, Kleene Plus +, and question mark ? to that grammar, commonly seen in regular expressions.
Ho... |
This Problem sparked my question:
Does a TM $M$ enter state $q$ on input $w$?
I proved it was undecidable in this format using the Halting Problem as a subroutine:
If HALT
simulate M on w and return result
else
return false
Since HALT is undecidable, this given problem is undecidable as well.
However, the giv... |
Is there any NP-hard problem that we can find a mechanical "polynomial time" solution to? For example, suppose we construct a graph out of something physical, e.g. we have have pipes through which we can move water. If this pipe system was suitably built, could we solve say some routing problem by seeing if water flows... |
I don't know what to call this, so I'm calling it "clumping by color".
Suppose I have an array of length $n$
where each of the items has one of $m$ "colors". I'd like to permute the elements so that all the items are "clumped" together with other items of the same color. That is, in the final array ordering
$$ x_0, x... |
I just started reading about distributed systems for the first time ever. There is a fairly slick proof of the impossibility of consensus in an asynchronous model using some combinatorial topology. On the other hand, there are multiple consensus protocols used in practical systems to synchronize distributed state machi... |
If the two generals problem is unsolvable how can we human beings agree on things?
I mean, we communicate everyday and have the same limitations as any communication problem handled by computer science. Why doesn't it affect us?
|
Is there a way to find the nth string of characters from an alphabet, without having to store "all" of the combinations?
Example:
Alphabet $A = \{a,b,c\}, n=12$.
All possible combinations in lexicographic order are $C = \{a, ab, abc, ac, acb, b, ba, bac, bc, bca, c, ca, cab, cb, cba\}$.
You can see that there's no rep... |
The class $FPT$ (fixed-parameter tractable) is defined here. However, there is only one "parameter" that is studied from the given problem/language.
Is there an equivalently defined class that can take $O(1)$ parameters? It may be useful for defining this for problems that are not driven by a single parameter. Unfortun... |
All the consensus algorithms that I've seen always depend on having a leader elected with all queries directed at the leader (assuming that we're not OK with getting back stale data). Are there any efficient algorithms that are completely symmetric, i.e. which do not elect a leader and therefore allows querying any ser... |
I'm trying to calculate how much minimum bits need to be added to data of 100bits, in order to correct 10 bits that are messed up by:
bits that deleted (Erasure Correcting)
bits that corrupted (Error Correcting)
I tried Hamming code and Reed-Solomon codes but didn't figured out the answer of 1 or 2.
There are some ot... |
I'm curious about whether there are any complete problems in the Arthur-Merlin complexity class. Graph Non-Isomorphism (GNI) seems to be the canonical example of a problem in AM, but it's probably not a complete one.
I suppose I'm also wondering if a "complete" problem is well-defined for AM. Since AM = BP.NP, it seems... |
I have come across a question like this. And I don't have any idea how to solve this.
Suppose a machine with instruction format of the form opcode A,B,R where A and B are main memory addresses and R is a register. If there are 20 registers in the machine, how many addresses are possible to have in the main memory? An ... |
I am working on a problem where I am supposed to count the number of arrays of size $N\times M$ where the sum of elements in the $i$-th row is greater than or equal to the the sum of elements in the $(i-1)$-th row. And the the sum of elements in $N$-th row (the last row) is less than or equal to $M$. All the elements a... |
If A and B are Turing recognizable, is A - B Turing recognizable?
I think that A - B would be Turing recognizable because they're both in the space of Turing recognizability. For example, if A is context free and B is a regular language A - B would result in a language that is sill Turing recognizable.
However, doe... |
I have a question to find out that $L = \{a^i b^{j+3}\mid i\ne j \}$ is regular or not. I know that it is not regular. I tried with pumping lemma but I am finding just a specific number of $v$'s in $u v^i w$ that not satisfies the language condition, but not ALL $v$'s. What are the best choices for $i$ and $j$ to prove... |
I find it really difficult to prove non-regularity of a language using pumping lemma. I do understand that regular language is the language that can be expressed using DFA/RE. So if I can't create DFA/RE for language can I use that as proof of it's non regularity?
For example, following is an attempt to create a DFA fo... |
Here is the complete proof taken from this link
How do I convince myself that n(1+b) is not prime when b>=1?
Here is what I did:
if n is 3 and b is 3. Then resulting string 111 111 is prime. Is this how it should be done it in proofs?
The way I see is this. If n(1+b) is not proved for even one set of values then I ca... |
I have to determine, and prove, whether the language $L=\{a^{2^{n}} \mid$ n is a natural number$\}$ is context free or not (if it is by a grammar and not by the pumping lemma).
I tried to construct a grammar, but I don't have a working one. I have no problems to construct the language $L=\{a^{2n} \mid$ n is a natural ... |
Is the language { ww | w ∈ {a,b}* } context free?
I have tried to create a pushdown automaton but I didn't find any solution. I think you need a queue and not a stack.
Is there a way to prove this statement using the pumping lemma?
|
How can I prove that if P=NP then for each non-trivial language $L,L'\in NP$ there exists a polynomial reduction $L\leq L'$?
|
Suppose that we have an optimization problem defined as follows:
$OPT$ = Given an input string defining a set of feasible solutions $F$ and an objective function $f$, find $x\in F$ maximizing $f(x)$
and the equivallent decision problem
$L_{OPT}$ = Given an input string defining $F$ and $f$ and a target value $u\in Q$, ... |
We've developed an esoteric language. In this language, a program contains a static amount of code, and a static amount of storage space. However, parts of the program can recurse, so the interpreter will spawn another copy of a subset of the code and additional storage space to match. Can this language be Turing Compl... |
See title. I'm trying to apply the method from this question. What I have so far is this, but I don't know how to proceed from here on:
T(n) = T(n-1) + n2
T(n-1) = T(n-2) + (n-1)2 = T(n-2) + n2 - 2n + 1
T(n-2) = T(n-3) + (n-2)2 = T(n-3) + n2 - 4n + 4
T(n-3) = T(n-4) + (n-3)2 = T(n-4) + n2 - 6n + 9
Substituting the valu... |
Thanks to the max-flow min-cut theorem, we know that we can use any algorithm to compute a maximum flow in a network graph to compute a $(s,t)$-min-cut. Therefore, the complexity of computing a minimum $(s,t)$-cut is no more than the complexity of computing a maximum $(s,t)$-flow.
Could it be less? Could there be an ... |
For the graph colourability problem, we are given a graph and our goal is to find a colouring of the graph with the fewest possible number of colours so that no two adjacent vertices have the same colour. This problem is known to be NP complete.
Suppose that we have an algorithm $A$ that runs in polynomial time and te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.