# Quine McClusky algorithm in Haskell

A small program tingu is implemented in haskell. It reads minterms from a file and produce the output on console. It is hosted on github. You can use it like

 ./tingu -i minterms

Your minterms should be described in a file like following

 vars = 4
minterms = 1,2,5,7,8,9,10,13,15, 

Then output of program is

 Hello, I am Tingu, the mighty crab! And I like tea. You should call me \$./tingu -i filename from your terminal.
I have found the essential prime implicants of your function.
0-01
-001
010-
10--
1-1-
Verifying my answers. It may take some time....
+++ OK, passed 100 tests. Peace!!


Peace !!

### 0 thoughts on “Quine McClusky algorithm in Haskell”

1. Hey!
Thank you so much for posting this here hahaha it’s exactly what I needed. But I’m having trouble trying to load it in GHCi, can you help me with that?

1. I guess you need to compile it using ghc; it won’t load into ghci. Do the following.
ghc tingu.hs
This will generate a binary tingu. Now you can pass the minterms from a file e.g. minterms.txt
./tingu -i minterms.txt
It is working on my system (ubuntu-14.04) with haskell-platform.

Scroll to Top