Algorithm description
Download
1 / 12

- PowerPoint PPT Presentation


  • 213 Views
  • Updated On :

Algorithm Description. Dinky Database Dantai. The Dinky Database Dantai has received an unreasonable number of complaints about the speed of their Zip Code sorting procedure DDD has hired you as a contractor.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '' - vincent


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Dinky database dantai l.jpg
Dinky Database Dantai

  • The Dinky Database Dantai has received an unreasonable number of complaints about the speed of their Zip Code sorting procedure

  • DDD has hired you as a contractor.

    • In particular, they want you to analyze their system and determine what is slowing down the procedure.

    • Once you have determined the problem, they would like you to recommend a solution to fix the problem.


Bubble sort l.jpg
Bubble Sort

  • Upon examining the sorting algorithm, you have determined that DDD is using Bubble Sort to sort its data.

  • As a knowledgeable individual on the subject of sorting algorithms, you are aware of a number of more efficient alternatives.


Zip code sorting l.jpg
Zip Code sorting

  • Note: DDD’s records include:

    • 5 digit US Zip Codes

      • 95064

    • 9 digit numeric US Zip Codes

      • 95064-0028

    • 6 digit alpha-numeric Canadian Zip codes

      • V8V 1X1


Choosing your algorithm l.jpg
Choosing your Algorithm

  • Solid choices: Merge sort or Quicksort

    • For students with a limited programming background, Quicksort is slightly easier to understand and explain.

  • Other choices:

    • Radix sort

    • Bucket sort

    • Heap sort


Writing for multiple audiences l.jpg
Writing for Multiple Audiences

  • You have two basic writing tasks:

    • An Executive Summary for the Manager in charge of deciding whether to authorize the change.

    • An Implementation section for the programmers who will be writing the new algorithm.


Executive summary l.jpg
Executive Summary

  • This manager may or may not have any technical expertise.

    • His or her last experience with mathematics beyond Algebra may have been in High School.

    • Any explanations like “Quicksort’s best-case performance works in O(n log n), as opposed to Bubble Sort’s O(n2)”may as well be written in Esperanto.

  • Focus more on why your replacement algorithm is efficient than why Bubble Sort is inefficient.


Executive summary cont l.jpg
Executive Summary (cont.)

  • Present your arguments in terms the Executive is interested in.

    • Faster.

    • Less expensive.

    • Easy to implement.

  • The Executive Summary should be brief.

    • Typically 1-2 pages.


  • Implementation l.jpg
    Implementation

    • You are writing to Novice programmers.

    • You don’t know what system they’re writing for, or what programming language they’re using.

    • Your job is to explain how the algorithm works, not to program it for them.


    Implementation cont l.jpg
    Implementation (cont.)

    • Define your terms:

      • Recursion

        • If you are recommending a recursive algorithm, you will need to define recursion. (Most sorting algorithms use recursion)

      • Divide and Conquer

        • Again, not all sorting algorithms use this technique, but for those that do, explain the term.


    Illustrations and figures l.jpg
    Illustrations and Figures

    • A simple graph can describe rather eloquently how efficient your algorithm can be.

      • Make certain your graph will be clear to its intended audience.

    • Examples of your sorting algorithm can help the reader understand.

      • Give a short list of numbers and demonstrate how your sorting algorithm would sort them, step by step.

      • You are free to make your own examples, or borrow (properly cited) examples from the internet or elsewhere.


    Pseudo code l.jpg
    Pseudo-code

    • It is acceptable to use short bits of Pseudo-code to demonstrate your methods.

    • Do not use long sections of Pseudo-code.

      • Your job is to explain how the process works, not to write the program for them.

    • In short, you can use Pseudo-code to illustrate something you’ve explained in English.

      • But you may not simply write out the Pseudo-code for the process and then explain it line by line.


    ad