Sorting and searching in the presence of memory faults (without redundancy) Irene Finocchi Giuseppe F. Italiano DISP, University of Rome “Tor Vergata”

Slides:



Advertisements
Similar presentations
The Future (and Past) of Quantum Lower Bounds by Polynomials Scott Aaronson UC Berkeley.
Advertisements

QMA/qpoly PSPACE/poly: De-Merlinizing Quantum Protocols Scott Aaronson University of Waterloo.
Algorithms Algorithm: what is it ?. Algorithms Algorithm: what is it ? Some representative problems : - Interval Scheduling.
Problems and Their Classes
Sorting Really Big Files Sorting Part 3. Using K Temporary Files Given  N records in file F  M records will fit into internal memory  Use K temp files,
Analysis of Algorithms
Lower bound: Decision tree and adversary argument
Lecture 12: Lower bounds By "lower bounds" here we mean a lower bound on the complexity of a problem, not an algorithm. Basically we need to prove that.
Quick Sort, Shell Sort, Counting Sort, Radix Sort AND Bucket Sort
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Using Divide and Conquer for Sorting
Theoretical Program Checking Greg Bronevetsky. Background The field of Program Checking is about 13 years old. Pioneered by Manuel Blum, Hal Wasserman,
Computer Science Day 2008 Algorithms and Data Structures for Faulty Memory Gerth Stølting Brodal Department of Computer Science, University of Aarhus,
I/O-Algorithms Lars Arge Spring 2009 February 2, 2009.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
I/O-Algorithms Lars Arge University of Aarhus February 13, 2005.
1 Fault-Tolerant Consensus. 2 Failures in Distributed Systems Link failure: A link fails and remains inactive; the network may get partitioned Crash:
I/O-Algorithms Lars Arge Aarhus University February 6, 2007.
This material in not in your text (except as exercises) Sequence Comparisons –Problems in molecular biology involve finding the minimum number of edit.
Comparison Based Dictionaries: Fault Tolerance versus I/O Efficiency Gerth Stølting Brodal Allan Grønlund Jørgensen Thomas Mølhave University of Aarhus.
Computing Sketches of Matrices Efficiently & (Privacy Preserving) Data Mining Petros Drineas Rensselaer Polytechnic Institute (joint.
Locally Decodable Codes Uri Nadav. Contents What is Locally Decodable Code (LDC) ? Constructions Lower Bounds Reduction from Private Information Retrieval.
Preference Analysis Joachim Giesen and Eva Schuberth May 24, 2006.
Chapter 11: Limitations of Algorithmic Power
CSC 2300 Data Structures & Algorithms March 20, 2007 Chapter 7. Sorting.
Quantum Algorithms II Andrew C. Yao Tsinghua University & Chinese U. of Hong Kong.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
HOW TO SOLVE IT? Algorithms. An Algorithm An algorithm is any well-defined (computational) procedure that takes some value, or set of values, as input.
Program Performance & Asymptotic Notations CSE, POSTECH.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Bold Stroke January 13, 2003 Advanced Algorithms CS 539/441 OR In Search Of Efficient General Solutions Joe Hoffert
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
1.2. Comparing Algorithms. Learning outcomes Understand that algorithms can be compared by expressing their complexity as a function relative to the size.
Tight Bounds for Graph Problems in Insertion Streams Xiaoming Sun and David P. Woodruff Chinese Academy of Sciences and IBM Research-Almaden.
Lecture 2 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
The Lower Bounds of Problems
Analysis of algorithms Analysis of algorithms is the branch of computer science that studies the performance of algorithms, especially their run time.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
TECH Computer Science Problem: Selection Design and Analysis: Adversary Arguments The selection problem >  Finding max and min Designing against an adversary.
CPSC 404, Laks V.S. Lakshmanan1 External Sorting Chapter 13: Ramakrishnan & Gherke and Chapter 2.3: Garcia-Molina et al.
3.3 Complexity of Algorithms
Sorting: Implementation Fundamental Data Structures and Algorithms Klaus Sutner February 24, 2004.
The Cost of Fault Tolerance in Multi-Party Communication Complexity Binbin Chen Advanced Digital Sciences Center Haifeng Yu National University of Singapore.
Sorting.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 1. Complexity Bounds.
1 CSC 421: Algorithm Design & Analysis Spring 2014 Complexity & lower bounds  brute force  decision trees  adversary arguments  problem reduction.
E.G.M. PetrakisAlgorithm Analysis1  Algorithms that are equally correct can vary in their utilization of computational resources  time and memory  a.
1. Searching The basic characteristics of any searching algorithm is that searching should be efficient, it should have less number of computations involved.
1 Ch. 2: Getting Started. 2 About this lecture Study a few simple algorithms for sorting – Insertion Sort – Selection Sort (Exercise) – Merge Sort Show.
Lecture 2 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
CSE 326: Data Structures Lecture 23 Spring Quarter 2001 Sorting, Part 1 David Kaplan
1 Fault-Tolerant Consensus. 2 Communication Model Complete graph Synchronous, network.
Algorithmics - Lecture 41 LECTURE 4: Analysis of Algorithms Efficiency (I)
Sorting Lower Bounds n Beating Them. Recap Divide and Conquer –Know how to break a problem into smaller problems, such that –Given a solution to the smaller.
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Algorithm efficiency Prudence Wong.
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Algorithm efficiency Prudence Wong
Lecture 2 Algorithm Analysis
Sorting Algorithms Sections 7.1 to 7.4.
8.1 Determine whether the following statements are correct or not
Better Algorithms for Better Computers
COMP108 Algorithmic Foundations Algorithm efficiency
Improved Randomized Algorithms for Path Problems in Graphs
Sorting by Tammy Bailey
Lower Bound Theory.
The Complexity of Algorithms and the Lower Bounds of Problems
Analysis and design of algorithm
Chapter 11 Limitations of Algorithm Power
Presentation transcript:

Sorting and searching in the presence of memory faults (without redundancy) Irene Finocchi Giuseppe F. Italiano DISP, University of Rome “Tor Vergata”

The problem Large, inexpensive and error-prone memories Classical algorithms may not be correct in the presence of (even very few) memory faults A B Out An example: merging two ordered lists  (n)  (n 2 ) inversions

Faulty- memory model Memory fault = the correct value stored in a memory location gets altered (destructive faults) Fault appearance At any time At any memory location Simultaneously Faulty Random Access Machine: –O(1) words of reliable memory –Corrupted values indistinguishable from correct ones Fault-tolerant algorithms = able to get a correct output (at least) on the set of uncorrupted values

Related work LiesTransient failures Algorithms can exploit query replication strategies The liar model: comparison questions answered by a possibly lying adversary [Ulam 77, Renyi 76] At most k lies Linearly bounded model   (n log n + k n) [Lakshmanan et al., IEEE TOC 91] O(n log n) for k = O (log n / log log n) [Ravikumar, COCOON 02]   (n log (n/q)), correct with probability  (1-q) [Feige et al., SICOMP 94] Exponential lower bound [Borgstrom & Kosaraju, STOC 93] Probabilistic model

Why not data replication? Data replication can be quite inefficient in certain highly dynamic scenarios, especially if objects to be replicated are large and complex What can we do without data replication? Q1. Can we sort the correct values in the presence of, e.g., polynomially many memory faults? Q2. How many faults can we tolerate in the worst case if we wish to maintain optimal time and space? E.g., with respect to sorting:

A fault tolerant algorithm We show an algorithm resilient up to O ( (n log n) 1/3 ) memory faults Based on mergesort Main difficulty: merging step Can we sort (at least) the correct values on O(n log n) time and optimal space in the presence of, e.g., polynomially many memory faults? Q1.

A hierarchy of disorder k-unordered faithfully ordered ordered k-weakly fault tolerant strongly fault tolerant faithfully ordered = ordered except for the corrupted keys k-unordered = ordered except for k (correct or corrupted) keys 3-unordered

Solving a relaxation solve the k-weakly FT merging problem (for k not too large) and use it to reconstruct a faithful order Idea of our merging algorithm: k-unordered faithfully ordered ordered

The merging algorithm: a big picture AB k-weaklyFT-merge C E naïf-mergesort stronglyFT-merge F purify SD Slow, but D is short... Slow in general, fast on unbalanced sequences Faithfully ordered, long Disordered, short Very fast Faithfully ordered, short Faithfully ordered k-unordered, but k is not so large Very fast

The merging algorithm: a big picture AB k-weaklyFT-merge C E naïf-mergesort stronglyFT-merge F purify SD O(    )-unordered,  ≤  O(n) O(n+     ) Faithfully ordered, long |D| = O(    ) O (n+     ) Faithfully ordered, short Faithfully ordered O ()O ()  Running time O (n+   )  Strongly fault tolerant

Summing up We obtain an O(n log n) strongly fault tolerant sorting algorithm that is resilient up to O(n log n) 1/3 memory faults and uses O(n) space By plugging in the merging algorithm into mergesort, we can sort in time O (n log n+    ) and thus:

A (polynomial) lower bound No more than O ( (n log n) 1/2 ) To prove this, we first prove a lower bound on fault tolerant merging: If  n 2/(3-2 , for some   [0,1/2], then  (n+  2-  ) comparisons are necessary for merging two faithfully ordered n-length lists We use an adversary based argument How many faults can we tolerate in the worst case maintaining space and running time optimal? Q2.

Adversary-based argument: big picture If Paul asks less than  2-  /2 questions, than he cannot determine the correct faithful order univocally Carole’s power: doesn’t need to choose the sequences in advance, can play with memory faults Carole’s limits: if challenged at any time, she must exhibit two input sequences and at most  memory faults that prove that her answers were consistent with the memory image Paul (the merging algorithm) asks comparison questions of the form “x<y?” Carole (the adversary) must answer consistently Delphi’s Oracle

Carole’s strategy A and B: n-length faithfully ordered sequences A B A1A1 A2A2 A  1 AA... B1B1 B2B2 B  1 BB... n/  Carole answers as if the sorted sequence were: A 1 B 1 A 2 B 2 … B  -1 A  B 

Sparse sets If  n 2/(3-2 , for some   [0,1/2], and Paul asks less than  2-  /2 questions, then  sparse set S containing two elements a  A i  S and b  B j  S that have not been directly compared by Paul We prove that both the order a < b and the order b < a can be consistent with Carole’s answers A set S of consecutive subsequences is sparse if the number of comparisons between elements in S is at most  /2 A 1 B 1 A 2 B 2 A 3 B 3 … B  -1 A  B  S

Paul’s dilemma: a < b or b < a ? For each such question asked by Paul, Carole asserts that she answered after corrupting x (if x ≠ a,b) and y (if y ≠ a,b) How many memory faults introduced by Carole? –1 or 2 faults only if x and y are both in S –S sparse (at most  /2 comparisons) at most  /2) =  faults All possibly useful elements are corrupted! a and b not directly compared: but why Paul can’t deduce their order by transitivity? “x<y?” is a possibly “useful” comparison if both x and y  S a x b y ≤ ≤ ≤ x y

Implications If  n 2/(3-2 , for some   [0,1/2], then Paul must ask at least  2-  /2 questions to merge A and B  (n+  2-  ) comparisons for merging  (n log n+  2-  ) comparisons for sorting If  n 2/(3-2  ?

n 0  What if  is large? If  n 2/(3-2 ,  (n log n+  2-  ) comparisons for sorting (n log n) 1/2 n 2/3  (n log n+  2 ) (n log n) 2/3 n  (n log n+  3/2 ) An O(n log n) strongly fault tolerant sorting algorithm cannot be resilient to  (n log n) 1/2  memory faults (n log n) 6/11 n 3/4  (n log n+  11/6 )

Open questions Can randomization help (e.g., to tolerate more than (n log n) 1/2 memory faults) ? Closing the gap: –our algorithm is resilient to O(n log n) 1/3 memory faults –no optimal algorithm can be resilient to  (n log n) 1/2  memory faults External fault-tolerant sorting