To efficiently manage the sensor networks the topology of the entire network has to be discovered by the monitoring node. In this paper a topology discovery algorithm for sensor networks has been described. The algorithm finds a set of distinguished nodes, using whose neighborhood information the approximate topology of the network is constructed. Only these distinguished nodes reply back to the topology discovery probes. These nodes logically organize the network in the form of clusters comprising nodes in their neighborhood. Topology discovery algorithms form a tree of clusters rooted at the monitoring node, which initiates the topology discovery process. This organization is used for efficient data dissemination and aggregation, duty cycle assignment and fault tolerance of the network system. Duty cycle assignment has been discussed in this paper so that it is clearly defined how a packet of information is transmitted between a pair of clusters. In this case, a set of nodes in each cluster is selected for the communication between each pair of clusters and the mechanisms to select these nodes in an efficient way have been discussed in this paper. The mechanisms proposed in this paper are highly scalable and completely distributed; thus highly applicable to sensor networks.