Questions tagged [boolean-computation]

Questions on the functionality of Mathematica for Boolean computation.

Filter by
Sorted by
Tagged with
2
votes
0answers
106 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): ...
18
votes
0answers
360 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 ...
1
vote
1answer
50 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 ...
4
votes
2answers
194 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 ...
3
votes
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 ...
0
votes
1answer
70 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{...
0
votes
0answers
45 views

Result of BooleanCountingFunction?

Folks, when i use BooleanCountingFunction[{1}, {v1,v2,v3}, "CNF" ] i get a neat output like: ...
0
votes
0answers
63 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, <...
0
votes
0answers
67 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 ...
2
votes
3answers
199 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 ...
0
votes
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 <...
1
vote
1answer
47 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: ...
3
votes
0answers
216 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 ...
3
votes
2answers
102 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 ...
1
vote
1answer
82 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 ...
0
votes
2answers
76 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 ...
1
vote
1answer
52 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: ...
4
votes
2answers
131 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: ...
5
votes
3answers
376 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 ...
0
votes
0answers
45 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: ...
1
vote
1answer
123 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 ...
8
votes
3answers
183 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: ...
1
vote
1answer
44 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 ...
2
votes
1answer
250 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 ...
4
votes
1answer
127 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 (...
1
vote
1answer
30 views

List of elements joined by OR condition

A simple command Or[f[1], f[2], f[3]] gives f[1] || f[2] || f[3] How this can be done automatically? I try ...
5
votes
0answers
85 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 ...
2
votes
1answer
87 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{...
0
votes
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 ...
1
vote
1answer
55 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 ...
2
votes
2answers
53 views

How to replace symbolic function call by indexing

I have an expression like this: expr = x[2] \[And] \[Not] x[3] I would like it to behave like a Boolean function of parameter ...
5
votes
2answers
433 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: ...
6
votes
1answer
176 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 ...
1
vote
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, <...
1
vote
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}...
1
vote
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 ...
1
vote
1answer
34 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 ...
2
votes
3answers
85 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 <...
-2
votes
1answer
220 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 ...
0
votes
1answer
85 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 ...
3
votes
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'(...
3
votes
2answers
105 views

Boolean operation to obtain volume

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 ...
3
votes
0answers
89 views

Applying the Four-color Theorem to the map of Florida [duplicate]

I'm still wrestling with the following problem; I' m attempting to apply the Four Color Theorem to the map of Florida; USA. The attribute "BorderingCounties" doesn't work for Alachua County (but, it ...
3
votes
0answers
104 views

(FindInstance) Speeding up a slow integer program by converting to a boolean program

Here is an integer program with a bunch of inequality and equality constraints. FindInstance takes 2 seconds to solve it. ...
7
votes
0answers
111 views

FindInstance boolean program is slow, but fast with BooleanConvert

FindInstance can be incredibly slow to solve a boolean program, but it can be significantly improved by using BooleanConvert to ...
4
votes
1answer
276 views

Implementing positivity constraints over a six-dimensional hypercube

This question involves the same subject matter as my previous one (How can one achieve the most accurate estimates of certain six-dimensional integrals under specific constraints?), but with another (...
3
votes
2answers
239 views

boolean casting

In Mathematica one can do something like the following: ...
1
vote
0answers
47 views

Make FindInstance accept only parametrized solutions

I have for example the following conditions: ...
1
vote
1answer
491 views

Generating a random network adjacency matrix via an arbitrary average degree [closed]

I wanted to generate a directed random network adjacency matrix by determining the average in-degree myself. Due to the rules of the model I use, any edge (or matrix element) can be zero or nonzero ...
1
vote
0answers
192 views

Converting an expression to a graph (block diagram ) [closed]

I want to make a diagram of the expression block1 ∩ block2 ∩ (block31 ∪ block32) ∩ block4, as in the image shown below. This expression can be put into a Boolean ...