DOC PREVIEW
IUPUI CSCI 23000 - Models of Computation

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Models of Computation - AlgorithmsAlgorithmsDefinition of AlgorithmExamples of AlgorithmSlide 5Dale RobertsDepartment of Computer and Information Science,Department of Computer and Information Science,School of Science, IUPUISchool of Science, IUPUICSCI 230Models of ComputationModels of Computation - Algorithms - AlgorithmsDale Roberts, LecturerComputer Science, IUPUIE-mail: [email protected] RobertsAlgorithmsAlgorithmsComputer Science is a study of algorithms, which Computer Science is a study of algorithms, which includes:includes:their formal mathematical propertiestheir formal mathematical propertiestheir hardware realizationstheir hardware realizationstheir linguistic realizationstheir linguistic realizationstheir applicationstheir applicationsTherefore, our task is to:Therefore, our task is to:design and develop algorithms to solve problemsdesign and develop algorithms to solve problemsstudy the algorithms to see if they are study the algorithms to see if they are correctcorrect or or efficientefficientdesign and build computer systems which can execute design and build computer systems which can execute these algorithmsthese algorithmsdesign programming languages and translate algorithms design programming languages and translate algorithms into these languagesinto these languagesDale RobertsDefinition of AlgorithmDefinition of AlgorithmCentral Premise of Computer Science: Central Premise of Computer Science: “If we can specify an algorithm for a “If we can specify an algorithm for a problem, then we can automate its problem, then we can automate its solution”solution”Definition of an AlgorithmDefinition of an Algorithmconsists of consists of unambiguousunambiguous & & computablecomputable operations operationsproduce a produce a resultresulthalthalt in a finite amount of time. (Some scientists add a in a finite amount of time. (Some scientists add a restriction that the algorithm must halt in a restriction that the algorithm must halt in a reasonablereasonable amount of time.)amount of time.)Dale RobertsExamples of AlgorithmExamples of AlgorithmA good example of an algorithmA good example of an algorithmA recipe for cherry pieA recipe for cherry piestep 1: mix 1 cup sugar, ¼ cup flour, ¼ tsp. saltstep 1: mix 1 cup sugar, ¼ cup flour, ¼ tsp. saltstep 2: stir in ½ cup juice from the cherriesstep 2: stir in ½ cup juice from the cherriesstep 3: Cook & stir over medium heat until thickstep 3: Cook & stir over medium heat until thickstep 4: Add 3 cups canned, pitted red cherriesstep 4: Add 3 cups canned, pitted red cherriesstep 5: Add 1 tblsp. butter & 4 drops almond extractstep 5: Add 1 tblsp. butter & 4 drops almond extractstep 6: Make pie crust & place in a 9 inch pie platestep 6: Make pie crust & place in a 9 inch pie platestep 7: Fill crust with cherry mix & top with 2step 7: Fill crust with cherry mix & top with 2ndnd crust cruststep 8: Bake at 450 step 8: Bake at 450 ooF for 10 mins. then 350 for 45 F for 10 mins. then 350 for 45 mins.mins.Dale RobertsA bad example of an algorithmA bad example of an algorithmHow to use shampoo XYXHow to use shampoo XYXstep 1: Wet hairstep 1: Wet hairstep 2: Latherstep 2: Latherstep 3: Rinsestep 3: Rinsestep 4: Repeatstep 4: RepeatWhat is wrong with algorithm?What is wrong with


View Full Document

IUPUI CSCI 23000 - Models of Computation

Download Models of Computation
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Models of Computation and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Models of Computation 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?