The country of Brilliant has towns. Some pairs of towns are connected via two-way railroads. No town is connected to itself.
A set of towns is called good if is even, and is connected to , is connected to , , is connected to and is connected to (note that connectivity is mutual, i.e. if is connected to , is connected to ). In other words, a good set is a cycle containing an even number of vertices.
There are a total of railroads in the country. Find the smallest value of such that no matter how the railroads are connected, given that there are a total of railroads, there must always exist a good set of cities.
Details and assumptions - All railroads are distinct, i.e. no two railroads connect the same pair of cities. - No railroad connects a city to itself. - This problem is not original.
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.
We need the smallest m that will force us to make an even cycle. with m smaller than the required answer we must be able to make free lines or cycles which do not have a common edge.
In other words we have to be forced to draw two odd cycles with a common edge.
The most efficient odd cycle will be a triangle , if this is not already evident it will become clearer as the solution progresses.
For the first triangle we make we will need to incorporate three vertices. For subsequent triangles we will need to incorporate at least two vertices. Hence number of triangles we can form without running out of vertices is.
1007 (floor 2015/2).
No of lines drawn = 1007*3=3021.
When we draw another line(track) we will create an even cycle.
Thus answer =3021+1=3022