Consider a simple graph with 505 vertices. Each vertex is joined to exactly N others. How many different possible (non-negative, integer) values of N can there be?
Details and assumptions
A simple graph does not have multiple edges between vertices or self loops.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Nice solution! Dang, forgot about the N=0 case!!!
nice and concrete solution!
It is known that a simple regular graph of degree N and number of vertices v will exist iff v ≥ N + 1 and v n ≡ 0 ( m o d 2 ) . Here we have v = 5 0 5 . The necessary conditions are:
There are ⌊ 2 5 0 4 ⌋ + 1 = 2 5 3 possible values of N .
Can you show how you got v n ≡ 0 ( m o d 2 ) ?
Log in to reply
It is a fairly well known result. You can see the proof here .
Let's start to analyze simpler settings. 505 is an odd number, so we'll consider only settings with an odd number of vertice.
1 vertice: this is the simplest graph, N can only be 0 (no edges). N=0, obviously, is a valid solution for all graphs.
3 vertices: N could be 0, 1, 2. N=0 is acceptable. N=1 is not an acceptable solution; indeed only an edge (N=1) means to join pair of vertices, but the vertices are odd, therefore there will always be one of them unpaired. N=2, in all graphs, means to join sequentially the vertices and to build a shape; so it's always possible. Concluding for 3 vertices N can be 0 and 2.
5 vertices: N could be 0, 1, 2, 3, 4. For the above reasons 0 is acceptable, 1 is unacceptable, 2 is acceptable. N=3 is unacceptable indeed there will always be a vertice with one more or less edge then 3. N=4 is acceptable and it means join all vertices together. Whit n vertices it's always possible to use n-1 edges, joining all vertices together; so N=n-1 it' always acceptable. So for 5 vertices N can be 0, 2 and 4
Trying more with 7 vertices you can find that N can be 0, 2, 4 and 6.
We can conclude for induction that N with n (where n is an odd integer) vertices can always be an even number between 0 and n-1 including. So all possible N are (n+1)/2 and for 505 vertices the answer is 253.
N must be even for there are 5 0 5 N / 2 edges. We show that every possible even N actually occurs. The construction is as follows -- arange vertices in a circle. Connect every vertex to a vertex with a distance less or equal than N / 2 (there are precisely N such neighbors). This defines a graph because the distance function is symmetric. We are done and so the answer is ( 5 0 5 + 1 ) / 2 = 2 5 3 (don't forget the disconnected graph with no edges!).
According to Erdős–Gallai theorem ( http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Gallai_theorem ) N satisfies the condition if and only if N is even. Even numbers between 0 (inclusive) and 505 are 253.
Well if there are 505 vertices, clearly the number of connections is 505N/2, which must be an integer. This occurs when N=0,2,4,...504 or 253 values of N
A graph must have even number of odd vertices.
The proof of this is the same as the first worked example here .
Since it is given that the number of vertices is 505(which is undeniably odd :P) and each vertices have same number of edges protruding from it,the number of edges ie N must be even. The number of even numbers upto 505 is 253,and thus we arrive at the answer.
As pointed out by Sreejato, this solution only shows a necessary condition, but not a sufficient condition.
You also have to show the existence of such a graph.
Log in to reply
So where is your counterexample?
Log in to reply
If you're posting a proof it's on you to prove it, not just to say "well nobody has posted a counterexample" :)
Log in to reply
@Matt McNabb – But is it not enough to have the degrees even?
Log in to reply
@Soham Chanda – It is, but you didn't prove that it is. Just based on what you've written, it could have turned out that there are some such graphs for which you can't draw edges in such a way that all vertices have the same number of edges.
Unfortunately, I cannot provide any counterexample, as the sufficient condition holds true (which you skipped).
We start by counting the total edges. 5 0 5 vertices with N edges per vertex means 5 0 5 N edges, but since each edge is counted twice from the two vertices it connects, we divide by 2 to get 2 5 0 5 N edges. Therefore N is even. Since 0 ≤ N ≤ 5 0 4 , there are 2 5 3 possibilities for N .
You also have to show such a graph exists.
Did you manually alter the default profile image in Brilliant?
Problem Loading...
Note Loading...
Set Loading...
To count the total number of edges, we can count the number of edges leaving each vertex, and divide the result by 2 since we counted each edge twice. In this case, for a graph of M = 2 m + 1 vertices where each vertex has N connections, the total number of edges is E = 2 ( 2 m + 1 ) N
from which it follows that N must be even. Also , clearly we must have n < m .
Now we will show that every possible value 2 n has an associated graph.
Label the vertices V 0 , V 1 , V 2 , . . . , V 2 m and let G n be the graph with these vertices such that vertices V i and V j are connected by an edge if and only if i − j ≡ x m o d M or i − j ≡ − x m o d M for some integer 0 < x ≤ n .
It follows directly from this definition that any particular vertex V a is connected to all vertices V b such that b ≡ a ± x m o d M for all 0 < x ≤ n .
These possible values of b are all distinct because 2 n < M . Therefore V a is connected to exactly 2 n vertices, and G n is a graph where all vertices are connected to exactly 2 n others.
Since n can range from 0 to m in this proof, and if M = 5 0 5 then m = 2 5 2 , there are 2 5 3 possible values of n .