[algogeeks] graph theory library?

2012-07-28 Thread Hatta
is there an ANSI (either C or C++) library around that implements common graph algorithms? any pointer is appreciated. thanks in advance. -- Hatta -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge

[algogeeks] Graph problem - find all cut vertex

2012-03-11 Thread atul007
how to find all cut vertexes in a given graph ?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroup

[algogeeks] Graph problem - cut vertex

2012-03-10 Thread atul anand
how to find all cut vertexes in a given graph ?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroup

Re: [algogeeks] graph

2011-08-31 Thread mohit verma
@mac - yeah you were right. Normally we number the vertices and forget about their co-ordinates in programming :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe

Re: [algogeeks] graph

2011-08-31 Thread Jay Mahadeokar
Hi, You can construct a BFS tree. Then if there are two non-tree edges with a common vertex, I think there will be a nested loop at that vertex. There might not be any common edges in the nested loop too. I hope this makes sense. On Wed, Aug 31, 2011 at 10:51 PM, MAC wrote: > @mohit : i disagr

Re: [algogeeks] graph

2011-08-31 Thread MAC
@mohit : i disagree.. precisely bcoz of the reason you cited we can only check common nodes between cycles and nothing else .. please correct me if i am wrong On Wed, Aug 31, 2011 at 9:34 PM, mohit verma wrote: > @ MAC , i think it was not right to inspect common nodes in different > cycles. > >

Re: [algogeeks] graph

2011-08-31 Thread mohit verma
@ MAC , i think it was not right to inspect common nodes in different cycles. say in the above picture the two inner nodes of inner cycle are out side the bigger cycle (towards A) then co-ordinates of the inner cycle will change and no cycle nested but having common nodes. On Wed, Aug 31, 2011

Re: [algogeeks] graph

2011-08-31 Thread MAC
it was loops sharing common edges ,, (i said find all cycles and see if there is some cycles having coomon nodes between them and he was not happy ) On Wed, Aug 31, 2011 at 8:54 PM, Piyush Grover wrote: > loop within a loop, what exactly that means?? > Nee to consider the planarity or two loop

Re: [algogeeks] graph

2011-08-31 Thread Piyush Grover
loop within a loop, what exactly that means?? Nee to consider the planarity or two loops sharing common edge/s?? On Wed, Aug 31, 2011 at 8:46 PM, MAC wrote: > Q The question asked in interview of a startup : suppose you have a graph > as shown bellow : please see the attachment . The red dots

[algogeeks] graph

2011-08-31 Thread MAC
Q The question asked in interview of a startup : suppose you have a graph as shown bellow : please see the attachment . The red dots are graph vertexes ( you can see 1 vertex alone , aloof ) so you can see there are 2 cycles one inside another . How will you find such a scenario in a graph i.e. a

Re: [algogeeks] Graph Based Problems

2011-07-26 Thread aditya kumar
all graph problem need not use tree . most of them can be implemented using array . On Tue, Jul 26, 2011 at 3:11 PM, Dipankar Patro wrote: > Love your idea Navneet, but I have seen in general that Graph algos are > difficult to convert into code (at least for me!) May be that's the reason > why

Re: [algogeeks] Graph Based Problems

2011-07-26 Thread Dipankar Patro
Love your idea Navneet, but I have seen in general that Graph algos are difficult to convert into code (at least for me!) May be that's the reason why people are not discussing it here. But like you pointed out we could at least point the scenarios where graph algos can be applied. Looking forward

[algogeeks] Graph Based Problems

2011-07-25 Thread Navneet Gupta
Hello folks, I have seen some of the best possible string/array/tree based problems being discussed on this thread but somehow i feel this group has been little partial towards Graph problems. Though, in most cases, interviewers don't ask Graph algorithms, but we, as algo lovers, should give due

[algogeeks] Graph Theory+ DP

2011-01-21 Thread tillegomezz
Given a distribution of packages on media and a list of dependences between packages, you have to calculate the minimal number of media changes required to install all packages. For your convenience, you may assume that the operating system comes on exactly 2 DVDs. http://www.spoj.pl/problems/ALL/

