Your actual Max ST algorithm should take the required O(E log V) time;
however, you may take O(V^2) time for culling all edges from the matrix.
This is one downside of using an Adjacency Matrix.
> Question 2:
> When implementing clustering(), there are two cases which arise in
> division by zero: k = 0 and k = 1. What should we return for these
> values?
NaN or -1.
> Question 3:
> Is there any reason we should be using a LinkedList over an ArrayList
> for the AdjListGraph implementation? We have heard conflicting
> information.
LinkedList is a doubly-linked list, and so each element will have
forward and backward pointers (8 or 16 bytes depending on your
platform). ArrayList is a contiguous list in memory with amortized
insertion time, and no per-element pointers.
I'd go with the ArrayList as it uses less memory.
> Question 4:
> For maxst() and both recommendation systems we need the weights of the
> undirected graph. If two vertices each have edges pointing towards
> each other with different weights, what should we use for the weight
> of the edge: the sumation or the larger of the two?
>
> TLDR: if A--->B has weight 5 and B--->A has weight 4, is our
> undirected weight 5 or 9?
It says to use the sum, so 9.
> Question 5:
> For the 1.2 deliverables, we need to create charts for indegree and
> outdegree. What exactly should we put in these? What does it mean by
> "distribution"? Are we just outputting a range of indegrees/outdegrees
> for every vertex for the graphs given, or is it somethign else?
From looking at the graph, I should be able to tell how many vertices
have a given indegree. Notice that there is just one indegree graph, so
you should fit both Twitter and LiveJournal graphs on to this (no need
to show the small ones, just the large ones). Thus, each graph will
have two lines showing the way in which indegree is distributed across
vertices.
-Robert
-Nikos
I am not sure, what you mean by "non-representative". At some point,
in order to compute a MaxST, especially if you are doing Kruskal's
algorithm, you need to sort a list of edges.
-Nikos
In any case I think we should wait and see what Robert or Steve had in
mind for this question.
-Nikos
You should probably not store max st between invocations as the graph
may change dramatically.
-Robert
-Robert