Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ code A tree Not a tree Not a tree Not a tree oo we can think of a tree as being a special kind
c++ code
A tree Not a tree Not a tree Not a tree oo we can think of a tree as being a special kind of directed graph. To model a tree as a graph, we make the nodes of the tree become nodes in the graph, and draw an edge from a parent node to each of its children. The drawing on the left shows a tree as a graph; the other three directed graphs do not correspond to a tree. Suppose we want to check if a given directed graph corresponds to a tree. What properties should we check that the graph has? Write down a list of properties such that, if a directed graph has those properties, it must be a tree. You can refer to standard properties of graphs in your answer without explaining them. B. Write a function called DelAllMinEdge(). This function will first search all the edges in the graph and will delete the edge with the minimum weight. Consider that graph is implemented using Adjacency List. Consider the following structure for both Vertices and Edges Struct GNode { int data, weight; GNode *ptr; } *GList; Note: In the following example DelAllMinEdgel) will delete the edge between vertex 4 to 3 and 1 to 4 because of minimum weight. Data Weight *ptr 4 2 *ptr Data 1 Weight -1 4 10 5 2 -1 3 15 4 20 5 w NL -1 5 18 4 -1 3 5 5 -1 4 25 CLO Mal BT- Level
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started