Im writting an algorithm to compare travel trips. A trip is a combination of a 1) flight and 2) an accommodation. For now I´m only looking at the prices. I want to find the "best" trip based upon the price. The problem is that the flight price is a static value which doesn´t increase by the amount of nights you spend. Vise versa the accommodation price does increases each time the amount of nights increases.

image to illustrate the problem

Obviously formulas like those might solve the question but they dont:

q = flight_price+accommodation_price --> short trips are favored
q = (flight_price+accommodation_price)/nights ---> long trips are favored

So what would be an appropriate indicator to say that a trip is "better"? This indicator doesn´t need to provide a "real" price. It should rather give a value to compare the trips and put them in relation. Thank you.

New contributor
tyler is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

put on hold as off-topic by Ben McKay, Alexey Ustinov, RP_, Tom De Medts, Gerry Myerson May 16 at 13:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about research level mathematics within the scope defined in the help center." – Ben McKay, Alexey Ustinov, RP_, Tom De Medts, Gerry Myerson
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ whats the reason for downvoting? $\endgroup$ – tyler May 16 at 11:53
  • $\begingroup$ Did you look around this site at all before you posted your question, tyler? Did you get any feeling for the kind of question we entertain on this site? $\endgroup$ – Gerry Myerson May 16 at 13:07
  • $\begingroup$ Sorry but I did not find a forum which covers "easy" mathematical problems. if this question is way below the standards of this site and your knowledge why not simply help with the solution instead of downvoting it. $\endgroup$ – tyler May 16 at 13:51
  • $\begingroup$ Sure, tyler, I could do that. I could also come around and cut up your meat into little pieces for you. Anything else I can do to help you? You asked for the reason for downvoting; I gave you the reason; let me know when you're ready to thank me. $\endgroup$ – Gerry Myerson May 16 at 22:05

Browse other questions tagged or ask your own question.