# Questions tagged [boolean-computation]

Questions on the functionality of Mathematica for Boolean computation.

187 questions
Filter by
Sorted by
Tagged with
1 vote
67 views

### Tseitin conversion

Do you know if the Tseitin method is implemented in Mathematica for converting a formula in CNF ? I didn't find it as a parameter of conversion type in ...
• 391
1 vote
123 views

### Defining a Boolean Region [duplicate]

I'd like to define a new region that is "within direct sight" of a certain point within an existing region. For the example below, the regions highlighted in red from the black point are not ...
• 4,386
777 views

### Why is the result of TrueQ[(x^n)^m == x^(n*m)] False?

Why is the result of the code below False ? TrueQ[(x^n)^m == x^(n*m)] How can I get it to be ...
• 1,225
1 vote
114 views

### Method options for BooleanMinimize

I am learning about Boolean Functions and I noticed in the docs for BooleanMinimize they reference a Method option, but don't provide what those options can be. Is there any more information on how ...
• 11
55 views

### BooleanConvert: Boolean decision tree

The BooleanConvert function includes an available form called "Boolean decision tree": BDT. What is the formal logical definition of a Boolean decision tree as used here? What is the ...
• 495
1 vote
113 views

### Is "and" the exact same as "&&" in Mathematica? [closed]

Does the word "and" compile the exact same way as "&&" or are there differences?
• 111
42 views

### Symbolic solutions to systems of Boolean constraints?

Is it possible to solve a system of Boolean constraints symbolically? I'm trying to solve systems like the following, where $X$ is the unknown Boolean expression I'm trying to find, $a, b, c$ are the ...
• 495
56 views

### Creating a boolean expression of assumptions between variables

I'm trying to create a boolean expression from a list of lists of variables such that the elements of one list are not equal to the elements of all other lists. I thought this might work: ...
• 159
99 views

### How to use Mathematica for demonstration of analysis of Boolean functions?

I am wondering how to use Mathematica to demonstrate some concepts in Analysis of Boolean functions, e.g.: Influence Noise stability Noise operator $L_q$-norm and $L_\infty$ norm of a boolean ...
• 1,393
442 views

### Calculating union of two sets of reals

Given the following two sets of reals: -(1/4) < x <= 0 || 0 < x <= 1/2 || x > 1/2 x <= -1 || -1 < x < 0 how can I calculate their union? ...
• 4,315
169 views

### Square Root of a Boolean Matrix

I am trying to find the square roots of transitive Boolean matrices. Let $B$ be a transitive Boolean matrix, If $A^2= B$, then $A$ is the square root of $B$. Here is my try ...
• 55
1 vote
154 views

### Validity of the number of transitive matrices

I am trying to generate all possible transitive boolean matrices of order nxn which satisfies the following definition of transitivity Let A=(a_ij)∈M_n(B) be a non-zero matrix. If for any i,j,k in ...
• 55
355 views

### Finding transitive Boolean matrices

I am fairly new here and with Mathematica too. I have a question regarding Boolean matrices but before this I did a random search and got this Defining an arbitrary binary relation But I am unable to ...
• 55
121 views

### Is there a function which tests whether a Boolean expression is an inequality?

For something I am doing in Mathematica, it would be very helpful to have a function f[] which, when applied to an atomic Boolean expression, returns True if the Boolean expression is an inequality, ...
187 views

### Check if a curve is contained in a region

Let's consider a curve described by a function $y = f(x)$ as well as a region $\mathcal{R}$ (consider that this region can be complicated) described by a set of points $\mathcal{X} = (x_{i,1},x_{i,2})$...
759 views

### Similarities between two vectors

Is there simpler and/or faster code for this? List1={1,2,4,6,7}; List2={1,3,5,6,7}; Rule: If values at respective positions match, output 1 else output 0. Result: ...
• 714
1 vote
34 views

### How to count the number of disjoint regions covered by a Boolean expression?

Consider the following Boolean expression as an example: ...
• 9,443
1 vote
83 views

