Nov 172017
 
Stephen Kleene

Stephen Kleene

Stephen Cole Kleene was an American mathematician who’s groundbreaking work in the sub-field of logic known as recursion theory laid the groundwork for modern computing.  While most computer programmers might not know his name or the significance of his work regarding computable functions, I am willing to bet that anyone who has ever dealt with regular expressions is intimately familiar with an indispensable operator that resulted directly from his work and even bears his name, the *, or as it is formally known, the Kleene star.

While his contributions to computer science in general cannot be overstated, Kleene also authored a theorem that plays an important role in artificial intelligence, specifically the branch known as natural language processing, or NLP for short. Kleene’s Theorem relates regular languages, regular expressions, and finite state automata (FSAs). In short, he was able to prove that regular expressions and finite state automata were the same thing, just two different representations of any given regular language.
Continue reading »

Nov 092017
 

Strings

As a computer programmer for more than a quarter of century, I don’t think I have ever thought much about strings. I knew the basics. In every language I’d worked with, strings were a data type unto themselves. Superficially they are a sequence of characters, but behind the scenes, computers store and manipulate them as arrays of one or more binary bytes. In programs, they can be stored in variables or constants, and often show up in source code as literals, ie., fixed, quoted values like “salary” or “bumfuzzle.” (That is my new favorite word, btw.) Outside of occasionally navigating the subtleties of encoding and decoding them, I never gave strings a second thought.

Even when I first dipped my toe into the waters of natural language processing, aka NLP (not to be confused with the quasi-scientific neuro linguistic programming which unfortunately shares the same acronym), I still really only worked with strings as whole entities, words or affixes, As I made my through familiarizing myself with existing NLP tools, I didn’t have to dive any deeper than that. It was only when I started programming my own tools from the ground up, did I learn about the very formal mathematics behind strings and their relationship to sets and set theory. This post will be an attempt to explain what I learned.

Continue reading »

Nov 072017
 

2017 LEGO Star Wars Advent Calendar #75184 Box - Front

If you want to get your hands on a LEGO Star Wars Advent Calendar, you need to buy it in early November. That is a lesson I learned the hard way last year. The downside of planning ahead is that once you’ve got it, it will be several weeks before you can tear into day 1’s build. I am beginning to think that I really could use a pre-Advent calendar that counts down the days until the Advent calendar starts. Preferably that would be LEGO Star Wars, too.

Continue reading »

Oct 122017
 

Boolean functions, sometimes also called switching functions, are functions that take as their input zero or more boolean values (1 or 0, true or false, etc.) and output a single boolean value. The number of inputs to the function is is called the arity of the function and is denoted as k. Every k-ary function can be written as a propositional formula, a sentence in propositional logic. A binary Boolean function, a Boolean function with two arguments, can be described by one out of sixteen canonical formulas.

Continue reading »

Sep 272017
 

Robot holding human skullFrom Vienna Bienalle 2017, taking place this week in Austria, comes a new take on Isaac Asimov’s Three Laws of Robotics.  The head of the project, Christoph Thun-Hohenstein, says the update was necessitated by:

…the need for benign intelligent robots and the necessity of cultivating a culture of quality committed to serving the common good!

That sounds a lot like Asimov’s reasoning, but the new laws are certainly worthy of consideration and debate.

Continue reading »

Sep 212017
 

RGB color modelIf you are an artist, photographer, graphic designer, or web developer, having a firm understanding of colors is a necessity.  Key to being able to study and discuss colors is a formal framework for quantizing their properties. Abstract mathematical models called color models do just this, allowing people to discuss the qualities of a color in a consistent manner. These models usually assign tuples of numbers to a color, often either ordered triplets or quartets, where each value represents a property of the color. This post will introduce one the most popular models: the RGB color model.

Continue reading »

Jul 162017
 

An arithmetic sequence of numbers, sometimes alternatively called an arithmetic progression, is a sequence of numbers in which the difference between all pairs of consecutive numbers is constant. A very simple arithmetic sequence consists of the natural numbers: 1, 2, 3, 4, … where the difference between any number and the number before it is just one. 3, 7, 11, 15, 19, …. is another arithmetic sequence, but in this case the constant difference between elements is four.

A finite portion of an arithmetic sequence like 2, 3, 4 or 7, 11, 15 is called a finite arithmetic progression. To confuse matters, sometimes a finite arithmetic progression, like an arithmetic sequence, is also called an arithmetic progression. To be safe, when a progression is finite, I always say as much.

An arithmetic series is the sum of a finite arithmetic progression.  An arithmetic series consisting of the first four natural numbers is 1 + 2 + 3 + 4. The sum, 10, is trivial to compute via simple addition, but for a longer series with larger numbers, having a formula to calculate the sum is indispensable.

Continue reading »

Jun 262017
 

warning symbol

In general it’s a good idea to see warnings your code generates while you are testing, but if you are anything like me, you usually don’t need to see warnings generated by third party code. I was plagued by this today as I was testing a function that utilized NLTK, one of, if not the most, popular natural language processing software libraries for Python.

I’m not too proud to admit that only very rarely do my unit tests run without any failures. It’s usually difficult enough to track down the failures and errors without also being swamped by a ton of extraneous warnings generated by third party software.  Such was the case with a simple function I had written to remove accidental duplicate characters from a piece of text.

Continue reading »

Jun 092017
 

Boston Dynamics

Boston Dynamics, the MIT spin-off and self-proclaimed maker of “nightmare-inducing robots“, has been sold by its parent company Alphabet (aka Google) to the Japanese tech behemoth SoftBank. No specifics regarding the price or the terms of the sale have been announced which is not surprising given we still don’t know how much Google paid for the company when it purchased it four years ago.

Continue reading »