Skip to main content

Graph Theory: Euler, hamilton

Heyy! Welcome Back to my blog!

 Today we are doing Graph Theory. This post is a continuation of a previous post which if you are interested in here. I somehow always get scared when someone mentions Graph theory. I have to overcome the fear. So here we go! I am writing some important theorems, terms, problems, etc that I learnt from the GT books! In short, notes.

Book referred: Daniel A Marcus, Graph Theory, A Problem Oriented Approach

Chapter F:

  • Euler Path: An Euler path in a graph $G$ is a path that includes every edge of $G$ exactly once. ( Not all graphs have Euler Paths)
  • Closed Euler Path: An Euler path is closed if it starts and ends at the same vertex.
  • Open Euler Path: Not closed.
Problem 1: Show that if a graph has at least one edge, and if all vertices have an even degree, then the graph must contain at least one cycle.
Proof: Suppose, it doesn't. Then consider a component of the graph $G.$ Then the component is a tree ( since it has no cycles). But we know a tree has at least $2$ nodes, which have an odd degree.

Problem 2: If a graph contains an Euler path, then it has $0$ or $2$ odd vertices.
Proof: Suppose there are more than $2$ odd vertices, then there is a vertex $A$ which is not the endpoints of the Euler path ( if it's not closed). Now, each time one visits $A,$ we will have to travel in and then out, in order to go to the next vertex.  Implying $A$ must be an even degree.

Problem 3: If a graph contains an Euler path and has $2$ odd vertices implies that the Euler path is open.
Proof: By the above problem, we get that "Non-end points" must-have degree even. So the two odd vertices must be endpoints of the euler path $\implies$ Euler path is open.

The Euler Path Theorem: 

1. A graph or multigraph contains a closed Euler path iff 
a. Every vertex has an even degree
b. All edges are in the component.

2. 
 A graph or multigraph contains an open Euler path iff 
a. Every vertex has an odd degree
b. All edges are in the component.

Proof: 
1. We know that the graph $G$ will contain a cycle $C.$ Now delete the cycle $C.$ Note that the new graph $G'$ will still have even degree vertices. And we will have a new cycle. Delete it and so on. Repeat the process. Note that this will continue till our graph becomes a cycle.

Now, we merge all these cycles. 
Say we have a cycle, $V_1\rightarrow V_2\rightarrow \dots \rightarrow V_k\rightarrow$ and we have another cycle, $V_i\rightarrow D_1\rightarrow \dots \rightarrow D_k\rightarrow V_i.$

Then consider this path, 
$$V_1\rightarrow V_2\rightarrow \dots V_{i-1}\rightarrow V_i\rightarrow D_1\rightarrow \dots \rightarrow D_k\rightarrow V_i\rightarrow \dots V_k$$

And we can repeat this process.

2. Let the two odd vertices be $A$ and $B.$ And the number of edges to be greater than $1.$ So $A$ and $B$ are not adjacent. Then join $AB.$ By part 1, we know there is a closed Euler path. So removing $AB$ we get an open Euler path.

The Euler Path Theorem directed version: 

1. A graph or multigraph contains a closed Euler path iff 
a. At each vertex, the in degrees $=$ out-degree 
b. All edges are in the component.

2. 
 A graph or multigraph contains an open Euler path iff 
a. At one vertex, in degree $-$ out degree $=1,$ at one vertex, out degree $-$ indegree$= 1,$ rest vertex have indegree$=$outdegree.
b. All edges are in the component.

Chapter G:

  • Hamilton Path: A hamilton path in a graph $G$ is a simple path that contains every vertex of $G.$
  • Hamilton Cycle: A cycle containing every vertex of $G.$


Problem 1: Suppose $G$ is a bipartite graph with $m$ vertices of one colour and $n$ vertices of the other colour. If $m\ne n,$ $G$ contains no hamilton cycle.

Proof: Let $X=\{v_1,\dots,v_m\},Y=\{d_1,\dots,d_n\}$ be the vertices. If hamilton cycle is being formed, the cycle would be of the form $(v_{i_1},d_{j_1},v_{i_2},\dots d_{j_x},v_{i_1}). $ Note that vertices of different colour are alternating, since all vertices are included once only, we get $m=n.$

Problem 2:  Suppose $G$ is a bipartite graph with $m$ vertices of one colour and $n$ vertices of the other colour. If $m-n\ge 2$ $G$ contains no hamilton cycle.

Proof: Similar proof, but we get $\max(m-n)=1.$

Using the above two problems, we get the following.

 $K_{m,n}$ contains a hamilton cycle iff $m=n.$

Problem 3: If $k$ vertices are removed from a graph that contains a hamilton path, then the number of components in the resulting subgraph is at most $k+1.$

Proof: Before removing the $k$ vertices, note that the graph was connected. Let $(d_1,d_2,\dots d_n)$ be the hamilton path. We remove $v_1,\dots,v_k.$ Then the hamilton path divides into $k+1$ parts. Consider $(d_1,\dots, d_i)$ such that $d_i$ was just before $v_1.$ Then the subgraph $(d_1,\dots, d_i)$ is connected. Similarly for the other subgraphs. Hence the number of components in the resulting subgraph is at most $k+1.$

Problem 4: If $k$ vertices are removed from a graph that contains a hamilton cycle, then the number of components in the resulting subgraph is at most $k.$

Proof: The proof is similar to the above. But then since it's a cycle, after removing we get $k$ parts.



Following are some fancy results that help us prove that the Hamilton cycle will exist. 

The path cyle principle:
Let $G$ be a graph with $n$ vertices, where $n\ge3,$ suppose that $G$ contains a hamilton path whose endpoints ( $A$ and $B$) satisfy the condition $d(A)+d(b)\ge n.$

Proof: Let the hamilton path be $(A,v_1,v_2,\dots,v_{n-2},B).$ 
If $A$ and $B$ are adjacent then we are done, so let's assume $A$ and $B$ are not adjacent. 
We try to get something of this form.

We want to get edges $Av_{i+1}$ and $Bv_i$ to exist in graph $G.$ And then we can consider the hamilton cycle $(v_{i+1},A,v_1,v_2\dots, v_i, B, v_{n-2},\dots, v_{i+1}).$


Now consider the set $S$ be the set of $i$ such $Av_{i+1}$ are adjacent and $1\le i\le n-3.$
And consider the set $T$ be the set of $i$ such $Bv_{i}$ are adjacent and $1\le i\le n-3.$

Then note that $|S|=d(A)-1,|T|=d(B)-1.$ And $d(a)+d(b)-2\ge n-2.$ So $S\cap T\ge 1.$


The Bondy-Chvatal Theorem: 
Let $G$ be a graph with $n$ vertices, where $n\ge 3$ and suppose that $G$ can be expanded to a larger graph $G'$ that contains a hamilton cycle, by adding edges once at a time in such a way that the following condition is satisfied.

The bondy-chvatal condition: An edge can be added joining vertices $A$ and $B$ if $A$ and $B$ are not already adjacent and if their degrees satisfy $d(A)+d(B)\ge n.$

Proof: Suppose $G$ does not contain any hamilton cycle but $G'$ is. Then there will be a stage when $G_k$ does not contain a hamilton cycle but $G_{k+1}$ does. Say edge we add while converting $G_k$ to $G_{k+1}$ is $CD.$ Then we have $CD$ part of the hamilton cycle, hence we have a hamilton path in $G_k$ with $CD$ endpoints. But we also have $d(C)+d(D)\ge n\implies$ hamilton cycle exist in $G_k$ by path cycle principle.


Ore's theorem:
Let $G$ be a graph with $n$ vertices, where $n\ge 3$ and suppose that $G$ satisfies 
Ore's adjacency condition Whenever $d(A)+d(B)<n$ for two vertices $A$ and $B,$ $A$ and $B$ are adjacent.
Then $G$ contains a hamilton cycle.

Proof: Consider two vertices  ( say $C$ and $D$) which are not adjacent in $G.$ Then we must have $d(C )+d(D)\ge n.$ And we can continue this process and get $K_n.$ But $K_n$ contains  hamilton cycle, so by bondy-chvatal theorem, we are done.


Dirac's theorem can be skipped since Posa's theorem is a stronger version anyways.

Dirac's theorem: 
Let $G$ be a graph with $n$ vertices, where $n\ge 3,$ and suppose that each vertex greater than or equal to $n/2.$ Then $G$ contains a hamilton cycle.

Proof: Note that we can join any two vertices as any two vertice degree sum is greater than n-1. Then at the end, we get a $K_n.$  But $K_n$ contains  hamilton cycle, so by bondy-chvatal theorem, we are done.


Posa's theorem: 
Let $G$ be a graph with $n$ vertices, where $n\ge 3$ and $d_1\le d_2\le \dots \le d_n$ be the degrees satisfy the condition

Posa's degree condition: $d_1>1,d_2>2,\dots d_i>i$ for all $i<n/2.$

Proof: We will try to complete the graph by joining to non adjacent vertices $A$ and $B$ with $d(A)+d(B)\ge n$ and we will eventually get $K_n.$ And we will be done by bondy-chvatal theorem.

If $d_1+d_2\ge n$ we are done, so let's assume $d_1+d_2<n.$
Note that $d_r+d_{r+1}\ge n$ for $r=[n/2].$
So there must be $2\le i\le r$ such that $$d_{i-1}+d_i< n, ~~ d_i+d_{i+1}\ge n.$$ So $d_i<n-i.$
Now let $A$ be the vertex having degree $d_i.$ Now consider the $n-i$ vertices which have degree $d_{i+1},d_{i+2},\dots, d_{n}.$ 
Since $d_i<n-1\implies $ there is a vertex which have degree $\ge d_{i+1}$ and is not adjacent to $A.$ We let that vertex be $B$ and join them. We are done.

 

Phew! That was a lot for me. I will post the sequel tomorrow!

Sunaina 💜



Comments

  1. Woah a lot of new stuff up there; nice post!

    PS: iirc Ore's theorem made it's appearance in INMO 21

    ReplyDelete
    Replies
    1. Hi Anand, long time no talk :pleading:.. Thanks a lot for commenting! And yes, I heard people mentioning Ore's theorem in INMO 21 was equivalent to 10+ marks... :O

      Delete

Post a Comment

Popular posts from this blog

Geometry ( Finally!!!)

 This is just such an unfair blog.  Like if one goes through this blog, one can notice how dominated  Algebra is!! Like 6 out of 9 blog post is Algebra dominated -_- Where as I am not a fan of Algebra, compared to other genres of Olympiad Math(as of now). And this was just injustice for Synthetic Geo. So this time , go geo!!!!!!!!!!!  These problems are randomly from A Beautiful Journey through Olympiad Geometry.  Also perhaps I will post geo after March, because I am studying combi.  Problem:  Let $ABC$ be an acute triangle where $\angle BAC = 60^{\circ}$. Prove that if the Euler’s line of $\triangle ABC$ intersects $AB$ and $AC$ at $D$ and $E$, respectively, then $\triangle ADE$ is equilateral. Solution:  Since $\angle A=60^{\circ}$ , we get $AH=2R\cos A=R=AO$. So $\angle EHA=\angle DOA.$ Also it's well known that $H$ and $O $ isogonal conjugates.$\angle OAD =\angle EAH.$ By $ASA$ congruence, we get $AE=AD.$ Hence $\triangle ADE$ is equilateral....

Problems I did this week [Jan8-Jan14]

Yeyy!! I am being so consistent with my posts~~ Here are a few problems I did the past week and yeah INMO going to happen soon :) All the best to everyone who is writing!  I wont be trying any new problems and will simply revise stuffs :) Some problems here are hard. Try them yourself and yeah~~Solutions (with sources) are given at the end! Problems discussed in the blog post Problem1: Let $ABC$ be a triangle whose incircle $\omega$ touches sides $BC, CA, AB$ at $D,E,F$ respectively. Let $H$ be the orthocenter of $DEF$ and let altitude $DH$ intersect $\omega$ again at $P$ and $EF$ intersect $BC$ at $L$. Let the circumcircle of $BPC$ intersect $\omega$ again at $X$. Prove that points $L,D,H,X$ are concyclic. Problem 2: Let $ ABCD$ be a convex quadrangle, $ P$ the intersection of lines $ AB$ and $ CD$, $ Q$ the intersection of lines $ AD$ and $ BC$ and $ O$ the intersection of diagonals $ AC$ and $ BD$. Show that if $ \angle POQ= 90^\circ$ then $ PO$ is the bisector of $ \angle AOD$ ...

