SlideShare a Scribd company logo
1 of 25
The Design and
Analysis of
Algorithms
by Anany Levitin
2
CHAPTER 1: INTRODUCTIONCHAPTER 1: INTRODUCTION
 What is an Algorithm
 Steps in Designing and Implementing
an Algorithm
 Important Problem Types
 Fundamental Data Structures
3
Important problem types
 Sorting
 Searching
 String processing
 Graph problems
 Combinatorial problems
 Geometric problems
 Numerical problems
Sorting
 The sorting problem is to rearrange the
items of a given list in nondecreasing
order.
 Specially chosen piece of information that
guides sorting is called a key.
4
Why Sort?
 ranking Internet search results
 ranking students by their GPAscores.
 sorting makes many questions about the
list easier to answer.
The most important of them is searching
sorting is used as an auxiliary step in several
important algorithms ,
 e.g., geometric algorithms and Data Compression,
Greedy Approach
5
Different Algorithms Different
Time Complexities
 Good sorting algorithms that sort an arbitrary
array of size n using about n log2 n
comparisons
6
Properties of Sorting Algorithms
 Stable Algorithm
 preserves the relative order of any two equal
elements in its input.
 In- place Algorithm
algorithm is does not require extra memory,
except, possibly, for a few memory units.
7
8
Searching
 The searching problem deals with
finding a given value, called a search
key, in a given set or a multiset
9
 For searching, too, there is no single
algorithm that fits all situations best.
 Some algorithms work faster with more
memory requirement
 Some are very fast but applicable only to
sorted arrays
 Applications where the underlying data
may change frequently relative to the
number of searches to be considered
10
String Processing
 A string is a sequence of characters
from an alphabet
 Applications: searching for a given word in
a text called string matching
11
String Processing
12
Graph Problems
 A graph can be thought of as a
collection of points called vertices,
some of which are connected by line
segments called edges. (informal
definition)
 Applications:
 transportation
 Communication
 social and economic networks
 project scheduling
 games.
13
 Basic graph algorithms:
Graph-traversal algorithms
 Shortest-path algorithms
 Topological sorting for graphs with directed
edges
14
Example Problems:
 Graph-coloring problem
Event scheduling
 Traveling Salesman Problem (TSP)
route planning
Circuit board and VLSI chip fabrication
X-ray crystallography
genetic engineering
15
16
Colour the graph with smallest number of colours
17
Combinatorial Problems
 Problems that ask, explicitly or implicitly,
to find a combinatorial object that satisfies
certain constraint:
 a permutation
a combination
a subset
Additional properties:
 Maximum Value
 Minimum Value
 Eg. TSP
18
 Difficulties faced in solving combinatorial
problems:
 The number of combinatorial objects typically
grows extremely fast with a problem’s size
 There are no known algorithms for solving most
such problems exactly in an acceptable amount
of time. (This statement is neither proved nor
disproved)
19
Geometric Problems
 Geometric algorithms deal with
geometric objects such as points,
lines, and polygons
 Applications:
Computer graphics
Robotics
 Tomography
 Classic problems:
Closest-pair problem
 Convex-hull problem 20
Numerical Problems
 Numerical problems involve mathematical
objects of continuous nature: solving
equations and systems of equations,
computing definite integrals, evaluating
functions, and so on.
21
 Majority of such mathematical problems
can be solved only approximately
 Problems require manipulating real
numbers, which can be represented in a
computer only approximately
 A large number of arithmetic operations -
lead to an accumulation of the round-off
error - drastically distort an output
produced by a seemingly sound algorithm
22
 Requirement of Applications:
information storage, retrieval
transportation through networks
presentation to users
23
Check if you are Clear with:
 Sorting
 Searching
 String processing
 Graph problems
 Combinatorial problems
 Geometric problems
 Numerical problems
24
Have a SPLENDID Day..!!!
25

More Related Content

What's hot

Numerical methods and programming Tutorial
Numerical methods and programming Tutorial Numerical methods and programming Tutorial
Numerical methods and programming Tutorial Sarit Chakraborty
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solvingPrabhakaran V M
 
Design and analysis of algorithms
Design and analysis of algorithmsDesign and analysis of algorithms
Design and analysis of algorithmsDr Geetha Mohan
 
Lecture 2 role of algorithms in computing
Lecture 2   role of algorithms in computingLecture 2   role of algorithms in computing
Lecture 2 role of algorithms in computingjayavignesh86
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventionssaranyatdr
 
Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]
Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]
Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]Mumbai B.Sc.IT Study
 
