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.







2017年7月28日金曜日

Fusion tree

Mantra in computer science is very complicated.

A fusion tree is a tree data on w-bit integers. It uses O(n) space and performs searches in O(logw n) time, which is faster than the van Emde Boas tree. O(1) is the fastest (MSB).


Sketching is the method by which each w-bit key at a node containing k keys is compressed into only k − 1 bits. The node X are 0,1,2・・・・,(n-1).

This is expansion.

O(n^2)


The fusion tree must be able to search a node containing up to w^1/5 keys in constant time.
There are many start points Xo. It includes (0,1) which is 2^(n-1) bits, but you can search it according to w and Xn. Therefore, you can find max() min(), and successor(x) predecessor(x). X(1) survive.

The computer like copying.

1000000000100000000・・・・
1000100000110000000・・・・
1000010000111000000・・・・
1000000100111100000・・・・

You want to know 100,110,111 for comparison.


empty() is S=φ

delete(x) is setting the bit for x to 0.

There is the collapse.



Each sketch bit in location bi will get shifted to bi + mi.



bi + mj are distinct for all pairs (i, j). This will ensure that the sketch bits are uncorrupted by the multiplication. bi + mi is a strictly increasing function of i. The order of the sketch bits is preserved. The sketch bits can be packed into a range of size at most r^4

2017年7月27日木曜日

Y-fast trie

ordered dictionary


successor(x) returns the smallest element of S greater than x, ①=1
x000①0|
(⇒)

predecessor(x) returns the largest element of S smaller than x, ①=1
|010①0x
(⇒)



An X-fast Trie is a binary trie where leaves are stored in a doubly-linked list and where all nodes in each level are stored in a hash table. It is O(1).

The successor(x) is O(log log U).

You add new nodes to the trie and update thread pointers to include x.


Y-fast trie has predecessor or successor queries in O(log log U) by using O(n). It contains at least (log U)/4 and at most 2 log U elements in X-fast trie. X-fast trie stores O(n / log U) representatives. You can see where Y is because of comparison.