How to guarantee the connective of ad-hoc networks is an important work in the learning of wireless sensor networks. In this paper, based on a log-normal shadow fading model which takes into account statistical variations of the radio signal power around its mean value, and by using the condition transition matrix of Markov chain and the log-normal shadow fading model, a minimum nodes density algorithm is proposed to get the minimum node density to ensure the connective of wireless sensor networks. The probability of signal transmit between an arbitrary pair of sensor nodes can be obtained by using the one-step transition probability matrix. So the minimum node density to ensure the connective of networks can be got by letting the probability of signal transmitting between an arbitrary pair of sensor nodes approach one. Compared with other algorithms like R.HEKMAT algorithm, simulation results show that the proposed approach can reduce the error of the numerical examples. So that the identical degree of the results of the minimum nodes density algorithm and the experimental data is improved.