Implement state difference computation