instruction stringlengths 35 29.1k |
|---|
I have a rough idea that the time complexity is O(mn) where m and n are based on the length of signals, as per this http://en.wikipedia.org/wiki/Dynamic_time_warping.
How can I determine the time complexity of the following code (source)
function [Dist,D,k,w,rw,tw]=dtw3(t,r)
%
% [Dist,D,k,w,rw,tw]=dtw(r,t,pflag)
%
% D... |
I been reading Wikipedia for polynomial time, and it says:
An algorithm is said to be of polynomial time if its running time is
upper bounded by a polynomial expression in the size of the input for
the algorithm, i.e., $T(n) = O(n^k)$ for some constant $k$.
My questions are:
Why do we have addition and multiplic... |
According to Wikipedia, the Independent Set problem is a special case of the Set Packing problem. But, it seems to me that these problems are equivalent.
The Independent Set search problem is: given a graph $G(V,E)$ and an integer $n$, find $n$ vertices no two of which are adjacent.
The Set Packing search problem is: g... |
There are n collections of M sets.
Pick a single set from each collection,
such that all n picked sets are pairwise disjoint.
This problem can be converted to the standard Set Packing problem in the following way: add a unique element $e_i$ to all $M$ sets in each collection $C_i$. Then find a set packing of size $n$ ... |
Wiki define Polynomial time as fallow:
An algorithm is said to be of polynomial time if its running time is
upper bounded by a polynomial expression in the size of the input for
the algorithm, i.e., $T(n) = O(n^k)$ for some constant $k$
I understand that in general speaking the difference between Polynomial time ... |
The algorithm (from here) -
Create a set S of remaining possibilities (at this point there are 1296). The first guess is aabb.
Remove all possibilities from S that would not give the same score of colored and white pegs if they were the answer.
For each possible guess (not necessarily in S) calculate how many possib... |
It is proven by Time hierarchy theorem that EXPTIME-complete do not belong to P even if we do not know if NP belong to P.
Before I read wiki, I found EXPTIME algorithm for solving 3-sat, the brute algorithm $O(2^n)$. Could I announced then, that there could not be polynomial solution for 3-sat?
Time hierarchy theorem ... |
If L is regular and M is non regular; then L.M is necessarily not regular. Is this true or false? And why?
I feel its false
|
I am interested in the properties of a class of bipartite graphs $G(X \cup Y, E)$ where all nodes in $X$ are 3-regular, all nodes in $Y$ are 2-regular, and $|X|=|2Y/3|$. First, Is this a well known class of graphs? Secondly,
Is there an example of intractable computational problem restricted to this class of bipartite... |
There seems to be a classification of processes in IT. For example, "business process" refers to the collection of tasks done by organization members / software systems to achieve a goal.
If a process is completely automated and carried out by software (no people involved) what is the process called? Say we have a Web ... |
I'm a little confused by Wikipedia's definition of a regular language:
The collection of regular languages over an alphabet $\Sigma$ is defined recursively as follows:
The empty language $\emptyset$ is a regular language.
For each $a \in \Sigma$ ($a$ belongs to $\Sigma$), the singleton language ${a}$ is a regular lan... |
I have the expression:
\begin{equation}
|Q|f(n)|\Gamma|^{f(n)}
\end{equation}
Here is my solution to convert the above into an asymptotic expression:
$|Q| = 2^l$ for some $l\in\mathbb{R}$
$|\Gamma| = 2^k$ for some $k\in\mathbb{R}$
Therefore we have $2^lf(n)(2^k)^{f(n)} = f(n)2^{kf(n)+l} = f(n)2^{O(f(n))}$
Is this co... |
I am currently working on the following task:
A language L = {< M> | M(x) = x^2} is given. Now I need to show, that this language is not decidable.
By the way, < M> is the Gödel number
But right now, I don't know how to deal with that task. Honestly, this is the first time that I am working with this kind of task.
I w... |
Background
I am learning assistance, Coq, on my own. So far, I have completed reading Yves Bertot's Coq in a Hurry. Now, my goal is to prove some basic results concerning the natural numbers, culminating with the so-called division algorithm. However, I have encountered some setbacks on my way towards that goal. In par... |
I'm wondering about the result of this program as I get confused when it comes to lexical scoping and dynamic scoping.
fun bar() {
int a = 2
void foo(int b) {
b = b * a;
a = a - b
}
{
int a = 10;
foo(a);
print a;
}
}
There are a couple of questions of what program... |
I am wondering if given the time complexity of an NP-Complete problem or at least some information about it for example if $ SAT\in Time(2^{sqrt(n)})$ (hypothetically) could I assume that all languages in NP (which are clearly polynomial time reducible to SAT) are also $\in Time(2^{sqrt(n)})$
I believe the answer is fa... |
Is $L = \{w_1cw_2 : w_1, w_2 \in \{a, b\}^* , w_1 \neq w_2 \}$ a CFL?
In my opinion it is not since if we want to know the inequality of $w_1$ and $w_2$ we must be aware of their equality and that is not a $CFG$.
|
I know that the set partitioning problem defined like this:
Given $$S = \left\{ x_1, \ldots x_n \right\}$$ find $S_1$ and $S_2$ such that $S_1 \cap S_2 = \emptyset$, $S_1 \cup S_2 = S$ and $\displaystyle\sum_{x_i \in S_1} x_i=\sum_{x_i \in S_2} x_i.$
is NP-complete. But I don't understand why (or am not even sure if)... |
Today I've heard about fascinating metagame paradox. I tried to come up with an explanation via Turing Machines formalization (below). Do you know what is the solution to the paradox? (the post content: definition - proposed solution - conclusion)
Something is a game iff:
G1. Two players
G2. Players alternate
G3. The g... |
How could we prove the following modified Pumping Lemma:Let the language L has an infinite number of words, then there are words $x,y,z \epsilon \Sigma ^{*}$, so that $|xz|\leq |\Sigma_{k}|$, and each word $xy^{(i)}z, i\geq0 $ is in L.
Could you give me a hint how to begin?
|
I am interested in reductions from 3-CNF boolean expressions to similar restricted forms. For example, I am interested in knowing how to reduce a 3-CNF formula to another 3-CNF formula where each variable appears in at most $b$ clauses. I observed this is used in MAX-SAT so I am interested in knowing such reductions. I... |
There's an f(n) such that f(n) != O(f(n/2))
so by the definition of big O notation:
for f(n) = n^2 the statement is false, because there is a constant c such that n^2 = c*(n^2/2)
Which f(n) will work?
My guess is f(n) = 2. is that correct?
|
If bits are the base unit of information, why are bytes treated like the base unit?
For example, usually values are expressed in Mega/Giga/Tera/Exa bytes instead of bits. I am aware that bits are sometimes used (e.g. sometimes for internet speed), but generally to me it seems like bytes are used as if they are the bas... |
What is the difference between minimum spanning tree algorithm and a shortest path algorithm?
In my data structures class we covered two minimum spanning tree algorithms (Prim's and Kruskal's) and one shortest path algorithm (Dijkstra's).
Minimum spanning tree is a tree in a graph that spans all the vertices and total... |
Let $M$ be a finite set of even cardinality. Define $C=\{\{a,b\}:a,b \in M, a \neq b\}$ the set of all pairs over $M$. Let $w:C \rightarrow \mathbb{R}^+_0$ be a function.
Now find $C' \subset C$ with the following constraints:
$$
\bigcup C' = M \\
\forall x,y \in C': x \cap y = \emptyset \\
\sum_{x \in C'}w(x) \text{ m... |
I've been trying for quite some extended time to find a construction so that I can formally demonstrate that a deterministic PDA is closed under complementation. However, it happens that every idea I got has something that at the end does not fit. Could you give me a hand?
The main problem happens with the ε-moves. A P... |
Given a collection of $n$ numbers, $S$, the question is to decide whether all the elements of $S$ are distinct from each other. If they are distinct from each other (no two of them are the same), print "Yes". Otherwise print "No".
I know the worst case time complexity of this question is $\Theta \left ( n\log n \right ... |
I have a question asking about a language L with the property: there is a TM that decides L in time O(n^2013 / (log(n))^2012), and if there is a TM that decides L in time O(n^2012.9).
My confusion comes from the first big O given, from what I understand the numerator would dominate as the TM grows towards infinity, so ... |
I am having an extremely tough time with this homework question, wondering if anyone could help me (for all you theory aficionados, this one's for you).
There is a language $L$ with the following property: There is a Turing machine that decides $L$ in time $O(n^{2013}/\log^{2012} n)$, but there is no Turing machine tha... |
Let Two-Solutions-SAT be the language of Boolean formulas that have exactly two distinct satisfying assignments. Show Two-Solutions-SAT is co-NP-hard.
I know how to show that the complement of Two-Solutions-SAT is in NP, it's relatively easy to create a nondeterministic polynomial time TM that decides it.
My problem co... |
Others have studied the following question: given a set of words $w_1,w_2,\dots \in \Sigma^*$, find a regular grammar (or a context-free grammar) that generates all of those words, is "natural" in some sense, and is as small as possible. In the special case where we have a single word $w \in \Sigma^*$, if the grammar ... |
I've had this little doubt bothering me since four semesters now, so I've come here to resolve it. Theoretical CS was probably not the right place to ask.
Coming to the question, my old coursebook (Theory of Computer Science - Automata, Languages and Computation (Eastern Economy Edition) by KLP Mishra) details the conv... |
Let $L$ be a given Context Free Language over the alphabet $\{a,b\}$. Now consider $$L_1=L-\{xyx\ |\ x,y\in\{a,b\}^*\}$$
I know that $\{xyx\ |\ x,y\in\{a,b\}^*\}$ is not Context Free (by using pumping lemma).
Based on that can we affirmatively say that $L_1$ will NEVER be Context Free (can't use closure property here, ... |
Consider the following very simple computer program:
for i = 1 to n:
y[i] = x[p[i]]
Here $x$ and $y$ are $n$-element arrays of bytes, and $p$ is an $n$-element array of words. Here $n$ is large, e.g., $n = 2^{31}$ (so that only a negligible fraction of the data fits in any kind of cache memory).
Assume that $p$ co... |
Generally (perhaps always) in programming languages, unary operators have the highest precedence. In some langauges, such as Standard ML, one can dynamically change the precedence of binary operators at run time.
But what if we have a language where binary operators had higher precedence than unary ones? Do such lang... |
Show that the set $K^{c}$ = $\lbrace M \mid M(M) \text{ diverges} \rbrace$ is not recursively enumerable.
This question is essentially asking to show that the set of turing machines which diverge when run on their own code is not RE.
My idea is to attempt to reduce this problem to something which is the complement of... |
I was reading Wikipedia's entry on Kolmogorov Complexity (thanks to this question), which states:
It can be shown that the Kolmogorov complexity of any string cannot be more than a few bytes larger than the length of the string itself.
Why would you ever need anything more than the string itself to describe it?
|
Some claim that dynamically typed languages are in reality statically typed, unityped languages. This would imply to me that this one type should be expressible as a static, finite type expression, so can anyone provide such an expression? You can make whatever assumptions you need to make about the base types in the l... |
Given a weighted digraph $G=V,E$, and a weight function, $d(u,v)$, one can normally use Dijkstra's algorithm to obtain the shortest path. What I am interested in, is how to obtain the $2^{nd}$-shortest path, the $3^{rd}$-shortest, and so on.
Questions:
Is there an efficient algorithm to get the i-th-most-shortest-path... |
Consider the following problem: given a set of $m$ red points and $n$ blue points in the plane, find a minimum length cycle that separates the red points from the blue points. That is, the red points are inside the cycle and the blue points are outside the cycle, or vice versa. This problem is called the red blue separ... |
While reading a passage in an older textbook I came upon this problem which I am having difficulty in justifying whether its true or false. Is this possible?
If some problem $A$ is NP-hard, and if that problem $A$ can be reduced to problem $B$, and there exists some polynomial-time algorithm which solves $B$, then P=N... |
Suppose we need to find a tight asymptotic bound on the worst case run time of the following program
t = 0;
for i = 0 to n-1 do
for j = i+1 to n-1 do
for k = j+1 to n-1 do
t++;
I can't for the life of me figure out what the run-time would be. I have a feeling it would have n! in there somewhere, but I can'... |
I am having a bit of difficulty understanding the order of precedence in boolean logic for the OR operation. Take this example:
Assume the following regular expression:
((a(b+))+(a|c))|a|c
Why is it that this accepts the strings:
a
c
abba
abbabbba
abbabbc
etc
But when I flip it around and use the regular expression
a... |
Recently, I am reading papers about dichotomy. I do not understant what condition can be called as a dichotomy? What is the meaning of "a question is either in P or in NP-complete"? (assume P $\neq$ NP)
For example, I've known the Schaefer's dichotomy theorem, in which a dichotomy about "whether a class of SAT is in P"... |
This problem is from the book [1]. In case of being closed as a duplication of that in [2], I first make a defense:
The accepted answer at [2] is still in dispute.
The proof given by @eh9 is based on Kruskal's algorithm.
I am seeking for a proof independent of any MST algorithms.
Problem: Let $T$ be an MST of graph... |
I need to process queries to Hash various ranges of a character array. I am currently using the Arrays.hashCode from the standard java library. But the problem is that this method is too slow. Also my array remains the same throughout the process of hashing, I only am changing the range. To deal with this, I have to ma... |
I have a question on my homework causing some confusion.
If L is a strict subset of L', and L' is a member of Co-NP, is L a member of Co-NP? True of False
Now I understand what belonging to Co-NP. Essentially means instead of deciding a yes instance we're deciding a no instance of the decidable problem. I'm stuck ... |
Let $A$ be a set of integers: $A=\left \{ x_1, x_2...x_n \mid 10<x_i<100\right \}$
A valid permutation $x_{i_1}x_{i_2}...x_{i_n}$ is a permutation that holds the following property:
For every adjacent numbers $x_{i_j}x_{i_{j+1}}$, the unit's digit of $x_{i_j}$ is equal to the ten's digit of $x_{i_{j+1}}$.
For example, ... |
I'm having trouble with this particular language: $$\{a^i b^j c^k \mid i+j \le k\}$$
If it's not context-free, I don't know how to correctly apply the Pumping Lemma for CFLs; if it is context-free, I don't know how to create a context-free grammar that generates this language.
Which one applies? Can you help me out?
|
The proof in my textbook, that $E_{TM}$ can be decided by oracle machine $O^{A_{TM}}$, uses a Turing machine $P$ such that for an input $w$:
$P$ runs the Turing machine $M$ on all strings of $\Sigma^*$
If $M$ accepts the string, $P$ accepts
$O^{A_{TM}}$ then asks the oracle if $<P,w> \in A_{TM}$
I can't seem to under... |
I was thinking of radix sort, and at a sudden thought that it uses de facto the paradigm of dynamic programming, but I soon changed my mind to greedy algorithm. Is it really a greedy algorithm?
|
SSUM is the same as the Subset Sum Problem with the only additional requirement is all the numbers must be unique in the subset.
To prove it's NP complete, the verifier is quite easy to construct being the same as one for the Subset Sum except you add the additional requirement of making sure all numbers are unique. ... |
I'm trying to understand reduction, this is from my textbook and is not a homework problem or even any exercise, just trying to understand an example they present.
This is the reduction they give:
PROOF We let R be a TM that decides REGULARTM and construct TM S to
decide ATM . Then S works in the following manner.
S =... |
Are NP or P closed under subtraction? Im having a hard time deciding whether they are or aren't.
Question was edited
Original question:
Im having some hard time figuring out what languages are closed under subtraction.
Say you have 2 languages A, B ∈ NP. Is A\B ∈ NP? what about P?
Commenters:
My original question was e... |
This is a practice problem I've come up with in order to study for an exam I have in a couple of hours.
Again, here's the problem: Show T(n) = 2T(n-1) + k is O(2^n) where k is some positive constant.
First of all, 2^n is indeed the upperbound, right? Since I've made this problem up myself, I'm not 100% sure, but from w... |
I am reading Subgraph isomorphism problem
I am having trouble understanding how they prove that the subgraph isomorphism problem is NP-Complete using the Hamiltonian cycles problem in the article.
Can someone help me explain what is happening in more laymen terms?
|
Question
How do I write more intuitive proofs of the two following results in Coq?
Theorem Course_of_values_ind:
InductiveRel N less
Theorem DivRem: (forall d n:N,
(Sigma N (fun q => (Sigma N (fun s =>
and (I N n (add (mul (succ d) q) s)) (less s (succ d))))))).
Background
I recognize a... |
So In a review section, our professor asked:
Given integers $N$ and $M$
Is $O(N+M)$ exponential or polynomial.
It's exponential, but I just don't see how that is. I would have thought it's linear.
|
I have little background with SAT sovers and theoretical computer science.
How can I describe the complexity of calculating all models of a propositional formula versus just the usual SAT problem of finding just one model?
I am writing a paper, in an area where finding a single of a model of a type of propositional for... |
I did see a lot of nice and informative questions, articles on inter-net and on StackOverflow itself, of-course. But I found all the questions or articles following a specific rule or a pattern to explain the topic. I mean, when a question was asked on NFA, DFA or Regular Expression, a solution was presented to the que... |
I am talking about a measurement plan for software metrics and I am looking for references.
In emperical software engineering there are code level measurements ("software metrics" that measure, e.g., some property like a paprameter for the redundancy of the code and possibly also a parameter of coupling and cohesion of... |
I have a queue of messages representing filesystem operations that need to be processed in order. A message may succeed or fail when it's sent. A change message, for example, is generated when a user creates or saves a file.
Delete Foo.txt message sent
Delete Bar.txt message sent
Change Baz.txt message sent
Change Foo... |
While thinking about different calculi for predicate logic (like natural deduction and sequent calculus), I noticed that these calculi are (often) presented in a form suitable for "human computers". A "human computer" is limited to use write once read many (WORM) memory when processing large amounts of data. Pure funct... |
So given a input of lets say 10 strings, what way can we input these so we get the best or worst case for these two given sorts?
Heap sort:
best case - nlogn
worst case - nlogn
Quick sort:
best case - nlogn
worst case - n^2
Where i get confused on these two is:
heap- Since the best and worst case are the same does it... |
I've got a problem where I need to check the validity (i.e to say whether it's true or false) of the following statement:
Complement of a non-recursive language can NEVER be recognized by any turing machine.
How I've thought of this is that, if a language $\mathcal{L}$ is non-recursive, there is no turing machine tha... |
I have following problem: I have a sorted sequence of $N$ integers (assume they are monotonically increasing). I want to check whether there is any subsequence of length $\ge N/4$, such that consecutive elements of the subsequence all differ by the same value.
For example, in the sequence [3,4,5,8,12] there are two su... |
Suppose we want to arrange n numbers stored in an array such that all negative value occur before the positive ones. What will be the minimum number of exchanges in the worst case ?
|
I want to know if there is any good book or material that fully explains and fully covers all combinatorics.I even did not find even Kenneth H.Rousan for this.So can anyone tell me any Discrete Mathematics book or any material to fully explain Combinatorics even to advance level.that provide classification to combinat... |
Given a non-deterministic push down automata (we define "accept" here using accept states), if we assume any operation popping from the stack and checking if the top of the stack contains some symbol can succeed (i.e. "getting rid" of the stack), we get a non-deterministic finite automata.
If we convert two such PDAs, ... |
I'm learning about undecidability, and found this question:
Is this language decidable, make a proof:
L = { M : machine M halts for every input of length not exceeding 100 }
Update: This is translated from an exam paper some years ago, and I'm quite sure it means that machine M should halt for every input with len... |
Functional programming has the very elegant Lambda Calculus and its variants as a backup theory. Is there such a thing for OOP? What is an abstraction for the object oriented model?
|
(This may be more fitting for CSTheory, I'm not sure.)
I'm looking for an practical or theoretical work (that is, academic papers, online jots, pseudocode or code) regarding efficient algorithms for the following problem:
Unknown-Number-of-Bins Histogram
Inputs:
An array of integers $a$, of length $n$.
Outputs:
An ... |
$\mathrm{Halt} = \{ (f,x) | f(x)\downarrow \}$ is r.e. (semi-decidable) but undecidable.
$\mathrm{Total} = \{ f | \forall x f(x)\downarrow \}$ is not r.e. (not even semi-decidable).
I need some help in proving that $\mathrm{Total}$ is not recursive (decidable).
I know the diagonalization proof for the halting problem,... |
I'm currently reading this paper: Code injection attacks on Harvard-architecture devices (ACM) (pdf)
I understand the basics of what the attack is trying to do, but one thing really bothers me. If Harvard Architecture is supposed to have a strict separation of code and data, how is the initial buffer overflow allowing... |
Consider this tree:
If I traverse it using post-order, I'd start at B (as it is the leftmost leaf) and that's where my misunderstanding begins. I know B is the first and A will be the last node in post order, as the rule is left-right-root. One of my university professors said the correct answer for the post-order tra... |
Is the set $S$ = $\lbrace M \mid M \text{ is a Turing machine and }L(M)=\lbrace \langle M\rangle\rbrace\rbrace$ empty?
In other words is there a Turing machine $M$ that only accepts its own encoding? What about a Turing machine that rejects only its own encoding?
|
I'm learning about asymptotic analysis, and have seen some exotic looking complexities living between other common ones. For instance "log log n" is strictly between 1 and log n. It makes me wonder if one can always find complexities between any other two.
Specifically, for any functions f and g with O(f) ⊂ O(g) does t... |
Consider the following variation (let us call it Q) on the Vertex Cover problem: Given a Graph G and a number K, we are asked if there is a k-cover of G so that it is the minimum cover.
My question is: How may one prove that Q can be reduced to the general Vertex Cover problem?
And, more generally, what is the approach... |
The Institute for Advanced Study has had a year-long special program devoted to the Univalent Foundations Program.
At the end of this they have produced a book and a code repository.
At the end of this we see a blog entry in Scientific American claiming:
...it could provide a new, self-contained foundation for all of... |
I am trying to find the plain text for the following cipher text using a frequency analysis
vr pvst yqlp mq nvf
But for the letters above this is really difficult, as if I use the alphabetic substitution technique, where I assume that v corresponds to e as this occurs most in the english alphabet. What about p, this a... |
Is it possible to use a sorting algorithm with a non-transitive comparison, and if yes, why is transitivity listed as a requirement for sorting comparators?
Background:
A sorting algorithm generally sorts the elements of a
list according to a comparator function C(x,y), with
\begin{array}{ll} C(x,y) = \begin{cases}
-1... |
I heard here that the Hamiltonian cycle problem is polynomial on graphs of bounded treewidth.
I am interested in examples/references to different problems which is essentially hard but having polynomial complexity on graphs of bounded treewidth.
|
I don't understand what is meant by:
"m should not be a power of 2, since if m = 2^p, then h(k) is just the p lowest-order bits of k." (pg. 231 of CLRS)
Terms defined:
m: size of hash table
h(k): hash function = k mod m
k: key
I don't understand what the p lowest-order bits of k means. Any clarification would be very ... |
To find a Hamilton cycle is a NPC problem, but Euler is not.
Considering one can always transform the vertex as edge or vice versa conceptually. Then the vertex can be used to describe the information which originally edge does.
What properties make the Euler graph more easily to be resolved?
For example, in genome a... |
I am trying to understand how IDDFS works by reading a wikipedia article on it.
(If someone has a better literature on the subject, don't hesitate to post).
Pseudocode is as follows:
IDDFS(root, goal)
{
depth = 0
for(i=1, i<10, i++)
{
DFS(limit=i)
}
}
First of all, what is 10 here? Is it an arbitray number... |
I want to derive a context free grammar for the following language on alphabet $\Sigma=\{a,b\}$:
$\qquad\displaystyle \{ xax'yby'z \mid x,y,z\in\Sigma ^*, |x|=|x'|, |y|=|y'|, |z|=|x|+|y|\}$
I am convinced that this language is context-free because this is part of my proof to a theorem given in textbook, but haven't yet... |
I am working on showing that 3-colorability is NP-complete. I read a few articles and walkthroughs on this but none are really clicking. I get to this part
"Then for every variable xi that appears in the instance of Satisfiability, we connect a
vertex xi to a vertex xi, and we connect both xi and xi to red. Thi... |
I want to create a fast way to detect whether a file might or might not be the same. For almost 100% sureness I would use an existing hash algorithm, e.g. SHA256.
However, the files are expected to be huge video files with several GB, so calculating the SHA256 hash could take some time, especially over the network.
The... |
So, I have a list of cities (A, B, C, etc) with weighted edges (two-way, undirected) between them with a list of cities that already have a store.
My task is to place a one new store at either A, B, C, etc so that I minimize the travel distance from any city to a store.
So my head is thinking
Perform Dijkstra's on eve... |
For my homework I have a problem that I can't solve and it makes me wonder about 2 different MST:
Let $G=(V,E)$ be a graph that has a minimum spanning tree $T$.
I want to find another minimum spanning tree $T'$ that has at least 1 different edge $e'$
such that the weight of $e'$ is differ from any weight of edges in $... |
Given two NP NP-hard functional problems, A and B, one can find a reduction of A to B. Is it possible to find a reduction that would honour approximations? That is, if you have an approximation algorithm for B that yield approximate solutions within accuracy $\delta$, is it possible to reduce A to B in such a way that ... |
I have a problem and I guess it NP-hard, but I cannot prove it.
Here is a layer graph, where layer 0 is the hignest layer and layer L the lowest.
there are some directed edge between layers, where an edge (A, B) indicates that node A can [cover] node B. And when A can cover B, every node on any path from A to B can cov... |
In the introduction of the book by B.Jacobs, "Categorical Logic and Type Theory" (it's online here), he classifies type systems into three general flavours: Simply typed ones, depended typed (term depended types) and polymorphic types (type depended types). He says also there are also mix types.
Now if you start out w... |
I need help with showing that
$$NeverHalt_{TM} = \{\langle M\rangle \mid \text{$M$ is a TM which runs forever on every input $w$}\}$$
is undecidable by giving an explicit mapping reduction.
To show that a language reduces to any other language we must show that yes-instances are mapped to yes-instances and no-instance... |
I thinkt this question fits better here than on english.stackexchange.
When describing a figure in a computer science paper, is it safe to use "tick" meaning "tick mark"?
Examples:
... (see the thick line right of tick "17") meaning tick mark "17"
or ... increase at tick "1e+02" ... increase at tick mark "1e+02".
|
In the pre-history of dependent type theory, Per Martin Löf
introduced a calculus that is in some sense the simplest dependent
type theory and the most general form of impredicative polymorphism.
It is often referred to as Type:Type because the kind Type is
itself of type Type. Unfortunately, it is inconsistent as a
l... |
I am implementing a sample MESI simulator having two levels of cache (write back). I have added MESI status bits to both levels of cache. As it is a write back cache, the cache line is updated to L2 only when it is flushed. My doubts are
what should be the behavior when a cache line with INVALID state is flushed from ... |
Let $\phi$ be a the function computed by a universal Turing machine: $\phi_y(x)$ is the encoding of the output of the machine for the program whose Gödel encoding is $y$ with input encoding $x$.
I am looking for an upper bound on the length of the shortest program that computes $\phi$.
|
The theory of NP-completeness was initially built on Cook (polynomial-time Turing) reductions. Later, Karp introduced polynomial-time many-to-one reductions. A Cook reduction is more powerful than a Karp reduction since there is no restriction on the number of calls to the oracle. So, I am interested in NP-complete gra... |
Is the following language regular?
$$L = \{x \in \{a, b\}^* \mid \text{in every prefix \(w\) of \(x\), } 0 \le |w|_a − |w|_b \le 2\}$$
If so, give a DFA for it with as few states as possible. If you claim that it is
not regular give a pumping lemma proof that it is not regular.
I'm doing exam prep and have tried pump... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.