in reply to [OT][HOMEWORK] Algorithms Help

Yeah, this can be fun! Consider for instance the problem of finding the convex hull of a set of points. Divide and conquer would mean an algorithm where you take the set of points, if the set contains three points or less, the convex hull is determined trivially. Otherwise, you divide the set into two, find the convex hull for both smaller sets, then combine both convex hulls. A decrease and conquer technique starts with three (or two, or just one) of the points, finds the convex hull of that set, and than adds one point at the time, adding to the convex hull if necessary. With transform and conquer you actually solve a different problem. For instance, you determine the first order Voronoi diagram of the set of points, and determine the convex hull from that.

Oh, wait, you said real life problem. Take for instance US foreign politics. To make sure the US gets a steady supply of oil, you divide the rest of the world: those who are with us (Tony Blair) and those who are against (the rest of the world). Then you attack countries one-by-one, decreasing the number to conquer: first Afghanistan, then Iraq, with Iran, Syria and North Korea getting low pay out by the bookies for who's next. Finally, if everyone but Bush and Blair are convinced that Iraq never had weapons of mass destruction, you just transform your reason to conquer to something like "Saddam had bad breath".

Abigail

Replies are listed 'Best First'.
Re: Re: [OT][HOMEWORK] Algorithms Help
by ambrus (Abbot) on May 28, 2004 at 16:47 UTC

    Ah, this brings up a memory. I had written the decrease and conquer algorithm once for the convex hull problem in C. It's not quite efficent, the whole thing is 240 lines. It was "homework" too: http://www.komal.hu/verseny/2001-12/I.h.shtml.

    But the other algorithms for finding the convex hull might be more difficult to write.