Wireless sensor networks (WSNs) are resource-scarce networks and the optimization of the resources is challenging. As far as random deployment is concerned, the optimization of these resources becomes even more difficult In this paper, a novel framework is proposed for solving optimal deployment problems for randomly deployed and clustered WSNs. In several existing approaches to solve these problems, either only partial-coverage is considered or only connectivity is analyzed when full-coverage is assured. Through this study, we aim to contribute to the better understanding of partial connected coverage. For this purpose, we introduce cluster size formulations which provide network designers with estimating partial-coverage easily. While the proposed framework facilitates our cluster size formulations for coverage estimations, it also adopts the percolation theory to analyze the degree of connectivity when the targeted degree of partial-coverage is achieved. As the partial connected coverage approach reflects real-life deployment scenarios, the use of percolation theory results in generic solutions of optimal deployment problems, which indeed makes the solution independent from any routing algorithms. Moreover, a practical optimal deployment problem is formulated to find the cheapest WSN application that satisfies the targeted degree of partial connected coverage. Further, in this paper, the cost effectiveness of the node heterogeneity is investigated through comparing the heterogeneous WSNs with their homogeneous counterparts. (C) 2014 Elsevier Ltd. All rights reserved.