Compare trips based upon price

  • MHB
  • Thread starter tylerdurdan
  • Start date
  • Tags
    Compare
In summary: Your Name]In summary, the conversation discussed an algorithm for comparing travel trips based on price. The issue of favoring shorter or longer trips due to the static flight price and increasing accommodation price was raised. Possible solutions included using a cost per day or cost per distance metric, and considering a combination of factors to determine the best trip based on individual preferences.
  • #1
tylerdurdan
1
0
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.

View attachment 8985

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.
 

Attachments

  • na6FF.jpg
    na6FF.jpg
    17 KB · Views: 57
Mathematics news on Phys.org
  • #2


Hi there,

Thank you for sharing your algorithm and question with the forum. It seems like you have identified an important issue in trying to compare travel trips based on price. As you mentioned, using a simple formula like adding the flight and accommodation prices may favor shorter trips, while dividing by the number of nights may favor longer trips.

One possible solution to this problem could be to use a cost per day metric. This would involve dividing the total cost of the trip (flight + accommodation) by the number of nights in the trip. This way, both the flight and accommodation costs are taken into account, but the length of the trip is also factored in. This metric could then be used to compare trips and determine which one is "better" in terms of cost.

Another option could be to use a cost per distance metric. This would involve dividing the total cost of the trip by the distance traveled (in miles or kilometers). This could be a useful metric for comparing trips that involve different modes of transportation, such as flights, trains, or car rentals. However, this metric may not be as relevant for comparing trips that involve only a flight and accommodation.

Ultimately, the best indicator for determining the "best" trip may depend on the specific goals and preferences of the traveler. For example, some travelers may prioritize finding the lowest overall cost, while others may be willing to pay more for a shorter or more convenient trip. It may be helpful to consider a combination of metrics and factors, such as cost, distance, duration, and convenience, to determine the best trip for a given individual.

I hope this provides some helpful insights for your algorithm. Best of luck in your research!
 

1. How do you compare trips based upon price?

To compare trips based upon price, you would need to gather the prices of each trip you are considering and then analyze and compare them. This can be done by creating a spreadsheet or using a comparison website.

2. What factors should be considered when comparing trips based upon price?

When comparing trips based upon price, it is important to consider factors such as the cost of transportation, accommodations, food, activities, and any additional fees or taxes. It is also important to consider the duration of the trip and the overall value for the price.

3. Is it better to choose the cheapest trip or the one with the best value?

This depends on your personal preferences and budget. The cheapest trip may not always be the best option as it may have hidden fees or lack certain amenities. It is important to consider the overall value for the price and choose the trip that best fits your needs and budget.

4. How can I find the best deals when comparing trips based upon price?

To find the best deals when comparing trips based upon price, you can use comparison websites, sign up for newsletters or alerts from travel companies, and be flexible with your travel dates and destinations. It is also helpful to research and compare prices from different sources.

5. Are there any hidden costs to watch out for when comparing trips based upon price?

Yes, there can be hidden costs when comparing trips based upon price. These can include additional fees for baggage, transportation to and from the airport, resort fees, and taxes. It is important to carefully read the fine print and factor in all potential costs when comparing trips based upon price.

Similar threads

  • Programming and Computer Science
Replies
6
Views
2K
Replies
13
Views
9K
  • Aerospace Engineering
Replies
2
Views
7K
Replies
1
Views
1K
Replies
6
Views
8K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Other Physics Topics
Replies
2
Views
3K
  • Materials and Chemical Engineering
Replies
2
Views
6K
Back
Top