Intersecting Intervals


সরলরেখার উপর $n$ টি ব্যাবধি দেয়া আছেঃ $[l_1,r_1], [l_2,r_2], [l_3, r_3], \dots,[l_n, r_n]$ । ব্যবধিগুলোকে আমরা দুইটি সেট এ ভাগ করতে পারি যেন একই সেট এর কোনও দুইটি ব্যবধির মাঝে সাধারণ কোন অংশ না থাকে। প্রমাণ কর যে, সর্বোচ্চ $n-1$ সংখ্যক জোড়া ব্যবধি আছে যাদের মাঝে সাধারণ অংশ বিদ্যমান।


Proof Based Problems  


  0 Upvote                    1 Downvote


Solution

Disclaimer: The solutions we've shared are just one exciting approach, and there are surely many other wonderful methods out there. We’d love to hear your alternative solutions in the community thread below, so let's keep the creativity flowing!

The given condition actually states that, no point in the number line is part of more than two intervals. Because, if some point was part of three or more intervals, we could not divide those intervals into two sets as they all overlapped each other.

We prove this by induction. Base case $n=2$ is trivial. Now, assume the statement is true for $n=k$. If there are $k+1$ intervals, consider the left-most interval, or to be exact, the interval with the least $r_i$. Notice that this interval can overlap at most one other interval otherwise it would not satisfy the given condition. Let's say we remove this interval, then we are back to $k$ intervals, which can have at most $k-1$ overlapping intervals. So for $k+1$ intervals, we can have at most $k-1+1=k$ intervals and we are done.


Remarks:

We are not actually done here. We must show at least one configuration with $n-1$ overlapping intervals. However, this configuration is easy enough. Just let every interval (except the left-most and right-most ones) overlap only its neighboring two intervals.

This is a proof based problem added for learning purposes and does not accept submissions.

You can view the solution by clicking on the solution tab.

Editorial



Need a hint? Checkout the editorial.

View Editorial