[algogeeks] Graph Theory Problem

2010-11-04 Thread khaled
I have the following graph problem. I would appreciate if some graph theory expert points me to what is the scientific name under which it is known in graph theory. Given a directed graph G=(V,E,W) where W is the weights of the edges. I would like to divide the graph into subgraphs G_i=(V_i, E_i,

[algogeeks] Graph Isomorphism

2010-08-27 Thread Mithun
Hi, I have to write a program in c or cpp to check whether 2 given graphs(given in adjacency matrix or list) are isomorphic.. Could any please help me? I am not worried about the running time..So even the heuristic approach will do.. Thanks Mithun -- You received this message because you are su

Re: [algogeeks] Graph

2010-07-22 Thread jalaj jaiswal
do dfs on graph and then do dfs on transpose of the graph(just reverse the edges that is transpose) in order of decreasing order of finishing time of vertices. the number of vertices you need to apply dfs on second time will be number of strongly connected components. On Mon, Jul 19, 2010 at 6:44

[algogeeks] Graph

2010-07-21 Thread Piyush Verma
how to find strongly connected components in a graph? plz explain the method of DFS of G and DFS of complement of G and how second DFS is related to first. give any other idea if anyone has -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group

Re: [algogeeks] graph

2010-07-12 Thread Amir hossein Shahriari
your 1st Q: for each vertex run a dfs and count the number of vertices it can reach O( V^2 + VE ) another solution would be using an algorithm similar to floyd-warshal O(V^3) a[src][dest] is true if there is an edge src->dest for (k=0;khttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] graph

2010-07-12 Thread ashish agarwal
@anand ..can you explain it more with example On Mon, Jul 12, 2010 at 10:19 AM, Anand wrote: > topological sort would cover every vertex once. The path given by > Topological sort would be the answer. We can also calculate the vertices > given by topological sort and compare it with given vertic

Re: [algogeeks] graph

2010-07-12 Thread Anand
topological sort would cover every vertex once. The path given by Topological sort would be the answer. We can also calculate the vertices given by topological sort and compare it with given vertices. if it is same then graph G does contain a directed path that touches every vertex exactly once. O

[algogeeks] graph

2010-07-12 Thread Love-143
Give a linear-time algorithm for the following task. Input: : A directed acyclic graph G (V,E) Question: Does G contain a directed path that touches every vertex exactly once? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this g

[algogeeks] graph

2010-07-12 Thread Love-143
1.Give an efficient algorithm which takes as input a directed graph G = (V,E), and determines whether or not there is a vertex s is in V from which all other vertices are reachable.? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to

Re: [algogeeks] graph:

2010-07-11 Thread jalaj jaiswal
yeah secod part will be in n^2*k On Sun, Jul 11, 2010 at 9:36 AM, sharad kumar wrote: > how to do second part > it requires log k matrix multiplication > thus o(n3 log n) > plzz xplain > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group

Re: [algogeeks] graph:

2010-07-10 Thread sharad kumar
how to do second part it requires log k matrix multiplication thus o(n3 log n) plzz xplain -- 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, se

Re: [algogeeks] graph:

2010-07-10 Thread sharad kumar
an adjacency matrix On Sun, Jul 11, 2010 at 8:45 AM, sharad wrote: > 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 pa

[algogeeks] graph:

2010-07-10 Thread sharad
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 for

[algogeeks] graph

2010-06-27 Thread sharad kumar
How many vertices are required to obtain 1024 unique undirected graphs. Find out the no. of vertices in a graph given the graph is: a) Undirected cyclic b) Directed Cyclic c) Undirected non cyclic d) Directed non cyclic. The graph can be disconnected. -- You received this message because you are

Re: [algogeeks] Graph MST problem

2010-04-04 Thread Rohit Saraf
a) Consider green 1 red 1 | | green 2 | | *imagine diagonals* with red 500 and red 2. Could not explain better without diagram... hope it's clear b) Make a spanning tree of

[algogeeks] Graph MST problem