### How to define functions using $Z_2$ coefficients and $Z_N$ variables, e.g, realizing $1+1=0$?

A minimal example is to realize the following: $x+x = (1+1)x = 0$, and $x^{N+1}y^{N+1}=xy$, where $N$ is a given positive integer.
• 113
117 views

### How to solve logic problem with a joker sometimes tell truth and sometimes lie?

If there are only truth teller and liar, I used to solve with BooleanConvert or SatisfiabilityInstances. However for this one, ...
• 101
92 views

### Evaluation process of And, Or,

Small questions about evaluation process of And, Or. code 1) ...
• 4,295
419 views

### Why False && {False, False} does not preserve list structure?

I am on Mathematica 12.1.1.0 trying to perform a boolean operation over every element of a list, but preserving the list structure. When I run ...
• 53
215 views

### How can I subtract and calculate the complement of a pair of sets? [closed]

I cannot properly implement these operations. How can I do it? This is a reduced example: A={2,3,4} B={2,4,6} C={1,2,3,4} Find ...
• 417
1 vote
51 views

### Simplifying RegionUnion call after CylindricalDecomposition

I want to simplify unions of output from CylindricalDecomposition calls. Consider: ...
• 121
67 views

### Joining a table of statements with And [closed]

How could I algorithmically generate a statement such as Subscript[a, 1] ∈ Reals && Subscript[a, 2] ∈ Reals && Subscript[a, 3] ∈ Reals joining a ...
• 101
71 views

### RegionMeasure works very slow for BooleanRegion

Consider two regions: ...
• 5,827
1 vote
162 views

### Can this previously solved three-dimensional constrained integration also be solved with certain added products in the integrand?

In Solved3DConstrainedIntegration the constrained three-dimensional (Hilbert-Schmidt-metric-based HSmetric) integration problem for the absolute separability probability of the two-qubit (quantum bit)...
• 2,335
1 vote
80 views

### Mathematica, from a⟺b∨c to (a≤b+c)⋀(a≥b)⋀(a≥c)

I want to enter a⟺b∨c to Mathematica and to have an answer (a≤b+c)⋀(a≥b)⋀(a≥c) I tried some BooleanConvert and such functions but cannot find the right one. How to do it? This example is taken from ...
1 vote
104 views

### "Total" function for a Boolean expression

I have a very long vector of the form ...
• 347
259 views

### Are there any alternatives for NIntegrate to calculate the area for which $f(x,y)<0$?

I have this two-variable function $$f(x,y)= (8 \cos (x+y)+7)\cos \left(\frac{x}{2}\right)+\cos \frac{x-2 y}{2}+2 \cos \left(\frac{3 x}{2}\right)$$ where $0<x,y<\pi$. I want to calculate ...
1 vote
85 views

### Symbolic add of 32Bit Registers

I would like to perform multiple 32bit word register additions (mod 32 add. with variables of Boolean type shuffled with symbolic type). For this task I implemented a ripple adder function: ...
202 views

### Efficient uniform sampling of certain Boolean matrices

I want to uniformly sample $(0,1)$-matrices with certain constraints. In particular, I want sum of each row to be rowsum and the sums of columns to equal ...
• 19.1k
876 views

### How to map a function with boolean operators over an array?

I am a beginner in Mathematica. I have this in Mathematica v12: A = {1, 1, 1, 1} B = {2, 2, 2, 2} A+B (* 3,3,3,3 *) I'd like to experiment with evaluating ...
• 463
1 vote
87 views

### TautologyQ like feature that also works for inequalities

If a=b and b=c, then a=c. So in mathematica, TautologyQ[(a == b) && (b == c) \[Implies] a == c, {a, b, c}] yields 'True'. If a<b and b<c, then a<c....
• 4,295
103 views

### Minimize Number of Boolean Formulas that Evaluate to True

I'm interested in a MinSat variant: given a list of boolean formulas like ...
• 151
1 vote
217 views

