==================================================================================================== Q: Can vectors be used instead of arrays. A: OK. Use it. But you need vector of vectors. Fine, go ahead. I believe arrays are much simpler. ==================================================================================================== Q: Can we use global variables? A: Use of global variables is very deprecated. Avoid those. Not only in this assignment, but throughout the rest of your life. ==================================================================================================== Q: Can we use C++ classes? A: C++ should be used for classes only. You may have classes (like digraph). But do not change the data organization in your classes from what is given in the assignment statement. ==================================================================================================== Q: How to print graphs and charts? A: Use the format specified in the sample I/O section. You may write functions for printing graphs and charts. In fact, writing functions is a good idea because printing of graphs/charts is done multiple times. ==================================================================================================== Q: More clarification for Chart 2 (Part 4). A: Use the O(n^4) algorithm given in the statement, not the Floyd--Warshall-based O(n^5) algorithm. ==================================================================================================== Q: More clarification for Chart 3 (Part 5). A: If C1(i,j) < infinity (that is, there is an AI path in the red graph from i to j), take C3(i,j) = C1(i,j). If C1(i,j) = infinity, choose the shortest path with blue edges on it. No restrictions on how many blue edges will be there in the shortest paths. In this part, you are not asked to maximize the number of AI legs (or minimize the number of non-AI legs). You are asked to minimize the cost by including red and blue edges in the best manner. ==================================================================================================== Q: PART4 it is given choose atmost one non ai leg but in the sample output given 1->4 and 4->0 two are chosen why? A: In the sample output, 1 -> 0 cost is shown as -. Individually, 1 -> 4 and 4 -> 0 travels are now possible. But in the last part, 1 -> 0 cost is shown as 9751 (because two blue edges are allowed in Part 5). ==================================================================================================== Q: in part4 single (k,l) non-ai flight does not cover all (i,j)s, so how do we decide which uncovered (i,j) should be considered? A: For each uncovered (i,j), minimize over ALL blue edges (k,l). Some blue edge (k,l) may have no impact on the given (i,j). This does not matter. Check all with the hope that some of these might work. More clarification: For each (i,j), if C1(i,j) = INFINITY, then: For all blue edges (k,l), compute possibility[i,j](k,l) = C1(i,k) + edgecost(k->l) + C1(l,j). Take C2(i,j) = min(possibility[i,j](k,l)), where the minimum is over all blue edges (k,l). Notes (1) For different AI-uncovered (i,j) pairs, the minimum may be achieved by different blue edges (k,l). (2) For some AI-uncovered (i,j) pairs, you may still have C2(i,j) = INFINITY (no blue edge (k,l) helps). ==================================================================================================== Q: What is the maximum value of n I should prepare for? A: 32. ==================================================================================================== Q: What can be the maximum cost? A: Each single leg costs < 10000. If n <= 32, the maximum price can be 310,000. ====================================================================================================