Re: A clear difference between algorithm and a pattern

From: Universe (universe_at_tAkEcovadOuT.net)
Date: 01/21/04


Date: Tue, 20 Jan 2004 20:29:57 -0500


"Simon Strandgaard" <neoneye@adslhome.dk> wrote in message
news:pan.2004.01.20.22.21.37.446063@adslhome.dk...
> On Tue, 20 Jan 2004 21:07:48 +0800, Ravi Shankar wrote:
> > Can anyone please give me a precise distinction between an
algorithm and a
> > pattern?

A pattern is a "formalized" algorithm.

I.e. a pattern is a common solution to a recurring "problem".

But actually an OO pattern, versus an algorithm, is more thought of as
invovling a topological (spatial) arrangement of classes {components;
categories (group of classes)} and their interrelationships.
Algorithms in CS/SWEng tend to be thought of as a set of *procedures*,
or *operations*. But obviously patterns involve solutions of not just
commonly known and adopted spatial arrangements of abstractions, but
commonly known and adopted procedures, and operations applied to the
arrangements of class abstractions. So things are close and theirs no
"hard and fast" demarcation.

Elliott

--
"While system architecture is the blueprint of the overall system,
software architecture
is the blueprint of the software in the center of the system.
Originally conceptualized by
Dijkstra and Parnas [Dij72, Par01a, Par01b] software architecture is
concerned with the
perspectives of: global organization as a composition of components,
global control
structures, communication protocols, and physical locations over which
the system is distributed" [Tom99]


Relevant Pages

  • Re: Serialize a Strategy Pattern List of objects with out xsi:type
    ... whether this is a strategy pattern or not. ... depends on how you define algorithm. ... As for your "secondly" comment about homework, ... suggest that you create a seperate class that you will serialize. ...
    (microsoft.public.dotnet.framework)
  • Re: Reading and writing a big file in Ada (GNAT) on Windows XP
    ... memory for a substring; this is very descriptively called memmemand ... common cases (no mapping, single character patterns, and so on). ... So in this case a better algorithm is probably the way to go (and I ... the source length is>M and the pattern length is>N, ...
    (comp.lang.ada)
  • Re: Mersenne Twister
    ... And no PRNG is unpredictable. ... >> Just give me the algorithm and the key and I can predict it ... >hard to write a test which is able to find a pattern. ... Since the key is far far shorter than the stream ...
    (sci.crypt)
  • Re: Search for byte pattern in a binary file.
    ... one of the algorithms posted does partially solve the buffer ... The Knuth-Morris-Pratt algorithm is a forward-only algorithm, ... If the search pattern is extremely large (on the order of several ... since disk access is extremely slow. ...
    (comp.lang.java.programmer)