hn.today

Dirac's Theorem at a Dinner Party

prideout.net15 points6 comments
Screenshot of Dirac's Theorem at a Dinner Party

Dirac’s theorem gives a sufficient condition for a simple graph to contain a Hamiltonian cycle: with n vertices, if every vertex has at least n/2 neighbors, the graph has a cycle that visits every vertex exactly once and returns to its start. The condition formalizes the intuition that a graph with enough connections is likely to support such a route. Hamiltonian cycles arise in problems such as delivery-route planning and finding ways to render a triangle mesh as one triangle strip. The theorem is introduced through a dinner-party analogy: guests are vertices, friendships are edges, and a Hamiltonian cycle is a circular seating in which everyone sits between two friends.

The proof starts with guests in any seating order and treats adjacent strangers as gaps. A flip reverses a stretch of the seating order; when chosen using two crossing friendships, it replaces the gap with friend-to-friend adjacencies and creates no new gaps. To show a suitable flip always exists, the argument assigns one kind of potato to each friend of one guest and another kind to each friend of the adjacent stranger. After the first guest passes their potatoes one seat clockwise, those potatoes must land among the other guests. Since the guests’ combined friendship counts provide at least as many potatoes as there are guests, someone receives two; those two potatoes identify the crossing friendships needed for a flip. The degree condition ensures this count, so repeated flips eliminate every gap and yield the required seating - and thus a Hamiltonian cycle.

Read on prideout.net6 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Science

Mass destruction of weapons

Mass destruction of weapons

The U.S. spent decades dismantling its chemical weapons stockpile, sometimes releasing dangerous materials into nearby communities with little public notice. A planned destruction of unstable lead azide in Iowa highlights the risks and the newer push to inform residents about toxic plumes. (computer.rip)

Hack's Law

Hack's Law

Hack’s law describes how a river’s longest stream grows with the area of its drainage basin: length scales roughly as basin area to a power just below 0.6. The relationship also applies to river deltas and small unchanneled surfaces, and is named after geomorphologist John Tilton Hack. (en.wikipedia.org)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.