Tuesday, December 11, 2018

Technique of calculating basic predicates according to Е.А. Mironchick vs Bitwise2

Bellow we follow basic technique developed in 
http://kpolyakov.spb.ru/download/mea18bit.pdf

 *************************************************************
 Find the smallest A so that for all positive integers "x"
   (x&24 != 0)⊕(x&9 != 0) => (x&A != 0)*(x&8 =0)

 Sign of ⊕ means XOR
 *************************************************************
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)

Keeping in mind
  ¬A + A*B = (¬A + A)*(¬A + B) = ¬A + B
     A + A*B = A

Proceed as follows
  (E(24)*¬E(9) + ¬E(24)*E(9)) => E(A)*¬E(8) = 1
  ¬(E(24)*¬E(9) + ¬E(24)*E(9)) + E(A)*¬E(8) = 1
 (¬E(24) + E(9))*(E(24) + ¬E(9)) + E(A)*¬E(8) = 1
 ¬E(9)*¬E(24) + E(9)*E(24) + E(A)*¬E(8) = 1


Suppress the double occurrence of ¬E (8) in the first term

¬E(16)*¬E(8)*¬E(1) + E(9)*E(24) + E(A)*¬E(8) = 1
E(9)*E(24)= (E(8) + E(1))*(E(16) + E(8)) = 

    = E(8) + E(8)*E(16) + E(1)*E(16) + E(1)*E(8)

Apply the principle of absorption
 
