# Questions tagged [boolean-computation]

Questions on the functionality of Mathematica for Boolean computation.

133 questions
Filter by
Sorted by
Tagged with
45 views

### Store boolean expression into a variable

My purpose is to use a boolean expression as a requirement that a pattern must comply. The requirement is c1 == "a", and I am using it to select a string from a ...
134 views

### How to modify a string of symbols based on the positions of $1$'s in a list of Booleans?

Given a list of Booleans: exampleInput = {1, 1, 0, 1, 0, 0, 1, 0}; and given the string: ...
43 views

### What can we expect from boolean region operations?

In my recent efforts to design some 3D printable objects, I have been tempted to use relatively recent additions to the Wolfram Language such as RegionDifference ...
51 views

### Using Boolean operators in FindInstance

The section on Boolean operators suggests that FindInstance can be applied to them. However, when I try to use it I get a rather confusing error: ...
242 views

### How to insert a character between any several characters without knowing indexes?

There is a list of strings: {"x1x2", "x1", "x1x2x3", "x3", "x4", "x1x2x3x4"} The goal is to insert "&&" between every two elements in a list. I need to ...
21 views

### How to disable autosimplification of boolean function? Or How to get Perfect Disjunctive Form?

In my university I have a task to get a perfect disjunctive form of a function in Mathematica, so I found necessary minterms and I want to get disjunction of them. I need to get 5 minterms, but I have ...
I need prepare simple parser for Boolean formula in format CNF: So we have some formula like: $$F = (x_1 \lor x_2) \land (x_1 \lor \overline x_3) \land (x_2 \lor x_4) \land (\overline x_3 \lor \... 1answer 38 views ### FindInstance confused by CoprimeQ For some reason when I type FindInstance[a + b == c && CoprimeQ[a, b, c] == True, {a, b, c}, Integers] Mathematica just immediately returns my input as ... 0answers 111 views ### Combinatorics with booleans equations I have variables X_i \in \{1,0,-1\}. Now I add up m=3 variables$$S=X_1 + X_2 + X_3 $$and want to find all combinations that give me, S=1. I can do this with (see this solution): ... 0answers 442 views ### Mathematica vs. state-of-the-art SAT solvers I found some fascinating paper by Marijn Heule and Oliver Kullmann on advances in SAT solvers and automated reasoning. In particular, the authors where able to show (a year earlier) a breakthrough ... 1answer 51 views ### Can I get mapping as output from SatisfiabilityInstances? Consider the code: SatisfiabilityInstances[Implies[a, b], {a, b}, All] (* output *) {{True, True}, {False, True}, {False, False}} I would like to obtain the ... 2answers 204 views ### List of lists elementwise greater/smaller than I have two lists a = {{3,1,2},{5,1,3},{4,1,1}} b = {{4,0,3},{4,2,2},{5,0,2}} And would like to compare each element within ... 2answers 1k views ### Create a list of all possible Boolean configurations of three constraints I have three nonnegativity constraints \begin{equation} A_1>0, A_2>0, A_3>0. \end{equation} I want to create a single List consisting of all possible/inequivalent Boolean configurations of ... 1answer 74 views ### Solve a constrained four-dimensional integration problem for a “magic simplex” probability Equation (7) in the 2012 paper, "Complementarity Reveals Bound Entanglement of Two Twisted Photons" of B. C. Hiesmayr and W. Löffler for a state \rho_d in the "magic simplex" of Bell states \begin{... 0answers 52 views ### Result of BooleanCountingFunction? Folks, when i use BooleanCountingFunction[{1}, {v1,v2,v3}, "CNF" ] i get a neat output like: ... 0answers 66 views ### Perform a constrained integration over [-1,1]^6--yielding a “separability probability” To begin with, I have a set of three positivity constraints (ensuring the positivity of a certain (twelve-parameter) 6 \times 6 "density matrix", denoted in the standard manner as \rho, namely, <... 0answers 69 views ### Approximate/estimate the ratio of two multidimensional constrained integrals I have a hypothesis that a certain "qubit-qutrit separability probability" should assume the value \frac{5}{3} \left(112 \pi ^2-1105\right) \approx 0.659488. In its initial formulation, this is a ... 3answers 202 views ### Compute a certain “separability probability” via a constrained 4D integration over [-1,1]^4 I have employed the GenericCylindricalDecomposition command (applied to 6 \times 6 "density matrix" positivity constraints) to compute the following expression ... 0answers 18 views ### Passing a list of conditions to AND [duplicate] Say I have a list of some conditions, such as list = {y<x,x<0} And I'd like to plug this into RegionPlot, such as <... 1answer 48 views ### Simplify a Boole function I have a very long polynomial expression (which we can call here f(x,y,z,\zeta)). The coefficient have this object appearing a lot: ... 0answers 327 views ### Semantic tableaux generator I would like to use Mathematica to automatically generate a semantic tableaux (truth tree) from a formula in propositional logic). Here is an example formula:$$(a \lor\lnot b )\land b$$Here is ... 2answers 113 views ### How to test all possible input for a logic function? I have a logic expression: f0[a0_, a1_, a2_, a3_] := a0 And Not a1 And Not a2 And a3 Or Not a0 And a2 And a3 Or Not a0 And a1 And a3, I know I should use ... 1answer 85 views ### Combine single pulse with Boolean test, and integrate series I have edited this to include integration: This is a more general case of this question. I want to create a function that gives the integral of a series of single pulses of the form ... 2answers 81 views ### Why doesn't Boole return 0? I'm writing a code to evaluate if the Cauchy-Riemann conditions are satisfied for a given function. For example, for the function f[z]=Conjugate[E^(z)] it has to ... 1answer 56 views ### Logical equivalence of logical propositions that are converted from compact (implicit) notation to Mathematica code Here is logical formula:$$\bigwedge_{i=1}^{9} \bigwedge_{n=1}^{9} \bigvee_{j=1}^{9}~p(i,j,n)$$To use it in Mathematica I use that code: ... 2answers 139 views ### How can I input a logical proposition using a compact (implicit) notation? I have:$$\bigwedge_{i=1}^{9} \bigwedge_{n=1}^{9} \bigvee_{j=1}^{9}~p(i,j,n)$$How can I write it in Wolfram Mathematica code? I tried this way, but it does not work: ... 3answers 452 views ### How to check if compound proposition is contradiction (is always false)? I know how to check compound proposition if it is tautology with TautologyQ[]. But I have not found any function that can check if the compound proposition is ... 0answers 46 views ### How to input truth table and generate corresponding logical expression? [duplicate] I want to input truth table and generate the corresponding logical expression. For example, I have truth table: ... 1answer 136 views ### What is the easiest way to get truth table of logical expression? I remember that some time ago when I entered a logical expression like a\wedge b in the notebook there was an option (button or menu selection or etc.) to click and generate truth table for it ... 3answers 189 views ### Find positions of certain value in a big boolean list I would like to know is it possible to find positions of False in t: ... 1answer 47 views ### Deleting list points that are in a certain 3D region Hello I have a large number of data points, from which I want to remove these(between the red lines) that seem to fall onto one plane, what would be the best and easiest approach. Also added the ... 1answer 256 views ### How to force 2=={} as a Boolean output? I have a code as below:- x = 2; If[x == {}, 1, 0] I want the output to be 0, but the output I got is the entire ... 1answer 138 views ### BooleanRegion with .stl files does not work Im trying to use BooleanRegion[] on an .stl file. The imported .stl file is called pores and is of type MeshRegion (... 1answer 31 views ### List of elements joined by OR condition A simple command Or[f, f, f] gives f || f || f How this can be done automatically? I try ... 0answers 95 views ### Is BooleanRegion limited to only the most trivial cases? Consider these four regions: regions = Disk[#, 1] & /@ Tuples[{0, 4/5}, {2}] Graphics[{FaceForm[Opacity[0.2]], EdgeForm[Black], regions}] I was looking to ... 1answer 92 views ### Is it possible to change the ring in which Mathematica does operations? I would like to use Mathematica to find the eigenvalues of various members of a family of matrices which I'm using for research. The problem is that these matrices exist in M_{n\times n}\left(\mathbb{... 0answers 55 views ### Reversing evaluation of Boole I am currently using TransferFunctionPoles[TransferFunctionModel[{{A[w]}}, w]][[1, 1]] to identify the poles of some function A(w). However, A contains one ... 1answer 65 views ### Extract minterms from DNF I need to get the list of all minterms (as a list of boolean formulas) for a given DNF formula. For example for formula ... 2answers 55 views ### How to replace symbolic function call by indexing I have an expression like this: expr = x \[And] \[Not] x I would like it to behave like a Boolean function of parameter ... 2answers 567 views ### Simplify a Boolean Algebra expression with don't cares I want to simplify this expression: BooleanMinimize[(A ∧ ¬ B ∧ C ∧ ¬ D) ∨ (A ∧ B ∧ ¬ C ∧ ¬ D) ∨ (A ∧ B ∧ C ∧ ¬ D)] And I get this: ... 1answer 186 views ### Plotting RegionIntersection A new feature added in Mathematica 11.2 gives the ability to easily plot region intersection (see this post, scroll down to 3D Computational Geometry). However, I ... 2answers 98 views ### Split logic input I want to make a program that takes the input p&&q->q and then splits the input so I can create truth tables for p, <... 2answers 79 views ### forward or backward IntegerDigits in pairs must yield different results I have some pair configurations same as {0,1,1,1,0,1} with {1,0,1,1,0,1} or {1,1,0,1,0,1,1,1}... 0answers 32 views ### Why does Thread “collapse” my list of truth values when MapThread does not? [duplicate] If I have v1 = RandomInteger[5, 10]; v2 = RandomInteger[5, 10]; Remove[f] then, not surprisingly ... 1answer 36 views ### Separating completely independent systems of BooleanCountingFunctions I have an augmented matrix as a representation of many instances of BooleanCountingFunction[{k},n][vars], and I want to separate it out into many smaller subsystems ... 3answers 86 views ### Values of sequenced IntegerDigits lists with two fixed elements How can we access to all values of an IntegerDigits list with a special condition. This restriction is the locality of 0 or <... 1answer 240 views ### Boolean Expression simplification [closed] I'm stuck in proving (A+B+C+D)(A′+B′+C′+D′)=AD′+A′B+C′D+B′C using algebraic manipulation. I tried to solve it. I expanded ... 1answer 86 views ### special boolean operator I am familiar with some boolean operators. I want to access an operator that does a procedure same as below one. But for simplicity, we can say in the first step we ignore ... 0answers 705 views ### How can I speed up my code which finds the ratio of two sums that are hard to compute? [closed] Consider a set \left\{\left. T(c, d)\right|c, d\in\mathbb{Z}\right\}, a subset of the rational numbers. I want to compute D$$D=\lim_{(a,b)\to(-\infty, \infty)}\lim_{(r, t)\to(\infty,\infty)}D'(...
Imagine a sphere with $R40$ centered at ${0,0,0}$. Now a cylinder with $R25$ tangent in one of the quadrants of the sphere ending on the surface of the sphere. How do I get the volume of the ...