SlideShare a Scribd company logo
2
Problem Solving
Your roommate, who is taking Information
Technology II class, is in a panic. He is
worried that he might lose his financial aid if
his average goes under 6.0
How can he figure out what his current Average
is?
How can you build a process that any student
can use to tell them what average they have
based on grades provided thus far?
Most read
9
Algorithms
 Algorithms are addressed to some audience.
Consider:
 A set of instructions for building a child’s bicycle.
 A diagnostic checklist for a failure of some system on the
space shuttle.
 The algorithm for what to do when a nuclear reactor
begins to overheat.
 An algorithm that will run on a computer system to
calculate student GPA’s.
Most read
17
DiagrammaticallyDrivethecarto
school
Get directions
Start the car
Follow the directions
Get parking pass
Drive to the
destination
Turn left out of your
driveway
At the next light, turn right.
At the intersection with I-
66, take the on-ramp for
I-66 West
…
Level 1
Level 2
Level 3Find a place to park
Stop the car
Most read
Algorithms
Chapter 10
What's The Pla
Algorithmic Thin
Problem Solving
Your roommate, who is taking Information
Technology II class, is in a panic. He is
worried that he might lose his financial aid if
his average goes under 6.0
How can he figure out what his current Average
is?
How can you build a process that any student
can use to tell them what average they have
based on grades provided thus far?
Algorithm Development Objectives
 At the end of this unit the student will:
 define the term algorithm
 state 5 properties of a good algorithm
 from a given problem and stated audience, create
an appropriate algorithm using the properties
stated above.
 use the concept of abstraction and top-down
design in creating an algorithm.
 begin to think about the kinds of problems that
have a computing solution.
Problem Solving
1. Understand the problem (and the audience)
1. Are you making a pie?
2. Needing directions?
3. Putting together a piece of equipment?
4. Trying to solve a mathematical puzzle?
2. Devise a plan
1. Is this similar to something else?
2. Who is the audience for the solution?
3. What are the required steps?
Problem Solving ( Cont’d )
3. Carry out the plan (implement)
1. Does it work?
2. Is each step correct? Necessary?
3. Is the solution accurate? (Correct)
1. Will it always lead to a solution
Algorithm Definition
 A logical sequence of steps for solving a
problem, …

From http://Dictionary.msn.com
 Dale and Lewis:

a plan of solution for a problem

Algorithm – An unambiguous (and precise) set of steps
for solving a problem (or sub-problem) in a finite
amount of time using a finite amount of data.
Algorithm Definition, cont
 Shackelford, Russell L. in Introduction to
Computing and Algorithms –
 “An algorithm is a specification of a behavioral
process. It consists of a finite set of instructions
that govern behavior step-by-step.”
Notice
 Notice the term finite. Algorithms should
lead to an eventual solution.
 Step by step process. Each step should do
one logical action.
Algorithms
 Algorithms are addressed to some audience.
Consider:
 A set of instructions for building a child’s bicycle.
 A diagnostic checklist for a failure of some system on the
space shuttle.
 The algorithm for what to do when a nuclear reactor
begins to overheat.
 An algorithm that will run on a computer system to
calculate student GPA’s.
Audience
 Each audience will have its own “rules” that
govern how we will address them, the
language that they speak.
 Each audience will have certain assumptions
about what they know and don’t know.
 An audience might include people or a
computer.
Good vs. Bad Algorithms
 All algorithms will have input, perform a
process, and produce output.
 A good algorithm should be:
 Simple - relative
 Complete – account for all inputs & cases
 Correct (Right)
 should have appropriate levels of Abstraction. –
grouping steps into a single module
 Precise
 Mnemonic - SCRAP
Precision
 Precision means that there is only one way to
interpret the instruction. Unambiguous
 Words like “maybe”, “sometimes” and
“occasionally” have no business in a well developed
algorithm.
 Instead of “maybe”, we can specify the exact
