12 ms·
Ryanair, Hamiltonian Cycles, and using graph theory to find cheap flights
- catchmeifyoucan 8y agoGreat work, this is really cool! For multi city flights, I've found Google flights does things really well from a UX standpoint, and I believe they support Ryanair.
- shshhdhs 8y agoThey do support Ryanair, I’ve found great deals through it. Lots of other discount Euro airlines are unsupported though
- jd20 8y agoI'm surprised Ryanair is supported, given that they've been engaged in a long and nasty lawsuit with Expedia, over scraping their fares. I was under the impression Ryanair only wanted to sell fares through their own website.
- pintxo 8y agoIf I am not mistakne, one cannot book via Google Flights, they will send you to Ryanair for the booking. Would make it a different case than the Expedia one.
- scrollaway 8y agoWonder why Ryanair would insist on having the user go through their website. Seeing as they monetize absolutely fucking everything, I suspect there's a bunch of crap they're doing with user data…
- namdnay 8y agoIt's not related to data, it's related to direct vs indirect distribution. If you buy a ticket through a travel agency, such as expedia, they take a small cut, and the global distribution system takes another cut. If you book direct, they can keep that money :)
- thesimon 8y agoBecause they really want to push their other stuff. Transfers, rental cars and hotels is where the money is made.
- jayalpha 8y agoAre they? I don't think that Ryanair minds anyone showing the flights. There are enough sites doing it (Kiwi, swoodoo etc.). They just don't allow you to sell tickets or collect fees which is the reason why most sites don't list them.
- jnurmine 8y agoGoogle Flights is generally fine. But sometimes it figures out quite fringe stuff like Stockholm-Dublin roundtrip with a 17 hour layover in Dubai. It was not cheap either. Sounded like something like a global minima.
- bogomipz 8y ago>"Google Flights is generally fine. But sometimes it figures out quite fringe stuff like Stockholm-Dublin roundtrip with a 17 hour layover in Dubai." Honestly I regularly see these type of ridiculous options on all of the major travel sights as well as stuff like 3 and 4 layovers. Do you have any insight on why this happens or what such absurd results are even presented? I regularly see things like 54 hour travel time for for international flights.
- rexarex 8y agoThat’s awesome
- crikli 8y agoOff-topic but related: https://scottscheapflights.com https://scottscheapflights.com is _amazing_. The Premium sub is worth every penny...my wife and I will be doing a ton more overseas travel in 2019 purely because of the deals this site finds.
- brianbreslin 8y agoAlso off-topic, I would pay a premium for the deals to be pre-searched for my specific cities/dates. I already pay for scotts premium. But would pay even more if I was able to actually have it look at my calendar and see when I could go on these trips. I miss out on too many due to not being quick enough.
- chasefoto 8y agoI've had the same issue and have been building a tool to further filter and curate flight deals. Right now you can select departure airports and airlines. Date filtering will be coming next in the next 5-7 days if not sooner. https://producthunt.com/posts/altitude https://producthunt.com/posts/altitude
- aagha 8y agoI hope you don't mind the feedback: There's no way I'm signing up for a service that I don't get to try first. See what Scott's is doing: You get a 1/3 of the deals--this whets the appetite.
- daurnimator 8y agoSimilarly I use https://www.secretflying.com https://www.secretflying.com which has a bit more non-paywalled.
- thaumasiotes 8y agoFor a typical overseas trip, how does your (ordinary, non-discounted) airfare generally compare to your food and boarding expenses?
- abhisuri97 8y agoAs a CS student, I agree it is really refreshing to see basic graph algorithms to be used in a practical, non academic/industry context. I never really see these basic algorithms used in small side projects, so thank you for this!
- shoyer 8y agoThis article misses the most obvious way to visualize this graph: put it on a map!
- jonluca 8y agoI actually wanted to do that but thought the cost/benefit wasn't high enough - I'd pretty much need to manually place all the airports information on the map if I wanted to use the library I was using (Cytoscape). Visualizing the DFS at the last step was good enough :) Maybe in the future!
- ddalex 8y agoyou don't need to do that - just download https://openflights.org/data.html https://openflights.org/data.html, and plot airport x/y to airport lat/lon directly. Since you're doing only Europe, you don't need to do the sin/cos math do get an accurate projection
- blackdogie 8y agoA nice handy tool. It would be great if the airline added this themselves for finding route. Great work
- warp_factor 8y agoback when I was a student, I would sometimes spend hours on Ryanair's website to find that type of deals. My base was Paris and I wanted to go to Stockholm for example. The direct Ryanair flight from Paris to Stockholm was expensive (Let's say 150 euros). I would manage to find two cheap flights that go for example from Paris to Rome and another one from Rome to Stockholm, both of those for 10 Euros each. The key is to use the big Ryanair hubs as gateway (Milan and Brussels would work really well back in the days) I would basically lose my whole day traveling to save 80 euros. Sometimes it backfires though, and when it backfires you are on your own. Once my first flight got super delayed, and I got stuck in Milan for the night. I managed to have Ryanair rebook my second flight for the day. I think Ryanair wants to be able to propose high prices for direct flights and prevent people from finding those cheaper indirect flights. That's why they don't make it easy to find them.
- fyfy18 8y agoMost comparison sites will show you these routes, for example Kiwi lets me search indirect flights from where I am in a remote part of Spain to where I live the other side of Europe. There's no direct routes, but it gives me the option of connecting in Barcelona, Stansted or Hahn, or cheaper options if I want more that one stop. It also lets me search a whole month to find the cheapest flights in a given time period, and will provide options with different low-cost airlines if that's cheaper. However if you book direct through these sites you are going to get the lowest ticketing class. With Ryanair that means you can't take anything more than a small bag onboard (since November you need to pay for a 10kg cabin bag, you can't drop it at the gate for free), and if you are in a group you will not be sitting next to each other, so it may be best to book directly through the airline's site. The simple reason why Ryanair don't let you book multi-leg flights directly is because they don't want to be responsible for you missing a connection. It's ironic though, as compared to national European airlines I find their punctuality a lot better.
- namdnay 8y agoThere are several other reasons for not wanting to handle connections, including complexity of IT systems, negotiations with airports (bag transfer is more complicated), and general airline processes. I imagine they will end up doing it, Easyjet have started to act as feeders for global airlines - it's a clever idea
- jd20 8y agoLooks cool! The problem of enumerating the best routes between two given airports is indeed an interesting problem. My favorite discussion of the problem is from Carl de Marcken: http://www.ai.mit.edu/courses/6.034f/psets/ps1/airtravel.pdf http://www.ai.mit.edu/courses/6.034f/psets/ps1/airtravel.pdf I've been involved in solving a similar problem, on the award flight search side. There are about 12,000 direct commercial routes offering award redemption, and the airline websites have different limitations: some only let you search one-way or only round-trip, or only one cabin at a time, or only give hints about available quantities. So you have to formulate the minimal set of queries that will give you complete information. And then given an origin and destination, figure out the valid routings, like you've discovered. The other really interesting challenge with many of the airline websites are the extreme measures they go to, to block you from crawling their data. My favorite is British Airways, which runs 800 different tests to fingerprint your browser, from generating audio files to drawing to an off-screen canvas, all inside a custom VM with encrypted byte code. (Similar to how I've seen Google obfuscate the ReCaptcha code base.) Surprising to hear that Ryanair makes it so easy to access prices in comparison!
- toast0 8y agoMany moons ago, I worked in the travel industry. Most airlines aren't running their own technology stack -- they are paying someone else $/search to drive their webpage. In a market of razor thin margins, paying per search for you to crawl their flight catalog is a big problem -- thus the arms race. The only way to win at this is to own the catalog, this is why Google bought ITA. Ryanair is the kind of airline that I would suspect might run their own stack, and therefore not have the same cost structure.
- namdnay 8y agoThe only airlines I know of running their own PSS are Emirates and Turkish. Ryanair are using Navitaire (Amadeus' low-cost subsidiary). To be honest, the cost structure is the same whether you're running it yourself or outsourcing - you don't want an absurdly high look to book ratio, or else you're just wasting server costs
- smartbit 8y agoHacking PNR https://media.ccc.de/v/33c3-7964-where_in_the_world_is_carmen_sandiego https://media.ccc.de/v/33c3-7964-where_in_the_world_is_carme... at time of the talk (2 years ago) used/discussed these sites: https://matrix.itasoftware.com/ https://matrix.itasoftware.com/ to get detailed fare rules & restrictions https://www.expertflyer.com https://www.expertflyer.com & https://itunes.apple.com/us/app/seat-alerts/id533533342 https://itunes.apple.com/us/app/seat-alerts/id533533342 https://www.checkmytrip.com/ https://www.checkmytrip.com/ allows entering name & booking-reference and gives all detail https://www.viewtrip.com/ https://www.viewtrip.com/ https://tripcase.com https://tripcase.com will use name + booking-reference to get detailed PNR information including the first name https://www.fly.kiev.ua https://www.fly.kiev.ua can make a flight reservation without a payment, still gives an 6char booking-reference
- zerowellies 8y agoWhat is the purpose of making a flight reservation without payment?
- yosito 8y agoMany airlines require you to have an onward flight out of a country before they will let you fly into it. This allows you to fulfill the technical requirement without having to pay for a plane ticket you aren't planning to use.
- gowld 8y agoWhy do airlines allow unpaid reservations? That seems ripe for Denial of Service attack on their booking plans.
- namdnay 8y agoA reservation that is not paid is not ticketed. A reservation that is not ticketed is not 100% guaranteed But I agree that this is till a problem for airline inventory management, and an online travel agency should definitely not be opening this feature to the general public! There are several usecases that require unpaid reservations, the most common one nowadays is corporate travel, when you need to integrate approval flows - the approval step will be between the reservation and the ticketing. Like just about every industry, there is a world of complexity hidden underneath the surface :)
- frakkingcylons 8y agoSomewhat off-topic and shameless plug, I'm working on a meta flight-search engine that finds the cheapest flights from multiple origins to the same destination (i.e. me and some friends who live in another city want to fly to Hong Kong with no particular date in mind, just want the cheapest flights and with overlapping departure/return dates). Does anyone else have a similar need or know of anything that can do this?
- whazor 8y agoWe (me and friend) are working on the same problem, however we are stuck at the next step. Namely the user interface: how do you let the user search through all the possibilities. We created some data structures that allow almost instant searching of such routes and we have scrapers running regularly on Ryanair, easyJet, wizzair, and Transavia. You can query the algorithm here: https://algo.tripchemy.com/routes/TSF?year=2019&month=02&day=10&length=20 https://algo.tripchemy.com/routes/TSF?year=2019&month=02&day... Where you want to have a trip of 20 days (4 lovatons, 5 flights) from 10 Feb. Starting and returning to TSF. We also added some scoring for niceness of airports.
- whazor 8y agoTo provide some more details: - Instead of graph algorithms, we use more algorithms that originate from databases - Currently the bottleneck is improving server parallelism and filtering/limiting the amount of results (cause the algorithm can send up millions and millions of rows back). Which in a sense is also a frontend problem: which locations do you want to visit?
- seszett 8y agoWhat I've been missing is not so much finding the best routes between two airports, but finding the best (ie. least expensive) route from a bunch of departure airports to a number of destination airports. If I'm in Antwerp, I really don't care much if I have to depart from/return to Brussels Zaventem, Charleroi or Eindhoven, it just doesn't matter. And if the fare is sufficiently cheaper, then Amsterdam, Düsseldorf, Beauvais or Paris is fine too. And I don't have to return to the airport I left from. Typically it's the same for my destination in the case of holidays. But I still haven't found websites which allowed to do that easily, apart from Google Flights maybe.
- ljcn 8y agoIt's not perfect but skyscanner.net does the first part of your description. I just did some test searches from Eindhoven + nearby airports, and it found routes starting in EIN, BRU, CRL, and ANR. By default it shows different take-off/landing airports. Edit: kayak performs the same.
- mtrovo 8y agoI use https://airwander.com/ https://airwander.com/ when flying overseas, I don't know how well it works for low cost airlines though. It's a flight search engine that let you filter what connections there are between the cities you want to travel and help you book a single flight that is going to stay there as a stopover. Sometimes it finds some weird flights that doesn't make any sense if you're just trying to reach your destination but if you're just traveling it's quite nice. Last time I used it I found a overseas flight that stopped in Lisbon but on the way back made a connection in Bologna that was +200 cheaper then the normal flight.
- jayalpha 8y agoAirwanderer would be something I have been looking for a long time but it does not seem to work so well. Also, is it just my browser or why is it so difficult to see the layovers? I have to click on "fight details" to see this. Why? http://www.cleverlayover.com http://www.cleverlayover.com also never worked for me. Good idea, bad executed. Regarding travel websites, you may want to check out: https://www.kiwi.com https://www.kiwi.com Sometimes finds insane travel routes. http://www.vayama.com http://www.vayama.com Lets me sometimes stay in Ethiopia for free a day when I fly from Asia to Europe. Does not show up on any other website I consult. I have also had luck at times with http://www.opodo.com http://www.opodo.com http://www.expedia.com http://www.expedia.com (yes, sometimes an old dog still does the trick)
- Doga007 8y agoSuggested stopovers will display if you use the red box with "+" that displays after you type your origin and destination. These cities are specific to your origin/destination, dates and the number of days you plan to stopover. The site predicts and combines separate tickets to find cheap connection cities/countries (with non-partnered airlines). Hope that helps! Btw, I'm a founder of AW.
- donjoe 8y agoAs an alternative, https://momondo.com https://momondo.com works quite nicely for me most of the times.
- maa5444 8y agoit's cheap maybe it's not a fake the fact they spray the sky
- cal97g 8y agoWe shouldn't be building tools to sell Ryanair flights; on principle. It's a terrible airline with terrible practices and even worse politics.
- SmellyGeekBoy 8y agoIf nothing else, at least I learned from the comments here that most of HN seem to be working on their own competing flight search engines ;)
- yosito 8y agoIf you want something done right, you have to do it yourself. I spent several hours last night trying to find cheap routes starting from Rio in January and ending up in the Carribean in February. I don't mind stopping a few places in between and spending some time there, I just want the cheapest flights available. Turns out that information is really hard to find without computing it yourself.
- jaycolson 8y agoryan air weekend flight search ... pretty handy https://github.com/cloudsquall/flightsearch https://github.com/cloudsquall/flightsearch
- vool 8y ago@jonluca If you are looking to take this further, you can find some more info on Ryanair API endpoints here: https://gist.github.com/vool/bbd64eeee313d27a82ab https://gist.github.com/vool/bbd64eeee313d27a82ab
- thomasahle 8y agoFinding a cycle of a given length can actually be done in time `O(e^k n^2.3)` where `k` is the length of the cycle, using the cool technique of color coding. Basically, to find a cycle of length 6, you repeatedly color every node in one of 6 colors at random. Then you look for a cycle with all different colored nodes, which can be done efficiently using dynamic programming. You succeed in finding a particular 6 cycle exactly if each node in it has gotten a different color, but the chance of this is not bad. In the case of the OP it's even better, since there are probably many such cycles to find.
- deleted 8y ago[deleted]
- kasparsklavins 8y agoWhy is there no interface that allows searching for flights without specifying exact dates? All I want to do is fly from A to B to A. Maybe stay a week, maybe two. I'm flexible - it doesnt have to be exactly N days starting on the M'th. Even services that "allegedly" advertise they have that, still require manually clicking every day combination. I'd fly more often if it was easy. The few times I tried, it would be just faster to drive than go through all possible 900+ day combinations.
- thetest3r 8y agoGoogle Flights will render a whole calendar of prices.
- deleted 8y ago[deleted]
- crazygringo 8y agoHave you seen a site that does that really well, UX-wise? I'd assume it's two reasons: first that it's hard to get the UX right. There are going to wind up being so many combinations of possibilities that I'm not sure how you'd even sort them in a meaningful way. (E.g. it's unlikely price from lowest to highest will be the most meaningful, the lowest price alone might wind up having 100 different date combinations, so figuring out how to present the options in a meaningful way might just be something we haven't figured out yet.) But second, it might just be too computationally expensive. You see how slow sites already are just for searching a single date, because there are so many possible combinations of connections to consider, and so many fare rules to calculate prices out of. Now a 2-week range for both start and end results in taking almost 200 times longer. It just might not be feasible, or worth the programming effort. I remember a blog post a long time ago from Kayak (I think?) talking about the insane effort that was required to cache flight fares just so show simple fare comparisons across a few days... and it only worked for the flights that were more commonly searched for.
- rb808 8y agoI've seen a few airlines have grids where the outbound and return flights are shown on each access, which I think is great. I'm thinking of Air New Zealand as the last airline I saw it so maybe it benefits from a smaller network as you say.
- zabaki 8y agoNow i just gotta figure out all the airport abbreviations D: