Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [boolean-computation]

Questions on the functionality of Mathematica for Boolean computation.

2
votes
3answers
164 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
40 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
88 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 ...
-1
votes
2answers
86 views
3
votes
2answers
79 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
77 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
68 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
50 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
123 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
322 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
42 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
109 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
174 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
38 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
241 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
85 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
28 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
67 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
81 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
50 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
43 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
320 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
150 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
97 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
32 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
84 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
186 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
78 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
703 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
92 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
86 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
92 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
102 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
261 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
183 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
409 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
177 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 ...
0
votes
1answer
186 views

I need to organize a sum of terms in a pseudo-boolean function into a matrix!

I have a long 2-local summation of terms that I want to organize into a matrix such that the coefficients of the 1-local terms (a term with just a scalar coefficient and a single variable) are on the ...
4
votes
0answers
89 views

How to use Resolve to prove ForAll function

I want to prove that ∀n ∈ N,Mod[9^n - 8 n - 1, 64] == 0 I think I should use Resolve to prove it ...
0
votes
2answers
63 views

How to create BooleanTables in Mathematica for $A \not \Rightarrow B$ and $A \Leftrightarrow B$? [closed]

How to create BooleanTables in Mathematica for $A \not \Rightarrow B$ and $A \Leftrightarrow B$ ?
4
votes
1answer
262 views

How to specify a Boolean Minterm expression using don't cares in Mathematica

The Mathematica Boolean Computation webpage specifies that Mathematica has full support for "don't care" arguments and values. However I don't see any examples demonstrating this functionality. Could ...
3
votes
1answer
98 views

Automatically create a formula from the output of Reduce function

Suppose an output of Reduce[] function looks like this: ...
4
votes
2answers
338 views

How to get the center of mass of solids

I got a 3Dsolid formed by subtraction of geometries through 'RegionDifference'. My intention now is to get the center of mass of the solid. This is the geometry that received the subtraction: ...
2
votes
1answer
43 views

Inconsistent results with booleanfunction and booleantable

Can someone please explain the inconsistent results I'm getting from BooleanTable and BooleanFunction? Using the following truth table: ...
2
votes
1answer
104 views

Why does this code snippet return False? [closed]

f[_x] := x^2 g[_x] := x^2 TrueQ[f[x] == g[x]] Can anyone explain why it returns False, while TrueQ[x^2 == x^2] does not? Does ...