Just spam combo problems cause why not

This post is mainly for Rohan Bhaiya. He gave me/EGMO contestants a lot and lots of problems. Here are solutions to a very few of them.  To Rohan Bhaiya: I just wrote the sketch/proofs here cause why not :P. I did a few more extra problems so yeah.  I sort of sorted the problems into different sub-areas, but it's just better to try all of them! I did try some more combo problems outside this but I tried them in my tablet and worked there itself. So latexing was tough. Algorithms  "Just find the algorithm" they said and they died.  References:  Algorithms Pset by Abhay Bestrapalli Algorithms by Cody Johnson Problem1: Suppose the positive integer $n$ is odd. First Al writes the numbers $1, 2,\dots, 2n$ on the blackboard. Then he picks any two numbers $a, b$ erases them, and writes, instead, $|a - b|$. Prove that an odd number will remain at the end.  Proof: Well, we go $\mod 2$. Note that $$|a-b|\equiv a+b\mod 2\implies \text{ the final number is }1+2+\dots ...

IMO 2023 P2

IMO 2023 P2 Well, IMO 2023 Day 1 problems are out and I thought of trying the geometry problem which was P2.  Problem: Let $ABC$ be an acute-angled triangle with $AB < AC$. Let $\Omega$ be the circumcircle of $ABC$. Let $S$ be the midpoint of the arc $CB$ of $\Omega$ containing $A$. The perpendicular from $A$ to $BC$ meets $BS$ at $D$ and meets $\Omega$ again at $E \neq A$. The line through $D$ parallel to $BC$ meets line $BE$ at $L$. Denote the circumcircle of triangle $BDL$ by $\omega$. Let $\omega$ meet $\Omega$ again at $P \neq B$. Prove that the line tangent to $\omega$ at $P$ meets line $BS$ on the internal angle bisector of $\angle BAC$. Well, here's my proof, but I would rather call this my rough work tbh. There are comments in the end! Proof Define $A'$ as the antipode of $A$. And redefine $P=A'D\cap (ABC)$. Define $L=SP\cap (PDB)$.  Claim1: $L-B-E$ collinear Proof: Note that $$\angle SCA=\angle SCB-\angle ACB=90-A/2-C.$$ So $$\angle SPA=90-A/2-C\implies \ang...

