Questions tagged [boolean-algebra]
The boolean-algebra tag has no usage guidance.
272
questions
23
votes
7
answers
242k
views
How to construct XOR gate using only 4 NAND gate?
xor gate, now I need to construct this gate using only 4 nand gate
...
20
votes
3
answers
6k
views
Is it possible to write an AND gate using XOR gates?
How could I express an AND gate using only XOR gates ?
18
votes
11
answers
5k
views
Why do logic gates behave the way they do?
I am a Software Developer but I came from a non-CS background so maybe it is a wrong question to ask, but I do not get why logic gates/boolean logic behave the way they do.
Why for example:
...
11
votes
2
answers
3k
views
Are Boolean functions Turing complete
A Boolean function is a function $f:\{0,1\}^n\rightarrow\{0,1\}$.
The boolean basis $(\vee,\wedge)$ is known to be Turing complete as it allows any sequence $s\in\{0,1\}$ to be flipped or to be left ...
9
votes
0
answers
170
views
Boolean formula that agrees with most truth assignments
Let $X_1,\dots,X_n$ be $n$ boolean variables. I have an unknown predicate $P(X_1,\dots,X_n)$ on these boolean variables. Of course, I can view the predicate as a function $f_P : \{0,1\}^n \to \{0,1\}...
8
votes
1
answer
2k
views
Which CNF boolean formulas blow up exponentially at conversion to DNF?
If I'm correct, some boolean formulas in CNF require exponential size when being converted to an equivalent DNF version (and vice versa).
But what is an example of such a formula (and is there a ...
7
votes
4
answers
8k
views
Boolean algebraic expression vs Propositional logic expression
There is a lot of similarity between Propositional logic and Boolean algebraic expressions.
Similar aspects :
1) Both has variables of two states.
2) Operations of Boolean algebra and ...
7
votes
1
answer
442
views
Why do Karnaugh maps work?
The question is quite straightforward: Why do Karnaugh maps work? What was the reasoning that led Maurice Karnaugh to come up with these maps? At first glance, it doesn't seem a natural approach, ...
7
votes
1
answer
6k
views
What is a simple way of explaining what a linear boolean function means in boolean algebra and relating it to the standard definition of linearity?
I was reading notes on computability theory when I came across the term "Linearity" which I was not familiar with, in the context of boolean functions. I am quite comfortable what linear maps mean in ...
6
votes
3
answers
38k
views
Absorption Law Proof by Algebra
I'm struggling to understand the absorption law proof and I hope maybe you could help me out.
The absorption law states that: $X + XY = X$
Which is equivalent to $(X \cdot 1) + (XY) = X$
No problem ...
6
votes
1
answer
282
views
Is there an intuitive proof for the existence of hard functions?
I am referring to the theorem on page 115 of the book by Arora and Barak, which states that, ``For every $n>1$, there exists a function $f:\{0,1\}^n \rightarrow \{0,1\}$ that cannot be computed by ...
6
votes
1
answer
325
views
Why are there two not operators in lambda calculus?
From Wikipedia:
$\mathrm{true} = \lambda a. \lambda b. a$
$\mathrm{false} = \lambda a. \lambda b. b$
Because true and false choose the first or second parameter they may
be combined to provide logic ...
6
votes
2
answers
2k
views
Converting truth table to algebraic normal form
Is there any efficient algorithm to convert a given truth table of a Boolean function to its equivalent algebraic normal form (ANF)?
I have seen that Sage has one implementation (official ...
6
votes
1
answer
67
views
Small world theorem for set constraints
Let $S_1,\dots,S_n$ be variables representing unknown sets. A set expression has the form $S_i$, $\overline{E}$ (the complement of $E$), or $E \cap E'$, where $E,E'$ are set expressions. A ...
5
votes
2
answers
2k
views
Boolean absorption
A and ( A or C ) = A
And
A or A and C = A
How do these identities work?
Using the rule
A and ( B or C ) = A and B or A and C
For the first identity, I get
A and A or A and C = A or A ...
5
votes
5
answers
968
views
Prove HAKMEM Item 23: connection between arithmetic operations and bitwise operations on integers
Prove that for $A, B \in \mathbb{Z}$, $A + B = (A \operatorname{\&} B) + (A \mid B) = (A \oplus B) + 2(A \operatorname{\&} B)$ where $\&$ is bitwise AND, $|$ is bitwise OR and $\oplus$ is ...
5
votes
3
answers
6k
views
Measuring Complexity of Boolean Satisfiability Problem
How exactly is the complexity of a SAT solver measured? My main concern is that, for $N$ variables, you can have, e.g., an OR of $O(2^N)$ AND terms, which would take at least $O(2^N)$ time to process. ...
5
votes
2
answers
1k
views
Sensitivity and Block sensitivity
May be this question is really silly and obvious but I am missing something subtle. I am reading on Sensitivity and Block sensitivity.
Let $f:\{0,1\}^n\rightarrow \{0,1\}$ be a Boolean function.
Let ...
5
votes
1
answer
219
views
Finding a graph-theoretic representation of expressions in Boole's algebra
I just read "Boole's Algebra Isn't Boolean Algebra" by Theodore Halperin (behind a paywall here). I don't have a strong background in abstract algebra, so, frankly, the paper is a bit over my head but ...
4
votes
1
answer
184
views
A universal operator necessarily generates $\neg x$ for input $x,…,x$
I originally posted this on math.stackexchange, but then deleted it and moved it here since I think it would fit this site more.
I saw a claim in a slideshow from a basic computer architecture course ...
4
votes
1
answer
451
views
Issue understanding the reduction of SAT to 3-SAT in poly time
Reading this http://classes.soe.ucsc.edu/cmps102/Spring10/lect/17/SAT-3SAT-and-other-red.pdf, I came to know that reducing a clause $C_i$ from a $SAT$ instance containing more than 3 literals to a $3-...
4
votes
1
answer
551
views
What happens to uninterpreted predicates in Ackermann's reduction?
I know the procedure to apply the Ackermann's reduction to a formula that doesn't involve uninterpreted predicates. But, how do we treat the uninterpreted boolean predicates? Nearly all the examples I ...
4
votes
1
answer
928
views
What is the XNOR of 3 or more inputs?
We know that for 3 variables (A=0,B=1,C=1), f$_1$ = (A XNOR B XNOR C) = 1, since the input has even number of 1's.
But if we were to do this step by step, f$_2$ = (A XNOR (B XNOR C)) = (A XNOR (1 ...
4
votes
1
answer
435
views
Random forests on monotone training set yields a monotone classifier?
Suppose I train a random forests classifier on a monotone training set. Is the resulting classifier guaranteed to be a monotone function?
Suppose I apply the ID3 algorithm (the greedy algorithm) to ...
4
votes
2
answers
72
views
Compact representation for quantified boolean formula
I got black-box (too big to analyze) boolean formula f(...) with 3 sets of input arguments: $x_1... x_i, y_1... y_j, z_1... z_k$. And I want to find such values for x-arguments that for every y-...
4
votes
1
answer
760
views
Number of solutions to linear system of equations over GF(2)
Linear systems of equations over the reals have either 0, 1 or infinitely many solutions. However, when applied to finite fields (specifically GF(2)), infinitely many is not an option.
Is there a ...
4
votes
1
answer
95
views
Common parse tree for several formulas
I have a large (~1k) number of boolean formulas like:
f1(x) = p1 AND p2
f2(x) = (p1 AND p2) OR p3
f3(x) = p4 OR !p5
The argument x is a set, and the predicates (...
4
votes
2
answers
2k
views
Simplest combination of logic gates to produce a given set of outputs
Given a truth table for a truth function that takes n inputs and produces a single output (true or false), what is the fastest way to find the simplest combination of logic gates that will output the ...
4
votes
0
answers
265
views
Can every sentence of first-order logic be converted into an equisatisfiable equation in Boolean algebra?
There may be some theoretical literature, unknown to me, that addresses this question. If possible, I would like a practical approach to this problem. My attempt involves the use of an equational ...
4
votes
0
answers
32
views
Constructing xor separable boolean upper bound
Problem statement Suppose I have a boolean function $f: \mathbb{F}_2^n \times \mathbb{F}_2^m \to \mathbb{F}_2$ where $\mathbb{F}_2 = \{0,1\}$.
I define two boolean functions $h: \mathbb{F}_2^n \to \...
4
votes
0
answers
224
views
Simple example of exponential gap between monotone and non-monotone circuits
Is there a simple example of a monotone Boolean function $f:\{0,1\}^m \to \{0,1\}$ that we know can be computed by a polynomial-size circuit, but cannot be computed by any polynomial-size monotone ...
4
votes
0
answers
122
views
Can minimal CNF contain clause longer than initial CNF?
Let $\Phi$ be a k-CNF and $\Phi_{min}$ be a minimal CNF (one that contains smallest amount of literal occurences) that is equal to $\Phi$.
Can $\Phi_{min}$ contain a clause of size $m > k$?
What ...
3
votes
4
answers
1k
views
Proving that $A \vee (\neg A \wedge B) \equiv A \vee B$
I'm reading a book at the moment about logic gates and Boolean simplification. There is a part which I can't seem to follow.
I can easily work out that $A \vee (\neg A \wedge B) \equiv A \vee B$ ...
3
votes
2
answers
133
views
Classical Computation without NOT
Is it possible to do universal classical computation using bits and 2-bit gates when you cannot perform a NOT operation on a single bit (hence cant do CNOT and so on). If yes, what are the possible ...
3
votes
2
answers
261
views
Is every X3SAT instance with no cycles satisfiable?
Exactly 1 in 3 SAT (X3SAT) is a variation of the Boolean Satisfiability problem. Given a set of clauses, where each clause has three literals, is there an assignment such that in each clause exactly ...
3
votes
1
answer
105
views
Are there any techniques for checking whether a clause is subsumed by another clause when adding it to a cnf formula?
When doing variable elimination on a formula in cnf form, there is created a lot of new clauses. Is there any efficient way to check if these are subsumed by other, already existing clauses?
3
votes
1
answer
163
views
Is is possible to determine if a given number is xor combination of some numbers?
I have been given a number Y which is ($a$ xor $b$ xor $c$ xor $d$ xor $e$ ) of some numbers ($a$,$b$,$c$,$d$,$e$) and another no X. Now i have to determine if X is a xor combination of ($a$,$b$,$c$,$...
3
votes
1
answer
146
views
Design an algorithm,have polynomial complexity for deciding satisfiability of a 1-conjective Normal Form boolean formula
I undetstand each part of the word group in this question. I have search for a while but I still can't understand what the whole question want me to do. I will state what I know and give an assumption ...
3
votes
1
answer
698
views
Relation between Lattice and Boolean Algebra
In discrete math, I have read that lattice is a generalized form of boolean lattice. But those places where boolean algebra is mentioned, they don't tell about lattices (digital logic, binary,...). ...
3
votes
1
answer
660
views
Algorithm for simplifying ANF or polynomials?
I have some digital logic circuits in Algebraic Normal Form, and am limited to using XOR and AND logic gates.
For instance:
$B_{out} = B_1 B_2 \oplus B_1 B_3$
I was wondering, are there any ...
3
votes
2
answers
2k
views
Do Karnaugh maps yield the simplest solution possible?
I'm learning to use a Karnaugh map, but I'm not sure if I obtained the simplest expression possible. Have a look at this example:
Truth table (inputs are A B C; output is F):
...
3
votes
3
answers
108k
views
Which law is this expression X+ X’.Y=X+Y
Question. Name the law given and verify it using a truth table. X+ X’.Y=X+Y
...
3
votes
1
answer
64
views
Stalmarck's method: x ≡ x → z, does z have to be true?
I have been researching Ståmarck's method 1. In the paper cited here, some rules are given. Rules are made of triplets (x, y, z) such that:
y $\to$ z $\equiv$ x
where x, y and z are booleans which ...
3
votes
1
answer
8k
views
Boolean Algebra : Using identities, prove x(x + y) = x
Example: Prove the ABSORPTION LAW:
$$
x(x + y) = x
$$
$
Solution: \\
x(x + y) \\
= (x + 0)(x + y) \;\;\;\;\; Identity \;Law \\
= x + (0 · y) \;\;\;\;\;\;\;\;\;\;\; Distributive \;Law \\
= x + y · 0 ...
3
votes
1
answer
355
views
Help me understand the logic behind x - y in binary by boolean?
x and y are 4 bit signed numbers (2s complement..)
x - y can be obtained by:
!(!x + y)
I know that in 2s complement
...
3
votes
1
answer
302
views
What are the limits of Boolean Algebra?
Any decision problem algorithm can be represented as a boolean expression. The rules of boolean algebra (De Morgan's law, distributivity, etc.) can be used to manipulate and simplify that expression, ...
3
votes
1
answer
96
views
Polynomial size Boolean circuit for counting number of bits
Given a natural number $n \geq 1$, I am looking for a Boolean circuit over $2n$ variables, $\varphi(x_1, y_1, \dots, x_n, y_n)$, such that the output is true if and only if the assignment that makes ...
3
votes
1
answer
474
views
Infinite Boolean circuits as a model of computation
Boolean circuits are non-uniform models of computation in that they require a different circuit for each length of input. The typical way of uniformizing a family of Boolean circuits is to define a ...
3
votes
1
answer
190
views
Is boolean formula isomorphism NP-complete?
Problem. Given 2 functions $f,~g$ of the same length $n$, decide if we can change variables in $f$ such that it will be identical to $g$. There are exponentially many non-isomorphical functions (as ...
3
votes
1
answer
45k
views
Two's complement Using ONLY Logic Gates
How can a 4-bit two's complement operation be implemented using only boolean logic gates (AND, OR, NOR, NOT, NAND, XOR, and XNOR)?
(This question was redirected to CS from Stack Overflow)