Internet Of Things (November – 2018) [Choice Based | Question Paper]
Internet Of Things (November – 2018) [Choice Based | Question Paper]Internet Of Things (November – 2018) [Choice Based | Question Paper]
Internet Of Things (November – 2018) [Choice Based | Question Paper]Mumbai B.Sc.IT Study
 
Lecture 1 objective and course plan
Lecture 1   objective and course planLecture 1   objective and course plan
Lecture 1 objective and course planjayavignesh86
 
20181204i mlse discussions
20181204i mlse discussions20181204i mlse discussions
20181204i mlse discussionsHiroshi Maruyama
 
Artificial Intelligence (November – 2018) [Choice Based | Question Paper]
Artificial Intelligence (November – 2018) [Choice Based | Question Paper]Artificial Intelligence (November – 2018) [Choice Based | Question Paper]
Artificial Intelligence (November – 2018) [Choice Based | Question Paper]Mumbai B.Sc.IT Study
 
Advanced Web Programming (November – 2018) [Choice Based | Question Paper]
Advanced Web Programming (November – 2018) [Choice Based | Question Paper]Advanced Web Programming (November – 2018) [Choice Based | Question Paper]
Advanced Web Programming (November – 2018) [Choice Based | Question Paper]Mumbai B.Sc.IT Study
 

What's hot (19)

Numerical methods and programming Tutorial
Numerical methods and programming Tutorial Numerical methods and programming Tutorial
Numerical methods and programming Tutorial
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solving
 
Algorithm Design
Algorithm DesignAlgorithm Design
Algorithm Design
 
Slide1
Slide1Slide1
Slide1
 
Intro to automata theory
Intro to automata theoryIntro to automata theory
Intro to automata theory
 
Design and analysis of algorithms
Design and analysis of algorithmsDesign and analysis of algorithms
Design and analysis of algorithms
 
Lecture 2 role of algorithms in computing
Lecture 2   role of algorithms in computingLecture 2   role of algorithms in computing
Lecture 2 role of algorithms in computing
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventions
 
Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]
Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]
Internet Of Things (Question Paper) [October – 2018 | Choice Based Syllabus]
 
Algorithmic research
Algorithmic researchAlgorithmic research
Algorithmic research
 
Internet Of Things (November – 2018) [Choice Based | Question Paper]
Internet Of Things (November – 2018) [Choice Based | Question Paper]Internet Of Things (November – 2018) [Choice Based | Question Paper]
Internet Of Things (November – 2018) [Choice Based | Question Paper]
 
Lecture 1 objective and course plan
Lecture 1   objective and course planLecture 1   objective and course plan
Lecture 1 objective and course plan
 
Ds new
Ds newDs new
Ds new
 
20181204i mlse discussions
20181204i mlse discussions20181204i mlse discussions
20181204i mlse discussions
 
ADA complete notes
ADA complete notesADA complete notes
ADA complete notes
 
Artificial Intelligence (November – 2018) [Choice Based | Question Paper]
Artificial Intelligence (November – 2018) [Choice Based | Question Paper]Artificial Intelligence (November – 2018) [Choice Based | Question Paper]
Artificial Intelligence (November – 2018) [Choice Based | Question Paper]
 
Advanced Web Programming (November – 2018) [Choice Based | Question Paper]
Advanced Web Programming (November – 2018) [Choice Based | Question Paper]Advanced Web Programming (November – 2018) [Choice Based | Question Paper]
Advanced Web Programming (November – 2018) [Choice Based | Question Paper]
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
Req
ReqReq
Req
 

Similar to Day 2 Chapter 1 Unit 1

L01 intro-daa - ppt1
L01 intro-daa - ppt1L01 intro-daa - ppt1
L01 intro-daa - ppt1sankaran L
 
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptxa581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptxchristinamary2620
 
Data Structures and Algorithm Analysis
Data Structures  and  Algorithm AnalysisData Structures  and  Algorithm Analysis
Data Structures and Algorithm AnalysisMary Margarat
 
CSTalks - On machine learning - 2 Mar
CSTalks - On machine learning - 2 MarCSTalks - On machine learning - 2 Mar
CSTalks - On machine learning - 2 Marcstalks
 
02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppt
02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppt02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppt
02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppttarunanasution3
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptxSyed Zaid Irshad
 
Design and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdfDesign and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdfHarshNagda5
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.pptALIZAIB KHAN
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptxRAJESH S
 