¬E(16)*¬E(8)*¬E(1) + (E(8) + E(1)*E(16)) +  E(A)*¬E(8) = 1
  ((¬E(16)*¬E(1) + E(A))*¬E(8) + E(8) + E(1)*E(16) = 1
  (¬E(17) + E(A)) + E(8) + E(1)*E(16) = 1


Thus  A(min)=17


************************
Bitwise2 Solution
************************
¬Z(24)⊕¬Z(9) => ¬A*Z(8) = 1
¬Z(24)¬Z(9) + Z(24)*Z(9) + ¬A*Z(8) = 1
¬(Z(24) + Z(9)) + Z(25) + ¬A*Z(8) = 1
¬Z(24&9) + Z(17)*Z(8) + ¬A*Z(8) = 1


Notice that

24 = 11000
&  - per bit conjunction
  9 = 01001
===========
8 = 01000

Z(24)*Z(9) = Z(25) = Z(17)*Z(8)

17= 10001
"v" - per bit disjunction
08= 01000
=============
25 = 11001

Now continue

¬Z(8) + Z(17)*Z(8) + ¬A*Z(8) = 1
¬Z(8) + Z(17) + ¬A = 1
(A=> Z(17)) + (A=> ¬Z(8)) = 1

Thus A(min) = 17


Another sample

***********************************************
Technique of calculation predicates
per Helen Mironchick
***********************************************
 
E(56)⊕E(25) => E(A)*¬E(24) = 1
¬E(56)*¬E(25) + E(56)*E(25) + E(A)*¬E(24) = 1

¬E(32)*¬E(16)*¬E(8)*¬E(1) +
  + (E(32) + E(16) + E(8))*(E(16) + E(8) + E(1)) + E(A)*¬E(24) = 1

¬E(32)*¬E(16)*¬E(8)*¬E(1) + E(32)*
(E(16) + E(8) + E(1)) + E(16) + E(8) +
  + E(A)*¬E(16)*¬E(8) = 1

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

Thus A(min) = 33

**************************
Bitwise2 Solution
**************************
 

¬Z(56)⊕¬Z(25) => ¬A*Z(24) = 1
¬Z(56)¬Z(25) + Z(56)*Z(25) + ¬A*Z(24) = 1
¬(Z(56) + Z(25)) + Z(57) + ¬A*Z(24) = 1
¬Z(56&25) + Z(33)*Z(24)  + ¬A*Z(24) = 1


56 = 111000
& - per bit conjunction
25 = 011001
===========
24 = 011000

33 = 100001
v - per bit disjunction
24 = 011000
============
57 = 111001

56 = 111000
v - per bit disjunction
25 = 011001
===========
57 = 111000

So, we get:-


 Z(56)*Z(25) = Z(57) = Z(33)*Z(24)

Proceed as folows :


¬Z(24) + Z(33)*Z(24)  + ¬A*Z(24) = 1
¬Z(24) + Z(33)  + ¬A = 1
(A => Z(33)) + (A => ¬Z(24)) = 1
(A => Z(33)) + (A => ¬Z(24)) = 1


Thus A(min) = 33
 



Monday, November 26, 2018

Proof of core sample of E.A. Mironchik's "Solving problems EGE-18 with per bit operations " (2017) via Bitwise2

First what we would have to use comes from Polyakov's ege18.doc


Sample as is 
See Решение задания ЕГЭ - 18 с битовыми операциями


(x&26 ¬=10 ) = ¬Z(16) + Z(8) + Z(2)
(x&27 = 11 )   =   Z(16)*¬Z(8)*¬Z(2)*¬Z(1)

26 = 11010 
10 = 01010
27 = 11011
11 = 01011

Due to
  ¬A + A*B = (¬A + A)*(¬A + B) = ¬A + B
    A + ¬A*B = (A + ¬A)*(A + B) = A + B   
After applying conversions mentioned above
We are going to obtain via Polyakov's formulas  :-

¬Z(16) + Z(8) + Z(2) +  Z(16)*¬Z(8)*¬Z(2)*¬Z(1) + A = 1
¬Z(16) + Z(8) +  Z(2) + ¬Z(1) + A = 1
¬(Z(16)*Z(1)) + Z(8) + Z(2) + A = 1
Z(16 OR 1) => Z(8) + Z(2) + A = 1
(Z(17)=> A) + (Z(17)=>Z(8)) + (Z(17)=>Z(2)) = 1
Z(17) => A = 1

Thus A(max) = 17

So issue when "b1-c1=b2-c2" might be resolved via Bitwise2 technique and Problem 5 gets resolved without any new development efforts.
Also notice that in general (b-c) doesn't have to be a basic predicate. Sample bellow has (b-c) = 96. But the multitude of "c" bits "1"  must be included in the multitude of "b" bits "1"

********************
Another samples
********************
Here we sequentially apply

¬A + A*B = (¬A + A)*(¬A + B) = ¬A + B
     A + ¬A*B = (A + ¬A)*(A + B) = A + B 

***************************************************
(x&248 ¬= 152) v (x&252 = 156) v (x&A = 0) = 1
***************************************************

252 = 11111100
156 = 10011100
248 = 11111000
152 = 10011000

(x&248 ¬= 152) = ¬Z(96) + Z(128) + Z(16) + Z(8)
(x&252 =  156) =  Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(4)

¬Z(96) + Z(128) + Z(16) + Z(8) + 

               Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(4) + A = 1
¬Z(96) + Z(128) + Z(16) + Z(8) + ¬Z(4) + A =  1
¬(Z(96)*Z(4))   + Z(128) + Z(16) + Z(8) + A = 1
Z(100) => Z(128) + Z(16) + Z(8) + A = 1
(Z(100)=>Z(128)) + (Z(100)=>Z(16)) + (Z(100)=>Z(8)) + 

              (Z(100)=>A) = 1
Z(100) => A = 1

Thus A(max) = 100


****************************************************************
(x&248 ¬= 152)v(x&252 = 156)v(x&250 = 154)v(x&A = 0) = 1
****************************************************************
252 = 11111100
156 = 10011100
248 = 11111000
152 = 10011000
250 = 11111010
154 = 10011010

(x&248 ¬= 152) = ¬Z(96) + Z(128) + Z(16) + Z(8)
(x&252 =  156) =  Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(4)
(x&250 =  154) =  Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(2)

¬Z(96) + Z(128) + Z(16) + Z(8) + Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(4)
       + Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(2) + A = 1


Converting Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(4) and get
¬Z(96) + Z(128) + Z(16) + Z(8) entries like before run (1)
¬Z(96) + Z(128) + Z(16) + Z(8) + ¬Z(4)
       + Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(2)  + A =  1


Converting Z(96)*¬Z(128)*¬Z(16)*¬Z(8)*¬Z(2) and get
¬Z(96) + Z(128) + Z(16) + Z(8) entries like before run (2)
¬Z(96) + Z(128) + Z(16) + Z(8) + ¬Z(4) + ¬Z(2)  + A =  1


Now we are ready to apply De Morgan rules :-
     ¬(Z(96)*Z(4)*Z(2)) + Z(128) + Z(16) + Z(8) + A = 1

Finally getting done
Z(102) => Z(128) + Z(16) + Z(8) + A = 1
(Z(102)=>Z(128)) + (Z(102)=>Z(16)) + (Z(102)=>Z(8)) + (Z(102)=>A) = 1
Z(102) => A = 1

Thus A(max) = 102
 

*****************************************************
(x&252 ¬= 188) v (x&248 = 184) v (x&A = 0) = 1
*****************************************************

252 = 11111100
188 = 10111100
248 = 11111000
184 = 10111000
 

Here we sequentially apply

¬A + A*B = (¬A + A)*(¬A + B) = ¬A + B
     A + ¬A*B = (A + ¬A)*(A + B) = A + B

(x&252 ¬= 184) = ¬Z(64) + Z(128) + Z(32) + Z(16) + Z(8)
(x&248 = 188)  = Z(64)*¬Z(128)*¬Z(32)*¬Z(16)*¬Z(8)*¬Z(4)

¬Z(64) + Z(128) + Z(32) + Z(16) + Z(8) + 

            Z(64)*¬Z(128)*¬Z(32)*¬Z(16)*¬Z(8)*¬Z(4) + A = 1
¬Z(64) + Z(128) + Z(32) + Z(16) + Z(8) + ¬Z(4) + A = 1
¬(Z(64)*Z(4))  + Z(128) + Z(32) + Z(16) + Z(8) + A = 1
Z(68) => + Z(128) + Z(32) + Z(16) + Z(8) + A = 1
(Z(68)=>Z(128)) + (Z(68)=>Z(32)) + (Z(68)=>Z(16)) + 

           (Z(68)=>Z(8)) + (Z(68)=>A) = 1
Z(68) => A = 1

Thus A(max) = 68



Friday, November 9, 2018

Решение задачи 23 из новостной ленты ВК от 10.03.2018 техникой, предложенной в статье "Графы и системы логических уравнений" Е. А. Мирончик 08/10/2016


   Делаем подстановку  :-

     x1 ~ x3 = z1; 

     x2 ~ x4 = z2; 
     x5 ~ x7 = z3; 
     x6 ~ x8 = z4; 
     x9 ~ x10 = z5

  Конвертируем систему:-


    (z1 v z2)^(z1 => z2) = 0
    (z2 v z3)^(z2 => z3) = 0 
    (z3 v z4)^(z3 => z4) = 0
    (z4 v z5)^(z4 => z5) = 0
    (z1 => z2) => (z5 => z4) =1

    Строим граф для первых четырех уравнений



   (z1 => z2) =>(z5=> z4) = ( ¬z1 v z2) => (¬z5 v z4) =
   ¬(¬z1 v z2) v ( ¬z5 v z4) = z1^(¬z2)  v ¬z5 v z4  = 1


   Контроль на сервере Полякова
   

 Получаем  2^5 + 2^5 = 2^6 = 64 ( решений для {x})

Стандартная диаграмма , построенная для первых 4-ех уравнений
Пары перехода x2x4; x5x7; x6x8

  ((x1~x3)v(x2~x4))^((x1~x3)=>(x2~x4)) = 0
  ((x2~x4)v(x5~x7))^((x2~x4)=>(x5~x7)) = 0
  ((x5~x7)v(x6~x8))^((x5~x7)=>(x6~x8)) = 0
  ((x6~x8)v(x9~x10))^((x6~x8)=>(x9~x10)) = 0
  ((x1~x3)=>(x2~x4))=>((x9~x10)=>(x6~x8)) = 1



   В действительности,
         ((x1~x3)=>(x2~x4))=>((x9~x10)=>(x6~x8)) = 1 
   добавляет  ( 0 => 0) => (0 =>0)  =1 для линий  "01" and "10"
   т.е. True => True = 1 .  Пятое уравнение не уменьшает количества 

  решений. Ответ тот же  64

  Контроль на сервере Полякова 
 


Wednesday, November 7, 2018

Solution of one old problem type 23 from VK's News Wire via mapping method




   Attempt to work via mapping method
 
    ((x1~x3)v(x2~x4))^(¬((x1~x3)^¬(x2~x4))) = 0
    ((x2~x4)v(x5~x7))^(¬((x2~x4)^¬(x5~x7))) = 0
    ((x5~x7)v(x6~x8))^(¬((x5~x7)^¬(x6~x8))) = 0
    ((x6~x8)v(x9~x10))^(¬((x6~x8)^¬(x9~x10))) = 0
    ((x1~x3)=>(x2~x4))=>((x6~x8)v¬(x9~x10)) = 1

   ((x1~x3)v(x2~x4))^((¬(x1~x3)v(x2~x4))) = 0
   ((x2~x4)v(x5~x7))^((¬(x2~x4)v(x5~x7))) = 0
   ((x5~x7)v(x6~x8))^((¬(x5~x7)v(x6~x8))) = 0
   ((x6~x8)v(x9~x10))^((¬(x6~x8)v(x9~x10))) = 0
   ((x1~x3)=>(x2~x4))=>((x6~x8)v¬(x9~x10)) = 1

  ((x1~x3)v(x2~x4))^((x1~x3)=>(x2~x4)) = 0
  ((x2~x4)v(x5~x7))^((x2~x4)=>(x5~x7)) = 0
  ((x5~x7)v(x6~x8))^((x5~x7)=>(x6~x8)) = 0
  ((x6~x8)v(x9~x10))^((x6~x8)=>(x9~x10)) = 0
  ((x1~x3)=>(x2~x4))=>((x9~x10)=>(x6~x8)) = 1

   Build diagrama based on first equation which would work
   for first four equations. Notice that transition pairs are x2x4 , x5x7 , x6x8
   In fact adding 
         ((x1~x3)=>(x2~x4))=>((x9~x10)=>(x6~x8)) = 1 
   would add  ( 0 => 0) => (0 =>0)  =1 on lines "01" and "10"
   e.g. True => True = 1 . So adding  this 5-th equation won't decrease number    of solutions of orinal sytem
  

   Passing Polyakov's control
  

  

Friday, November 2, 2018

Решение системы Р-21 из файла ege23.doc методом отображений

   

Преобразуем исходную систему и построим диаграмму матрицы истинности
 
 
Два способа решения системы без построения таблицы истинности
{x1x2; x5x6} и изменения матрицы истинности {x1x2; x3x4} (смотри Р-21 решение  А.Н.Носкина )
Решааем систему
¬X1 + X2 + X3*¬X4 = 1
¬X3 + X4 + X5*¬X6 = 1 




Friday, October 12, 2018

Проблемы при разборе №18 в Новостной ленте ВК Informatics 100 от 06/10/18

 
> Quote
Проще говоря,если какое-то число  при поразрядном умножении ..
>end Quote
Проще говоря,если любое  число  при поразрядном умножении ...   Умомянутая выше дизъюнкция должна быть истинна при любом Х
 
Либо активируйте коннект к ВК , чтобы заработал линк

 https://vk.com/feed?section=comments&z=photo-40390768_456263081%2Fwall-40390768_160152

Рассмотрим контрпример :-

Х=40=101000 (binary)
101000 & 100011 != 0 (не равно)
101000 & 001111 ! =0 (не равно)
101000 & 000011  = 0 (равно)

Таким образом дизъюнкция (X&15=0)v(X&35=0)v(X&3 != 0) = False
ложна при A=3 и Х=40

Следую  http://kpolyakov.spb.ru/download/bitwise2.pdf


Утверждению 9 стр. 4

!Z(15) => (!Z(35) = > !A) = 1
Z(15)+Z(35) +!A = 1
A => (Z(15) + Z(35)) = 1
(A =>Z(15)) + (A=> Z(35)) = 1
A(min) = 15

Изменения, внесенные в Новостную ленту INFORMATICS_100 в 00:45 13.10.2018