My experiences at EGMO, IMOTC and PROMYS experience

Yes, I know. This post should have been posted like 2 months ago. Okay okay, sorry. But yeah, I was just waiting for everything to be over and I was lazy. ( sorry ) You know, the transitioning period from high school to college is very weird. I will join CMI( Chennai Mathematical  Institue) for bsc maths and cs degree. And I am very scared. Like very very scared. No, not about making new friends and all. I don't care about that part because I know a decent amount of CMI people already.  What I am scared of is whether I will be able to handle the coursework and get good grades T_T Anyways, here's my EGMO PDC, EGMO, IMOTC and PROMYS experience. Yes, a lot of stuff. My EGMO experience is a lot and I wrote a lot of details, IMOTC and PROMYS is just a few paras. Oh to those, who don't know me or are reading for the first time. I am Sunaina Pati. I was IND2 at EGMO 2023 which was held in Slovenia. I was also invited to the IMOTC or International Mathematical Olympiad Training Cam...

Solving Random ISLs And Sharygin Solutions! And INMO happened!!

Some of the ISLs I did before INMO :P  [2005 G3]:  Let $ABCD$ be a parallelogram. A variable line $g$ through the vertex $A$ intersects the rays $BC$ and $DC$ at the points $X$ and $Y$, respectively. Let $K$ and $L$ be the $A$-excenters of the triangles $ABX$ and $ADY$. Show that the angle $\measuredangle KCL$ is independent of the line $g$ Solution: Note that $$\Delta LDK \sim \Delta XBK$$ and $$\Delta ADY\sim \Delta XCY.$$ So we have $$\frac{BK}{DY}=\frac{XK}{LY}$$ and $$\frac{DY}{CY}=\frac{AD}{XC}=\frac{AY}{XY}.$$ Hence $$\frac{BK}{CY}=\frac{AD}{XC}\times \frac{XK}{LY}\implies \frac{BK}{BC}=\frac{CY}{XC}\times \frac{XK}{LY}=\frac{AB}{BC}\times \frac{XK}{LY} $$ $$\frac{AB}{LY}\times \frac{XK}{BK}=\frac{AB}{LY}\times \frac{LY}{DY}=\frac{AB}{DL}$$ $$\implies \Delta CBK\sim \Delta LDK$$ And we are done. We get that $$\angle KCL=360-(\angle ACB+\angle DKC+\angle BCK)=\angle DAB/2 +180-\angle DAB=180-\angle DAB/2$$ Motivation: I took a hint on this. I had other angles but I did...

