Post by Louis EpsteinPost by Keith F. LynchI wish I could find a machine-readable royal family tree so that I
could write a program to answer questions such as whether A is the
ancestor of B or vice versa, and if so then by how many routes, and
which routes are the longest and shortest.
There are royal genealogy databases out there.
I couldn't find one, so I created one, just in time for Mother's Day.
Just a first crude attempt, consisting only of the ancestors of
Charles III, current king of the UK, recursively mined from the
infobox sections of English language Wikipedia pages on each
successive ancestor, using a C program I wrote for the purpose.
Only direct ancestors of Charles III are shown. 1674 ancestors are
here, all that were reachable by this method. Names given are those
used by Wikipedia, i.e. the part of the URL that follows
http://en.wikipedia/org/wiki/
These names have the advantage that they are globally unique.
The format is F or M for father or mother, followed by the name
of a person, followed by the name of their father or mother, all
separated by slashes. For instance:
F/Charles_III/Prince_Philip,_Duke_of_Edinburgh
M/Charles_III/Elizabeth_II
I haven't yet written a program to count how many times each person
appears in the family tree. (If you're thinking of writing such a
program, and aren't sure how, look up "adjacency matrix" in Wikipedia.)
I know that (for instance) Alfred the Great appears at least 11 times,
as he appears at least once in each generation from 43 generations ago
to 33 generations ago, but he likely occurs multiple times in each.
And of course many links aren't findable through Wikipedia. And,
obviously, there could be errors or omissions in Wikipedia. Non-ASCII
characters are often handled inconsistently. At least there were no
circular links in this tree, e.g. someone listed as their own
grandfather, like Fry in Futurama.
This table is intended for computer programs to work with. If you're looking
for a human-readable table, see
My table can be found at http://KeithLynch.net/charles.txt
Post by Louis EpsteinIt's been said that Arnulf of Metz (who died in the 640s) was a
47th generation ancestor of Elizabeth II (though obviously there
are lines to her of different lengths even from George III), ...
He is indeed both the earliest-born and most distant ancestor in the
table. My program finds at least one path to him for every number of
generations back from Lizzie from 40 through 50, (41 through 51 from
Charles III).
The longest page is that of Maximilian I, Holy Roman Emperor.
Enjoy. If anyone does anything interesting with it, or finds any
errors in it, or has any suggestions, please tell me.
--
Keith F. Lynch - http://keithlynch.net/
Please see http://keithlynch.net/email.html before emailing me.