Before asking for help please read "How to request help" by clicking on that tab above here.
  • Page:
  • 1

TOPIC: Relationships via ancestors taking the wrong path?

Relationships via ancestors taking the wrong path? 1 week 11 hours ago #1

  • dawansv
  • dawansv's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 7
I am having some odd experience with the relationship chart.

First the part that works. My dad and his brother's wife (my aunt) are also fifth cousins. So when I run a relationship between them, I see that fifth cousin relationship and it works beautifully. Note that I don't want to see the relationship by marriage via his brother, so I select "Find relationships via ancestors" only. Also note My dad and aunt are actually fifth cousins TWICE so it shows both charts. You can see the first attachment "Dad and aunt relationship.png" with the result. I have replaced the name of the most recent generations for privacy. All good there.



Now for the second part that seems odd. I now run the same relationship but this time between ME (=my dad's son) and MY COUSIN (=my aunt's son). So essentially just one generation deeper. Now my cousin and I are of course first cousins since our dad's are brother, and so I get the first cousin relationship chart (I am not showing that chart, it works fine). Then I get a second relationship chart, which I would expect to mirror the " fifth cousins" relationship between my dad and my aunt (as seen above). On my cousin's side (to the right), the chart is fine -- it goes up straight six generations mirroring his mom's side of the chart. On my side however it goes side ways -- it starts going down but finds another path back up then down towards my mother. The path it finds is correct (yes I have a complicated family) but WAY more indirect than the straight path down to me. I drew the direct path with the red rectangles for comparison -- it is essentially the same straight path down as with my dad and aunt. In any case, even if that relationship via my mom is valid, the fact remains that the other straight relationship doesn't show up. I only get the 2: the first cousin one, and this one via my mother I am showing here.



Just to confirm, in both cases I am also selecting ""Find relationships via ancestors" and "Find all possible relationships". Also my recursions are set to unlimited. And as far as I know I am my dad's son !

So what is happening here?

Edit: wanted to add that I get the same result when inverting my cousin and I as first/second individuals -- same results in mirror image of course.
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by dawansv.

Relationships via ancestors taking the wrong path? 1 week 1 hour ago #2

  • dawansv
  • dawansv's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 7
Taking a second look at this today, it's pretty clear that the confusion comes from the fact that my Dad and Mom are fourth cousins... Yikes! Yes hard to pass on the joke saying I am probably confused in more than one way...



So on the longer path, the system is actually correct, all the individuals in the path are my ancestors. But still the other more direct path should ideally appear as well, in fact both of them -- that's because my Grand-parents (on my dad side) are also second cousin. OK so maybe the algorithm commits suicide when seeing all of this! I can't blame him.

Attachments:

Please Log in or Create an account to join the conversation.

Relationships via ancestors taking the wrong path? 1 week 1 hour ago #3

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 12929
The "relationships via ancestors" doesn't simply search "up/across/down" to find a cousin-like relationship.

What it does is create a "mini tree" consisting of just the ancesters of the two individuals, and then runs the search on that reduced tree.

So this is why you get a relationship that has several ups/downs. Presumably every one of these individuals is your ancestor.

I'll admit that this situation didn't crop up in my test data, and that the algorithm always gave me the results I was expecting - i.e. a cousin-like relationship.

So, although it's working exactly as designed and described - this might not be what you (or I) were expecting!


The other issue you raised is how we define "other" relationships relationships.

Firstly, you need to know that our relationship paths follow a series of links between individuals and families.

We can't go directly from one indvididual to another, as there may be more than direct link between them, and we wouldn't know which one it was.

e.g. Zeus and Hera are both siblings and spouses at the same time...
dev.webtrees.net/demo-dev/tree/mythology...onships-0-99/i87/i80


When we find "other" relationships, we need to exclude "bogus" paths.

For example, consider the definition of these relationships

half-brother: child of a parent
step-brother: child of a spouse of a parent

The definitions for half-brother and step-brother could both also apply to brother.
i.e. your brother is also your mother's child, and also your mother's husband's child.

webtrees stops this from happening by refusing to follow paths that go through a previously visited family record.

So, having found the link via your parents, it won't look for other paths that go through the same family.
This is (I think) what is preventing it from finding additional links via their ancestors.


If this sounds like we are making a load of compromises - then yes we are.
webtrees is a web application, and needs to generate results quickly using limited CPU and memory.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Last edit: by fisharebest. Reason: typo

