3 3 votes Consider a graph where vertex having number 2 to 12 (including 2 and 12), there is an edge between two vertex x and y iff x divides y Find number of strongly connected components Graph Theory iiith-pgee graph-theory connected-components + – Tesla! 2.5k views answer comment Share Follow Print See all 13 Comments 13 13 Comments reply Show 10 previous comments Mk Utkarsh commented Apr 17, 2018 reply Follow flag there is an edge between two vertex x and y iff x divides y there is an edge between 2 and 12 iff 2 divides 12. how are we assuming that it is a digraph? also how are we assuming that there is an edge from 2 to 12 and not 12 to 2? 0 0 replyShare Tesla! commented Apr 17, 2018 reply Follow flag @ Mk Utkarsh in the undirected graph, there is no concept of SCC so it's logical to assume graph is directed, otherwise there is an edge between two vertex x and y iff x divides y don't make any logic. and it changes relation from x divide y to "x is factor of y and y is multiple of x 0 0 replyShare Mk Utkarsh commented Apr 17, 2018 reply Follow flag ok but still i find question a bit ambiguous. 0 0 replyShare Please log in or register to add a comment.
Best answer 1 1 vote A graph G is strongly connected if for all u, v there is a path from u to v and a path from v to u. The strong components of a digraph are the maximally strong connected subgraphs Suppose two vertices x and y , y(suppose 12) is divisivle by x(suppose 2) x(2)-------->y(12) But from y(12) we cannot reach x(2) as 2 is not divisible by 12. So, all the vertices are strongly connected components. Answer should be 11. Sandy Sharma answered Apr 13, 2018 • selected Apr 13, 2018 by Tesla! Sandy Sharma comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote Correct. For example, if 6 is divisible by 3, then 3 will not be divisible by 6 and so there won't be any cycle in the graph. And so each node itself will be strongly connected and so answer will be 11. Supriya Priyadarshan answered Mar 30, 2018 • edited Apr 13, 2018 by Supriya Priyadarshan Supriya Priyadarshan comment Share Follow See 1 comment 1 1 comment reply Sandy Sharma commented Apr 13, 2018 i edited by Sandy Sharma Apr 13, 2018 reply Follow flag @ edited check the new answer. 0 0 replyShare Please log in or register to add a comment.
0 0 votes I think it is 0, since an edge can only be present from a lower number to a higher number, hence the lower vertices cannot be reached from higher ones. So each vertex will be a component. Any thoughts? Praveen Starry answered Apr 4, 2018 Praveen Starry comment Share Follow See all 2 Comments 2 2 Comments reply BhaviD commented Apr 13, 2018 reply Follow flag The answer should be 11. Take any two vertices v1 and v2, if v1 can reach v2, v2 can not reach v1. So, all the vertices are strongly connected components. 1 1 replyShare Praveen Starry commented Apr 14, 2018 reply Follow flag Yeah, agree with you. It should be 11 0 0 replyShare Please log in or register to add a comment.