instruction
stringlengths
0
29.8k
⌀
From [Bernhard Korte, Jens Vygen, Combinatorial Optimization,][1] > Instances of LINEAR PROGRAMMING are vectors and matrices. Since no > **strongly polynomial-time** algorithm for LINEAR PROGRAMMING is known we > have to restrict attention to **rational instances** when analyzing the > running time of algorithms....
Why no strongly polynomial time algorithm implies restriction to rational instances?
|complexity-theory|
Indeed, the recursively enumerable languages are closed under union and intersection, but not complement. This is not a contradiction: the formula $A \cap B = \overline{\overline{A} \cup \overline{B}}$ tells that a class closed under union and complement is closed under intersection, but does not tell anything otherwis...
For what special cases does this vertex cover algorithm fail or work?
In other words, $L$ is the language of Turing machines that recognize the language consisting of only themselves. Why is $L$ not Turing-recognizable? $L$ is clearly not decidable by Rice's Theorem, but how do I go one step further and also prove that no machine can enumerate $L$?
Why is $L = \{ \langle M \rangle : L(M) = \{ \langle M \rangle \} \}$ not Turing-recognizable?
|formal-languages|
I am trying to figure out a greedy algorithm that finds the optimum (minimum) dominating set for any tree in linear time. So a greedy algorithm to find a dominating set for a general graph is not optimum. It's an approximation of the optimum dominating set. But since this is a tree I am assuming that a greedy algori...
Greedy Optimum Dominating Set For A Tree
|graphs|greedy-algorithms|
From [Bernhard Korte, Jens Vygen, Combinatorial Optimization,][1] > Instances of LINEAR PROGRAMMING are vectors and matrices. Since no > **strongly polynomial-time** algorithm for LINEAR PROGRAMMING is known we > have to restrict attention to **rational instances** when analyzing the > running time of algorithms....
Why does absence of strongly polynomial time algorithm for LP imply restriction to rational instances?
|complexity-theory|linear-programming|
null
From [Bernhard Korte, Jens Vygen, Combinatorial Optimization,][1] > Instances of LINEAR PROGRAMMING are vectors and matrices. Since no > **strongly polynomial-time** algorithm for LINEAR PROGRAMMING is known we > have to restrict attention to **rational instances** when analyzing the > running time of algorithms....
I'm currently learning for an exam about compilers and found the following question: > (3 p.) **Bootstrapping**: Explain the concepts of *rehosting* and *retargeting*. Use T-diagrams. As far as I understand, rehosting means to compile a compiler for another platform (host), so it should look like this: ---...
How to explain rehosting and retargeting with T-diagramms?
|compilers|
I am wondering why some methods transform the underlying graphical model (Bayesian Network for example) to a junction tree¹? What are the advantages? Also what are the limitations? I believe it's for computational purposes. If that's the case under what circumstances it is not recommended to transform the underly...
For a given propositional formula f in DNF, one can decide in polynomial time, if the formula is satisfiable: Just walk through all subformulas (l_1 and ... and l_k) and check, wheter it has NO complementary pair of literals. Formula f is satisfiable iff such subformula exists. Is my approach above corret ? If y...
Propositional formula in DNF can be decided in polynomial time?
|logic|polynomial-time|
Applying a max-flow algorithm to the graph it's trivially possible to find one or two vertex covers, inverting source and sink and the directions of the flows. Is it possible to find more?
Can a bipartite graph have more than two (opposite) vertex covers?
|graphs|
A *strongly polynomial algorithm* in the context of linear programming probably means an algorithm in the arithmetic model (where numbers can be added, multiplied, compared and so on), whose running time does not depend on the magnitudes of the numbers involved. Such an algorithm could be applied directly for real numb...
The conversion from CNF to DNF can come at an exponential cost. For example $(a_1 \lor b_1) \land \cdots \land (a_n \lor b_n)$ expands to $2^n$ many terms. As you comment, for DNF satisfiability is easy - it is falsifiability which is hard. If the problem is trivial, you don't input it to a SAT solver, and that's why S...
Given a Turing machine $T$, use the recursion theorem to construct a Turing machine $T'$ that halts if its input $x$ is $\langle T' \rangle$, runs $T$ on $x$ if $x < \langle T' \rangle$, and runs $T$ on $x-1$ if $x > \langle T' \rangle$. If you could recursively enumerate $L$, then you could use this reduction to recur...
There is a simple dynamic programming algorithm. Root the tree at some arbitrary vertex. For each subtree, compute the optimal dominating set (a) with the root, (b) without the root.
[Wikipedia][1] defines it to be > 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. > The algorithm runs in **strongly polynomial time** if [8] > > - the numb...
summation of O(n) from 1<= k<=n i think it sholud be O(n) only. because we are addition O(k) and maximum order will be O(n). but answer is given as O(n^2). correct me if i am wrong
summation of O(n) from 1<= k<=n
|algorithms|time-complexity|
For a given propositional formula f in DNF, one can decide in polynomial time, if the formula is satisfiable: Just walk through all subformulas (l_1 and ... and l_k) and check, wheter it has NO complementary pair of literals. Formula f is satisfiable iff such subformula exists. Is my approach above corret ? If y...
null
For a given propositional formula f in DNF, one can decide in polynomial time, if the formula is satisfiable: Just walk through all subformulas (l_1 and ... and l_k) and check, wheter it has NO complementary pair of literals. Formula f is satisfiable iff such subformula exists. Is my approach above correct ? If ...
null
How is asymptotic analysis (big o, little o, big theta, big theta etc.) defined for functions with multiple variables? I know that the Wikipedia article has a section on it, but it uses a lot of mathematical notation which I am unfamiliar with it. I also found the following paper: http://people.cis.ksu.edu/~rhowell/...
Asymptotic Analysis for two variables?
|complexity-theory|asymptotics|
If you are allowed to use closure properties (as the formulation in the question suggests) then $xw_1\in L_1$ so $w_1$ is a suffix of $L_1$, similarly $w_2$ is a prefix of $L_2$. Taking suffixes and prefixes is a closure property of regular languages, and so is concatenation. That solves the regularity. At what leve...
Asymptotic notation for multivariable functions is defined analogously to its single variable counterpart. In the single variable case, we say that $f(n) \in O(g(n))$ if and only if there exists constants $C,N$ such that for all $n > N$ we have $f(n) \leq Cg(n)$. In other words $f(n)$ is upper bounded by some multiple...
If you are allowed to use closure properties (as the formulation in the question suggests) then $xw_1\in L_1$ so $w_1$ is a suffix of $L_1$, similarly $w_2$ is a prefix of $L_2$. Taking suffixes and prefixes is a closure property of regular languages, and so is concatenation. That solves the regularity. At what leve...
Suppose $T_n = O(n)$. That means that for some constant $C$, $T_n \leq Cn$. Therefore $$ \sum_{m=1}^n T_m \leq C \sum_{m=1}^n m = \frac{C}{2} m(m+1) = O(m^2). $$ If also $T_n = \Omega(n)$ then you can show in exactly the same way that the sum is $\Omega(n^2)$, so that no better bound is possible (for concreteness, you ...
null
I have a DAG representing strict partial order where each node is an assignment of variables $V$ to their values $v$. Each arc $(u,w)$ represents a change in one variable value such that $u\succ w$. So if I have $n$ binary variables, I will end up with $2^n$ nodes which is exponential to the size of variables $n$. ...
is there an efficient method to store large DAGs
|algorithms|graphs|data-structures|partial-order|
null
*3. There are algorithms which run in polynomial time in the Turing machine model, but not in the arithmetic model. The Euclidean algorithm for computing the greatest common divisor of two integers is one example.* The Euclidean GCD algorithm runs in time polynomial in the number of bits of the input under both Turi...
I try to understand distributed 6-color algorithm for vertex coloring [Vertex Coloring](http://disco.ethz.ch/lectures/podc_allstars/lecture/chapter1.pdf), page 10. Here is a short description Idea of the algorithm: We start with color labels that have log $n$ bits. In each synchronous round we compute a new labe...
null
I am trying to understand the [distributed 6-color algorithm for vertex coloring](http://disco.ethz.ch/lectures/podc_allstars/lecture/chapter1.pdf) (on page 10). Here is a short description Idea of the algorithm: We start with color labels that have $\log n$ bits. In each synchronous round we compute a new label ...
The labels $c_v$ and $c_p$ are relative. So when a node (parent in your example) having $c_v = 1010010000$ receives from its parent (grandparent in your example) an id $c_p = 0010110000$, the difference, as you correctly point out, is in the fifth position. Now, the total number of bits in the original ids is 10, so...
null
Can you obtain more than two vertex covers from a bipartite graph using a max-flow algorithm?
null
I went through a question asking me to categorize the following grammar. $$S → AA, S → AB, A → a, A→BB, B → b, B → e$$ From the production rules, clearly it is Context-Free. But it accepts a finite set of strings. $\{e, a, aa, ab, abb, ba, bba, b, bb, bbb, bbbb\}$ which is regular language. So, is the above ...
Is this a regular grammar?
|regular-languages|formal-grammars|context-free|
The answer is no. Whilst the **language** is finite and therefore regular the **grammar** itself is not regular. I think you already knew this as you said that this grammar's production rules are not of the form of a regular grammar. The point here is that just because a grammar isn't regular doesn't mean the langu...
I am solving one of the past exams and I am not certain with my solution to one of the exercises. The exercise is asking to give intuitive meaning to modal $\mu$-calculus formula: $$ \phi = \mu Z. \langle - \rangle tt \wedge [-a]Z $$ According to an article *Modal logics and mu-calculi: an introduction* by Bradfi...
null
null
Trivially decidable is one in which the problem is a known property of the language/grammer. so intersection of two regular languages is regular shuold be trivial decidable? am i right?
intersection of two regular languages is regular - is that trivial problem
|regular-languages|undecidability|
Trivially decidable problem is one in which the problem is a known property of the language/grammar. so **intersection of two regular languages is regular shuold be trivially decidable**? but it is given as not trivially decidable.
intersection of two regular languages is regular
|regular-languages|undecidability|decision-problem|
this a type-2 grammar(CFG) not type-3 (regular garmmar). because it consists of both left hand derivation and right hand derivation. and there are CFG which generates regular languages. thats a property.
Using python need to code a recursive function with one input and no global integers that calculates the number of options to get $x$ using $a*1+b*2+c*3$. say $x=3$, there are four options: ${(1,1,1),(1,2),(2,1),(3)}$ A hint would be lovely. Thank you.
Recursive function calculating number of ways to sum $(a*1+b*2+c*3)=x$
|recursion|
This a type-2 grammar (CFG) not type-3 (regular garmmar), because it consists of both left hand derivation and right hand derivation. There are CFGs which generate regular languages. That's a property.
Is there an efficient method to store large DAGs?
null
|combinatorics|recursion|
I am trying to create an [isochrone](http://en.wikipedia.org/wiki/Isochrone_map) based on the OpenStreetMap data set. Everything works fine, I extracted data, processed it into a DAG, ran a Dijkstra algorithm over it. The result is a subset of the complete graph. This is an impression of the covered parts of the subset...
Algorithm for getting the outer boundary of a large graph
|algorithms|computational-geometry|graph-traversal|
Try constructing an reduced ordered binary decision diagram (ROBDD) as described [here][1]. The memory complexity of an ROBDD is $\mathcal O({2^n \over n})$ as proved [here][2]. [1]: http://www.configit.com/fileadmin/Configit/Documents/bdd-eap.pdf [2]: http://tkuir.lib.tku.edu.tw:8080/dspace/bitstream/987...
Try constructing a reduced ordered binary decision diagram (ROBDD) as described [here][1]. The reducing algorithm removes redundant nodes, and reuses equal subtrees in the decision tree, such that every node is unique. The memory complexity of a ROBDD is $\mathcal O({2^n \over n})$ as proved [here][2]. [1]: h...
Recursion is a pretty bad choice here, but here is the recursion you could use: $$ f(n) = \begin{cases} 0, & n < 0, \\ 1, & n = 0, \\ f(n-1) + f(n-2) + f(n-3), & n > 0.\end{cases} $$ For example, $$ \begin{align*} f(-2) &= 0, \\ f(-1) &= 0, \\ f(0) &= 1, \\ f(1) &= f(0) + f(-1) + f(-2) = 1, \\ f(2) &= f(1) +...
Using python need to code a recursive function with one input and no global integers that calculates the number of options to get $x$ using $a*1+b*2+c*3$. Say $x=3$, there are four options: $\lbrace (1,1,1),(1,2),(2,1),(3)\rbrace$.
Recursive function calculating number of ways to sum $a + 2 b + 3 c = x$
def f(n): """Compute the numbers of ways in which non-negative n can be expressed as a sum of 0s, 1s, and 2s.""" (u, v, w) = (0, 0, 1) while n > 0: (u, v, w) = (v, w, u + v + w) n = n - 1 return w
null
Summation of $O(n)$ from $1\le k\le n$. I think it should be $O(n)$ only. Because we are addition $O(k)$ and maximum order will be $O(n)$. But answer is given as $O(n^2)$. Correct me if I'm wrong.
Summation of $O(n)$ from $1\le k\le n$
null
null
> Strips –Stands for STanford Research Institute Problem Solver (1971). **STRIPS Pseudo code -** STRIPS(stateListstart, stateListgoals) 1.Set state = start 2.Set plan = [] 3.Set stack = goals 4.while stack is not empty do 1.STRIPS-Step() 5.Return plan STRIPS-Step(...
How recognize STRIPS Algorithm has no solution?
|algorithms|artificial-intelligence|
|data-structures|trees|
def f(n): if n < 0: return 0 elif n == 0: return 1 else: return f(n-1) + f(n-2) + f(n-3)
> Strips –Stands for STanford Research Institute Problem Solver (1971). **STRIPS Pseudo code -** STRIPS(stateListstart, stateListgoals) 1.Set state = start 2.Set plan = [] 3.Set stack = goals 4.while stack is not empty do 1.STRIPS-Step() 5.Return plan STRIPS-Step(...