Finished writing a draft article? Are you ready to request review of it by an experienced editor for possible inclusion in Wikipedia? Submit your draft for review!
Balancing a circle
Let the triple
(
θ
i
,
d
i
,
w
i
)
{\displaystyle (\theta _{i},d_{i},w_{i})}
be the angle, distance and weight of a particle from the centre of the disc.
Let P be some particles on a unit disk such that a given diameter axis
d
1
{\displaystyle d_{1}}
means that the sum of perpendiculars from P to
d
1
{\displaystyle d_{1}}
is zero. Let
d
2
{\displaystyle d_{2}}
be a distinct other axis with the same property.
Prove that all
d
{\displaystyle d}
have this property.
Consider two axis orthogonal to each other and a set of weights with the above property (which can be achieved by calculating the position of the
n
t
h
{\displaystyle n^{th}}
weight after the first
n
−
1
{\displaystyle n-1}
weights have been placed).
Note that the perpendiculars to a new rotated orthogonal pair of axes from a given weight all lie on the circumference of the circle centred halfway between the origin and the weight, radius half the full distance from O to W.
This applies to each weight, and so there are a set of circles each with a common point on the circumference of the origin and the new axes intersect with these circles at the new distances.
From trigonometric identities , we have:
sin
(
α
+
β
)
=
sin
α
cos
β
+
cos
α
sin
β
cos
(
α
+
β
)
=
cos
α
cos
β
−
sin
α
sin
β
{\displaystyle {\begin{aligned}\sin(\alpha +\beta )&=\sin \alpha \cos \beta +\cos \alpha \sin \beta \\\cos(\alpha +\beta )&=\cos \alpha \cos \beta -\sin \alpha \sin \beta \end{aligned}}}
We know:
∑
w
i
sin
α
i
=
0
∑
w
i
cos
α
i
=
0
{\displaystyle {\begin{aligned}\sum w_{i}\sin \alpha _{i}&=0\\\sum w_{i}\cos \alpha _{i}&=0\end{aligned}}}
If
α
i
{\displaystyle \alpha _{i}}
is the original angle, and
β
{\displaystyle \beta }
is the rotated amount, then we have:
w
i
sin
(
α
i
+
β
)
=
w
i
sin
α
i
cos
β
+
w
i
cos
α
i
sin
β
w
i
cos
(
α
i
+
β
)
=
w
i
cos
α
i
cos
β
−
w
i
sin
α
i
sin
β
{\displaystyle {\begin{aligned}w_{i}\sin(\alpha _{i}+\beta )&=w_{i}\sin \alpha _{i}\cos \beta +w_{i}\cos \alpha _{i}\sin \beta \\w_{i}\cos(\alpha _{i}+\beta )&=w_{i}\cos \alpha _{i}\cos \beta -w_{i}\sin \alpha _{i}\sin \beta \end{aligned}}}
and summing:
∑
w
i
sin
(
α
i
+
β
)
=
∑
w
i
sin
α
i
cos
β
+
∑
w
i
cos
α
i
sin
β
∑
w
i
cos
(
α
i
+
β
)
=
∑
w
i
cos
α
i
cos
β
−
∑
w
i
sin
α
i
sin
β
{\displaystyle {\begin{aligned}\sum w_{i}\sin(\alpha _{i}+\beta )&=\sum w_{i}\sin \alpha _{i}\cos \beta +\sum w_{i}\cos \alpha _{i}\sin \beta \\\sum w_{i}\cos(\alpha _{i}+\beta )&=\sum w_{i}\cos \alpha _{i}\cos \beta -\sum w_{i}\sin \alpha _{i}\sin \beta \end{aligned}}}
∑
w
i
sin
(
α
i
+
β
)
=
cos
β
∑
w
i
sin
α
i
+
sin
β
∑
w
i
cos
α
i
=
0
+
0
=
0
∑
w
i
cos
(
α
i
+
β
)
=
cos
β
∑
w
i
cos
α
i
−
sin
β
∑
w
i
sin
α
i
=
0
−
0
=
0
{\displaystyle {\begin{aligned}\sum w_{i}\sin(\alpha _{i}+\beta )&=\cos \beta \sum w_{i}\sin \alpha _{i}+\sin \beta \sum w_{i}\cos \alpha _{i}=0+0=0\\\sum w_{i}\cos(\alpha _{i}+\beta )&=\cos \beta \sum w_{i}\cos \alpha _{i}-\sin \beta \sum w_{i}\sin \alpha _{i}=0-0=0\end{aligned}}}
The resultant weighted vector at the origin is therefore zero, and this is invariant over axis rotation.
Or, the lines midway between two are balanced, and this process continues ad infinitum.
Convex function proofs
edit
Consider
f
(
x
)
=
x
2
{\displaystyle f(x)=x^{2}}
,
x
≤
y
,
0
≤
t
≤
1
{\displaystyle x\leq y,0\leq t\leq 1}
. Then:
f
(
t
x
+
(
1
−
t
)
y
)
−
t
f
(
x
)
−
(
1
−
t
)
f
(
y
)
{\displaystyle f(tx+(1-t)y)-tf(x)-(1-t)f(y)}
=
t
2
x
2
+
2
t
(
1
−
t
)
x
y
+
(
1
−
t
)
2
y
2
−
t
x
2
−
(
1
−
t
)
y
2
{\displaystyle =t^{2}x^{2}+2t(1-t)xy+(1-t)^{2}y^{2}-tx^{2}-(1-t)y^{2}}
=
t
(
t
−
1
)
x
2
+
2
t
(
1
−
t
)
x
y
+
(
1
−
t
)
(
−
t
)
y
2
{\displaystyle =t(t-1)x^{2}+2t(1-t)xy+(1-t)(-t)y^{2}}
=
−
t
(
1
−
t
)
(
x
2
−
2
x
y
+
y
2
)
{\displaystyle =-t(1-t)\left(x^{2}-2xy+y^{2}\right)}
=
−
t
(
1
−
t
)
(
x
−
y
)
2
{\displaystyle =-t(1-t)(x-y)^{2}}
≤
0
{\displaystyle \leq 0}
Consider
f
(
x
)
=
log
(
x
)
{\displaystyle f(x)=\log(x)}
,
0
<
x
≤
y
,
0
≤
t
≤
1
{\displaystyle 0<x\leq y,0\leq t\leq 1}
. Then:
f
(
t
x
+
(
1
−
t
)
y
)
−
t
f
(
x
)
−
(
1
−
t
)
f
(
y
)
{\displaystyle f(tx+(1-t)y)-tf(x)-(1-t)f(y)}
=
log
(
t
x
+
(
1
−
t
)
y
)
−
(
t
log
(
x
)
+
(
1
−
t
)
log
(
y
)
)
{\displaystyle =\log(tx+(1-t)y)-(t\log(x)+(1-t)\log(y))}
=
log
(
t
x
+
(
1
−
t
)
y
)
−
log
(
x
t
y
1
−
t
)
{\displaystyle =\log(tx+(1-t)y)-\log(x^{t}y^{1-t})}
=
log
(
t
x
+
(
1
−
t
)
y
x
t
y
1
−
t
)
{\displaystyle =\log({\frac {tx+(1-t)y}{x^{t}y^{1-t}}})}
So need to prove:
t
x
+
(
1
−
t
)
y
x
t
y
1
−
t
≥
1
{\displaystyle {\frac {tx+(1-t)y}{x^{t}y^{1-t}}}\geq 1}
or
t
x
+
(
1
−
t
)
y
≥
x
t
y
1
−
t
{\displaystyle tx+(1-t)y\geq x^{t}y^{1-t}}
or, dividing by
y
{\displaystyle y}
:
t
(
x
y
−
1
)
+
1
≥
(
x
y
)
t
{\displaystyle t\left({\frac {x}{y}}-1\right)+1\geq \left({\frac {x}{y}}\right)^{t}}
So:
t
(
x
y
−
1
)
+
1
−
(
x
y
)
t
{\displaystyle t\left({\frac {x}{y}}-1\right)+1-\left({\frac {x}{y}}\right)^{t}}
=
(
x
y
−
1
)
(
t
−
(
x
y
)
t
−
1
x
y
−
1
)
{\displaystyle =\left({\frac {x}{y}}-1\right)\left(t-{\frac {\left({\frac {x}{y}}\right)^{t}-1}{{\frac {x}{y}}-1}}\right)}
=
(
x
y
−
1
)
(
t
−
(
1
+
x
y
+
⋯
+
(
x
y
)
t
−
1
)
)
{\displaystyle =\left({\frac {x}{y}}-1\right)\left(t-(1+{\frac {x}{y}}+\dots +\left({\frac {x}{y}}\right)^{t-1})\right)}
≥
0
{\displaystyle \geq 0}
Catalan q-polynomials
edit
The Catalan q-polynomials
C
k
(
q
)
{\displaystyle C_{k}(q)}
count the number of blocks present in the diagram under the diagonal height k , and start
C
0
(
q
)
=
1
{\displaystyle C_{0}(q)=1}
C
1
(
q
)
=
1
{\displaystyle C_{1}(q)=1}
C
2
(
q
)
=
1
+
q
{\displaystyle C_{2}(q)=1+q}
C
3
(
q
)
=
1
+
q
+
2
q
2
+
q
3
{\displaystyle C_{3}(q)=1+q+2q^{2}+q^{3}}
C
4
(
q
)
=
1
+
q
+
2
q
2
+
3
q
3
+
3
q
4
+
3
q
5
+
q
6
{\displaystyle C_{4}(q)=1+q+2q^{2}+3q^{3}+3q^{4}+3q^{5}+q^{6}}
The sum of the coefficients of
C
k
(
q
)
{\displaystyle C_{k}(q)}
give
C
k
{\displaystyle C_{k}}
.
To generate the next level, we add a horizontal and vertical step. The horizontal step is always placed at the origin, and the vertical step can be placed anywhere off the bounding diagonal, and is the first time the path touches the diagonal.
The first path from the convolution is inserted along the (k-1) -th diagonal created by the two endpoints of the new steps, and the second is placed along the k -th diagonal.
With Dyck words, where the new template is
X
(
k
)
Y
(
n
−
k
)
{\displaystyle X(k)Y(n-k)}
, where
(
k
)
{\displaystyle (k)}
is a Dyck word of length k . The X step is always first, and the Y step comes after a k -length Dyck word.
The new polynomial is therefore the heights of the previous polynomials, plus the rectangle created by the insertion.
C
n
(
q
)
=
∑
i
=
0
n
−
1
q
i
(
n
−
i
)
C
i
(
q
)
C
n
−
i
(
q
)
{\displaystyle C_{n}(q)=\sum _{i=0}^{n-1}q^{i(n-i)}C_{i}(q)C_{n-i}(q)}
For example,
C
4
(
q
)
=
q
0
(
1
)
(
1
+
q
+
2
q
2
+
q
3
)
+
q
3
(
1
)
(
1
+
q
)
+
q
4
(
q
+
1
)
(
1
)
+
q
3
(
1
+
q
+
2
q
2
+
q
3
)
(
1
)
{\displaystyle C_{4}(q)=q^{0}(1)(1+q+2q^{2}+q^{3})+q^{3}(1)(1+q)+q^{4}(q+1)(1)+q^{3}(1+q+2q^{2}+q^{3})(1)}
.
12 34 56
13 26 45
14 25 36
15 23 46
16 24 35
12 34 58 67
13 24 57 68
14 25 36 78
15 26 37 48
16 27 38 45
17 28 35 46
18 23 47 56
Prove
(
m
j
)
(
n
k
)
≤
(
m
+
n
j
+
k
)
{\displaystyle {\binom {m}{j}}{\binom {n}{k}}\leq {\binom {m+n}{j+k}}}
=
m
!
n
!
j
!
k
!
(
m
−
j
)
!
(
n
−
k
)
!
≤
(
m
+
n
)
!
(
j
+
k
)
!
(
m
+
n
−
j
−
k
)
!
{\displaystyle ={\frac {m!n!}{j!k!(m-j)!(n-k)!}}\leq {\frac {(m+n)!}{(j+k)!(m+n-j-k)!}}}
Consider
(
m
+
n
)
!
m
!
n
!
j
!
k
!
(
j
+
k
)
!
(
m
−
j
)
!
(
n
−
k
)
!
(
m
+
n
−
j
−
k
)
!
{\displaystyle {\frac {(m+n)!}{m!n!}}{\frac {j!k!}{(j+k)!}}{\frac {(m-j)!(n-k)!}{(m+n-j-k)!}}}
where
(
a
+
b
)
!
a
!
b
!
=
(
a
+
b
a
)
=
(
a
+
1
)
⋯
(
a
+
b
)
b
!
=
∏
i
=
1
b
(
1
+
a
i
)
{\displaystyle {\frac {(a+b)!}{a!b!}}={\binom {a+b}{a}}={\frac {(a+1)\cdots (a+b)}{b!}}=\prod _{i=1}^{b}\left(1+{\frac {a}{i}}\right)}
so
∏
i
=
1
m
(
1
+
n
i
)
∏
i
=
1
j
(
1
+
k
i
)
∏
i
=
1
m
−
j
(
1
+
n
−
k
i
)
{\displaystyle {\frac {\prod _{i=1}^{m}\left(1+{\frac {n}{i}}\right)}{\prod _{i=1}^{j}\left(1+{\frac {k}{i}}\right)\prod _{i=1}^{m-j}\left(1+{\frac {n-k}{i}}\right)}}}
and
(
m
+
n
m
)
(
j
+
k
j
)
(
m
+
n
−
j
−
k
m
−
j
)
{\displaystyle {\frac {\binom {m+n}{m}}{{\binom {j+k}{j}}{\binom {m+n-j-k}{m-j}}}}}
The meaning of logic
edit
TRUTH
0000 (0) FALSE
0110 (6) XOR
1001 (9) NXOR
1111 (F) TRUE
IDEMPOTENT
0001 (1) AND
0011 (3) A
0101 (5) B
0111 (7) OR
INJECTIVE
0100 (4) LT
1100 (C) NB
1101 (D) LTE
1110 (E) NAND
SURJECTIVE
0010 (2) GT
1000 (8) NOR
1011 (B) GTE
1010 (A) NA
Partial sums of binomials
edit
∑
i
=
0
k
(
n
−
k
−
1
+
i
i
)
2
n
−
k
−
i
{\displaystyle \sum _{i=0}^{k}{\binom {n-k-1+i}{i}}2^{n-k-i}}
n
=
6
,
k
=
3
:
1
+
6
+
15
+
20
=
42
{\displaystyle n=6,k=3:1+6+15+20=42}
(
2
0
)
2
3
+
(
3
1
)
2
2
+
(
4
2
)
2
+
(
5
3
)
=
8
+
12
+
12
+
10
=
4
{\displaystyle {\binom {2}{0}}2^{3}+{\binom {3}{1}}2^{2}+{\binom {4}{2}}2+{\binom {5}{3}}=8+12+12+10=4}
2.
Pythagorean and 2 squares
edit
Let
(
a
,
b
,
c
)
{\displaystyle (a,b,c)}
be a Pythagorean triple , with a even.
Then both
c
−
a
{\displaystyle c-a}
and
c
+
a
{\displaystyle c+a}
are square numbers with roots r and s.
Then
c
=
(
r
−
s
2
)
2
+
(
r
+
s
2
)
2
{\displaystyle c=\left({\frac {r-s}{2}}\right)^{2}+\left({\frac {r+s}{2}}\right)^{2}}
e.g. (48, 55, 73) ->73-48=25 (5) and 73+48=121 (11)
therefore 73=3^2+8^2
GF for Catalan numbers
edit
Catalan number
Start with the GF for the central binomial coefficient .
1
1
−
4
x
=
∑
k
=
0
∞
(
2
k
k
)
x
k
{\displaystyle {\frac {1}{\sqrt {1-4x}}}=\sum _{k=0}^{\infty }{\binom {2k}{k}}x^{k}}
Integrating and setting the constant to
1
2
{\displaystyle {\frac {1}{2}}}
from the case
x
=
0
{\displaystyle x=0}
yields
1
−
1
−
4
x
2
=
∑
k
=
0
∞
1
k
+
1
(
2
k
k
)
x
k
+
1
{\displaystyle {\frac {1-{\sqrt {1-4x}}}{2}}=\sum _{k=0}^{\infty }{\frac {1}{k+1}}{\binom {2k}{k}}x^{k+1}}
Divide by x to get
1
−
1
−
4
x
2
x
=
∑
k
=
0
∞
C
k
x
k
{\displaystyle {\frac {1-{\sqrt {1-4x}}}{2x}}=\sum _{k=0}^{\infty }C_{k}x^{k}}
Primitive root modulo n
The order of an element is the smallest k where
a
k
≡
1
(
mod
n
)
{\displaystyle a^{k}\equiv 1{\pmod {n}}}
.
k divides
ϕ
(
n
)
{\displaystyle \phi (n)}
. Testing a candidate against each possible k returns negative if and only if the candidate is a primitive root.
a/k
1
2
3
4
5
6
1
1
1
1
1
1
1
2
2
4
1
2
4
1
3
3
2
6
4
5
1
4
4
2
1
4
2
1
5
5
4
6
2
3
1
6
6
1
6
1
6
1
Fermat's theorem on sums of two squares
(5) can be proved by Euler's criterion . It also tells us that if
p
=
4
k
+
1
{\displaystyle p=4k+1}
,
p
|
∏
i
=
1
4
k
(
i
2
k
+
(
i
−
1
)
2
k
)
{\displaystyle p|\prod _{i=1}^{4k}\left(i^{2k}+(i-1)^{2k}\right)}
which is the sum of two squares by (1). (2), (3) and (4) can then be used to find it.
Finding primitive roots for primes
edit
For each prime p of p-1, remove k^p from 1,..,p-1 as k runs over the same range. Only primitive roots remain.
Fermat's little power test
edit
a
k
≡
1
(
mod
p
)
{\displaystyle a^{k}\equiv 1{\pmod {p}}}
if and only if
k
|
p
−
1
{\displaystyle k|p-1}
For example,
x
7
−
1
{\displaystyle x^{7}-1}
is never divisible by 13 , 17 , etc..., but is by 29 .
Chinese Remainder Theorem
edit
Plane partition
The GF is
∏
i
=
1
∞
1
(
1
−
x
i
)
i
{\displaystyle \prod _{i=1}^{\infty }{\frac {1}{(1-x^{i})^{i}}}}
Consider instead the much simpler GF of
1
1
−
x
∏
i
=
2
∞
1
(
1
−
x
i
)
2
{\displaystyle {\frac {1}{1-x}}\prod _{i=2}^{\infty }{\frac {1}{(1-x^{i})^{2}}}}
The n -th term is the number of partitions of n into at least 0 parts + partitions of n-1 into at least 1 part + partitions of n-2 into at least 2 parts + etc...
The GF for at least k parts is
L
P
k
=
x
k
∏
i
=
1
k
1
(
1
−
x
i
)
∏
i
=
1
∞
1
(
1
−
x
i
)
{\displaystyle LP_{k}=x^{k}\prod _{i=1}^{k}{\frac {1}{(1-x^{i})}}\prod _{i=1}^{\infty }{\frac {1}{(1-x^{i})}}}
and
∑
k
=
0
∞
L
P
k
=
∏
i
=
1
∞
1
(
1
−
x
i
)
2
{\displaystyle \sum _{k=0}^{\infty }LP_{k}=\prod _{i=1}^{\infty }{\frac {1}{(1-x^{i})^{2}}}}
and we have counted the single x twice.
Coordinates of circumcentre
edit
Let
△
A
B
C
{\displaystyle \triangle ABC}
be coordinates
(
x
1
,
y
1
)
,
(
x
2
,
y
2
)
,
(
x
3
,
y
3
)
{\displaystyle (x_{1},y_{1}),(x_{2},y_{2}),(x_{3},y_{3})}
. Then the midpoints of AB and AC are
(
x
1
+
x
2
2
,
y
1
+
y
2
2
)
{\displaystyle \left({\frac {x_{1}+x_{2}}{2}},{\frac {y_{1}+y_{2}}{2}}\right)}
(
x
1
+
x
3
2
,
y
1
+
y
3
2
)
{\displaystyle \left({\frac {x_{1}+x_{3}}{2}},{\frac {y_{1}+y_{3}}{2}}\right)}
The perpendiculars are
(
y
2
−
y
1
x
1
−
x
2
)
{\displaystyle {\binom {y_{2}-y_{1}}{x_{1}-x_{2}}}}
(
y
3
−
y
1
x
1
−
x
3
)
{\displaystyle {\binom {y_{3}-y_{1}}{x_{1}-x_{3}}}}
and the equations of the perpendiculars through the midpoints are
(
x
y
)
=
(
x
1
+
x
2
2
y
1
+
y
2
2
)
+
s
(
y
2
−
y
1
x
1
−
x
2
)
{\displaystyle {\binom {x}{y}}={\binom {\frac {x_{1}+x_{2}}{2}}{\frac {y_{1}+y_{2}}{2}}}+s{\binom {y_{2}-y_{1}}{x_{1}-x_{2}}}}
(
x
y
)
=
(
x
1
+
x
3
2
y
1
+
y
3
2
)
+
t
(
y
3
−
y
1
x
1
−
x
3
)
{\displaystyle {\binom {x}{y}}={\binom {\frac {x_{1}+x_{3}}{2}}{\frac {y_{1}+y_{3}}{2}}}+t{\binom {y_{3}-y_{1}}{x_{1}-x_{3}}}}
with equality when
x
1
+
x
2
2
+
s
(
y
2
−
y
1
)
=
x
1
+
x
3
2
+
t
(
y
3
−
y
1
)
{\displaystyle {\frac {x_{1}+x_{2}}{2}}+s(y_{2}-y_{1})={\frac {x_{1}+x_{3}}{2}}+t(y_{3}-y_{1})}
y
1
+
y
2
2
+
s
(
x
1
−
x
2
)
=
y
1
+
y
3
2
+
t
(
x
1
−
x
3
)
{\displaystyle {\frac {y_{1}+y_{2}}{2}}+s(x_{1}-x_{2})={\frac {y_{1}+y_{3}}{2}}+t(x_{1}-x_{3})}
so
(
x
2
−
x
3
)
+
2
s
(
y
2
−
y
1
)
=
2
t
(
y
3
−
y
1
)
{\displaystyle (x_{2}-x_{3})+2s(y_{2}-y_{1})=2t(y_{3}-y_{1})}
(
y
2
−
y
3
)
+
2
s
(
x
1
−
x
2
)
=
2
t
(
x
1
−
x
3
)
{\displaystyle (y_{2}-y_{3})+2s(x_{1}-x_{2})=2t(x_{1}-x_{3})}
and then
(
x
2
−
x
3
)
(
x
1
−
x
2
)
+
2
s
(
x
1
−
x
2
)
(
y
2
−
y
1
)
=
2
t
(
x
1
−
x
2
)
(
y
3
−
y
1
)
{\displaystyle (x_{2}-x_{3})(x_{1}-x_{2})+2s(x_{1}-x_{2})(y_{2}-y_{1})=2t(x_{1}-x_{2})(y_{3}-y_{1})}
(
y
2
−
y
3
)
(
y
2
−
y
1
)
+
2
s
(
x
1
−
x
2
)
(
y
2
−
y
1
)
=
2
t
(
x
1
−
x
3
)
(
y
2
−
y
1
)
{\displaystyle (y_{2}-y_{3})(y_{2}-y_{1})+2s(x_{1}-x_{2})(y_{2}-y_{1})=2t(x_{1}-x_{3})(y_{2}-y_{1})}
so
(
x
2
−
x
3
)
(
x
1
−
x
2
)
−
(
y
2
−
y
3
)
(
y
2
−
y
1
)
=
2
t
(
x
1
y
3
−
x
2
y
3
+
x
2
y
1
−
x
1
y
2
+
x
3
y
2
−
x
3
y
1
)
{\displaystyle (x_{2}-x_{3})(x_{1}-x_{2})-(y_{2}-y_{3})(y_{2}-y_{1})=2t(x_{1}y_{3}-x_{2}y_{3}+x_{2}y_{1}-x_{1}y_{2}+x_{3}y_{2}-x_{3}y_{1})}
Namely,
∏
p
∈
p
r
i
m
e
1
−
log
(
1
−
1
p
s
)
{\displaystyle \prod _{p\in prime}1-\log \left(1-{\frac {1}{p^{s}}}\right)}
e
∑
p
∈
p
r
i
m
e
1
p
s
{\displaystyle e^{\sum \limits _{p\in prime}{\frac {1}{p^{s}}}}}
Hamiltonian cycles
Generate the permutations of all vertices. Remove all those with non-adjacent vertices.
Two cuts are adjacent if the corresponding partitions differ by only 1 vertex.
NP-complete
Given a problem, we subdivide it into individual cases, and run each tasks concurrently, remembering and collating each result.
An integer in base b can be written as
n
=
∑
i
=
0
N
a
i
b
i
{\displaystyle n=\sum _{i=0}^{N}a_{i}b^{i}}
and the same integer in base d is
n
=
∑
i
=
0
M
c
i
d
i
{\displaystyle n=\sum _{i=0}^{M}c_{i}d^{i}}
If
d
+
e
=
b
{\displaystyle d+e=b}
, then the first equation becomes
n
=
∑
i
=
0
N
a
i
(
d
+
e
)
i
{\displaystyle n=\sum _{i=0}^{N}a_{i}(d+e)^{i}}
Expand this using the binomial formula to get
n
=
∑
i
=
0
N
a
i
∑
k
=
0
i
(
i
k
)
e
k
d
i
−
k
{\displaystyle n=\sum _{i=0}^{N}a_{i}\sum _{k=0}^{i}{\binom {i}{k}}e^{k}d^{i-k}}
and collect by like terms in d to get the second equation.
We want to add two bytes A and B . We use auxiliary bytes C and D to store the carries and answer, and a carry flag for the final bits.
Let C be initially zero, and a ,b ,c ,d be aligned bits.
Then
d
=
a
⊗
b
⊗
c
{\displaystyle d=a\otimes b\otimes c}
and
c
′
=
(
a
∧
b
)
∨
(
a
∧
c
)
∨
(
b
∧
c
)
{\displaystyle c'=(a\land b)\lor (a\land c)\lor (b\land c)}
where
⊗
{\displaystyle \otimes }
is XOR and c' is the next carry bit.
Presentation of the sphere group
edit
The presentation of a group is defined by the generators of the groups involved and their identities.
The sphere group is obtained by tending k to infinity for two cyclic groups g and h , order 4k .
There are two types of identities, the polar identities, from the fact that both poles are stable points, hence given
0
≤
a
<
4
k
{\displaystyle 0\leq a<4k}
,
h
k
g
a
h
−
k
=
g
k
h
a
g
−
k
=
I
{\displaystyle h^{k}g^{a}h^{-k}=g^{k}h^{a}g^{-k}=I}
, and the equator identities, from the two routes from pole to pole,
g
2
k
h
2
k
=
h
2
k
g
2
k
=
I
{\displaystyle g^{2k}h^{2k}=h^{2k}g^{2k}=I}
.
The torus doesn't have either of these identities.
The first corresponds to the fact that if one of the generators is rotations
G
z
{\displaystyle G_{z}}
about the z axis (i.e. the x-y plane), then it affects only x and y components, of which the singularity at
(
x
,
y
,
z
)
=
(
0
,
0
,
1
)
{\displaystyle (x,y,z)=(0,0,1)}
is not affected, and so it is a stable point of
G
z
{\displaystyle G_{z}}
.
The second describes a contour, where the order of the two groups is halved (i.e. order 2k ) due to the lack of a pole. The path then moves close to the pole, does half a circle around the inner circle, back to the equator, but on the other side, and then back around the outer circle.
Homotopy cam be used to define the trivial fundamental group. Let
(
a
,
b
)
{\displaystyle (a,b)}
be a point inside
H
(
x
,
0
)
{\displaystyle H(x,0)}
and
H
(
x
,
1
)
{\displaystyle H(x,1)}
. Then there exists a tuple
(
x
,
t
)
{\displaystyle (x,t)}
such that
H
(
x
,
t
)
=
(
a
,
b
)
{\displaystyle H(x,t)=(a,b)}
. If
(
a
,
b
)
{\displaystyle (a,b)}
is not available, then the fundamental group is not trivial.
Both the sphere and the torus also can be generated with the product group of a line segment and a circle, where the line segment is a polar axis and forms a normal to the plane containing the circle. The radius of the circle is determined by the height from the origin.
The sphere is therefore generated by an interval
[
−
a
,
a
]
{\displaystyle [-a,a]}
and the torus by (-a,a). As such, the torus is not compact.
There exists a straight line through any torus which cuts the surface 4 times (compared to the spherical 2 ). Alternatively, an angle and height determine 2 points on the sphere and 4 points on the torus.
If a group is seen to 'rotate' the other group, then the pole relation is
h
k
g
2
k
h
k
=
e
{\displaystyle h^{k}g^{2k}h^{k}=e}
. Pre-multiplying by
h
k
{\displaystyle h^{k}}
and post-multiplying by
h
−
k
{\displaystyle h^{-k}}
(or vice versa) gives the equatorial relation, as
e
=
h
k
e
h
−
k
=
h
k
h
k
g
2
k
h
k
h
−
k
=
h
2
k
g
2
k
{\displaystyle e=h^{k}eh^{-k}=h^{k}h^{k}g^{2k}h^{k}h^{-k}=h^{2k}g^{2k}}
.
This indicates that a position/direction couple (i.e. a displaced vector) can be spun around it's position (unlike with a torus).
Client-Vendor-Bank model
edit
The Client-Vendor-Bank model (CVB) involves the oAuth model.
Only the Authentication and Authorization layers are used, along with vendorId and vendorSecret. These are registered with the Bank.
The steps involved are:
1. C sends V transaction request
2. V asks C for Authentication with vendorId and transaction details from B
3. B replies to V with the AuthCode for the transaction
4. V posts AuthCode, vendorId and vendorSecret to B
5. B commits the transaction and sends receipt to V
6. V sends receipt to C
This model has minimal external interference, and is secure as B has two potentially conflicting items for the same transaction.