1 / 19

Coen 352 – summer 2019

Coen 352 – summer 2019. Tutorial Session 1. Session outline. Complexity analysis Working with java on eclipse. What is Algorithms? What do we mean by Complexity ? How to measure Complexity ?. Analysis and Complexity of Algorithms:.

Download Presentation

Coen 352 – summer 2019

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Coen 352 – summer 2019 Tutorial Session 1

  2. Session outline • Complexity analysis • Working with java on eclipse

  3. What is Algorithms? What do we mean by Complexity ? How to measure Complexity ? Analysis and Complexity of Algorithms:

  4. Algorithm is a sequence of computational steps that transform the input into the output. To analyze an algorithm is to determine the amount of resources (such as time and storage) necessary to execute it. The complexity of an algorithm is the cost, measured in running time, or storage, or whatever units are relevant, of using the algorithm to solve one of those problems. Analysis and Complexity of Algorithms

  5. Asymptotic Notations: Big O

  6. Asymptotic Notations: Big Ω

  7. Asymptotic Notations: Big Θ

  8. To compute the sum of all integers from i to n: Properties of: LogarithmsExponentials Important reviews:

  9. Exercise 1

  10. Exercise 2

  11. Exercise 3

  12. Exercise 4

  13. Command line argument • Can use the terminal: but we need to compile then run the code: • To compile : javacmyfile.java • To run : java myfile arg1 arg2 ...argn • Can also use eclipse command line mode: what we will see.

  14. Java with eclipse: create project

  15. Java with eclipse: create a class

  16. Use the command line argument

  17. Use the command line argument

  18. Write a function that takes an array as input and computes the sum of all its term. Print the sum after you compute it. You should use the command line arguments to provide the list of values of your array. Exercise

  19. further studies • https://www.youtube.com/watch?v=JPyuH4qXLZ0 • Limit to show big oh notations: http://web.mit.edu/broder/Public/asymptotics-cheatsheet.pdf

More Related