Incorrect degrees of separation in Relative Distance instructions


Each branch splits for that individual’s immediate family to show the paths we could take. That hopefully makes the sibling rule clearer.

1 Like

Perhaps the link in the instructions about the six degrees of separation should be removed? I’m not sure how it’s relevant to the exercise.

It helps explains the Easter egg I originally nudged vaeng to add. At least among my peers, Six Degrees of Kevin Bacon is a common piece of cultural knowledge, and it helped inspire similar recent trends like seeing how many Wikipedia pages does it take to get from one article to another. Therefore, the link provides some useful context. Anecdotally, some of my family members didn’t understand the exercise until I specifically brought up Kevin Bacon.

I see, but right now it’s just a link with the text “Kevin” and no explanation. Someone reading the example will click it and end up on a page about the six degrees of separation, which feels completely unrelated and unexpected. If the purpose of the link is to provide context, then that needs to be made clear separately.

1 Like

That’s fair. We could tweak that as well. Any initial thoughts?

“This is similar to the pop culture idea that everyone is <within six degrees of Kevin Bacon>.”

2 Likes

The improved graph may look like this:

      ┌──────────┐            ┌──────────┐     ┌───────────┐
      │  Helena  │            │  Erdős   │ ◀─▶ │  Shusaku  │
      └───┬───┬──┘            └─────┬────┘     └────┬──────┘
      ┌───┘   └───────┐             └───────┬───────┘
      ▼               ▼                     ▼
┌──────────┐     ┌────────┐           ┌──────────┐
│   Isla   │ ◀─▶ │  Tariq │           │   Kevin  │
└────┬─────┘     └────┬───┘           └──────────┘
     ▼                ▼
┌─────────┐      ┌────────┐
│   Uma   │      │ Morphy │
└─────────┘      └────────┘
2 Likes

It seems all the connections should be double-headed arrows. Isla to Tariq being called out as going either way implies that the other connections are one-way. I can go Helena → Isla → Uma, but I can also go Uma → Isla → Helena.

Or no arrows at all ? Just a line should be sufficient i think.

Since we’re visualizing part of a family tree, I’m concerned that an regular line might misrepresent the Isla and Tariq connection as a family tree branch. We’re only modeling distance along parents, children, and siblings, not spouses and their families.

Having double-headed arrows stretches the graph vertically (due to the UNICODE art style):

      ┌──────────┐            ┌──────────┐     ┌───────────┐
      │  Helena  │            │  Erdős   │ ◀─▶ │  Shusaku  │
      └──────────┘            └──────────┘     └───────────┘
          ▲   ▲                     ▲               ▲
      ┌───┘   └───────┐             └───────┬───────┘
      ▼               ▼                     ▼
┌──────────┐     ┌────────┐           ┌──────────┐
│   Isla   │ ◀─▶ │ Tariq  │           │   Kevin  │
└──────────┘     └────────┘           └──────────┘
     ▲                ▲
     │                │
     ▼                ▼
┌─────────┐      ┌────────┐
│   Uma   │      │ Morphy │
└─────────┘      └────────┘

Would it make sense to render the links without any arrows? The tree clearly branches downwards from parents to children so we don’t need single arrows there. Since we can’t use double arrows consistently, we shouldn’t use them at all so I’d render each link as a line including between siblings.

If that doesn’t make sense, let’s just go back to the double arrows between the siblings and single arrows between parents and children

      ┌──────────┐            ┌──────────┐     ┌───────────┐
      │  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