SlideShare a Scribd company logo
Ultra-efficient algorithms for testing
well-parenthesised expressions
Tatiana Starikovskaya (ENS Paris)
Joint work with Eldar Fisher (Technion) and Frédéric Magniez (Paris-Diderot)
WiMLDS Paris, November 24, 2017
Pattern matching: you use it every time you search for something
More general: algorithms on strings (= sequences of characters)
My research area
My research area
Applications
• Bioinformatics
• Information Retrieval
• …
Classical approaches
• We can read the whole input
• We can afford to store linear-space
data structures
In the Big Data world, we must do better!
My research area
Streaming algorithms
We receive the input as a stream, and must
process it on-the-fly, without storing it
Property testing algorithms
We must decide if the input has a property P,
but we can read only a small part of the input
?
?
?
We need efficient algorithms for string processing!
Property testers
Wait a second! How can we make the
decision not reading the whole input?
Well, in general, we cannot…
For example, we cannot say if the input is
well-parenthesised by reading just a small
fraction of it
?
?
?
Task: We must decide if the input has a property
P, but we can read only a small part of the input
Objective: Save time
()(()())()
()(()()(()
queried parentheses
are identical
? ? ?
? ? ?
Property testers
We must
1. accept, if the input has the property P
2. reject, if the input is far from having the
property
3. accept or reject otherwise
Far = we must fix at least εn characters of the
input so that the property is satisfied
The output must be correct probability at least 2/3
?
?
?
Task: We must decide if the input has a property
P, but we can read only a small part of the input
Objective: Save time
()(()())()
()(()()(((
()(()()(()
ε = 0.2, n = 10, εn = 2
?
Well-parenthesised expressions
Dm = well-balanced strings on parentheses of m types
Task: develop a property tester that decides whether
the input is in Dm
()([]())[]([]) ()(([][)()((([]
1. It accepts all inputs that are in Dm with
probability at least 2/3
2. It rejects all inputs that are ε-far from Dm
with probability at least 2/3
Time = number of read characters!
Simplicity: simplest context-free language
Universality: any context-free language can be expressed
through it (Chomsky-Schützenberger theorem)
Practicality: processing of semi-structured documents
• Visibly pushdown languages
• Nested strings
Why is it interesting?
Dm = well-balanced strings on parentheses of m types
What do we know
()(()())()
()(()()(((
()([]())([])
()(([)()(([]
const.m =1 Alon et al.’01
m ≥ 2
Parnas et al.’03c n1/11 < T < C n2/3
c n1/5 < T < C n2/5+δ
NEW!
Dm = well-balanced strings on parentheses of m types
New tester for Dm-membership
Dm = well-balanced strings on parentheses of m types
Hmmm… does not look like a simple property to test!
Let’s start with a property tester for strawberries
()({()})([]){((([]())([])([{}]())}([])))
red
sweet
yellow seeds
simple
properties,
easy to test!
?
New tester for Dm-membership
Dm = well-balanced strings on parentheses of m types
If we replace all opening parentheses with (, and all closing
parentheses with ), the resulting string must be in D1
And we know how to test in O(1) time [Alon et al.’01]!
Not sufficient: becomes
()({()})([]){((([]())([])([{}]()))([]))}
()((()))(())((((()())(())((())()))(())))
()({{)}) ()((()))
New tester for Dm-membership
Dm = well-balanced strings on parentheses of m types
Each block is Dm-consistent = is a substring of a string in Dm
We test that the blocks are Dm-consistent by running our
Dm-test in a recursive fashion
()({()})([ ]){((([]() )([])([{}] ()))([]))}
()({()})([ ]){((([]() )([])([{}] ()))([]))}
b = n4/5 b = n4/5 b = n4/5 b = n4/5
New tester for Dm-membership
Dm = well-balanced strings on parentheses of m types
We have checked that the string is good locally, but can we
guarantee that it is good globally?
()({()})([ ]){((([]() )([])([{}] ()))([]))}
()({()})([ ]){((([]() )([])([{}] ()))([]))}
b = n4/5 b = n4/5 b = n4/5 b = n4/5
New tester for Dm-membership
Dm = well-balanced strings on parentheses of m types
Approximate matching graph: nodes = blocks, edge (B1,B2) =
many excess parentheses in block B1 must be matched with excess
parentheses in block B2
()({()})([ ]){((([]() )([])([{}] ()))([]))}
()({()})([ ]){((([]() )([])([{}] ()))([]))}
b = n4/5 b = n4/5 b = n4/5 b = n4/5
New tester for Dm-membership
Dm = well-balanced strings on parentheses of m types
()({()})([ ]){((([]() )([])([{}] ()))([]))}
()({()})([ ]){((([]() )([])([{}] ()))([]))}
1. Build an approximate matching graph
2. Run a recursive inter-block matching procedure
b = n4/5 b = n4/5 b = n4/5 b = n4/5
()({()})([ ]){((([]() )([])([{}] ())}([])))
1. Build an approximate matching graph
2. Run a recursive inter-block matching procedure
]){((([]() ))((((()() (())((((()()))))
S S w/o types D1
{e1(S) = 2
e0(S) = 4
e1(S) - excess closing parentheses
e0(S) - excess opening parentheses
T1, T2, …, Tn/b - blocks of the input
Parentheses in Ti that must be matched with parentheses in Tj
min(e0(Ti), e1(Ti+1Ti+2…Tj)) - e1(Ti+1Ti+2…Tj-1)
()({()})([ ]){((([]() )([])([{}] ())}([])))
1. Build an approximate matching graph
2. Run a recursive inter-block matching procedure
]){((([]() ))((((()() (())((((()()))))
S S w/o types D1
{e1(S) = 2
e0(S) = 4
Observation e1(S) = max{S’ - prefix of S} (n1(S’) - n0(S’))
n1(S’) = |closing parentheses in S’|
n0(S’) = |opening parentheses in S’|
Lemma By querying x2/Δ2 positions of a string S of length x,
we can compute a Δ-additive approximation of n1(S’) for any
substring S’ of S correctly w.h.p.
()({()})([ ]){((([]() )([])([{}] ())}([])))
1. Build an approximate matching graph
2. Run a recursive inter-block matching procedure
Lemma By querying x2/Δ2 positions of a string S of length x,
we can compute a Δ-additive approximation of n1(S’) for any
substring S’ of S correctly w.h.p.
Proof
Query x2/Δ2 positions of S uniformly at random
If |S’| ≤ Δ, output Δ
Otherwise, |S’| = yΔ, where y > 1
S’ contains ~yx/Δ of the queried positions
()({()})([ ]){((([]() )([])([{}] ())}([])))
1. Build an approximate matching graph
2. Run a recursive inter-block matching procedure
Lemma By querying x2/Δ2 positions of a string S of length x,
we can compute a Δ-additive approximation of n1(S’) for any
substring S’ of S correctly w.h.p.
Proof (cont.)
Xi = 1 iff the i-th queried position is a closing parenthesis
E[(Δ2/x) ⋅ Σ Xi] = (Δ2/x)⋅ n1(S’) (yx/Δ) / yΔ = n1(S’)
By additive Chernoff bound,
P[|(Δ2/x) ⋅ Σ Xi - n1(S’)| > Δ] < 2e-2
New tester for Dm-membership
1. Build an approximate matching graph
2. Run a recursive inter-block matching procedure
If we replace all opening parentheses with (, and all
closing parentheses with ), the resulting string ∈ D1
Test that the blocks are Dm-consistent by running
the test in a recursive fashion
Complexity: O(n2/5)
()({()})([ ]){((([]() )([])([{}] ())}([])))
()({()})([ ]){((([]() )([])([{}] ())}([])))
O(1)
O(√b)
b = n4/5
b = n4/5 b = n4/5 b = n4/5
O(n2/b2)
Take-home message
• Streaming or property testing settings
• We have new, ultra-efficient algorithms for string
processing
• It is enough to use a polylog space or to read a
constant number of data items in the input to solve
a problem with good guarantees
Questions? Comments?

More Related Content

PPTX
Theory of computation Lec1
PDF
Regular expression
PPT
Theory of computing
PPTX
theory of computation lecture 02
PPTX
Huffman analysis
PPTX
Regular Expression (Regex) Fundamentals
PDF
Flat unit 1
PPT
3.1 intro toautomatatheory h1
Theory of computation Lec1
Regular expression
Theory of computing
theory of computation lecture 02
Huffman analysis
Regular Expression (Regex) Fundamentals
Flat unit 1
3.1 intro toautomatatheory h1

What's hot (20)

PDF
Ch3 4 regular expression and grammar
PPT
Regular expressions
PPT
Regular Expressions
PPT
Theory of computing
PDF
Regular language and Regular expression
PPTX
Regular expression
PPTX
Theory of automata and formal language
PPT
Chapter Two(1)
PDF
Python strings
PPTX
Formal language
PPT
Chapter Three(2)
PDF
Theory of Computation Lecture Notes
ODP
Regex Presentation
PPTX
Regular Expression in Compiler design
PDF
2013 - Andrei Zmievski: Clínica Regex
PPTX
Regular expressions
PDF
FLAT Notes
PDF
Language Model (D3L1 Deep Learning for Speech and Language UPC 2017)
PPTX
Regular expression (compiler)
PDF
Lecture: Regular Expressions and Regular Languages
Ch3 4 regular expression and grammar
Regular expressions
Regular Expressions
Theory of computing
Regular language and Regular expression
Regular expression
Theory of automata and formal language
Chapter Two(1)
Python strings
Formal language
Chapter Three(2)
Theory of Computation Lecture Notes
Regex Presentation
Regular Expression in Compiler design
2013 - Andrei Zmievski: Clínica Regex
Regular expressions
FLAT Notes
Language Model (D3L1 Deep Learning for Speech and Language UPC 2017)
Regular expression (compiler)
Lecture: Regular Expressions and Regular Languages
Ad

Similar to Ultra-efficient algorithms for testing well-parenthesised expressions by Tatiana Starikovskaya (20)

PDF
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...
PDF
Finding similar items in high dimensional spaces locality sensitive hashing
PPT
Language Technology Enhanced Learning
PPTX
presentation on important DAG,TRIE,Hashing.pptx
PPTX
Programming data structure concept in array ppt
PDF
Common Intervals of Two Sequences 1st Edition by Gilles Didier 9783540200765
PDF
Declare Your Language: Name Resolution
PDF
Declare Your Language (at DLS)
PPTX
Space-efficient Feature Maps for String Alignment Kernels
PDF
Python lecture 05
PDF
Breaking the Softmax Bottleneck: a high-rank RNN Language Model
PPTX
php string part 4
KEY
Presentation R basic teaching module
PDF
Testing Forest-Isomorphism in the Adjacency List Model
PPT
Text classification using Text kernels
PPT
ECO_TEXT_CLUSTERING
PDF
Complier Design - Operations on Languages, RE, Finite Automata
PPT
Compiler design lessons notes from Semester
PPT
Stacksqueueslists
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...
Finding similar items in high dimensional spaces locality sensitive hashing
Language Technology Enhanced Learning
presentation on important DAG,TRIE,Hashing.pptx
Programming data structure concept in array ppt
Common Intervals of Two Sequences 1st Edition by Gilles Didier 9783540200765
Declare Your Language: Name Resolution
Declare Your Language (at DLS)
Space-efficient Feature Maps for String Alignment Kernels
Python lecture 05
Breaking the Softmax Bottleneck: a high-rank RNN Language Model
php string part 4
Presentation R basic teaching module
Testing Forest-Isomorphism in the Adjacency List Model
Text classification using Text kernels
ECO_TEXT_CLUSTERING
Complier Design - Operations on Languages, RE, Finite Automata
Compiler design lessons notes from Semester
Stacksqueueslists
Ad

More from Paris Women in Machine Learning and Data Science (20)

PDF
Survival Models: Proper Scoring Rule and Stochastic Optimization with Competi...
PDF
No Capes Needed: The Real Superpowers of Women in Tech, by Aurélie Giard-Jacquet
PPTX
OpenCV Essentials: From Basics to Small Projects, by Irina Nikulina
PDF
AI Revolution: How Artificial Intelligence is Reshaping Business, by Alina Kr...
PDF
(Online) Convex Reinforcement Learning and applications to Energy Management ...
PDF
Welcome to the techno broligarchy by Mathilde Saliou
PDF
Low Rank Optimisation, by Irène Waldspurger
PDF
From Golem to Code: AI and Male Fantasies of Self-Engendering by Isabelle Collet
PDF
From Machine Learning Scientist to Full Stack Data Scientist: Lessons learned...
PDF
CI CD in the age of machine learning by Sofia Calcagno
PDF
Sequential and reinforcement learning for demand side management by Margaux B...
PDF
How and why AI should fight cybersexism, by Chloe Daudier
PDF
Anomaly detection and data imputation within time series
PPTX
Managing international tech teams, by Natasha Dimban
PDF
Optimizing GenAI apps, by N. El Mawass and Maria Knorps
PPTX
PDF
Evaluation strategies for dealing with partially labelled or unlabelled data
PDF
Combinatorial Optimisation with Policy Adaptation using latent Space Search, ...
PDF
An age-old question, by Caroline Jean-Pierre
PDF
Applying Churn Prediction Approaches to the Telecom Industry, by Joëlle Lautré
Survival Models: Proper Scoring Rule and Stochastic Optimization with Competi...
No Capes Needed: The Real Superpowers of Women in Tech, by Aurélie Giard-Jacquet
OpenCV Essentials: From Basics to Small Projects, by Irina Nikulina
AI Revolution: How Artificial Intelligence is Reshaping Business, by Alina Kr...
(Online) Convex Reinforcement Learning and applications to Energy Management ...
Welcome to the techno broligarchy by Mathilde Saliou
Low Rank Optimisation, by Irène Waldspurger
From Golem to Code: AI and Male Fantasies of Self-Engendering by Isabelle Collet
From Machine Learning Scientist to Full Stack Data Scientist: Lessons learned...
CI CD in the age of machine learning by Sofia Calcagno
Sequential and reinforcement learning for demand side management by Margaux B...
How and why AI should fight cybersexism, by Chloe Daudier
Anomaly detection and data imputation within time series
Managing international tech teams, by Natasha Dimban
Optimizing GenAI apps, by N. El Mawass and Maria Knorps
Evaluation strategies for dealing with partially labelled or unlabelled data
Combinatorial Optimisation with Policy Adaptation using latent Space Search, ...
An age-old question, by Caroline Jean-Pierre
Applying Churn Prediction Approaches to the Telecom Industry, by Joëlle Lautré

Recently uploaded (20)

PPTX
web development for engineering and engineering
PPTX
Sustainable Sites - Green Building Construction
PPTX
Construction Project Organization Group 2.pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
DOCX
573137875-Attendance-Management-System-original
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
additive manufacturing of ss316l using mig welding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Well-logging-methods_new................
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Digital Logic Computer Design lecture notes
web development for engineering and engineering
Sustainable Sites - Green Building Construction
Construction Project Organization Group 2.pptx
Mechanical Engineering MATERIALS Selection
CH1 Production IntroductoryConcepts.pptx
Internet of Things (IOT) - A guide to understanding
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
573137875-Attendance-Management-System-original
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
OOP with Java - Java Introduction (Basics)
additive manufacturing of ss316l using mig welding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Well-logging-methods_new................
UNIT 4 Total Quality Management .pptx
Digital Logic Computer Design lecture notes

Ultra-efficient algorithms for testing well-parenthesised expressions by Tatiana Starikovskaya

  • 1. Ultra-efficient algorithms for testing well-parenthesised expressions Tatiana Starikovskaya (ENS Paris) Joint work with Eldar Fisher (Technion) and Frédéric Magniez (Paris-Diderot) WiMLDS Paris, November 24, 2017
  • 2. Pattern matching: you use it every time you search for something More general: algorithms on strings (= sequences of characters) My research area
  • 3. My research area Applications • Bioinformatics • Information Retrieval • … Classical approaches • We can read the whole input • We can afford to store linear-space data structures In the Big Data world, we must do better!
  • 4. My research area Streaming algorithms We receive the input as a stream, and must process it on-the-fly, without storing it Property testing algorithms We must decide if the input has a property P, but we can read only a small part of the input ? ? ? We need efficient algorithms for string processing!
  • 5. Property testers Wait a second! How can we make the decision not reading the whole input? Well, in general, we cannot… For example, we cannot say if the input is well-parenthesised by reading just a small fraction of it ? ? ? Task: We must decide if the input has a property P, but we can read only a small part of the input Objective: Save time ()(()())() ()(()()(() queried parentheses are identical ? ? ? ? ? ?
  • 6. Property testers We must 1. accept, if the input has the property P 2. reject, if the input is far from having the property 3. accept or reject otherwise Far = we must fix at least εn characters of the input so that the property is satisfied The output must be correct probability at least 2/3 ? ? ? Task: We must decide if the input has a property P, but we can read only a small part of the input Objective: Save time ()(()())() ()(()()((( ()(()()(() ε = 0.2, n = 10, εn = 2 ?
  • 7. Well-parenthesised expressions Dm = well-balanced strings on parentheses of m types Task: develop a property tester that decides whether the input is in Dm ()([]())[]([]) ()(([][)()((([] 1. It accepts all inputs that are in Dm with probability at least 2/3 2. It rejects all inputs that are ε-far from Dm with probability at least 2/3 Time = number of read characters!
  • 8. Simplicity: simplest context-free language Universality: any context-free language can be expressed through it (Chomsky-Schützenberger theorem) Practicality: processing of semi-structured documents • Visibly pushdown languages • Nested strings Why is it interesting? Dm = well-balanced strings on parentheses of m types
  • 9. What do we know ()(()())() ()(()()((( ()([]())([]) ()(([)()(([] const.m =1 Alon et al.’01 m ≥ 2 Parnas et al.’03c n1/11 < T < C n2/3 c n1/5 < T < C n2/5+δ NEW! Dm = well-balanced strings on parentheses of m types
  • 10. New tester for Dm-membership Dm = well-balanced strings on parentheses of m types Hmmm… does not look like a simple property to test! Let’s start with a property tester for strawberries ()({()})([]){((([]())([])([{}]())}([]))) red sweet yellow seeds simple properties, easy to test! ?
  • 11. New tester for Dm-membership Dm = well-balanced strings on parentheses of m types If we replace all opening parentheses with (, and all closing parentheses with ), the resulting string must be in D1 And we know how to test in O(1) time [Alon et al.’01]! Not sufficient: becomes ()({()})([]){((([]())([])([{}]()))([]))} ()((()))(())((((()())(())((())()))(()))) ()({{)}) ()((()))
  • 12. New tester for Dm-membership Dm = well-balanced strings on parentheses of m types Each block is Dm-consistent = is a substring of a string in Dm We test that the blocks are Dm-consistent by running our Dm-test in a recursive fashion ()({()})([ ]){((([]() )([])([{}] ()))([]))} ()({()})([ ]){((([]() )([])([{}] ()))([]))} b = n4/5 b = n4/5 b = n4/5 b = n4/5
  • 13. New tester for Dm-membership Dm = well-balanced strings on parentheses of m types We have checked that the string is good locally, but can we guarantee that it is good globally? ()({()})([ ]){((([]() )([])([{}] ()))([]))} ()({()})([ ]){((([]() )([])([{}] ()))([]))} b = n4/5 b = n4/5 b = n4/5 b = n4/5
  • 14. New tester for Dm-membership Dm = well-balanced strings on parentheses of m types Approximate matching graph: nodes = blocks, edge (B1,B2) = many excess parentheses in block B1 must be matched with excess parentheses in block B2 ()({()})([ ]){((([]() )([])([{}] ()))([]))} ()({()})([ ]){((([]() )([])([{}] ()))([]))} b = n4/5 b = n4/5 b = n4/5 b = n4/5
  • 15. New tester for Dm-membership Dm = well-balanced strings on parentheses of m types ()({()})([ ]){((([]() )([])([{}] ()))([]))} ()({()})([ ]){((([]() )([])([{}] ()))([]))} 1. Build an approximate matching graph 2. Run a recursive inter-block matching procedure b = n4/5 b = n4/5 b = n4/5 b = n4/5
  • 16. ()({()})([ ]){((([]() )([])([{}] ())}([]))) 1. Build an approximate matching graph 2. Run a recursive inter-block matching procedure ]){((([]() ))((((()() (())((((()())))) S S w/o types D1 {e1(S) = 2 e0(S) = 4 e1(S) - excess closing parentheses e0(S) - excess opening parentheses T1, T2, …, Tn/b - blocks of the input Parentheses in Ti that must be matched with parentheses in Tj min(e0(Ti), e1(Ti+1Ti+2…Tj)) - e1(Ti+1Ti+2…Tj-1)
  • 17. ()({()})([ ]){((([]() )([])([{}] ())}([]))) 1. Build an approximate matching graph 2. Run a recursive inter-block matching procedure ]){((([]() ))((((()() (())((((()())))) S S w/o types D1 {e1(S) = 2 e0(S) = 4 Observation e1(S) = max{S’ - prefix of S} (n1(S’) - n0(S’)) n1(S’) = |closing parentheses in S’| n0(S’) = |opening parentheses in S’| Lemma By querying x2/Δ2 positions of a string S of length x, we can compute a Δ-additive approximation of n1(S’) for any substring S’ of S correctly w.h.p.
  • 18. ()({()})([ ]){((([]() )([])([{}] ())}([]))) 1. Build an approximate matching graph 2. Run a recursive inter-block matching procedure Lemma By querying x2/Δ2 positions of a string S of length x, we can compute a Δ-additive approximation of n1(S’) for any substring S’ of S correctly w.h.p. Proof Query x2/Δ2 positions of S uniformly at random If |S’| ≤ Δ, output Δ Otherwise, |S’| = yΔ, where y > 1 S’ contains ~yx/Δ of the queried positions
  • 19. ()({()})([ ]){((([]() )([])([{}] ())}([]))) 1. Build an approximate matching graph 2. Run a recursive inter-block matching procedure Lemma By querying x2/Δ2 positions of a string S of length x, we can compute a Δ-additive approximation of n1(S’) for any substring S’ of S correctly w.h.p. Proof (cont.) Xi = 1 iff the i-th queried position is a closing parenthesis E[(Δ2/x) ⋅ Σ Xi] = (Δ2/x)⋅ n1(S’) (yx/Δ) / yΔ = n1(S’) By additive Chernoff bound, P[|(Δ2/x) ⋅ Σ Xi - n1(S’)| > Δ] < 2e-2
  • 20. New tester for Dm-membership 1. Build an approximate matching graph 2. Run a recursive inter-block matching procedure If we replace all opening parentheses with (, and all closing parentheses with ), the resulting string ∈ D1 Test that the blocks are Dm-consistent by running the test in a recursive fashion Complexity: O(n2/5) ()({()})([ ]){((([]() )([])([{}] ())}([]))) ()({()})([ ]){((([]() )([])([{}] ())}([]))) O(1) O(√b) b = n4/5 b = n4/5 b = n4/5 b = n4/5 O(n2/b2)
  • 21. Take-home message • Streaming or property testing settings • We have new, ultra-efficient algorithms for string processing • It is enough to use a polylog space or to read a constant number of data items in the input to solve a problem with good guarantees Questions? Comments?