K tree

SurakshaSanghavi 375 views 8 slides Jun 29, 2017
Slide 1
Slide 1 of 8
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8

About This Presentation

It is about advanced tree


Slide Content

K- Tree Prepared by:- Suraksha Sanghavi

Invented in 1970s by Jon Bentley It is a binary tree K-tree is also known as KD tree (k- diamensional ) Where D=1,2,3…… But we have in study is 2D Tree Each level has a “ cutting dimension” Each node contains a point P = ( x,y )

Complexity Insert: Average and balanced trees: O(log N) Worst case: O(N ) Print: Range query: for M matches Perfectly balanced tree: K-D trees: O(M + k N (1-1/k) ) 2-D trees: O(M + N)

Its left side with space known as left subtree Its right side with points known as right subtree Its first node is root (Grand parent) While inserting its child (parent) it checks with x- cordinate While inserting next node at next level it checks with y-co- dinate

General idea for reprsenting tree It is reprsenting in two way 1)Tree 2)Graph 0 level - x- alinged (vertical line)-compare with x-co-ordinate. 1-level – y- alinged (horizontal line –it depend on child on which side) – compare with y-co-ordinate. 2-level – x- alinged -compare x- cordinate . 3-level – y alinged -compare y – corinate .

Applications Nearest neighbour Search Database Queries

Thank you
Tags