instruction stringlengths 0 29.8k ⌀ |
|---|
Just for the purpose sharing knowledge, you can do that with $O(|E|)$ *messages* if you assume that each vertex to act as a *processor*. Note each vertex has a comparable value. Therefore, there exists some vertices such that they are larger than all their neighbors. These vertices do the following:
1. Let $u$ be th... |
null |
Given a graph $G = (V,E)$, where $|V| = n$. What is a fast algorithm for generating the collection of all 2-hop neighborhood lists of all nodes in $V$.
Naively, you can do that in $O(n^3)$. With power of matrices, you can do that with $O(n^{2.8})$ using Strassen algorithm. You can do better than this using another ... |
Algorithm to find all 2-hop neighbors lists in a graph |
|algorithms|algorithm-analysis|graphs|randomized-algorithms| |
Not what you are looking for. But just for the purpose sharing knowledge, you can do that with $O(|E|)$ *messages* if you assume that each vertex to act as a *processor*. Note each vertex has a comparable value. Therefore, there exists some vertices such that they are larger than all their neighbors. These vertices do ... |
Microsoft Academic search is very good.
You can select a list of conferences in your area
and get RSS feeds of the latest papers. |
null |
If I'm looking for a particular topic or research problem, I usually start with Google scholar. To search for recent work by a particular author, title, or conference, sometimes DBLP is the way to go.
http://www.informatik.uni-trier.de/~ley/db/
If you just want to browse recent work, then as others have said some... |
There is a given a max-heap,
we want to find an algorithm in o(k) time complexity to check if k'th smallest element is bigger than arbitrary given number. |
Algorithm to check if k'th smallest element in max-heap is bigger than given number |
|algorithms|heaps| |
There is a given a max-heap,
we want to find an algorithm in O(k) time complexity to check if k'th smallest element is bigger than arbitrary given number. |
null |
A set of numbers is stored in a max-heap.
We want to find an algorithm in $O(k)$ time complexity to check if $k$th smallest element is bigger than arbitrary given number. |
Algorithm to check whether the $k$'th smallest element in max-heap is bigger than a given number |
null |
An article that claims to introduce it: [IELR(1): Practical LR(1) Parser Tables for
Non-LR(1) Grammars with Conflict Resolution][1] by Joel E. Denny and Brian A. Malloy, Clemson University, is freely available from Malloy's site.
What they are worth is something I can't answer. (Personally I don't understand the ne... |
In my opinion, since as you said you haven't decided yet the field of your research,starting from papers for inspiration is a bit odd. Firstly, if I were you I would search the Web for the general idea of "the state of the art" for each sector of Computer Science. Then you should go deeper reading papers, provided that... |
|formal-languages|terminology|formal-grammars|parsers| |
Firstly, let's see step by step a sequence of production usage in order to draw the general conclusion:<br>
$$aaaaaaaaaBBBAA\mathbf{AD}\underset{prod8}{\rightarrow}~a...aBBBA\mathbf{AD}a\underset{prod8}{\rightarrow}~a...aBBB\mathbf{AD}aa\underset{prod8}{\rightarrow}$$
$$\underset{prod8}{\rightarrow}a...aBB\mathbf{BD}... |
null |
First your integer numbers are converted into binary numbers. <br/>For example, in CPU integer 2 is converted to 0010
> A `digital comparator` or magnitude comparator is a hardware electronic
> device that takes two numbers as input in binary form and determines
> whether one number is greater than or less than or... |
you can find answer of these in title itself.
> `image processing`- title says that it processes image, means does
> some transformations on image. that means may be it does some
> smoothing,sharpening, contrasting,stretching.. on the image for making
> image more enhancive & readable that is input and output of... |
From [Wikipedia][1]
> **Information retrieval** is the activity of obtaining information resources relevant to an information need from a collection of information resources. Searches can be based on metadata or on full-text indexing.
From [Wikipedia][2]
> **Information extraction (IE)** is the task of automatica... |
Relation and difference between information retrieval and information extraction? |
|data-mining| |
null |
You can obtain this quantity in subcubic time (as fast as matrix multiplication) from the second power of the adjacency matrix of $G.$ Given that $A$ is the adjacency matrix of $G$ two distinct vertices $v_i,v_j$ are at distance $2$ if and only if $[A^2]_{i,j} \ne 0.$ |
{"Voters":[{"Id":3092,"DisplayName":"Jernej"}]} |
{"Voters":[{"Id":3092,"DisplayName":"Jernej"}]} |
This problem ar partial orde on the set A.
1. A=Z, and a R b if and only if a = 2b
2. A=Z, and a R b if and only if (a^2)|b
partial order is reflexive, antisymmetric and transitive.
How do I solve? show me the solution. |
how do I solve? |
|partial-order| |
This problem ar partial order on the set A.
1. A=Z, and a R b if and only if a = 2b
2. A=Z, and a R b if and only if (a^2)|b
partial order is reflexive, antisymmetric and transitive.
How do I solve? show me the solution. |
{"Voters":[{"Id":3092,"DisplayName":"Jernej"}]} |
The question really depends on what is the precise definition of a 2-hop. If by a 2-hop you mean the set $$hp(v) = \{ u | d(u,v) = 2\},$$ then the current answer is no, you cannot do it faster than $O(n^{\omega})$ where $\omega$ is the usual constant associated with the complexity of performing the matrix product. |
{"Voters":[{"Id":3092,"DisplayName":"Jernej"}]} |
Using this grammar, over the alphabet $\Sigma=\{a\}$
$$
S \rightarrow a \\
S\rightarrow CD \\
C\rightarrow ACB \\
C\rightarrow AB \\
AB\rightarrow aBA \\
Aa\rightarrow aA \\
Ba\rightarrow aB \\
AD\rightarrow Da \\
BD\rightarrow Ea \\
BE\rightarrow Ea \\
E\rightarrow a \\
$$
Im trying to show that the work... |
null |
A set of numbers is stored in a **max-heap**. We want to find an algorithm with $O(k)$ time complexity to check if $k^{th}$ **smallest** element is greater than an arbitrary given number. |
Determine whether the $k^{th}$ smallest element in max-heap is greater than a given number |
null |
The question really depends on what is the precise definition of a 2-hop. If by a 2-hop you mean the set $$\text{hp}(v) = \{ u \mid d(u,v) = 2\},$$ then the current answer is no, you cannot do it faster than $O(n^{\omega})$ where $\omega$ is the usual constant associated with the complexity of performing the matrix pro... |
The question really depends on what is the precise definition of a 2-hop. If by a 2-hop you mean the set $$hp(v) = \{ u | d(u,v) = 2\},$$ then the current answer is no, you cannot do it faster than $O(n^{\omega})$ where $\omega$ is the usual constant associated with the complexity of performing the matrix product.
W... |
The question really depends on what is the precise definition of a 2-hop. If by a 2-hop you mean the set $$\text{hp}(v) = \{ u \mid d(u,v) = 2\},$$ then the current answer is no, you cannot do it faster than $O(n^{\omega})$ where $\omega$ is the usual constant associated with the complexity of performing the matrix pro... |
The question really depends on what is the precise definition of a 2-hop. If by a 2-hop you mean the set $$hp(v) = \{ u | \mbox{there is a path of lenght 2 between u and v}\},$$ then the current answer is no, you cannot do it faster than $O(n^{\omega})$ where $\omega$ is the usual constant associated with the complexit... |
Given a [partial order][1] on the set $A$ such that:
1. $A=Z$, and $a$ $R$ $b$ if and only if $a = 2b$
2. $A=Z$, and $a$ $R$ $b$ if and only if $a^2|b$
A partial order is reflexive, antisymmetric and transitive.
Would someone help me understand?
[1]: http://en.wikipedia.org/wiki/Partially_ordered_set |
Determining a partial order |
null |
Is this a context-free language? L = { xy(xR)(yR) | x,y is an element of {0,1}* }
xR means the reverse of x.
I think this is a context free language. Since PDA accepts CFL, I'm trying to draw a PDA for this language.
I'm wondering when I draw a PDA, how does the PDA tell x and y apart?
Or is this not a cont... |
Is this a context-free language? |
|regular-languages|computation-models|language-design| |
Actually, and in order to obtain the full image of it, I think it would be quite helpful to see with your own eyes the datapath of an actual CPU, for example MIPS:
![enter image description here][1]
[1]: https://i.stack.imgur.com/YE56b.png
As you may see, there is actually a second output from the ALU, which... |
I am wondering if this is even possible, since $\{a^n b^n c^n | n \geq 0\} \not\in \mathrm{CFL}$. Therefore a PDA that can distinguish a word $w\in\{a^n b^n c^n | n \geq 0\}$ from the rest of $\{a^*b^*c^*\}$ might as well accept it, which sounds contradictory to me.
I guess I need to take advantage of the non-dete... |
Construct a PDA for $\{a^*b^*c^*\}\setminus\{a^n b^n c^n | n \geq 0\}$ |
|context-free|pushdown-automata| |
No, this is context-free. To accept $a^nb^nc^n$, you need to make sure that three numbers are equal. To accept $a^*b^*c^* \setminus a^nb^nc^n$, you just need to make sure that you're in one of the following three cases:
1. The number of $a$s is different from the number of $b$s; or
2. The number of $a$s is differen... |
Given a [partial order][1] on the set $\mathcal A$ such that:
1. $\mathcal A\in\mathbb Z$ and $a\ \mathsf R\ b$ if and only if $a = 2b$
2. $\mathcal A\in\mathbb Z$ and $a\ \mathsf R\ b$ if and only if $a^2|b$
A partial order is reflexive, antisymmetric and transitive.
Would someone help me understand?
... |
null |
Assuming that the answer to my comment is yes,
1. The first is not a partial order, since it is not reflexive; in general, it is not true that $a = 2a$ (consider the case $a \neq 0$).
2. The second is not a partial order, since it is not reflexive; in general, it is not true that $a^2 | a$ (consider the case $a > 1... |
Is the following language a context-free?
$$ L = \{ xyx^Ry^R \mid x,y\in\{0,1\}^* \},$$
where $x^R$ means the reverse of $x$.
I think this is a context-free language. Since a PDA accepts CFL, I'm trying to draw a PDA for this language.
I'm wondering when I draw a PDA, how does the PDA tell $x$ and $y$ apa... |
|formal-languages|context-free| |
Is the language $L=\{ xyx^Ry^R \mid x,y \text{ is an element of }\{0,1\}^*\}$ context-free?
Note: $x^R$ is the reverse of $x$.
**My Work:** I think this is a context free language. Since a [pushdown automaton][1] (PDA) accepts [context-free languages][2], I am trying to draw a PDA for this language. When I draw ... |
|regular-languages|computation-models|language-design| |
null |
|formal-languages|context-free| |
I read some research that analyze the hardness of SAT solving in the average case.
In fact for a 3CNF formula if you compute the ratio of clause to variables there is an interval (more or less between 4 and 5) in which solving the formula is hard. But it easy (between 0 and 4 ) high probability of satisfiable assignme... |
Hardness of find a true or a false assignment into a generic boolean formula? |
|satisfiability|average-case| |
No, it is not a context-free language. From my original SO answer: consider the string $0^n1^n0^n1^n \in L$. This fails the pumping lemma for context-free languages. In particular, we have 7 cases for $vxy$:
1. $vxy$ consists entirely of 0s from the first part of the string. Pumping this up or down will cause the nu... |
The language is not context-free. This can be shown with help of the the [context-free pumping lemma](http://en.wikipedia.org/wiki/Pumping_lemma_for_context-free_languages). Let $p$ be the pump width, then show that is not possible to "pump" the word $w=1^p0^p1^p0^p$.
You are left with showing the following. No matt... |
Mostly from Vor's comment:
$A \le_pB$ can be taken to mean that the problem $A$ is at least as easy as $B$ (or less hard). The $_p$ subscript stands for *polynomial-time* and indicates that "easy" is relative term here, and the difficulty of the actual problems must consider the *polynomial-time* reduction as incons... |
Is $L=\{ xyx^Ry^R \mid x,y \text{ is an element of }\{0,1\}^*\}$ context-free? |
null |
It is only the random instances of SAT that exhibit the phase transition you mention. There is also work that tries to characterize the hardness of an arbitrary formula. For more on this, see my answer to the question [Measuring the difficulty of SAT instances](http://cs.stackexchange.com/questions/407/measuring-the-di... |
The question really depends on what is the precise definition of a 2-hop. If by a 2-hop you mean the set $$hp(v) = \{ u | \mbox{there is a path of lenght 2 between u and v}\},$$ then the current answer is no, you cannot do it faster than $O(n^{\omega})$ where $\omega$ is the usual constant associated with the complexit... |
Sorry if this question is very simplistic; I'm just starting out and I'm trying to wrap my head around all this asymptotic bound stuff. When trying to find the upper bound for the worst case of a function does it need to take into account what the meat of the code actually does? I have some code that would (in the wors... |
Input to make worst case on big O not possible? |
|asymptotics| |
It matters what is actually happening in the code. The following pseudocode is O(1)
loop_factor = input()
for x between 0 and loop_factor():
for y between 0 and loop_factor():
terminate
However, it doesn't matter what is *likely* or *reasonable* to happen. If the body of your loop... |
A reduction from A to B shows that A is "no harder" than B in some sense. We call it a reduction because it reduces the problem of solving A to the problem of solving B. This is a usage of the word "reduce" that is more mathematical and less about "size"; you can think of it as meaning that we've reduced the amount of ... |
null |
Given a [partial order][1] on the set $A$ such that:
1. $A=Z$, and $a$ $R$ $b$ if and only if $a = 2b$
2. $A=Z$, and $a$ $R$ $b$ if and only if $a^2|b$
A partial order is reflexive, antisymmetric and transitive.
Would someone help me understand?
[1]: http://en.wikipedia.org/wiki/Partially_ordered_set |
null |
Consider the family of grammars $G_n,~n\geq2$.
$$S \rightarrow A_ib_i~,~for~~1\leq i \leq n$$
$$A_i \rightarrow a_jA_i~|~a_j~,~for~~1 \leq i,j \leq n~~and~~i \neq j$$
where multiple alternative right sides result from different values of i,j
while the terminal symbols $a_i$ and $b_i$ are not necessarily differe... |
Parsing family of grammars, determine if LR(k) |
|compilers|parsing| |
Are the relations $R_1$ and $R_2$ defined on the set $\mathbb{Z}$ of integers partial orders? (A partial order is reflexive, antisymmetric and transitive.)
1. $a$ $R_1$ $b$ if and only if $a = 2b$
2. $a$ $R_2$ $b$ if and only if $a^2|b$
Would someone help me understand?
[1]: http://en.wikipedia.org/... |
Are these two relations on integers partial orders? |
The X of 2 languages is assigned as:
A word is in X(A1, A2) if it is in neither A1, A2
If A1 and A2 are regular how can we show that X(A1,A2) is also regular? |
Show a language is regular |
|regular-languages| |
Expanding on Zach's comment, you (*should*) know the following things:
1. If $L_{1}$ and $L_{2}$ are regular languages, then $L_{1} \cup L_{2}$ is a regular language.
2. If $L_{1}$ and $L_{2}$ are regular languages, then $L_{1} \cap L_{2}$ is a regular language.
3. If $L_{1}$ and $L_{2}$ are regular languages, the... |
There are several ways to show that a language is regular (check the question [How to prove a language is regular?](http://cs.stackexchange.com/questions/1331/how-to-prove-a-language-is-regular))
Specifically for the language in your question, start with DFAs for $A1$ and $A2$ and try to construct an NFA for $X(A1,A... |
null |
Are the following relations $R_1$ and $R_2$ defined on the set $\mathbb{Z}$ of integers partial orders? (A partial order is reflexive, antisymmetric and transitive.)
1. $a$ $R_1$ $b$ if and only if $a = 2b$.
2. $a$ $R_2$ $b$ if and only if $a^2|b$.
Would someone help me understand?
[1]: http://en.wik... |
|algorithms|data-structures|heaps| |
|formal-languages|automata|context-free|pushdown-automata| |
Construct a PDA for the complement of $a^nb^nc^n$ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.