Analytical computation methods are proposed for evaluating the minimum dwell time and the average dwell time guaranteeing the asymptotic stability of a discrete-time switched linear system whose switchings are assumed to respect a given directed graph. The minimum and average dwell time can be found using the graph that governs the switchings, and the associated weights. This approach, which is used in a previous work for continuous-time systems having non-defective subsystems, has been adapted to discrete-time switched systems and generalized to allow defective subsystems. Moreover, we present a novel method to improve the dwell time estimation in the case of bimodal switched systems. In this method, scaling algorithms to minimize the condition number have been used to give better minimum dwell time and average dwell time estimates.