# I need simple boolean expressions optimizer in python PLY

I need some program that with given input of logical expression like a:

"a * 1 * (b + c) + (1 * d + 0)"

will output an optimized form of that expression like a:

"a * (b + c) + d"

etc. Other examples at the bottom.

Parser's operators should be:

* - logical conjunction (AND)

+ - logical alternative (OR)

~ - logical negation (NOT)

(...) - expression grouping

a,b,c,d - some variable (VAR)

0, 1 - Boolean true or false (BOOL)

The parser needs to be written in python PLY generator or ANTLR in any language.

Best would be to apply the Quine-McCluskey algorithm implementation ([login to view URL]) or/and Karnough tables.

Other examples in the format: ('input_expression': 'desired_output'):

'a + 0': 'a',

'a * 1': '1',

'a * 0': '0',

'~(a + b)',

'~(a * b)',

'(a + b + c) * d',

'(a * b * c) + d',

'a * b',

'1 + 1': '1',

'0 * 1': '0',

'0 * 0': '0',

'~a',

'~0': '1',

'~1': '0',

'~~~~a': 'a',

'~~~~1': '1',

'(((a)))': 'a'

Compétences : Algorithme, Programmation C, Interprète, Java, Python

Concernant l'employeur :
( 0 commentaires ) Biała, Poland

Nº du projet : #19362648

## Décerné à:

carbotaniuman

I can do this. I know Python and have worked on abstract syntax trees for a while. I'll apply the basic boolean rules and generate optimized solutions.

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% EUR en 3 jours
(2 Commentaires)
1.6

## 3 freelance font une offre moyenne de €49 pour ce travail

TalAkerele

Hi, I am very happy to bid your project. I read your requirements carefully,so i see what you mean. I have been experiments with Algorithm, C Programming, Interpreter, Java, Python I'd like to work with you. i'll Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(26 Commentaires)
5.0
susanna2018

Hi, Sir!! i am a python expert and full-stack developer with full time. @\$@\$@\$PLEASE CONTACT ME. I CAN DO IT WONDERFULLY \$@\$@\$@ i use tensorflow, sklearn, keras for AI, ML, pandas for Data Analaysis, sele Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(15 Commentaires)
4.4