# Urgently need help in graph connectivity programming!

**URL:** <https://forum.kirupa.com/t/urgently-need-help-in-graph-connectivity-programming/270302>\
**Category:** Uncategorized\
**Created:** [September 8, 2008, 3:40pm UTC](https://forum.kirupa.com/t/urgently-need-help-in-graph-connectivity-programming/270302 "2008-09-08T15:40:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kl88](https://avatars.discourse-cdn.com/v4/letter/k/c77e96/32.png) [@kl88](https://forum.kirupa.com/u/kl88)\
**Post date:** [September 8, 2008, 3:40pm UTC](https://forum.kirupa.com/t/urgently-need-help-in-graph-connectivity-programming/270302/1 "2008-09-08T15:40:26Z")

</div>

can anyone help me in graph connectivity programming??  
i have no idea on how to do it!!!

**Topic 4: Problem Description: Graph’s Connectivity**

In mathematics and computer science a graph is a set of objects called _points_, _nodes_, or _vertices_ connected by links called _lines_ or _edges_. A link between two nodes indicates that the nodes are neighbours of each other. This program will determine whether a randomly generated graph is fully connected.  
\*\*[FONT=&quot]Input:[/FONT] [FONT=&quot]Maximum dimensions of an area (Xmax, Ymax), Number of nodes N, and distance D.[/FONT] \*\*

**[FONT=&quot]Program function: [/FONT]**

[LIST]  
[_]Each node has a unique numeric identifier, which should be in the range from 0 to N-1.  
[_]Distribute the nodes in the given area randomly, such that each node has a position (x, y).  
[_]Each node is considered a neighbour to another node if the distance between them is less than D.  
[_]Determine if the graph is considered fully connected. A graph is considered fully connected if there exists a path between every pair of nodes in the graph.  
[/LIST]  
**[FONT=&quot]Output:[/FONT]**

[LIST]  
[\*]Print the coordinates for each of the nodes to a text file. The text file must be in the following format:  
[/LIST]  
\<Node ID\> \<X\> \<Y\>. For example,  
0 3.22 4.22  
1 1.45 2.34  
2 2.42 4.23

[LIST]  
[\*]Print a statement to indicate whether the graph is fully connected.  
[/LIST]

\*\*Hints: \*\*

[LIST]  
[_]Use array for graph implementation  
[_]Google keywords: breadth-first search and depth-first search.  
[/LIST]
