How to Determine Cheapest Commute Ticket Combination
问题 My local train service recently added an option for dialy commute. I am trying to determine the algorithm for finding the cheapest combination of tickets for a given set of round trips on given days. Here is the problem in english. Given a set of days and and rides per day what combination of the following is the cheapest. A round trip ticket at cost w per round trip. A 7 day ticket at cost x for unlimited rides during 7 consecutive calendar days. A 30 day ticket at cost y for unlimited rides