2017年8月15日火曜日

Splay tree

Splay tree is used for caches and garbage collection. It relieves your memory devices.

This is upside down. The root will be the node.


The worst-case height is O(n), but the average is O(log n).

This is Zig-Zag step.

rank(n)=log n


ΔΦ=0



Θf=Θ'i


You search all nodes to reorganize it like heap sort.
Your caches are convenient, but it is complicated. O(1) is faster. Is is ancient to click the link?

2017年8月14日月曜日

Cuckoo Hashing

Your smart phone can't recognize who you are, although your security keeps improving. You always carry it with your passwords, don't you? It may be a part of your body. You can't lose it.

None dualistic duality is well known idea about quantum computers. 0 and 1 are treated at the same time.

Absurdity and irrationality are quite natural in Zen.


Birds can't perceive their own chicks. A cuckoo puts her eggs in the nest of different birds.


Her egg is in 0, and 0 is replaced to 1. There are 3 independent hashings, (0,6,7) in the nest. Θ(1) survive, although 0 is the cuckoo. Θ(log logU) is the collision, which is 1.58.

U={0,1,・・・,U-1}

This is the hash table. You will expand it to create empty space for k independence.

When U=2^100, there are only 6.64 collisions. Therefore, the wider space must be better.







2017年8月12日土曜日

D wave

Coincidences, Chaos, And All That Math Jazz

We may see D wave near future. Quantum computers are not science fiction.

This is the general case of position-space wave functions.

|Ψ(x,t)|^2=P(x,t)


You can measure 100% probability of particles in somewhere.


You need almost more than 50% of the surface to pile cards without crash.


1+1/2+(1/3+1/4)+(1/5+1/6+1/7+1/8)+(1/9+1/10・・・+1/15+1/16)+(1/17・・+1/32)+・・∞・・・



(1/3+1/4)>(1/4+1/4)=1/2, (1/5+1/6+1/7+1/8)>(1/8+1/8+1/8+1/8)=4/8=1/2, (1/9+1/10+1/11・・・+1/16)>8/16=1/2,・・∞


There is always symmetry infinitely, although it depends on hardware vendors.


Expansion is more reliable.



2017年8月5日土曜日

Symmetrization

You may use biometrics in your devices.

O(1) is crucial because of K-independent hashing, but there is the bug.


i≠ j, k=1


Symmetrization is the optimization to solve this difficulty.

There are two shapes.






The associated symmetric form may take half-integer values.

(p+q)/2


A set of point pairs {(p1,q1),・・・,(pm,qm)} is given on the boundary of a shape.






T is transformation.

T=(Θ,d)


T'(p+dp)=q+dq





E is still expectation. The boundary will be getting smaller like your fingerprints or DNA. O(1) is the worst-case execution time (WCET). I have quantum computers in my brain because of O(1), but nobody cares. You need the faster one to count prime numbers, although XP is enough for me. C++ is hard to use in Windows 10. I believe in your evolution.





2017年8月3日木曜日

Linear probing

Linear probing is the hashing strategy. Insert an element x, compute h(x) and try to place x. All hash table address the collisions.


All elements with hash collisions are stored. Choose hash functions to avoid collisions, and rehash or move elements when they do. When removing an element, mark that the cell is empty.

Memory in your devices is not exhausted because of the hash function.

K-independent hashing is randomized algorithms for this efficiency.

H={h:U→[m]}


Hashing maps keys from some large domain (universe) U into a smaller range m.

[m]={0,1,2・・・,m-1}

X1,X2・・,Xk ∊ U^k


k is distinct keys.

Y1,Y2・・,Yk ∊ [m]^k




The expected cost of a lookup in chained hashing with 2-independent hash functions is O(1 + α) because of collisions. O(1) is the ideal.