Saddle Point exercise: clarify/correct the introduction

While doing this exercise I was stuck on a test, when I noticed that this introduction doesn’t fit the existing scenario.

The test Can identify multiple saddle points has the following matrix: Matrix(List(List(4, 5, 4), List(3, 5, 5), List(1, 5, 4)))

This is meant to produce Set((0, 1), (1, 1), (2, 1))). This implies that in:

4 5 4
3 5 5
1 5 4

every tree in the middle column is valid; this contradicts the introduction that said that the tree must be taller than/shorter than the east-west and north-south line respectively.

Changes to make this clearer welcome.

Hi @RafSobol and welcome.

Would the following adjustment to the introduction do the job:

A good tree is both:

  • the tallest among all trees to the east and west, so that you have the best possible view of the sunrises and sunsets.
  • the shortest among all trees to the north and south, to minimize the amount of tree climbing.

This has come up before: Dubious Wording in Saddle Points Exercise

1 Like

I see. Except that the wording isn’t dubious. It’s just incorrect and inconsistent with the instructions.

@iHiD Should i PR the changes proposed here?

Another way to phrase it, this makes it more clear that may be more than 1 trees that are tallest/shortest

  • one of the tallest among the trees to the east and west, so that you have the best possible view of the sunrises and sunsets.
  • one of the shortest among the trees to the north and south, to minimize the amount of tree climbing.

Or,

  • among the tallest of the trees to the east and west, so that you have the best possible view of the sunrises and sunsets.
  • among the shortest of the trees to the north and south, to minimize the amount of tree climbing.

I’d prefer “One of” over “among”.

What does it mean to be one of the tallest trees? Within the top 10%?

As per the prior thread(s) and PRs, it’s been tricky to figure out a good way to word this.

It doesn’t not specify the exact threshold. That’s perfectly fine. The instructions can further clarify things. The problem here isn’t that the wording needs to be exact, but it shouldn’t be incorrect, which is the case with the current intro.

But “among the tallest” is simpler and more suitable IMO.

IMO “among the tallest” is vague and confusing.

Well in this case, we should just stick to “the tallest/shortest among”. This does not exclude the case of more than one being the tallest.

This is also consistent with the instructions:

An acceptable tree will be the largest in its row, while being the smallest in its column.

Hey all, thanks for the suggestions! I forgot to include my proposal (I created this thread after my PR was auto-closed - I wasn’t aware of the forum) - how about:

A good tree is both:

  • at least as tall as every tree to the east and west, so that you have the best possible view of the sunrises and sunsets.
  • at most as tall as every tree to the north and south, to minimize the amount of tree climbing.

@RafSobol This works, but it’s unnecessarily complicated. Given the previous debate on this topic, we can only aim to make the wording consistent with the instructions at this point.

2 Likes