Questions tagged [boolean-computation]

Questions on the functionality of Mathematica for Boolean computation.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
316 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 ...
Alexander Lopez's user avatar
0 votes
1 answer
100 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 ...
Inzo Babaria's user avatar
  • 1,513
3 votes
0 answers
713 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'(...
Arbuja's user avatar
  • 59
3 votes
2 answers
178 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 ...
LCarvalho's user avatar
  • 9,233
3 votes
0 answers
95 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 ...
Gilmar Rodriguez Pierluissi's user avatar
3 votes
0 answers
153 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. ...
ConvexMartian's user avatar
8 votes
0 answers
189 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 ...
ConvexMartian's user avatar
4 votes
1 answer
420 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 (...
Paul B. Slater's user avatar
3 votes
2 answers
428 views

boolean casting

In Mathematica one can do something like the following: ...
Dimitris's user avatar
  • 4,794
1 vote
0 answers
49 views

Make FindInstance accept only parametrized solutions

I have for example the following conditions: ...
Mirko Aveta's user avatar
  • 2,192
1 vote
1 answer
956 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 ...
Haliki's user avatar
  • 67
1 vote
0 answers
230 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 ...
kevin's user avatar
  • 11
0 votes
1 answer
223 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 ...
Neil Philip's user avatar
4 votes
0 answers
140 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 ...
Kevin's user avatar
  • 169
0 votes
2 answers
74 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$ ?
Aronas's user avatar
  • 1
4 votes
1 answer
439 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 ...
Jacob Huesman's user avatar
3 votes
1 answer
117 views

Automatically create a formula from the output of Reduce function

Suppose an output of Reduce[] function looks like this: ...
Physicsworks's user avatar
4 votes
2 answers
558 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: ...
LCarvalho's user avatar
  • 9,233
2 votes
1 answer
61 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: ...
BCott's user avatar
  • 89
2 votes
1 answer
121 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 ...
Markus Klyver's user avatar
3 votes
3 answers
2k views

How to change the colour of parts of a 3D plot, rather than the whole figure?

By exporting Matlab data to a txt file and importing it with List3DPlot, I plotted the density of states in a nanowire ...
Betohaku's user avatar
  • 205
5 votes
1 answer
570 views

Boolean function from incomplete truth table

BooleanFunction in mathematica can convert an input truth table to a Boolean function. It can do so even if the truth table is incomplete. But the interpretation of truth table obtained from such an ...
prabhat's user avatar
  • 95
5 votes
2 answers
229 views

Threading sublists on list

Suppose I have a list of the form: list = {a, b, {c, d}, f, {g, h}} i.e. an element of the list could be another list. I want to 'thread' each element of the ...
Vazquez's user avatar
  • 361
2 votes
2 answers
287 views

Ask Mathematica if there exists a value that satisfies conditions

I would like to build a function that returns true if there exists even one value of xg1 such that having as inputs Mtot, PL, xg2, mac, xga, and defining ...
Mirko Aveta's user avatar
  • 2,192
0 votes
1 answer
344 views

Find partial solution for underdetermined system of Boolean equations (Minesweeper)

In this article about creating a Minesweeper solver, the author talks about using matrices to solve given portions of a Minesweeper board. While reading that, I thought of a different way to limit the ...
404UserNotFound's user avatar
2 votes
1 answer
309 views

Converting Boolean functions to polynomials

We can generate a Boolean function of $n$ variables (take $n=4$ as an example) as follows: f = BooleanFunction[10, 4] I want to express $f$ as a polynomial. This ...
user38440's user avatar
1 vote
2 answers
397 views

Convert a Boolean table to a Boolean expression

How do I convert a Boolean table to a Boolean expression using BooleanMinterms. For example: ...
ْزَيْنَب's user avatar
1 vote
1 answer
647 views

How can I draw truth tables using Mathematica [duplicate]

For instance, the given expression p ⊕ (p v q) In the problem I'm trying to solve. There's a Mathematica answer to this: ...
wa7d's user avatar
  • 45
3 votes
2 answers
2k views

How to evaluate Boolean expression and get an answer in bitwise form?

I am trying to evaluate the following expression: 11000 AND ( 01011 OR 11011 ) I am able to get the answer on paper. The answer is: ...
wa7d's user avatar
  • 45
25 votes
1 answer
674 views

Why is SatisfiabilityCount faster than SatisfiableQ?

Consider the following (large) Boolean expression, which arose in a SAT problem. (The expression is not satisfiable.) ...
David Zhang's user avatar
  • 2,316
2 votes
3 answers
790 views

Applying boolean logic to a 2D array

How can I make a function that creates a particular size 2D matrix that determines True or False if a random value between ...
victorshade's user avatar
5 votes
0 answers
204 views

Theorem Proving

It's a hard for me to write english so I'll try to go straight to my problem. There is abstract predicate f, that takes two parameters. There are also two other ...
rattrapper's user avatar
1 vote
1 answer
1k views

How to convert Boolean predicates to numeric expressions [closed]

I'd like to use Boolean expressions as numeric values, as in: a = 3 < 2 b = 3 a * b but the final result of that is 3 False, instead of 0. I can do something ...
Peeter Joot's user avatar
  • 6,398
3 votes
1 answer
195 views

Using TrueQ with conditions

Say I want to ask Mathematica whether $|x| = x$ for all $x > 0$. Obviously, if I try TrueQ[Abs[x] == x], I get False, ...
Why-Seven-Six's user avatar
5 votes
1 answer
356 views

Defining an arbitrary binary relation

I am trying to define some binary operators. A binary operator operates on a set of variables V and is defined by a subset S of pairs of those variables {Vi,Vj}. For example, "=",">",">=" are all ...
Paul R.'s user avatar
  • 877
0 votes
1 answer
55 views

Compute an indefinite sequence of And

I would like to compute a condition of normalization over a set of vectors which has the form $$ (x_1.x_1 =1 ) \land ...\land (x_n.x_n=1) $$ Where the $x_i$ are vectors, and $n$ is a variable fixed at ...
Toool's user avatar
  • 167
6 votes
1 answer
897 views

Region Intersection for MeshRegion objects embedded in 3D

How can I create a logical intersection of MeshRegion objects that are three-dimensional? The RegionIntersection function will ...
Katia's user avatar
  • 61
-2 votes
1 answer
911 views

Creating truth tables [closed]

I want to write a module in Mathematica that receives a Boolean function f. The module should write on screen: Truth table of function ...
joejoe's user avatar
  • 11
1 vote
2 answers
169 views

Discrete Measure between Binary Vectors

I would like a discrete distance measure between two binary vectors (or strings). Like HammingDistance but I want the vectors to be considered closer if they have ...
lalmei's user avatar
  • 3,332
2 votes
0 answers
128 views

Algorithm for converting truth tables to Boolean functions

The function BooleanFunction is able to convert a truth table into a Boolean function. Does anyone know what is the mathematical background and/or algorithm that ...
cylim's user avatar
  • 121
1 vote
2 answers
211 views

How to combine all possible N boolean values?

Is there any simpler formula than Tuples[{False, True}, 3] to generate tuples of all combinations of boolean values?
Suzan Cioc's user avatar
  • 2,023
-1 votes
2 answers
203 views

Logical Circuit [closed]

Does somebody know about how to simulate this in Mathematica? I want to give Mathematica the two Inputvalues x,y and it should output c,s. $$c=x\land y$$ $$s=x\veebar y$$ $$x,y\in \{0,1\}$$
Maddi's user avatar
  • 21
2 votes
2 answers
217 views

Boolean algebra does not simplify

I am doing some simple Boolean algebra and wanted to perform some calculations in Mathematica but found it doesn't work. Let us consider the expression: ...
Philipp's user avatar
  • 641
7 votes
2 answers
1k views

How to simplify Boolean expression

I would like to simplify $$((p\oplus q)=True)\wedge(p=True)$$ to $$q=False$$ I was hoping BooleanMinimize[((p ⊻ q) == 1) ∧ (p == True)] would do the trick, but ...
E.O.'s user avatar
  • 1,213
3 votes
4 answers
923 views

Simplify binary expressions

Is it possible for Mathematica to do simplifications for expressions where the variables are binary, such as: a + b = 1 + 2*c => a + b = 1 Here c must be 0 because if it is 1, the RHS is 3 but the ...
user1271772's user avatar
5 votes
0 answers
269 views

Can I define an axiomatic (Boolean algebra) system and prove theorems using Mathematica?

The general question is Can I define an axiomatic system and prove theorems using Mathematica? The more concrete one is about Boolean algebra. I consider this axiomatic Boolean algebra system (wiki)....
hengxin's user avatar
  • 840
2 votes
2 answers
286 views

Infinite sums with Boole and EvenQ

Suppose I am interested in a sum across a set of even numbers, such as: Sum[x, {x, 2, 20, 2}] 110 or ...
wolfies's user avatar
  • 8,722
2 votes
0 answers
224 views

What are the steps using boolean algebra for transforming one equation into another?

I have a special case where I have two equations, which I have solved in a better and quicker way, but I need to solve with Boolean algebra. Using the laws of Boolean algebra, I have to prove that ...
Byakugan's user avatar
  • 121
4 votes
3 answers
398 views

Importing an array from text file and convert it to truth table

I am new to Mathematica, and would like some help in the following operation. I have a truth table stored in a text file. I want to read this in Mathematica, and find its Boolean Rule. Suppose I have ...
prabhat's user avatar
  • 95
0 votes
1 answer
81 views

Solving at zeroes of a matrix - code only works for simple equation

I have a matrix of zeroes (True) and non-zeroes (False). The matrix is generated from a table of values of two other variables. I'm trying to observe how the solution for p3 changes with small '...
user44840's user avatar
  • 421