2017年10月26日木曜日

Euclidean Algorithm

Euclidean Algorithm is the linear programing.

Prime numbers are integers. This is the contradiction, but you keep expanding (Λ).

[m|a Λ m|b]⇒[m|b-qa = rem(b,a) Λ m|a]


rem is the remainder.

You can also write this.

gcd(a,b)=gcd(rem(b,a),a)


gcd is the greatest common divisor.

The direction of a and b is crossing over ⇔.

gcd(105,224)=gcd(rem(224,105),105)=gcd(14,105)
=gcd(rem(105,14),14)=gcd(7,14)=gcd(rem(14,7),7)
=gcd(0,7)=7

gcd(135,59)=gcd(17,59)=gcd(rem(59,17),17)
=gcd(8,17)=gcd(rem(17,8),8)=gcd(1,8)
=gcd(rem(8,1),1)=gcd(0,1)=1


Then you find X and Y which is gcd.

135X+59Y=1


135=59*2+17
59=17*3+8
17=8*2+1

This is upside down.

1=17-8*2
8=59-17*3
17=135-59*2


1=17-(59-17*3)*2=17+17*6-59*2=17*7-59*2=(135-59*2)*7-59*2=135*7-59*14-59*2=135*7-59*16

You see X=7 and Y=-16

Therefore

135(X-7)+59(Y+16)=0


X-7=59m and Y+16=-135m

(X,Y)=(59m+7,-135m-16)









2017年10月23日月曜日

Strong Induction

We need medicine to protect from biological warfare.


This is Strong Induction, and P is prime numbers.


You need to destroy orange boxes which are n(n+1)/2. White boxes are n(n-1)/2.

[n(n+1)/2]+[n(n-1)/2]=n^2



You have 5 boxes, and you divide them. Finally they become one box. You get the score, 6+3+1=10. This is n(n-1)/2.

At first, you have n boxes. Then, you get points when you have n-1 boxes. The final points are (n−1)+(n−2)+· · ·+2+1.



You prove P(n+1). You have k boxes. k(n+1-k) is the first step to get a point. Every strategy for n boxes leads to a score of n(n − 1)/2.



α=(i)+(ii)+(iii)




You are saved. [n(n-1)/2]^2 is also the square. P(1)=0. Viruses are still somewhere. P(k)≧2. You need to divide it, and it is prime numbers.













2017年10月22日日曜日

Genetic Engineering


This is the outbreak. The one person (black) is infected in a small room (n×n). The neighbors (yellow) can't escape from the infection. n(n+1)/2 is the half of the square.


n is expansion, so viruses are everywhere.


P is probability, but you need time to extinguish us all. 100 people are almost dead (50%) in this century, but the chance is 1% every year.

2017年10月14日土曜日

The Multiplicative Weights Algorithm

You are the dictator chosen by democracy, and you have many advisors. You kill them, when they make mistakes. You ask your citizens whether your decision is correct. They will follow you. We know these nations in the modern history. AI may choose the same direction.

t=1,2,...,T

Each expert [i∈ N] advises some value in [−1,1]. This is yes or no.


This is a weighted majority vote which is yes or no.


The experts i make mistake.


They kill each other, and citizens want it.


The Weighted Majority errs expand. Citizens need more experts to extinguish them.


This is the survival of the fittest.



This is almost infinite, so citizens minimize advisors. Your nation may be ideal because of their wisdom.


P is picked by Hedge. ε<1.
























2017年10月13日金曜日

The conservation of area

Math is tricky.


The area of this rectangle is 90.

There is a definition. You divide two triangles with total area 90 into four triangles with total area greater than 92, and this will imply that an area of 90 is larger than an area of 92.

90>92. This is ridiculous. Zen monks like these questions.


I follow the definition, and you see four triangles. 10×9 is the same area. Then you create two rectangles.


X is almost 2, but you can't measure it. 2*X looks like a square. If X is 2, the total area of these rectangles are (8×11)+(2×2)=88+4=92

However, X is Φ, which is the natural greedy heuristic.

The conservation of area isn't empty. X≠1.8. You can't break the rule. X>2.






2017年10月10日火曜日

Newton's method in optimization

min f(x), x∈Rn


This is the Newton's method in optimization in nonlinear equations.

g(x)=0

x0 is the starting point.


∇g(x0) is linear and non-singular.


x1=x0+d



Therefore, g(x0+d) is almost Zero.

f(x) is the approximation, and T is Taylor expansion.




This is almost g(x0+d). g is the Jacobian matrix, and ∂ is general topology.