Algorithms: The recipe for computation What is an algorithm?

Slides:



Advertisements
Similar presentations
1.02 C Work Plans 1 The secret for success!. Why use a work plan? It is important to use a work plan to help meal preparation run smoothly. To implement.
Advertisements

Parts of a Recipe.
Food Preparation Basics
Understanding Recipes
FFT ch. 46 Describe the 6 different types of cookies. Give examples of each. Why should you avoid over-working cookie dough when making molded cookies?
© 2011 wheresjenny.com How to bake a cake?. © 2011 wheresjenny.com Here are some words about baking for you to learn. boil – to cook in boiling water.
Next. Ingredients for your Chocolate Brownies Your ingredients for your Chocolate Brownie 3/4 cup cocoa, unsweetened 1/2 teaspoon baking soda 2/3 cup.
1.What two types of batters does this make and what baked goods will it be used for? 2.What happens if you overmix the batter? 3.If you overmix the muffins.
In Thunder Cake, what weather conditions did the characters need in order to bake their cake? A thunder storm!
Double Chocolate Brownies By: Ryan Lockett-Goode.
By: Amber Newcomb. 1 cup of granulated sugar 3/4 cup of butter or 1 ½ sticks 1 cup of firmly packed light brown sugar 3 large eggs 1 teaspoon vanilla.
INGREDIENTS KITCHEN UTENSILS. FIRST, WE COLLECT THE INGREDIENTS AND THE KITCHEN UTENSILS. INGREDIENTS: ONE PACKET OF BUTTER TWO CUPS OF SUGAR ONE LEMON.
1.02 I Preparation Tasks List
The Tastier Food Is Not Always the Better Choice By: Mia Scutti & Sara Takhim.
© 2011 wheresjenny.com BROWNIES SERVINGS: 16 PIECES PREPARATION TIME : ONE HOUR.
By: Shaelyn Laurie How To Bake A Cake. Step 1: The Recipe Ingredients 2 cups (500 mL) sugar 4 eggs 2-1/2 cups (625 mL) all-purpose flour 1 cup (250 mL)
Cake Recipe. Ingredients Utensils 1 st Step Pre-Heat oven to 180 degrees Celsius.
How to read a recipe – the basics!. HOW TO READ A RECIPE Baking and cooking are two very different kitchen skills. Generally speaking, you bake cakes,
Cinnamon Buns CINNAMON BUNS 1 c. luke-warm water (temp____) 2 pkg. dry active yeast ½ c. granulated sugar 5 T. margarine 1 T. salt ¾ c. boiling water 5.
Spicy Tomato Soup Ingredients 1 onion 500ml water 1 carrot 1 stock cube 1 potato ½ x 5ml spoon dried chilli flakes 1 x can chopped tomatoes (400g) 1 x.
Standards of Measurement A.Abbreviations 1.T or Tbsp 2.t or tsp 3.c 4.pt 5.qt 6.gal 7.oz 8.lb 9.f. g. 10.L T.
How to make a pancake By Sophie Draper. Ingredients: Frying pan Large Mixing Bowl Long handled spatula Mixing Spoon 2 Eggs 2 cups of flour 2 ¾ cups of.
By A Group Making pancakes a visual diary. Firstly we had to find a recipe for pancakes. We searched on Google and found one on It.
Algorithms: The recipe for computation What is an algorithm?
Lesson : Cookies & Cakes. One Bowl Method One Bowl Method: – All the ingredients are mixed in easy stages in the same bowl, so cleaning up is quicker.
RECIPE. NAME: Three chocolates cake. INGREDIENTS 3 cups 1 1/2 tsp 3/4 tsp 1 1/2 tsp 2 2/3 cups 1 cup + 2 Tb 1 cup + 2 Tb 1 cup + 2 Tb 5 large or 4 Jumbo.
GA Standards BCS-CMW-16 Students will discuss examples that identify the broad interdisciplinary utility of computers and algorithmic problem solving in.
Algorithms: The recipe for computation What is an algorithm?
THE PARTS OF A RECIPE.
Made by Doglyad Helen. Mafioso Chocolate Cake with La Famiglia Chocolate Frosting is just as rich as the Don himself. Surrounded by the best ingredients.
Following a Recipe The do’s and don’ts!. If you were taking a road trip to some place you had never been to before, what would you want to take with you?
The Algorithmic Model. What is Computer Science What is Programming Algorithms –Definition –Properties of Good Algorithms –Describing Algorithms –Examples.
How to Bake Brownies Julie Galbraith FVP12. Supplies Needed An Oven A Pan Butter Salt Flour Sugar Cocoa Vanilla Baking Powder Eggs Spoons Measuring Cups.
Three basic types of Icing?. The three types of icings are:  B Butter Cream  Fondant lat Icing.
Making Banana Bread Muffins A Guided Highlighted Reading with a recipe.
Aim: Forms 1040EZ & 1040A Course: Math Literacy Do Now: What does IRS stand for? Aim: How do taxpayers report their income to the government?
How to make a BIG sponge cake! By Gina kinsman.. Ingredients! You will need: ½ cup of milk 2 teaspoons & table spoons of unsalted butter 8 large eggs.
THAT WAS A PIECE OF CAKE “Show Me How” By: Kathryn Stone.
Following a Recipe The do’s and don’ts! Original Author Unknown Modified By: CTAE Resource Network.
Pancakes. Person 1 In a medium size bowl measure 1 c flour 2 T sugar 2 tsp baking powder 3/4 tsp salt - mix thoroughly.
FROM SCRATCH UTENSILS NEEDED Original recipe makes 1 - 9x13 inch cake 9X13 Dish Pan Large Bowl.
How-To Make Banana Bread Kindergarten made Banana Bread to share with parents on the Conference Days.
Are you ready to bake???? Coconut BallsChocolate Chip Cookies.
Reading Recipes Unscramble the following sentence: “Reebof uyo can eb a dgoo okco, uyo tmsu sitrf eanrl ot aerd a eeiprc.” “Before you can be a good cook,
The 5 Parts of a Recipe Obj. F2.01 Remember recipe parts & resources.
Grease and lightly flour an 8x8x2-inch baking pan. Melt chocolate and butter; cool. Stir together flour, baking powder, and ¼ teaspoon salt. In a mixer.
By: Brianna Battista HOW TO MAKEBROWNIES!!!
Name: MOHD NORZAT BIN SABRAN Id Number: BO1SPM14F035 Class: SPM2A Tittle: HOW TO MAKE PANCAKES Lecturer: MISS GURMINDERJEET KAUR.
Lesson EZ Instructions. Round all values To the nearest dollar.
Chocolate cake. Ingredients 140g or 5oz Self-raising flour 60g or 2oz Cocoa powder 340g or 12oz butter or soft margarine 170g or 6oz Caster sugar 3 medium.
Ingredients 1’1/3 cup (150 g) all-purpose flour 1’½ cup (330 g) sugar 4 tablespoons unsweetened cocoa powder 1 teaspoon baking powder 1 teaspoon vanilla.
CHOCOLATE CAKE by: Sean and Lorenzo. CHOCOLATE CAKE Chocolate Cake Ingredients: 3/4 cups butter or margarine, softened. 3 eggs. 2 cups sugar. 2 cups flour.
How to Make Peanut Blossom Cookies By Aubrey Hillman November English 393.
Individual Chocolate Layer Cakes
How to Make a Cake Mrs. Janasik.
OTTW Project Afraa Haque
Following a Recipe The do’s and don’ts! Original Author Unknown
1.02 C Work Plans The secret for success! 1.02C Work Plans.
Algorithms: The recipe for computation
Change is Delicious!.
Cooking a traditional dish (Yeast pancakes)
Recipes, Videos, and Notes
Recipes.
Recipe By Errol and Zion
½ cup packed brown sugar
SCIENCE ON FRIDAYS.
Cinnamon rolls Using the yeast dough.
Fudgy Chocolate Brownies Recipe
1.02 C Work Plans The secret for success! 1.02C Work Plans.
Algorithms: The recipe for computation
Presentation transcript:

