Comp 11 Lectures. Mike Shah. June 20, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

Size: px
Start display at page:

Download "Comp 11 Lectures. Mike Shah. June 20, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38"

Transcription

1 Comp 11 Lectures Mike Shah Tufts University June 20, 2017 Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

2 Please do not distribute or host these slides without prior permission. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

3 Structs Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

4 Comp 11 - Pre-Class warm up How many different data types do you see on the student ID below. (e.g. Computer Science University is a string) Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

5 Lecture Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

6 Edsgar Dijkstra Figure 1: Edsgar Dijkstra was one of the pioneering computer scientists forming many foundational algorithms and ideas in computer science. His work on concurrency and distributed computing is what makes things like the cloud possible. Variations of Dijkstra s shortest path algorithm are what make your GPS pick a path for you to get from location A to B. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

7 Data Types The student name, a string An ID, perhaps an int or long A leading digit on the barcode, perhaps store as a char or int. A date (3 ints, month, day, year) And several more pieces Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

8 Program a Student ID So lets actually write the program for storing a student ID. 1 #i n c l u d e <i o s t r e a m > 2 #i n c l u d e <s t r i n g > 3 4 i n t main ( ) { 5 6 // Student Data 7 s t d : : s t r i n g name = Smith, Jane ; 8 l o n g i d = ; 9 c h a r d i g i t = 2 ; 0 s t d : : s t r i n g date = 5/31/17 ; 1 2 r e t u r n 0 ; 3 } Listing 1: A program that takes in a student ID Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

9 How does our program scale? By now, you know the next series of questions: What if I want to add another student? What abstraction might I use to help? Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

10 Building a student database How about an array? Or even a std::vector 1 #i n c l u d e <i o s t r e a m > 2 #i n c l u d e <s t r i n g > 3 #i n c l u d e <v e c t o r > 4 5 i n t main ( ) { 6 s t d : : v e c t o r <s t d : : s t r i n g > namevector ; 7 s t d : : v e c t o r <long > i d V e c t o r ; 8 s t d : : v e c t o r <char> d i g i t V e c t o r ; 9 s t d : : v e c t o r <s t d : : s t r i n g > d a t e V e c t o r ; 0 1 namevector. push back ( Smith, Jane ) ; 2 i d V e c t o r. push back ( ) ; 3 d i g i t V e c t o r. push back ( 2 ) ; 4 d a t e V e c t o r. push back ( 5/31/17 ) ; 5 6 r e t u r n 0 ; 7 } Listing 2: Now we can build a database of students Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

11 Populating our Student Database 1 // Add our f i r s t s t u d e n t 2 namevector. push back ( Smith, Jane ) ; 3 i d V e c t o r. push back ( ) ; 4 d i g i t V e c t o r. push back ( 2 ) ; 5 d a t e V e c t o r. push back ( 5/31/17 ) ; 6 // Add a second s t u d e n t 7 namevector. push back ( E i n s t e i n, A l b e r t ) ; 8 i d V e c t o r. push back ( ) ; 9 d i g i t V e c t o r. push back ( 2 ) ; 0 d a t e V e c t o r. push back ( 5/31/17 ) ; 1 // Add a t h i r d s t u d e n t 2 namevector. push back ( Granger, Hermione ) ; 3 i d V e c t o r. push back ( ) ; 4 d i g i t V e c t o r. push back ( 3 ) ; 5 d a t e V e c t o r. push back ( 5/31/17 ) ; Listing 3: Now we can build a database of students Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

12 Strategy to Update database Now what if a students information changes? How would we update our database. Well, we know we can access the student by an index. And that index will be the same for each field That is, accessing namevector[0], idvector[0], etc. holds our first students information in each vector. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

13 Accessing a student 1 // L e t s update our t h i r d s t u d e n t, Hermionie 2 namevector [ 2 ] = Granger, Hermione Jean ; 3 i d V e c t o r [ 2 ] = 0 ; 4 d i g i t V e c t o r [ 2 ] = 7 ; 5 d a t e V e c t o r [ 2 ] = 1/31/18 ; Listing 4: If we need to update our student Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

14 Does everyone like this solution? First, does this work and update Hermione s student information in each of the 4 vectors? What do you think about this approach in general? Figure 2: Hermione Granger is a fictional character from the Harry Potter book series. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

15 Potential problems Sometimes we forget things! 1 // Oops I f o r g o t 1 f i e l d 2 namevector. push back ( Smith, Jane ) ; 3 d i g i t V e c t o r. push back ( 2 ) ; 4 d a t e V e c t o r. push back ( 5/31/17 ) ; 5 // Oops I f o r g o t 2 f i e l d s! 6 namevector. push back ( E i n s t e i n, A l b e r t ) ; 7 d a t e V e c t o r. push back ( 5/31/17 ) ; 8 // Add a t h i r d s t u d e n t 9 namevector. push back ( Granger, Hermione ) ; 0 i d V e c t o r. push back ( ) ; 1 d i g i t V e c t o r. push back ( 3 ) ; 2 d a t e V e c t o r. push back ( 5/31/17 ) ; Listing 5: I forgot to push back all the fields in each of our vectors. Now Ms. Granger is not always index number 2 Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

16 Code Length We have to remember to work with 4 vectors all of the time. What if we want to pass this information to a function? We have to have four parameters that pass the correct data type What if I want to update my student record with a fifth field? We need to find every place in the code and update it. This leaves us prone to errors. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

17 Our next abstraction The point is, we want an abstraction to help make our lives easier A way to structure related pieces of data together. Luckily, C++ (And most languages) have a tool to do this. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

18 The struct Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

19 struct A struct is a C++ keyword It allows us to create a new data type that we define. This data type can consist of multiple primitives. All of the data stays together. Lets take a look Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

