If you want to know more about how Google Flights works, airline tickets, and why it is super complicated to deal with all the constraints and the combinatorial combinations, I highly recommend this set of slides by Carl de Marcken, one of the co-founders of ITA software, which Google acquired and became one of the underpinnings of Google Flights.
(Sorry for the http rather than https Link: Carl's domain doesn't appear to support https)
demarcken.org/carl/papers/IT…
The most underrated Google product: Google Flights.