IMO Shortlist 2021 C1

 I am planning to do at least one ISL every day so that I do not lose my Olympiad touch (and also they are fun to think about!). Today, I tried the 2021 IMO shortlist C1.  (2021 ISL C1) Let $S$ be an infinite set of positive integers, such that there exist four pairwise distinct $a,b,c,d \in S$ with $\gcd(a,b) \neq \gcd(c,d)$. Prove that there exist three pairwise distinct $x,y,z \in S$ such that $\gcd(x,y)=\gcd(y,z) \neq \gcd(z,x)$. Suppose not. Then any $3$ elements $x,y,z\in S$ will be $(x,y)=(y,z)=(x,z)$ or $(x,y)\ne (y,z)\ne (x,z)$. There exists an infinite set $T$ such that $\forall x,y\in T,(x,y)=d,$ where $d$ is constant. Fix a random element $a$. Note that $(x,a)|a$. So $(x,a)\le a$.Since there are infinite elements and finite many possibilities for the gcd (atmost $a$). So $\exists$ set $T$ which is infinite such that $\forall b_1,b_2\in T$ $$(a,b_1)=(a,b_2)=d.$$ Note that if $(b_1,b_2)\ne d$ then we get a contradiction as we get a set satisfying the proble...

Challenging myself? [Jan 15-Jan 27]

