Terminé

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

en voir plus : design a simple logo for namecard and letterhead my company is in the financial advisory business so i need something that is :, design a simple logo for namecard and letterhead my company is in the financial advisory business so i need something that is, hello freelancer i need simple logo design and i have a pretty good idea what type of design i want, python lexer, lex and yacc, python ply github, python ply c parser, python ply example, python install ply, ply while loop, install ply python ubuntu, hello freelancer i need simple logo design and i have a pretty good idea what type of design i, i have 3 very simple webpage designs but i have lost the psd for them i need someone to redo it and send me the psd file, i need a design for a bottle label this is for a vitamin water and it comes in 4 flavours it is quite simple as i already have a, i need a designer to help me produce simple prints for clothing, i need a new website i need you to design and build a landing page want a simple landing page with a image of a complete face(ne, i need a new website i need you to design and build a landing page want a simple landing page with a image of a complete facenec, i need a new website i need you to design and build a landing page want a simple landing page with a, i need a programming to write a webcam program for me, i need a python coder for a day in bangalore

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