Conditional Permutation Evaluator

This past spring, I took an interesting class as part of my master’s degree program titled ‘Circuits, Computation and Biology’. One of the many topics in the course was conditional permutations.

Conditional permutations are where you conditionally perform a permutation based off of a switching variable. For example, {x: (1 3 4 2 5), *}, in this if x is 1 the first permutation is performed (1 3 4 2 5), if x is 0, then the pass through permutation denoted as * is taken. This syntax seems a little odd as the first logically should be executed when x is 0 but this is the notation used in the class.

As part of one of the assignments, we were given the choice to:

  1. Write a program that transforms boolean expressions into conditional permutations
  2. Write a program that transforms conditional permutations into boolean functions
  3. Do some conditional permutation work by hand.

Well, the choice here was not too difficult. I had already written a permutation evaluator to check my work on a quiz, so I chose to do the conditional permutation to boolean function option. As the permutation evaluator was written in PHP (some features of PHP make these types of tasks easier than trying to do them in C/C++). Since I knew the professor may not have access to PHP, I hosted a version of my code on this site. I am now opening it up for others to look at and play with. Checkout mtekk’s conditional permutation evaluator.

There are a few other neat things I wrote for this class, including a cyclical boolean logic solver. However, they don’t have a nice interface available yet. A long term goal is to make the rest of them available to the public, however there are other things that do take precedence.

-John Havlik

[end of transmission, stay tuned]

Posted in General | Tagged: ,

2 thoughts on “Conditional Permutation Evaluator

    • The tool is quite powerful, and the demo permutations don’t take advantage of some of the features. One of these features is the permutation dictionary, which allows for some quite complex permutations. This tool itself could use more documentation than some of my WordPress plugins.

      Though, I’d say the coolest thing I wrote for that class was a cyclical boolean logic solver. That would be the next one I’ll make available, but it isn’t in a very clean state right now.

      -John Havlik

Leave a Reply

Your email address will not be published. Required fields are marked *