Ehh INMO was trash. I think I will get 17/0/0/0-1/3-5/10-14, which is def not good enough for qualifying from 12th grade. Well, I really feel sad but let's not talk about it and focus on EGMO rather.  INMO 2023 P1 Let $S$ be a finite set of positive integers. Assume that there are precisely 2023 ordered pairs $(x,y)$ in $S\times S$ so that the product $xy$ is a perfect square. Prove that one can find at least four distinct elements in $S$ so that none of their pairwise products is a perfect square. I will use Atul's sol, cause it's the exact same as mine.  Proof: Consider the graph $G$ induced by the elements of $S$ and edges being if the products are perfect squares. Note that if $xy = a^2$ and $xz = b^2$, then $yz = \left( \frac{ab}{x} \right)^2$, since its an integer and square of a rational number its a perfect square and so $yz$ is an edge too. So the graph is a bunch of disjoint cliques, say with sizes $c_1, c_2, \cdots, c_k$. Then $\sum_{i=1}^k c_i^2 = 2023$, which ...

Introduction

  Hey Everyone!! This is my first Blog post. So let me give a brief introduction about myself. I am Sunaina Pati. I love solving Olympiad math problems,  learning crazy astronomical facts , playing hanabi and anti-chess, listening to Kpop , love making diagrams in Geogebra and  teaching other people maths 😊 . I love geometry , number theory and Combinatorics . I am starting this blog to keep myself a bit motivated in doing studies 😎 . Right now, I am planning to write walkthroughs on some of the best problems I tried over the week which can refer for hints 'cause solutions contain some major spoilers and one learns a lot while solving the problem on his own rather than seeing solutions . Also, there will be some reviews about Kpop songs, study techniques, my day to day lifestyles,exam reviews and ofc some non-sense surprises 😂.  I am planning to  try  posting every week on Sundays or Saturdays ( most probably) ! Though there is no guarantee about when I ...

Orders and Primitive roots

 Theory  We know what Fermat's little theorem states. If $p$ is a prime number, then for any integer $a$, the number $a^p − a$ is an integer multiple of $p$. In the notation of modular arithmetic, this is expressed as \[a^{p}\equiv a{\pmod {p}}.\] So, essentially, for every $(a,m)=1$, ${a}^{\phi (m)}\equiv 1 \pmod {m}$. But $\phi (m)$ isn't necessarily the smallest exponent. For example, we know $4^{12}\equiv 1\mod 13$ but so is $4^6$. So, we care about the "smallest" exponent $d$ such that $a^d\equiv 1\mod m$ given $(a,m)=1$.  Orders Given a prime $p$, the order of an integer $a$ modulo $p$, $p\nmid a$, is the smallest positive integer $d$, such that $a^d \equiv 1 \pmod p$. This is denoted $\text{ord}_p(a) = d$. If $p$ is a primes and $p\nmid a$, let $d$ be order of $a$ mod $p$. Then $a^n\equiv 1\pmod p\implies d|n$. Let $n=pd+r, r\ll d$. Which implies $a^r\equiv 1\pmod p.$ But $d$ is the smallest natural number. So $r=0$. So $d|n$. Show that $n$ divid...