last day (15 days later) » 

20:11
0
Q: A mix of boolean algebra and algebra

Taha KhaboussI've been trying to factorize a function to use later in a program I'm developing where a variable is stuck within a logical expression: $$F(x,y,z) = x+y+z+(x \&y\&z)$$ where & is the Bitwise operator AND, and x,y,z are integers, so in order to reduce the number of computations I wanted to factor...

What does $x&y$ mean when $x$ and $y$ are integers??
@AlexKruckman x & y is the sum of (Bi(x) && Bi(y)) * 2^{i} from i = 0 to SIZE_OF_VAR and Bi(x) is the bit at index i of integer x, in other word && is AND for bits and & is AND over Integers
Ah, so it's the bitwise and. You should edit this information into the question.
@AlexKruckman Ok I will
Why do you want to use a Taylor expansion? How can the introduction of an infinite sum reduce the number of computations? I think it would be helpful if you explained what you mean when you say you want to "factorize" the function.
20:11
@RobArthan using Taylor expansion would give you a finite sum but IF and only IF that theory about boolean derivative is true, then all the second third .. derivatives will be zero so the sum will be finite and the variable which we are expanding at would be out of the bitwise operation
Your original expression is as simple as it gets. Unless you tell us a lot more about what your context is, you can't get any better than it already is.
@Somos I want two things, the first one is why my result is wrong? and the second thing is I'm trying to get x as a function of y and z
The Boolean differential you found is the differential with respect to a single bit. It makes no sense to use it the way you are trying to do where $x$ is an integer composed of many bits. There’s also nothing in the question that gives us any reason to think that $x$ might possibly be a function of $y$ and $z$.
After reading your reply to my comment, I now suspect that what you want to do is to decompose $F(x, y, z)$ as a composite of binary operations. I don't think there is a useful way of doing it. In any case, you really should tell us more about the actual context and what you are actually trying to achieve.
@DavidK the differential that works on a single bit can be extended to a range o bits
@RobArthan what I'm trying to acheive is to find one variable as a function of the other variable, why? because in this way I will be able to reduce number of operations
20:11
But what information do you have that suggests any of the three variables is a function of the others?
You can take the derivative with respect to the first bit of the derivative with respect to the second bit of the derivative with respect to the third bit of … the derivative with respect to the $n$th bit of the function $f$. It’s written with a symbol that looks a little like the $n$th derivative from a Taylor series, but that doesn’t make it the same thing. Your Taylor expansion meanwhile is missing the exponent $i$ that should be on $dx^i$.
@RobArthan the three variables are in function with each others already, I dont understand what you mean
@DavidK so the derivative in boolean algebra is not the same as the one we know?
What do you mean by "are in function with each others already"? I $x$, $y$ and $z$ are just parameters to your problem, why should there be any relation between them?
They call it “Boolean derivative” because it is analogous in some ways to a derivative from calculus. If it were actually the same thing as a derivative from calculus, they would just call it a “derivative”, not a “Boolean derivative”.
@RobArthan when you say f(x,y)=x+g(y) its the same as saying z=x+g(y) if we want y as a function of x we can say y=g^-1(z-x)
@DavidK oh i see now, thanks
20:11
That isn't right. Your $g$ might not be invertible. And saying $f(x, y) = x + g(y)$ is not the same as saying $z = x + g(y)$: the first assertion is a statement about $x$ and $y$, while the second introduces a new variable $z$.
g in my case is a boolean function and this question is somehow about its invertibility, and also z=f(x,y)

last day (15 days later) »