instruction stringlengths 35 29.1k |
|---|
Regarding turing completeness, i read that for a language/machine to be turing complete it is required that it has some sort of conditional.
Consider the factorial problem, we would typically define the algorithm as
Solution 1.
int fact(int n)
{
if n == 0 then
return 1;
else
return n*fact(n-1);
}
An alternative woul... |
I am trying to understand the proof why Gale–Shapley algorithm is optimal, however i am unable to do so. Could you please expand the proof, since the proof on this page https://sites.google.com/site/stablemarriageproblem/intro and here
http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15251-f10/Site/Materials/Lecture... |
Say the CPU is currently handling an interrupt. Another interrupt arrives but it's lower priority than the current one so it gets put in the 'pending interrupt register'. My current interrupt is done so I use a 'return from exception' instruction. Where will this instruction jump to: the address which was interrupted, ... |
Let $A \subseteq B$, and A is unrecognizable. I know in general that doesn't mean B is unrecognizable. However, are there some limitations we could put on A and B that would make it true? The only thing I could come up with was A=B. Plus, we could say B is unrecognizable as part of our assumptions, but that's not reall... |
I wanted to know how M:N kernel user thread model handles context switching, between multiple khread and pthread. How does the PCB/TCB for process and threads look like, how is state of registers stored while switching between kernel mode and user mode or vise versa, or between kernel threads or between user threads.An... |
I'm working on a problem set for my algorithms course and we're asked to solve the recurrence relation
$$
T(n) = 7T(n/2) + n^2 + \log(n).
$$
Since this recurrence relation is not of the form $T(n) = aT(n/b) + n^d$ and therefore the master theorem does not apply, I'm confused about where to begin in solving it.
Could an... |
I want to find a near-optimal solution for a maximum weight independent set.
i.e given a graph $G = (V,E)$ I want to find a set $S = \{v_1,v_2,\dots,v_n\}$ of nodes in $V$ such that the sum of their weights is maximum (The weights are positive), under the constraint that every pair is not connected by an edge,
i.e $\f... |
I was wondering if someone could possibly verify my solution to the following:
I'm trying to solve the recurrence relation $T(n) = T(n-1) + 2/n$. To get it into the form of the Master Theorem, I note that for sufficiently large $n$, $n - 1 \geq n/2$. Moreover, $2/n = O(1)$. Thus, we can rewrite the equation as $T(n) = ... |
Question:
If a system has $32k$ bytes and each such byte has unique address(so $32k$ addresses), what is the smallest possible bits that can be use by every byte for the address ? All the bytes use the same number of bits for the address.
I thought the answer can be found by finding the value to which $2$ can be rai... |
I thought the answer would be 32 for remainder $0,1,2,\dots, 31$. But answer given as $6$.
and explanation is given as if the number is $2^n$ then number of states required would be $n+1$.
|
I am implementing a genetic algorithm to use as an optimisation algorithm to evolve robots. The robots have certain parameters (represented as floats) which can lie anywhere within a certain range defined for each parameter. My goal is to optimise these parameters to produce the fittest robot.
There are about 25 parame... |
I am doing a artificial intelligence course as part of my computer science degree.
I am stuck on a question about searching. The question is a version of the Bridge and torch problem.
Five people need to walk from this side to the other side of a bridge at night. The bridge is not in a very good condition and will ho... |
I fail to understand why cut off value would be system dependent, and not a constant.
From Princeton University website
Cutoff to insertion sort. As with mergesort, it pays to switch to
insertion sort for tiny arrays. The optimum value of the cutoff is
system-dependent, but any value between 5 and 15 is likely to... |
When deterministic automaton, I need to prove that you can't implement the language in it, because the language is not regular.
Easiest way to prove that a language is regular, is just by making an automaton for it. But if the automaton is not regular, you can't just say that it's not regular because you couldn't build... |
I know a simple reduction from 3-color to 4-color. But how do you reduce 4-color to 3-color ?
I have been searching for the right way to make this reduction for a while now. I would love some pointers.
|
Why should computer designers trade off clock rate against cycle count? Can somebody explain this sentence for me? Shouldn't it be that when the clock rate increases the cycle count decreases?
I don't understand why the cycle rate and the cycle count are not proportional.
|
In a queuing system (M/M/1) with a finite packet capacity $z$, how do you determine the probability of packet loss if we assume that packets are dropped when the system is full? Packets arrive with a rate $\lambda$ and are served at rate $\mu$ (using the Poisson distribution).
My attempt at a solution:
Probability of p... |
Consider the following problem:
Input: lists $X,Y$ of integers
Goal: determine whether there exists an integer $x$ that is in both lists.
Suppose both lists $X,Y$ are of size $n$. Is there a deterministic, linear-time algorithm for this problem? In other words, can you solve this problem in $O(n)$ time deterministica... |
In a recent homework question we were asked to implement a program that would use only bitwise operations. From our notes, this includes & | ^ ~ >> << and >>>. We are not allowed to use arithmetic operations, or loops.
Since immediately addition can be defined with the above accepted operators, what constitutes "arith... |
In BSS model in which one is allowed $\{+,-,\times\}$ operations, how is division and square root handled? Is there a typical procedure dealing with these involved situations?
|
I am trying to solve this equation using C++:
X and Y are both given sets of data.
X = [x1, x2, ... , xn], Y = [y1, y2, ... , yn]
a is a given integer.
The goal is to find a pair z and k that fulfills this equation based on the given data.
I am currently attempting to solve this equation using non-linear least squares ... |
$A=\{\langle M \rangle \mid M \text{ is a turing machine and }|L(M)|\geq3\}$
Since Recursive enumerable languages are turing enumerable, so listing of all strings of the language in finite time is possible. Then deciding whether cardinality is greater than 3 should be decidable. But the material that i have been studyi... |
I am working with random number generation and testing, so I'm using NIST statistical tests to examine my random numbers. Now I want to compare my solution with other RNGs, but i can't find any probabilities of passing a NIST statistical test for them. So does anyone have that info? Info about both PRNGs and TRNGs woul... |
While reading about Day–Stout–Warren algorithm for balancing BST which takes any BST and transforms it into a balanced BST in O(n) time.
In my opinion I can achieve absolutely the same with these simple steps:
convert BST into array using inorder traversal. This will give me an array in increasing order and can be com... |
Given a directed graph, Dijkstra or Bellman-Ford can tell you the shortest path between two nodes.
What if there are two (or n) paths that are shortest, is there an algorithm that will tell you all such paths?
Edit:
I have just thought up a possible solution. Could you just do a Bellman-Ford but when relaxing edges, if... |
Wikipedia says about Gustafsons's law that:
It may even be the case that $\alpha$ diminishes as $P$ (together with the problem size) increases.
I'm not understanding how $\alpha$ can ever change given it's definition:
$$ \alpha= a / (a + b)$$
I thought that $a$ and $b$ are constants independent of the problem size.
... |
We are given a finite set of propositional atoms $\{x_1, \dots, x_n\}$ and an integer $k$.
Can we capture through a propositional formula $\varphi$ (built from the standard connectives $\neg, \wedge, \vee$ only) the set of all models having at most $k$ atoms valued at $1$, such that the size of $\varphi$ is polynomial ... |
This is a problem in a theory of computation book that's stumping me:
Suppose that we know that $L_1 ∪ L_2$ and $L_1$ are regular. Can we conclude that $L_2$ is
regular? Explain.
At first, I thought I could build the NFA that is the union of two DFAs, one which accepts $L_1$, and one which we don't know about. Th... |
One formulation of NP is this: a language is in NP if it can be solved in polynomial time by an algorithm that has access to a special "Nondeterministic Bit" function, which branches the world into two alternate universes, writes a $1$ on the worktape in the first universe and a $0$ in the second, finishes the computat... |
How can I make a finite automaton which does not end in string ab.
With the alphabet a,b
I made 3 states. For the first one it is accepting states and thus accept the empty string.
So here is a table I made. State 1 is initial state
input goes to state input goes to state
State 1
b 1 ... |
I'm working on a class library (C++) that can be thought of as a producer/consumer queue of producer/consumer queues. There are many queues of data, and the goal is to assign worker threads to process these queues, as needed, using coroutines. At any rate, the details aren't necessarily important to the question, but I... |
I'm new to linear/integer programming and I'm trying to solve a little problem I made up. I want to "pack" animals into a minimum number of bins where some of the animals cannot co-exist (wolves and sheep). Here is a picture of my little flow network that's guiding me.
Imagine that each animal node outputs 1 animal o... |
Suppose there are $\lceil\log n\rceil$ sorted lists of $\lceil\frac{n}{\log n}\rceil$ elements each. The time complexity of producing a sorted list of all these elements is: (Hint: Use a heap data structure)
$O(n \log \log n)$
$θ(n \log n)$
$Ω(n \log n)$
$Ω(n^{\frac{3}{2}})$
My approach:
I know complexity of heap so... |
So, I'm new to this whole asymptomatic notation with respect to algorithms. So say you have a $f(n) = 1/n$ and $g(n) = 1$, would it be OK to say that $f(n)$ is not equal or is not an element of $O(g(n)) $?
I say this because I'm actually drawing an analogy with another example. Say in my second example $f(n) = n$ a... |
A program takes as input a balanced binary search tree with n leaf nodes and computes the value of a function $g(x)$ for each node x. If the cost of computing $g(x)$ is min{no. of leaf-nodes in left-subtree of x, no. of leaf-nodes in right-subtree of x} then what is the worst case time complexity?
Since $g(x)$ is app... |
In my Computer Logic class we were assigned the following problem:
Complete a truth table that has $3$ inputs $(A, B,C)$ and one output
$(F)$. $F$ is asserted whenever $B$ or $C$ are asserted, but
deasserted if both $B$ and $C$ are asserted. $F$ is asserted whenever $A$ is
asserted and $C$ is deassert... |
This is a homework problem. I've wrestled with it for quite awhile and can't come up with a valid solution. The problem is:
Find a regular grammar that generates each of the following languages:
$$L = \{ w \in {a,b}^* \mid \text{na}(w) – \text{nb}(w) = 1 \mod 3 \} , $$
where $\text{na}(w)$ is the number of $a$s and $... |
I'm trying to understand how to prove a language is decidable, semi-decidable, co-semi-decidable, or none of the above.
I've got the problem: $$A_{\mathrm{right}} = \{ \left< M\right> | M \text{ never moves on blank input} \}$$
and I have to prove what it is. I know that it is decidable, because if given an input whe... |
As title says, can the number of states in DFA be greater than $2^n$ when language-equivalent NFA has $n$ states - that is if the NFA recognizes the same language as the DFA and has $n$ states, can DFA have more than $2^n$ states?
I think it is, and this is trivially. However Wikipedia seeems to write that it is not po... |
It is known that when NFA's accepting states are swapped with rejecting states, the recognized language is not complement of the original language. For some language, it may be the case that some strings that were recognized in the original NFA may still be recognized in the state-swapped NFA.
My question is, is there... |
(Full disclosure: homework question)
Let $M = (Q, \Sigma, q_0, A, \delta)$ be a finite automaton. The extended transition function $\delta^*$ is defined as follows:
$\forall q \in Q$
$\delta^*(q, \Lambda) = q$
$\forall q \in Q, y \in \Sigma^*, \sigma \in \Sigma$
$\delta^*(q, y \sigma) = \delta(\delta^*(q, y), \sigma)$... |
Assume we have a (multi)set of nontrivial intervals $\mathcal{I} = \{I_1,...,I_n\}$ and for any two $I_i, I_j \in \mathcal{I}$, we have that $I_i \cap I_j$ is trivial (that is: contains at most one point), or one of them contains the other. Just to clarify, an example would be $\mathcal{I} = \{[0,10], [2,6],[6,8], [2,4... |
I was reading the book "The singularity is near" written by Kurzweil and he mentioned the reversible gates like for example the Fredkin gate. The advantage using such gates is that we could get rid of the thermal waste related to computation where bits just disappear into heat, and computation won't need any energy inp... |
I've been learning about Theory of Computation lately, and i'm trying to link general programming with the Theory of Computation. I thought of considering any arbitrary program that halts, as an algorithm for solving some specific computational problem in the sense of Theory of Computation.
For some programs (like ... |
Is there a way to multiply scalar by vector faster than just multiplying each element of the vector by that scalar?
It feels to me that there should be some exploit to do that. After all we will multiply two vectors elementwise in N steps. The original problem is simpler as it's only scalar by vector. Shouldn't we be a... |
I'm reading a Wikipedia article on the Traveling Salesman problem as an Integer Programming formulation (http://en.wikipedia.org/wiki/Travelling_salesman_problem). The authors have all their constraints and I don't understand the final one. The following statement is in there.
To prove that every feasible solution co... |
Think of an $n$-ary alphabet as $\{0, 1, ..., n-1, n\}$. For example, a binary alphabet is $\{0, 1\}$.
Do Turing Machines with binary alphabets decide the same set of languages as Turing Machines with $3$+ symbol alphabets?
I am unsure of how to show equivalence. Clearly, any $3$+ symbol TM can simulate a TM with $2... |
I'm doing a course in Computer Programming Languages and I'm trying to prove the following (roughly following Pierce's Types and Programming Languages book):
if $t \rightarrow^* t'$ then $if\; t\; then \; t2 \; else \; t3 \rightarrow^* if\; t'\; then \; t2 \; else \; t3$
I'm a little confused about where to start; as f... |
I am trying to reduce the grammar to LL(1) for a hypothetical language we created. I have removed most of the left factoring issues in the grammar, using the general rule of introducing new non-terminal characters for the same.
For example,
<assignmentstats>------- <type><id>=<E>/ id=<E>/id'['<E>']'=<E>/
is trans... |
I am given this algorithm
And I am also given the fact that $1 \leq k \leq n$.
If we let X be the number of times line 2 is executed, then I am supposed to find the run-time probabilities for the different cases.
Thus I know the best case will be when $A[n-1] = k$ because line 2 will only be called once.
I know that $... |
So I'm learning for an upcoming exam and there's a specific problem which I can't show:
Let A be decidable and B undecidable, then $A \le B$
Can someone give me a hint how to solve that? Furthermore, does that mean, that every decidable language is reducible to an undecidable language?
|
Please, help me to understand the mathematics behind the following formula of CPI. Why do we calculate CPI the way it's done on the pic?
|
I am currently constructing pushdown automata.
can I push/pop alphabet more than two in a transition??
For example, $\delta$(a, a/aaa) means, in the state of input alphabet 'a' and stack point 'a' (there is only one item 'a') then it can push two more item 'a' on the stack so that there is three a's in the stack.
|
What is the correct term for the maximal running time of a given algorithm on all inputs of length bounded by given $n$, on which the algorithm halts? Assume, if necessary, that the halting problem of the given algorithm is decidable (with unknown complexity).
How is this time function of $n$ called? Is it studied in... |
You are given a natural number n (n<20). We construct the set S from all binary numbers with n bits. We call two numbers "compatible" if they don't have any common substring of length n-1 (consisted of not necessarily consecutive bits). Now we have to find the maximum number from the numbers in S so that every pair of ... |
There is a branch mispredict and while executing the false code, an interrupt occurs (for example a keyboard interrupt). The EPC (register that holds the return address) now holds the wrong return address (after the interrupt handler has finished, it would return in code that wasn't even meant to be executed). How do C... |
I've been searching the net for an answer to this question, but it's guetting quite confusing.
I want to know if there are some undecidable problems for a classical computer that a quantum computer could do.
The examples I've seen are things like Shor's algorithm, but that's "just" because the quantum computer is more ... |
I am in High School (P.R.) and I am a regular person in math. Should I try computer science?
|
I was reading about Suurballe's algorithm on Wikipedia, for the shortest
edge-disjoint paths problem, i.e. given nodes $s$ and $t$ finding a pair of paths between these nodes, whose accumulated weight is minimal.
I understand why the output consists of two $s$-$t$ paths, and the relationship between this and augmenting... |
For a certain language $L \subseteq \{a, b\}^∗$, IL has exactly four equivalence
classes. They are $[\lambda]$, $[a]$, $[ab]$, and $[b]$. It is also true that the three
strings $a$, $aa$, and $abb$ are all equivalent, and that the two strings $b$ and
$aba$ are equivalent. Finally, $ab \in L$, but $\lambda$ and $... |
I have just read this answer and was very satisfied and it is indeed a fantastic answer. It taught me the working of BIT.
But at the end, the second last paragraph is where I am struggling.
It says,
Similarly, let's think about how we would do an update step. To do this, we would want to follow the access path back u... |
There is an algorithmic problem $A(n)$, where $n$ is the size of the problem.
It is known that, for every candidate solution S, the time it takes to verify whether it is a correct solution to $A(n)$ is $T(n)$.
Does this imply a lower bound on the time it takes to find a correct solution to $A(n)$ (e.g. that it takes ... |
I am reading a few papers on Bloom Filters – Bloom Filters in Probabilistic Verification (Dillinger and Manolios) suggests the following allocations for double and triple hashing respectively
$$\begin{align*}
f[i] &= a(δ) + ib(δ)\pmod{m}\\
f[i] &= a(δ) + ib(δ) + (c(δ)(i)(i − 1))/2 \pmod{m}
\end{align*}$$
Less Hashing... |
I have the following question to answer in a MapReduce assignment sheet
The Naive Bayes classifier is a widely-used tool for analyzing data. Consider a data set that has $n$ data items, each of which has the same $m+1$ attributes.
Each data item is stored as a tuple
$$(i,(X_0,i, X_1,i, . . . X_m,i))$$
where $i$ is th... |
I'm a little bit confused about the second condition of the pumping lemma which are:
$|y|\geq1$
$|xy|\leq p$
$\forall i \geq 0 : x y^i z \in L$
I don't understand why the length of substrings $xy$ has to be less than the pumping length? Considering the example below:
Suppose we have a language $L = \{ w | w ∈ 1^*0... |
Why is the average time complexity of searching an array $O(n)$? Is it because if the element does not exist, then $n$ searches must be done. If the element is at the end of the array then $n$ must also be done, so $\frac{2n}{2} = n$?
|
I have a set of coordinates, in practice gps coordinates.
Some of them are in clusters and some of them are scattered. Which are which is allready determined. Thus I know which ones are in a particular group and which are not.
The ones in a cluster I want to graphically mark as a group by drawing an outline around the... |
I posted a question "Arbitrary Programs that halt" some days ago and now i think my doubt is a lot more clear.
I concluded that in any arbitrary program that halts, control flow operations, calculation operations ( 2+3 , "1 && 0", etc ) and memory assignment ( x:= "Hello" ) can be easily represented by Models of Co... |
I noticed that CPU's like the 8086 and especially the 8080 have the ability to access more memory than what one would normally assume. The 8080, for example, has an 8-bit word size but can use a 16-bit memory address. From what I understand, a standard instruction has the opcode in the beginning and then the address on... |
As far as I understand we got SYSENTER/SYSEXIT instructions because system calls via interrupts were slow (right? I might be wrong though). Therefore my question is why system calls via interrupts are slow? And how do we optimize them via SYSENTER/SYSEXIT instructions? Thank you
|
How does one implement mutex on a single processor system without using spinlock mechanism. Mutex is to be implemented in user space (for any user level library like pthread lib for example).
|
Last year, Ilya Sutskever and collaborators came out with a paper about a recurrent LSTM net that learns sequence to sequence mappings for machine translation. It's somewhat surprising that the authors used LSTM instead of Hessian-Free to train this net since the first author was one of the innovators behind the develo... |
Is there any other standard FP^NP-complete problem other than the Traveling Salesman Problem? For instance, in the canonical propositional logic?
|
I was asked if my computer program (in Java) was deterministic. I'm wondering how could it be not? There is no such thing as a non-deterministic Java program right? Even if I use a random number generator to make branching unpredictable, it is still really non-deterministic (but harder to prove so).
|
If an algorithm runs in exponential time with exponential input then we say it runs in polynomial time ?
Why ?
Doesn't the algorithm run in exponential time anyway ?
How the input size affects ?
Thanks.
|
What is the best book for a beginner in Introduction to number theory?
I am new to this field and getting deeper into cryptography, so I think reading some intro books about number theory can be of help.
|
Could you please help me to understand the mathematics behind MIPS (million instructions per second) rating formula?
The formula for MIPS is:
$$ \text{MIPS} = \frac{ \text{Instruction count}}{\text{Execution time} \ \times \ 10^6}$$
For example, there are 12 instructions and they are executed in 4 seconds. So the CP... |
Given an input $m$, I am trying to find an algorithm that will give me the number $p$ that is closest to $\tfrac47 m$ and co-prime with $m$.
Where $m$ is odd, I have no problem producing an outcome close to the target, simply by squaring $2$ until close enough to the target.
When $m$ is even, I have a bit more trouble.... |
I'm trying do implement the Schur decomposition of a matrix, but I can't find any good articles for the theory. Could someone share one?
|
Connecting to When states that are not accepting states become accepting states in NFA, what happens?, what is the formal language described by inverting accepting states of NFA? By inverting, I mean that rejecting states become accepting states and accepting states become rejecting states.
Is there a nice expression f... |
K-means is a clustering algorithm which works like this:
def kmeans(int k, Coordinate[] points):
Step 1: initialize k cluster centers to any (distinct) coordinates
Step 2: check which points are closest to which cluster centers
Step 3: move the cluster centers so they are central to their nodes
... |
Automatic storage reclamation, aka garbage collection, comes in two
main families, sometimes cooperating: the reference count collectors
and the tracing collectors. I may develop specifics of each family if
there is demand for it but my question is about tracing collectors.
Tracing collectors, in their simpler form can... |
I am a domain scientist and I study biophysical systems. When I asked a colleague in CS for suggestions about how to design a multi-scale simulator, he mentioned the term "compact model".
Now, I can't find a very good definition of this term. I can find the book "Compact Modeling" edited by Gildenblat but this is a col... |
The well-known Four color theorem states that every map which is divided into regions, can be colored using 4 colors such that no two adjacent regions have the same color.
In fact, there exists a quadratic algorithm for 4-coloring planar graphs.
Suppose you are given a map (e.g. the world's map) and a list of $k$ const... |
I'm currently preparing a presentation about LTL and a book says that the language $L = (a(a \cup b))^\omega$ cannot be described by any LTL (or FO) formula which is understandable but how does the corresponding Büchi automaton $\mathcal{A}$ look like with $L(\mathcal{A}) = L$?
|
I have a weird question.
I was just wondering if there were some problem with two solutions; one (A) being exponential time, the other one (B) being polynomial time. However the constants involved are such that, in "practice", the algorithm (A) performs better.
For instance, we could have something like $(1 + 10^{-100}... |
I have to find a solution for this equation:
I have to find the set of solutions a, b, c, d for all possible combinations of values 1 <= x <= n.
$a^5 + b^5 = c^5 + d ^ 5$
I first thought about using a heap, because it is what I am learning, but I can't seem to come up with a pattern.
I was told that my algorithm should... |
Given N items you want to put into a tree, think very generally here like a phone tree, and your goal is to keep the tree from getting "too wide" and "too deep". How many children (K) do you put at each node?
I seem to recall hearing of some proof, many years ago, K was best when set to Euler's number. Therefore in rea... |
If a very severe interrupt occurs, say a divide by zero, this will quit the program. How is this done, is there a special instruction in the processor or is it a software routine? And after quitting the program, where will the CPU jump to?
|
I've read a definition that says that "co-semi-decideable' means that a TM is halting on all inputs NOT in the language. I've heard the word come up a lot, and I've so far assumed that halting just means to stop and asess an input.
But just to be clear, would somebody be so kind as to give me an easy to understand of w... |
I have a grammar,
$L \to A \langle A \rangle^*$
$A \to () \mid (L)$
but I am not sure how to generate parser for $\langle A \rangle$. I know in other case, for example, if $E \to T \langle^*T\rangle^*$ then I can create parser like
proc E begin
T;
while symbol='*' do
T
od
However in my case don't have... |
I need to prove that $L(f(M)) = L(M)\cup \{\varepsilon\}$
where $M$ is a DFA and $f$ is the function $f(M) := (Q\cup \{q_f\}, \Sigma, \delta', q_f, F\cup\{q_f\})$ and $q_f$ is a new state not in $Q$ and
$\delta'(q,a) =
\begin{cases}
\delta (q,a) & \text{if }q\in Q\\
\delta (q_0,a) & \text{if }q... |
I know that DCFL is closed under complementation and intersection with regular languages. By using these we can prove that a language is not DCFL.
Are there any other techniques that will help me to prove a language L is not DCFL?
|
Weighted MaxSAT is in $\mathrm{FP^{NP}}$, see [1] Theorem 17.4, i.e. Weighted MaxSAT can be solved with at most a polynomial number of calls to a SAT oracle.
The proof in [1] makes use of binary search with a search space from weight $0$ to the sum of all weights. But I am struggling with the fact that the weights coul... |
A TA dropped by today to inquire some things about NP and co-NP.
We arrived at a point where I was stumped, too: what does a Venn diagram of
P, NPI, NP, and co-NP look like assuming P ≠ NP (the other case is boring)?
There seem to be four basic options.
NP ∩ co-NP = P
In particular, co-NPI ∩ NPI = ∅
NP ∩ co-NP = P ∪ N... |
Given a graph $G(V,E)$ and a subset of vertices $T \subseteq V$, define $\mathsf{cutset}(T)$ = the set of edges connecting a vertex at $T$ with a vertex at $V\setminus T$.
Our goal is to preprocess $G$ such that, given any set $T$, we can quickly return an edge in $\mathsf{cutset}(T)$, or reply that $\mathsf{cutset}(T)... |
Suppose there is a CFG with the rules
S--> Aa
A--> Bb
B--> A
B--> Epsilon
To my best understanding the left most derivation would go like this..
S==> Aa ==> Bba ==> Aba ==> Bbba ==> bba
or
S==> Aa ==> Bba ==> Aba ==> Bbba ==> Abba ==> Bbbba ==> bbba
or
S==> Aa ==> Bba ==> ba
Of these which is the true left mos... |
I work for a company that has several projects involving computer vision. The literature rarely has papers on the exact problems we are solving. Furthermore, the state of the art in much of computer vision is often not reproducible or not ready for actual applications. Furthermore, the rate at which new papers come... |
Is it possible to find out a string only having its corresponding suffix array/table and knowing that the string contains only, for instance, letters "f", "g", "r"? If so, how is that possible?
|
In this question, I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of a microkernel with a preemptive scheduler (a thread has no way to prevent the scheduler from preempting it). I'm explori... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.