Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLease don't forget to put the user input User interface: C++ code. 1[25 Points] Adjacency List Given the Adjacency List of an undirected graph, write

PLease don't forget to put the user inputimage text in transcribedUser interface:

image text in transcribed

C++ code.

1[25 Points] Adjacency List Given the Adjacency List of an undirected graph, write a C++ program to determine the following. a) If the graph has self-loops b) If the graph is completely connected c) If the graph has an isolated vertex Print suitable messages. Ex. The graph has no self-loops; The graph has self-loops at vertices A, D'; The graph is not completely connected; The graph has no isolated vertex; The vertex C' in the graph is isolated; etc. The program should be designed in a way which facilitates testing by a user via specifying the number of (vertices) nodes, and the vertices adjacent to any given vertex. The following is a suggested outline. You have the flexibility to improve upon it, as long as it provides the interaction by a user to create the graph and ask questions. In the following it is assumed that the vertices are automatically labeled A, B, C, etc. B For example, the interaction when the program is run is as follows (user input is shown in 'red'). Type in the number of vertices in the graph: 5 Type in the vertices adjacent to 'A': BCE Type in the vertices adjacent to B: A, E, D Type in the vertices adjacent to 'C': AC (... etc....) After the graph (ex. above) is created, it should print out the answers to the questions in the exercise. Vertices with self-loops: C Graph is not completely connected The graph has no isolated vertex For the (ex. below), it should print out: B Vertices with the maximum in-degree: E (in-degree = 3) Vertices with the minimum in-degree: D (in-degree = 0) Vertices with the maximum out-degree: A (out-degree = 3) Vertices with the minimum out-degree: E (out-degree = 0) ... Etc

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions