Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

You're helping a group of ethnographers analyze some oral history data they've collected by interviewing members of a village to learn about the lives of people who've lived there over the past two...

1 answer below »
You're helping a group of ethnographers analyze some oral history data they've collected by interviewing members of a village to learn about the lives of people who've lived there over the past two hundred years.
From these interviews, they've learned about a set of n people (all of them now deceased), whom we'll denote P1, P2, ..., Pn. They've also collected facts about when these people lived relative to one another. Each fact has one of the following two forms:
• For some i and j, person Pi died before person Pj was born; or
• for some i and j, the life spans of Pi and Pj overlapped at least partially.
Naturally, they're not sure that all these facts are correct; memories are not so good, and a lot of this was passed down by word of mouth. So what they'd like you to determine is whether the data they've collected is at least internally consistent, in the sense that there could have existed a set of people for which all the facts they've learned simultaneously hold.
Give an efficient algorithm to do this: either it should produce proposed dates of birth and death for each of the n people so that all the facts hold true, or it should report (correctly) that no such dates can exist—that is, the facts collected by the ethnographers are not internally consistent.
Answered Same Day Dec 25, 2021

Solution

David answered on Dec 25 2021
124 Votes
For every person Pi we introduce two nodes: Pib and Pid, where
• Pib is a birth date and
• Pid, is death date of the person Pi
The following directed edge reflects a precedence relation between birth and death dates of
the person Pi - birth date is earlier than death date:
If person Pi died before person Pj was born, then the following directed graph reflects this:
If the life spans of Pi and Pj overlapped at least...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here