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:
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.
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
Post a Comment