Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Finding strongly connected components in a graph


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
20 replies to this topic

#1 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 07:09 PM

stronglyConnected_zps8c6a6999.png

 

The answers listed strongly connected components in this graph. But the textbook said a strongly connected component is a strongly connected subgraph of the directed graph but not contained in larger strongly connected subgraphs.

 

I do not see how the subgraph of this graph is strongly connected because the textbook said strongly connected means there is a path from vertices a to b. But there is no such thing because the directed edges clearly shows that.


Edited by warnexus, 29 October 2013 - 07:09 PM.


Sponsor:

#2 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 07:17 PM

Strongly connected means if you can go from A->B you can also go from B->A? (EDIT: That doesn't mean you can go from A to B and vice versa in one hop. one way systems would suck then ;) )

 

The graphs don't have to be connected in that case. You can have 2 or more subgraphs which aren't connected. Disjointed graphs are fine.

 

EDIT2: I think it means you get rid of dead ends.


Edited by Paradigm Shifter, 29 October 2013 - 07:25 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#3 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 07:26 PM

Strongly connected means if you can go from A->B you can also go from B->A? (EDIT: That doesn't mean you can go from A to B and vice versa in one hop. one way systems would suck then ;) )

 

The graphs don't have to be connected in that case. You can have 2 or more subgraphs which aren't connected. Disjointed graphs are fine.

I'm a bit confused when the textbook says A to B are they saying A is the initial vertex and B is the terminal vertex? Or is A, a vertex labeled A and B, a vertex labeled B?


Edited by warnexus, 29 October 2013 - 07:27 PM.


#4 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 07:32 PM

It means any 2 vertices (could even be the same vertex, unless implicitly stated this is disallowed). Don't be confused by "if you can get from A to B" thinking the meaning is "you can get from vertex "a" to vertex "b"".

 

Maths books hardly ever have numbers in them, they generalise.

 

In that graph you can go from a to b and vice versa though ;) - just follow the arrows between them.

 

EDIT: In the graph you posted, vertex "e" is a dead end so isn't strongly connected to the others, if I am correct in my guess at what strongly connected means. I'm not sure whether the strongly connected components are

 

{e} and G\{e}

 

or

 

{e} and G

 

(where G is the entire graph).


Edited by Paradigm Shifter, 29 October 2013 - 07:39 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#5 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 07:38 PM

It means any 2 vertices (could even be the same vertex, unless implicitly stated this is disallowed). Don't be confused by "if you can get from A to B" thinking the meaning is "you can get from vertex "a" to vertex "b"".

 

Maths books hardly ever have numbers in them, they generalise.

 

In that graph you can go from a to b and vice versa though ;) - just follow the arrows between them.

Yeah, it does go from vertex "a" to vertex "b" and vice-versa. which means it is strongly connected which would mean it is a strongly connected component. But the textbook did not list that as an answer.



#6 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 07:42 PM

Ok well see my edit, the answer is either

 

{e} and G\{e}

 

or

 

{e} and G,

 

depending on the definition, which I'm too lazy too google (6th beer).


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#7 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 07:45 PM

Ok well see my edit, the answer is either

 

{e} and G\{e}

 

or

 

{e} and G,

 

depending on the definition, which I'm too lazy too google (6th beer).

the strongly connected components are {a, b, f }, {c, d, e}.

 

I am using Rosens' textbook.



#8 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 07:51 PM

Mhmm ok, I can see now that once you go to vertex "c" you can never get back to {a, b, f}.

 

That's what it means then, in effect. Strongly connected means you can get from place to place but if you leave your neighbourhood and can never get back that is a new subgraph.

 

They are basically talking about dead ends and one way streets.

 

EDIT: I'm interested why {e} doesn't count on its own though? Once you get to {e} you are stuck...

 

EDIT2: I see you can get back to {c} from {e}. Ignore this drunkard ;) I guess we've both learned something today!


Edited by Paradigm Shifter, 29 October 2013 - 07:55 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#9 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 07:55 PM

Mhmm ok, I can see now that once you go to vertex "c" you can never get back to {a, b, f}.

 

That's what it means then, in effect. Strongly connected means you can get from place to place but if you leave your neighbourhood and can never get back that is a new subgraph.

 

They are basically talking about dead ends and one way streets.

 

EDIT: I'm interested why {e} doesn't count on its own though? Once you get to {e} you are stuck...

 

EDIT2: I see you can get back to {c} from {e}. Ignore this drunkard ;)

I am not sure what they mean by {a,b,f}

 

because once you go from vertex labeled a to vertex labeled b, after vertex b you cannot go to vertex f based off the graph.



#10 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 07:57 PM

Sure you can, you go b->a->f. Like I said, you don't have to do it in one hop.

 

EDIT: Mind blowing time! You don't even need to do it in a finite number of hops, probably ;)


Edited by Paradigm Shifter, 29 October 2013 - 08:00 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#11 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 08:02 PM

Sure you can, you go b->a->f. Like I said, you don't have to do it in one hop.

 

EDIT: Mind blowing time! You don't even need to do it in a finite number of hops, probably ;)

but they did not say b->a->f. would b->a->f be {b,a,f}?



#12 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 08:06 PM

{b, a, f}, b->a->f, whatever dude!

 

If you at b, you can get to a or f! No problem! If you at a, you can go to b or f! If you at f, you can go to a or b! Eventually!

 

Once you go to {c} (EDIT: or {d} or {e}) though you ain't showing your face in the {a, b, f} neighbourhood and better stick to {c, d, e}.

 

Street math 101


Edited by Paradigm Shifter, 29 October 2013 - 08:07 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#13 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 08:10 PM


EDIT2: I see you can get back to {c} from {e}. Ignore this drunkard ;) I guess we've both learned something today!
 

 

{b, a, f}, b->a->f, whatever dude!

 

If you at b, you can get to a or f! No problem! If you at a, you can go to b or f! If you at f, you can go to a or b! Eventually!

 

Once you go to {c} (EDIT: or {d} or {e}) though you ain't showing your face in the {a, b, f} neighbourhood and better stick to {c, d, e}.

 

Street math 101

Oh I see! I think I should think of streets and dead-ends like you stated before! It certainly does make it easier to understand now. Thanks Paradigm!

 

Haha! I'm glad this post refreshen your thoughts on strongly connected components!


Edited by warnexus, 29 October 2013 - 08:11 PM.


#14 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 08:14 PM

OK. Now prove they divide the graph into disjoint subsets, or something ;)

 

Not really related to games, although opening doors for pathfinding seems somehow connected...

 

EDIT: Another problem with maths is they've heavily overloaded (in the C++/OOP way) words like "simple", "strongly", "fundamental", "connected" and "number".


Edited by Paradigm Shifter, 29 October 2013 - 08:18 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#15 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 08:29 PM

OK. Now prove they divide the graph into disjoint subsets, or something ;)

 

Not really related to games, although opening doors for pathfinding seems somehow connected...

 

EDIT: Another problem with maths is they've heavily overloaded (in the C++/OOP way) words like "simple", "strongly", "fundamental", "connected" and "number".

 

OK. Now prove they divide the graph into disjoint subsets, or something ;)

 

Not really related to games, although opening doors for pathfinding seems somehow connected...

 

EDIT: Another problem with maths is they've heavily overloaded (in the C++/OOP way) words like "simple", "strongly", "fundamental", "connected" and "number".

Yeah it is basically a lot of jargon to understand and really have a deep understanding of before the good stuff happens. I can understand that. CS is pretty about learning a new language to communicate new ideas.

 

Ah pathfinding that is interesting. I did remember pathfinding being in strategy games.Although there was a game review syaing how that game had horrible pathfinding. Does horrible pathfinding unnecessarily mean a "lack of understanding of graph theory"?

 

Well proving the graph can be divided to two disjoint sets can be done because each set has no common element from each other.


Edited by warnexus, 29 October 2013 - 08:30 PM.


#16 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 08:32 PM

Lack of stack space/time is probably the most limiting factor?

 

Or simplifications (e.g. assuming spherical cows and whatnot).


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#17 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 08:39 PM

Lack of stack space/time is probably the most limiting factor?

 

Or simplifications (e.g. assuming spherical cows and whatnot).

 I never knew there was such type of limitations. I am still a CS student. It sure is interesting to bear in mind about those things.



#18 Paradigm Shifter   Crossbones+   -  Reputation: 5638

Like
0Likes
Like

Posted 29 October 2013 - 08:44 PM

Well that's what tends to limit AI, you can't search an entire tree of 20 bazillion (rough estimate) nodes in real time, computers are not maths (where time is just another variable and an infinite set is fine).

 

Good convo though you'll go far!

 

Best go to bed now ;)


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#19 warnexus   Prime Members   -  Reputation: 1535

Like
0Likes
Like

Posted 29 October 2013 - 08:58 PM

Well that's what tends to limit AI, you can't search an entire tree of 20 bazillion (rough estimate) nodes in real time, computers are not maths (where time is just another variable and an infinite set is fine).

 

Good convo though you'll go far!

 

Best go to bed now ;)

Night. I still have to finish studying this last section for my midterm Midterm is tomorrow. This section was covered yesterday. Yeah awesome convo indeed. I will bear in mind about that for AI.


Edited by warnexus, 29 October 2013 - 08:59 PM.


#20 Álvaro   Crossbones+   -  Reputation: 16252

Like
0Likes
Like

Posted 30 October 2013 - 08:05 AM


K. Now prove they divide the graph into disjoint subsets, or something ;)

 

I never heard of strongly connected components before this post, but it sounds to me that, given a directed graph, you build an undirected graph whose nodes are the nodes of the original graph and where there is an edge joining A and B if and only if there is a path from A to be and there is a path from B to A. Now you compute the connected components of that graph. So of course they will divide the graph into disjoint subsets... Did I miss anything?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS