Lab GraphLookup - answer not valid for question

In my opinion the “correct” answer is not correct.

Question
Find the list of all possible distinct destinations, with at most one layover, departing from the base airports of airlines that make part of the “OneWorld” alliance. The airlines should be national carriers from Germany, Spain or Canada only. Include both the destination and which airline services that location.

  1. You can depart from any airport part of OneWorld-alliance, so not only the airports in Germany, Spain and Canada

  2. The flights may only be done by airplaines out of Germany, Spain and Canada, so this restrics the air_routes to only those operated by these airlines. In case of a layover this restriction is not met for the first flight. Only the last flight to the destination is checked.

  3. The question is how many destinations. In which manner should you take de airline that services the destination into account? You can fly with at most two different airlines. Which one do you ask?

It is a very troubling question and given the answer of 158 only one answer is the correct one. Please change the question so it is clear what is asked.

Interesting enough none of the airlines have routes starting from there base airport :smile:

1 Like

@Harry_39420

I’m really not sure if you have a question here, or if you’re proposing a re-wording of the question for clarity. If there’s a question, please update this with exactly what the question is; if it’s a proposal to re-word the question, I’d suggest drafting a re-wording as you would like to see it and then using the “Report an issue” tab to send that directly to the curriculum team.

It is not my question, but the question in the lab. It is totaly confusing. See what my own query was and maybe you understand. I really would like to see that the question is rephrased.

There was one thing in the query I didn’t succeed.

Can you please tell me how to use the field “validAirlines” in “restrictSearchWithMatch”?

Thanks

db.air_alliances.aggregate([{
< deleted >
])

@Harry_39420

First of all, please follow Forum guidelines and do not post code – correct or otherwise – here in the Forum. Thanks.

As far as rephrasing the question, I would again encourage you to post your suggested alterations to the curriculum team using the “Report an issue” tab at the bottom of the screen. That goes directly to the curriculum team and they’re the folks that can make such changes.

The question of why you could not use $validAirlines isn’t clear to me, as you showed your final work and not the actual error message, so I don’t know what the problem was. I don’t see any obvious reason why it wouldn’t work offhand. Sorry.

I agree with the topic starter. The problem for the lab $graphLookup is interesting but not stated clearly.

Current problem statement is:

“Find the list of all possible distinct destinations, with at most one layover, departing from the base airports of airlines that make part of the “OneWorld” alliance. The airlines should be national carriers from Germany, Spain or Canada only. Include both the destination and which airline services that location.”

Here are the concerns about this problem statement.

2 constraints are given:

  • country restriction (“airline country is either Germany, or Spain, or Canada”)

  • alliance restriction (“airline is the part of OneWorld alliance”)

The scope of these two constraints is not clear from the problem definition.

Issues:

  1. From the problem wording, alliance restriction seems to apply only to the initial set of airlines (“starter set of nodes”).

But according to the correct solution, alliance restriction should be applied for both initial set of airlines and connection airlines.

  1. From the problem wording, it is not clear at all where to apply the country restriction: to initial set of airlines only, to connection airlines only, or to both.

So instead of solving the problem, we try to guess what we were asked for.

  1. Correct solution might yield to inconsistent results. Filtering out “connections” by “valid airlines list” is done regardless of the routes dependencies.

For example, trip A -> B -> C. Suppose the first leg, A -> B is done by invalid airline (and there is no other valid airline that flies to destination B), but the second leg of the trip, B -> C, is done by the valid airline. Then the filtering provided by the correct solution will leave the destination C as “reachable” though it could not be reached without using the invalid airline (to first reach B).

P.S.

I don’t think I could suggest what should be the correct final wording. Probably adding more details will help to clarify the constraints.

Besides, “Report an issue” window allows only 500 characters, that is clearly not enough to describe the issue with this lab problem definition.

Hope this helps to make this course even better.
Thank you!

2 Likes

Hi @Irina_54969,

Thanks for sharing your feedback!!

We will definitely look into this and try to resolve the issue so that the users can understand the problem statement correctly.

Also, we are in process of upgrading the courses and the changes will be reflecting soon for our users.

Please let me know, if you have any questions.

Thanks,
Sonali