Relationships via ancestors taking the wrong path? 1 week 44 minutes ago #4

You may want to consider using my custom module 'Extended Relationships', which provides additional options and only considers paths via common ancestors, if the respective option is checked. It also returns all relationships based on common ancestors rather efficiently.

Anyway I'd be interested to learn whether it handles all your more complex relationships properly.
Richard

webtrees 2.0.4 at cissee.de/webtrees2
Custom modules for 1.7.x and 2.x (Extended Relationships, Gov4Webtrees, Shared Places, Compact Themes Adjuster) available at cissee.de

Please Log in or Create an account to join the conversation.

Relationships via ancestors taking the wrong path? 6 days 23 hours ago #5

  • dawansv
  • dawansv's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 7
Thanks fisharebest.

Yes to be clear I am only talking "relationships via ancestors" here, not "other" relationships which are indeed even more complex. And I can confirm that the result shown is actually correct and every one in the path is my ancestor. The only odd thing is that the other more direct relationship doesn't show up.

So in this case BOTH links are via my parents' ancestors. One would be via my dad only (the more direct link up and down that doesn't show up between my cousin and I but shows up between my dad and my aunt) , the other via my mom+dad combined (the less direct one that shows up). Of course "direct" here is how we humans see it -- up and down is more direct to us than up down up down. Now for the computer both links are probably as direct because they both use ancestors as the common individuals only. So it is not as much that I don't expect the more complex link to show up, as it does, but I would also expect the simpler link through my father to show up, but it doesn't.

In this case it may be that the algortihm finds a first connection between the 2 trees via my mom+dad and then it stops looking somehow. In any case I also understand this is probably a fringe case. Just interesting to see how complex this is with a real world scenario. I might try to look more into the algorithm itself to try to understand what is happening there...

And of course thank you so much for all your hard work on this tool.

Please Log in or Create an account to join the conversation.

Last edit: by dawansv.

Relationships via ancestors taking the wrong path? 6 days 22 hours ago #6

  • dawansv
  • dawansv's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 7
Thanks ric2015. I was not familar with your module. I am going to give it a try and will report back.

Please Log in or Create an account to join the conversation.

Relationships via ancestors taking the wrong path? 6 days 22 hours ago #7

  • dawansv
  • dawansv's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 7
Ric's Extended Relationships module does the trick for my fringe case! It is returning the more direct path instead of the longer one.

Also the Coefficient of Relationship is quite fun. As expected, I get 12.5% between cousins and 50% between siblings. More interestingly, I have in my extended family a fringe case in which 2 sets of cousins are twice related, meaning each of their respective parents are a brother/sister pair. So they are first cousins on both maternal and paternal sides. And indeed for them the Coefficient of Relationship comes back at 25%.

Please Log in or Create an account to join the conversation.

Relationships via ancestors taking the wrong path? 6 days 20 hours ago #8

  • dawansv
  • dawansv's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 7
OK so I think I finally figured out what is happening by comparing the Extended Relationships module's results and the main algorithm's results.

The Extended Relationships module makes it clear that in addition to being first degree cousins via our dads, my cousin and I are also 6th degree cousins via my dad and his mon AND 5th degree cousins via my mom and his dad. In addition there is an overlap between this double 6th degree / 5th degree relationship which is key to understanding what is happening.

So while the Extended Relationships module keeps these 2 relationships separate, listing both of them, the main algorithm choses to merge these relationships into one where they overlap. You can look at the picture where I recreate the original result as shown by the main algoritm by combining/overlaping both results from the Extended Relationships module.

First the original result as a reminder:


Then a remake of that chart by combining both relationships found by the Extended Relationships module:


Both results are actually quite interesting. I like the Extended Relationships module view because it shows the 2 relationships clearly, but the main algorithm is interesting because it highlights the fact that they overlap. That said the main algorithm's chart is definitely easier to understand after seeing the Extended Relationships charts first...

All in all I am glad I decided to reach accross the ocean when I got married because some new blood was definitely needed in all of this !
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by dawansv.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Relationships via ancestors taking the wrong path? 6 days 16 hours ago #9

fisharebest wrote: The "relationships via ancestors" doesn't simply search "up/across/down" to find a cousin-like relationship.

What it does is create a "mini tree" consisting of just the ancesters of the two individuals, and then runs the search on that reduced tree.