20 Our first struct 1 // We now have a t y p e c a l l e d Student ( with a c a p i t a l S ) 2 s t r u c t Student { 3 // Our 4 f i e l d s o f data 4 s t d : : s t r i n g name ; 5 l o n g i d ; 6 c h a r d i g i t ; 7 s t d : : s t r i n g date ; 8 } ; 9 // Known ad a POD p i e c e o f data Listing 6: We have created a new data type. It is our own custom data type that we have defined for our programs. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

21 Our struct in C++ 1 #i n c l u d e <i o s t r e a m > 2 3 // We d e f i n e our s t r u c t o u t s i d e o f main 4 s t r u c t Student { 5 // Our 4 f i e l d s o f data 6 s t d : : s t r i n g name ; 7 l o n g i d ; 8 c h a r d i g i t ; 9 s t d : : s t r i n g date ; 0 } ; 1 2 i n t main ( ) { 3 // We s i m p l y use the name o f our s t r u c t as 4 // the new d a t a t y p e 5 Student j a n e S m i t h ; 6 7 r e t u r n 0 ; 8 } Listing 7: Defining our struct Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

22 Setting Data in our struct 1 #i n c l u d e <i o s t r e a m > 2 s t r u c t Student { 3 s t d : : s t r i n g name ; 4 l o n g i d ; 5 c h a r d i g i t ; 6 s t d : : s t r i n g date ; 7 } ; 8 9 i n t main ( ) { 0 Student j a n e S m i t h ; 1 // Quite s i m i l a r to our v e r y f i r s t example! 2 j a n e S m i t h. name = Smith, Jane ; 3 j a n e S m i t h. i d = ; 4 j a n e S m i t h. d i g i t = 2 ; 5 j a n e S m i t h. date = 5/31/17 ; 6 7 r e t u r n 0 ; 8 } Listing 8: Note that the. operator is how we access our fields Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

23 Summarizing what is new and important terminology We create a struct before our main, which allows us to use a new data type. Our struct can have several data types, that when aggregated make another type.. The. (DOT) operator allows us to access and update each of a struct s individual fields. We can think of a struct as a large piece of data (POD) that we define. We like to think of these as objects rather than variables (which are our primitive types like int, float, char, bool, etc). We call Student, an object type. So janesmith is an instance of an object called Student Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

24 Adding more power to struct A struct has fields (member fields we call them) such as int, char, string, as previously seen. But we can also have member functions, that can be called on our objects. Lets create a member function, that outputs all of our fields values. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

25 Our output member function in use 1 s t r u c t Student { 2 s t d : : s t r i n g name ; 3 l o n g i d ; 4 c h a r d i g i t ; 5 s t d : : s t r i n g date ; 6 // We c r e a t e a r e g u l a r f u n c t i o n 7 // The d i f f e r e n c e i s, i t i s w i t h i n our s t r u c t. 8 // So t h i s f u n c t i o n can o n l y be used on Student s 9 v o i d output ( ) { 0 s t d : : cout << name << \n ; 1 s t d : : cout << i d << \n ; 2 s t d : : cout << d i g i t << \n ; 3 s t d : : cout << date << \n ; 4 } 5 } ; Listing 9: Defining our struct Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

26 output usage (warning text is tiny) caption 1 #i n c l u d e <i o s t r e a m> 2 3 s t r u c t Student{ 4 s t d : : s t r i n g name ; 5 long id ; 6 c h a r d i g i t ; 7 s t d : : s t r i n g d a t e ; 8 9 v o i d output ( ) { 0 s t d : : cout << name << \n ; 1 s t d : : cout << i d << \n ; 2 s t d : : cout << d i g i t << \n ; 3 s t d : : cout << d a t e << \n ; 4 } 5 }; 6 7 i n t main ( ) { 8 Student janesmith ; 9 janesmith. name = Smith, Jane ; 0 janesmith. i d = ; 1 j a n e S m i t h. d i g i t = 2 ; 2 janesmith. date = 5/31/17 ; 3 // C a l l our output method on janesmith. 4 // Remember janesmith s datatype i s of Student, so we can do t h i s 5 j a n e S m i t h. o u t p u t ( ) ; 6 7 r e t u r n 0 ; 8 } Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

27 Is this better than what we started with? 1 j a n e S m i t h. name = Smith, Jane ; 2 j a n e S m i t h. i d = ; 3 j a n e S m i t h. d i g i t = 2 ; 4 j a n e S m i t h. date = 5/31/17 ; Listing 10: Here we define individual fields one at a time This bit of the code is a bit ugly. How could we get rid of it? Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

28 add a set member function 1 s t r u c t Student { 2 s t d : : s t r i n g name ; 3 l o n g i d ; 4 c h a r d i g i t ; 5 s t d : : s t r i n g date ; 6 // Our new s e t method 7 v o i d s e t ( s t d : : s t r i n g name, l o n g i d, c h a r d i g i t, s t d : : s t r i n g d a t e ) { 8 name = name ; 9 i d = i d ; 0 d i g i t = d i g i t ; 1 date = d a t e ; 2 } 3 4 v o i d output ( ) { 5 s t d : : cout << name << \n ; 6 s t d : : cout << i d << \n ; 7 s t d : : cout << d i g i t << \n ; 8 s t d : : cout << date << \n ; 9 } 0 } ; Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

29 What is our set member function doing? We created a new member function called set that takes four parameters We then assign whatever values are passed into that function to our member variables. This sets the member variables by a simple function call. Remember, our member variables are defined within our struct, but outside of our function thus they are within scope. That is why they persist. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

30 Using set 1 i n t main ( ) { 2 Student j a n e S m i t h ; 3 // Ah, much b e t t e r. Now o n l y one l i n e o f code 4 j a n e S m i t h. s e t ( Smith, Jane, j a n e S m i t h. id, , 2, 5/31/17 ) ; 5 // We output a l l o f our f r e s h l y s e t member v a r i a b l e s 6 j a n e S m i t h. output ( ) ; 7 8 r e t u r n 0 ; 9 } Listing 12: We call the member function set on janesmith Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

31 Creating multiple students 1 i n t main ( ) { 2 Student j a n e S m i t h ; 3 j a n e S m i t h. s e t ( Smith, Jane, , 2, 5/31/17 ) ; 4 j a n e S m i t h. output ( ) ; 5 6 Student a l b e r t E i n s t e i n ; 7 a l b e r t E i n s t e i n. s e t ( E i n s t e i n, A l b e r t, , 2, 5/31/17 ) ; 8 a l b e r t E i n s t e i n. output ( ) ; 9 0 Student hermionegranger ; 1 hermionegranger. s e t ( Granger, Hermione, , 3, 5/31/17 ) ; 2 hermionegranger. output ( ) ; 3 4 r e t u r n 0 ; 5 } Listing 13: We create more students and they each have their own member variables unique to themselves Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

32 Full Example (Try on your own after class) 1 #i n c l u d e <i o s t r e a m> 2 3 s t r u c t Student{ 4 s t d : : s t r i n g name ; 5 long id ; 6 c h a r d i g i t ; 7 s t d : : s t r i n g d a t e ; 8 9 v o i d s e t ( s t d : : s t r i n g name, l o n g i d, c h a r d i g i t, s t d : : s t r i n g d a t e ){ 0 name = name ; 1 id = i d ; 2 d i g i t = d i g i t ; 3 date = date ; 4 } 5 6 v o i d o u tput ( ){ 7 s t d : : cout << name << \n ; 8 s t d : : cout << i d << \n ; 9 s t d : : cout << d i g i t << \n ; 0 s t d : : cout << d a t e << \n ; 1 } 2 }; 3 4 i n t main ( ){ 5 Student janesmith ; 6 janesmith. set ( Smith, Jane, , 2, 5/31/17 ) ; 7 j a n e S m i t h. o u t p u t ( ) ; 8 9 Student a l b e r t E i n s t e i n ; 0 alberteinstein. set ( Einstein, Albert, , 2, 5/31/17 ) ; 1 a l b e r t E i n s t e i n. output ( ) ; 2 3 Student hermionegranger ; 4 hermionegranger. set ( Granger, Hermione, , 3, 5/31/17 ) ; 5 hermionegranger. output ( ) ; 6 7 r e t u r n 0 ; 8 } Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

33 C++ everywhere! Or try it here! (Press run and see output at the bottom of the page) https: //wandbox.org/nojs/clang-4.0.0/permlink/couyabq0lmnir9wg Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

34 Final Takeaways We have discovered a new abstraction that allows us to move beyond primitive data structions. We can create and use member functions (In the same way we have seen member functions with string). We can also combine this abstraction with others we have learned. Passing a Student struct in a function Creating a vector of our Student struct is now possible. Hmm, maybe we should try the above in lab. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

35 Review of what we learned (At least) Two students Tell me each 1 thing you learned or found interesting in lecture. Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

36 No in-class activity today Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

37 5-10 minute break and then... Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

38 To the lab! Lab: You should have gotten an and hopefully setup an account at prior to today. If not no worries, we ll take care of it during lab! Mike Shah (Tufts University) Comp 11 Lectures June 20, / 38

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33

Comp 11 Lectures. Mike Shah. July 12, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 12, / 33 Comp 11 Lectures Mike Shah Tufts University July 12, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 12, 2017 1 / 33 Please do not distribute or host these slides without prior permission. Mike

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 40 Please do not distribute or host these slides without prior permission. Mike

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 45

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 45 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 45 Please do not distribute or host these slides without prior permission. Mike

More information

MA 1128: Lecture 08 03/02/2018. Linear Equations from Graphs And Linear Inequalities

MA 1128: Lecture 08 03/02/2018. Linear Equations from Graphs And Linear Inequalities MA 1128: Lecture 08 03/02/2018 Linear Equations from Graphs And Linear Inequalities Linear Equations from Graphs Given a line, we would like to be able to come up with an equation for it. I ll go over

More information

Solving with Absolute Value

Solving with Absolute Value Solving with Absolute Value Who knew two little lines could cause so much trouble? Ask someone to solve the equation 3x 2 = 7 and they ll say No problem! Add just two little lines, and ask them to solve

More information

Math 231E, Lecture 25. Integral Test and Estimating Sums

Math 231E, Lecture 25. Integral Test and Estimating Sums Math 23E, Lecture 25. Integral Test and Estimating Sums Integral Test The definition of determining whether the sum n= a n converges is:. Compute the partial sums s n = a k, k= 2. Check that s n is a convergent

More information

Theory of Computation Prof. Raghunath Tewari Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Theory of Computation Prof. Raghunath Tewari Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Theory of Computation Prof. Raghunath Tewari Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Lecture 10 GNFA to RE Conversion Welcome to the 10th lecture of this course.

More information

MITOCW MIT18_02SCF10Rec_61_300k

MITOCW MIT18_02SCF10Rec_61_300k MITOCW MIT18_02SCF10Rec_61_300k JOEL LEWIS: Hi. Welcome back to recitation. In lecture, you've been learning about the divergence theorem, also known as Gauss's theorem, and flux, and all that good stuff.

More information

Constrained and Unconstrained Optimization Prof. Adrijit Goswami Department of Mathematics Indian Institute of Technology, Kharagpur

Constrained and Unconstrained Optimization Prof. Adrijit Goswami Department of Mathematics Indian Institute of Technology, Kharagpur Constrained and Unconstrained Optimization Prof. Adrijit Goswami Department of Mathematics Indian Institute of Technology, Kharagpur Lecture - 01 Introduction to Optimization Today, we will start the constrained

More information

Eigenvalues and eigenvectors

Eigenvalues and eigenvectors Roberto s Notes on Linear Algebra Chapter 0: Eigenvalues and diagonalization Section Eigenvalues and eigenvectors What you need to know already: Basic properties of linear transformations. Linear systems

More information

Comp 11 Lectures. Dr. Mike Shah. August 9, Tufts University. Dr. Mike Shah (Tufts University) Comp 11 Lectures August 9, / 34

Comp 11 Lectures. Dr. Mike Shah. August 9, Tufts University. Dr. Mike Shah (Tufts University) Comp 11 Lectures August 9, / 34 Comp 11 Lectures Dr. Mike Shah Tufts University August 9, 2017 Dr. Mike Shah (Tufts University) Comp 11 Lectures August 9, 2017 1 / 34 Please do not distribute or host these slides without prior permission.

More information

2 Electric Field Mapping Rev1/05

2 Electric Field Mapping Rev1/05 2 Electric Field Mapping Rev1/05 Theory: An electric field is a vector field that is produced by an electric charge. The source of the field may be a single charge or many charges. To visualize an electric

More information

Lesson Plan by: Stephanie Miller

Lesson Plan by: Stephanie Miller Lesson: Pythagorean Theorem and Distance Formula Length: 45 minutes Grade: Geometry Academic Standards: MA.G.1.1 2000 Find the lengths and midpoints of line segments in one- or two-dimensional coordinate

More information

MITOCW big_picture_derivatives_512kb-mp4

MITOCW big_picture_derivatives_512kb-mp4 MITOCW big_picture_derivatives_512kb-mp4 PROFESSOR: OK, hi. This is the second in my videos about the main ideas, the big picture of calculus. And this is an important one, because I want to introduce

More information

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101 E23: Hotel Management System Author: 1302509 Zhao Ruimin 1301478 Wen Yunlu 1302575 Hu Xing 1301911 Chen Ke 1302599 Tang Haoyuan Module: EEE 101 Lecturer: Date: Dr.Lin December/22/2014 Contents Contents

More information

MITOCW R11. Double Pendulum System

MITOCW R11. Double Pendulum System MITOCW R11. Double Pendulum System The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for

More information

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore Module - 3 Lecture - 10 First Order Linear Equations (Refer Slide Time: 00:33) Welcome

More information

(Refer Slide Time: 00:10)

(Refer Slide Time: 00:10) Chemical Reaction Engineering 1 (Homogeneous Reactors) Professor R. Krishnaiah Department of Chemical Engineering Indian Institute of Technology Madras Lecture No 10 Design of Batch Reactors Part 1 (Refer

More information

Thermodynamics (Classical) for Biological Systems. Prof. G. K. Suraishkumar. Department of Biotechnology. Indian Institute of Technology Madras

Thermodynamics (Classical) for Biological Systems. Prof. G. K. Suraishkumar. Department of Biotechnology. Indian Institute of Technology Madras Thermodynamics (Classical) for Biological Systems Prof. G. K. Suraishkumar Department of Biotechnology Indian Institute of Technology Madras Module No. #04 Thermodynamics of solutions Lecture No. #22 Partial

More information

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 CS17 Integrated Introduction to Computer Science Klein Contents Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 1 Tree definitions 1 2 Analysis of mergesort using a binary tree 1 3 Analysis of

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Asymptotic Analysis, recurrences Date: 9/7/17

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Asymptotic Analysis, recurrences Date: 9/7/17 601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Asymptotic Analysis, recurrences Date: 9/7/17 2.1 Notes Homework 1 will be released today, and is due a week from today by the beginning

More information

15. LECTURE 15. I can calculate the dot product of two vectors and interpret its meaning. I can find the projection of one vector onto another one.

15. LECTURE 15. I can calculate the dot product of two vectors and interpret its meaning. I can find the projection of one vector onto another one. 5. LECTURE 5 Objectives I can calculate the dot product of two vectors and interpret its meaning. I can find the projection of one vector onto another one. In the last few lectures, we ve learned that

More information

Please read this introductory material carefully; it covers topics you might not yet have seen in class.

Please read this introductory material carefully; it covers topics you might not yet have seen in class. b Lab Physics 211 Lab 10 Torque What You Need To Know: Please read this introductory material carefully; it covers topics you might not yet have seen in class. F (a) (b) FIGURE 1 Forces acting on an object

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 11, 2015 Please don t print these lecture notes unless you really need to!

More information

C++ For Science and Engineering Lecture 17

C++ For Science and Engineering Lecture 17 C++ For Science and Engineering Lecture 17 John Chrispell Tulane University Monday October 4, 2010 Functions and C-Style Strings Three methods for representing the C-style string: An array of char A quoted

More information

Herbicides Targeting Photosynthesis by Angela K. Hartsock Department of Biology University of Akron Wayne College, Orrville, OH

Herbicides Targeting Photosynthesis by Angela K. Hartsock Department of Biology University of Akron Wayne College, Orrville, OH Killing Chloroplasts: s Targeting Photosynthesis by Angela K. Hartsock Department of Biology University of Akron Wayne College, Orrville, OH Part I Illuminating Photosynthesis Welcome to our plant sciences

More information

Lesson Objectives. Core Content Objectives. Language Arts Objectives

Lesson Objectives. Core Content Objectives. Language Arts Objectives Evergreen Trees 9 Lesson Objectives Core Content Objectives Students will: Explain that evergreen trees are one type of plant that stays green all year and does not become dormant in the winter Compare

More information

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003 MATH 22 Lecture F: 9/18/2003 INFERENCE & QUANTIFICATION Sixty men can do a piece of work sixty times as quickly as one man. One man can dig a post-hole in sixty seconds. Therefore, sixty men can dig a

More information

Note: Please use the actual date you accessed this material in your citation.

Note: Please use the actual date you accessed this material in your citation. MIT OpenCourseWare http://ocw.mit.edu 18.02 Multivariable Calculus, Fall 2007 Please use the following citation format: Denis Auroux. 18.02 Multivariable Calculus, Fall 2007. (Massachusetts Institute of

More information

Knots, Coloring and Applications

Knots, Coloring and Applications Knots, Coloring and Applications Ben Webster University of Virginia March 10, 2015 Ben Webster (UVA) Knots, Coloring and Applications March 10, 2015 1 / 14 This talk is online at http://people.virginia.edu/~btw4e/knots.pdf

More information

Talk Science Professional Development

Talk Science Professional Development Talk Science Professional Development Transcript for Grade 5 Scientist Case: The Water to Ice Investigations 1. The Water to Ice Investigations Through the Eyes of a Scientist We met Dr. Hugh Gallagher

More information

Chapter 1 Review of Equations and Inequalities

Chapter 1 Review of Equations and Inequalities Chapter 1 Review of Equations and Inequalities Part I Review of Basic Equations Recall that an equation is an expression with an equal sign in the middle. Also recall that, if a question asks you to solve

More information

Symbolic Logic Outline

Symbolic Logic Outline Symbolic Logic Outline 1. Symbolic Logic Outline 2. What is Logic? 3. How Do We Use Logic? 4. Logical Inferences #1 5. Logical Inferences #2 6. Symbolic Logic #1 7. Symbolic Logic #2 8. What If a Premise

More information

Science Literacy: Reading and Writing Diagrams Video Transcript

Science Literacy: Reading and Writing Diagrams Video Transcript Science Literacy: Reading and Writing Diagrams Video Transcript Mike If you look at your learning target up on the board, it says, "I can model and explain how the relative positions of the sun, Earth,

More information

Lab Slide Rules and Log Scales

Lab Slide Rules and Log Scales Name: Lab Slide Rules and Log Scales [EER Note: This is a much-shortened version of my lab on this topic. You won t finish, but try to do one of each type of calculation if you can. I m available to help.]

More information

Dynamic Programming: Matrix chain multiplication (CLRS 15.2)

Dynamic Programming: Matrix chain multiplication (CLRS 15.2) Dynamic Programming: Matrix chain multiplication (CLRS.) The problem Given a sequence of matrices A, A, A,..., A n, find the best way (using the minimal number of multiplications) to compute their product.

More information

Representation of Geographic Data

Representation of Geographic Data GIS 5210 Week 2 The Nature of Spatial Variation Three principles of the nature of spatial variation: proximity effects are key to understanding spatial variation issues of geographic scale and level of

More information

MITOCW ocw-18_02-f07-lec02_220k

MITOCW ocw-18_02-f07-lec02_220k MITOCW ocw-18_02-f07-lec02_220k The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free.

More information

Numerical Methods Lecture 2 Simultaneous Equations

Numerical Methods Lecture 2 Simultaneous Equations Numerical Methods Lecture 2 Simultaneous Equations Topics: matrix operations solving systems of equations pages 58-62 are a repeat of matrix notes. New material begins on page 63. Matrix operations: Mathcad

More information

Cells [6th grade] Digital Trinity. Trinity University. Roxanne Hammonds Trinity University

Cells [6th grade] Digital Trinity. Trinity University. Roxanne Hammonds Trinity University Trinity University Digital Commons @ Trinity Understanding by Design: Complete Collection Understanding by Design 7-2-2008 Cells [6th grade] Roxanne Hammonds Trinity University Follow this and additional

More information

Discrete Mathematics. Kenneth A. Ribet. January 31, 2013

Discrete Mathematics. Kenneth A. Ribet. January 31, 2013 January 31, 2013 A non-constructive proof Two classical facts are that π and e 2.71828... are irrational. Further, it is known that neither satisfies a quadratic equation x 2 + ax + b = 0 where a and b

More information

Solving Quadratic & Higher Degree Equations

Solving Quadratic & Higher Degree Equations Chapter 9 Solving Quadratic & Higher Degree Equations Sec 1. Zero Product Property Back in the third grade students were taught when they multiplied a number by zero, the product would be zero. In algebra,

More information

Read Hewitt Chapter 33

Read Hewitt Chapter 33 Cabrillo College Physics 10L LAB 6 Radioactivity Read Hewitt Chapter 33 Name What to BRING TO LAB: Any suspicious object that MIGHT be radioactive. What to explore and learn An amazing discovery was made

More information

Boyle s Law and Charles Law Activity

Boyle s Law and Charles Law Activity Boyle s Law and Charles Law Activity Introduction: This simulation helps you to help you fully understand 2 Gas Laws: Boyle s Law and Charles Law. These laws are very simple to understand, but are also

More information

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011 Math 31 Lesson Plan Day 2: Sets; Binary Operations Elizabeth Gillaspy September 23, 2011 Supplies needed: 30 worksheets. Scratch paper? Sign in sheet Goals for myself: Tell them what you re going to tell

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 9, 2019 Please don t print these lecture notes unless you really need to!

More information

MITOCW ocw f99-lec17_300k

MITOCW ocw f99-lec17_300k MITOCW ocw-18.06-f99-lec17_300k OK, here's the last lecture in the chapter on orthogonality. So we met orthogonal vectors, two vectors, we met orthogonal subspaces, like the row space and null space. Now

More information

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. This document was written and copyrighted by Paul Dawkins. Use of this document and its online version is governed by the Terms and Conditions of Use located at. The online version of this document is

More information

Math Lab 8: Electric Fields Integrating Continuous Charge Distributions II Due noon Thu. Feb. 1 in class

Math Lab 8: Electric Fields Integrating Continuous Charge Distributions II Due noon Thu. Feb. 1 in class Matter & Motion Winter 2017 18 Name: Math Lab 8: Electric Fields Integrating Continuous Charge Distributions II Due noon Thu. Feb. 1 in class Goals: 1. Learn to use Mathematica to plot functions and to

More information

MITOCW MITRES18_005S10_DerivOfSinXCosX_300k_512kb-mp4

MITOCW MITRES18_005S10_DerivOfSinXCosX_300k_512kb-mp4 MITOCW MITRES18_005S10_DerivOfSinXCosX_300k_512kb-mp4 PROFESSOR: OK, this lecture is about the slopes, the derivatives, of two of the great functions of mathematics: sine x and cosine x. Why do I say great

More information

D2D SALES WITH SURVEY123, OP DASHBOARD, AND MICROSOFT SSAS

D2D SALES WITH SURVEY123, OP DASHBOARD, AND MICROSOFT SSAS D2D SALES WITH SURVEY123, OP DASHBOARD, AND MICROSOFT SSAS EDWARD GAUSE, GISP DIRECTOR OF INFORMATION SERVICES (ENGINEERING APPS) HTC (HORRY TELEPHONE COOP.) EDWARD GAUSE, GISP DIRECTOR OF INFORMATION

More information

Properties of Arithmetic

Properties of Arithmetic Excerpt from "Prealgebra" 205 AoPS Inc. 4 6 7 4 5 8 22 23 5 7 0 Arithmetic is being able to count up to twenty without taking o your shoes. Mickey Mouse CHAPTER Properties of Arithmetic. Why Start with

More information

Structural Induction

Structural Induction Structural Induction In this lecture we ll extend the applicability of induction to many universes, ones where we can define certain kinds of objects by induction, in addition to proving their properties

More information

Math 90 Lecture Notes Chapter 1

Math 90 Lecture Notes Chapter 1 Math 90 Lecture Notes Chapter 1 Section 1.1: Introduction to Algebra This textbook stresses Problem Solving! Solving problems is one of the main goals of mathematics. Think of mathematics as a language,

More information

ATOMIC DIMENSIONS. Background for Teachers KEY CONCEPT

ATOMIC DIMENSIONS. Background for Teachers KEY CONCEPT ATOMIC DIMENSIONS KEY CONCEPT The volume of an atom is mainly empty space. Relative distances within an atom are difficult to visualize using drawings because they are similar to distances found in our

More information

Solving Equations by Adding and Subtracting

Solving Equations by Adding and Subtracting SECTION 2.1 Solving Equations by Adding and Subtracting 2.1 OBJECTIVES 1. Determine whether a given number is a solution for an equation 2. Use the addition property to solve equations 3. Determine whether

More information

You separate binary numbers into columns in a similar fashion. 2 5 = 32

You separate binary numbers into columns in a similar fashion. 2 5 = 32 RSA Encryption 2 At the end of Part I of this article, we stated that RSA encryption works because it s impractical to factor n, which determines P 1 and P 2, which determines our private key, d, which

More information

GUIDED NOTES 2.5 QUADRATIC EQUATIONS

GUIDED NOTES 2.5 QUADRATIC EQUATIONS GUIDED NOTES 5 QUADRATIC EQUATIONS LEARNING OBJECTIVES In this section, you will: Solve quadratic equations by factoring. Solve quadratic equations by the square root property. Solve quadratic equations

More information

Physics Motion Math. (Read objectives on screen.)

Physics Motion Math. (Read objectives on screen.) Physics 302 - Motion Math (Read objectives on screen.) Welcome back. When we ended the last program, your teacher gave you some motion graphs to interpret. For each section, you were to describe the motion

More information

3: Linear Systems. Examples. [1.] Solve. The first equation is in blue; the second is in red. Here's the graph: The solution is ( 0.8,3.4 ).

3: Linear Systems. Examples. [1.] Solve. The first equation is in blue; the second is in red. Here's the graph: The solution is ( 0.8,3.4 ). 3: Linear Systems 3-1: Graphing Systems of Equations So far, you've dealt with a single equation at a time or, in the case of absolute value, one after the other. Now it's time to move to multiple equations

More information

Lab: Modeling Eclipses

Lab: Modeling Eclipses 2017 Eclipse: Research-Based Teaching Resources Lab: Modeling Eclipses Description: This hands-on, guided-inquiry activity helps students to understand the geometry of lunar and solar eclipses by creating

More information

Chapter 2: The Basics. slides 2017, David Doty ECS 220: Theory of Computation based on The Nature of Computation by Moore and Mertens

Chapter 2: The Basics. slides 2017, David Doty ECS 220: Theory of Computation based on The Nature of Computation by Moore and Mertens Chapter 2: The Basics slides 2017, David Doty ECS 220: Theory of Computation based on The Nature of Computation by Moore and Mertens Problem instances vs. decision problems vs. search problems Decision

More information

Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur

Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur Lecture - 09 Hello, welcome to the day 4 of our second week of

More information

Math Topic: Unit Conversions and Statistical Analysis of Data with Categorical and Quantitative Graphs

Math Topic: Unit Conversions and Statistical Analysis of Data with Categorical and Quantitative Graphs Math Topic: Unit Conversions and Statistical Analysis of Data with Categorical and Quantitative Graphs Science Topic: s/dwarf s of our Solar System Written by: Eric Vignaud and Lexie Edwards Lesson Objectives

More information

MITOCW watch?v=fkfsmwatddy

MITOCW watch?v=fkfsmwatddy MITOCW watch?v=fkfsmwatddy PROFESSOR: We've seen a lot of functions in introductory calculus-- trig functions, rational functions, exponentials, logs and so on. I don't know whether your calculus course

More information

NOTATION: We have a special symbol to use when we wish to find the anti-derivative of a function, called an Integral Symbol,

NOTATION: We have a special symbol to use when we wish to find the anti-derivative of a function, called an Integral Symbol, SECTION 5.: ANTI-DERIVATIVES We eplored taking the Derivative of functions in the previous chapters, but now want to look at the reverse process, which the student should understand is sometimes more complicated.

More information

2) Estimate your annual radiation dose from background radiation.

2) Estimate your annual radiation dose from background radiation. Cabrillo College Physics 2B Radioactivity Name What to explore and learn An amazing discovery was made about 100 years ago: that some kind of rays came out of matter which could penetrate through solid

More information

MATH 22 FUNCTIONS: ORDER OF GROWTH. Lecture O: 10/21/2003. The old order changeth, yielding place to new. Tennyson, Idylls of the King

MATH 22 FUNCTIONS: ORDER OF GROWTH. Lecture O: 10/21/2003. The old order changeth, yielding place to new. Tennyson, Idylls of the King MATH 22 Lecture O: 10/21/2003 FUNCTIONS: ORDER OF GROWTH The old order changeth, yielding place to new. Tennyson, Idylls of the King Men are but children of a larger growth. Dryden, All for Love, Act 4,

More information

Lab 20. Predicting Hurricane Strength: How Can Someone Predict Changes in Hurricane Wind Speed Over Time?

Lab 20. Predicting Hurricane Strength: How Can Someone Predict Changes in Hurricane Wind Speed Over Time? Predicting Hurricane Strength How Can Someone Predict Changes in Hurricane Wind Speed Over Time? Lab Handout Lab 20. Predicting Hurricane Strength: How Can Someone Predict Changes in Hurricane Wind Speed

More information

Math Lecture 18 Notes

Math Lecture 18 Notes Math 1010 - Lecture 18 Notes Dylan Zwick Fall 2009 In our last lecture we talked about how we can add, subtract, and multiply polynomials, and we figured out that, basically, if you can add, subtract,

More information

The Euler Method for the Initial Value Problem

The Euler Method for the Initial Value Problem The Euler Method for the Initial Value Problem http://people.sc.fsu.edu/ jburkardt/isc/week10 lecture 18.pdf... ISC3313: Introduction to Scientific Computing with C++ Summer Semester 2011... John Burkardt

More information

COMS 6100 Class Notes

COMS 6100 Class Notes COMS 6100 Class Notes Daniel Solus September 20, 2016 1 General Remarks The Lecture notes submitted by the class have been very good. Integer division seemed to be a common oversight when working the Fortran

More information

S C F F F T T F T T S C B F F F F F T F T F F T T T F F T F T T T F T T T

S C F F F T T F T T S C B F F F F F T F T F F T T T F F T F T T T F T T T EECS 270, Winter 2017, Lecture 1 Page 1 of 6 Use pencil! Say we live in the rather black and white world where things (variables) are either true (T) or false (F). So if S is Mark is going to the Store

More information

Rainfall, Part IV. Rain does not normally accumulate above this level

Rainfall, Part IV. Rain does not normally accumulate above this level AND NOW FOR REAL RAIN GAUGES!!! Rainfall, Part IV Most real rain gauges have another complication that we haven t looked at yet. This complication makes it a little harder to understand how rain gauges

More information

Stellar Evolution Lab

Stellar Evolution Lab Stellar Evolution Lab Spying into the lives of the stars Developed by: Betsy Mills, UCLA NSF GK-12 Fellow Title of Lesson: Stellar Evolution Lab! Grade Level: 8th Subject(s): Astronomy: Stars, the Sun,

More information

Probability Methods in Civil Engineering Prof. Rajib Maity Department of Civil Engineering Indian Institute of Technology, Kharagpur

Probability Methods in Civil Engineering Prof. Rajib Maity Department of Civil Engineering Indian Institute of Technology, Kharagpur Probability Methods in Civil Engineering Prof. Rajib Maity Department of Civil Engineering Indian Institute of Technology, Kharagpur Lecture No. # 12 Probability Distribution of Continuous RVs (Contd.)

More information

Lab #2: Parallax & Introduction to Error Analysis

Lab #2: Parallax & Introduction to Error Analysis Lab #: Parallax & Introduction to Error Analysis February 6, 0 Due February 0, 0 by am Objectives: To understand and apply the techniques of parallax to measure the distances to terrestrial objects. To

More information

Binary addition example worked out

Binary addition example worked out Binary addition example worked out Some terms are given here Exercise: what are these numbers equivalent to in decimal? The initial carry in is implicitly 0 1 1 1 0 (Carries) 1 0 1 1 (Augend) + 1 1 1 0

More information

Hi, my name is Dr. Ann Weaver of Argosy University. This WebEx is about something in statistics called z-

Hi, my name is Dr. Ann Weaver of Argosy University. This WebEx is about something in statistics called z- Hi, my name is Dr. Ann Weaver of Argosy University. This WebEx is about something in statistics called z- Scores. I have two purposes for this WebEx, one, I just want to show you how to use z-scores in

More information

TA guide Physics 208 Spring 2008 Lab 3 (E-1): Electrostatics

TA guide Physics 208 Spring 2008 Lab 3 (E-1): Electrostatics Name TA guide Physics 208 Spring 2008 Lab 3 (E-1): Electrostatics Section OBJECTIVE: To understand the electroscope as an example of forces between charges, and to use it as a measuring device to explore

More information

Day 1: Over + Over Again

Day 1: Over + Over Again Welcome to Morning Math! The current time is... huh, that s not right. Day 1: Over + Over Again Welcome to PCMI! We know you ll learn a great deal of mathematics here maybe some new tricks, maybe some

More information

Introduction This is a puzzle station lesson with three puzzles: Skydivers Problem, Cheryl s Birthday Problem and Fun Problems & Paradoxes

Introduction This is a puzzle station lesson with three puzzles: Skydivers Problem, Cheryl s Birthday Problem and Fun Problems & Paradoxes Introduction This is a puzzle station lesson with three puzzles: Skydivers Problem, Cheryl s Birthday Problem and Fun Problems & Paradoxes Resources Calculators, pens and paper is all that is needed as

More information

The Gram-Schmidt Process

The Gram-Schmidt Process The Gram-Schmidt Process How and Why it Works This is intended as a complement to 5.4 in our textbook. I assume you have read that section, so I will not repeat the definitions it gives. Our goal is to

More information

Select/Special Topics in Atomic Physics Prof. P. C. Deshmukh Department of Physics Indian Institute of Technology, Madras

Select/Special Topics in Atomic Physics Prof. P. C. Deshmukh Department of Physics Indian Institute of Technology, Madras Select/Special Topics in Atomic Physics Prof. P. C. Deshmukh Department of Physics Indian Institute of Technology, Madras Lecture - 9 Angular Momentum in Quantum Mechanics Dimensionality of the Direct-Product

More information

CPSC 490 Problem Solving in Computer Science

CPSC 490 Problem Solving in Computer Science CPSC 490 Problem Solving in Computer Science Lecture 6: Recovering Solutions from DP, Bitmask DP, Matrix Exponentiation David Zheng and Daniel Du Based on CPSC490 slides from 2014-2017 2018/01/23 Announcements

More information

MITOCW ocw nov2005-pt1-220k_512kb.mp4

MITOCW ocw nov2005-pt1-220k_512kb.mp4 MITOCW ocw-3.60-03nov2005-pt1-220k_512kb.mp4 PROFESSOR: All right, I would like to then get back to a discussion of some of the basic relations that we have been discussing. We didn't get terribly far,

More information

Making Measurements. On a piece of scrap paper, write down an appropriate reading for the length of the blue rectangle shown below: (then continue )

Making Measurements. On a piece of scrap paper, write down an appropriate reading for the length of the blue rectangle shown below: (then continue ) On a piece of scrap paper, write down an appropriate reading for the length of the blue rectangle shown below: (then continue ) 0 1 2 3 4 5 cm If the measurement you made was 3.7 cm (or 3.6 cm or 3.8 cm),

More information

Physics General Physics. Mostly mechanics, some fluid mechanics, wave motion and thermodynamics! Fall 2016 Semester Prof.

Physics General Physics. Mostly mechanics, some fluid mechanics, wave motion and thermodynamics! Fall 2016 Semester Prof. Physics 22000 General Physics Mostly mechanics, some fluid mechanics, wave motion and thermodynamics! Fall 2016 Semester Prof. Matthew Jones 1 Physics 22000 General Physics Physics Department home page:

More information

Plasma Physics Prof. V. K. Tripathi Department of Physics Indian Institute of Technology, Delhi

Plasma Physics Prof. V. K. Tripathi Department of Physics Indian Institute of Technology, Delhi Plasma Physics Prof. V. K. Tripathi Department of Physics Indian Institute of Technology, Delhi Module No. # 01 Lecture No. # 22 Adiabatic Invariance of Magnetic Moment and Mirror Confinement Today, we

More information

Math 231E, Lecture 13. Area & Riemann Sums

Math 231E, Lecture 13. Area & Riemann Sums Math 23E, Lecture 3. Area & Riemann Sums Motivation for Integrals Question. What is an integral, and why do we care? Answer. A tool to compute a complicated expression made up of smaller pieces. Example.

More information

Welcome to PR3 The Art of Optimization. Lecture 3 May 22nd, IGAD - Hopmanstraat, Breda

Welcome to PR3 The Art of Optimization. Lecture 3 May 22nd, IGAD - Hopmanstraat, Breda Lecture 3 May 22nd, 2015 - IGAD - Hopmanstraat, Breda Lecture 3 May 22nd, 2015 - IGAD - Hopmanstraat, Breda > Recap > Demo Time > SIMD part 1/3 > Fixed Point part 2/2 > Homework part 3/4 > Coding Time

More information

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math.

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math. Regression, part II I. What does it all mean? A) Notice that so far all we ve done is math. 1) One can calculate the Least Squares Regression Line for anything, regardless of any assumptions. 2) But, if

More information

Course Announcements. Bacon is due next Monday. Next lab is about drawing UIs. Today s lecture will help thinking about your DB interface.

Course Announcements. Bacon is due next Monday. Next lab is about drawing UIs. Today s lecture will help thinking about your DB interface. Course Announcements Bacon is due next Monday. Today s lecture will help thinking about your DB interface. Next lab is about drawing UIs. John Jannotti (cs32) ORMs Mar 9, 2017 1 / 24 ORMs John Jannotti

More information

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions. Partial Fractions June 7, 04 In this section, we will learn to integrate another class of functions: the rational functions. Definition. A rational function is a fraction of two polynomials. For example,

More information

One sided tests. An example of a two sided alternative is what we ve been using for our two sample tests:

One sided tests. An example of a two sided alternative is what we ve been using for our two sample tests: One sided tests So far all of our tests have been two sided. While this may be a bit easier to understand, this is often not the best way to do a hypothesis test. One simple thing that we can do to get

More information

= $ m. Telephone Company B charges $11.50 per month plus five cents per minute. Writing that mathematically, we have c B. = $

= $ m. Telephone Company B charges $11.50 per month plus five cents per minute. Writing that mathematically, we have c B. = $ Chapter 6 Systems of Equations Sec. 1 Systems of Equations How many times have you watched a commercial on television touting a product or services as not only the best, but the cheapest? Let s say you

More information

Today s agenda: Capacitors and Capacitance. You must be able to apply the equation C=Q/V.

Today s agenda: Capacitors and Capacitance. You must be able to apply the equation C=Q/V. Today s agenda: Capacitors and Capacitance. You must be able to apply the equation C=Q/V. Capacitors: parallel plate, cylindrical, spherical. You must be able to calculate the capacitance of capacitors

More information

1 Closest Pair of Points on the Plane

1 Closest Pair of Points on the Plane CS 31: Algorithms (Spring 2019): Lecture 5 Date: 4th April, 2019 Topic: Divide and Conquer 3: Closest Pair of Points on a Plane Disclaimer: These notes have not gone through scrutiny and in all probability

More information

5 + 9(10) + 3(100) + 0(1000) + 2(10000) =

5 + 9(10) + 3(100) + 0(1000) + 2(10000) = Chapter 5 Analyzing Algorithms So far we have been proving statements about databases, mathematics and arithmetic, or sequences of numbers. Though these types of statements are common in computer science,

More information

Circular Motion Ch. 10 in your text book

Circular Motion Ch. 10 in your text book Circular Motion Ch. 10 in your text book Objectives Students will be able to: 1) Define rotation and revolution 2) Calculate the rotational speed of an object 3) Calculate the centripetal acceleration

More information