circumstances in which an action will be carried out.
Simplicity
 Simple can be defined as having no
unnecessary steps and no unnecessary
complexity. (You may lose points if your
algorithm contains unnecessary steps)
 Each step of a well developed algorithm
should carry out one logical step of the
process.
 Avoid something like: “Take 2nd
right after you
exit at King Street”
It has Levels of Abstraction.
 From the Oxford English Dictionary,
abstraction is defined as:
 “The act or process of separating in thought, of
considering a thing independently of its
associations; or a substance independently of its
attributes; or an attribute or quality independently
of the substance to which it belongs.”
 Example: Add all the scores then divide the sum
by the number of students to get the average.
Or in other words
 The abstraction property lets us view an
algorithm as a series of high level aggregate
steps, with the detail hidden in a lower level.
Abstraction, cont.
 Instead of approaching a problem and worrying
about each and every thing you must do to solve the
problem, you can begin to look at the major steps.
(Top down design)
 After the major steps, you can begin to fill in how
you would accomplish the major step.
 That fill in may lead to the need for additional levels
to fill in those details, etc.
 Top down design.
DiagrammaticallyDrivethecarto
school
Get directions
Start the car
Follow the directions
Get parking pass
Drive to the
destination
Turn left out of your
driveway
At the next light, turn right.
At the intersection with I-
66, take the on-ramp for
I-66 West
…
Level 1
Level 2
Level 3Find a place to park
Stop the car
Other algorithm attributes
 A good algorithm should be correct.
 A good algorithm should be complete.
 Shackelford again, “To be correct, an
algorithm must produce results that are
correct and complete given any and all sets
of appropriate data.”
 And to be correct, an algorithm must proceed
through to a conclusion.
Steps from Schaum’s
 Analyze the problem and develop the specification.
 Design the solution
 Test the solution as part of the design steps.
 Implement the program (code the program)
 Test the program
 Validate the program (further extensive testing) to
insure it works under all circumstances.
For example:
 For example, a student is taking 4 classes:
 Spanish – 4 credits – 6
 English – 1 credit – 9
 Computer Science – 3 credits – 86
 P.E. – 3 credits – 5
 What is the student’s semester average?
 How did you figure it out?
 How can you describe that process for others in the
class?

More Related Content

What's hot (18)

Lecture 4 asymptotic notations
Lecture 4   asymptotic notationsLecture 4   asymptotic notations
Lecture 4 asymptotic notations
jayavignesh86
 
Unit 1 chapter 1 Design and Analysis of Algorithms
Unit 1   chapter 1 Design and Analysis of AlgorithmsUnit 1   chapter 1 Design and Analysis of Algorithms
Unit 1 chapter 1 Design and Analysis of Algorithms
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Cache memory
Cache memoryCache memory
Cache memory
Ahsan Ashfaq
 
ADA complete notes
ADA complete notesADA complete notes
ADA complete notes
Vinay Kumar C
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
Jayesh Chauhan
 
Lean 6sigma and DMAIC
Lean 6sigma and DMAICLean 6sigma and DMAIC
Lean 6sigma and DMAIC
Alesandra Blakeston
 
Define phase lean six sigma tollgate template
Define phase   lean six sigma tollgate templateDefine phase   lean six sigma tollgate template
Define phase lean six sigma tollgate template
Steven Bonacorsi
 
Advanced Comuter Architecture Ch6 Problem Solutions
Advanced Comuter Architecture Ch6 Problem SolutionsAdvanced Comuter Architecture Ch6 Problem Solutions
Advanced Comuter Architecture Ch6 Problem Solutions
Joe Christensen
 
Linear prediction
Linear predictionLinear prediction
Linear prediction
Nikolay Karpov
 
Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...
Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...
Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...
TKMG, Inc.
 
Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized Algorithms
KM Bappi
 
Memory Organization | Computer Fundamental and Organization
Memory Organization | Computer Fundamental and OrganizationMemory Organization | Computer Fundamental and Organization
Memory Organization | Computer Fundamental and Organization
Smit Luvani
 
