Algorithms Algorithms are a familiar idea. Our goal is to learn to specify them right so someone or something else does the work.

Slides:



Advertisements
Similar presentations
Office Links - Sharing Data in Microsoft Office A Mixed Bag of Treasures Chester N. Barkan Registrar Long Island University, C.W.Post Campus.
Advertisements

College of Information Technology & Design
Grade 6 Hopewell Elementary You will read each slide, then try to think of the answer. When you think you know the answer, click ONCE on the mouse.
Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Algorithmic Thinking What’s the Plan? lawrence snyder c h a p t e r 10.
An Introduction to Forms (continued). The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road.
Basics of Computer Programming Web Design Section 8-1.
Chapter 2 Creating a Research Paper with Citations and References
Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the five essential properties of an algorithm.
Chapter 10 Algorithmic Thinking. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives List the five essential.
Chapter 10 What's The Plan?: Algorithmic Thinking.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS Dr. Zhizhang Shen Chapter 10: How to.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Microsoft Excel 2010 Chapter 7
CS 536 Spring Global Optimizations Lecture 23.
4/25/08Prof. Hilfinger CS164 Lecture 371 Global Optimization Lecture 37 (From notes by R. Bodik & G. Necula)
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
Viewbox 4 Tutorial How to create a Template Please view this tutorial as a Slide Show in PowerPoint, because it contains animations that will not appear.
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
Learning About Technology Chapter 2. 2 Learning New Tools How do you learn to use new tools?  Read the instruction manual Programming a VCR Cooling my.
Microsoft Office Illustrated Fundamentals Unit B: Understanding File Management.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Week 11 Practical: Microsoft Word Theory: Midterm situations.
Chapter 2 Creating a Research Paper with References and Sources
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
1 IT133 Seminar Unit 4 Greetings and Welcome! We will begin IT133 KHE SEMINAR promptly at the appointed time. I look forward to talking with you then!
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Interacting with a UNIX computer: Navigating through the directory tree.
Some quotes…. I really hate this damned machine I wish that they would sell it. It never does quite what I want But only what I tell it. ~Anon These machines.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 8 Personal Productivity and Problem Solving.
By the end of this session you should be able to...
Basic & Advanced Reporting in TIMSNT ** Part Two **
Algorithms CS139 – Aug 30, Problem Solving Your roommate, who is taking CS139, is in a panic. He is worried that he might lose his financial aid.
Algorithms Algorithms are a familiar idea. Our goal is to learn to specify them right so someone or something else does the work.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
PowerPoint Practice Exercise 1 1.Save this file in your AV-TECH Folder as PowerPoint Practice Exercise 1. 2.Open this file in PowerPoint. 3.Edit each slide.
Using Advanced Options Lesson 14 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft Word 2013.
Links take you to…  Different slides in your presentation  A different PowerPoint presentation  Any program - (Word can be used for example to complete.
HTML Concepts and Techniques Fifth Edition Chapter 3 Creating Web Pages with Links, Images, and Formatted Text.
Chapter 10 Algorithmic Thinking. Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the.
Microsoft Word 2010 Chapter 2 Creating a Research Paper with Citations and References.
Algorithms CS280 – 10/20/05. Announcement  Part 1 of project 2 due.  Read chapters 10, 7 for this unit  Tuesday we will also be in the classroom We.
Standard Toolbar Formatting Toolbar Paragraph Indent Markers Formatting Font Style And Font Size Setting Indents Paragraph alignment Paragraph And Line.
Creating and Editing a Web Page
Creating and Editing a Web Page Using Inline Styles
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004.
COMPREHENSIVE PowerPoint Tutorial 5 Applying Advanced Special Effects in Presentations.
Algorithms Sept 4, Tuesday’s Lab You developed an algorithm Input – an 8 ½ x 11 inch piece of paper Audience – Fellow classmates Process – Instructions.
What type of project? I tried three type of project and the only one I managed to obtain the results I wanted was this one. It is more flexible and much.
Shelly Cashman: Microsoft Word 2016
Creating and Editing a Publication
FLOWCHARTS Part 1.
Basics of Computer Programming
Lesson 2 Tables and Charts
Basics of Computer Programming
Basics of Computer Programming
Algorithms Today we will look at: what the word algorithm means
Microsoft Word - Formatting Pages
Chapter 2 Creating a Research Paper with References and Sources
CSCI 1250 Information Technologies
Chapter 10: Algorithm TECH Prof. Jeff Cheng.
What's The Plan?: Algorithmic Thinking
What's The Plan?: Algorithmic Thinking
What's The Plan?: Algorithmic Thinking
Microsoft Office Illustrated Fundamentals
Presentation transcript:

Algorithms Algorithms are a familiar idea. Our goal is to learn to specify them right so someone or something else does the work

Flowcharts Flowcharts are a good way to describe an algorithm

Previous Algorithms Algorithm : a precise, systematic method to produce a specified result We have seen algorithms already... Copy a file from one folder to another Driving instructions to get to your house Filling out your IRS tax return Not every process is an algorithm -- debugging

3 Kinds of Algorithms Today Editing Skills fix a broken web page fix a text with ragged line break keyboard shortcuts Conceptual/ problems making a cup of tea, sorting CDs Drawing problems Turtle graphics prep for JavaScript

Broken Webpage This web page has broken links: mpc01b/ project1

Use Search and Replace What would you search for, and what would you replace it with? (several ways) ? These are sort of algorithms (actually programs)

Text with Ragged Edges Often when copied from web/

MS Word Search/Replace Has feature to work on special formatting marks

Two Attempts First Try Replace ^p with nothing But then you lose paragraph separators (^p^p) Second Try Replace ^p^p with # Replace ^p with nothing Replace # with ^p^p

Properties of Algorithms For an algorithm to be well specified it must have … Inputs specified Outputs specified Definiteness Effectiveness Finiteness

Programs vs Algorithms A program is an algorithm specialized to a particular situation  Algorithm: longStringWithShortStringInIt  placeholder ShortString   placeholder  longStringWithShortStringInIt  Program:   #    #  

Keyboard Shortcuts Give the mouse a break! Home: begin line End: end line Shift-End: select to end line Alt-e t (Ctrl-X): cut selected text Delete a whole line: Home, Shift-End, Ctrl-X Program or Algorithm?

Alphabetize CDs 1. Def Artist_of Use Artist_of to refer to the group name 2. Pick Alpha Decide which end of rack is to be start of alphabetic sequence, and call the first slot alpha 3. Pick Beta Call the slot next to alpha, beta 4. Exchange If Artist_of the CD in the alpha slot is later in the alphabet than the Artist_of the CD in the beta slot, interchange the CDs, otherwise continue on 5. More Betas? If a slot follows beta slot, begin calling it the beta slot and go to step 4, otherwise continue on 6. More Alphas? If two slots follow the alpha slot, begin calling the next one the alpha slot and the one following it the beta slot; go to step 4; otherwise stop Wynette Beethoven Spoon Hampton Pearl Jam

Flow Chart Define Artist_Of Select starting end; name it alpha Call beta the slot adjacent to alpha Is Artist_Of CD in alpha slot later than Artist_Of CD in beta slot Is there a slot following the beta slot? Are there 2 slots following alpha? Interchange CDs in alpha & beta Begin calling next slot beta Advance alpha to next slot & slot after it beta N Y N NStop Y Y Start

Demonstration

Abstraction Abstraction means removing an idea or process form a situation Beta sweep -- while alpha points to a fixed slot, beta sweeps through slots following alpha, interchanging as necessary The beta sweep is a concept removed based on our understanding of the operation of the algorithm   Beta Sweep

Flow Chart Define Artist_Of Select starting end; name it alpha Call beta the slot adjacent to alpha Is Artist_Of CD in alpha slot later than Artist_Of CD in beta slot Is there a slot following the beta slot? Is there a pair of slots following alpha? Interchange CDs in alpha & beta Begin calling next slot beta Advance alpha to next slot & slot after it beta N Y N NStop Y Y Start

The Beta Sweep By abstracting we can analyze parts of an algorithm …  The beta sweep has 4 properties: Exhaustive -- it considers all CDs after alpha Non-redundant -- no slot pair is checked twice Progressive -- the alphabetically earliest CD considered so far is always in the alpha slot Effective -- at completion, the alphabetically earliest CD from alpha to end is in alpha slot These properties apply only to Alphabetize CDs

Alpha Sweep The alpha sweep... Process of sweeping through all of the CDs (but the last) performing the beta sweep Exhausitve -- considers all but last CD Non-redundant -- a slot is alpha only once Progressive -- when beta sweep completes the alphabetically next CD in alpha Complete -- when last beta sweep is done the last slot’s CD is later than next to last slot Effective -- the alpha sweep alphabetizes

Turtle Graphics Algorithms You drive a turtle that leaves a mark as it moves Turtle Commands (start at x) forward(20) left(90); forward(20); right(135); backward(40); x

For today’s lab, Only use these commands: forward -- move turtle forward some number of pixels backward -- move turtle backward left – turn left some number of degrees right – turn right More when we get to Programming

Summary We figure out most algorithms on our own, abstracting from specific cases Also we abstract parts of an algorithm or program to understand them  Thinking of how the program works and reasoning about its properties allows us to know why an algorithm works … and then we can let the computer do it

In Sunday’s Paper... Google Bombing: To sabotage Google’s page-rank system Ask Google for ‘miserable failure’

George W Bush? The most highly ranked Web page for words ‘miserable failure’ is George Bush?

Sample Query

What’s Happening? Many pages make their anchor text ‘miserable failure’ and make the anchor link to the Bush biography miserable failure Google trusts anchor text in the page rank calculation