Quick Index
Overview


Generalization is a powerful concept we want to understand well.

Assume we have a solution for many specific cases (we'll show this below).

If we say we "generalize" the specific solutions it means that we come up with one (general) solution that will solve all the cases.

The beauty is that we have reduced many solutions (to manage) into one.

Examples


For these examples we are given ten probems P1, P2, ..., P10.

Specific And General
SpecificA solution is specific if it solves one specific problem
GeneralA solution is general if it solves more than one problem


Details on what this means follows


Specific (Specialization)


Specific
Here we have a specific solution.

The solution solves 'P3' and 'P3' only.

specific = specialized


General (Generalization)


General
Here we have a general solution.

The solution solves all of our given problems.

general = generalized
General (Another Example)
Another general solution here.

Just like the previous except showing it solves a subset (some) of the problems.

Do not worry too much about the diff between this and the prev snippet (just think of general as more than one problem solved).


Choosing


Compared
A general solution is awesome because we knock off several problems at once.

However, there are cases were a specific solution is fine. Some problems are very unique and thus would demand a unique solution.
Specific or General?


Generalization Examples



Recap


Generalization is a problem-simplifying concept that allows us to take common behavior from many specic types and put it into one generalized type that then can be used in place of the many.

If we have:


We could generalize to (if it fits the given situation):


We could generalize further (again if it fits the given situation):


Navigation