Workshop on the Art of Data Structures 2017 17 November, Patras,

A Glimpse at Athanasios Tsakalidis Elementary data structures and applications

by Assoc. prof. Christos Makris

Root & Route • Katerini (1950 – 1968) – Born on 1950 – Childhood, primary & secondary education • Thessaloniki (1968 – 1973) – Undergrad studies and took his Diploma of Mathematics, Aristotle University • Military service (1974-1976) • Saarbrucken, MA (1976 – 1983) – Postgrad studies at University of Saarland . – Master 1981 (Sorting presorted files) – PhD 1982 (Some Results for the Dictionary Problem) Patras 16.09.2015 2 Academic Career Date Position 1983 (Jan) Participating in Projects of DFG (Deutsche Forschungs Gemeinschaft) and teaching the courses: Data Structures, Graph Algorithms, , • AcA Praxis of programming, in the University of Saarbrucken. 1985 (Sep) Assistant Professor in the Department of Computer Engineering and of . 1988 (summer) Associate Professor in the Department of Computer Engineering and Informatics of University of Patras. 1989-1993 and Vice-Chairman of the department 2007-2009 1992 – 2017 Full Professor at Univ. of Patras 1996 – today R&D-Coordinator of the Research Academic Computer Technology Institute (Patras, Greece) (http://www.cti.gr) 1993-1997, 2001-2005 Chairman, in the Department of Computer Engineering and 2009 – 2013 and Informatics of University of Patras Scientific Career

1999-2002: Member of the Hellenic Supreme Council for Selection of Personnel (Evaluation Committee for specialties related to ). 1999-2000: Chairman of the Committee enacted by the Hellenic Ministry of the Interior, Public Administration and Decentralization for the Delivery of External Comptrollers Project on the Problem of the year 2000. 2000-2002: Member of the Group of Direct Interference of the Hellenic Republic Ministry of the Interior Public Administration and Decentralization. 2000-2002: Member of the Introductory Committee for the Strategic Design of the Informatics in the Health & Provision. 2001-2004: Member of the Strategic Committee for the Informatics in the Education. 2001-2004: Member of the Committee for the Digital Hellenic Cultural Reserve. 2005-today: Member of the Hellenic Supreme Council for Selection of Personnel (Evaluation Committee for specialties related to Computer Science). December 05- today: Record to the online encyclopedia “WikiPedia – the free Enclyclopedia”, under the category Greek Computer Scientists and the catefory Greek Academics (http://en.wikipedia.org/wiki/Athanasios_Tsakalidis) Research Areas Algorithms & Internet & Multimedia Complexity Applications

• Data Structures • Web Engineering • Graph Algorithms • Internet – Intranet Applications • Computational Geometry • Electronic Commerce • Expert Systems • Tele-cooperation • GIS • Distance Learning • Medical Informatics • Tele-medicine • • Electronic Business • Multimedia • Multimedia • Information Retrieval • Data Compression Techniques • • Digital Image and Video Processing • Video on Demand • Educational Software

Patras 16.09.2015 5 Key Features

• Identify core problems in elementary data structures Visionary • Explore and combine efficiently techniques & methodologies

• Mentoring students • Huge time investment at Inspiring training young scientists

Patras 16.09.2015 6 Numbers Publications 480+ Citations 2978+ Books 5 (google scholar) Chapters in books/volumes 26 h-index 27 Journals 112 i10-index 81 Conferences 250 Archived repositories 23 Editor in Journals 1

Diploma theses 599 Masters theses 87 PhDs awarded 29 (12 elected professors)

Recommendation letters 2222 (300 of them now university professors)

Patras 16.09.2015 7 Achievements (1) https://en.wikipedia.org/wiki/Athanasios_Tsakalidis • He is one of the 48 writers (6 of whom have received the ACM Turing Award) of the ground- laying computer science book, Handbook of Theoretical Computer Science, 1990, Vol A Elsevier Science publishers, co-published by MIT Press, his work being, along with professor , in Chapter 6: Data Structures (his favourite field).

Achievements (2) https://en.wikipedia.org/wiki/Athanasios_Tsakalidis • His results on the list manipulation and localized search problems in the 1980s led to the foundation of the persistence theory on data structures, developed by Prof. Robert E. Tarjan. • Other significant results on the design and analysis of data structures were contributed on the problems of interpolation search, nearest common ancestor and negative cycle

Achievements (3) https://en.wikipedia.org/wiki/Athanasios_Tsakalidis • He is cited and acknowledged by prominent computer scientists like Robert E. Tarjan, Ian J. Munro, Dan Willard, Jon Bentley, Jan van Leeuwen, Timothy M. Chan, Lars Arge, Mihai Patrascu, Erik Demaine, Mikkel Thorup, Prosenjit Bose, Gerth S. Brodal, Haim Kaplan, Peter Widmayer, Giuseppe F. Italiano, Peyman Afshani, Kasper Larsen and more. Research Highlights (influential)

 Athanasios K. Tsakalidis, Maintaining order in a generalized linked list. Acta Inf. 21: 101-112 (1984)

 Athanasios K. Tsakalidis, AVL-Trees for Localized Search. Information and Control 67(1-3): 173-194 (1985)

 Athanasios K. Tsakalidis, The Nearest Common Ancestor in a Dynamic Tree. Acta Inf. 25(1): 37-54 (1988)

 Kurt Mehlhorn, Athanasios K. Tsakalidis: Dynamic Interpolation Search. J. ACM 40(3): 621-634 (1993)

Patras 16.09.2015 11 Maintaining order in a generalized linked list.

Result: the proposed structure performs n insertions and deletions in O(n log n) steps and determines the order of two query elements in constant time, assuming that the locations of the queried elements at are given.

Used in, implied:  James R. Driscoll, Neil Sarnak, Daniel Dominic Sleator, Robert Endre Tarjan: Making Data Structures Persistent. J. Comput. Syst. Sci. 38(1): 86-124 (1989)  Stephen Alstrup , Theis Rauhe, Improved labeling scheme for ancestor queries, Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, p.947-953, January 06-08, 2002, San Francisco, California  Gerth Stølting Brodal , Konstantinos Tsakalidis , Spyros Sioutas , Kostas Tsichlas, Fully persistent B-trees, Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, p.602-614, January 17-19, 2012, Kyoto, Japan

AVL-Trees for Localized Search Result: a data structure based on AVL-trees which allows an insertion or a deletion of an element to be performed in time O(log d), where d is the distance of the position searched for from a finger which points to the end of the file. Moving a finger to a distance d costs O(log d).

Used in, implied:  James R. Driscoll, Neil Sarnak, Daniel Dominic Sleator, Robert Endre Tarjan: Making Data Structures Persistent. J. Comput. Syst. Sci. 38(1): 86-124 (1989)  Haim Kaplan, Robert Endre Tarjan, Purely Functional Representations of Catenable Sorted Lists. STOC 1996: 202-211  Gerth Stølting Brodal: Finger Search Trees with Constant Insertion Time. SODA 1998: 540-549  Gerth Stølting Brodal, George Lagogiannis, Christos Makris, Athanasios K. Tsakalidis, Kostas Tsichlas: Optimal finger search trees in the pointer machine. J. Comput. Syst. Sci. 67(2): 381-418 (2003)

The nearest common ancestor in a dynamic tree Result: an implementation of a dynamic tree in a pointer machine is presented which needs linear space, performs m arbitrary insertions and deletions in the initially empty tree in time O(m) and a query about nca(x, y) can be answered on-line in time O(log(min{depth(x), depth(y))+α(k,k))}.

Used in, implied:  Stephen Alstrup , Jacob Holm, Improved Algorithms for Finding Level Ancestors in Dynamic Trees, Proceedings of the 27th International Colloquium on Automata, Languages and Programming, p.73-84, July 09-15, 2000  Stephen Alstrup, Mikkel Thorup, Optimal Pointer Algorithms for Finding Nearest Common Ancestors in Dynamic Trees. J. Algorithms 35(2): 169-188(2000)  Gerth Stølting Brodal, Christos Makris, Spyros Sioutas, Athanasios K. Tsakalidis, Kostas Tsichlas: Optimal Solutions for the Temporal Precedence Problem. Algorithmica 33(4): 494-510 (2002)

Dynamic Interpolation Search

Result: a data structure called Interpolation Search tree (IST) is presents which supports interpolation search and insertions and deletions. Amortized insertion and deletion cost is O(log n). The expected search time in a random file is O(log log n). This is not only true for the uniform distribution but for a wide class of probability distributions.

Used in, implied:  Alexis C. Kaporis, Christos Makris, Spyros Sioutas, Athanasios K. Tsakalidis, Kostas Tsichlas, Christos D. Zaroliagis: Improved Bounds for Finger Search on a RAM. Algorithmica 66(2): 249-286 (2013)  Alexis C. Kaporis, Christos Makris, George Mavritsakis, Spyros Sioutas, Athanasios K. Tsakalidis, Kostas Tsichlas, Christos D. Zaroliagis: ISB-Tree: A New Indexing Scheme with Efficient Expected Behaviour. ISAAC 2005: 318-327)  Alexis C. Kaporis, Christos Makris, Spyros Sioutas, Athanasios K. Tsakalidis, Kostas Tsichlas, Christos D. Zaroliagis: Dynamic Interpolation Search Revisited. ICALP (1) 2006: 382-394

Contents

• Optimal Search Trees with fingers in Pointer Machine • Temporal precedence query in PPM (Pure Pointer Machine Model) • Results in string algorithmics

Finger Search Trees

• ACM STOC 2002 • Journal of Computer and System Sciences, Special Issue devoted to STOC 2002 Finger Search Trees

Maintain a sequence of ordered elements supporting the following operations: Insert(f,x)

4 6 8 9 4 6 7 8 9

f x=7 Delete(f)

4 6 8 9 4 8 9

f Search(f,x)

4 6 8 9 11 13 14 16 17 19 x=14 f d=5 Applications

Optimal algorithms for: •Elementary operations of union, intersection, and difference in sets •Sorting Jordan sequences in linear time •Computational Geometry problems

.creation of visibility graph of a polygon .solving the three dimensional layers of maxima problem .improved methods for dynamic point location

A simple solution Level Linked (2,4)-trees

4 5 6 8 9 11 13 15 17 19 21 23 24 27 31 33 34 35 37 41 42 51 53

10 d=7 f x

Insert: O(logn) worst case, O(1) amortized Delete: O(logn) worst case, O(1) amortized Search: O(logd) worst case Known results

Insert Delete Search Search Trees Olog n Olog n Olog n Guibas et al. ’77 O(log d) O(log d) Olog d  O1 fixed fingers

* * Harel, Lueker ’79 Olog n Olog n Olog d  Kosaraju ’81 O(log d) O(log d) Olog d  O1 fixed fingers Huddleston, Mehlhorn ’82 O1 O1 Olog d  amortized updates Tsakalidis ’85 Olog d  Olog d  Olog d  O1 fixed fingers O1 O1 Olog n Levcopoulos, Overmars ’88 O1 O1 Olog d  RAM Dietz, Raman ’94 O1 O1 Olog n Fleischer ’96 * O1 Olog n Olog d  Brodal ’98

Anderson,Thorup 2000 O( log d / log log d )  RAM O(1) O(1) Olog d  Brodal et al. 2002 O(1) O(1) Olog log d  RAM Kaporis et al. 2003 O(1) O(1)

The structure of Brodal  Brodal’s structure (1998) O(1) insertion Ο(log*n) deletion

 Basic idea

Counter 1001000 i i+1 i+1

Insertion Rebuilding at Location level 4 Basic problem

When will we check the node where j points; i j k

There is no continuation Deletion in the pointer values Finger search trees in Pointer Machine

Insertion Ο(1) Deletion Ο(1) Search Ο(logd) Worst case time Pointer machine model

•Nodes of varying outdegrees •Usage of Node Components •Multiple split and fusion of nodes •Incremental preprocessing Varying degree nodes

. . .

h ......

......

... e Search(f,x)

2 1

0 ......

f h1 x d  i1ai 

•Nodes of height i have degrees [ai : bi] •The children of every node are stored in search trees Node Components) Κόμβων

4 5 6 8 9 11 13 15 17 19 21 23 24 27 31 33 34 35 37 41 42 51 53

•Mechanism for locating the rebuilding place •Component = node partitioning to subtrees

r Link(v) Break(r) Link(v)

v Update operations

Insert(p,e) Delete(p) r=component root r=component root create-leaf(p,e) remove-leaf(p,e) break(r) break(r) rebalance(r) rebalance(r)

r r

break(r) rebalance(r)

p Incremental (Pre)processing

New/old node

group New/old node block

•Blocks (pairs)

•Nodes (pairs) •Splitting Groups •Fusion Groups (pairs) •Fusion/splitting group records Open problems

•Simpler construction; •Immediate solution with (a,b)-tree; •Components useful for other problems;

Search time improvement(?)

• Usage of stronger computational model (RAM, Cell Probe Model) and structures that use the element representation • Special, but quite general, input distributions (e.g. Interpolation Search Tree) • Use of randomization (e.g. Randomized Search Trees)

Handling temporal precedence queries in PPM (Pure Pointer Machine Model)

Handling a set of elements in order to support two basic operations: • Insert(a): insertion of a new element α • Precedes(a,b): check if element α was inserted before or after b

• Algorithmica 2002, Importance

• Theoretical value (evaluating the Pure Pointer Machine Model) • Application to parallel implementation of Logic Programming Languages Pure Pointer Machine

• Finite but extended collection R of records (total memory) • Finite collection of registers • The instruction set contains basic operations of data transfer to/from memory and registers, it is not allowed to have arithmetic operations (the classical Pointer Machine allows).

Known results • The problem is related to order maintenance in a dynamic list studied by Tsakalidis and Dietz and Sleator • Best previous solution from D. Ranjan et al. 1999

Solutions Query time Insertion time Space

Ranjan et O(loglogn) O(loglogn) O(nloglogn) al. 1999

Brodal et O(loglogd) O(1) O(n) al. 2002

Previous Solution (BDT)

i1 i1 d(i)  22 t(i)  22 d(0)  2 t(0)  1 h  (log log n)

1 2 31 32 33 34 39

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 24

25 26

27 28 29 30

31 31 32 33 34 35 36 37 38 39 32 33

34 1st Solution (Hybrid structure using Buckets)

Space=O(n), Query time=Ο(loglogn), Insertion=Ο(1)

Hybrid structure 2 Level

• 1ο level: Ordered collection of buckets of size O(loglogn), with every bucket having a representative

• 2ο level: BDT for representatives. We insert in O(loglog(n/loglogn))=O(loglogn) levels of BDT the O(n/loglogn) representative of buckets. Hence O(n) space complexity.

1st Solution (Hybrid structure using Buckets)

