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

I have been assigned a fun project: design and implement a program that maintain

ID: 652149 • Letter: I

Question

I have been assigned a fun project: design and implement a program that maintains the data of a simple social network. Each person in the network should have a profile that contains his name, current status, and a friends list.

I think it is clear that the project calls for the use of the ADT graph. Each vertex represents a person in the network and an edge between vertices a friendship. Now, the graph may not be connected because some members do not have any friends in the network. With that in mind, consider this feature that must be implemented:

Explanation / Answer

That's a question only your professor can answer. There are at least two possible solutions:

Each "chain" involves a single connected component.

Some links will be among non-friends.

In the latter case, you would like to minimize the number of unfriendly links. If there are c connected components, then you only need c?1 of these.

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