Skip to main content

Questions tagged [boolean-computation]

Questions on the functionality of Mathematica for Boolean computation.

Filter by
Sorted by
Tagged with
1 vote
0 answers
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 ...
Franck's user avatar
  • 391
1 vote
2 answers
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 ...
Tomi's user avatar
  • 4,386
4 votes
3 answers
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 ...
vasili111's user avatar
  • 1,225
1 vote
1 answer
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 ...
anandj's user avatar
  • 11
0 votes
0 answers
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 ...
ShyPerson's user avatar
  • 495
1 vote
1 answer
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?
BigMistake's user avatar
0 votes
0 answers
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 ...
ShyPerson's user avatar
  • 495
2 votes
1 answer
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: ...
David's user avatar
  • 159
3 votes
1 answer
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 ...
138 Aspen's user avatar
  • 1,393
2 votes
5 answers
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? ...
csn899's user avatar
  • 4,315
2 votes
1 answer
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 ...
Jonathan's user avatar
1 vote
3 answers
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 ...
Jonathan's user avatar
2 votes
3 answers
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 ...
Jonathan's user avatar
2 votes
1 answer
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, ...
user871418's user avatar
2 votes
3 answers
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})$...
Jocelyn Minini's user avatar
5 votes
6 answers
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: ...
Reda.Kebbaj's user avatar
1 vote
0 answers
34 views

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

Consider the following Boolean expression as an example: ...
user13892's user avatar
  • 9,443
1 vote
1 answer
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.
SimMach's user avatar
  • 113
6 votes
2 answers
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, ...
timhu's user avatar
  • 101
2 votes
1 answer
92 views

Evaluation process of And, Or,

Small questions about evaluation process of And, Or. code 1) ...
imida k's user avatar
  • 4,295
5 votes
1 answer
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 ...
ShineOn's user avatar
  • 53
2 votes
2 answers
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 ...
wally's user avatar
  • 417
1 vote
0 answers
51 views

Simplifying RegionUnion call after CylindricalDecomposition

I want to simplify unions of output from CylindricalDecomposition calls. Consider: ...
Colin Rowat's user avatar
0 votes
1 answer
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 ...
Roy's user avatar
  • 101
0 votes
0 answers
71 views

RegionMeasure works very slow for BooleanRegion

Consider two regions: ...
John Taylor's user avatar
  • 5,827
1 vote
1 answer
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)...
Paul B. Slater's user avatar
1 vote
1 answer
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 ...
Mr. Retired's user avatar
1 vote
0 answers
104 views

"Total" function for a Boolean expression

I have a very long vector of the form ...
AlbaCL's user avatar
  • 347
5 votes
4 answers
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 ...
user avatar
1 vote
0 answers
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: ...
Bogdan Sofalca's user avatar
8 votes
2 answers
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 ...
kirma's user avatar
  • 19.1k
5 votes
4 answers
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 ...
Contango's user avatar
  • 463
1 vote
0 answers
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....
imida k's user avatar
  • 4,295
2 votes
1 answer
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 ...
J Bausch's user avatar
  • 151
1 vote
1 answer
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 ...
Peter Burbery's user avatar
19 votes
2 answers
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." ...
Peter Burbery's user avatar
0 votes
0 answers
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 ...
DurandA's user avatar
  • 161
2 votes
1 answer
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 ...
Paul B. Slater's user avatar
3 votes
4 answers
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?
Arghya Datta's user avatar
0 votes
1 answer
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 ...
Paul B. Slater's user avatar
1 vote
2 answers
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 ...
Paul B. Slater's user avatar
1 vote
1 answer
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 ...
Paul B. Slater's user avatar
2 votes
3 answers
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: ...
almagy's user avatar
  • 23
3 votes
3 answers
426 views

Evaluate a certain three-dimensional constrained integral

The result of the three-dimensional integration ...
Paul B. Slater's user avatar
1 vote
1 answer
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 ...
A. Chitzac's user avatar
0 votes
0 answers
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 ...
A. Chitzac's user avatar
0 votes
2 answers
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. ...
user avatar
0 votes
1 answer
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[...
Paul B. Slater's user avatar
1 vote
4 answers
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/...
Paul B. Slater's user avatar
0 votes
1 answer
124 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 ...
Paul B. Slater's user avatar