Patterns, Theories, Variables, Constants, Functions

Look at these two arguments:

All men are mortal; Mike is a man, so Mike is mortal.

All dogs are animals; Rex is a dog, so Rex is an animal

They look similar, but let’s normalize (disregarding grammar) to make it obvious:

man is mortal; Mike is man, so Mike is mortal.

dog is animal; Rex is dog, so Rex is animal

Now pair off words from each sentence, starting from the first.  You’ll get:

(Man,Dog); (Is,Is);  (Mortal,Animal); (Mike,Rex); (Is,Is);  (Man,Dog) ;

(So,So);  (Mike,Rex);  (Is,Is);  (Mortal,Animal)

Now if the pair is of the form (X,X), replace it with X. If it’s of the form (X,Y) replace it with a random variable unless it was encountered before, in which case replace it with the same variable you used last time.  You’ll get:

(Man,Dog) –> A

(Is,Is) –> Is

(Mortal,Animal) –> B

(Mike,Rex) –> C

(Is,Is) –> Is

(Man,Dog) –> A

(So,So) –> So

(Mike,Rex) –> C

(Is,Is) –> Is

(Mortal,Animal) –> B

Now merge each term after –> to make a sentence:

A is B; C is A, so C is B

We now have a pattern that can generate results for any values of A, B and C.  In different contexts this could be called a rule, formula, algorithm, program, function, process and so on.

We started with observations (in this case, the two sentences), did a little data cleaning (normalization) to bring out the essence of what we were interested in, then compared them to find their commonalities and differences.  Constants were those parts of the observation that did not change (X,X).  Another way to think of them is that they represented values that could only be in one state and thus could be hard-coded.  Variables were those parts of the observation that did change (X,Y).  Again, we can think of them as values that can take on a range of values.  If we wanted, we could restrict the possible range of values and come up with a type.  The resulting pattern could reference other patterns and we could even compare patterns and produce a pattern of patterns, and so on.

We arguably used the scientific method:

  1. Our observation was the sentences.
  2. Our conjecture was the pattern produced.
  3. We could have predicted by setting A,B,C and computing.
  4. We could test by comparing #3 with corresponding arguments.

In fact, it could be argued that what was done above is a microcosm of what the scientific method should be, and any theory worthy of the name is a computable pattern like the above (but possibly much more complex).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s