# Questions tagged [boolean-computation]

Questions on the functionality of Mathematica for Boolean computation.

183 questions
Filter by
Sorted by
Tagged with
30 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 ...
1 vote
104 views

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

Does the word "and" compile the exact same way as "&&" or are there differences?
35 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 ...
1 vote
45 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: ...
1 vote
51 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 ...
422 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? ...
132 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 ...
1 vote
148 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 ...
315 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 ...
105 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, ...
158 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})$...
745 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: ...
1 vote
31 views

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

Consider the following Boolean expression as an example: ...
1 vote
78 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.
110 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, ...
92 views

### Evaluation process of And, Or,

Small questions about evaluation process of And, Or. code 1) ...
414 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 ...
199 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 ...
1 vote
51 views

### Simplifying RegionUnion call after CylindricalDecomposition

I want to simplify unions of output from CylindricalDecomposition calls. Consider: ...
64 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 ...
62 views

### RegionMeasure works very slow for BooleanRegion

Consider two regions: ...
1 vote
147 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)...
1 vote
73 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
99 views

### "Total" function for a Boolean expression

I have a very long vector of the form ...
239 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
83 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: ...
197 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 ...
738 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 ...
1 vote
85 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....
96 views

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

I'm interested in a MinSat variant: given a list of boolean formulas like ...
1 vote
204 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 ...
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." ...
88 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 ...
117 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 ...
367 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?
106 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 ...
1 vote
196 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 ...
1 vote
287 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 ...
223 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: ...
424 views

### Evaluate a certain three-dimensional constrained integral

The result of the three-dimensional integration ...
1 vote
81 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 ...
37 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 ...
119 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. ... 147 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,G,G,G,G,G[...
1 vote
178 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/...
121 views

### Can one usefully apply the Boolean functions of Mathematica to measurable Boolean sets?

This is something of an attempted succinct/pointed rephrasing of an earlier question Given measures on sets and on certain Boolean combinations of the sets, can one check their consistency and/or ...
1 vote
123 views

### removing brackets from the argument of a function like XOR [closed]

Xor[0,1,0] gives me the Xor of the elements 0,1 and 0 while Xor[{0,1,0}] gives me {0,1,0}. If I have a long list whose elements I want to Xor, how can I remove brackets from the argument? I tried Xor[...
129 views

### What is the meaning of this code section?

I like to know the meaning of this: Total[#4 Boole[Norm[({x, y} - #1).RotationMatrix[#3]/#2]^2 < 1] & @@@ Data] I need to make a slight modification to a ...