Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Pyramid Scheme


Message #1 by "Thea Burger" <theab@l...> on Mon, 25 Mar 2002 13:01:58
Are you trying to do balanced queuing?  I *think* i understand what you're 
trying to do... So your doing load balancing? 

> Hi, All!!

> The project I am working on is giving my nightmares...I have to build a 
p> yramid scheme for a client.(they won't agree that it's a pyramid 
scheme, 
b> ut well.)
I>  am doing this in ASP.NET, but I don't know how I have to go about so 
all 
t> he records will be inserted in the right place. Especially the re-
entries 
i> s giving me headaches!!!!

> Please, is there anyone that can point me into a direction, or someone 
t> hat has done something like this before?? It is quite urgent.
B> elow is a summary - hope you understand.

> ANY HELP WOULD BE APPRECIATED!!!

> Thanks!!!
T> hea

> What needs to be done:

> When a client(r) signs on, they give a reference number of the person 
that 
r> eferred them(a).
B> ut (a) can only have 3 people underneath him.
	> 		a
	> 	      / | \
	> 	     b  c  d
	> 	    /
	> 	  (r)

> So, my program must insert (r) in the first open place from top to 
bottom, 
f> rom left to right.
I> n the above picture it would be just under (b)
A> nd in the picture below it would be under (c)
	> 		 a
	> 	      /  |  \
	> 	   b     c    d
	> 	 / | \   |   /|\
	> 	e  f  g	(r) h i j
	> 		    |
	> 		   (s)	

> But say (d) referred (s), then (s) should be inserted underneath (h) and 
n> ot (e)...(stay in his(d) "leg"/downline).
I> f (a) referred (s) then (s) would have been inserted under (e).

> So any clients 1st level can have 3 entries
 >    2nd level = 9 entries
 >    3rd level = 27 entries
 >    4th level = 81
 >    5th level = 243
 >    6th level = 729
 >    7th level = 3297 and at the 7th level it has to stop.

> If a clients 3rd level is full, (27 entries) he recieves a "re-entry". 
The 
r> e-entry would by inserted in the first open space from top to bottom, 
l> eft to right. 
T> he clients get re-entries on:
 >    3rd level = 27 entries
 >    4th level = 81
 >    5th level = 200
 >    6th level = 500
 >    7th level = 1000

> -I have to be able to get all the people a certain client referred. 
-> Get a clients downline: say for (d) it would be h,i,j,s
-> get the downline level by level: for (d) level 1 would be h,i,j
	> 			          level 2 would be s

> Thanks!!

> 


  Return to Index