I'm launching a political movement and we're keeping track of who invites who via an invite ID.
In our member's area, I would like to display a tree (something that looks like a giant sequoia), where each member who referred another member is a branch, and each member who did not refer another member is a leaf. The trunk of the tree can member #001, since member 001 will be recruiting by far the most people. (e.g. the trunk might be VERY tall, and individual branches (large and small) will branch off from the trunk.
IN YOUR BID, PLEASE DESCRIBE WHAT YOUR GENERAL APPROACH WILL BE TO ACCOMPLISH THE DETAILS BELOW:
We're running the membership area on a LAMP server, but this won't be a web-based program. My idea is that we can run your program each time a new member signs up, or once an hour if we get super popular, and output a PNG24 image. That way the web server just displays a simple image when requested.
For input, just assume you have a mysql db with a table of members that includes member ID, ReferringMemberID and JoinDate. The ReferringMemberID of 001 would be 001.
The output of the program would be a lossless graphic image (e.g. PNG24) and also the x,y location of every member in the tree. We would store the x and y values in a separate table called MemberTreeLocation, with columns MemberID, x and y (that way we can just delete the table and re-create it each time the program runs instead of doing a zillion updates to the member table).
I would like the image to look as beautiful as possible while keeping each person's referrals as visible as possible. In general, I would like people with an earlier join date to be lower on the tree.
We expect that a few members will be super-members (referring a lot of people), that some will refer just a few people, and most members will just be leaves.
Part of this project is for you to create sample data, with many different scenarios, and showing that your algorithm looks good no matter what (whether there are just 10 members in the movement, or a million)
That's about it. I'll leave the rest to your imagination. I am open to other ideas to make this feasible, as long as it still looks like a tree and I can point to the X,Y location of individual members.