2010-04-03 Thread shruti s
Hi, Please help me to solve following problems Let *G *= (*V; E;w*) be a weighted undirected graph whose edges are colored either red or green. That is *E *= *Er [ Eg *and *Er \ Eg *= *;*, where *Er *are the red edges and *Eg *are the green edges. Assume that all edge weights are distinct (so

[algogeeks] Graph Limited Flow !

2009-09-19 Thread MrM
there is a graph, consisting of N Vertices and some Edges ! each Vertex has a Capacity(for storing Beads), and Capacity of 1st and N-th Vertex is infinite ! there are M Beads in the first Vertex, and we want to move this M Beads to the N-th Vertex with the minimum number of steps ! in each step, w

[algogeeks] Graph theoretic problem

2008-02-04 Thread robin
Hello I came across the following problem which i am unable to solve : Given a Graph G. we have to find the minimum number of vertices that should be colored so that each vertex is either colored or has a neighbouring vertex which is colored. Please help --~--~-~--~~~--

[algogeeks] Graph coloring (RLF and DSATUR)

2007-12-07 Thread Lukas Ĺ alkauskas
Hello, I need to create an software which analyzes these two algorithms. Maybe anyone knows where I can find RLF and DSATUR algo pseudocode? or full description. I can't find nothing about DSATUR algo. for RLF I try to implement this algo: > procedure ColorByRLF(); > var > clr

[algogeeks] Graph problem

2007-11-29 Thread John
Given a DAG and two vertices s and t , give a linear time number of paths between s and t in G. How does topological sort help in finding the same ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks"

[algogeeks] Graph coloring algos.

2007-10-22 Thread Lukas Ĺ alkauskas
I need experimentally compare RLF and DSATUR graph coloring heuristics algorithms. Maybe anyone have some information, or maybe some optimized peas of code ? :) Lukas. -- You can contact me by : Google Talk: [EMAIL PROTECTED] Skype: halfas.online.now IRC: HalFas` (irc2.omnitel.net)

[algogeeks] graph problem

2007-08-31 Thread mirchi
can anyone explain me how to find the diameter of a graph using dyanamic programming ? thanks in advance... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email

[algogeeks] graph theory

2007-06-20 Thread mirchi
can anyone please tell me how to find single source longest path in a directed acyclic graph?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@

[algogeeks] graph problem : i need help

2007-05-20 Thread mirchi
i am attempting to solve http://acm.uva.es/p/v1/125.html i am giving my code below : the feedback is wrong answer.. i am unable to spot the error.. pls help me.. thanx in advance ! #include #include #define G 1 #define W 0 int func(int i,int j,int **graph,int **out,int *visited,int max); void in

[algogeeks] Graph Problem

2007-05-16 Thread pramod
Here's a graph problem. We are given a directed graph. We are allowed to change the directions of the edges. Our aim is to minimize the maximum degree in the graph. How do we achieve this? One way is to take the vertex with maximum degree, and take another vertex with least degree reachable from

[algogeeks] Graph Partitioning

2006-11-12 Thread Karthik Singaram L
Hi, I have been faced with this problem for weeks and could not find a good solution. can someone help? Given a graph whose nodes are bit vectors of length "n" (the graph contains all 2^n nodes), the edges are defined to be connecting all the pairs of nodes which differ only at one bit positi

[algogeeks] graph 3 interconnected

2006-10-22 Thread alpaul
hello all I have assignment of my I come up with the idea of 3 graphs which inter connected. following is: the robot is able to guide people around the cities, he will tell you how to go from one place to the other places according to some condition or constraint. 1- each place will assign

[algogeeks] Graph Theory

2006-04-19 Thread Byte_Me
Hi everyone. I would like to know if there are any online tutorials available for learning graph theory and its applications in the world of theoretical computer science and algorithms. Can you also suggest some books that I might find useful? Let me also add that i am not really a CS major --~-

[algogeeks] Graph optimization

2006-02-24 Thread Amol
I am working on an interesting graph optimization problem and I would like to have a few expert opinions for helping me with a solution. So here goes ... I have a black box with a complex internal circuitry that is represented in the form of a graph. I have to abstract the graph by reducing the