00:01
So for this question, we're trying to show that a simple graph with n vertices must be connected if it has greater than, oh, sorry, greater than n minus 1 times n minus 2 over 2 edges.
00:31
So one way to do this is to show that if this simple graph, so our logic is if the graph is not, connected, then the max number of edges is n minus 1 times n minus 2 over 2.
00:58
That's one way to solve this problem, right? because if the max number of edges in a non -connected graph is this number, then that means that if you have more than this number of edges, then you must be connected.
01:11
So that's the, essentially the overview of how we're going to solve this problem.
01:16
So without loss of generality, suppose that the graph is not connected.
01:21
Then let's say one component has k vertices, where k is just a number from like one to n minus one.
01:27
So k vertices in one component, that means that there are n minus k vertices split among at least one other component, right? we don't know if they're all in a separate component or if they're like all separate at least one other component.
01:52
So if we show that this graph can't have more than this number of edges, we're good.
02:03
So we want to maximize, maximize the number of edges in this graph, in this graph, in the graph above.
02:14
And the way to do that is by assuming, right, as we said before, the maximum number of edges in a simple graph occurs when the graph is complete and so let's assume that this is a complete component.
02:30
So if we maximize that, we get that this we have k choose two vertices in this complete component.
02:36
And then to maximize the number of edges in this, we assume that they're all in one component and that it's a complete component as well.
02:48
So the number of met.
02:50
So we've maximized the number of edges in this graph by assuming that both of these components are complete and then that gives us k squared minus n k plus n squared minus two n over two that's this is the maximum number of edges in the in this in this graph and so we want to maximize this expression right um so we realize if we look at uh it's a this is a parabola shaping upward right if we find its vertex its vertex it's vertex it's vertex a occurs by calculus at n over 2.
03:30
We just take the derivative.
03:32
So we will get 2k minus n is equal to 0.
03:36
So n is equal to k over 2.
03:39
No, k is equal to n over 2, sorry.
03:42
And so our vertex is here.
03:44
That means that its maximum will be at the bounds, right? it'll be greatest, farthest away from n over 2.
03:51
So we know that the bound, the domain, right, for k is 1 to n minus 1.
04:02
Luckily, that's the metric about n over 2...