Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

During the Middle Ages, to determine the successor to the throne of France, the

ID: 3550067 • Letter: D

Question

During the Middle Ages, to determine the successor to the throne of France, the French used the Salic

law. It is formulated as follows: the next to the throne is the living male descendant of the most direct

male royal. Male royal here means that we consider only male ancestors. The most direct descendant

means we prefer the one whose father is king to the one whose grandfather is king. In case of a tie, the

eldest takes precedence over his brothers.


a) Define the predicate Successor(Year) giving the solution as the first successor to the crown for

the year specified. To do this, use the predicates born(X, Year), died(X, Year), male(X).

Explanation / Answer

Successor(Year)

{

if male(X)

then

{

if not died(X, Year)

then

{

if born(X, Year)

then

{

return true;

}

}

}


}


Here I have assumed all predicates to be boolean functions.

male(X) returns true if male, otherwise false

died(X, Year) returns true if person is dead, else false

born(X, Year) returns true if person is born before current year, else false.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote