Hey,

When i was trying to figure out rebit on a paper by brutforcing solution for different tests,

I found weird patterns, I’ll be attaching them somewhere below

doesn’t that look like (a^2 + b^2 + ab + ab) = 1(any ways sum of probabilities are 1 but …)

‘&’ operation gives something like a^2, ‘|’ operation gives something like b ^ 2 and XOR’s are giving a * b;

I tried to refer few things online, But couldnt find any related stuff, Any info is appreciated.

Thank you

I think there will be no generalised pattern in this question. This ques requires Infix evaluation through stack(At least i think so). I suggest you to watch this video in order to understand this problem well

There is a pattern which you can clearly see, if you’ve converted in terms of fractions. I’ve solved the question at the time of contest it self with infix evaluation.

there is some mathematical properity of bitwise operators which is giving this pattern, and I wanted to know it