The aim of this study is to introduce Hamiltonian path to analyze functional connectivity of brain default mode networks (DMNs). Firstly, the brain DMNs in resting state are constructed with the employment of functional Magnetic Resonance Imaging (fMRI) data. Then, the Dijkstra algorithm is used to calculate the shortest path length of the node which represents each brain region, and the Hamiltonian path of the default network is solved through the improved adaptive ant colony algorithm. Finally, complex network analysis methods are introduced to discuss the node and network properties of brain functional connectivity in both normal subjects and stroke patients. The experimental result demonstrated that there are some significant differences in the properties of the DMNs between stroke patients and normal subjects, especially the length of Hamiltonian path. It also verifies the effectiveness on studying the functional connectivity of the brain DMNs by applying the proposed method of Hamiltonian path.