Suggest an om algorithm for identifying all components of a


1. Given two n-vectors (α(1), α(2), ... , α(n)) and ß(1),ß(2), ... , ß(n)), we say that α is lexicographically smaller than ß(i.e.,α ≤ ß) if for the first index k for which α(k) ≠ ß(k), α(k) is less than ß(k). [For example, (2, 4, 8) is lexicographically smaller than (2, 5, 1).] Modify the algorithm given in Figure 3.8 so that it gives the lexicominimum topological ordering of its nodes (i.e., a topological ordering that is lexicographically smaller than every other topological ordering).

2. Suggest an O(m) algorithm for identifying all components of a (possibly) disconnected graph. Design the algorithm so that it will assign a label 1 to all nodes in the first component, a label 2 to all nodes in the second component, and so on. (Hint: Maintain a doubly linked list of all unlabeled node.)

Request for Solution File

Ask an Expert for Answer!!
Econometrics: Suggest an om algorithm for identifying all components of a
Reference No:- TGS01662279

Expected delivery within 24 Hours