PDA

View Full Version : Best Programming Question I have ever seen



Random_Dude
June 1st, 2011, 10:34 PM
I thought I would share this one with you:
http://stackoverflow.com/questions/6163683/cycles-in-family-tree-software

Cheers :cool:

Throne777
June 1st, 2011, 10:44 PM
I thought I would share this one with you:
http://stackoverflow.com/questions/6163683/cycles-in-family-tree-software

Cheers :cool:

Someone's got to be pulling someone else's leg somewhere. I find it very hard to believe someone would openly admit to fathering children with his own daughter to a company.

On a related note, that family tree must be more like a stump.

earthpigg
June 1st, 2011, 11:35 PM
Someone's got to be pulling someone else's leg somewhere. I find it very hard to believe someone would openly admit to fathering children with his own daughter to a company.

Unless he's already been convicted and done his time.

jerenept
June 2nd, 2011, 01:20 AM
if (father=son) or (mother=daughter) then
writeln('WTF?') else
writeln('Valid family tree');

Output: WTF? <--- my opinion.

sisco311
June 2nd, 2011, 01:34 AM
if user="Woody Allen"
then
error
else
please enter your username, but don't use spaces or newlines
fi

:evil:

NovaAesa
June 2nd, 2011, 02:48 AM
You can always end up with cycles in a family tree without marriages from people within the same bloodline. E.g. Alice and Bob who are brother and sister can marry Charlie and Donna who are also brother and sister.

forrestcupp
June 2nd, 2011, 02:57 AM
That's just amazing. It kind of reminds me of the old song I'm My Own Grandpa.

3Miro
June 2nd, 2011, 03:03 AM
You can always end up with cycles in a family tree without marriages from people within the same bloodline. E.g. Alice and Bob who are brother and sister can marry Charlie and Donna who are also brother and sister.

That is not a cycle, it is still a valid three.

The problem in the case of incest is that Father -> Daughter -> Grand Daughter and Father -> Grand Daughter both lead from Father to Grand Daughter, which by definition is not three.

AB Parents -> A + C -> A + C children
AB Parents -> B + D -> B + D children
CD Parents -> A + C -> A + C children
CD Parents -> B + D -> B + D children

All links are unique. This is not a three in the strictest of definitions, but there is still only way to go from a node to a node if you only traverse "up-to-down".

mmsmc
June 2nd, 2011, 04:06 AM
if (father=son) or (mother=daughter) then
writeln('WTF?') else
writeln('Valid family tree');

Output: WTF? <--- my opinion.




well, there you go, need we say any more?

Bandit
June 2nd, 2011, 04:15 AM
How can I resolve those errors without removing all data assertions?

Answer: Quit selling to West Virginia!

Bandit
June 2nd, 2011, 04:18 AM
Unless he's already been convicted and done his time.

Its not illegal if she is of age. But its still damn wrong!:lolflag:

mkendall
June 2nd, 2011, 06:10 AM
Its not illegal if she is of age.

Actually, yes it is. Ask David Epstein.

Random_Dude
June 2nd, 2011, 09:02 AM
That's just amazing. It kind of reminds me of the old song I'm My Own Grandpa.

http://media.giantbomb.com/uploads/2/29661/1095675-futurama_fry_looking_squint_super.jpg

Shibblet
June 2nd, 2011, 10:01 AM
Wait a second?!?! How did that guy know how to use a computer in the first place?

Never mind, I answered my own question. He has to know how to find all of the sexual prey.

Next on "To Catch A Predator" Men who use genealogy software to score...

sectshun8
June 2nd, 2011, 10:12 AM
That link is so much win... just rolling over here :D