[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Formatting algorithm
From: |
Ulrich Lauther |
Subject: |
Re: [Groff] Formatting algorithm |
Date: |
Sat, 3 May 2014 21:30:07 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sat, May 03, 2014 at 02:23:10PM -0400, Peter Schaffter wrote:
>
> I suspect I'm a voice crying in the wilderness here, but we need to
> consider that a greedy algorithm is almost always faster than a
> dynamic programming solution; furthermore, greedy algorithms
> sometimes lead to optimal solutions. "Optimal", in this case,
> would entail both improved grey *and* preserving groff semantics.
>
> Food for thought.
>
I think, preserving groff semantics should not be part of the optimaltiy
measure,
but a hard constraint.
It would be nice to have a formal definition of optimality and an interface that
allows to plug in alternate algorithms/heuristics.
"greedy algorithms sometimes lead to optimal solutions."
yes, *sometimes*
I have used greedy heuristics a lot in my time, but only when an exact algorithm
(with reasonable speed) was not known.
Dynamic programming can be quite fast and I don't see why any forking should be
needed.
ulrich lauther