CS1150 Principles of Computer Science Loops

Size: px
Start display at page:

Download "CS1150 Principles of Computer Science Loops"

Transcription

1 CS1150 Principles f Cmputer Science Lps Yanyan Zhuang Department f Cmputer Science CS1150 UC. Clrad Springs

2 Review Blean variables Assume x=3, y=1, true r false?!(x<2) y>3 If statement Be careful: multiple/nested if else By default: else is mathced with if? Switch statement Be careful: where t use break CS4500/5500 UC. Clrad Springs

3 Overview While lp D while lp Fr lp CS1150 UC. Clrad Springs

4 Opening Prblem: Why Lps? Prblem: 100 times System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); System.ut.println("Welcme t Java!"); 4

5 Intrducing while Lps int cunt = 0; while (cunt < 100) { System.ut.println("Welcme t Java"); cunt++; 5

6 Intrducing while Lps int cunt = 0; while (cunt < 100) { System.ut.println("Welcme t Java"); cunt++; while (lp-cntinuatin-cnditin) { // lp-bdy; Statement(s); Hw It Wrks The lp cntinuatin cnditin - blean expressin - is evaluated If the cnditin is true, the statements in the lp bdy are executed When executin f lp bdy statements is cmplete, cntrl returns t the lp cnditin The lp cntinuatin cnditin is evaluated again When the lp cnditin is false, cntrl ges t statements fllwing the lp Nte: if the lp cntinuatin cnditin evaluates t false the first time, the entire while lp is skipped 6

7 while Lp Flw Chart while (lp-cntinuatin-cnditin) { // lp-bdy; Statement(s); int cunt = 0; while (cunt < 100) { System.ut.println("Welcme t Java!"); cunt++; 7

8 Rules fr While Lps The lp cnditin must be a blean expressin Blean expressin must be in parentheses Blean expressins are frmed using relatinal r lgical peratrs Lp cnditin Usually a statement befre while lp "initializes" lp cnditin t true Sme statement within lp bdy eventually change the cnditin t false If the cnditin is never changed t false, the prgram is frever in the lp This is called an "infinite lp" Curly braces are nt necessary if nly ne statement in lp But best practice is t always include curly braces CS4500/5500 UC. Clrad Springs

9 Trace while Lp int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; Initialize cunt (which we ften call cntrl variable) 9

10 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; (cunt < 2) is true 10

11 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; Print Welcme t Java 11

12 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; Increase cunt by 1 cunt is 1 nw 12

13 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; (cunt < 2) is still true since cunt is 1 13

14 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; Print Welcme t Java 14

15 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; Increase cunt by 1 cunt is 2 nw 15

16 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; (cunt < 2) is false since cunt is 2 nw 16

17 Trace while Lp, cnt. int cunt = 0; while (cunt < 2) { System.ut.println("Welcme t Java!"); cunt++; The lp exits. Execute the next statement after the lp. Let s lk at the first example PrintNTimes.java 17

18 Infinite lp example In this example, nthing in the lp bdy changes the value f the cntrl variable cunt = 1; // Initializes the lp cntrl variable while (cunt <= 5) { System.ut.println("The value f cunt is " + cunt); This is an infinite lp because (cunt <= 5) is always true Nthing changes the value f cunt in the lp bdy If yu accidentally create an infinite lp, use terminate buttn (red square) in Eclipse t make it stp CS4500/5500 UC. Clrad Springs

19 Placing a semicln at the end f the while-clause creates an infinite lp - be careful! int iteratin = 1; while (iteratin <= 10);{ System.ut.println("Iteratin = " + iteratin); iteratin++; CS4500/5500 UC. Clrad Springs

20 Off-by-ne Errr Cmmn issue with lps: Lp bdy executes ne mre/less than expected Example: System.ut.println("I'm ging t cunt t three, ready set..."); cunt = 1; while (cunt < 3) { System.ut.println(cunt); cunt++; CS4500/5500 UC. Clrad Springs

21 Off-by-ne Errr Cmmn issue with lps: Lp bdy executes ne mre/less than expected Example: System.ut.println("I'm ging t cunt t three, ready set..."); cunt = 1; while (cunt < 3) { Output: System.ut.println(cunt); cunt++; I'm ging t cunt t three, ready set CS4500/5500 UC. Clrad Springs

22 Prblem: Repeat Additin Until Crrect See RepeatAdditinQuiz.java. 22

23 Ending a Lp with a Sentinel Value Often the number f times a lp is executed is nt predetermined. Yu may use an input value t signify the end f the lp. Such a value is knwn as a sentinel value. Write a prgram that reads and calculates the sum f an unspecified number f integers (e.g., the sum f 2, 3, 5, 7, 11 ). The input 0 signifies the end f the input. See SentinelValue.java. 23

24 d-while Lp d { // Lp bdy; Statement(s); while (lp-cntinuatin-cnditin); Example: TestDWhile.java The lp bdy is executed The lp cnditin - blean expressin - is evaluated If the lp cnditin is true, then lp bdy is executed again If the lp cnditin is false, cntrl is transferred t the statement fllwing the lp 24

25 D While Lp Rules (same as while lp) The lp cnditin must be a blean expressin Blean expressin must be in parentheses Blean expressin is frmed using relatinal and lgical peratrs Lp cnditin Generally, sme statement befre the while lp "initializes" the lp cnditin t true Sme statement within the lp bdy must eventually change the cnditin t false If the cnditin is never changed t false, the prgram will be frever stuck in the lp This is called an "infinite lp" Curly braces are nt necessary if nly ne statement in lp but best practice is t always include curly braces CS4500/5500 UC. Clrad Springs

26 Nte Recall hw placing a semicln at the end f the while-clause creates an infinite lp int iteratin = 1; while (iteratin <= 10); { // Unnecessary semicln System.ut.println("Iteratin = " + iteratin); iteratin++; CS4500/5500 UC. Clrad Springs

27 Nte In the case f d-while yu must include the semicln since it ends the lp! int iteratin = 1; d { iteratin++; System.ut.println("Iteratin = " + iteratin); while (iteratin <= 5); // Necessary semicln CS4500/5500 UC. Clrad Springs

28 Lp Design Strategies Fur steps when writing a lp. Step 1: Identify what statements need t be repeated Step 2: Wrap these statements in a lp using while r d while: while (true) { Statements; Step 3: Determine what cnditin the cde shuld check (replace true) Step 4: Add cde in the bdy that eventually causes the cnditin t becme false while (lp-cntinuatin-cnditin) { Statements; Additinal statements fr cntrlling the lp; CS4500/5500 Example: Pwers.java UC. Clrad Springs

29 Summary While lp D while lp CS1150 UC. Clrad Springs

READING STATECHART DIAGRAMS

READING STATECHART DIAGRAMS READING STATECHART DIAGRAMS Figure 4.48 A Statechart diagram with events The diagram in Figure 4.48 shws all states that the bject plane can be in during the curse f its life. Furthermre, it shws the pssible

More information

Five Whys How To Do It Better

Five Whys How To Do It Better Five Whys Definitin. As explained in the previus article, we define rt cause as simply the uncvering f hw the current prblem came int being. Fr a simple causal chain, it is the entire chain. Fr a cmplex

More information

Differentiation Applications 1: Related Rates

Differentiation Applications 1: Related Rates Differentiatin Applicatins 1: Related Rates 151 Differentiatin Applicatins 1: Related Rates Mdel 1: Sliding Ladder 10 ladder y 10 ladder 10 ladder A 10 ft ladder is leaning against a wall when the bttm

More information

CONSTRUCTING STATECHART DIAGRAMS

CONSTRUCTING STATECHART DIAGRAMS CONSTRUCTING STATECHART DIAGRAMS The fllwing checklist shws the necessary steps fr cnstructing the statechart diagrams f a class. Subsequently, we will explain the individual steps further. Checklist 4.6

More information

Medium Scale Integrated (MSI) devices [Sections 2.9 and 2.10]

Medium Scale Integrated (MSI) devices [Sections 2.9 and 2.10] EECS 270, Winter 2017, Lecture 3 Page 1 f 6 Medium Scale Integrated (MSI) devices [Sectins 2.9 and 2.10] As we ve seen, it s smetimes nt reasnable t d all the design wrk at the gate-level smetimes we just

More information

Activity Guide Loops and Random Numbers

Activity Guide Loops and Random Numbers Unit 3 Lessn 7 Name(s) Perid Date Activity Guide Lps and Randm Numbers CS Cntent Lps are a relatively straightfrward idea in prgramming - yu want a certain chunk f cde t run repeatedly - but it takes a

More information

Introduction to Models and Properties

Introduction to Models and Properties Intrductin t Mdels and Prperties Cmputer Science and Artificial Intelligence Labratry MIT Armand Slar-Lezama Nv 23, 2015 Nvember 23, 2015 1 Recap Prperties Prperties f variables Prperties at prgram pints

More information

Experiment #3. Graphing with Excel

Experiment #3. Graphing with Excel Experiment #3. Graphing with Excel Study the "Graphing with Excel" instructins that have been prvided. Additinal help with learning t use Excel can be fund n several web sites, including http://www.ncsu.edu/labwrite/res/gt/gt-

More information

CHM112 Lab Graphing with Excel Grading Rubric

CHM112 Lab Graphing with Excel Grading Rubric Name CHM112 Lab Graphing with Excel Grading Rubric Criteria Pints pssible Pints earned Graphs crrectly pltted and adhere t all guidelines (including descriptive title, prperly frmatted axes, trendline

More information

B. Definition of an exponential

B. Definition of an exponential Expnents and Lgarithms Chapter IV - Expnents and Lgarithms A. Intrductin Starting with additin and defining the ntatins fr subtractin, multiplicatin and divisin, we discvered negative numbers and fractins.

More information

Lecture 7: Damped and Driven Oscillations

Lecture 7: Damped and Driven Oscillations Lecture 7: Damped and Driven Oscillatins Last time, we fund fr underdamped scillatrs: βt x t = e A1 + A csω1t + i A1 A sinω1t A 1 and A are cmplex numbers, but ur answer must be real Implies that A 1 and

More information

CS453 Intro and PA1 1

CS453 Intro and PA1 1 Plan fr day Ambiguus Grammars Disambiguating ambiguus grammars Predictive parsing IR and OLLOW sets Predictive Parsing table C453 Lecture p-dwn Predictive Parsers 1 Ambiguus Grammars Ambiguus grammar:

More information

37 Maxwell s Equations

37 Maxwell s Equations 37 Maxwell s quatins In this chapter, the plan is t summarize much f what we knw abut electricity and magnetism in a manner similar t the way in which James Clerk Maxwell summarized what was knwn abut

More information

Dataflow Analysis and Abstract Interpretation

Dataflow Analysis and Abstract Interpretation Dataflw Analysis and Abstract Interpretatin Cmputer Science and Artificial Intelligence Labratry MIT Nvember 9, 2015 Recap Last time we develped frm first principles an algrithm t derive invariants. Key

More information

MODULE 1. e x + c. [You can t separate a demominator, but you can divide a single denominator into each numerator term] a + b a(a + b)+1 = a + b

MODULE 1. e x + c. [You can t separate a demominator, but you can divide a single denominator into each numerator term] a + b a(a + b)+1 = a + b . REVIEW OF SOME BASIC ALGEBRA MODULE () Slving Equatins Yu shuld be able t slve fr x: a + b = c a d + e x + c and get x = e(ba +) b(c a) d(ba +) c Cmmn mistakes and strategies:. a b + c a b + a c, but

More information

ENG2410 Digital Design Arithmetic Circuits

ENG2410 Digital Design Arithmetic Circuits ENG24 Digital Design Arithmetic Circuits Fall 27 S. Areibi Schl f Engineering University f Guelph Recall: Arithmetic -- additin Binary additin is similar t decimal arithmetic N carries + + Remember: +

More information

Section 5.8 Notes Page Exponential Growth and Decay Models; Newton s Law

Section 5.8 Notes Page Exponential Growth and Decay Models; Newton s Law Sectin 5.8 Ntes Page 1 5.8 Expnential Grwth and Decay Mdels; Newtn s Law There are many applicatins t expnential functins that we will fcus n in this sectin. First let s lk at the expnential mdel. Expnential

More information

NUMBERS, MATHEMATICS AND EQUATIONS

NUMBERS, MATHEMATICS AND EQUATIONS AUSTRALIAN CURRICULUM PHYSICS GETTING STARTED WITH PHYSICS NUMBERS, MATHEMATICS AND EQUATIONS An integral part t the understanding f ur physical wrld is the use f mathematical mdels which can be used t

More information

Bicycle Generator Dump Load Control Circuit: An Op Amp Comparator with Hysteresis

Bicycle Generator Dump Load Control Circuit: An Op Amp Comparator with Hysteresis Bicycle Generatr Dump Lad Cntrl Circuit: An Op Amp Cmparatr with Hysteresis Sustainable Technlgy Educatin Prject University f Waterl http://www.step.uwaterl.ca December 1, 2009 1 Summary This dcument describes

More information

APPLICATION GUIDE (v4.1)

APPLICATION GUIDE (v4.1) 2.2.3 VitalSensrs VS-300 Sensr Management Statin Remte/Relay Guide Implementing Remte-IN/Relay-OUT Digital I/O Fieldbus Objective: Equipment: Becme familiar with the instrument wiring requirements fr the

More information

Purpose: Use this reference guide to effectively communicate the new process customers will use for creating a TWC ID. Mobile Manager Call History

Purpose: Use this reference guide to effectively communicate the new process customers will use for creating a TWC ID. Mobile Manager Call History Purpse: Use this reference guide t effectively cmmunicate the new prcess custmers will use fr creating a TWC ID. Overview Beginning n January 28, 2014 (Refer t yur Knwledge Management System fr specific

More information

AIP Logic Chapter 4 Notes

AIP Logic Chapter 4 Notes AIP Lgic Chapter 4 Ntes Sectin 4.1 Sectin 4.2 Sectin 4.3 Sectin 4.4 Sectin 4.5 Sectin 4.6 Sectin 4.7 4.1 The Cmpnents f Categrical Prpsitins There are fur types f categrical prpsitins. Prpsitin Letter

More information

A New Evaluation Measure. J. Joiner and L. Werner. The problems of evaluation and the needed criteria of evaluation

A New Evaluation Measure. J. Joiner and L. Werner. The problems of evaluation and the needed criteria of evaluation III-l III. A New Evaluatin Measure J. Jiner and L. Werner Abstract The prblems f evaluatin and the needed criteria f evaluatin measures in the SMART system f infrmatin retrieval are reviewed and discussed.

More information

Thermodynamics Partial Outline of Topics

Thermodynamics Partial Outline of Topics Thermdynamics Partial Outline f Tpics I. The secnd law f thermdynamics addresses the issue f spntaneity and invlves a functin called entrpy (S): If a prcess is spntaneus, then Suniverse > 0 (2 nd Law!)

More information

Bootstrap Method > # Purpose: understand how bootstrap method works > obs=c(11.96, 5.03, 67.40, 16.07, 31.50, 7.73, 11.10, 22.38) > n=length(obs) >

Bootstrap Method > # Purpose: understand how bootstrap method works > obs=c(11.96, 5.03, 67.40, 16.07, 31.50, 7.73, 11.10, 22.38) > n=length(obs) > Btstrap Methd > # Purpse: understand hw btstrap methd wrks > bs=c(11.96, 5.03, 67.40, 16.07, 31.50, 7.73, 11.10, 22.38) > n=length(bs) > mean(bs) [1] 21.64625 > # estimate f lambda > lambda = 1/mean(bs);

More information

This section is primarily focused on tools to aid us in finding roots/zeros/ -intercepts of polynomials. Essentially, our focus turns to solving.

This section is primarily focused on tools to aid us in finding roots/zeros/ -intercepts of polynomials. Essentially, our focus turns to solving. Sectin 3.2: Many f yu WILL need t watch the crrespnding vides fr this sectin n MyOpenMath! This sectin is primarily fcused n tls t aid us in finding rts/zers/ -intercepts f plynmials. Essentially, ur fcus

More information

CHAPTER 24: INFERENCE IN REGRESSION. Chapter 24: Make inferences about the population from which the sample data came.

CHAPTER 24: INFERENCE IN REGRESSION. Chapter 24: Make inferences about the population from which the sample data came. MATH 1342 Ch. 24 April 25 and 27, 2013 Page 1 f 5 CHAPTER 24: INFERENCE IN REGRESSION Chapters 4 and 5: Relatinships between tw quantitative variables. Be able t Make a graph (scatterplt) Summarize the

More information

Unit 1: Introduction to Biology

Unit 1: Introduction to Biology Name: Unit 1: Intrductin t Bilgy Theme: Frm mlecules t rganisms Students will be able t: 1.1 Plan and cnduct an investigatin: Define the questin, develp a hypthesis, design an experiment and cllect infrmatin,

More information

Temperature sensor / Dual Temp+Humidity

Temperature sensor / Dual Temp+Humidity www.akcp.cm Temperature sensr / Dual Temp+Humidity Intrductin Temperature sensrs are imprtant where ptimum temperature cntrl is paramunt. If there is an air cnditining malfunctin r abnrmal weather cnditins,

More information

CS 477/677 Analysis of Algorithms Fall 2007 Dr. George Bebis Course Project Due Date: 11/29/2007

CS 477/677 Analysis of Algorithms Fall 2007 Dr. George Bebis Course Project Due Date: 11/29/2007 CS 477/677 Analysis f Algrithms Fall 2007 Dr. Gerge Bebis Curse Prject Due Date: 11/29/2007 Part1: Cmparisn f Srting Algrithms (70% f the prject grade) The bjective f the first part f the assignment is

More information

Forensic Science. Group: Background information

Forensic Science. Group: Background information Frensic Science Grup: Backgrund infrmatin One f the graduate students in the Department f Bilgy n the campus f the University f Flrida went missing. A week later, a crime scene was discvered n a remte

More information

Trigonometric Ratios Unit 5 Tentative TEST date

Trigonometric Ratios Unit 5 Tentative TEST date 1 U n i t 5 11U Date: Name: Trignmetric Ratis Unit 5 Tentative TEST date Big idea/learning Gals In this unit yu will extend yur knwledge f SOH CAH TOA t wrk with btuse and reflex angles. This extensin

More information

2004 AP CHEMISTRY FREE-RESPONSE QUESTIONS

2004 AP CHEMISTRY FREE-RESPONSE QUESTIONS 2004 AP CHEMISTRY FREE-RESPONSE QUESTIONS 6. An electrchemical cell is cnstructed with an pen switch, as shwn in the diagram abve. A strip f Sn and a strip f an unknwn metal, X, are used as electrdes.

More information

Perfect Punctua+on Part Three: The Semicolon and Colon

Perfect Punctua+on Part Three: The Semicolon and Colon Perfect Punctua+n Part Three: The Semicln and Cln Cpyright Heather McWhinney, 2017 Graduate Wri;ng Help Specialist, Student Learning Services Learning Outcmes fr Part Three By the end f this presenta+n,

More information

Physics 2B Chapter 23 Notes - Faraday s Law & Inductors Spring 2018

Physics 2B Chapter 23 Notes - Faraday s Law & Inductors Spring 2018 Michael Faraday lived in the Lndn area frm 1791 t 1867. He was 29 years ld when Hand Oersted, in 1820, accidentally discvered that electric current creates magnetic field. Thrugh empirical bservatin and

More information

Lab #3: Pendulum Period and Proportionalities

Lab #3: Pendulum Period and Proportionalities Physics 144 Chwdary Hw Things Wrk Spring 2006 Name: Partners Name(s): Intrductin Lab #3: Pendulum Perid and Prprtinalities Smetimes, it is useful t knw the dependence f ne quantity n anther, like hw the

More information

o o IMPORTANT REMINDERS Reports will be graded largely on their ability to clearly communicate results and important conclusions.

o o IMPORTANT REMINDERS Reports will be graded largely on their ability to clearly communicate results and important conclusions. BASD High Schl Frmal Lab Reprt GENERAL INFORMATION 12 pt Times New Rman fnt Duble-spaced, if required by yur teacher 1 inch margins n all sides (tp, bttm, left, and right) Always write in third persn (avid

More information

, which yields. where z1. and z2

, which yields. where z1. and z2 The Gaussian r Nrmal PDF, Page 1 The Gaussian r Nrmal Prbability Density Functin Authr: Jhn M Cimbala, Penn State University Latest revisin: 11 September 13 The Gaussian r Nrmal Prbability Density Functin

More information

Revisiting the Socrates Example

Revisiting the Socrates Example Sectin 1.6 Sectin Summary Valid Arguments Inference Rules fr Prpsitinal Lgic Using Rules f Inference t Build Arguments Rules f Inference fr Quantified Statements Building Arguments fr Quantified Statements

More information

Name: Block: Date: Science 10: The Great Geyser Experiment A controlled experiment

Name: Block: Date: Science 10: The Great Geyser Experiment A controlled experiment Science 10: The Great Geyser Experiment A cntrlled experiment Yu will prduce a GEYSER by drpping Ments int a bttle f diet pp Sme questins t think abut are: What are yu ging t test? What are yu ging t measure?

More information

We can see from the graph above that the intersection is, i.e., [ ).

We can see from the graph above that the intersection is, i.e., [ ). MTH 111 Cllege Algebra Lecture Ntes July 2, 2014 Functin Arithmetic: With nt t much difficulty, we ntice that inputs f functins are numbers, and utputs f functins are numbers. S whatever we can d with

More information

Lesson Plan. Recode: They will do a graphic organizer to sequence the steps of scientific method.

Lesson Plan. Recode: They will do a graphic organizer to sequence the steps of scientific method. Lessn Plan Reach: Ask the students if they ever ppped a bag f micrwave ppcrn and nticed hw many kernels were unppped at the bttm f the bag which made yu wnder if ther brands pp better than the ne yu are

More information

SPH3U1 Lesson 06 Kinematics

SPH3U1 Lesson 06 Kinematics PROJECTILE MOTION LEARNING GOALS Students will: Describe the mtin f an bject thrwn at arbitrary angles thrugh the air. Describe the hrizntal and vertical mtins f a prjectile. Slve prjectile mtin prblems.

More information

Name Student ID. A student uses a voltmeter to measure the electric potential difference across the three boxes.

Name Student ID. A student uses a voltmeter to measure the electric potential difference across the three boxes. Name Student ID II. [25 pt] Thi quetin cnit f tw unrelated part. Part 1. In the circuit belw, bulb 1-5 are identical, and the batterie are identical and ideal. Bxe,, and cntain unknwn arrangement f linear

More information

Revision: August 19, E Main Suite D Pullman, WA (509) Voice and Fax

Revision: August 19, E Main Suite D Pullman, WA (509) Voice and Fax .7.4: Direct frequency dmain circuit analysis Revisin: August 9, 00 5 E Main Suite D Pullman, WA 9963 (509) 334 6306 ice and Fax Overview n chapter.7., we determined the steadystate respnse f electrical

More information

Purchase Order Workflow Processing

Purchase Order Workflow Processing P a g e 1 Purchase Order Wrkflw Prcessing P a g e 2 Table f Cntents PO Wrkflw Prcessing...3 Create a Purchase Order...3 Submit a Purchase Order...4 Review/Apprve the PO...4 Prcess the PO...6 P a g e 3

More information

AP Physics Kinematic Wrap Up

AP Physics Kinematic Wrap Up AP Physics Kinematic Wrap Up S what d yu need t knw abut this mtin in tw-dimensin stuff t get a gd scre n the ld AP Physics Test? First ff, here are the equatins that yu ll have t wrk with: v v at x x

More information

Turing Machines. Human-aware Robotics. 2017/10/17 & 19 Chapter 3.2 & 3.3 in Sipser Ø Announcement:

Turing Machines. Human-aware Robotics. 2017/10/17 & 19 Chapter 3.2 & 3.3 in Sipser Ø Announcement: Turing Machines Human-aware Rbtics 2017/10/17 & 19 Chapter 3.2 & 3.3 in Sipser Ø Annuncement: q q q q Slides fr this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/tm-ii.pdf

More information

Lecture 13: Markov Chain Monte Carlo. Gibbs sampling

Lecture 13: Markov Chain Monte Carlo. Gibbs sampling Lecture 13: Markv hain Mnte arl Gibbs sampling Gibbs sampling Markv chains 1 Recall: Apprximate inference using samples Main idea: we generate samples frm ur Bayes net, then cmpute prbabilities using (weighted)

More information

Lecture 6: Phase Space and Damped Oscillations

Lecture 6: Phase Space and Damped Oscillations Lecture 6: Phase Space and Damped Oscillatins Oscillatins in Multiple Dimensins The preius discussin was fine fr scillatin in a single dimensin In general, thugh, we want t deal with the situatin where:

More information

PHYS 314 HOMEWORK #3

PHYS 314 HOMEWORK #3 PHYS 34 HOMEWORK #3 Due : 8 Feb. 07. A unifrm chain f mass M, lenth L and density λ (measured in k/m) hans s that its bttm link is just tuchin a scale. The chain is drpped frm rest nt the scale. What des

More information

CHAPTER 2 Algebraic Expressions and Fundamental Operations

CHAPTER 2 Algebraic Expressions and Fundamental Operations CHAPTER Algebraic Expressins and Fundamental Operatins OBJECTIVES: 1. Algebraic Expressins. Terms. Degree. Gruping 5. Additin 6. Subtractin 7. Multiplicatin 8. Divisin Algebraic Expressin An algebraic

More information

Fall 2013 Physics 172 Recitation 3 Momentum and Springs

Fall 2013 Physics 172 Recitation 3 Momentum and Springs Fall 03 Physics 7 Recitatin 3 Mmentum and Springs Purpse: The purpse f this recitatin is t give yu experience wrking with mmentum and the mmentum update frmula. Readings: Chapter.3-.5 Learning Objectives:.3.

More information

Mathematics and Computer Sciences Department. o Work Experience, General. o Open Entry/Exit. Distance (Hybrid Online) for online supported courses

Mathematics and Computer Sciences Department. o Work Experience, General. o Open Entry/Exit. Distance (Hybrid Online) for online supported courses SECTION A - Curse Infrmatin 1. Curse ID: 2. Curse Title: 3. Divisin: 4. Department: 5. Subject: 6. Shrt Curse Title: 7. Effective Term:: MATH 70S Integrated Intermediate Algebra Natural Sciences Divisin

More information

[COLLEGE ALGEBRA EXAM I REVIEW TOPICS] ( u s e t h i s t o m a k e s u r e y o u a r e r e a d y )

[COLLEGE ALGEBRA EXAM I REVIEW TOPICS] ( u s e t h i s t o m a k e s u r e y o u a r e r e a d y ) (Abut the final) [COLLEGE ALGEBRA EXAM I REVIEW TOPICS] ( u s e t h i s t m a k e s u r e y u a r e r e a d y ) The department writes the final exam s I dn't really knw what's n it and I can't very well

More information

EDA Engineering Design & Analysis Ltd

EDA Engineering Design & Analysis Ltd EDA Engineering Design & Analysis Ltd THE FINITE ELEMENT METHOD A shrt tutrial giving an verview f the histry, thery and applicatin f the finite element methd. Intrductin Value f FEM Applicatins Elements

More information

If (IV) is (increased, decreased, changed), then (DV) will (increase, decrease, change) because (reason based on prior research).

If (IV) is (increased, decreased, changed), then (DV) will (increase, decrease, change) because (reason based on prior research). Science Fair Prject Set Up Instructins 1) Hypthesis Statement 2) Materials List 3) Prcedures 4) Safety Instructins 5) Data Table 1) Hw t write a HYPOTHESIS STATEMENT Use the fllwing frmat: If (IV) is (increased,

More information

Lab 1 The Scientific Method

Lab 1 The Scientific Method INTRODUCTION The fllwing labratry exercise is designed t give yu, the student, an pprtunity t explre unknwn systems, r universes, and hypthesize pssible rules which may gvern the behavir within them. Scientific

More information

3. Classify the following Numbers (Counting (natural), Whole, Integers, Rational, Irrational)

3. Classify the following Numbers (Counting (natural), Whole, Integers, Rational, Irrational) After yu cmplete each cncept give yurself a rating 1. 15 5 2 (5 3) 2. 2 4-8 (2 5) 3. Classify the fllwing Numbers (Cunting (natural), Whle, Integers, Ratinal, Irratinal) a. 7 b. 2 3 c. 2 4. Are negative

More information

Chapter Summary. Mathematical Induction Strong Induction Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Strong Induction Recursive Definitions Structural Induction Recursive Algorithms Chapter 5 1 Chapter Summary Mathematical Inductin Strng Inductin Recursive Definitins Structural Inductin Recursive Algrithms Sectin 5.1 3 Sectin Summary Mathematical Inductin Examples f Prf by Mathematical

More information

Spring 2010 Instructor: Michele Merler.

Spring 2010 Instructor: Michele Merler. Spring 200 Instructr: Michele Merler http://www.cs.clumbia.edu/~mmerler/cmsw30-2.html . Generate the pythagric table (d nt insert the values manually) 2 3 4 5 6 7 8 9 0 2 2 4 6 8 0 2 4 6 8 20 22 24 3 6

More information

Part a: Writing the nodal equations and solving for v o gives the magnitude and phase response: tan ( 0.25 )

Part a: Writing the nodal equations and solving for v o gives the magnitude and phase response: tan ( 0.25 ) + - Hmewrk 0 Slutin ) In the circuit belw: a. Find the magnitude and phase respnse. b. What kind f filter is it? c. At what frequency is the respnse 0.707 if the generatr has a ltage f? d. What is the

More information

EASTERN ARIZONA COLLEGE Introduction to Statistics

EASTERN ARIZONA COLLEGE Introduction to Statistics EASTERN ARIZONA COLLEGE Intrductin t Statistics Curse Design 2014-2015 Curse Infrmatin Divisin Scial Sciences Curse Number PSY 220 Title Intrductin t Statistics Credits 3 Develped by Adam Stinchcmbe Lecture/Lab

More information

THE LIFE OF AN OBJECT IT SYSTEMS

THE LIFE OF AN OBJECT IT SYSTEMS THE LIFE OF AN OBJECT IT SYSTEMS Persns, bjects, r cncepts frm the real wrld, which we mdel as bjects in the IT system, have "lives". Actually, they have tw lives; the riginal in the real wrld has a life,

More information

Biochemistry Summer Packet

Biochemistry Summer Packet Bichemistry Summer Packet Science Basics Metric Cnversins All measurements in chemistry are made using the metric system. In using the metric system yu must be able t cnvert between ne value and anther.

More information

Temperature sensor / Dual Temp+Humidity

Temperature sensor / Dual Temp+Humidity www.akcp.cm Temperature sensr / Dual Temp+Humidity Intrductin Temperature sensrs are imprtant where ptimum temperature cntrl is paramunt. If there is an air cnditining malfunctin r abnrmal weather cnditins,

More information

IB Sports, Exercise and Health Science Summer Assignment. Mrs. Christina Doyle Seneca Valley High School

IB Sports, Exercise and Health Science Summer Assignment. Mrs. Christina Doyle Seneca Valley High School IB Sprts, Exercise and Health Science Summer Assignment Mrs. Christina Dyle Seneca Valley High Schl Welcme t IB Sprts, Exercise and Health Science! This curse incrprates the traditinal disciplines f anatmy

More information

20 Faraday s Law and Maxwell s Extension to Ampere s Law

20 Faraday s Law and Maxwell s Extension to Ampere s Law Chapter 20 Faraday s Law and Maxwell s Extensin t Ampere s Law 20 Faraday s Law and Maxwell s Extensin t Ampere s Law Cnsider the case f a charged particle that is ming in the icinity f a ming bar magnet

More information

Name AP CHEM / / Chapter 1 Chemical Foundations

Name AP CHEM / / Chapter 1 Chemical Foundations Name AP CHEM / / Chapter 1 Chemical Fundatins Metric Cnversins All measurements in chemistry are made using the metric system. In using the metric system yu must be able t cnvert between ne value and anther.

More information

ENG2410 Digital Design Sequential Circuits: Part A

ENG2410 Digital Design Sequential Circuits: Part A ENG2410 Digital Design Sequential Circuits: Part A Fall 2017 S. Areibi Schl f Engineering University f Guelph Week #6 Tpics Sequential Circuit Definitins Latches Flip-Flps Delays in Sequential Circuits

More information

GENESIS Structural Optimization for ANSYS Mechanical

GENESIS Structural Optimization for ANSYS Mechanical P3 STRUCTURAL OPTIMIZATION (Vl. II) GENESIS Structural Optimizatin fr ANSYS Mechanical An Integrated Extensin that adds Structural Optimizatin t ANSYS Envirnment New Features and Enhancements Release 2017.03

More information

MATCHING TECHNIQUES Technical Track Session VI Céline Ferré The World Bank

MATCHING TECHNIQUES Technical Track Session VI Céline Ferré The World Bank MATCHING TECHNIQUES Technical Track Sessin VI Céline Ferré The Wrld Bank When can we use matching? What if the assignment t the treatment is nt dne randmly r based n an eligibility index, but n the basis

More information

COMP 551 Applied Machine Learning Lecture 11: Support Vector Machines

COMP 551 Applied Machine Learning Lecture 11: Support Vector Machines COMP 551 Applied Machine Learning Lecture 11: Supprt Vectr Machines Instructr: (jpineau@cs.mcgill.ca) Class web page: www.cs.mcgill.ca/~jpineau/cmp551 Unless therwise nted, all material psted fr this curse

More information

TRAINING GUIDE. Overview of Lucity Spatial

TRAINING GUIDE. Overview of Lucity Spatial TRAINING GUIDE Overview f Lucity Spatial Overview f Lucity Spatial In this sessin, we ll cver the key cmpnents f Lucity Spatial. Table f Cntents Lucity Spatial... 2 Requirements... 2 Supprted Mdules...

More information

COMP 551 Applied Machine Learning Lecture 9: Support Vector Machines (cont d)

COMP 551 Applied Machine Learning Lecture 9: Support Vector Machines (cont d) COMP 551 Applied Machine Learning Lecture 9: Supprt Vectr Machines (cnt d) Instructr: Herke van Hf (herke.vanhf@mail.mcgill.ca) Slides mstly by: Class web page: www.cs.mcgill.ca/~hvanh2/cmp551 Unless therwise

More information

Lead/Lag Compensator Frequency Domain Properties and Design Methods

Lead/Lag Compensator Frequency Domain Properties and Design Methods Lectures 6 and 7 Lead/Lag Cmpensatr Frequency Dmain Prperties and Design Methds Definitin Cnsider the cmpensatr (ie cntrller Fr, it is called a lag cmpensatr s K Fr s, it is called a lead cmpensatr Ntatin

More information

Chem 163 Section: Team Number: ALE 24. Voltaic Cells and Standard Cell Potentials. (Reference: 21.2 and 21.3 Silberberg 5 th edition)

Chem 163 Section: Team Number: ALE 24. Voltaic Cells and Standard Cell Potentials. (Reference: 21.2 and 21.3 Silberberg 5 th edition) Name Chem 163 Sectin: Team Number: ALE 24. Vltaic Cells and Standard Cell Ptentials (Reference: 21.2 and 21.3 Silberberg 5 th editin) What des a vltmeter reading tell us? The Mdel: Standard Reductin and

More information

Physics 2010 Motion with Constant Acceleration Experiment 1

Physics 2010 Motion with Constant Acceleration Experiment 1 . Physics 00 Mtin with Cnstant Acceleratin Experiment In this lab, we will study the mtin f a glider as it accelerates dwnhill n a tilted air track. The glider is supprted ver the air track by a cushin

More information

Hooke s Law (Springs) DAVISSON. F A Deformed. F S is the spring force, in newtons (N) k is the spring constant, in N/m

Hooke s Law (Springs) DAVISSON. F A Deformed. F S is the spring force, in newtons (N) k is the spring constant, in N/m HYIC 534 XRCI-4 ANWR Hke s Law (prings) DAVION Clintn Davissn was awarded the Nbel prize fr physics in 1937 fr his wrk n the diffractin f electrns. A spring is a device that stres ptential energy. When

More information

Part One: Heat Changes and Thermochemistry. This aspect of Thermodynamics was dealt with in Chapter 6. (Review)

Part One: Heat Changes and Thermochemistry. This aspect of Thermodynamics was dealt with in Chapter 6. (Review) CHAPTER 18: THERMODYNAMICS AND EQUILIBRIUM Part One: Heat Changes and Thermchemistry This aspect f Thermdynamics was dealt with in Chapter 6. (Review) A. Statement f First Law. (Sectin 18.1) 1. U ttal

More information

A Transition to Advanced Mathematics. Mathematics and Computer Sciences Department. o Work Experience, General. o Open Entry/Exit

A Transition to Advanced Mathematics. Mathematics and Computer Sciences Department. o Work Experience, General. o Open Entry/Exit SECTION A - Curse Infrmatin 1. Curse ID: 2. Curse Title: 3. Divisin: 4. Department: MATH 245 A Transitin t Advanced Mathematics Natural Sciences Divisin Mathematics and Cmputer Sciences Department 5. Subject:

More information

ANSWER KEY FOR MATH 10 SAMPLE EXAMINATION. Instructions: If asked to label the axes please use real world (contextual) labels

ANSWER KEY FOR MATH 10 SAMPLE EXAMINATION. Instructions: If asked to label the axes please use real world (contextual) labels ANSWER KEY FOR MATH 10 SAMPLE EXAMINATION Instructins: If asked t label the axes please use real wrld (cntextual) labels Multiple Chice Answers: 0 questins x 1.5 = 30 Pints ttal Questin Answer Number 1

More information

A proposition is a statement that can be either true (T) or false (F), (but not both).

A proposition is a statement that can be either true (T) or false (F), (but not both). 400 lecture nte #1 [Ch 2, 3] Lgic and Prfs 1.1 Prpsitins (Prpsitinal Lgic) A prpsitin is a statement that can be either true (T) r false (F), (but nt bth). "The earth is flat." -- F "March has 31 days."

More information

More Tutorial at

More Tutorial at Answer each questin in the space prvided; use back f page if extra space is needed. Answer questins s the grader can READILY understand yur wrk; nly wrk n the exam sheet will be cnsidered. Write answers,

More information

Physical Layer: Outline

Physical Layer: Outline 18-: Intrductin t Telecmmunicatin Netwrks Lectures : Physical Layer Peter Steenkiste Spring 01 www.cs.cmu.edu/~prs/nets-ece Physical Layer: Outline Digital Representatin f Infrmatin Characterizatin f Cmmunicatin

More information

Lecture 02 CSE 40547/60547 Computing at the Nanoscale

Lecture 02 CSE 40547/60547 Computing at the Nanoscale PN Junctin Ntes: Lecture 02 CSE 40547/60547 Cmputing at the Nanscale Letʼs start with a (very) shrt review f semi-cnducting materials: - N-type material: Obtained by adding impurity with 5 valence elements

More information

Workshop 2 Data-Logger Principles

Workshop 2 Data-Logger Principles 1 The University f British Clumbia GEOG 309 / Andreas Christen February 7, 2008 Wrkshp 2 Data-Lgger Principles Gals 1 Becme familiar with a digital data-lgger. 2 Prgram the data-lgger and recrd a signal

More information

ELE Final Exam - Dec. 2018

ELE Final Exam - Dec. 2018 ELE 509 Final Exam Dec 2018 1 Cnsider tw Gaussian randm sequences X[n] and Y[n] Assume that they are independent f each ther with means and autcvariances μ ' 3 μ * 4 C ' [m] 1 2 1 3 and C * [m] 3 1 10

More information

SPECIMEN. Candidate Surname. Candidate Number

SPECIMEN. Candidate Surname. Candidate Number Candidate Frename General Certificate f Secndary Educatin Mdern Freign Languages Prtuguese - Writing Specimen Paper Candidates answer n the questin paper. Additinal materials: nne Centre Number Candidate

More information

- *Figure of chemical shift ranges for different types of P (see links)*

- *Figure of chemical shift ranges for different types of P (see links)* Intrductin Cnceptually the same as 1 H NMR 31 P nucleus istpic abundance 100% prevalent like 1 H Nuclear spin ½ relatively easy t interpret Excellent technique fr studying phsphrus cntaining cmpunds: rganic

More information

Chapter 16. Capacitance. Capacitance, cont. Parallel-Plate Capacitor, Example 1/20/2011. Electric Energy and Capacitance

Chapter 16. Capacitance. Capacitance, cont. Parallel-Plate Capacitor, Example 1/20/2011. Electric Energy and Capacitance summary C = ε A / d = πε L / ln( b / a ) ab C = 4πε 4πε a b a b >> a Chapter 16 Electric Energy and Capacitance Capacitance Q=CV Parallel plates, caxial cables, Earth Series and parallel 1 1 1 = + +..

More information

EE247B/ME218: Introduction to MEMS Design Lecture 7m1: Lithography, Etching, & Doping CTN 2/6/18

EE247B/ME218: Introduction to MEMS Design Lecture 7m1: Lithography, Etching, & Doping CTN 2/6/18 EE247B/ME218 Intrductin t MEMS Design Lecture 7m1 Lithgraphy, Etching, & Dping Dping f Semicnductrs Semicnductr Dping Semicnductrs are nt intrinsically cnductive T make them cnductive, replace silicn atms

More information

Thermodynamics and Equilibrium

Thermodynamics and Equilibrium Thermdynamics and Equilibrium Thermdynamics Thermdynamics is the study f the relatinship between heat and ther frms f energy in a chemical r physical prcess. We intrduced the thermdynamic prperty f enthalpy,

More information

CHAPTER Read Chapter 17, sections 1,2,3. End of Chapter problems: 25

CHAPTER Read Chapter 17, sections 1,2,3. End of Chapter problems: 25 CHAPTER 17 1. Read Chapter 17, sectins 1,2,3. End f Chapter prblems: 25 2. Suppse yu are playing a game that uses tw dice. If yu cunt the dts n the dice, yu culd have anywhere frm 2 t 12. The ways f prducing

More information

A Scalable Recurrent Neural Network Framework for Model-free

A Scalable Recurrent Neural Network Framework for Model-free A Scalable Recurrent Neural Netwrk Framewrk fr Mdel-free POMDPs April 3, 2007 Zhenzhen Liu, Itamar Elhanany Machine Intelligence Lab Department f Electrical and Cmputer Engineering The University f Tennessee

More information

1. Transformer A transformer is used to obtain the approximate output voltage of the power supply. The output of the transformer is still AC.

1. Transformer A transformer is used to obtain the approximate output voltage of the power supply. The output of the transformer is still AC. PHYSIS 536 Experiment 4: D Pwer Supply I. Intrductin The prcess f changing A t D is investigated in this experiment. An integrated circuit regulatr makes it easy t cnstruct a high-perfrmance vltage surce

More information

Review Problems 3. Four FIR Filter Types

Review Problems 3. Four FIR Filter Types Review Prblems 3 Fur FIR Filter Types Fur types f FIR linear phase digital filters have cefficients h(n fr 0 n M. They are defined as fllws: Type I: h(n = h(m-n and M even. Type II: h(n = h(m-n and M dd.

More information

City of Angels School Independent Study Los Angeles Unified School District

City of Angels School Independent Study Los Angeles Unified School District City f Angels Schl Independent Study Ls Angeles Unified Schl District INSTRUCTIONAL GUIDE Algebra 1B Curse ID #310302 (CCSS Versin- 06/15) This curse is the secnd semester f Algebra 1, fulfills ne half

More information

Lecture 12: Chemical reaction equilibria

Lecture 12: Chemical reaction equilibria 3.012 Fundamentals f Materials Science Fall 2005 Lecture 12: 10.19.05 Chemical reactin equilibria Tday: LAST TIME...2 EQUATING CHEMICAL POTENTIALS DURING REACTIONS...3 The extent f reactin...3 The simplest

More information

Synchronous Motor V-Curves

Synchronous Motor V-Curves Synchrnus Mtr V-Curves 1 Synchrnus Mtr V-Curves Intrductin Synchrnus mtrs are used in applicatins such as textile mills where cnstant speed peratin is critical. Mst small synchrnus mtrs cntain squirrel

More information