Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose you are reading a collection of stories about mythology and have identified n main characters, all of whom lived a long long time ago.

Suppose you are reading a collection of stories about mythology and have identified n main characters, all of whom lived a long long time ago. However our favorite archaeology professor warns us, 70% of all archaeology is done in the library. Researching. Reading. We cannot afford to take mythology at face value. Having completed the library portion, we are now trying to see if we can take the mythology at face value. While we have no way of knowing if the stories are or are not true, we want to find out if they are at least consistent with one another. By a reading of the stories, you have written a series of facts (according to the stories, at least). Every fact has one of two forms: Persons i and k had lifetimes that overlapped at least somewhat. For example, if we are reading Greek Mythology, Daedalus and Icarus would be one such pair. Person i passed away (died) before person k was born. For example, the life of Perseus is generally considered to pre-date the life of Heracles. For any given pair of people, there is at most one fact in the stories that relates the two. Given a collection of stories about n main characters, given an O(n 2 ) time algorithm to determine if the stories are consistent: that is, if there is a (relative) timeline of births and deaths that allows every fact we wrote to be true at the same time.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions