Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Find the minimum number of squads that you can send to battle meeting the given constraints. Background You are assembling a Rebel Army to fight

Find the minimum number of squads that you can
send to battle meeting the given constraints.
Background
You are assembling a Rebel Army to fight against
the Galactic Empire. For this you have invited
people from several influential families to join your
army. You want to create squads that can be sent
to battle the Empire. However you find that as
soon as you add a person with their
child, grandchild or any descendant in the same
squad they begin to give orders to the descendant
and the squad quickly falls apart. Your goal is to
find the minimum number of such squads that
you can create which do not have this problem.
In your army, each person has a maximum of
1 parent. A person may have one or more
ancestors that may be direct or indirect. x is an
ancestor of Y if at least one of the following is true:
x is a parent of Y(direct ancestor)
If x is a parent of Z, and Z is a parent of Y,
then x is an indirect ancestor of Y. Indirect
ancestor is transitive through any number of
levels.
No two people will ever be mutual ancestors, and
no person is a parent of themselves. Determine
the minimum number of squads that must be
formed so that no person is in the same
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions