SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
simone tino
Algorithms &
Complexity evaluation
Discoverying
Binary Search Trees
of Almost Optimal
Height

@ Università di Catania #20/11/2012
so... what’s this all about?

Introducing
SBB(k) trees
Before getting to SBB(k) trees, we
really have a long way to go... What
about a shortcut?

AVL-Tree

(a,b)-Tree

SBB(k)
Tree

Binary
Search Tree

B-Tree

SBB
Tree

SBB-tree and SBB(k)-tree introduce
the concept of “pseudo-node”!
Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
some definitions...

Matrioska-like definitions, let’s start
from the most inner one...

Optimally balanced
The difference between
its maximum and minimum
heights <= 1

Introducing important
concepts: Pseudo-Node
Minimum
height

Maximum
height

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
Let’s open the box and
see what’s inside...

Defining SBB(k)-trees
SBB(k)-tree is a binary-tree which
satisfies the following 3 criteria...
The

Pseudo-Root

is optimally

balanced and has a maximum
height <= (k+1).
All other

Pseudo-Nodes

have a

minimum height >= (k) and a
maximum height <= (k+1).
The number of

Pseudo-Nodes

on the path

from the root to a leaf is the same for all leaves.
Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
47

The importance of k

Let’s draw some
trees...

35

64

19
9

50

40
28

38

44

48

69
52

66

77

47

35

64
40

k -> k++
19
9

38
28

44

50
48

69
52

66

77

What happens when k
increases?

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
Caging
SBB(k)-trees?

Height upper-bound
START

h ( ab-tree ) 1+ log a

h ( SBB(k)-tree )

n +1
2

= 1+

log ( n + 1) 1
log ( 2 k )

log ( n + 1) + h ( ab-tree )
log ( n + 1) + 1+
1+

1
k

log ( n + 1) 1
log ( 2 k )

log ( n + 1) + 1

1
k

h ( SBB(k)-tree )

1
1+
k

log ( n + 1)

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
Maintenance algorithms

ops.balance

ops.coBalance

Merging, cutting,
rotating... the bricks
of SBB(k)-trees

ops.split

ops.join

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
Update algorithms
ops.insertion
Inserting a node in the tree.

Analyzing algorithms for
insertion and deletion in
SBB(k)-trees

int ops.insertion(pn P, int c) {
return (c==0) ? ops.balance(P,null) :
/*(c==1)*/ ops.split(P,null);
}

ops.deletion
Deleting a node in the tree.
int ops.deletion(pn P, pn S, int c) {
return (c==0x00) ? ops.balance(P,S) :
ops.rotation() +
(c==0x10) ? ops.coBalance(P,S) :
/*(c==0x11)*/ ops.join(P,S);
}

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
Inspecting ops.balance
and most important issues

Restructuring Work
A very important
operation is
Restructuring.

It is needed to keep the
tree a SBB(k)-tree.
Restructuring is
performed by the
Balance operation.

Restructuring Work
=
ops.balance

insertion

2 k+2
2P

max ( ll ( P ) ,rl ( P ))

log ( P + 1)

2k 4

deletion

3 2 k+1 2k 7

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
Binding k to n and
seeing what happens

Improving height
log log ( n + 1)

log log ( 3n )

k

Recalling dynamic arrays,
we can create a range for k

At the begging, we proved the upper-bound. By
tuning k, we improve the upper-bound

h ( SBB(k)-tree )

k = O ( log log n )

O ( log n )

1+

1
k

1+

1
log log ( n + 1)

log ( n + 1)
log ( n + 1)

( )

O 2 k Restructuring
work

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
An efficient application

What’s this? Am I
seeing double ?!?

Keeping two SBB(k)-trees
synchronized
Ghosting one tree on
the other one
Hiding rebuilding
work

Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
the end
thank you
by

simone
tino

Más contenido relacionado

Último

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Último (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Binary Search Trees of Almost Optimal Height

  • 1. simone tino Algorithms & Complexity evaluation Discoverying Binary Search Trees of Almost Optimal Height @ Università di Catania #20/11/2012
  • 2. so... what’s this all about? Introducing SBB(k) trees Before getting to SBB(k) trees, we really have a long way to go... What about a shortcut? AVL-Tree (a,b)-Tree SBB(k) Tree Binary Search Tree B-Tree SBB Tree SBB-tree and SBB(k)-tree introduce the concept of “pseudo-node”! Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 3. some definitions... Matrioska-like definitions, let’s start from the most inner one... Optimally balanced The difference between its maximum and minimum heights <= 1 Introducing important concepts: Pseudo-Node Minimum height Maximum height Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 4. Let’s open the box and see what’s inside... Defining SBB(k)-trees SBB(k)-tree is a binary-tree which satisfies the following 3 criteria... The Pseudo-Root is optimally balanced and has a maximum height <= (k+1). All other Pseudo-Nodes have a minimum height >= (k) and a maximum height <= (k+1). The number of Pseudo-Nodes on the path from the root to a leaf is the same for all leaves. Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 5. 47 The importance of k Let’s draw some trees... 35 64 19 9 50 40 28 38 44 48 69 52 66 77 47 35 64 40 k -> k++ 19 9 38 28 44 50 48 69 52 66 77 What happens when k increases? Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 6. Caging SBB(k)-trees? Height upper-bound START h ( ab-tree ) 1+ log a h ( SBB(k)-tree ) n +1 2 = 1+ log ( n + 1) 1 log ( 2 k ) log ( n + 1) + h ( ab-tree ) log ( n + 1) + 1+ 1+ 1 k log ( n + 1) 1 log ( 2 k ) log ( n + 1) + 1 1 k h ( SBB(k)-tree ) 1 1+ k log ( n + 1) Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 7. Maintenance algorithms ops.balance ops.coBalance Merging, cutting, rotating... the bricks of SBB(k)-trees ops.split ops.join Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 8. Update algorithms ops.insertion Inserting a node in the tree. Analyzing algorithms for insertion and deletion in SBB(k)-trees int ops.insertion(pn P, int c) { return (c==0) ? ops.balance(P,null) : /*(c==1)*/ ops.split(P,null); } ops.deletion Deleting a node in the tree. int ops.deletion(pn P, pn S, int c) { return (c==0x00) ? ops.balance(P,S) : ops.rotation() + (c==0x10) ? ops.coBalance(P,S) : /*(c==0x11)*/ ops.join(P,S); } Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 9. Inspecting ops.balance and most important issues Restructuring Work A very important operation is Restructuring. It is needed to keep the tree a SBB(k)-tree. Restructuring is performed by the Balance operation. Restructuring Work = ops.balance insertion 2 k+2 2P max ( ll ( P ) ,rl ( P )) log ( P + 1) 2k 4 deletion 3 2 k+1 2k 7 Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 10. Binding k to n and seeing what happens Improving height log log ( n + 1) log log ( 3n ) k Recalling dynamic arrays, we can create a range for k At the begging, we proved the upper-bound. By tuning k, we improve the upper-bound h ( SBB(k)-tree ) k = O ( log log n ) O ( log n ) 1+ 1 k 1+ 1 log log ( n + 1) log ( n + 1) log ( n + 1) ( ) O 2 k Restructuring work Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità
  • 11. An efficient application What’s this? Am I seeing double ?!? Keeping two SBB(k)-trees synchronized Ghosting one tree on the other one Hiding rebuilding work Presentation by Simone Tino - All rights reserved. Authored from October 2012 to November 2012 - University of Catania - Faculty of Computer Science - Algoritmi e Complessità