SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
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.
Diagrammatically
                       Get directions          Turn left out of your
 Drive the car to




                                                     driveway
                       Start the car
                                            At the next light, turn right.
     school




                    Follow the directions
                                             At the intersection with I-
                     Get parking pass        66, take the on-ramp for
                                                     I-66 West
                        Drive to the
                        destination                     …
Level 1             Find a place to park             Level 3

                        Stop the car
                          Level 2
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?

Contenu connexe

Tendances

data structures- back tracking
data structures- back trackingdata structures- back tracking
data structures- back trackingAbinaya B
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesFahim Ferdous
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptracha49
 
Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Ra'Fat Al-Msie'deen
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy methodhodcsencet
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy AlgorithmWaqar Akram
 
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
 
Divide and Conquer - Part 1
Divide and Conquer - Part 1Divide and Conquer - Part 1
Divide and Conquer - Part 1Amrinder Arora
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit Katiyar
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceRamla Sheikh
 

Tendances (20)

data structures- back tracking
data structures- back trackingdata structures- back tracking
data structures- back tracking
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
 
Operator precedence
Operator precedenceOperator precedence
Operator precedence
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
 
Greedy Algorithm
Greedy AlgorithmGreedy Algorithm
Greedy Algorithm
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
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
 
Fundamental of Algorithms
Fundamental of Algorithms Fundamental of Algorithms
Fundamental of Algorithms
 
Hill climbing
Hill climbingHill climbing
Hill climbing
 
Divide and Conquer - Part 1
Divide and Conquer - Part 1Divide and Conquer - Part 1
Divide and Conquer - Part 1
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
 

Similaire à 03 algorithm properties

QULITIES OF A GOOD ALGORITHM
QULITIES OF A GOOD ALGORITHMQULITIES OF A GOOD ALGORITHM
QULITIES OF A GOOD ALGORITHMabdullahi419
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sitSaurabh846965
 
138755986 problem-solving-methods-ppt
138755986 problem-solving-methods-ppt138755986 problem-solving-methods-ppt
138755986 problem-solving-methods-pptANn Villanueva
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1Abdul Khan
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.pptALIZAIB KHAN
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codehamza javed
 
algorithm design.pptx
algorithm design.pptxalgorithm design.pptx
algorithm design.pptxssuserd11e4a
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniyaTutorialsDuniya.com
 
Algorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdf
Algorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdfAlgorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdf
Algorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdfHoomale
 
PCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptxPCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptxsudharsanm56
 
Introduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptIntroduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptBhargaviDalal4
 
Approaches to teaching primary computing
Approaches to teaching primary computingApproaches to teaching primary computing
Approaches to teaching primary computingJEcomputing
 
Basics of Algorithm Unit 1 part 1 algorithm
Basics of Algorithm Unit 1 part 1  algorithmBasics of Algorithm Unit 1 part 1  algorithm
Basics of Algorithm Unit 1 part 1 algorithmJIMS LAJPAT NAGAR
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESHarshJha34
 

Similaire à 03 algorithm properties (20)

QULITIES OF A GOOD ALGORITHM
QULITIES OF A GOOD ALGORITHMQULITIES OF A GOOD ALGORITHM
QULITIES OF A GOOD ALGORITHM
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
 
138755986 problem-solving-methods-ppt
138755986 problem-solving-methods-ppt138755986 problem-solving-methods-ppt
138755986 problem-solving-methods-ppt
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
 
Algorithm & data structures lec1
Algorithm & data structures lec1Algorithm & data structures lec1
Algorithm & data structures lec1
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.ppt
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
 
algorithm design.pptx
algorithm design.pptxalgorithm design.pptx
algorithm design.pptx
 
Ev681 computing 1
Ev681   computing 1Ev681   computing 1
Ev681 computing 1
 
Algorithm itabq
Algorithm itabqAlgorithm itabq
Algorithm itabq
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniya
 
Problem solving
Problem solvingProblem solving
Problem solving
 
Algorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdf
Algorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdfAlgorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdf
Algorithmic Thinking_ Basics for Gen Z and Gen Alpha.pdf
 
PCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptxPCCF UNIT - 1 - M.Sudharsan.pptx
PCCF UNIT - 1 - M.Sudharsan.pptx
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
Introduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.pptIntroduction to Design Algorithm And Analysis.ppt
Introduction to Design Algorithm And Analysis.ppt
 
Approaches to teaching primary computing
Approaches to teaching primary computingApproaches to teaching primary computing
Approaches to teaching primary computing
 
Basics of Algorithm Unit 1 part 1 algorithm
Basics of Algorithm Unit 1 part 1  algorithmBasics of Algorithm Unit 1 part 1  algorithm
Basics of Algorithm Unit 1 part 1 algorithm
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
 

Plus de Lincoln School

