SlideShare a Scribd company logo
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
1Lecture 9: Searching
Data Structures and
Algorithms for Information
Processing
Lecture 9: Searching
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
2Lecture 9: Searching
Outline
• The simplest method: serial
search
• Binary search
• Open-address hashing
• Chained hashing
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
3Lecture 9: Searching
Search Algorithms
Whenever large amounts of data
need to be accessed quickly,
search algorithms are crucially
involved.
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
4Lecture 9: Searching
Search Algorithms
Lie at the heart of many computer
technologies. To name a few:
– Databases
– Information retrieval applications
– Web infrastructure (file systems,
domain name servers, etc.)
– String searching for patterns
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
5Lecture 9: Searching
Search Algorithms: Two
Broad Categories
• Searching a static database
– Accessing indexed Web pages
– Finding a file on disk
• Evaluating a dynamically changing
set of hypotheses
– Computer chess (search for a move)
– Speech recognition (search for text
given speech)
We’ll be concerned with the first
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
6Lecture 9: Searching
The Simplest Search:
Serial Lookup
• Items are stored in an array or
list.
• To search for an item x:
– Start at the beginning of the list
– Compare the current item to x
– If unequal, proceed to next item
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
7Lecture 9: Searching
Pseudocode for Serial Search
// Find x in an array a of
length n
int i=0;
boolean found = false;
while ((i < n) && !found) {
if (a[i] == x)
found = true;
else i++;
}
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
8Lecture 9: Searching
Analysis for Serial Search
• Best case: Requires one array
access: Θ(1)
• Worst case: Requires n array
accesses: Θ(n)
• Average case: To access an item,
assuming position is random
(uniform):(1+2+3+...+n)/n =
n(n+1)/2n = (n+1)/2 = Θ(n)
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
9Lecture 9: Searching
A Useful Combinatorial
Identity
1+2+3+…+n = n(n+1)/2
Why?
Algebraic Proof in Main
Visual Counting
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
10Lecture 9: Searching
Visual Counting
n*n
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
11Lecture 9: Searching
Visual Counting
n
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
12Lecture 9: Searching
Visual Counting
n*n - n
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
13Lecture 9: Searching
Visual Counting
(n*n - n)/2 + n = n(n+1)/2
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
14Lecture 9: Searching
Binary Search
• Can be used whenever the data are totally
ordered -- e.g., the integers. All elements are
comparable.
• Requires sorting in advance, and storing in an
array
• One of the simplest to implement, often “fast
enough”
• Can be tricky to handle “boundary cases”
• This a classic divide-and-conquer algorithm.
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
15Lecture 9: Searching
Idea of Binary Search
• Closely related to the natural
algorithm we use to look up a
word in a dictionary
– Open to the middle
– If target comes before all words on
the page, search in left half of book
– Otherwise, search in right half.
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
16Lecture 9: Searching
Interface for Binary Search
int search(int [] a, int first, int size, int
target)
• Parameters:
– int [] a: array to be searched over
– Search over
a[first,first+1,...,first+size-1]
• Precondition:
– array is sorted in increasing order
– first >= 0
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
17Lecture 9: Searching
int search (int [] a, int start, int size, int
target) {
if (size <= 0) return -1;
else {
int middle = start + size/2;
if (a[middle] == target) return middle;
else if (target < a[middle])
return search(a, start, size/2,
target);
else
return search(a, middle+1, size/2,
target);
Implementation
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
18Lecture 9: Searching
Implementation
Where’s the error??
Suppose size is odd. Are
new sizes correct?
Suppose size is even. Are
new sizes correct?
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
19Lecture 9: Searching
int search (int [] a, int first, int size, int
target) {
if (size <= 0) return -1;
else {
int middle = first + size/2;
if (a[middle] == target) return middle;
else if (target < a[middle])
return search(a, first, size/2,
target);
else
return search(a, middle+1, (size-1)/2,
Implementation
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
20Lecture 9: Searching
Boundary Cases
• Binary search is sometimes tricky
to get right.
• A common source of bugs.
• Test cases are not always helpful
for checking correctness of code.
• How many test cases would our
first implementation solve?
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
21Lecture 9: Searching
Binary Search with Other
Data Structures
• Can binary search be implemented
using linked lists rather than
arrays?
• Are there any other data
structures that could be used?
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
22Lecture 9: Searching
Analysis of Binary Search
• Recursively dividing up array in half represents
data as a full binary tree.
• Consider the simplest case -- array of size n =
2k
-1, complete binary tree.
• Take away one and divide by 2.
• New Size = 2k-1
- 1.
• We can only do that k times and k = Lg(n+1).
• Thus, worst case involves Θ(log n)
operations.
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
23Lecture 9: Searching
Average Case
• A complete binary tree with k
leaves has k-1 internal nodes.
• So, about half of the n data
elements require Θ(log n)
operations to find.
• Thus, assuming uniform
distribution on target elements,
average cost is also Θ(log n).
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
24Lecture 9: Searching
Binary Search is Limited
When we have a large number
of items that will be accessed in
part of the program, where
efficiency is crucial, binary
search may be too slow.
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
Improving Binary Search
Try to guess more precisely where the
key is located in the interval.
Generalize middle = first + size/2
(key – a[first])
middle = ------------------------------ * size
(a[first+size-1] – a[first])
25Lecture 9: Searching
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
Interpolation Search
• This modifies method is called
interpolation search.
• Uses fewer than log(log(N))
comparisons in the average caes.
• But uses Θ(N) in the worst case.
• For analysis, see Perl, Ital, Avni
“Interpolation Search – A Log Log N
search” CACM 21 (1978)
Pages 550 – 553
• Is log (log (N)) better that log (N)?
26Lecture 9: Searching
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
Comparing Log N to
Log(Log N)
• Suppose N = 2^100
Log N = 100
Log (Log N) = Log (100) = 6.65
• Suppose N = 2^(2^100)
Log N = 2^100
Log (Log N) = Log 2^100 = 100
27Lecture 9: Searching
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
Comparing Log(N) to
Log(Log N)
• Or, by taking limits…
• Lim Log(Log(n)) / Log(n)
n->∞
is of the form inf. / inf.
• Apply L’Hopital and take derivatives.
• Lim 1/(Log N) * 1/n
n->∞
-------------------- = 0
1/n
28Lecture 9: Searching
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
29Lecture 9: Searching
Hashing
• Fortunately, we can often do
better
• Hashing is a technique that
where the access time can be
O(1) rather than O(log n)
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
30Lecture 9: Searching
Open Address Hashing
The basic technique:
• Items are stored in an array of size
N
• The preferred position in the array
is computed using a hash function
of the item’s key
• When adding an item, if the
preferred position is occupied, the
next open position in the array is
used instead.
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
31Lecture 9: Searching
Open Address Hashing
Main’s presentation for Chapter 11
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
32Lecture 9: Searching
A Basic Hash Table
• We keep arrays for the keys and
data, and a bit indicating whether
a given position has been occupied
private class Table {
private int numItems;
private Object[] keys;
private Object[] data;
private boolean[] hasBeenUsed;
....
}
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
33Lecture 9: Searching
The Hash Function
• We can use the built in hashCode()
method that Java provides
private int hash (Object key) {
return Math.abs(key.hashCode()) %
data.length;
}
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
34Lecture 9: Searching
Calculating the Index
// If found return value is index of key
private int findIndex(Object key) {
int count=0;
int i=hash(key);
while ((count < data.length) &&
(hasBeenUsed[i])) {
if (key.equals(keys[i])) return i;
i = nextIndex(i);
count++;
}
return -1;
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
35Lecture 9: Searching
Inserting an Item
public Object put (Object key, Object
element) {
int index = findIndex(key);
if (index != -1) {
Object answer = data[index];
data[index] = element;
return answer;
}
else if (numItems < data.length) {
....
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
36Lecture 9: Searching
Inserting an Item
public Object put (Object key, Object
element) {
...
else if (numItems < data.length) {
index = hash(key);
while (keys[index] != null)
index = nextIndex(index);
keys[index] = key;
data[index] = element;
hasBeenUsed[index] = true;
numItems++;
return null;
}
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
37Lecture 9: Searching
Two Hashes are Better than One
• Collisions can result in long
stretches of positions with keys
not in their “preferred” position
• This is called clustering
• To address this problem, when a
collision results we jump a
“random” number of positions,
using a second hash function
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
38Lecture 9: Searching
Double Hashing
• Find the first position using hash1(key)
• If there’s a collision, step through the
array in steps of size hash2(key):
i = (i + hash2(key)) % data.length
• To avoid cycles, hash2(key) and the
length of the array must be relatively
prime (no common factors)
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
39Lecture 9: Searching
Double Hashing
• Knuth’s technique to avoid cycles:
• Choose the length of the array so
that both data.length and
data.length-2 are prime
hash1(key) =
Math.abs(key.hashCode()) % length
hash2(key) =
1 + (Math.abs(key.hashCode()) %
(length-1)
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
40Lecture 9: Searching
Issues with O-A Hashing
• Each array cell holds only one
element
• Collisions and clustering can
degrade performance
• Once the array is full, no more
elements can be added, unless we:
– create a new array with the right size
and hash functions
– re-hash the original elements
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
41Lecture 9: Searching
Chained Hashing
• Each array cell can hold more than
one element of the hash table
• Hash the key of each element to
obtain the array index
• When a collision happens, the
element is still placed at the
original hash index
• How is this handled?
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
42Lecture 9: Searching
Answer
• Each array location must be
implemented with a data structure
that can hold a group of elements
with the same hash index
• Most common approach
– each array location stores the head of
a linked list
– items in the list all have the same has
index
90-723: Data Structures
and Algorithms for
Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved.
43Lecture 9: Searching
Chained Hashing
table
…
[0] [1] [2] [3]
element
key
link
element
key
link
element
key
link
element
key
link
Any number of elements can be
added to the table without a need
to rehash

More Related Content

What's hot

Review Over Sequential Rule Mining
Review Over Sequential Rule MiningReview Over Sequential Rule Mining
Review Over Sequential Rule Mining
ijsrd.com
 
Python data structures - best in class for data analysis
Python data structures -   best in class for data analysisPython data structures -   best in class for data analysis
Python data structures - best in class for data analysis
Rajesh M
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Ashis Kumar Chanda
 
An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...
An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...
An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...
IRJET Journal
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Junghoon Kim
 
Visualization-Driven Data Aggregation
Visualization-Driven Data AggregationVisualization-Driven Data Aggregation
Visualization-Driven Data Aggregation
Zbigniew Jerzak
 
Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...
Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...
Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...
Junpei Kawamoto
 
Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...
Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...
Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...
IOSR Journals
 
The Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore EnvironmentsThe Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore Environments
University of Washington
 
Dmdw1
Dmdw1Dmdw1
Mining Of Big Data Using Map-Reduce Theorem
Mining Of Big Data Using Map-Reduce TheoremMining Of Big Data Using Map-Reduce Theorem
Mining Of Big Data Using Map-Reduce Theorem
IOSR Journals
 
A cyber physical stream algorithm for intelligent software defined storage
A cyber physical stream algorithm for intelligent software defined storageA cyber physical stream algorithm for intelligent software defined storage
A cyber physical stream algorithm for intelligent software defined storage
Made Artha
 
ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...
ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...
ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...
Thomas Gottron
 
Pandas data transformational data structure patterns and challenges final
Pandas   data transformational data structure patterns and challenges  finalPandas   data transformational data structure patterns and challenges  final
Pandas data transformational data structure patterns and challenges final
Rajesh M
 
RUCK 2017 MxNet과 R을 연동한 딥러닝 소개
RUCK 2017 MxNet과 R을 연동한 딥러닝 소개RUCK 2017 MxNet과 R을 연동한 딥러닝 소개
RUCK 2017 MxNet과 R을 연동한 딥러닝 소개
r-kor
 
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon UniversityText Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
NodejsFoundation
 
A PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHM
A PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHMA PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHM
A PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHM
csandit
 
Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...
Andrii Gakhov
 
Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...
Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...
Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...
Edureka!
 

What's hot (19)

Review Over Sequential Rule Mining
Review Over Sequential Rule MiningReview Over Sequential Rule Mining
Review Over Sequential Rule Mining
 
Python data structures - best in class for data analysis
Python data structures -   best in class for data analysisPython data structures -   best in class for data analysis
Python data structures - best in class for data analysis
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...
An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...
An Efficient and Scalable UP-Growth Algorithm with Optimized Threshold (min_u...
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
Visualization-Driven Data Aggregation
Visualization-Driven Data AggregationVisualization-Driven Data Aggregation
Visualization-Driven Data Aggregation
 
Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...
Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...
Frequency-based Constraint Relaxation for Private Query Processing in Cloud D...
 
Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...
Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...
Analysis of Pattern Transformation Algorithms for Sensitive Knowledge Protect...
 
The Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore EnvironmentsThe Other HPC: High Productivity Computing in Polystore Environments
The Other HPC: High Productivity Computing in Polystore Environments
 
Dmdw1
Dmdw1Dmdw1
Dmdw1
 
Mining Of Big Data Using Map-Reduce Theorem
Mining Of Big Data Using Map-Reduce TheoremMining Of Big Data Using Map-Reduce Theorem
Mining Of Big Data Using Map-Reduce Theorem
 
A cyber physical stream algorithm for intelligent software defined storage
A cyber physical stream algorithm for intelligent software defined storageA cyber physical stream algorithm for intelligent software defined storage
A cyber physical stream algorithm for intelligent software defined storage
 
ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...
ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...
ESWC 2013: A Systematic Investigation of Explicit and Implicit Schema Informa...
 
Pandas data transformational data structure patterns and challenges final
Pandas   data transformational data structure patterns and challenges  finalPandas   data transformational data structure patterns and challenges  final
Pandas data transformational data structure patterns and challenges final
 
RUCK 2017 MxNet과 R을 연동한 딥러닝 소개
RUCK 2017 MxNet과 R을 연동한 딥러닝 소개RUCK 2017 MxNet과 R을 연동한 딥러닝 소개
RUCK 2017 MxNet과 R을 연동한 딥러닝 소개
 
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon UniversityText Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
Text Mining with Node.js - Philipp Burckhardt, Carnegie Mellon University
 
A PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHM
A PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHMA PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHM
A PREFIXED-ITEMSET-BASED IMPROVEMENT FOR APRIORI ALGORITHM
 
Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...
 
Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...
Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...
Introduction To TensorFlow | Deep Learning with TensorFlow | TensorFlow For B...
 

Viewers also liked

CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITACANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
LHA Lou
 
AÇÃO CAUTELAR 4.174 DISTRITO FEDERAL
AÇÃO CAUTELAR 4.174 DISTRITO FEDERALAÇÃO CAUTELAR 4.174 DISTRITO FEDERAL
AÇÃO CAUTELAR 4.174 DISTRITO FEDERAL
Miguel Rosario
 
Jdbc 3
Jdbc 3Jdbc 3
Jdbc 3
Tuan Ngo
 
Local Media: Your New BFFs
Local Media: Your New BFFsLocal Media: Your New BFFs
Local Media: Your New BFFs
marinabooh
 
Cv
CvCv
Hp cloud performance_benchmark
Hp cloud performance_benchmarkHp cloud performance_benchmark
Hp cloud performance_benchmark
OpenCity Community
 
Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...
Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...
Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...
futureagricultures
 
Offshore Vessels & Access Forum-Event Brochure
Offshore Vessels & Access Forum-Event BrochureOffshore Vessels & Access Forum-Event Brochure
Offshore Vessels & Access Forum-Event Brochure
gm330
 
Developing your school's wom marketing plan, sbacs webinar
Developing your school's wom marketing plan, sbacs webinarDeveloping your school's wom marketing plan, sbacs webinar
Developing your school's wom marketing plan, sbacs webinar
Rick Newberry
 
Video Conferencing in Education
Video Conferencing in EducationVideo Conferencing in Education
Video Conferencing in Education
Eleanor Schuster
 
Kudavi 1.30.2016
Kudavi 1.30.2016Kudavi 1.30.2016
Kudavi 1.30.2016
Tom Currier
 
Kudavi 2.6.2016
Kudavi 2.6.2016Kudavi 2.6.2016
Kudavi 2.6.2016
Tom Currier
 
Future Agricultures Consortium overview Sept 2011
Future Agricultures Consortium overview Sept 2011Future Agricultures Consortium overview Sept 2011
Future Agricultures Consortium overview Sept 2011
futureagricultures
 
ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080. IQAC ORGA...
ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080.  IQAC ORGA...ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080.  IQAC ORGA...
ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080. IQAC ORGA...
Harish Bramhaver
 
мы будем вечно прославлять
мы будем вечно прославлятьмы будем вечно прославлять
мы будем вечно прославлятьelvira38
 
FUM Turkana 56 revised
FUM Turkana   56 revisedFUM Turkana   56 revised
FUM Turkana 56 revised
Kelly Kellum
 
It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...
It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...
It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...
polo0007
 

Viewers also liked (20)

CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITACANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
 
AÇÃO CAUTELAR 4.174 DISTRITO FEDERAL
AÇÃO CAUTELAR 4.174 DISTRITO FEDERALAÇÃO CAUTELAR 4.174 DISTRITO FEDERAL
AÇÃO CAUTELAR 4.174 DISTRITO FEDERAL
 
Jdbc 3
Jdbc 3Jdbc 3
Jdbc 3
 
Local Media: Your New BFFs
Local Media: Your New BFFsLocal Media: Your New BFFs
Local Media: Your New BFFs
 
Cv
CvCv
Cv
 
Giải
GiảiGiải
Giải
 
Hp cloud performance_benchmark
Hp cloud performance_benchmarkHp cloud performance_benchmark
Hp cloud performance_benchmark
 
Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...
Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...
Fertiliser Input Susbsidy Programme in Malawi preliminary workshop presentati...
 
Offshore Vessels & Access Forum-Event Brochure
Offshore Vessels & Access Forum-Event BrochureOffshore Vessels & Access Forum-Event Brochure
Offshore Vessels & Access Forum-Event Brochure
 
Developing your school's wom marketing plan, sbacs webinar
Developing your school's wom marketing plan, sbacs webinarDeveloping your school's wom marketing plan, sbacs webinar
Developing your school's wom marketing plan, sbacs webinar
 
Video Conferencing in Education
Video Conferencing in EducationVideo Conferencing in Education
Video Conferencing in Education
 
Kudavi 1.30.2016
Kudavi 1.30.2016Kudavi 1.30.2016
Kudavi 1.30.2016
 
Globo
GloboGlobo
Globo
 
Kudavi 2.6.2016
Kudavi 2.6.2016Kudavi 2.6.2016
Kudavi 2.6.2016
 
Future Agricultures Consortium overview Sept 2011
Future Agricultures Consortium overview Sept 2011Future Agricultures Consortium overview Sept 2011
Future Agricultures Consortium overview Sept 2011
 
Comicus-TheGreatest-2016
Comicus-TheGreatest-2016Comicus-TheGreatest-2016
Comicus-TheGreatest-2016
 
ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080. IQAC ORGA...
ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080.  IQAC ORGA...ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080.  IQAC ORGA...
ScholarlHKES SVP DEGREE COLLEGE, SADASHIVANAGAR, BANGALORE-560080. IQAC ORGA...
 
мы будем вечно прославлять
мы будем вечно прославлятьмы будем вечно прославлять
мы будем вечно прославлять
 
FUM Turkana 56 revised
FUM Turkana   56 revisedFUM Turkana   56 revised
FUM Turkana 56 revised
 
It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...
It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...
It takes a pillage behind the bailouts, bonuses, and backroom deals from wash...
 

Similar to 09 searching[1]

Intro_2.ppt
Intro_2.pptIntro_2.ppt
Intro_2.ppt
MumitAhmed1
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
SharabiNaif
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
Anonymous9etQKwW
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
Rajendran
 
CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.ppt
Arumugam90
 
Chapter 5.pdf
Chapter 5.pdfChapter 5.pdf
Chapter 5.pdf
DrGnaneswariG
 
lecture4.pdf
lecture4.pdflecture4.pdf
lecture4.pdf
ssuser67281d
 
Algorithms.
Algorithms. Algorithms.
MINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATA
MINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATAMINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATA
MINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATA
cscpconf
 
Mining Fuzzy Association Rules from Web Usage Quantitative Data
Mining Fuzzy Association Rules from Web Usage Quantitative Data Mining Fuzzy Association Rules from Web Usage Quantitative Data
Mining Fuzzy Association Rules from Web Usage Quantitative Data
csandit
 
Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis Introduction
Te-Yen Liu
 
Decision Tree.pptx
Decision Tree.pptxDecision Tree.pptx
Decision Tree.pptx
Ramakrishna Reddy Bijjam
 
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
IRJET Journal
 
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
KamleshKumar394
 
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures  Design-Notes-Searching-Hashing.pdfAD3251-Data Structures  Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Algorithms.pptx
Algorithms.pptxAlgorithms.pptx
Algorithms.pptx
john6938
 
Data Structures 6
Data Structures 6Data Structures 6
Data Structures 6
Dr.Umadevi V
 
Machine Learning for Data Extraction
Machine Learning for Data ExtractionMachine Learning for Data Extraction
Machine Learning for Data Extraction
Dasha Herrmannova
 
Basics in algorithms and data structure
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure
Eman magdy
 
Data processing
Data processingData processing
Data processing
Sania Shoaib
 

Similar to 09 searching[1] (20)

Intro_2.ppt
Intro_2.pptIntro_2.ppt
Intro_2.ppt
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
 
CS3114_09212011.ppt
CS3114_09212011.pptCS3114_09212011.ppt
CS3114_09212011.ppt
 
Chapter 5.pdf
Chapter 5.pdfChapter 5.pdf
Chapter 5.pdf
 
lecture4.pdf
lecture4.pdflecture4.pdf
lecture4.pdf
 
Algorithms.
Algorithms. Algorithms.
Algorithms.
 
MINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATA
MINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATAMINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATA
MINING FUZZY ASSOCIATION RULES FROM WEB USAGE QUANTITATIVE DATA
 
Mining Fuzzy Association Rules from Web Usage Quantitative Data
Mining Fuzzy Association Rules from Web Usage Quantitative Data Mining Fuzzy Association Rules from Web Usage Quantitative Data
Mining Fuzzy Association Rules from Web Usage Quantitative Data
 
Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis Introduction
 
Decision Tree.pptx
Decision Tree.pptxDecision Tree.pptx
Decision Tree.pptx
 
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
 
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
A Comprehensive Study of Clustering Algorithms for Big Data Mining with MapRe...
 
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures  Design-Notes-Searching-Hashing.pdfAD3251-Data Structures  Design-Notes-Searching-Hashing.pdf
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
 
Algorithms.pptx
Algorithms.pptxAlgorithms.pptx
Algorithms.pptx
 
Data Structures 6
Data Structures 6Data Structures 6
Data Structures 6
 
Machine Learning for Data Extraction
Machine Learning for Data ExtractionMachine Learning for Data Extraction
Machine Learning for Data Extraction
 
Basics in algorithms and data structure
Basics in algorithms and data structure Basics in algorithms and data structure
Basics in algorithms and data structure
 
Data processing
Data processingData processing
Data processing
 

Recently uploaded

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 

09 searching[1]

  • 1. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1Lecture 9: Searching Data Structures and Algorithms for Information Processing Lecture 9: Searching
  • 2. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 2Lecture 9: Searching Outline • The simplest method: serial search • Binary search • Open-address hashing • Chained hashing
  • 3. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 3Lecture 9: Searching Search Algorithms Whenever large amounts of data need to be accessed quickly, search algorithms are crucially involved.
  • 4. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 4Lecture 9: Searching Search Algorithms Lie at the heart of many computer technologies. To name a few: – Databases – Information retrieval applications – Web infrastructure (file systems, domain name servers, etc.) – String searching for patterns
  • 5. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 5Lecture 9: Searching Search Algorithms: Two Broad Categories • Searching a static database – Accessing indexed Web pages – Finding a file on disk • Evaluating a dynamically changing set of hypotheses – Computer chess (search for a move) – Speech recognition (search for text given speech) We’ll be concerned with the first
  • 6. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 6Lecture 9: Searching The Simplest Search: Serial Lookup • Items are stored in an array or list. • To search for an item x: – Start at the beginning of the list – Compare the current item to x – If unequal, proceed to next item
  • 7. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 7Lecture 9: Searching Pseudocode for Serial Search // Find x in an array a of length n int i=0; boolean found = false; while ((i < n) && !found) { if (a[i] == x) found = true; else i++; }
  • 8. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 8Lecture 9: Searching Analysis for Serial Search • Best case: Requires one array access: Θ(1) • Worst case: Requires n array accesses: Θ(n) • Average case: To access an item, assuming position is random (uniform):(1+2+3+...+n)/n = n(n+1)/2n = (n+1)/2 = Θ(n)
  • 9. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 9Lecture 9: Searching A Useful Combinatorial Identity 1+2+3+…+n = n(n+1)/2 Why? Algebraic Proof in Main Visual Counting
  • 10. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 10Lecture 9: Searching Visual Counting n*n
  • 11. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 11Lecture 9: Searching Visual Counting n
  • 12. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 12Lecture 9: Searching Visual Counting n*n - n
  • 13. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 13Lecture 9: Searching Visual Counting (n*n - n)/2 + n = n(n+1)/2
  • 14. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 14Lecture 9: Searching Binary Search • Can be used whenever the data are totally ordered -- e.g., the integers. All elements are comparable. • Requires sorting in advance, and storing in an array • One of the simplest to implement, often “fast enough” • Can be tricky to handle “boundary cases” • This a classic divide-and-conquer algorithm.
  • 15. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 15Lecture 9: Searching Idea of Binary Search • Closely related to the natural algorithm we use to look up a word in a dictionary – Open to the middle – If target comes before all words on the page, search in left half of book – Otherwise, search in right half.
  • 16. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 16Lecture 9: Searching Interface for Binary Search int search(int [] a, int first, int size, int target) • Parameters: – int [] a: array to be searched over – Search over a[first,first+1,...,first+size-1] • Precondition: – array is sorted in increasing order – first >= 0
  • 17. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 17Lecture 9: Searching int search (int [] a, int start, int size, int target) { if (size <= 0) return -1; else { int middle = start + size/2; if (a[middle] == target) return middle; else if (target < a[middle]) return search(a, start, size/2, target); else return search(a, middle+1, size/2, target); Implementation
  • 18. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 18Lecture 9: Searching Implementation Where’s the error?? Suppose size is odd. Are new sizes correct? Suppose size is even. Are new sizes correct?
  • 19. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 19Lecture 9: Searching int search (int [] a, int first, int size, int target) { if (size <= 0) return -1; else { int middle = first + size/2; if (a[middle] == target) return middle; else if (target < a[middle]) return search(a, first, size/2, target); else return search(a, middle+1, (size-1)/2, Implementation
  • 20. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 20Lecture 9: Searching Boundary Cases • Binary search is sometimes tricky to get right. • A common source of bugs. • Test cases are not always helpful for checking correctness of code. • How many test cases would our first implementation solve?
  • 21. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 21Lecture 9: Searching Binary Search with Other Data Structures • Can binary search be implemented using linked lists rather than arrays? • Are there any other data structures that could be used?
  • 22. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 22Lecture 9: Searching Analysis of Binary Search • Recursively dividing up array in half represents data as a full binary tree. • Consider the simplest case -- array of size n = 2k -1, complete binary tree. • Take away one and divide by 2. • New Size = 2k-1 - 1. • We can only do that k times and k = Lg(n+1). • Thus, worst case involves Θ(log n) operations.
  • 23. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 23Lecture 9: Searching Average Case • A complete binary tree with k leaves has k-1 internal nodes. • So, about half of the n data elements require Θ(log n) operations to find. • Thus, assuming uniform distribution on target elements, average cost is also Θ(log n).
  • 24. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 24Lecture 9: Searching Binary Search is Limited When we have a large number of items that will be accessed in part of the program, where efficiency is crucial, binary search may be too slow.
  • 25. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. Improving Binary Search Try to guess more precisely where the key is located in the interval. Generalize middle = first + size/2 (key – a[first]) middle = ------------------------------ * size (a[first+size-1] – a[first]) 25Lecture 9: Searching
  • 26. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. Interpolation Search • This modifies method is called interpolation search. • Uses fewer than log(log(N)) comparisons in the average caes. • But uses Θ(N) in the worst case. • For analysis, see Perl, Ital, Avni “Interpolation Search – A Log Log N search” CACM 21 (1978) Pages 550 – 553 • Is log (log (N)) better that log (N)? 26Lecture 9: Searching
  • 27. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. Comparing Log N to Log(Log N) • Suppose N = 2^100 Log N = 100 Log (Log N) = Log (100) = 6.65 • Suppose N = 2^(2^100) Log N = 2^100 Log (Log N) = Log 2^100 = 100 27Lecture 9: Searching
  • 28. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. Comparing Log(N) to Log(Log N) • Or, by taking limits… • Lim Log(Log(n)) / Log(n) n->∞ is of the form inf. / inf. • Apply L’Hopital and take derivatives. • Lim 1/(Log N) * 1/n n->∞ -------------------- = 0 1/n 28Lecture 9: Searching
  • 29. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 29Lecture 9: Searching Hashing • Fortunately, we can often do better • Hashing is a technique that where the access time can be O(1) rather than O(log n)
  • 30. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 30Lecture 9: Searching Open Address Hashing The basic technique: • Items are stored in an array of size N • The preferred position in the array is computed using a hash function of the item’s key • When adding an item, if the preferred position is occupied, the next open position in the array is used instead.
  • 31. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 31Lecture 9: Searching Open Address Hashing Main’s presentation for Chapter 11
  • 32. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 32Lecture 9: Searching A Basic Hash Table • We keep arrays for the keys and data, and a bit indicating whether a given position has been occupied private class Table { private int numItems; private Object[] keys; private Object[] data; private boolean[] hasBeenUsed; .... }
  • 33. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 33Lecture 9: Searching The Hash Function • We can use the built in hashCode() method that Java provides private int hash (Object key) { return Math.abs(key.hashCode()) % data.length; }
  • 34. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 34Lecture 9: Searching Calculating the Index // If found return value is index of key private int findIndex(Object key) { int count=0; int i=hash(key); while ((count < data.length) && (hasBeenUsed[i])) { if (key.equals(keys[i])) return i; i = nextIndex(i); count++; } return -1;
  • 35. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 35Lecture 9: Searching Inserting an Item public Object put (Object key, Object element) { int index = findIndex(key); if (index != -1) { Object answer = data[index]; data[index] = element; return answer; } else if (numItems < data.length) { ....
  • 36. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 36Lecture 9: Searching Inserting an Item public Object put (Object key, Object element) { ... else if (numItems < data.length) { index = hash(key); while (keys[index] != null) index = nextIndex(index); keys[index] = key; data[index] = element; hasBeenUsed[index] = true; numItems++; return null; }
  • 37. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 37Lecture 9: Searching Two Hashes are Better than One • Collisions can result in long stretches of positions with keys not in their “preferred” position • This is called clustering • To address this problem, when a collision results we jump a “random” number of positions, using a second hash function
  • 38. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 38Lecture 9: Searching Double Hashing • Find the first position using hash1(key) • If there’s a collision, step through the array in steps of size hash2(key): i = (i + hash2(key)) % data.length • To avoid cycles, hash2(key) and the length of the array must be relatively prime (no common factors)
  • 39. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 39Lecture 9: Searching Double Hashing • Knuth’s technique to avoid cycles: • Choose the length of the array so that both data.length and data.length-2 are prime hash1(key) = Math.abs(key.hashCode()) % length hash2(key) = 1 + (Math.abs(key.hashCode()) % (length-1)
  • 40. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 40Lecture 9: Searching Issues with O-A Hashing • Each array cell holds only one element • Collisions and clustering can degrade performance • Once the array is full, no more elements can be added, unless we: – create a new array with the right size and hash functions – re-hash the original elements
  • 41. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 41Lecture 9: Searching Chained Hashing • Each array cell can hold more than one element of the hash table • Hash the key of each element to obtain the array index • When a collision happens, the element is still placed at the original hash index • How is this handled?
  • 42. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 42Lecture 9: Searching Answer • Each array location must be implemented with a data structure that can hold a group of elements with the same hash index • Most common approach – each array location stores the head of a linked list – items in the list all have the same has index
  • 43. 90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 43Lecture 9: Searching Chained Hashing table … [0] [1] [2] [3] element key link element key link element key link element key link Any number of elements can be added to the table without a need to rehash