Solution of discrete time state space equations