Introduccionalasbasesdedatos
IntroduccionalasbasesdedatosIntroduccionalasbasesdedatos
IntroduccionalasbasesdedatosLincoln School
 
Creando diagramas de flujo con dfd
Creando diagramas de flujo con dfdCreando diagramas de flujo con dfd
Creando diagramas de flujo con dfdLincoln School
 
Tema 4 -_introduccion_a_razonamiento_algoritmico
Tema 4 -_introduccion_a_razonamiento_algoritmicoTema 4 -_introduccion_a_razonamiento_algoritmico
Tema 4 -_introduccion_a_razonamiento_algoritmicoLincoln School
 
Tema 3 metodología para la solución de problemas
Tema 3  metodología para la solución de problemasTema 3  metodología para la solución de problemas
Tema 3 metodología para la solución de problemasLincoln School
 
Tema 1 introducción a la computadora
Tema 1   introducción a la computadoraTema 1   introducción a la computadora
Tema 1 introducción a la computadoraLincoln School
 
Historia de los lenguajes de programación
Historia de los lenguajes de programaciónHistoria de los lenguajes de programación
Historia de los lenguajes de programaciónLincoln School
 
Ciclos y Condicionales - Iterate
Ciclos y Condicionales - IterateCiclos y Condicionales - Iterate
Ciclos y Condicionales - IterateLincoln School
 
Ciclos y Condicionales
Ciclos y CondicionalesCiclos y Condicionales
Ciclos y CondicionalesLincoln School
 
Extendiendo el Lenguaje
Extendiendo el LenguajeExtendiendo el Lenguaje
Extendiendo el LenguajeLincoln School
 
Instrucciones Básicas
Instrucciones BásicasInstrucciones Básicas
Instrucciones BásicasLincoln School
 
Programación 2 - karel1
Programación 2 - karel1Programación 2 - karel1
Programación 2 - karel1Lincoln School
 
Algorithms and flowcharts1
Algorithms and flowcharts1Algorithms and flowcharts1
Algorithms and flowcharts1Lincoln School
 
Collaborative work with google docs
Collaborative work with google docsCollaborative work with google docs
Collaborative work with google docsLincoln School
 

Plus de Lincoln School (17)

Introduccionalasbasesdedatos
IntroduccionalasbasesdedatosIntroduccionalasbasesdedatos
Introduccionalasbasesdedatos
 
Creando diagramas de flujo con dfd
Creando diagramas de flujo con dfdCreando diagramas de flujo con dfd
Creando diagramas de flujo con dfd
 
Tema 4 -_introduccion_a_razonamiento_algoritmico
Tema 4 -_introduccion_a_razonamiento_algoritmicoTema 4 -_introduccion_a_razonamiento_algoritmico
Tema 4 -_introduccion_a_razonamiento_algoritmico
 
Tema 3 metodología para la solución de problemas
Tema 3  metodología para la solución de problemasTema 3  metodología para la solución de problemas
Tema 3 metodología para la solución de problemas
 
Tema 1 introducción a la computadora
Tema 1   introducción a la computadoraTema 1   introducción a la computadora
Tema 1 introducción a la computadora
 
Historia de los lenguajes de programación
Historia de los lenguajes de programaciónHistoria de los lenguajes de programación
Historia de los lenguajes de programación
 
While karel
While karelWhile karel
While karel
 
Html
HtmlHtml
Html
 
Ciclos y Condicionales - Iterate
Ciclos y Condicionales - IterateCiclos y Condicionales - Iterate
Ciclos y Condicionales - Iterate
 
Ciclos y Condicionales
Ciclos y CondicionalesCiclos y Condicionales
Ciclos y Condicionales
 
Extendiendo el Lenguaje
Extendiendo el LenguajeExtendiendo el Lenguaje
Extendiendo el Lenguaje
 
Instrucciones Básicas
Instrucciones BásicasInstrucciones Básicas
Instrucciones Básicas
 
Programación 2
Programación 2Programación 2
Programación 2
 
Programación 2 - karel1
Programación 2 - karel1Programación 2 - karel1
Programación 2 - karel1
 
Algorithms and flowcharts1
Algorithms and flowcharts1Algorithms and flowcharts1
Algorithms and flowcharts1
 
Collaborative work with google docs
Collaborative work with google docsCollaborative work with google docs
Collaborative work with google docs
 
Movie maker
Movie makerMovie maker
Movie maker
 

Dernier

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfROWELL MARQUINA
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 

Dernier (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdf
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 

03 algorithm properties

  • 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. Diagrammatically Get directions Turn left out of your Drive the car to driveway Start the car At the next light, turn right. school Follow the directions At the intersection with I- Get parking pass 66, take the on-ramp for I-66 West Drive to the destination … Level 1 Find a place to park Level 3 Stop the car Level 2
  • 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?