Question
a) Suppose a directed graph has k nodes, where there are two special nodes. One has an edge from itself to every non-special node and
a) Suppose a directed graph has k nodes, where there are two "special" nodes. One has an edge from itself to every non-special node and the other has an edge from every non-special node to itself. There are no other edges at all in the graph. i. Draw the graph (using circles and arrows) assuming k = 4. ii. Draw an adjacency list representation of the graph assuming k = 4. iii. In terms of k, exactly how many edges are in the graph? iv. Is this graph dense or sparse? v. In terms of k (if k is relevant), exactly how many correct results for topological sort that does this graph have?
Note that for parts (iii),(iv), and (v), your answer should be in terms of an arbitrary k, not assuming k = 4.
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