From: Tucker Taft <stt@avercom.net>
Subject: Re: Programming Contest
Date: Sun, 29 Jul 2001 15:57:05 -0400
Date: 2001-07-29T19:55:50+00:00 [thread overview]
Message-ID: <3B646A90.F41F4181@avercom.net> (raw)
In-Reply-To: 3B5BBE63.3534BD78@PublicPropertySoftware.com
Al Christians wrote:
> Tucker Taft wrote:
> >
> > This problem seems like one which just needs a good data structure to > support the dynamic programming solution. Basically, you start with a > very simple problem, solve that by a smple search, and then build up > solutions of more complicated problems using results saved away for > solutions to smaller problems.
> >
>
> From my simple testing, this looks like a dead end. By brute force
> search for the optimum solution, I find, for example, that the fourth
> lowest board region scores 8 when there are 4 regions, 14 when
> there are five regions, 9 when there are 6 regions, and 15 when there
> are seven regions, 10 when there are eight regions. Knowing the answer
> for six is not much help for finding the answer to seven, etc.
Dynamic programming does not generally require that the optimal
solution for N is always part of the optimal solution for N+1. However,
it is certainly the case that *some* solution for N is part of the optimal
solution for N+1. The challenge is to retain as few solutions as possible
from the "N" level to still guarantee that the optimal solution for
the N+1, N+2, ... levels can be composed from it.
In this case, the trick is to throw away some of the N solutions because
they are so obviously "bad" that they couldn't possible appear in
an optimal solution for more than N areas.
For what it is worth, my initial attempt is not selective enough. Although
I can get up to eight areas in a minute or so, I have yet to get past there.
>
>
> Six regions takes about 1 second to figure out, seven takes about 20
> seconds to figure out, eight takes about 10 minutes. So, I don't think
> that brute force is going to solve this one up to 25 regions.
>
> Al
-Tucker Taft stt@avercom.net
next prev parent reply other threads:[~2001-07-29 19:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-22 15:51 Programming Contest AlZimmerma
2001-07-22 16:21 ` Al Christians
2001-07-22 20:01 ` tmoran
2001-07-23 1:26 ` Tucker Taft
2001-07-23 2:22 ` Al Christians
2001-07-23 10:49 ` Larry Kilgallen
2001-07-23 6:04 ` Al Christians
2001-07-29 19:57 ` Tucker Taft [this message]
[not found] <Pine.LNX.4.33.9901111915230.32622-100000@lagoa.niaad.liacc.up.pt>
2001-07-23 11:44 ` David C. Hoos
-- strict thread matches above, loose matches on Subject: below --
2001-07-21 17:42 Al Christians
2001-07-21 19:54 ` Larry Kilgallen
2001-07-11 11:29 Programming contest Martin Dowie
2001-07-11 12:22 ` Ehud Lamm
2001-07-11 15:25 ` Cailean Nicholas Pól Gloucester
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox