c# - Splitting a string based on specific characters -


i try describe problem can. trying write program handle equations like:

f = (x∨a) ↔ (x∨b) ( (x or a) equivalent (x or b) )! 

i have solve 'x', or better say, write disjunctive and/or conjunctive normal form.

so, theoretically, goes this:

enter image description here

when truth table written, have see when f equal 1 (tautology), , write conjunctive/disjunctive normal form.

for example (disjunctive normal form given table): a=0,b=0 , a=1,b=1, value of x not matter, , a=0,b=1 , a=1,b=0, x must 1.

enter image description here

in end, x=a∨b.

since i'm writing in c#, equations written in textbox. bothers me,is how should separate string can solve part part?

what first trying "split()" method (or other methods) of class string in c#? in first place, you'd better push users insert blank (as separator of split()) between each pair of tokens (e.g. , b) , can concentrate on main logic of solver.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -