Find the minimum number of nodes n on a graph, that satisfies the following properties:
Now, prove that a solution exists only for odd values of m . Let n ( m ) denote n as a function of m . Hence, n ( 3 ) = 6 .
Find the value of n ( 7 ) + n ( 2 1 ) .
Note : Consider this to be a graph theory question and hence no practical notions of a room apply. Each room is nothing but a node on a graph and can be connected to any other room, and not just "adjacent" ones, as would be the case with real rooms. The graph can even be fully connected.
Inspiration : A Ted-Ed video . In the video, they consider each room to be connected to 3 other rooms. What if each room were connected to m rooms instead? Let the number of rooms be n in this case, in the video, m = 3 yields n = 6 .
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.
Great analysis of the problem + generalizing to all values :)
Relevant wiki: Graph Theory
Consider the last n − 1 nodes, each with degree m to conclude ( n − 2 ) m + m − 1 = ( a ) 2 ∣ E ∣ ≤ ( b ) 2 ( 2 n − 1 ) = ( n − 1 ) ( n − 2 ) , where the equality (a) follows from the Handshaking lemma and (b) follows from the maximum number of edges in a graph with n − 1 nodes. From the equality (a) it follows that m must be odd and n must be even. Plugging in m = 7 , 2 1 we get the minimum values of n , which is not difficult to see to be feasible.
Relevant wiki: Graph Theory
The general formula for n is:
n ( m ) = m + 3 ; ∀ odd m ≥ 3
Let the number of edges on a graph be
k
.
An important observation is to note that
k = 2 ( n − 1 ) ∗ m + 1 .
This immediately allows us to eliminate all even m . Because if m is even, then k won't be an integer. Hence no solution exists for even m .
It is also a trivial observation that a valid graph will have atleast
m
+
1
nodes.
Our proposed answer is
m
+
3
. So, first we prove that
m
+
2
can never be a solution:
That is very easy. Again just substitute n = m + 2 into the equation for k . Using the fact that m is odd, prove that k will not be an integer. Hence m + 2 can never be a solution.
Next we consider our proposed solution of n = m + 3 . In this case, we can always construct a valid solution as follows:
Let the rooms be labelled as x 1 , x 2 , . . . x m + 3 .
We have created a valid graph!
Having proven our result,
n
(
7
)
+
n
(
2
1
)
=
(
7
+
3
)
+
(
2
1
+
3
)
=
3
4
Nice problem, @Shashwat Shukla ! (+1)
Glad you liked it :)
Avoid double duty on your notation. IE n ( ⋅ ) is a function and n is the number of nodes.
Problem Loading...
Note Loading...
Set Loading...
We claim that:
n ( m ) = ⎩ ⎪ ⎨ ⎪ ⎧ 2 m + 3 undefined if $m = 1$ if $m$ is odd, $m > 1$ if $m$ is even
For the special case m = 1 , it's enough to have 2 vertices; just connect them. Clearly it's impossible with only 1 vertex, since this sole vertex must be adjacent to something else.
For odd m > 1 , note that the sum of degrees of all vertices must be even (degree sum formula or double counting; each edge contributes two to the sum). But this sum is equal to 1 + ( n − 1 ) m ; 1 for the odd vertex, and m for each of the remaining n − 1 vertices. Since m is odd, we must have n − 1 odd, so n even. Additionally, we also need n > m ; in a simple graph, the degree of a vertex must be strictly less than the number of vertices (there are only n − 1 other vertices, so the degree must be no greater than n − 1 ). Thus the candidates are m + 1 , m + 3 , … .
n = m + 1 vertices aren't enough. n − 1 = m of the vertices must be adjacent to m other vertices; since there are only m other vertices, these m vertices are adjacent to all other vertices. But this means the odd vertex is adjacent to all these m vertices, impossible.
n = m + 3 is easy to make. Label the vertices v 0 , v 1 , v 2 , … , v m + 2 . Let v 0 be adjacent to v m . v m is adjacent to everything other than v m + 1 and v m + 2 . For 0 < 2 i − 1 < m , v 2 i − 1 is adjacent to everything other than v 0 and v 2 i , and for 0 < 2 i < m , v 2 i is adjacent to everything other than v 0 and v 2 i − 1 . v m + 1 , v m + 2 are both adjacent to everything other than v 0 and v m . It can be verified that this works.
For even m , we can again apply the degree sum formula. The sum of degrees is 1 + ( n − 1 ) m , which must be even. But m is even, so this sum is always odd, contradiction. Thus n ( m ) is not defined for even m .
Finally, we just plug in: n ( 7 ) + n ( 2 1 ) = ( 7 + 3 ) + ( 2 1 + 3 ) = 3 4 .