Shift reduce parser
Shift reduce parserShift reduce parser
Shift reduce parser
TEJVEER SINGH
 
Simulation-Run-Statistics
Simulation-Run-StatisticsSimulation-Run-Statistics
Simulation-Run-Statistics
sadiksha kafle
 
Chapter5 slideshare
Chapter5 slideshareChapter5 slideshare
Chapter5 slideshare
manirajan12
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transaction
lavanya marichamy
 
Mca ii os u-3 dead lock & io systems
Mca  ii  os u-3 dead lock & io systemsMca  ii  os u-3 dead lock & io systems
Mca ii os u-3 dead lock & io systems
Rai University
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
sathish sak
 
Lecture 4 asymptotic notations
Lecture 4   asymptotic notationsLecture 4   asymptotic notations
Lecture 4 asymptotic notations
jayavignesh86
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
Jayesh Chauhan
 
Define phase lean six sigma tollgate template
Define phase   lean six sigma tollgate templateDefine phase   lean six sigma tollgate template
Define phase lean six sigma tollgate template
Steven Bonacorsi
 
Advanced Comuter Architecture Ch6 Problem Solutions
Advanced Comuter Architecture Ch6 Problem SolutionsAdvanced Comuter Architecture Ch6 Problem Solutions
Advanced Comuter Architecture Ch6 Problem Solutions
Joe Christensen
 
Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...
Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...
Value Stream Mapping: Beyond the Mechanics - Part 3 (Executing the Transforma...
TKMG, Inc.
 
Topic 1.4: Randomized Algorithms
Topic 1.4: Randomized AlgorithmsTopic 1.4: Randomized Algorithms
Topic 1.4: Randomized Algorithms
KM Bappi
 
Memory Organization | Computer Fundamental and Organization
Memory Organization | Computer Fundamental and OrganizationMemory Organization | Computer Fundamental and Organization
Memory Organization | Computer Fundamental and Organization
Smit Luvani
 
Simulation-Run-Statistics
Simulation-Run-StatisticsSimulation-Run-Statistics
Simulation-Run-Statistics
sadiksha kafle
 
Chapter5 slideshare
Chapter5 slideshareChapter5 slideshare
Chapter5 slideshare
manirajan12
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transaction
lavanya marichamy
 
Mca ii os u-3 dead lock & io systems
Mca  ii  os u-3 dead lock & io systemsMca  ii  os u-3 dead lock & io systems
Mca ii os u-3 dead lock & io systems
Rai University
 

Similar to QULITIES OF A GOOD ALGORITHM (20)

03 algorithm properties
03 algorithm properties03 algorithm properties
03 algorithm properties
Lincoln School
 
Binary to hexadecimal algorithmic old.pptx
Binary to hexadecimal algorithmic old.pptxBinary to hexadecimal algorithmic old.pptx
Binary to hexadecimal algorithmic old.pptx
bulbul931579
 
problem solving and algorithm development
problem solving and algorithm developmentproblem solving and algorithm development
problem solving and algorithm development
jessicajames100
 
Algo_Lecture01.pptx
Algo_Lecture01.pptxAlgo_Lecture01.pptx
Algo_Lecture01.pptx
ShaistaRiaz4
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
hamza javed
 
Chapter-1-Introduction-to-Aglorithms.pdf
Chapter-1-Introduction-to-Aglorithms.pdfChapter-1-Introduction-to-Aglorithms.pdf
Chapter-1-Introduction-to-Aglorithms.pdf
Shanmuganathan C
 
Introduction to analysis algorithm in computer Science
Introduction to analysis algorithm in computer ScienceIntroduction to analysis algorithm in computer Science
Introduction to analysis algorithm in computer Science
tissandavid
 
introduction to analysis of algorithm in computer science
introduction to analysis of algorithm in computer scienceintroduction to analysis of algorithm in computer science
introduction to analysis of algorithm in computer science
tissandavid
 
Presentation for computer studing in algorithm
Presentation for computer studing in algorithmPresentation for computer studing in algorithm
Presentation for computer studing in algorithm
445220virt
 
Problem solving
Problem solvingProblem solving
Problem solving
hamza239523
 
Ds03 part i algorithms by jyoti lakhani
Ds03 part i algorithms   by jyoti lakhaniDs03 part i algorithms   by jyoti lakhani
Ds03 part i algorithms by jyoti lakhani
jyoti_lakhani
 
Algorithm - A set of rules for solving operations
Algorithm - A set of rules  for solving operationsAlgorithm - A set of rules  for solving operations
Algorithm - A set of rules for solving operations
Kumari99
 
DAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithmsDAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithms
VaishnaviDappu
 
Ds03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhaniDs03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhani
jyoti_lakhani
 
Architecture Algorithm Definition
Architecture Algorithm DefinitionArchitecture Algorithm Definition
Architecture Algorithm Definition
Gaditek
 
Chp-1 DAA (2).pptx design analysis and algoritham presentation
Chp-1 DAA (2).pptx design analysis and algoritham presentationChp-1 DAA (2).pptx design analysis and algoritham presentation
Chp-1 DAA (2).pptx design analysis and algoritham presentation
vaishnavbhavna17
 
Design and Analysis of Algorithm for II year Computer science and Engineering...
Design and Analysis of Algorithm for II year Computer science and Engineering...Design and Analysis of Algorithm for II year Computer science and Engineering...
Design and Analysis of Algorithm for II year Computer science and Engineering...
Kalpana Devi M
 
11 Unit 1 Problem Solving Techniques
11  Unit 1 Problem Solving Techniques11  Unit 1 Problem Solving Techniques
11 Unit 1 Problem Solving Techniques
Praveen M Jigajinni
 
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDFFDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
AlthimeseAnderson
 
Chapter 3 introduction to algorithms handouts (with notes)
Chapter 3 introduction to algorithms handouts (with notes)Chapter 3 introduction to algorithms handouts (with notes)
Chapter 3 introduction to algorithms handouts (with notes)
mailund
 
03 algorithm properties
03 algorithm properties03 algorithm properties
03 algorithm properties
Lincoln School
 
Binary to hexadecimal algorithmic old.pptx
Binary to hexadecimal algorithmic old.pptxBinary to hexadecimal algorithmic old.pptx
Binary to hexadecimal algorithmic old.pptx
bulbul931579
 
problem solving and algorithm development
problem solving and algorithm developmentproblem solving and algorithm development
problem solving and algorithm development
jessicajames100
 
Algo_Lecture01.pptx
Algo_Lecture01.pptxAlgo_Lecture01.pptx
Algo_Lecture01.pptx
ShaistaRiaz4
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
hamza javed
 
Chapter-1-Introduction-to-Aglorithms.pdf
Chapter-1-Introduction-to-Aglorithms.pdfChapter-1-Introduction-to-Aglorithms.pdf
Chapter-1-Introduction-to-Aglorithms.pdf
Shanmuganathan C
 
Introduction to analysis algorithm in computer Science
Introduction to analysis algorithm in computer ScienceIntroduction to analysis algorithm in computer Science
Introduction to analysis algorithm in computer Science
tissandavid
 
introduction to analysis of algorithm in computer science
introduction to analysis of algorithm in computer scienceintroduction to analysis of algorithm in computer science
introduction to analysis of algorithm in computer science
tissandavid
 
Presentation for computer studing in algorithm
Presentation for computer studing in algorithmPresentation for computer studing in algorithm
Presentation for computer studing in algorithm
445220virt
 
Ds03 part i algorithms by jyoti lakhani
Ds03 part i algorithms   by jyoti lakhaniDs03 part i algorithms   by jyoti lakhani
Ds03 part i algorithms by jyoti lakhani
jyoti_lakhani
 
Algorithm - A set of rules for solving operations
Algorithm - A set of rules  for solving operationsAlgorithm - A set of rules  for solving operations
Algorithm - A set of rules for solving operations
Kumari99
 
DAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithmsDAA INTRO.pdf of design analysis algorithms
DAA INTRO.pdf of design analysis algorithms
VaishnaviDappu
 
Ds03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhaniDs03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhani
jyoti_lakhani
 
Architecture Algorithm Definition
Architecture Algorithm DefinitionArchitecture Algorithm Definition
Architecture Algorithm Definition
Gaditek
 
Chp-1 DAA (2).pptx design analysis and algoritham presentation
Chp-1 DAA (2).pptx design analysis and algoritham presentationChp-1 DAA (2).pptx design analysis and algoritham presentation
Chp-1 DAA (2).pptx design analysis and algoritham presentation
vaishnavbhavna17
 
Design and Analysis of Algorithm for II year Computer science and Engineering...
Design and Analysis of Algorithm for II year Computer science and Engineering...Design and Analysis of Algorithm for II year Computer science and Engineering...
Design and Analysis of Algorithm for II year Computer science and Engineering...
Kalpana Devi M
 
11 Unit 1 Problem Solving Techniques
11  Unit 1 Problem Solving Techniques11  Unit 1 Problem Solving Techniques
11 Unit 1 Problem Solving Techniques
Praveen M Jigajinni
 
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDFFDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
AlthimeseAnderson
 
Chapter 3 introduction to algorithms handouts (with notes)
Chapter 3 introduction to algorithms handouts (with notes)Chapter 3 introduction to algorithms handouts (with notes)
Chapter 3 introduction to algorithms handouts (with notes)
mailund
 
Ad

Recently uploaded (20)

apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...
apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...
apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...
apidays
 
MICROSOFT POWERPOINT AND USES(BEST)..pdf
MICROSOFT POWERPOINT AND USES(BEST)..pdfMICROSOFT POWERPOINT AND USES(BEST)..pdf
MICROSOFT POWERPOINT AND USES(BEST)..pdf
bathyates
 
apidays New York 2025 - The Future of Small Business Lending with Open Bankin...
apidays New York 2025 - The Future of Small Business Lending with Open Bankin...apidays New York 2025 - The Future of Small Business Lending with Open Bankin...
apidays New York 2025 - The Future of Small Business Lending with Open Bankin...
apidays
 
apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)
apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)
apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)
apidays
 
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays
 
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays
 
Pause Travail 22 Hostiou Girard 12 juin 2025.pdf
Pause Travail 22 Hostiou Girard 12 juin 2025.pdfPause Travail 22 Hostiou Girard 12 juin 2025.pdf
Pause Travail 22 Hostiou Girard 12 juin 2025.pdf
Institut de l'Elevage - Idele
 
Media_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdfMedia_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdf
OlhaTatokhina1
 
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdfMEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
OlhaTatokhina1
 
Retort Instrumentation laboratory practi
Retort Instrumentation laboratory practiRetort Instrumentation laboratory practi
Retort Instrumentation laboratory practi
ADINDADYAHMUKHLASIN
 
[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf
[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf
[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf
Eddie Lee
 
apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...
apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...
apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...
apidays
 
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays
 
apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...
apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...
apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...
apidays
 
apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...
apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...
apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...
apidays
 
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...
apidays
 
Mining Presentation Online Courses for Student
Mining Presentation Online Courses for StudentMining Presentation Online Courses for Student
Mining Presentation Online Courses for Student
Rizki229625
 
METHODS OF DATA COLLECTION (Research methodology)
METHODS OF DATA COLLECTION (Research methodology)METHODS OF DATA COLLECTION (Research methodology)
METHODS OF DATA COLLECTION (Research methodology)
anwesha248
 
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays
 
BODMAS-Rule-&-Unit-Digit-Concept-pdf.pdf
BODMAS-Rule-&-Unit-Digit-Concept-pdf.pdfBODMAS-Rule-&-Unit-Digit-Concept-pdf.pdf
BODMAS-Rule-&-Unit-Digit-Concept-pdf.pdf
SiddharthSean
 
apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...
apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...
apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...
apidays
 
MICROSOFT POWERPOINT AND USES(BEST)..pdf
MICROSOFT POWERPOINT AND USES(BEST)..pdfMICROSOFT POWERPOINT AND USES(BEST)..pdf
MICROSOFT POWERPOINT AND USES(BEST)..pdf
bathyates
 
apidays New York 2025 - The Future of Small Business Lending with Open Bankin...
apidays New York 2025 - The Future of Small Business Lending with Open Bankin...apidays New York 2025 - The Future of Small Business Lending with Open Bankin...
apidays New York 2025 - The Future of Small Business Lending with Open Bankin...
apidays
 
apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)
apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)
apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)
apidays
 
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays
 
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays
 
Media_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdfMedia_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdf
OlhaTatokhina1
 
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdfMEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
OlhaTatokhina1
 
Retort Instrumentation laboratory practi
Retort Instrumentation laboratory practiRetort Instrumentation laboratory practi
Retort Instrumentation laboratory practi
ADINDADYAHMUKHLASIN
 
[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf
[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf
[Eddie Lee] Capstone Project - AI PM Bootcamp - DataFox.pdf
Eddie Lee
 
apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...
apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...
apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...
apidays
 
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays
 
apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...
apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...
apidays New York 2025 - Building Agentic Workflows with FDC3 Intents by Nick ...
apidays
 
apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...
apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...
apidays New York 2025 - Breaking Barriers: Lessons Learned from API Integrati...
apidays
 
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...
apidays
 
Mining Presentation Online Courses for Student
Mining Presentation Online Courses for StudentMining Presentation Online Courses for Student
Mining Presentation Online Courses for Student
Rizki229625
 
METHODS OF DATA COLLECTION (Research methodology)
METHODS OF DATA COLLECTION (Research methodology)METHODS OF DATA COLLECTION (Research methodology)
METHODS OF DATA COLLECTION (Research methodology)
anwesha248
 
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays
 
BODMAS-Rule-&-Unit-Digit-Concept-pdf.pdf
BODMAS-Rule-&-Unit-Digit-Concept-pdf.pdfBODMAS-Rule-&-Unit-Digit-Concept-pdf.pdf
BODMAS-Rule-&-Unit-Digit-Concept-pdf.pdf
SiddharthSean
 
Ad

QULITIES OF A GOOD ALGORITHM

  • 1. Algorithms Chapter 10 What's The Pla Algorithmic Thin
  • 2. Problem Solving Your roommate, who is taking Information Technology II class, is in a panic. He is worried that he might lose his financial aid if his average goes under 6.0 How can he figure out what his current Average is? How can you build a process that any student can use to tell them what average they have based on grades provided thus far?
  • 3. Algorithm Development Objectives  At the end of this unit the student will:  define the term algorithm  state 5 properties of a good algorithm  from a given problem and stated audience, create an appropriate algorithm using the properties stated above.  use the concept of abstraction and top-down design in creating an algorithm.  begin to think about the kinds of problems that have a computing solution.
  • 4. Problem Solving 1. Understand the problem (and the audience) 1. Are you making a pie? 2. Needing directions? 3. Putting together a piece of equipment? 4. Trying to solve a mathematical puzzle? 2. Devise a plan 1. Is this similar to something else? 2. Who is the audience for the solution? 3. What are the required steps?
  • 5. Problem Solving ( Cont’d ) 3. Carry out the plan (implement) 1. Does it work? 2. Is each step correct? Necessary? 3. Is the solution accurate? (Correct) 1. Will it always lead to a solution
  • 6. Algorithm Definition  A logical sequence of steps for solving a problem, …  From http://Dictionary.msn.com  Dale and Lewis:  a plan of solution for a problem  Algorithm – An unambiguous (and precise) set of steps for solving a problem (or sub-problem) in a finite amount of time using a finite amount of data.
  • 7. Algorithm Definition, cont  Shackelford, Russell L. in Introduction to Computing and Algorithms –  “An algorithm is a specification of a behavioral process. It consists of a finite set of instructions that govern behavior step-by-step.”
  • 8. Notice  Notice the term finite. Algorithms should lead to an eventual solution.  Step by step process. Each step should do one logical action.
  • 9. Algorithms  Algorithms are addressed to some audience. Consider:  A set of instructions for building a child’s bicycle.  A diagnostic checklist for a failure of some system on the space shuttle.  The algorithm for what to do when a nuclear reactor begins to overheat.  An algorithm that will run on a computer system to calculate student GPA’s.
  • 10. Audience  Each audience will have its own “rules” that govern how we will address them, the language that they speak.  Each audience will have certain assumptions about what they know and don’t know.  An audience might include people or a computer.
  • 11. Good vs. Bad Algorithms  All algorithms will have input, perform a process, and produce output.  A good algorithm should be:  Simple - relative  Complete – account for all inputs & cases  Correct (Right)  should have appropriate levels of Abstraction. – grouping steps into a single module  Precise  Mnemonic - SCRAP
  • 12. Precision  Precision means that there is only one way to interpret the instruction. Unambiguous  Words like “maybe”, “sometimes” and “occasionally” have no business in a well developed algorithm.  Instead of “maybe”, we can specify the exact circumstances in which an action will be carried out.
  • 13. Simplicity  Simple can be defined as having no unnecessary steps and no unnecessary complexity. (You may lose points if your algorithm contains unnecessary steps)  Each step of a well developed algorithm should carry out one logical step of the process.  Avoid something like: “Take 2nd right after you exit at King Street”
  • 14. It has Levels of Abstraction.  From the Oxford English Dictionary, abstraction is defined as:  “The act or process of separating in thought, of considering a thing independently of its associations; or a substance independently of its attributes; or an attribute or quality independently of the substance to which it belongs.”  Example: Add all the scores then divide the sum by the number of students to get the average.
  • 15. Or in other words  The abstraction property lets us view an algorithm as a series of high level aggregate steps, with the detail hidden in a lower level.
  • 16. Abstraction, cont.  Instead of approaching a problem and worrying about each and every thing you must do to solve the problem, you can begin to look at the major steps. (Top down design)  After the major steps, you can begin to fill in how you would accomplish the major step.  That fill in may lead to the need for additional levels to fill in those details, etc.  Top down design.
  • 17. DiagrammaticallyDrivethecarto school Get directions Start the car Follow the directions Get parking pass Drive to the destination Turn left out of your driveway At the next light, turn right. At the intersection with I- 66, take the on-ramp for I-66 West … Level 1 Level 2 Level 3Find a place to park Stop the car
  • 18. Other algorithm attributes  A good algorithm should be correct.  A good algorithm should be complete.  Shackelford again, “To be correct, an algorithm must produce results that are correct and complete given any and all sets of appropriate data.”  And to be correct, an algorithm must proceed through to a conclusion.
  • 19. Steps from Schaum’s  Analyze the problem and develop the specification.  Design the solution  Test the solution as part of the design steps.  Implement the program (code the program)  Test the program  Validate the program (further extensive testing) to insure it works under all circumstances.
  • 20. For example:  For example, a student is taking 4 classes:  Spanish – 4 credits – 6  English – 1 credit – 9  Computer Science – 3 credits – 86  P.E. – 3 credits – 5  What is the student’s semester average?  How did you figure it out?  How can you describe that process for others in the class?