Questions on the functionality of Mathematica for Boolean computation.

learn more… | top users | synonyms

2
votes
2answers
78 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 ...
0
votes
0answers
48 views

Problem with Greater in Compile

I am relatively inexperienced with Mathematica so I apologize for the possibly simple question. I have written the following function which should receive a matrix as input. If I compile this, ...
0
votes
1answer
92 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 ...
1
vote
2answers
89 views

Convert a Boolean table to a Boolean expression

How do I convert a Boolean table to a Boolean expression using BooleanMinterms. For example: ...
2
votes
1answer
51 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 ...
1
vote
1answer
85 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: ...
3
votes
2answers
286 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: ...
15
votes
1answer
264 views

Why is SatisfiabilityCount faster than SatisfiableQ?

Consider the following (large) Boolean expression, which arose in a SAT problem. (The expression is not satisfiable.) ...
2
votes
3answers
96 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 0 and 1 is at or below a certain number? Below is what I have written but ...
5
votes
0answers
130 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 ...
0
votes
1answer
48 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 ...
13
votes
3answers
611 views

Binary decision diagrams (BDD)

I would like to use Mathematica to help me simplify a given Binary Decision Diagram (i.e. pick the optimal variable ordering). I don't seem to find anything at all on the topic, although it is ...
3
votes
1answer
80 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, ...
3
votes
1answer
103 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 ...
0
votes
1answer
46 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 ...
-2
votes
1answer
215 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 ...
4
votes
0answers
246 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 ...
5
votes
0answers
182 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 ...
1
vote
2answers
78 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 ...
3
votes
2answers
283 views

How to rewrite this function to be faster: Find sub-matrixes of boolean board which imply a given boolean pattern

I have Boolean matrix A (called "board") and Boolean matrix B with smaller dimensions (called "pattern"). I am trying to find sub-matrixes C of A such that C has same dimensions as B, and ...
1
vote
0answers
56 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 ...
1
vote
2answers
93 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?
-1
votes
2answers
92 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\}$$
2
votes
2answers
109 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: ...
3
votes
4answers
289 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 ...
6
votes
2answers
283 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 ...
1
vote
2answers
107 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 ...
2
votes
0answers
172 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 ...
4
votes
3answers
259 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 ...
0
votes
1answer
69 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 ...
2
votes
2answers
390 views

Given a system of inequalities, how to make Solve find out that two variables should be equal?

Given two boolean variables x1 and x2 (in the sense that they are in the range [0,1]), if I try to solve the following equation system with Solve: ...
1
vote
1answer
186 views

3D Contour Plot - parts with gradients less and more than zero

I'm trying to plot sections of the 3D Contours, with gradient less than zero, and more than zero and equal to zero. It manages to solve for the derivative, but when I apply the conditions ...
1
vote
2answers
677 views

3D Contour Plot parts of sphere with gradient less than 0, equal to 0 and more than 0

I want to plot only parts of the sphere of radius 1 where the gradient $\frac{\partial z}{\partial x}$ is < 0, = 0 and > 0. The full sphere is given by: ...
1
vote
2answers
97 views

Numbering of cases implied by a subset of Boolean vectors

In the course of a programming problem I stumbled upon the following sub-problem. Given an arbitrary, but fixed, number of Boolean variables, I would like to be able to pick a subset of the ...
42
votes
7answers
6k views

Intersecting graphics

Does the Mathematica graphics system have any concept of intersecting graphics? I've not found much in the documents so far. For example, if I want to show the intersection of two shapes: ...
4
votes
3answers
146 views

Is there an equivalent of Sum for And?

Is there an equivalent to Sum for And? That is, just like instead of ...
0
votes
1answer
88 views

If statements with a Boolean [duplicate]

If I have a vector {1,2,3}, I want to write an If statement, where if one of the positions is "1", it will perform a certain command. ...
3
votes
1answer
838 views

Converting truth tables to boolean expressions

I have a truth table for a Boolean expression represented like this ...
29
votes
5answers
2k views

Are there “All” and “Any” functions in Mathematica?

In Python, there is a function all which returns true if all of its arguments are true, and any which returns true if at least ...
1
vote
3answers
341 views

Conditional Check on Matrix

Suppose I have the following matrix (i,j): ...
0
votes
1answer
254 views

Expressions with Boolean variables and simplification

I have some familiarity with Mathematica, but have no experience with any Boolean computation. Suppose we have the Boolean formula $(x_1 \lor x_2) \land (x_2 \lor x_3)$. This can be simplified by ...
5
votes
1answer
404 views

Using Boole to integrate over region

I have a complex and long piecewise function to integrate, so I have written a Mathematica script that cuts the whole range of integration, evaluates the integrand in each region and then integrates ...
4
votes
3answers
390 views

Fast method for combining two lists

I have two lists, v1 and v2. Each element of the lists may be positive or negative. I want to create a list ...
1
vote
1answer
538 views

How to generate the truth table to prove logical equivalence?

How to generate the truth table to show that $p \implies (q \vee r)$ is equivalent to $(p \wedge \neg q ) \implies r$ ? Can I use BooleanTable?
0
votes
2answers
243 views

NIntegrate using Boole doesn't work

This doesn't want to work for me - I don't know why not. It usually gives me 0, but sometimes also a different number. I know it should be a small, non-zero number. ...
2
votes
3answers
512 views

Matlab-style Find in Mathematica? Value list and Boolean List, how to select values according to the boolean list?

I want to select elements with the true value (Indices list) in the corresponding point to the value list (MCS). Is there anything like Matlab-style Find to get the indices of true values in the ...
2
votes
2answers
117 views

How to negate a boolean vector?

The !True returns False but how can I negate a boolean vector such as {True, False, True}? ...
0
votes
3answers
247 views

Given a Boolean representation of a system, how can the Reliability Function be displayed as symbolic algebra?

Can Mathematica 9 convert a Boolean representation of an RBD to its symbolic algebraic form? If I have a simple series Reliability Block Diagram made up of 2 components, c1 and c2 bexpr1=And[c1,c2] ...
0
votes
2answers
152 views

How to add variables to boolean expression and get conjunctive normal form?

I have the boolean expression (a && !b). I want to add variables c, d into the ...
0
votes
1answer
110 views

Replace !x with x != 1

I have some logical relationships that I ultimately want to pass to NMaximize as constraints: ...