CSCI 2300 Lab 4 Fall 2015, 2/25/2014

This lab is about graphs and algorithms. You are welcome to start working on the lab ahead of time. Please read Chapter 2 and beginning of Chapter 3. There are four Problems - Do any three to get full credit.
  1. This counts as one Problem.
    Please plot n, vs T(n), Q(n), X(n), for the following functions, by using a C++ program to produce comma separated values and the exporting this file into a spreadsheet program to produce a plot. Always round off the arguments to integers.
    
    int main(void)
    {
      int n;
    
      for (n = 10; n <=1000; n=n+10)
        cout << n<<","<< T(n) <<","<< Q(n) << "," << X(n)  << "\n";
       exit(1);
    }
    
  2. This is considered as one problem.
  3. Add a DFS procedure to the Graph Class (Sample) and Sample Data (input) for unweighted graph. and display the DFS spanning tree and the prenumbering and postnumbering of vertices (Please read the given Graph Class carefully and see the different functions associated with Graph Class - You are welcome to use your own Graph Class).
  4. Find the maximum number of edges a connected undirected graph with n nodes can have. What is the maximum degree in such a graph and what is the average degree in such a graph?