Friday, May 17, 2019

Решение одной системы с Форума ЕГЭ Информатика (16.05.2019) Методом Отображений

Пост ниже адресует вопрос  cabanov.alexey
 http://egekp.unoforum.pro/?1-6-0-00000115-000-0-0-1558030361

Система
((x1=x2)=x3)->(x4+x5+x6)=1
((x4=x5)=x6)->(x7+x8+x9)=1
((x7=x8)=x9)->(x1+x2+x3)=1


Решаем (1)
******************************

((x1=x2)=x3)->(x4+x5+x6)=1
((x4=x5)=x6)->(x7+x8+x9)=1

******************************
Старт все восемь 1 единиц
Правая тройка (8 строк) содержит 1 ноль  (000) остальные единичные
x4+x5+x6=1.  В ноль строку 4 слива то есть в ней 4 
в остальные 7 по 8 сливов, то есть в остальных по 8. 
Второй шаг правая тройка в ноль (000) строку  происходит 
4 слива и среди них один 000 ((x4=x5)=x6)=0) - 4, а оставшиеся три слива в ту же (000) строку по 8 . Всего 4+8*3=28 в (000)
В остальные 7 строк (2^3 - 1) по 4+7*8 =60.
Всего 28+ 7*60 = 448 решений у системы (1)
*********************************************************************
Находим число решений (1) дающих ((x7=x8)=x9)->(x1+x2+x3)=0
*********************************************************************
Старт для 000 зрачение 1 остальные семь битовых комбинаций старт 0. Правая тройка первого блока (8 строк) содержит одну строку х4+х5+х6 =0 ( это 000), а остальные строки единичные имеют сумму бит 1. В ноль строку четыре слива среди них из 000 даст 1, а в остальные семь строк общий слив  1 из всех строк левого столбца (в нем одна 1(000) и семь 0 для каждой из 3-ех битовых комбинаций отличных от 000) , так как  х4+х5+х6 =1. 

Второй шаг правая тройка содержит 4 трех битовых строки,
которые нас интересуют и в каждую сольется по 8 всего 8*4 = 32


Это строки
 001 - 8
111 - 8
100 - 8
010 - 8


Ответ 448 - 32 = 416


Wednesday, May 15, 2019

Solution problem 23 of the Early Examination in Informatics 2018 via the mapping method (08.2016)

One more <<proof>> of Helen Mironchick's axiom - there is no such system of equations in Boolean variables that could not be solved via the mapping method


   Actually we have the system

    (x1⊕x2)^(x1=>y1) =1
    (x2⊕x3)^(x2=>y2) =1
    (x3⊕x4)^(x3=>y3) =1
     . . . . . . . . . . . . . .
    (x6⊕x7)^(x6=>y6) =1 
    x7=>y7 =1 

     Solution via technique 08/2016 (Helen Mironchick)


   References
   1.  http://kpolyakov.spb.ru/download/mea-2016-8.pdf

Monday, May 13, 2019

Algebra of Predicates versus K.Yu. Polyakov, Sets and Logic in the Unified State Examination Problems // Informatics , № 10, 2015

Consider three complicated cases for every clone of classical problem #18 of USE in Informatics ( Russian abbreviation  EGE )
1. Solution of challenging equation with mixed basic predicates of type E() && DEL()  via technique proposed by Helen Mironchick
2. Solution of the equation E(M)⊕E(N) => E(A)*¬E(M & N) ≡ 1 via the calculus of basic predicates according to Helen Mironchick
3. Predicate algebra and classical examples of the Unified State Examination  in Informatics problem #18 
Segments of the real axis and discrete sets of integers 

I am very sorry that the article of K.Yu. Polyakov mentioned in the title does not withstand any criticism from the point of view of formal logic, as well as the first-order algebra of logic

*********
Case 1
*********
Solution of challenging equation with mixed basic predicates of type E() && DEL()  via technique proposed by Helen Mironchick 


Denote by DEL (n, m) the statement "a natural number n is divided without a remainder by a positive integer m". For what is the smallest natural number A, the formula
    (D(34)⊕D(51) => ¬D(A)^D(272)) v Е(15) ≡ 1  
is identically true (that is, it takes the value 1 for any natural value of the variable x)?

The absorption of predicates of type ¬D() from one basis in a disjunction and the suppression of predicates of type D() from one basis in a conjunction makes the calculus constructed  by Helen Mironchik a universal approach that converts problem 18's DEL() of any complexity into a simple equation in DEL() predicates.

Further notice belongs to Helen :-

D(16) = ¬E(1)*¬E(2)*¬E(4)*¬E(8) = 
   =  ¬(E(1) v E(2) v E(4) v E(8)) = ¬E(15)
E(15)=¬D(16)

Convert original equation from implication to disjunction

(D(34)≡D(51)) v ¬D(A)^D(272)) v ¬D(16) ≡ 1
D(34)^D(51) v ¬D(34)^¬D(51) v ¬D(A)^D(272)) v ¬D(16) ≡ 1

D(34)^D(51) v ¬D(34)^¬D(51) v ¬D(A)^D(17)^D(16) v ¬D(16) ≡ 1

Suppress D(17) in first and fourth terms via ¬D(17),
then suppress D(2^4) via ¬D(2^4) in fourth term


D(34) = D(2)^D(17)
D(51) = D(3)^D(17)
D(31)^D(51) = D(2)^D(3)^D(17)

¬D(34) = (¬D(2) v ¬D(17))
¬D(51) = (¬D(3) v ¬D(17))

¬D(34)^¬D(51) = ¬D(2)^¬D(3) v ¬D(17)

D(2)^D(3)^D(17) v ¬D(2)^¬D(3) v ¬D(17) v 

  v  ¬D(A)^D(17)^D(2^4) v ¬D(2^4) ≡ 1

D(6) v ¬D(2)^¬D(3) v ¬D(17) v ¬D(A) v ¬D(2^4) ≡ 1

Thus A(min) = 6


*********
Case 2 
*********
Solution of the equation E(M)⊕E(N) => E(A)*¬E(M & N) ≡ 1 via the calculus of basic predicates  according  to Helen Mironchick


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)

Once again  the core idea is the decomposition of E() type predicates into logical sum of basic predicates , which are actually  predicates associated with powers of 2. The decomposition itself  works as universal approach for solving the problems #18 of per bits conjunction type having any level of complexity. Here is important to understand the principal difference between Bitwise2 technique and technique relying on decomposition into basic predicates. The last one
provide quite straight forward way to suppress the factors of  ¬E(2^s) type in conjuction via terms of E(2^s)  type coming into equation to be logically added to conjunction kind of  ¬E(2^5)*¬E(2^4)*¬E(2^3)*¬E(2^1)  + E(2^5) +  E(2^3) + E(2^1) = ¬E(2^4) + E(2^5) + E(2^3) + E(2^1)


Denote by {X} the binary representation of a natural number X.
The core statement of the post below  is :-

Let R, M, N be natural numbers. R is the minimum

satisfying the condition {M OR N} = {R OR {M & N}},
where "OR" is a bitwise disjunction, and "&" is a bitwise conjunction
Then the smallest A satisfying the equation
E(M)⊕E(N)=>E(A)*¬E (M & N) ≡ 1 would be equal R.

First we intend to show that, E(M) v E(N) = E(R) v E(M&N).
Notice also that everywhere below  "*" is "^".

Consider expansions in the logical sum of  basic predicates.
E (M) and E(N). All pairs of equal basic predicates will be
collapsed into one and the logical sum of such predicate pairs
will obviously give E(M&N). The logical sum of all those
remaining is exactly E(R). It remains to apply the formulas
of De Morgan.

               ¬(E(M) v E(N)) = ¬(E(R) v E(M & N))

and get the required equality below

               ¬E(M)*¬E(N) = ¬E(R)*¬E(M&N)  (1)

Bitwise2 has a familiar formula. Due to the fact that ¬E(N) = Z(N)
        Z(M)*Z(N) = Z(M OR N) = Z(R)*Z(M & N)
Thus, ¬E(M)*¬E(N) = ¬E(R)*¬E (M & N) can be obtained
as a result of Statement 3 of http://kpolyakov.spb.ru/download/bitwise2.pdf

   Convert the original equation as follows

   E(M)⊕E(N) => E(A)*¬E(M&N) ≡ 1
   (E(M)≡E(N)) v E(A)*¬E(M&N) ≡ 1
 ¬E(M)*¬E(N) v E(M)*E(N) v E(A)*¬E(M&N) ≡ 1

    From the decomposition of M and N into basic predicates
    define the numbers REST-M and REST-N such that
    each of them has no common unit bits with M&N and in doing so
    obtain

     {REST-M} + {M & N} = {M}
     {REST-N} + {M & N} = {N}

     Consequently

     E(M) = E(REST-M) v E(M&N)
     E(N) = E(REST-N) v E(M&N)

Apply formula (1) to ¬E(M)*¬E(N):-

¬E(R)*¬E(M&N) v (E(REST-M) v E(M & N))*(E(REST-N) v E(M&N)) v
   v E(A)*¬E(M&N) ≡ 1
¬E(R)*¬E(M&N) v E(REST-M)*E(REST-N) v E (M&N) v
   v E(A)*¬E(M&N) ≡ 1
¬E(R) v E(REST-M)*E(REST-N) v E(M&N) v E(A)≡ 1

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

Necessity
Let j(1), .., j(s) be the numbers of the single unit bits "k",
ordered descending (for example), then
¬E(k)= ¬E(j(1)) * .... *¬E(j(s)) we show that
        ¬E(k) + E(m) = 1
We have
¬E(k) = ¬E(j(1))* .... *¬E(j(s))
E(m) = E(j(1)) + ... + E(j(s)) + E (rest)

We consistently suppress all factors in conjunction.
¬E(k) + E (m) = ¬E(j(1))* ....*¬E(j(s)) + E(j(1)) + ... + E(j(s)) + E(rest) = 1

Sufficiency
If there is at least one single unit bit "k" (with the number "p") not included
in the single unit bits "m", then k&2^p! = 0 and at the same time the numbers
of the single unit bits "m" do not contain "p", then 2^p with a unit at the place "p" in the binary representation 1000 ... 0 (counting from 0 from right to left)
will be multiplied by 0 in the p-th position "m", that is, m&2^p = 0
In this case, k&2^p != 0, that is, E(k,2^p) = 1 if
m&2^p = 0 then E(m,2^p) = 0
In this case, Е(к,2^p) => Е(m,2^p) = 0, that is,
the condition of the theorem is not satisfied for all "x"

We are all set with Theorem 1

Starting from this point we intend to invoke Theorem 1 where it 
appears to be needed without any previous notification 

Say $(X) is the set of unit bits in X.
Convert the last equation as follows

(E(R)=> E(REST-M))*(E(R)=> E(REST-N)) 

       v (E(R)=> E(M&N)) v (E(R)=> E(A)) ≡ 1 

Assign A(min) value equal R and consider any A < A(min) then

 ∃ j: ( j !∈ $(A))^(j ∈ $(R)) = True


From here and below our major goal is to prove  that for any
A < A(min)  it exists integer y=y(A) which will result

(E(R)=> E(REST-M))*(E(R)=> E(REST-N)) 
       v (E(R)=> E(M&N)) v (E(R)=> E(A)) (y(A)) =0

Set unit bit on place number  "j"  in y=y(A)
Due to j ∈ $(R) this j !∈ $(M&N). The rest of y's bits
let us set to 0


Notice that this "j" also doesn't belong to at least one of sets
$(REST-M) or $(REST-N), otherwise it would belong
$(M&N). So conjuction below is equal 0. 


    (E(R,y)=> E(REST-M,y))*(E(R,y)=> E(REST-N,y)) = 0  (1)


Then notice that (E(R,y)=> E(M&N,y)) = 0 (2)
and (E(R,y)=> E(A,y) = 0 (3)


Finally we are getting (due to (1),(2) and (3))

(E(R)=> E(REST-M))*(E(R)=> E(REST-N)) v
  v (E(R)=> E(M&N)) v (E(R)=> E(A))(y) = 0


Thus for any A less then R it exists y=y(A) such
that predicate been written above has value 0
for number y=y(A) and A(min) appears to be real
minimum A(min)


*********
Case 3
*********
Predicate algebra and classical examples of the Unified State Examination problem Informatics № 18 ( Segments of the real axis and discrete sets of integers )

See
1)  Алгебра предикатов и классические примеры задач ЕГЭ Информатика № 18
2)   See Алгебра предикатов и классические задачи ЕГЭ Информатика № 18 с XOR и "~"



Refences 
1. Е. A. Mironchik, ALGEBRA OF PREDICATES AND RELATED GEOMETRIC MODELS CREATION IN REGARDS OF UNIFIED STATE EXAMINATION IN INFORMATICS (RUSSIAN EGE) ,
Informatics at school №3 , 2019
2. http://kpolyakov.spb.ru/download/mea18bit.pdf

Monday, May 6, 2019

Solution of problem 132 via algebra of predicates been built by Helen A. Mironchick (Informatics at school №3 2019)


 Compare with the decision number 132 in the article 
     http://kpolyakov.spb.ru/download/ege18del.pdf
 and feel the difference.

Solving the same problem with clear understanding of the predicate's
definition
  D(a,x) = { 1: x mod a =0 ;
                  0: x mod a !=0 }
Down here you won't find any "dancing with wolfs" , just moving 
straight ahead driven by commonly known rules of Boolean Algebra

Just click on snapshot to convert text below into perfect view



Thursday, May 2, 2019

Алгебра предикатов для задач 18 с ДЕЛ() ЕГЭ Информатика versus Информатик БУ Видео Ролики

 Прослушаем и посмотрим сначала
 https://www.youtube.com/watch?time_continue=17&v=tLjdVS9UfR4


   Решение той же задачи при ясном понимании определеия предиката

    D(a,x) ={ 1 : x mod a = 0; 
                  0 : x mod a !=0 }

Решение

Я опускаю квантор всеобщности и зависимости D(k,x)
предикатов от х используя знак тождества "≡"
 
  D(18) => (¬D(A) => ¬D(12)) ≡ 1
¬D(18) + D(A) + ¬D(12) ≡ 1
¬(D(2)*D(3^2)) + D(A) + ¬(D(2^2)*D(3)) ≡ 1
¬D(2) + ¬D(3^2) + D(A) + ¬D(2^2) + ¬D(3) ≡ 1


Заметим, что ¬D(2^2) очевидно поглощает ¬D(2),
 a   ¬D(3^2) очевидно поглощает ¬D(3).


