instruction
stringlengths
0
29.8k
⌀
|complexity-theory|time-complexity|reductions|proof-techniques|fine-grained-analysis|
null
I have been studying the Branch and Bound paradigm. I came across an approach to solve the Travelling Salesman Problem using branch and bound where a specific kind of bounding function was used. I've been wondering why this bounding function (which performs a kind of reduction on the adjacency matrix of the graph under...
null
null
I have been studying the Branch and Bound paradigm. I came across an approach to solve the Travelling Salesman Problem using branch and bound where a specific kind of bounding function was used. I've been wondering why this bounding function (which performs a kind of reduction on the adjacency matrix of the graph under...
null
Can fine-grained hardness (e.g. ${\sf DIAMETER} \notin {\sf TIME}(mn^{1-\epsilon})$) be proved directly from classical hardness (e.g., $\sf P \neq NP)$ in some way? **My thought**: to prove fine-grained hardness, we construct reductions from $A$ to $B$, then "perturbation" on $A$'s complexity will cause a perturbati...
Can fine-grained hardness be proved directly from classical hardness (e.g., $\sf P \neq NP$) in some way?
>Prove that the unique language $A\subseteq \Sigma^*$ such that $AB$ is context free for all languages $\subseteq \Sigma^*$ is the empty set. If $A$ is not the empty set, there should be a way to construct a language $B$ so that $AB$ is not context-free. I'm not sure how to generalize this for arbitrary nonempty lan...
As you suspected, $L(G)$ is nonregular. To prove the language generated by a given context-free grammar is nonregular, a practical approach is to find a regular language such that their intersection is nonregular. What is nice about the intersection of a context-free language and a regular language is that it is st...
I have just learnt about some typical result of fine-grained hardness in 15-455 by Prof Ryan: CNF-SETH implies ${\sf DIAMETER} \notin {\sf TIME}(mn^{1-\epsilon})$. (Here DIAMETER stands for the graph diameter problem). To prove fine-grained hardness, we construct reductions from $A$ to $B$, then "perturbation" on $A...
Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. We also have a set of facts $Y$. We have that $(x_i,x_j) \in Y$ where $i < j$ if $x_i$ finishes driving before $x_j$ begins. W...
Topological sorting on directed graph problem
|algorithms|graphs|dag|
Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. We also have a set of facts $Y$. We have that $(x_i,x_j) \in Y$ where $i < j$ if $x_i$ finishes driving before $x_j$ begins. W...
Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. We also have a set of facts $Y$. We have that $(x_i,x_j) \in Y$ where $i < j$ if $x_i$ finishes driving before $x_j$ begins. W...
|algorithms|graphs|data-structures|graph-traversal|dag|
Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. We also have a set of facts $Y$. We have that $(x_i,x_j) \in Y$ where $i < j$ if $x_i$ finishes driving before $x_j$ begins. W...
{"Voters":[{"Id":755,"DisplayName":"D.W."}]}
null
The complexity of `temp` will be $$\sum_{i=1}^n v_i$$ where $n$ denotes the size of the outer vector and the $v_i$ are the sizes of the inner vectors. Space complexities are in principle given in terms of units of storage.
null
While I understand the process of considering/observing an algorithm and finding an average time, necessary to perform an operation that happens in this algorithm, I still cannot quite gasp the idea, or rather the expression: **"The Algorithm has an amortized time complexity which is cost./linear etc"**. What to...
Algorithm with amortized time complexity
|time-complexity|amortized-analysis|
In my understanding, the statement "The Algorithm $A$ has an amortized time complexity which is linear" is something like $$\frac{1}{|\Sigma|^n} \sum_{w \in \Sigma^n} \text{running time of $A(w)$} = O(n)$$ i.e. the algorithm may behave badly on some examples, but the "average" case is good. It's something just as you...
null
null
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. We also have a set of facts $Y$. We have that $(x_i,x_j) \in Y$ where $i < j$ if $x_i$ finish...
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. i.e. Each $x_i$ starts driving strictly before $x_j$ for any $j > i$. We also have a set of fa...
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. i.e. Each $x_i$ starts driving strictly before $x_j$ for any $j > i$. We also have a set of fa...
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. i.e. Each $x_i$ starts driving strictly before $x_j$ for any $j > i$. We also have a set of fa...
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. i.e. Each $x_i$ starts driving strictly before $x_j$ for any $j > i$. We also have a set of fa...
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. i.e. Each $x_i$ starts driving strictly before $x_j$ for any $j > i$. We also have a set of fa...
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. i.e. Each $x_i$ starts driving strictly before $x_j$ for any $j > i$. We also have a set of fa...
Consider the following scenario. Let $x_1,...,x_n$ be a group of cars that all drive from some point A to some point B. Each car starts driving in index order. i.e. $x_1$ starts driving strictly before $x_2$ and so on. i.e. Each $x_i$ starts driving strictly before $x_j$ for any $j > i$. We also have a set of fa...
Using topological sort to find inconsistencies represented by cycles in directed graphs
I think the issue you having is the understanding of why **A** respects the cut, and you think that if **(u,v)** crosses the cut, then **A** is no longer a valid condition. In the proof when **A** respects the cut it doesn't imply that if we add an edge that crosses the cut, it won't be safe. Let me provide you with an...
I think the issue you having is the understanding of why **A** respects the cut, and you think that if **(u,v)** crosses the cut, then **A** is no longer a valid condition. In the proof when **A** respects the cut it doesn't imply that if we add an edge that crosses the cut, it won't be safe. Let me provide you with an...
I came up with a simple and acceptable solution: the first argument to the binary prefix operator can be any expression with a precedence binding tighter than unary negation. That's almost no expressions, but it does include integer literals which is the most common case. This reminds me of a bit of haskell syntax. ...
null
{"Voters":[{"Id":755,"DisplayName":"D.W."}]}
null
null
null
As you suspected, $L(G)$ is nonregular. A common strategy to prove a language $X$ is nonregular is to find a regular language $Y$ such that $X\cap Y$ is nonregular. When $X$ is context-free, this strategy becomes more attractive since $X\cap Y$ is still context-free, indicating that it might be easy to guess, unde...
Are there any NP-complete problems where the fastest known algorithm solves the problem in superexponential time (like $O(n!)$ time)? Every NP-complete problem that I am aware of has fastest known algorithms that are all exponential time, but it is not obvious to me whether there is anything preventing such problems f...
Are there superexponential NP-complete problems?
|complexity-theory|np-complete|
null
First, I think $O(n!)$ (as you described) is something bounded by $O(n^n) = O(2^{n\log n}) \leq O(2^{n^2})$, not super-exponential; Second, since $\sf NP \subseteq EXP$, all problems in $\sf NP$ should be bounded by exponential time.
I’m not sure [how you define “superexponential”][1], could you make it precise for me? First, I think $O(n!)$ (as you described) is something bounded by $O(n^n) = O(2^{n\log n}) \leq O(2^{n^2})$, not super-exponential; Second, since $\sf NP \subseteq EXP$, all problems in $\sf NP$ should be bounded by exponential t...
As said in my comment, binary numbers of size $n$ are not supported by current computers. We have two situations: - only support the native binary type; as $n$ does not exceed $64$, you can very well precompute all patterns and store them in an array. (Counting all feasible sizes, there would be $2016$ patterns.) ...
It is not correct. Robinson arithmetic system is finite axioms system, which is incomplete same as Peano axioms system.
null
I am a student who is currently finishing second year of university mathematics. This summer I have to choose a topic for my diploma. Because I am particularly interested in computer science I am seriously considering choosing a topic about programming language theory. But I have one problem - I will be taking a course...
Question about complexity of two topics in programming language theory
|programming-languages|functional-programming|
null
null
I’m not sure [how you define “superexponential”][1], could you make it precise for me? First, I think $O(n!)$ (as you described) is something bounded by $O(n^n) = O(2^{n\log n}) \leq O(2^{n^2})$, not super-exponential, if you define "exponential" as something described in the previous link like $2^{n^c}$; Second, s...
Can anyone help me figure out the error in my approach to this problem from Sipser 1.18 (1.6f)? Write a regular expression for the language L = {w | w does not contain 110} [![enter image description here][1]][1] [![enter image description here][2]][2] [![enter image description here][3]][3] [![enter image desc...
Regex for string does not contain the substring "110"
|regular-languages|finite-automata|regular-expressions|theory|
Can anyone help me figure out the error in my approach to this problem from Sipser 1.18 (1.6f)? Write a regular expression for the language L = {w | w does not contain 110} [![enter image description here][1]][1] [![enter image description here][2]][2] [![enter image description here][3]][3] [![enter image desc...
Note that $\mathcal{L}(1\cup 111^*\cup \varepsilon) = \mathcal{L}(1^*)$. And in the general case, $\mathcal{L}((e\cup f)^*) = \mathcal{L}((e\cup f^*)^*)$. So your regular expression is correct.
This question is based on [my previous question](https://cs.stackexchange.com/questions/152827/myhill-nerode-equivalence-under-a-function) and includes all the definitions and results there by reference. Definitions: $|M|$ is the number of states in the finite automaton $M$. $\ L_A$ and $L_B$ are decided by the auto...
Comparing automata sizes given Myhill-Nerode equivalence under a function
|regular-languages|finite-automata|
The answer is right but the argument is not sufficient. Try to build a contradicting example as a proof. Describe how to encode each machine into a binary number (can be found in any tcs book). Then choose some random non-trivial property, say the number of states is equal to 4. Show that there is a machine that admit ...
null
The amortized time is indeed the average time over a larger number of repetition of an operation (large enough that the variations are smoothed away). In principle, only one operation is involved. In some cases, several can be (say insertions+deletions), provided this makes sense.
The amortized time is indeed the average time over a larger number of repetition of an operation (large enough that the variations are smoothed away). A typical example is a growable array supporting `push_back` operations. When there is room at the end of the allocated space, a `push_back` costs $O(1)$. But when th...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaining that it is a finite amount set and therefore it can be decided. But my problem is that for each of the 8 $w$ it could be the case that one has to wait an infinite amount of ...
Why is $$\{ w \in \sigma^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$$
|turing-machines|sets|halting-problem|
Why is $$\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$$
Why is $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$
Why is $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ decidable?
I assume that computers make many mistakes (like errors, bugs, glitches, etc.), which can be observed from the amount of questions asked everyday on different communities (like Stack Overflow) showing people trying to fix such issues. If computers really make many errors (as I assumed earlier) then critical tasks (l...
|computer-architecture|security|error-estimation|reliability|
First, note that if $|\Sigma| > 1$, you have more than eight different $w$. Second, I would assume that $M_w[\varepsilon]$ is the output of the Turing machine corresponding to encoding $w$ on input $\varepsilon$. I assume, that $M_w[v]\downarrow$ is short for $M_w$ halts on $v$. You correctly observed that the...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaining that it is a finite amount set and therefore it can be decided. But my problem is that for each of the 8 $w$ it could be the case that one has to wait an infinite amount of ...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaining that it is a finite amount set and therefore it can be decided. But my problem is that for each of the 8 $w$ it could be the case that one has to wait an infinite amount of ...
Someone compared self driving cars to cars driven by humans. I would look at text messages instead: Delivering a text message without computer would force you to write it say on a postcard, take it to a letter box, where it is collected, sorted by delivery town, then some postman takes it to my home and drops it throug...
Take the other answers first... What must not happen is for example an algorithm that always takes a long time if an array size goes from 100 to 101, 200 to 201 etc. if this also happens if I change the size from 100 to 101 to 100 to 101 to 100 to 101 and so on. In this situation the changes from 100 to 101 must _no...
To elaborate on Nathaniel's answer: $1 \cup 111* \cup\space \epsilon \\ = 1(\epsilon \cup 11^*)\cup \epsilon \\ = 1(\epsilon + 1^+) \cup \epsilon \\ = 1(1^*) \cup \epsilon\\ = 1^+ \cup \epsilon \\ = 1^*$
I'm going to limit myself, at least for now, to the question actually asked here: how to deal with the ambiguity between an operator which could be prefix or infix (such as unary negation) and a prefix operator which takes two consecutive arguments. There is a second interesting question, which has to do with prefix op...
Why there is no final state for a transition system? And why do NFA and DFA have final states? The transition system may or may not have any terminal states, but NFA/DFA has at least one final state (for describing its language). I just want to know about the basics. Can I call a DFA a transition system (because DFA is...
Transition System vs State Machines
|formal-languages|finite-automata|computation-models|model-checking|transition-systems|
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaning that it is a finite amount set and therefore it can be decided. But my problem is that for each of the 8 $w$ it could be the case that one has to wait an infinite amount of t...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaning it is a finite set and therefore it can be decided. But my problem is that for each of the 8 $w$ it could be the case that one has to wait an infinite amount of time in order...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaning it is a finite set and therefore it can be decided. But my problem is that for each of the $w$ it could be the case that one has to wait an infinite amount of time in order t...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaning it is a finite set and therefore it can be decided. But my problem is that for each of the $w$ it could be the case that one has to wait an infinite amount of time in order t...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaning it is a finite set and therefore it can be decided. But my problem is that for each of the $w$ it could be the case that one has to wait an infinite amount of time in order t...
I get that the argument for this set $\{ w \in (\sum)^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaning it is a finite set and therefore it can be decided. But my problem is that for each of the $w$ it could be the case that one has to wait an infinite amount of time in order t...
I get that the argument for this set $\{ w \in \Sigma^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ to be decidable is that $|w|\leq7$ meaning it is a finite set and therefore it can be decided. But my problem is that for each of the $w$ it could be the case that one has to wait an infinite amount of time in order t...
Why is $\{ w \in \Sigma^* : M_w[\epsilon]\downarrow \land |w| \leq 7\}$ decidable?