cs 330 algorithms n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CS 330: Algorithms PowerPoint Presentation
Download Presentation
CS 330: Algorithms

Loading in 2 Seconds...

play fullscreen
1 / 9

CS 330: Algorithms - PowerPoint PPT Presentation


  • 61 Views
  • Uploaded on

CS 330: Algorithms. Gene Itkis. Algorithms: What?. Systematic procedure that produces — in a finite number of steps — the solution of a problem Encyclopædia Britannica Euclid (300 BC): gcd algorithm Other examples (that you already know/use) : Division, multiplication Sorting/searching

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 'CS 330: Algorithms' - joan-craft


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
algorithms what
Algorithms: What?
  • Systematic procedure that produces—in a finite number of steps—the solution of a problemEncyclopædia Britannica
  • Euclid (300 BC): gcd algorithm
  • Other examples (that you already know/use):
    • Division, multiplication
    • Sorting/searching

Gene Itkis

algorithms why
Algorithms: Why?
  • Performance
  • Structure/Modularity
    • Maintanability + Extensibility + Robustness
    • Simplicity
  • Correctness
    • Reliability
  • Scalability
  • Predictability
  • Job security

Gene Itkis

algorithms why take 2
Algorithms: Why? (take 2)
  • Web/Internet:
    • Searching
      • sorting, selection, search trees, matrix computation, …
    • Networking & Routing
      • Shortest path, MST, connectivity, nearest neighbors, flow, …
    • Communication
      • Data compression, error-detecting/correcting codes
    • Security/Cryptography
      • Large numbers arithmetic, primes generation, RSA, …
      • IDS/Firewalls: string matching, finite automata,…

Gene Itkis

algorithms why take 21
Algorithms: Why? (take 2)
  • Image, Video, Audio
    • JPEG, MPEG, fractal coding,…
  • Graphics
    • Geometric algorithms, ray tracing, …
  • Biology
    • String alignment, DNA sequencing, …
  • Scientific simulations
    • Eigenvalues, triangulation, …
  • Other/everywhere
    • Optimization, linear programming, …
    • Scheduling

Gene Itkis

algorithms how
Algorithms: How?
  • This course, of course 
  • From bureaucrats to machines
    • Precision
    • Structure:
      • Modularity
      • Layers of abstraction
  • Analysis: proofs
  • Learn from Examples

Gene Itkis

problem statement
Problem statement
  • Input/output
    • Sorting
      • Input: Array[1…n] of n elements in arbitrary order
      • Output: Array[1…n] of the same n elements but in the non-decreasing order
  • Access methods
    • Dictionary
      • New() : creates a new empty dictionary
      • Insert(x, key) : inserts record x under the key
      • Find(key) : returns element x which was previously Inserted under the key (nil, if none)

Gene Itkis

sorting review from cs112
Sorting (review from cs112+)
  • Strategies
    • Greedy
    • Divide & Concur
  • Reduction
    • From a “bigger”/harder problem to a “smaller”/simpler one
  • Analysis
    • Recurrences
  • Do not forget details of implementation
    • Link-lists or Arrays?

Gene Itkis

selection sort
Selection Sort
  • Idea
  • Algorithm:
    • for i= 1 to n do// find min element in A[i...n]// and put it in the i'th position (i.e. at A[i])
      • min_index <-- i
      • //locate minfor j= i+1 to n do
        • if A[j] < A[min_index] then min_index <-- j
      • //put the min where it belongsswap( A[i], A[min_index] )

2

5

3

1

7

6

4

Gene Itkis