Karnaugh map analysis and synthesis of threshold functions