So this is why you get a relationship that has several ups/downs. Presumably every one of these individuals is your ancestor.


Greg, thanks for the explanation of what "relationships via ancestors" actually means. It is not what I expected and I'm having some trouble wrapping my head around its subtleties. So that definition means is that everyone in the "mini tree" must be a direct ancestor of person A, or person B, or both, and you search for ANY path (either by blood relationship OR by marriage) through that tree.

In a "normal" up/down cousin-like relationship, you start from A, go UP a sequence of A-ancestors to a common ancestor, say C, and then go DOWN a sequence of B-ancestors to B. What we saw in @dawansv's example is a jump back from a B-ancestor to an A-ancestor through a marriage relationship, which required another upward sequence of A-ancestors to a second common ancestor, say D.

I don't think marriage relationships should be allowed in the path because it can never shorten the path -- it always makes it longer and more complex. And if you disallow marriage relationships then I believe you are left only with "normal" up/down cousin-like paths, and you may as well rename the requirement to be something like "blood relationships".

On the other hand, the presence of the marriage relationship in @dawansv's example is quite interesting because it indicates an unexpected additional connection between the blood relatives of A and the blood relatives of B. But if you care about that result then why not go all the way to answering the question: "Tell me all the connections between the blood relatives of A and the blood relatives of B"? Thus, suppose:
  • A has a cousin B through common ancestor C;
  • D has a cousin E through common ancestor F;
  • B and E have a biological child G.
Then G is a cousin of A, G is also a cousin of D even though A and D are NOT blood relatives to each other.

Please Log in or Create an account to join the conversation.

Relationships via ancestors taking the wrong path? 6 days 12 minutes ago #10

drblam wrote:

fisharebest wrote: The "relationships via ancestors" doesn't simply search "up/across/down" to find a cousin-like relationship.

What it does is create a "mini tree" consisting of just the ancesters of the two individuals, and then runs the search on that reduced tree.

So this is why you get a relationship that has several ups/downs. Presumably every one of these individuals is your ancestor.


I don't think marriage relationships should be allowed in the path because it can never shorten the path -- it always makes it longer and more complex. And if you disallow marriage relationships then I believe you are left only with "normal" up/down cousin-like paths, and you may as well rename the requirement to be something like "blood relationships".


OK, I found an example where allowing marriage relationships can in fact create novel, shorter relationships. Here is a rather extreme, but simple, example. Suppose later in life, A's father F marries B's mother M. Thus neither F nor M is a common biological ancestor to both A and B, but A and B are connected through their respective parent's second marriage as step-siblings.

In other words, Greg's definition of "relationships via ancestors" does introduce additional relationships, which are not simply multiple cousin-like up/down relationships spliced together. Furthermore, it may be possible to find a relationship between A and B even in the case where none of their common biological ancestors are included in the tree.

However, I think the algorithm could use some refinement. I don't think it should report paths that contain more than one crossover point between "A ancestors" and "B ancestors".

Please Log in or Create an account to join the conversation.

Last edit: by drblam.

Relationships via ancestors taking the wrong path? 5 days 11 hours ago #11

  • dawansv
  • dawansv's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 7

I don't think it should report paths that contain more than one crossover point between "A ancestors" and "B ancestors".


Having a series of A+B ancestors creating a connecting point is certainly confusing as in my example. At first it looks like it is jumping accross several random people from "A ancestors" to "B ancestors" but in fact all of these people in the middle are A+B ancestors. It seems strange until you realise that it is because 2 different relationships have been merged, and the 2 interior legs going back to A and B removed past the shortest connection. But for it to happen you need 2 separate relationships that happen to overlap.

In my case a common A+B ancestor of one relationship (Eugenie Preud'homme) happens to be married to a common A+B ancestor of the other one (Adrien Jule Dawans), and BAM! that creates the shortcut. I don't think it could happen in any other scenario.

Here I have enclosed the common A+B ancestors in a green area. When you first see that chart, it is not obvious that these are common ancestors of course. It just looks like a strange connection by marriage down a leg and up another.


It's only clear these are common ancestors when you see both relationships side by side with the missing legs back in the picture. Note that the Extended Relationship module shows the parents instead of just brother-sister relationship which is why we see the 2 top common ancestor couples here and not on the previous chart, but that is just a difference in presentation.
Attachments:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum