1 / 5

Models of Computation - Algorithms

Department of Computer and Information Science, School of Science, IUPUI. Models of Computation - Algorithms. CSCI 230. Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu. Algorithms. Computer Science is a study of algorithms, which includes:

leeljohnson
Télécharger la présentation

Models of Computation - Algorithms

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. Department of Computer and Information Science,School of Science, IUPUI Models of Computation - Algorithms CSCI 230 Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu

  2. Algorithms • Computer Science is a study of algorithms, which includes: • their formal mathematical properties • their hardware realizations • their linguistic realizations • their applications • Therefore, our task is to: • design and develop algorithms to solve problems • study the algorithms to see if they are corrector efficient • design and build computer systems which can execute these algorithms • design programming languages and translate algorithms into these languages

  3. Definition of Algorithm Central Premise of Computer Science: “If we can specify an algorithm for a problem, then we can automate its solution” • Definition of an Algorithm • consists of unambiguous & computable operations • produce a result • halt in a finite amount of time. (Some scientists add a restriction that the algorithm must halt in a reasonable amount of time.)

  4. Examples of Algorithm • A good example of an algorithm • A recipe for cherry pie • step 1: mix 1 cup sugar, ¼ cup flour, ¼ tsp. salt • step 2: stir in ½ cup juice from the cherries • step 3: Cook & stir over medium heat until thick • step 4: Add 3 cups canned, pitted red cherries • step 5: Add 1 tblsp. butter & 4 drops almond extract • step 6: Make pie crust & place in a 9 inch pie plate • step 7: Fill crust with cherry mix & top with 2nd crust • step 8: Bake at 450 oF for 10 mins. then 350 for 45 mins.

  5. A bad example of an algorithm • How to use shampoo XYX • step 1: Wet hair • step 2: Lather • step 3: Rinse • step 4: Repeat • What is wrong with algorithm?

More Related