Ask Your Question

twc's profile - activity

2020-11-28 20:09:41 +0200 received badge  Popular Question (source)
2020-11-28 20:09:41 +0200 received badge  Notable Question (source)
2018-10-10 20:33:32 +0200 commented question In Boolean function truth tables in n variables, the table is arranged x_{n-1}, x_{n-2},...,x_1,x_0. How can I change so the order is x_0, x_1,... instead?

Thank you, that is a very nice and simpler solution to the problem.

2018-10-08 17:13:30 +0200 received badge  Student (source)
2018-10-08 16:15:41 +0200 commented question In Boolean function truth tables in n variables, the table is arranged x_{n-1}, x_{n-2},...,x_1,x_0. How can I change so the order is x_0, x_1,... instead?

I enter "from sage . crypto . boolean_function import BooleanFunction" in Sage. Suppose we have the list L={(0,0,0), (0,0,1),...,(1,1,1)} of the 8 binary 3-tuples in lex order and we label them by (x2,x1,x0), which is what Sage does. Then inputs "B=BooleanFunction([1,1,0,0,1,0,1,1])" and "P=B.algebraic_normal_form()" give output " P = x0x1x2 + x0x2 + x1x2 + x1 + 1". But if we label the entries in L with (x0,x1,x2) (which I want to do and which Mathematica does) then the algebraic normal form for truth table B is "P1 = x0x1x2 + x0x1 + x0x2 + x1 + 1" (that is, we are reversing the order in which x2,x1,x0 are read). My question is how can I get Sage to label tables like L in this way?

2018-10-02 21:03:55 +0200 asked a question In Boolean function truth tables in n variables, the table is arranged x_{n-1}, x_{n-2},...,x_1,x_0. How can I change so the order is x_0, x_1,... instead?

In Boolean function truth tables in n variables, the table is arranged x_{n-1}, x_{n-2},...,x_1,x_0. How can I change so the order is x_0, x_1,... instead?