DP and Flow Relationship Formula for Line