DAA ppt.pptx
DAA ppt.pptxDAA ppt.pptx
DAA ppt.pptxRAJESH S
 
Analysis of Algorithm full version 2024.pptx
Analysis of Algorithm  full version  2024.pptxAnalysis of Algorithm  full version  2024.pptx
Analysis of Algorithm full version 2024.pptxrajesshs31r
 
Design Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptxDesign Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptxrajesshs31r
 
Algo_lecture1-3.pptx
Algo_lecture1-3.pptxAlgo_lecture1-3.pptx
Algo_lecture1-3.pptxssuserb14922
 
EE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptxEE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptxiamultapromax
 

Similar to Day 2 Chapter 1 Unit 1 (20)

L01 intro-daa - ppt1
L01 intro-daa - ppt1L01 intro-daa - ppt1
L01 intro-daa - ppt1
 
l01-intro (3).ppt
l01-intro (3).pptl01-intro (3).ppt
l01-intro (3).ppt
 
Unit-I-DAA.pdf
Unit-I-DAA.pdfUnit-I-DAA.pdf
Unit-I-DAA.pdf
 
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptxa581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
 
chapter 1
chapter 1chapter 1
chapter 1
 
Chapter one
Chapter oneChapter one
Chapter one
 
Data Structures and Algorithm Analysis
Data Structures  and  Algorithm AnalysisData Structures  and  Algorithm Analysis
Data Structures and Algorithm Analysis
 
CSTalks - On machine learning - 2 Mar
CSTalks - On machine learning - 2 MarCSTalks - On machine learning - 2 Mar
CSTalks - On machine learning - 2 Mar
 
02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppt
02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppt02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppt
02-FAZ-A First Step Toward Algorithm Complexity Analysis.ppt
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
 
Design and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdfDesign and Analysis Algorithms.pdf
Design and Analysis Algorithms.pdf
 
Lecture 1 (bce-7)
Lecture   1 (bce-7)Lecture   1 (bce-7)
Lecture 1 (bce-7)
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.ppt
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptx
 
DAA ppt.pptx
DAA ppt.pptxDAA ppt.pptx
DAA ppt.pptx
 
Analysis of Algorithm full version 2024.pptx
Analysis of Algorithm  full version  2024.pptxAnalysis of Algorithm  full version  2024.pptx
Analysis of Algorithm full version 2024.pptx
 
Design Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptxDesign Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptx
 
Algo_lecture1-3.pptx
Algo_lecture1-3.pptxAlgo_lecture1-3.pptx
Algo_lecture1-3.pptx
 
Lect1.pptx
Lect1.pptxLect1.pptx
Lect1.pptx
 
EE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptxEE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptx
 

More from P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai

More from P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai (20)

TestFile
TestFileTestFile
TestFile
 
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
 
2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS
 
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
 
1. 6 doubly linked list
1. 6 doubly linked list1. 6 doubly linked list
1. 6 doubly linked list
 
1. 5 Circular singly linked list
1. 5 Circular singly linked list1. 5 Circular singly linked list
1. 5 Circular singly linked list
 
1. 4 Singly linked list deletion
1. 4 Singly linked list deletion1. 4 Singly linked list deletion
1. 4 Singly linked list deletion
 
1. 3 singly linked list insertion 2
1. 3 singly linked list   insertion 21. 3 singly linked list   insertion 2
1. 3 singly linked list insertion 2
 
1. 2 Singly Linked List
1. 2 Singly Linked List1. 2 Singly Linked List
1. 2 Singly Linked List
 
1. C Basics for Data Structures Bridge Course
1. C Basics for Data Structures   Bridge Course1. C Basics for Data Structures   Bridge Course
1. C Basics for Data Structures Bridge Course
 
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
Approximation Algorithms TSP
 
Optimal binary search tree dynamic programming
Optimal binary search tree   dynamic programmingOptimal binary search tree   dynamic programming
Optimal binary search tree dynamic programming
 
The stable marriage problem iterative improvement method
The stable marriage problem iterative improvement methodThe stable marriage problem iterative improvement method
The stable marriage problem iterative improvement method
 
Maximum matching in bipartite graphs iterative improvement method
Maximum matching in bipartite graphs   iterative improvement methodMaximum matching in bipartite graphs   iterative improvement method
Maximum matching in bipartite graphs iterative improvement method
 
Knapsack dynamic programming formula top down (1)
Knapsack dynamic programming formula top down (1)Knapsack dynamic programming formula top down (1)
Knapsack dynamic programming formula top down (1)
 
Knapsack dynamic programming formula bottom up
Knapsack dynamic programming formula bottom upKnapsack dynamic programming formula bottom up
Knapsack dynamic programming formula bottom up
 
Huffman tree coding greedy approach
Huffman tree coding  greedy approachHuffman tree coding  greedy approach
Huffman tree coding greedy approach
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Multiplication of integers & strassens matrix multiplication subi notes
Multiplication of integers & strassens matrix multiplication   subi notesMultiplication of integers & strassens matrix multiplication   subi notes
Multiplication of integers & strassens matrix multiplication subi notes
 

Recently uploaded

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Day 2 Chapter 1 Unit 1

  • 1. The Design and Analysis of Algorithms by Anany Levitin
  • 2. 2 CHAPTER 1: INTRODUCTIONCHAPTER 1: INTRODUCTION  What is an Algorithm  Steps in Designing and Implementing an Algorithm  Important Problem Types  Fundamental Data Structures
  • 3. 3 Important problem types  Sorting  Searching  String processing  Graph problems  Combinatorial problems  Geometric problems  Numerical problems
  • 4. Sorting  The sorting problem is to rearrange the items of a given list in nondecreasing order.  Specially chosen piece of information that guides sorting is called a key. 4
  • 5. Why Sort?  ranking Internet search results  ranking students by their GPAscores.  sorting makes many questions about the list easier to answer. The most important of them is searching sorting is used as an auxiliary step in several important algorithms ,  e.g., geometric algorithms and Data Compression, Greedy Approach 5
  • 6. Different Algorithms Different Time Complexities  Good sorting algorithms that sort an arbitrary array of size n using about n log2 n comparisons 6
  • 7. Properties of Sorting Algorithms  Stable Algorithm  preserves the relative order of any two equal elements in its input.  In- place Algorithm algorithm is does not require extra memory, except, possibly, for a few memory units. 7
  • 8. 8
  • 9. Searching  The searching problem deals with finding a given value, called a search key, in a given set or a multiset 9
  • 10.  For searching, too, there is no single algorithm that fits all situations best.  Some algorithms work faster with more memory requirement  Some are very fast but applicable only to sorted arrays  Applications where the underlying data may change frequently relative to the number of searches to be considered 10
  • 11. String Processing  A string is a sequence of characters from an alphabet  Applications: searching for a given word in a text called string matching 11
  • 13. Graph Problems  A graph can be thought of as a collection of points called vertices, some of which are connected by line segments called edges. (informal definition)  Applications:  transportation  Communication  social and economic networks  project scheduling  games. 13
  • 14.  Basic graph algorithms: Graph-traversal algorithms  Shortest-path algorithms  Topological sorting for graphs with directed edges 14
  • 15. Example Problems:  Graph-coloring problem Event scheduling  Traveling Salesman Problem (TSP) route planning Circuit board and VLSI chip fabrication X-ray crystallography genetic engineering 15
  • 16. 16
  • 17. Colour the graph with smallest number of colours 17
  • 18. Combinatorial Problems  Problems that ask, explicitly or implicitly, to find a combinatorial object that satisfies certain constraint:  a permutation a combination a subset Additional properties:  Maximum Value  Minimum Value  Eg. TSP 18
  • 19.  Difficulties faced in solving combinatorial problems:  The number of combinatorial objects typically grows extremely fast with a problem’s size  There are no known algorithms for solving most such problems exactly in an acceptable amount of time. (This statement is neither proved nor disproved) 19
  • 20. Geometric Problems  Geometric algorithms deal with geometric objects such as points, lines, and polygons  Applications: Computer graphics Robotics  Tomography  Classic problems: Closest-pair problem  Convex-hull problem 20
  • 21. Numerical Problems  Numerical problems involve mathematical objects of continuous nature: solving equations and systems of equations, computing definite integrals, evaluating functions, and so on. 21
  • 22.  Majority of such mathematical problems can be solved only approximately  Problems require manipulating real numbers, which can be represented in a computer only approximately  A large number of arithmetic operations - lead to an accumulation of the round-off error - drastically distort an output produced by a seemingly sound algorithm 22
  • 23.  Requirement of Applications: information storage, retrieval transportation through networks presentation to users 23
  • 24. Check if you are Clear with:  Sorting  Searching  String processing  Graph problems  Combinatorial problems  Geometric problems  Numerical problems 24
  • 25. Have a SPLENDID Day..!!! 25