Algorithms: The recipe for computation What is an algorithm?

Algorithms An algorithm is “a precise rule (or set of rules) specifying how to solve some problem.” (thefreedictionary.com) Mohammed al-Khowarizmi (äl-khōwärēz´mē), Arab mathematician of the court of Mamun in Baghdad…the word algorithm is said to have been derived from his name. Much of the mathematical knowledge of medieval Europe was derived from Latin translations of his works. (encyclopedia.com) The study of algorithms is one of the key foundations of computer science.

A recipe is an algorithm ½ cup of butter or margarine 1 teaspoon of vanilla extract 1 cup of sugar ½ cup of unsweetened cocoa 2 eggs ½ cup of flour 1. If butter or margarine is not melted, melt in a bowl in microwave for 30 seconds at high power. 2. Blend melted butter or margarine and sugar until the mixture has a creamy consistency. 3. Add eggs & vanilla, and stir the mixture 60 times. 4. Add cocoa and flour. 5. Mix until well blended. 6. Pour into greased round glass cake pan. 7. Microwave for 8 to 9 minutes on 50% power. Brownies will be done when they are slightly moist on top and pull away from the side of the pan. Serves: 4 -- adapted from yumyum.com

The tax code is an algorithm Write your total wages from your W-2 statements on Line 1. Add up all the interest amounts from your 1099-INT forms and put the total on Line 2. Gather all your 1099-G statement from the state agency that paid you unemployment compensation. Put the figure from the 1099-G on Line 3. If you received Alaska Permanent Fund dividends only, put the figure reported to you by the State of Alaska on Line 3. If you have both unemployment and Alaskan dividends, add the two figures together and put the total on Line 3. Add lines 1, 2 and 3 to determine your Adjusted Gross Income (AGI) and write this on Line 4. Determine your personal exemptions for Line 5. If you are being claimed as a dependent, check the "Yes" box on Line 5. Otherwise, check the "No" box on Line 5. If you are unmarried, or you are married and you are not filing a joint return, put the figure $7,950 on Line 5. Otherwise, put the figure $15,900 on Line 5. Subtract Line 5 from Line 4 and write this total in Line 6. This is your taxable income. etc. - Adapted from the US Tax Code Form 1040EZ

