News for hackers. Stuff that matters.
Re:programming challenge by lisper on Sunday October 17, 2010 @03:12AM (#1799846)
View source on the home page is interesting too.
Re:programming challenge by Natsu on Sunday October 17, 2010 @03:22AM (#1799860)
I was kind of hoping it would explain what Glyphtree is, but it's a riddle/poem.

It has me wondering how 'loser' is defined and if a person can be their own 'friend' ... (read their riddle poem if that makes no sense to you).

Re:programming challenge by sharpneli on Sunday October 17, 2010 @11:57AM (#1800611)
"the world is a sphere, and friends don't cross each other."

My guess would be that the social graph needs to be planar (e.g embeddable on a plane so that no edges go across eachother).

The world is a sphere can be interpreted in too many ways. One would be that there exists a hamiltonian cycle for the graph and other would be that if you do a depth first search you'd always hit yourself eventually.

My strong guess would be that 2 friends is the least and the most a loser may have.

Biggest problem with too smart puzzles such as this is that there are way too many ways to legitimately interpret them.

Re:programming challenge by jaekwon on Sunday October 17, 2010 @12:04PM (#1800634)
The social graph need not be planar, say if the world is a donut.
Re:programming challenge by sharpneli on Sunday October 17, 2010 @12:39PM (#1800733)
I'd consider that a minor adjustment as it would still essentially be a planar graph (with periodic boundary conditions). Locally both of the cases look identical.

Just checked wiki while writing this and toroidal embeddings are a subclass of planar graphs.

Re:programming challenge by jaekwon on Sunday October 17, 2010 @12:53PM (#1800769)
I'm sorry, the puzzle is asking for a global property. The new text has the adjustments.
Re:programming challenge by sharpneli on Sunday October 17, 2010 @01:56PM (#1800916)
I think I got it now. Don't read this if you are afraid of possible spoiling.

We are looking for a graph with highest possible minimum vertice count for any single node. The answer is 6. This graph comes from simply making a hexagonal tiling with node on center and vertices going trough edges. Any tiling with more angles does not produce a planar graph and we'd have to insert polygons with less vertices and thus less neighbours and therefore lowering the smallest edge count.

Re:programming challenge by lisper on Sunday October 17, 2010 @02:49PM (#1801061)
I don't think it's possible to tile a sphere with hexagons. You have to throw a couple of pentagons in.

http://en.wikipedia.org/wiki/Geodesic_dome

Re:programming challenge by sharpneli on Sunday October 17, 2010 @02:57PM (#1801085)
True. So for a spherical topology the largest minimum is 5. However for toroidal topology the largest minimum is 6.
Re:programming challenge by jaekwon on Sunday October 17, 2010 @11:41AM (#1800559)
the loser has the least number of friends. no, you can't friend yourself.