Global rebuilding technique (M. Overmars and Jan van Leeuwen) • When #(inserted elements)= f(i-1)(n) (the composition of the function f i-1 times)  bucket size s(f(i)(n))=s(n)+i • We use a counter and when counter=f(i)(n) we increase by 1 the bucket size, from s(n)+(i-1) to s(n)+i

1η Solution (Hybrid structure using Buckets)

• We choose as f(n)= n2 and s(n)= loglogn. • The sequence of critical points becomes n+n/2, n2+n2/2, n4+n4/2,…. and the rebulding points n, n2, n4,…e.t.c. • Hence, the bucket size becomes O(loglogn).

1η Solution (Hybrid structure using Buckets)

How will we compute f(i)(n)?

• In PPM we cannot compute immediately the value f(i)(n) (in O(1) time). • We can spread the computation of n2 in the time period between n and n2 • The other reconstruction points n4, n8,.. ,etc. Are computed in the same way. 1η Solution (Hybrid structure using Buckets

Example: simulation of the computation of n2

1-st turn 2-nd turn

counter1 counter1

1 2 3 n 1 2 3 n

counter2 counter2

n-th turn

counter1 . e.t.c. . 1 2 3 n

counter2 2nd Solution

Space=O(n), Query time=Ο(loglogn), Insertion=Ο(1)

• The nesting levels are removed and the data structure consists only of a balanced distribution tree, where the nodes representing the elements stored in the leaves of the structure and the internal nodes are merely subsidiary in the search process. • No bucketing, no global rebuilding.

• Intuition: A nesting level is identical to a subtree rooted at the root of the balanced distribution tree at the outermost level. Thus, one would wonder why not use the existing structure instead of constructing a nesting level 2nd Solution

• In the new structure every node has the following fields:

•a pointer to the “father” node,

•a pointer to the right sibling,

•A pointer (Prep) to the representative of this node in the above level (if node v is at level D we maintain a pointer at an appropriate node at level D-1). This pointer simulates the nesting levels. 2nd Solution

level 0 prep

level 1 pD-1

level 2 pD

1 2 3 4 5 6 7 8 9 level 3

p 1 2 3 4 5 6 7 8 9 rep level 4 (a)

level 0 prep

level 1 pD-1 prep level 2 pD Insert 1 2 3 4 5 6 7 8 9 10 level 3

prep

prep 1 2 3 4 5 6 7 8 9 10 level 4 Insert (b) 3rd Solution (optimal)

Space=O(n) Query time=Ο(loglogd) Insertion time=Ο(1) • A 2-level data structure where the first level consists of an exponential tree. Where the nodes at height i+1 have squared out degree in relation to nodes at level i. • The internal nodes of this tree are structured with one of the data structures described before (with O(n) space and O(1) w.c update time). • All elements are stored in the leaves of the exponential tree and the internal nodes are used only as subsidiary nodes in the execution of the precedes operation. • We also insert level links. 3rd Solution

Precedes(α,b):

i. Go up the tree alternately for each node until either the nodes currently traversed are adjacent or until two nodes belonging to the same group of nodes with common father are reached. In the latter case follow step (ii). ii. Use the auxiliary structure of node v and do the same as step (i) Open problems

 Supporting other operations (e.g. deletion)  Studying the Model to other problems  General consideration of the power of the two models. Results in string algorithmics

Nordic Journal of Computing 2002

Fundamenta Informaticae, 2006

Presentation of results Other Main Achievements

• R&D-Coordinator of the Research Academic Computer Technology Institute (Patras, Greece) • 1996 – today Major self-funded R&D Institute in Greece – Employs > 300: senior & junior researchers, post-docs, pre-docs, engineers, supporting IT & admin staff – Last 5 years: > 130 R&D projects (95+ EU-funded) – Substantial basic & applied research • Algorithms, complexity & optimization, wired/wireless/sensor networks, computer and network security, ubiquitous and distributed computing, e-learning & digital content, complex information systems, production systems, embedded systems, integration and sustainable development • Member of the Permanent Committee for Computer Science and Education of the Hellenic Ministry of Education and Religious Affairs.

48 FOUNDER OF THE MMLAB

• The Graphics, Multimedia and GIS Laboratory (MMLAB) was established in 1994.

• The educational and research activities of the laboratory is being undertaken within the framework of the Department's Computer Software Division.

• Conducts educational & research work.

• http://mmlab.ceid.upatras.gr/

14/11/2017 INSTITUTION AND COMPETENCES

MMLAB:

• has leaded and participated in several research or development projects and over the years has gained several affiliations in academia, organizations in Greece and especially in West Greece Region and industry.

• has implemented from 1994 more than 70 European/National projects (7.200.000 €).

• The last 4 years the budget of the projects was about 1.060.000 €.

14/11/2017 INSTITUTION AND COMPETENCES

• The laboratory has very close cooperation with local stakeholders: – Local Municipalities – Western Greece Region Authority – Prefecture of Achaia – Achaia Chamber of Commerce – Industrial Association of Peloponnesus and Western Greece – Patras Port Authority – Prefecture of Corfu – Research Academic Computer Technology Institute – Patras Naval Agent Union etc.

14/11/2017 RESEARCH AREAS

• Computer Science • Multimedia

▫ Data Structures ▫ Data Compression Techniques ▫ Efficient Algorithms ▫ Computational Geometry ▫ Digital Image and Video Processing ▫ Models and Analysis of Computer ▫ Video on Demand Systems ▫ Educational Software ▫ Distributed Systems’ Performance

▫ Advanced Data Structures & Graphics ▫ Computer Programming • GIS ▫ Artificial Intelligence and Intelligent Systems ▫ Routing Algorithms ▫ Information Retrieval ▫ Spatial Data Models

• Internet & Web ▫ Decision Support Systems

▫ Web Engineering • Bioinformatics ▫ Semantic Web ▫ Web Services ▫ Internet – Intranet Applications ▫ P2P Techniques & Systems ▫ Electronic Commerce ▫ CSCW ▫ Distance Learning 14/11/2017▫

INDICATIVE PROJECTS

“Sophia: Pilot Project of Collaborative Applications' Development for the Organizing Committee of the Olympic Games - ATHENS 2004 S.A.”, funded by the Organizing Committee of the Olympic Games - ATHENS 2004 S.A. (2002-2004)

“Development of the Integrated Billing and Monitoring System of Telepassport S.A. and Telepassport Cyprus Ltd”, funded by TELEPASSPORT S.A. and TELEPASSPORT Cyprus Ltd. (2004-2007)

“AMILLA - Digital Exhibition of the History of the Olympic Games”, funded by the Ministry of Culture (2007-2009).

“MENUET (Mobile E-Novative Use of E-Learning Techologies)”, programme LEONARDO DA VINCI-Transfer of Innovation, funded by the EU.

• “The Genetic Architecture of Type 2 Diabetes Mellitus (T2DM) in the Greek Population“, THALIS National Programme. (2012-today).

• “DLA - Digital Local Agenda”, INTERREG IVC (2011-2013).

14/11/2017 Web Site

14/11/2017 Personality Personal

• Married to Dr. Aglaia Liopa – Two sons (Kostas & Dimitris); – Kostas in NYU/Courant, Dimitris in Hong Kong University of Science and Technology Personality

• Open-minded • Lover of Art • Warm & generous • Cultured & optimistic • Extremely good sense of humor

Patras 16.09.2015 55 Passionate artist

• 62 poems (22 are to be published), 62 songs, • 550 paintings (222 for women), • 3 theatrical plays, 1 nouvel) Great Artist – Moments of life

• Moments of life Epilogue Athanasios Tsakalidis • talented, influential, visionary scientist & researcher with a passion to art and science • Gifted teacher Ex-PhDs • Privileged to have him as a mentor and teacher

Speaker is indebted to: • Professor Christos Zaroliagis, Panagiotis Skondras and Manolis Viennas.

Patras 16.09.2015 58