Incorrect degrees of separation in Relative Distance instructions

      ┌──────────┐            ┌──────────┐     ┌───────────┐
      │  Helena  │            │  Erdős   ├─────┤  Shusaku  │
      └───┬───┬──┘            └─────┬────┘     └────┬──────┘
      ┌───┘   └───────┐             └───────┬───────┘
┌─────┴────┐     ┌────┴───┐           ┌─────┴────┐
│   Isla   ├─────┤ Tariq  │           │   Kevin  │
└────┬─────┘     └────┬───┘           └──────────┘
     │                │
┌────┴────┐      ┌────┴───┐
│   Uma   │      │ Morphy │
└─────────┘      └────────┘

Edit: There is a rendering issue due to line height in the forum. It may look differently on the website. The UNICODE characters connect vertically at a line height of 1, as I have set in my local editor.

4 Likes

Works for me.

As I currently have no time to handle the “Complex graph” test cases: Please may someone else take the graph and adjust the test cases (if required) and the description?

I don’t believe the tests need to be updated. This discussion was about updating the instructions since there was an incorrect number of degrees listed and then vaeng suggested updating the graph as well.

Hi, everyone!

I have a comment/question about this exercise.

I wrote a solution in JS that goes something like "parent = … find … " meaning find the first node. And right as I was about to run the tests I thought ‘Wait, I forgot the other parent’ and expected to hit a failing test - but no, all the tests passed.

So I looked into the dataset more, and realized that all the nodes (people) have a single parent and at most two children, which makes for a boring graph. It’s a really dull binary tree. The instructions say " a child can have one or two parents. ", but all the test data trees have a single parent. Why is this? Why not multiple parents?

  1. Is this related to the topic of “incorrect degrees of separation” or is this a new topic?
  2. Would having a second parent change the answer (degree of separation) for any given inputs in any interesting way?

It’s related to the design of the exercise just like “siblings distance == 1” is a choice, and this was the only topic I could find that discusses hows and whys. I figured the people invested in this exercise will see my post if I add it here.

I thought about it some more; I am going to open a new topic.

Edit: New topic here