We are given a directed graph with n vertices and m edges(m>=n), where each edge e has a color c(e) from {1,….,k}.
1) describe an algorithm, as fast as possible, to decide whetherthere exists a closed walk that uses all k colors. (In a closedwalk, we start and end at the same vertex).
2) Assume that there are only 3 colors. (k=3). Describe analgorithm, as fast as possible, to decide whether there exists awalk that uses all 3 colors.( the start and end vertex may bedifferent).
Can you guys help me out with above question 1 and 2?
Expert Answer
An answer
PayPal Gateway not configured
PayPal Gateway not configured