>
>
> QUESTION : input a number C , an output all of the ways that a group
> of ascending positive numbers can be summed to give C. for e.g if
> C=6,the output should be
> 1+2+3
> 1+5
> 2+4
> [solve using dynamic programming]
>
> please tell me about this..d
>
--
You received this message becaus
wouldn't a modified dijkstra do the trick??
On 4/2/11, Tech id wrote:
> Given a directed graph G, with V vertices and E edges. Each edge in E
> is associated with a real number ‘r’,a reliabilty factor with r
> between 0(exclusive) and 1(inclusive). You are also given a pair of
> nodes u and v. Fi
Given a directed graph G, with V vertices and E edges. Each edge in E
is associated with a real number ‘r’,a reliabilty factor with r
between 0(exclusive) and 1(inclusive). You are also given a pair of
nodes u and v. Find the most reliable path in the given graph from u
to v.
Input will be the grap
the longest one among all vertice pairs' shortest paths.
On Mon, Sep 6, 2010 at 11:09 AM, Yan Wang wrote:
> graph diameter?
>
> On Mon, Sep 6, 2010 at 6:34 AM, Maria wrote:
>> In a DAG, print the maximal paths
>> Can any one help me out with this question...?
>> I don seem to understand the
graph diameter?
On Mon, Sep 6, 2010 at 6:34 AM, Maria wrote:
> In a DAG, print the maximal paths
> Can any one help me out with this question...?
> I don seem to understand the question itself...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm
In a DAG, print the maximal paths
Can any one help me out with this question...?
I don seem to understand the question itself...
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.c
if adjacency matrix is given then try to check if adj[i][j]==1 and
adj[j][i]==1
On Sat, Jul 10, 2010 at 9:24 AM, Amit Jaspal wrote:
> @ jalaj
> consider a graph
>
> 2->1
> 3->1
> 2->3
>
> apply dfs(1) n dfs(2)...
> will give u 2 components although GRAPH is connected
>
>
> On Fri, Jul 9, 2010
@ jalaj
consider a graph
2->1
3->1
2->3
apply dfs(1) n dfs(2)...
will give u 2 components although GRAPH is connected
On Fri, Jul 9, 2010 at 10:23 PM, jalaj jaiswal wrote:
>
> int count=0;
> for every vertex v{
> if visited[v]==0
> dfs(v)
> count++;
> }
> count
int count=0;
for every vertex v{
if visited[v]==0
dfs(v)
count++;
}
count is the number of components in graph or m i missing something
?
On Fri, Jul 9, 2010 at 9:23 PM, amit wrote:
> How to check if a directed graph is connected.
>
> --
> You received this
How to check if a directed graph is connected.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.
i would prepare the transitivity matrix while inserting the edge into the
matrix
the search then would be a O(1)
Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652
On Sun, Jul 4, 2010 at 3:15 PM, jalaj jaiswal wrote:
> A graph is given. You need to
A graph is given. You need to design a data structure with minimum space
complexity such that it does the follows
--> Finds whether nodes u and v have a path in between them in O(1) time.
--> Finds whether there is a path of length k between u and v in O(k) time.
The same data structure to be used
12 matches
Mail list logo