Sunday, January 13, 2019

Shooting problems P-22,P-23,P-25 via "Calculus of basic predicates" by E.A.Mironchick 2017

  That is a fairly strong demonstration of power and flexibility of "Calculus of basic predicates" approach by E.A.Mironchick 2017

In general we follow guidelines of technique developed in
http://kpolyakov.spb.ru/download/mea18bit.pdf

Per link mentioned above (quoting Helen A. Mironchick)
Let Et (x) be a predicate whose truth set is all x for which x & t ≠ 0.
If t is a power of two, then such a predicate will be called basic.
The basic predicate describes (fixes) a single unit in the binary notation.
Further, for brevity, the predicate Et (x) will be denoted by E(t);
we will also denote the truth set of this predicate.

(quoting ends)





Length of Biwise2 code



  
 Length of "Calculus of basic predicates" code

 (( E(A)*¬E(12) => (¬E(A)*E(21)) + ¬E(21)*¬E(12) ≡ 1
¬E(A) + E(12) + ¬E(A)*E(21) + ¬E(21)*¬E(12) ≡ 1
¬E(A) + E(12) + ¬E(21)*¬E(12) ≡ 1
¬E(A) + E(12) + ¬E(21) ≡ 1

Thus  А(max) =12

 

Length of Biwise2 code
            for ( x & 125 != 1) + ((x & 34 = 2) => (x & A = 0)) ≡ 1

 

 Length of "Calculus of basic predicates" code
 for    ( x & 125 != 1) + ((x & 34 = 2) => (x & A = 0))

E(124) + ¬E(1) + E(32) + ¬E(2) + ¬E(A) ≡ 1
(E(A)=>E(124)) +  ..  ≡ 1

So A(max) = 124

E(124) = E(64) + E(32) + E(16) + E(8) + E(4)
E(64) + E(32) + E(16) + E(8) + E(4) +
      + ¬E(1) + E(32) + ¬E(2) + ¬E(A)
≡ 1

(E(A)=>E(4)) +  ..  ≡ 1

So A(min) = 4

Equations above may be easily converted into disjunctions of implications due to Theorem 1

   For truth ∀ x: E(k)(x) => E(m)(x), e.g. E(k) => E(m) ≡ 1 it is necessary  and sufficient that the set of unit bits "k" is fully included in the set of unit bits "m"


============
Problem 225
============
((x&A != 0) => (x&39 = 7)) v (x&30 != 6) ≡ 1
¬E(A) v ¬E(32)*E(4)*E(2)*E(1) v E(24) v ¬E(4) v ¬E(2) ≡ 1
¬E(A) v ¬E(32)*E(4)*E(2)*E(1) v E(16) v E(8)  v ¬E(4) v ¬E(2) ≡ 1

Thus A(min) = 8; A(max) = 24
============
Problem 227
============
((x&A !=0) => (x&55 = 33)) v (x&112 != 16) ≡ 1
¬E(A) v ¬E(22)*E(32)*E(1) v E(96) v ¬E(16) ≡ 1
¬E(A) v ¬E(22)*E(32)*E(1) v E(64) v E(32) v ¬E(16) ≡ 1

Thus A(min) = 32; A(max) =96
============
Problem 229
============
(x&A = 0) v ((x&69 = 4) => (x&118 = 6)) ≡ 1
¬E(A) v (¬E(65)*E(4) => ¬E(112)*E(4)*E(2)) ≡ 1
¬E(A) v E(65) v ¬E(4) v ¬E(112)*E(4)*E(2) ≡ 1
¬E(A) v E(64) v E(1) v ¬E(112)*E(4)*E(2) ≡ 1

Thus A(min) = 1; A(max) = 65
 

  


    E(49) => (¬E(33) => E(A)) = 1
  ¬E(49) + (E(33) + E(A)) = 1
  ¬E(32)*¬E(16)*¬E(1) + E(32) + E(1) + E(A) = 1
  ¬E(16) + E(A) = 1
    E(16)=> E(A) = 1

Thus A(min) =16

No comments:

Post a Comment