P
Paul Lutus
Bent said:I am not sure what you are trying to say here. Are you talking of
optimal solutions or optimal costs?
My point is that an ideal compiler will produce the same object file
(trivial reorderings aside) regardless of which of the legal syntax choices
the programmer makes in designing a specific algorithm. Same speed, same
size, or whatever trait was regarded as most important.
There is no ideal compiler, but this is a hypothetical discussion of what
compilers should do.
Taking a travelling salesman example, let us say you have 8
destinations equally spaced along the periphery of a circle and a
fifth one (the starting point) in the center of the circle, it is easy
to see that there are multiple optimal solutions (16 I think). This is
largely given by the symmetry of the problem. There is, however, only
one optimal shortest travel distance (i.e., optimal cost) - it is the
same for all the 16(?) optimal solutions.
And this is what I mean by saying "trivial reordering aside". It is a
symmetry that rarely appears in practice.
So what do you actually mean by "one optimal outcome"?
See above.