Knitting is an algorithm 1. Hold needle with stitches in left hand; insert point of right needle in first stitch, from front to back, just as in casting on. 2. With right index finger, bring yarn from ball under and over point of right needle. 3. Draw yarn through stitch with right needle point. 4. This step now differs from casting on: Slip loop on left needle off, so new stitch is entirely on right needle. 5. This completes one knit stitch. Repeat Steps 1 through 4 in each stitch still on left needle. When the last stitch is worked, one row of knitting is completed and you can move to Step Now measure your work. It should be about 7" wide. If it is too wide, start over and cast on fewer stitches; if it is too narrow, start over and cast on more stitches. - Adapted from learntoknit.com

What does an algorithm need? Input specification Recipes: ingredients, cooking utensils, … Tax Code: wages, interest, tax withheld, … Knitting: size of garment, length of yarn, needles … Input specification for computational algorithms: How much data is required? What kind of data is required? In what form will this data be received by the algorithm?

What does an algorithm need? An algorithm requires clear and precisely stated steps that express how to perform the operations to yield the desired results. Algorithms assume a basic set of primitive operations that are assumed to be understood by the executor of the algorithm. Recipes: beat, stir, blend, bake, … Tax code: deduct, look up, check box, … Knitting: casting on, slip loop, draw yarn through,... Computational: add, set, modulo, output, …

What does an algorithm need? Output specification Recipes: number of servings, how to serve Tax Code: tax due or tax refund, where to pay Knitting: final garment shape Output specification for computational algorithms: What results are required? How should these results be reported? What happens if no results can be computed due to an error in the input? What do we output to indicate this?

What makes a “good” algorithm? A good algorithm should produce the correct outputs for any set of legal inputs. A good algorithm should execute efficiently with the fewest number of steps as possible. A good algorithm should be designed in such a way that others will be able to understand it and modify it to specify solutions to additional problems

Making a Peanut Butter & Jelly Sandwich Input: slices of bread, jar of peanut butter, jar of jelly, 2 knives 1. Pick up one piece of bread. 2. Get peanut butter out of the jar and spread it evenly over one side of the bread. 3. Repeat step 2 for another piece of bread. 4. Pick up one of the pieces of bread with peanut butter on it. 5. Get jelly out of the jar. 6. Spread the jelly on the side of the bread already covered in peanut butter. 7. Put the two pieces of bread together to make your sandwich. Output?