Tuesday, July 24, 2018

Problem Calculus


Spaces are represented by just a circle. 



Inside of this space you want to place all of the possible items that can inhabit that space.  Think of the space being like a type and the items of the space being values of that type.  The spaces themselves need to relate to other spaces with arrows.


You might think of the arrows as functions between types.  However, it depends on what type of problem you are modeling.  If you are modeling a factory, then the spaces might be components of the widget that the factory produces and the arrows represent moving the partially assembled widget from work station to work station.  Also keep in mind that there might be more than one way to interpret a given problem with these diagrams.


Ideally, one diagram configuration will be easier to comprehend than another.  One of the open questions about how easy it is to comprehend a problem is how much familiarity plays in ease of comprehension.  Different diagram configurations for a problem represent different understandings that people have of the problem.  A highly effective understanding should minimize the metrics generated by the problem calculus diagram.


Given a space, some spaces will be easier to comprehend than others.  The first aspect you should look for are spaces that are path connected.  A path connected space means that there exists some function that continuously deforms items in the space from item to item.  So instead of having to understand a space in terms of *all* possible items, you can understand the space in terms of the function that describes your path.  It’s an open question as to whether or not different functions that describe your path connected space will affect comprehension.  One thought is that a hilbert curve ought to be more comprehensible than a path that zig-zags through the space, but there’s currently no reason to think one or the other should be easier to comprehend.  

If your space isn’t path connected then there’s going to be two different metrics to pay attention to.  How many path connected regions exist in your space and how hard is to differentiate between the two paths.  Lots of different path connected spaces suggests difficulty to comprehend because it means that there is some aspect of your items that need special attention to jump from path connected region to path connected region.  The more of this that occurs the harder it is going to be to keep it all straight.  

Paths that are difficult to separate because they meander through similar “areas” are going to be difficult to comprehend because it’s going to be harder to develop an intuition of what each region actually is.  Additionally, if it is hard to separate two different paths, then it’s going to be harder to understand which path connected region you are entering into when an arrow brings you from one space to another.  Of course the very idea of “area” suggests some additional geometric structure to your space that may or may not exist.  


Holes in your space will also impact how easy it is to comprehend the space.  A hole represents some invalid, forbidden, or defective item within the space.  A simple hole in the space is relatively easy to avoid, but harder than if there was no holes in the space.


Lots of simple holes will be harder to deal with than just a single simple hole.  As the number of holes increases it’s going to be harder to form an intuition of where valid items of the space are.  It is also going to be harder to understand when an arrow coming into this space lands in a valid space.

The structure of a hole might actually be complex or simple.  If the hole is a path connected region of invalid items in the space, then it’s going to be more easy to understand than if the hole is made up of different path connected regions or even has some valid items within it.


The arrows that connect the spaces can also cause problems for comprehensibility.  


A continuous arrow will be easier to form an intuition for because any small change in the arrow’s input will represent a small change in the arrow’s output.  Familiar inputs will generate familiar outputs and this provides a way to carefully explore the nature of the arrow.

Discontinuous arrows are by their nature erratic.  Because a small change in the input might represent a large change in the output, you will have a hard time knowing when you’ll end up in unfamiliar territory in the output space.  Additionally, if your destination space has many different path connected regions or if the destination space has many different holes, then it’s going to be difficult to know when the discontinuous arrow is going to dump you into a region that needs to be carefully managed or is outright invalid.


In this diagram we see the Source and Destination spaces in black.  These are the spaces that we have been talking about all along.  However the red space represents the Input space of the blue arrow.  Similarly the green space represents the Output space of the arrow.  Ideally, the input space will be equivalent to the source space.  However, some arrows may only work on a subset of the source space.  Similarly the output space is ideal when it is equivalent to the destination space, but there are many arrows that cannot create all possible items of the space they are moving to.


The system of your problem can also affect comprehensibility of it.  A system that is comprised of many spaces and arrows between them is harder to understand when you only have a few spaces and the arrows between them are straight forward.

Because the input and output spaces aren’t always equivalent to the source and destination spaces, there is another issue that arrises once you consider the entire system you are concerned with.  Different arrows entering or coming from the same source or destination spaces may not be compatible depending on their input and output spaces.  Ideally the spaces all line up perfectly, but there may be some overlap that makes it difficult to understand how items move through your system.


There is overlap of input spaces in a source space.  Given a space, it might appear than an arbitrary item within it could be sent to one arrow or another, but because of differing input spaces this is not true.


Similarly there is overlap of output spaces in a destination space.


And there is overlap between the output space of one arrow and the input space of another arrow.  This type of overlap is problematic because sometimes the output of an arrow will be usable for the next one and other times this will not be the case.  Understanding the edge cases increases the difficulty of comprehending the problem.


Finally, there is complexity projection.  In the diagram we have an initial space and a terminal space that are both very simple to understand.  However, the internal spaces between these two spaces are very hard to understand.  Anytime this scenario arrises, the complex nature of the internal system “projects” onto the simple spaces on it’s interfaces.  Consider the space of all strings.  This is relatively straight forward because it is simply all possible sets of characters.  Now imagine feeding any given string into a compiler.  The highly complex nature of the compiler makes the string input more complicated than if you only had to consider the strings by themselves.




1 comment:

  1. Input spaces project their complexity onto the Source space. Consider the example in the article about strings and compilers. A system that has strings in it with no compliers will have simpler strings than if you do have a complier that consumes the strings. At the very least it will be easier for people to understand the strings and their implications in the overall system.

    On the other hand the Destination space will project its complexity to the Output space of an arrow. If you have an arrow that is easily able to product any value of a Destination space, then you will run into problems when the Destination space contains holes that are not holes in your Output space (the arrow would produce a value from its perspective that is valid, but from the overall perspective that is invalid).

    ReplyDelete