Поглощение предикатов типа  ¬D( ) из одного базиса
в дизъюнкции и подавление предикатов типа D( ) из 
одного базиса в конъюнции ( смотри, например ,
https://mapping-metod.blogspot.com/2019/04/shooting-domogarovs-problem-with-d5940.html  )
делает исчисление, построенное Еленой А. Мирончик универсальным подходом, конвертирующим задачу на ДЕЛ()
любой сложности в простое уравнение в ДЕЛ() предикатах
( смотри, например, https://mapping-metod.blogspot.com/2019/04/basic-predicates-technique-developed-by.html  )


Получаем
¬D(3^2) + D(A) + ¬D(2^2) ≡ 1
¬(D(9)*D(4)) + D(A)  ≡ 1
¬D(36) + D(A) ≡ 1
D(36) => D(A) ≡ 1
Таким Образом
А(min) = 36

Wednesday, May 1, 2019

Mixing predicates of the type DEL() and E() in the Unified State Exam's Informatics problem №18 based on the most recent work of Helen Mironchick



The tasks formulated below use the identity linking the predicates 
D(k,x) and E(k,x) as follows: - 

D(2^k) + E(2^k - 1) ≡ 1

No. 142 (Clone) Let us denote by DEL (n, m) the statement “a natural number n divisible by a natural number m”. For what is the smallest natural number And the formula
(DEL (A, x)^¬E (15,x)) => (E (15, x) v DEL(24, x))
is identically true (that is, it takes the value 1 for any natural value of the variable x)?

No. 144 (Clone) Let us denote by DEL (n, m) the statement “a natural number n divisible by a natural number m”. For what is the smallest natural number And the formula
(DEL(A, x)^DEL(24, x)^E (15, x)) => ¬DEL(A, x)
is identically true (that is, it takes the value 1 for any natural value of the variable x)?



******************
Solve one new
******************
Denote by DEL (n, m) the statement "a natural number n is divided without a remainder by a positive integer m". For what is the smallest natural number And the formula   

(¬E(15, x)^¬D(56, x)) => (¬D(A, x) v E(15, x)) ≡ 1
is identically true (that is, it takes the value 1 for any natural value of the variable x)?


Solution
(¬E (15)^¬D (56)) => (¬D (A) v E (15)) ≡ 1
Since D (16) = ¬E (15) we get
(D (16)^¬D (56)) => (¬D (A) v ¬D (16) 1
¬D (2^4) v D (2^3)^D (7) + ¬D (A) 1
(D (2^4) => D (2^3) ^ (¬D (2^4) v D (7)) + ¬D (A) 1
¬D (2^4) v D (7) + ¬D (A) ≡ 1
Thus  A (min) = 7


Consider a new clone of an original sample proposed by the development lead just this afternoon.  

Find the smallest A providing the identical truth of   

¬E(64) v D (64) ^ ¬D (128) v E (A) ≡ 1

Notice that
¬D(128)=E(127)=E(64) v E(63)
and proceed as follows

¬E(64) v ¬E(63)^(E(64) v E(63)) v E(A) ≡ 1
¬E(64) v ¬E(63)^E(64) v E(A) ≡ 1
Suppress Е(64) in conjunction above

¬E(64) v ¬E(63) v E(A) ≡ 1
Thus А(min) = 63 

One more sample 

 Find the largest A providing the identical
 the truth of  E(1023) v D(1024)^
¬E(A) ≡ 1
    (E(1023) v D(1024))^(E(1023) v ¬E(A)) ≡ 1
   E(1023) v ¬E(A) ≡ 1
Thus A(max) =1023

Mixing predicates of the type DEL() and E() in the Unified State Exam's Informatics problem №18 based on the most recent work of Helen Mironchick (Informatics at school №3 2019)

  Задачи сформулированные далее используют тождество связывающее предикаты D(k,x) и E(k,x) следующим образом  : -   D(2^k) + E(2^k - 1) ≡ 1


№ 142 (Clone) Обозначим через ДЕЛ(n, m) утверждение «натуральное число n делится без остатка на натуральное число m». Для какого наименьшего натурального числа А формула

(ДЕЛ(А,x) ^ ¬E(15, x)) =>  (E(15,x) v ДЕЛ(24,x))
тождественно истинна (то есть принимает значение 1 при любом натуральном значении переменной х)?

№ 144(Clone) Обозначим через ДЕЛ(n, m) утверждение «натуральное число n делится без остатка на натуральное число m». Для какого наименьшего натурального числа А формула

(ДЕЛ(A,x) ^ ДЕЛ(24,x) ^ E(15,x)) =>  ¬ДЕЛ(A,x)
тождественно истинна (то есть принимает значение 1 при любом натуральном значении переменной х)?
*******************************
Решим одну новую
*******************************
Обозначим через ДЕЛ(n, m) утверждение «натуральное число n делится без остатка на натуральное число m». Для какого наименьшего натурального числа А формула
                (¬E(15,x) ^ ¬D(56,x)) => (¬D(A,x) v E(15,x)) ≡ 1
тождественно истинна (то есть принимает значение 1 при любом натуральном значении переменной х)?

Решение


(¬E(15) ^ ¬D(56)) => (¬D(A) v E(15)) ≡ 1

Поскольку D(16) = ¬E(15) получаем

(D(16) ^ ¬D(56)) => (¬D(A) v ¬D(16) ≡ 1

¬D(2^4) v D(2^3)^D(7) + ¬D(A) ≡ 1

(D(2^4) => D(2^3)^( ¬D(2^4) v D(7)) + ¬D(A) ≡ 1

¬D(2^4) v D(7) + ¬D(A) ≡ 1

Откуда A(min) = 7

Consider a new clone of an original
sample proposed by the development lead
just this afternoon 
Find the smallest A providing the identical
the truth of ¬E(64) v D (64) ^ ¬D (128) v E (A) ≡ 1

Notice that
¬D(128)=E(127)=E(64) v E(63)
and proceed as follows

¬E(64) v ¬E(63)^(E(64) v E(63)) v E(A) ≡ 1
¬E(64) v ¬E(63)^E(64) v E(A) ≡ 1
Suppress Е(64) in conjunction above

¬E(64) v ¬E(63) v E(A) ≡ 1
Thus А(min) = 63 

One more sample 

 Find the largest A providing the identical
 the truth of 
E(1023) v D(1024)^
¬E(A) ≡ 1

(E(1023) v D(1024))^(E(1023) v ¬E(A)) ≡ 1
E(1023) v ¬E(A) ≡ 1

Thus A(max) =1023