Chapters

* Title * Contents * Introduction * Place * System * Design * Using * Future * Bibliography

Sections

* System * Flow * Ending * Architecture * Map * Production * Ready_Auction * Auction * Buying * Auction_Details * Boycotts * Pollution * Law



A More Detailed Example



What if the buyers offer to buy more than the sellers have? Is offering a low price always the best strategy? Here's a more complex example that answers the above questions. Remember:



The highest buyer and lowest seller gets priority.



For example, imagine

Fred is offering to sell 8 food at 10,

Rick is offering to sell 5 food at 12,

Amy is offering to buy 5 food at 14,

Mitchel is offering to buy 7 food at 13,

Michele is offering to buy 6 food at 12,

And Jack is offering to buy 4 food at 9 .



The server would sell 5 of Fred's food to Amy at 12 (halfway between the two prices)

would sell 3 (the rest) of Fred's food to Mitchel at 11 & 1/2

would sell 4 of Rick's food to Mitchel at 12 & 1/2

would sell 1 (the rest) of Rick's food to Michele at 12



Note that even though Michele offered a price that's meets both Rick's and Fred's offers, she will only get one unit of food. Note that even though Amy offers a higher price than Mitchel (14 vs. 13), she doesn't end up paying more--because she thus gets first dibs on Fred's cheaper food.













Greg Kimberly/gregkimb@gak.com