Deformable image registration poses a highly non-convex optimisation problem. Conventionally, medical image registration techniques rely on continuous optimisation, which is prone to local minima. Recent advances in the mathematics and new programming methods enable these disadvantages to be overcome using discrete optimisation. In this paper, we present a new technique deeds, which employs a discrete dense displacement sampling for the deformable registration of high resolution CT volumes. The image grid is represented as a minimum spanning tree. Given these constraints a global optimum of the cost function can be found efficiently using dynamic programming, which enforces the smoothness of the deformations. Experimental results demonstrate the advantages of deeds: the registration error for the challenging registration of inhale and exhale pulmonary CT scans is significantly lower than for two state-of-the-art registration techniques, especially in the presence of large deformations and sliding motion at lung surfaces.