# Monthly Archives: August 2014

## Hungarian Algorithm (Part II)

View source file on Github [part 1 is not necessary to follow this] When I first looked up the Hungarian algorithm on Wikipedia, I was immediately drawn away from what seemed like a tortured graphical explanation and went straight to … Continue reading

Posted in Algorithm, Combinatorics | Tagged | Leave a comment

## Performance: Looping

View source file on Github Before I finish off the Hungarian algorithm, I want to settle (nominally) the matter of performance with respect to array/vector based number-crunching in Haskell. I never sat down to consider this matter systematically and now … Continue reading

## Young Tableau: Row-insertion (Part II)

View literate file on Github > import Control.Lens > import Control.Monad > import Control.Monad.State > import Data.List > import Test.QuickCheck Having defined a Young Tableau, letâ€™s consider one of the ways to construct it. How can you go about adding … Continue reading

## Hungarian Algorithm (Part I): Minimal covering of zeros

View source file on Github > module Main where > import Control.Lens hiding (assign) > import Control.Monad > import Data.List > import Data.Ord (comparing) > import Test.QuickCheck hiding (sample) > import qualified Data.IntSet as I I will resist posts on … Continue reading

## Choices: Command Line Parsers

View literate file on Github Like everything in Haskell, parsing command line arguments comes with its own marketplace. > {-# LANGUAGE DeriveDataTypeable #-} > > module Main where > import Prelude hiding (lines) > import Options.Applicative > import System.Environment (getArgs) … Continue reading

Posted in Choices, Haskell | Tagged | 3 Comments

## Quickie: Generating the powerset

View literate file on Github > import Control.Monad The traditional way to generate the powerset of a list of elements is the following > powerset :: [a] -> [[a]] > powerset (x:xs) = map (x:) (powerset xs) ++ powerset xs … Continue reading