Page 1 of 1

### Special case of Hamiltonian cycle

Posted: Sun Feb 13, 2005 9:47 am
I need help with:
http://acm.sgu.ru/problem.php?contest=0&problem=122
If you don't want to open it, the problem is:
You have an undirected graph with N vertices. Each vertex has at least (N+1)/2 neighbours. Needed is to construct a hamiltonian cycle. I guess it is assumed that it always exists.
I heard people talk about some vertex merging technique, but I just couldn't come up with it. Too old and too dumb maybe. HEEEEELP!

### Re: Special case of Hamiltonian cycle

Posted: Sun Feb 13, 2005 1:59 pm
alex[LSD] wrote:I need help with:
http://acm.sgu.ru/problem.php?contest=0&problem=122
If you don't want to open it, the problem is:
You have an undirected graph with N vertices. Each vertex has at least (N+1)/2 neighbours. Needed is to construct a hamiltonian cycle. I guess it is assumed that it always exists.
I heard people talk about some vertex merging technique, but I just couldn't come up with it. Too old and too dumb maybe. HEEEEELP!
Read the first section of this paper (Proof of Ore's theorem) :
http://www.ecp6.jussieu.fr/pageperso/ bondy/research/papers/shortproofs.ps

The proof implicitly gives an algorithm (O(V^2) if I am not mistaken) . Also there is a typo in the proof, so replace every occurence of "S+" with "S"

Posted: Sun Feb 13, 2005 4:01 pm
Wow! You are everywhere! Great!
Thanks for the link, if by V you mean the number of vertices, than the ALGO looks pretty much like the one everybody has used.
10k u very much!

Posted: Sun Feb 13, 2005 7:18 pm
Got AC, sad that I can't come up with trics like this.

Posted: Sun Feb 13, 2005 9:24 pm
alex[LSD] wrote:Got AC, sad that I can't come up with trics like this.
I don't know if that can make you feel better, but I didn't come up with it either. I just had studied the theorem (and its proof) when I was at university