### How can I change the Mathematica programming for creating a Venn Diagram?

I am working on using Venn diagram to explain logic and logical connections between sets. After coming upon these answers: Create a Venn Diagram, How to plot Venn diagrams with Mathematica?, which I ...
• 1,705
1k views

### How can I use Mathematica to solve a complex truth-teller/liar logic problem?

I have a logic puzzle I want to convert to Mathematica to solve: Person A states, "Exactly two people are truth-tellers," Person B states, "I and Person C are truth-tellers." ...
• 1,705
96 views

### How to use MaxValue with booleans?

I tried to use MaxValue on Booleans domain: MaxValue[{x + y, Element[x|y, Booleans]},{x,y}] However, it fails with ...
• 161
119 views

### Verify a conjectured formula for a modification of a 3D constrained integration successfully solved using Mathematica

I've acquired somewhat indirect--and not fully conclusive--evidence that the solution of a certain three-dimensional constrained integration takes the form ...
• 2,335
420 views

### Usage of 'Less than' condition in Sum

I have following sum: $$\sum_{\substack{n,j\\j<n}}^{3} x_nx_j$$. How can I give this $j<n$ condition in Sum?
• 269
108 views

### Find the probability (relative volume) of a certain 4-ball with respect to Hilbert-Schmidt measure

Let us consider the set of points {x,y,z,1-x-y-z} and impose the strict ordering constraint ...
• 2,335
1 vote
197 views

### Confirm and possibly simplify a 2009 result for a 2D constrained integration

This is a direct descendant of two other recent questions, 3D and Equivalence, both of which have been answered in skillful, interesting manners. (See also the comment [actually answer] of JimB to ...
• 2,335
1 vote
308 views

### Evaluate 3D- and 5D-constrained integrals for absolute separability probabilities

In a recent posting, TwoQubits user JimB, employing a change-of-transformations put forth by N. Tessore, was able to confirm a formula for the "two-qubit absolute separability Hilbert-Schmidt ...
• 2,335
245 views

### Simplifying expressions containing binary variables

Consider an expression with two binary variables, $a,b\in\left\{ 0,1\right\}$, given by $F=(1-a-b)^{3}(1-b)$, with truth table: ...
• 23
426 views

### Evaluate a certain three-dimensional constrained integral

The result of the three-dimensional integration ...
• 2,335
1 vote
90 views

### How to evaluate a multidimensional NIntegral in a range where certain conditions must be satisfied by the variables

I have a function f which looks similar to this : f[a_, b_, c_] := NIntegrate[sigma[a, b, c], {a, -valueA, valueA}, {b, -valueB, valueB}, {c, -valueC, valueC}] and ...
39 views

### Boole does not limit boundaries of interpolation function, which rise in problems when using NIntegrate for multidimensional integral

I tried to use the Boole function to limit the boundaries of an interpolation function I created when integrating, and noticed that despite this condition, the function will always call extrapolated ...
141 views

### How do you simplify a boolean expression (!A B)+(B !C)+(BC)+(A !B !C)? [closed]

How would you simplify the following boolean expression (!A B)+(B !C)+(BC)+(A !B !C)? I factorised B and managed to get B(!A+!C+C)+(A !B !C) = B+(A !B !C), but I do not know where I should go next. ...
149 views

### Create a Venn and/or related diagrams given the eight atoms of a three-set (A,B,C) 256-dimensional Boolean algebra

In my recent answer to How can one expand an arbitrary boolean combination into the $2^n$ atoms of the associated boolean algebra of size $2^{2^n}$?, for the eight atoms {G[0],G[1],G[2],G[3],G[4],G[...
• 2,335
1 vote
180 views

### How can one expand an arbitrary boolean combination into the $2^n$ atoms of the associated boolean algebra of size $2^{2^n}$?

The answer of user250938 to Can one usefully apply the Boolean functions of Mathematica to measurable Boolean sets? and the second comment of Monroe Eskew to the answer to https://mathoverflow.net/...
• 2,335