CISC 1100: Structures of Computer Science

Similar documents
1 Chapter 1: SETS. 1.1 Describing a set

Introduction to Set Operations

Exclusive Disjunction

1. SET 10/9/2013. Discrete Mathematics Fajrian Nur Adnan, M.CS

Sets. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing Spring, Outline Sets An Algebra on Sets Summary

Discrete Basic Structure: Sets

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Spring

Chapter 2 - Basics Structures

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall

With Question/Answer Animations. Chapter 2

Discrete Mathematics. (c) Marcin Sydow. Sets. Set operations. Sets. Set identities Number sets. Pair. Power Set. Venn diagrams

CISC 1400 Discrete Structures

18.175: Lecture 2 Extension theorems, random variables, distributions

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall Set-builder notation (a more precise way of describing a set)

1.1 Introduction to Sets

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

Chapter-2 SETS In Mathematics, Set theory was developed by George Cantor ( ).

In this initial chapter, you will be introduced to, or more than likely be reminded of, a

SETS. JEE-Mathematics

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

CM10196 Topic 2: Sets, Predicates, Boolean algebras

PREFACE. Synergy for Success in Mathematics 7 is designed for Grade 7 students. The textbook

Sets. Introduction to Set Theory ( 2.1) Basic notations for sets. Basic properties of sets CMSC 302. Vojislav Kecman

Welcome to CS103! Two Handouts Today: Course Overview Introduction to Set Theory The Limits of Computation

Circles & Interval & Set Notation.notebook. November 16, 2009 CIRCLES. OBJECTIVE Graph a Circle given the equation in standard form.

A set is an unordered collection of objects.

SETS. Chapter Overview

SET THEORY. 1. Roster or Tabular form In this form the elements of the set are enclosed in curly braces { } after separating them by commas.

Show Your Work! Point values are in square brackets. There are 35 points possible. Some facts about sets are on the last page.

ICS141: Discrete Mathematics for Computer Science I

SETS AND FUNCTIONS JOSHUA BALLEW

Sec$on Summary. Definition of sets Describing Sets

Math 3201 Unit 1 Set Theory

Today s topics. Introduction to Set Theory ( 1.6) Naïve set theory. Basic notations for sets

Basic Set Concepts (2.1)

CS 2336 Discrete Mathematics

COMP9020 Lecture 3 Session 2, 2014 Sets, Functions, and Sequences. Revision: 1.3

Welcome to CS103! Three Handouts Today: Course Overview Introduction to Set Theory The Limits of Computation

1. (B) The union of sets A and B is the set whose elements belong to at least one of A

CHAPTER 1. Preliminaries. 1 Set Theory

Step-by-step and detailed demonstrations of how a specific concept or technique is applied in solving problems.

Statistics for Financial Engineering Session 2: Basic Set Theory March 19 th, 2006

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Finite Math Section 6_1 Solutions and Hints

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

2.23 Theorem. Let A and B be sets in a metric space. If A B, then L(A) L(B).

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

2-7 Solving Quadratic Inequalities. ax 2 + bx + c > 0 (a 0)

Chapter 0: Sets and Numbers

Sets. your school. A group of odd natural numbers less than 25.

8. Sequences, Series, and Probability 8.1. SEQUENCES AND SERIES

Math 210 Lecture Notes: Sections Sets and Counting

Toss 1. Fig.1. 2 Heads 2 Tails Heads/Tails (H, H) (T, T) (H, T) Fig.2

2 - Strings and Binomial Coefficients

1 Basic Combinatorics

MA : Introductory Probability

Fundamentals of Probability CE 311S

A B is shaded A B A B

No Solution Equations Let s look at the following equation: 2 +3=2 +7

n CS 160 or CS122 n Sets and Functions n Propositions and Predicates n Inference Rules n Proof Techniques n Program Verification n CS 161

Math 90 Lecture Notes Chapter 1

CSI30. Chapter 2. Basic Structures: Sets, Functions, Sequences, Sums. 2.1 Sets and subsets 2.2 Sets of sets

Lecture 9. The Principle of Inclusion/Exclusion. 9.1 Introduction: a familiar example

Homework every week. Keep up to date or you risk falling behind. Quizzes and Final exam are based on homework questions.

The objects in a set are the elements or members of the set. Always enclose the elements of a set in curly brackets. is read is an element of

CISC-102 Fall 2017 Week 1 David Rappaport Goodwin G-532 Office Hours: Tuesday 1:30-3:30

Sets McGraw-Hill Education

R1: Sets A set is a collection of objects sets are written using set brackets each object in onset is called an element or member

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. College Algebra for STEM

CS 173: Discrete Structures. Eric Shaffer Office Hour: Wed. 1-2, 2215 SC

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

Grade 7. Critical concept: Integers. Curricular content. Examples and Strategies

Notes on Sets for Math 10850, fall 2017

MATH 1111 Section P.1 Bland. Algebraic Expressions - An algebraic expression is a combination of variables and numbers using operations.

COMP9020 Lecture 3 Session 2, 2016 Sets, Functions, and Sequences. Revision: 1.3

Models of Computation. by Costas Busch, LSU

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

Set Theory. CPT Section D Quantitative Aptitude Chapter 7 Brijeshwar Prasad Gupta

Sets. 1.1 What is a set?

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

Section-A. Short Questions

Adding and Subtracting Terms

Chapter 7. Inclusion-Exclusion a.k.a. The Sieve Formula

MA Exam 2 - Spring 2007

Fall Math 140 Week-in-Review #5 courtesy: Kendra Kilmer (covering Sections 3.4 and 4.1) Section 3.4

This is a listing of common symbols found within all branches of mathematics 1. x = y means x and y represent the same thing or value.

1. Determine (with proof) the number of ordered triples (A 1, A 2, A 3 ) of sets which satisfy

= A. Example 2. Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, A = {4, 6, 7, 9, 10}, and B = {2, 6, 8, 9}. Draw the sets on a Venn diagram.

6.1 Logic. Statements or Propositions. Negation. The negation of a statement, p, is not p and is denoted by p Truth table: p p

1.1.1 Algebraic Operations

Chapter 1 Math Set: a collection of objects. For example, the set of whole numbers is W = {0, 1, 2, 3, }

CITS2211 Discrete Structures (2017) Cardinality and Countability

CHAPTER 1 SETS AND EVENTS

3.2 Probability Rules

One-to-one functions and onto functions

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Homework 1 2/7/2018 SOLUTIONS Exercise 1. (a) Graph the following sets (i) C = {x R x in Z} Answer:

Algebra Mat: Working Towards Year 6

Transcription:

CISC 1100: Structures of Computer Science Chapter 2 Sets and Sequences Fordham University Department of Computer and Information Sciences Fall, 2010 CISC 1100/Fall, 2010/Chapter 2 1 / 49

Outline Sets Basic defnitions Naming and describing sets Comparison relations on sets Set operations Principle of Inclusion/Exclusion Sequences Finding patterns Notation Closed form Recursive form Converting between them Summations CISC 1100/Fall, 2010/Chapter 2 2 / 49

Sets Set: a collection of objects (the members or elements of the set) Set-lister notation: curly braces around a list of the elements {a, b, c, d, e, f } {Arizona, California, Massachusetts, 42, 47} A set may contain other sets as elements: { 1, 2, {1, 2} } The empty set = {} contains no elements Can use variables (usually upper case letters) to denote sets C = {b, c, d, f, g, h, j, k, l, m, n, p, q, r, s, t, v, w, x, y, z} Universal set (generally denoted U): contains all elements we might want to ever consider (restrict our attention to what matters) CISC 1100/Fall, 2010/Chapter 2 3 / 49

Enumerating the elements of a set Order doesn t matter {1, 2, 3} = {3, 1, 2} Repetitions don t count {a, b, b} = {a, b} (better yet: don t repeat items in a listing of elements) CISC 1100/Fall, 2010/Chapter 2 4 / 49

Element notation If A is a set, then x A means x is an element of A x A means x is not an element of A So e {a, e, i, o, u} f {a, e, i, o, u} CISC 1100/Fall, 2010/Chapter 2 5 / 49

Some well-known sets Pretty much standard notations: N = {0, 1, 2, 3, 4, 5,... }: the set of natural numbers (non-negative integers). Z = {... 3, 2, 1, 0, 1, 2,...}: the set of all integers. Q: the set of all rational numbers (fractions). R: the set of all real numbers. Less standard (but useful) notations: Z + is the set of positive integers. Z is the set of negative integers. Z 0 is the same as N. R >7 is the set of all real numbers greater than seven. CISC 1100/Fall, 2010/Chapter 2 6 / 49

Set builder notation Rather than listing all the elements N = {0, 1, 2, 3, 4, 5,... } (inconvenient or essentially impossible), describe sets via a property A = { x : p(x) is true } Examples: N = { x x Z and x 0 } N = { x : x Z and x 0 } N = { x Z x 0 } N = { x Z : x 0 } CISC 1100/Fall, 2010/Chapter 2 7 / 49

Set builder notation (cont d) More examples: { x Q : 2x = 7} = {3.5} { x Z : 2x = 7} = {2x x Z} = {..., 4, 2, 0, 2, 4,... } { x N : 1 3x Z} = {0, 3, 6, 9,... } { x R 0 : x 2 = 2} = { 2} { x Q 0 : x 2 = 2} = CISC 1100/Fall, 2010/Chapter 2 8 / 49

Comparison relations on sets A is a subset of B (written A B ) if each element of A is also an element of B. {1, 3, 5} {1, 2, 3, 4, 5} {1, 2, 3, 4, 5} {1, 2, 3, 4, 5} {1, 3, 6} {1, 2, 3, 4, 5} A A for any set A A for any set A A is a proper subset of B (written A B ) if A B and A B. {1, 3, 5} {1, 2, 3, 4, 5} {1, 2, 3, 4, 5} {1, 2, 3, 4, 5} vs. is somewhat like < vs. CISC 1100/Fall, 2010/Chapter 2 9 / 49

Element vs. subset means is an element of means is a subset of Examples: Let A B means if x A then x B A = {purple, blue, orange, red} and B = {blue}. Fill in the missing symbol from the set {, /,,,, =, } to correctly complete each of the following statements: B A,, blue A green A / A A, = {blue, purple} B, A B, CISC 1100/Fall, 2010/Chapter 2 10 / 49

Venn Diagram Diagram for visualizing sets and set operations B A C When necessary, indicate universal set via rectangle surrounding the set circles. CISC 1100/Fall, 2010/Chapter 2 11 / 49

Venn Diagram (cont d) B A C For example, might have A = {Fordham students who ve taken CISC 1100} B = {Fordham students who ve taken CISC 1600} C = {Fordham students who ve taken ECON 1100} CISC 1100/Fall, 2010/Chapter 2 12 / 49

Set operations: Cardinality The number of elements in a set is called its cardinality. We denote the cardinality of S by S. Let A = {a, b, c, d, e, z}. Then A = 6. {a, e, i, o, u} = 5. = 0. {a, {b, c}, d, {e, f, g}, h} = 5. CISC 1100/Fall, 2010/Chapter 2 13 / 49

Set operations: Union Set of all elements belonging to either of two given sets: A B = {x : x A or x B} A B CISC 1100/Fall, 2010/Chapter 2 14 / 49

Set operations: Union (examples) Let A = {1, 2, 3, 4, 5} B = {0, 2, 4, 6, 8} C = {0, 5, 10, 15} Then A B = {0, 1, 2, 3, 4, 5, 6, 8} B A = {0, 1, 2, 3, 4, 5, 6, 8} B C = {0, 2, 4, 5, 6, 8, 10, 15} (A B) C = {0, 1, 2, 3, 4, 5, 6, 8, 10, 15} Let L = {e, g, b, d, f } S = {f, a, c, e} Then L S = {a, b, c, d, e, f, g} CISC 1100/Fall, 2010/Chapter 2 15 / 49

Set operations: Intersection Set of all elements belonging to both of two given sets: A B = {x : x A and x B} A B Note: We say that two sets are disjoint if their intersection is empty. CISC 1100/Fall, 2010/Chapter 2 16 / 49

Set operations: Intersection (examples) Let A = {1, 2, 3, 4, 5} B = {0, 2, 4, 6, 8} C = {0, 5, 10, 15} Then A B = {2, 4} B A = {2, 4} B C = {0} (A B) C = Let L = {e, g, b, d, f } S = {f, a, c, e} Then L S = {e, f } CISC 1100/Fall, 2010/Chapter 2 17 / 49

Set operations: Difference Set of all elements belonging to one set, but not another: A B = {x : x A and x / B} A B Note that A B = A A B CISC 1100/Fall, 2010/Chapter 2 18 / 49

Set operations: Difference (examples) Let A = {1, 2, 3, 4, 5} B = {0, 2, 4, 6, 8} C = {0, 5, 10, 15} Then A B = {1, 3, 5} B A = {0, 6, 8} B C = {2, 4, 6, 8} C B = {5, 10, 15} u(a B) (B A) = (Are you surprised by this?) CISC 1100/Fall, 2010/Chapter 2 19 / 49

Set operations: Complement Set of all elements (of the universal set) that do not belong to a given set: A = A = A = U A. Venn diagrams dealing with complements generally use a surrounding rectangle to indicate the universal set U: A If U and A are finite sets, then A = U A = U A. CISC 1100/Fall, 2010/Chapter 2 20 / 49

Set operations: Complement (examples) Let U = {red, orange, yellow, green, blue, indigo, violet} P = {red, green, blue} Then P = {orange, yellow, indigo, violet} Let E and O respectively denote the sets of even and odd integers. Suppose that our universal set is Z. Then E = O O = E CISC 1100/Fall, 2010/Chapter 2 21 / 49

Set operations: Power Set Set of all subsets of a given set B P(A) if and only if B A P( ) = { } P({a}) = {, {a} } P({a, b}) = {, {a}, {b}, {a, b} } P({a, b, c}) = {, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} } How many elements does P(A) have? i.e., P(A) = 2 A, if A = n, then P(A) = 2 n. CISC 1100/Fall, 2010/Chapter 2 22 / 49

Set operations: Cartesian Product Ordered pair: Pair of items, in which order matters. (1, 2)... not the same thing as (2, 1) (red, blue) (1, green) Cartesian product (also known as set product): Set of all ordered pairs from two given sets, i.e., A B = {(x, y) x A and y B} CISC 1100/Fall, 2010/Chapter 2 23 / 49

Set operations: Cartesian Product (examples) Let A = {1, 2, 3} B = {a, b, c} C = { 1, 5}, Then... A B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c), (3, a), (3, b), (3, c)} B A = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3), (c, 1), (c, 2), (c, 3)} C A = {( 1, 1), ( 1, 2), ( 1, 3), (5, 1), (5, 2), (5, 3)} B C = {(a, 1), (a, 5), (b, 1), (b, 5), (c, 1), (c, 5)} Note the following: A B B A (unless A = B) A B = A B (that s why it s called product ). CISC 1100/Fall, 2010/Chapter 2 24 / 49

Principle of Inclusion/Exclusion Suppose you run a fast-food restaurant. After doing a survey, you find that 25 people like ketchup on their hamburgers, 35 people like pickles on their hamburgers, 15 people like both ketchup and pickles on their hamburgers. How many people like either ketchup or pickles (maybe both) on their hamburgers? Let K = {people who like ketchup} and P = {people who like pickles}. Then K = 25 P = 35 K P = 15. CISC 1100/Fall, 2010/Chapter 2 25 / 49

Principle of Inclusion/Exclusion K P Since we don t want to count K P twice, we have K P = K + P K P = 25 + 35 15 = 45. CISC 1100/Fall, 2010/Chapter 2 26 / 49

Set operations: cardinalities of union and intersection A B Inclusion/exclusion principle: If A and B are disjoint, then A B = A + B A B A B = A + B See the example at http://tinyurl.com/kr4s3k What about three sets (hamburger eaters who like ketchup, pickles, and tomatoes)? CISC 1100/Fall, 2010/Chapter 2 27 / 49

Principle of Inclusion/Exclusion For three sets: B A C A B C = A + B + C A B A C B C + A B C. CISC 1100/Fall, 2010/Chapter 2 28 / 49

Principle of Inclusion/Exclusion Let K, P, T represent the sets of people who like ketchup, pickles, and tomatoes on their hamburgers. Suppose that Then K = 20 P = 30 T = 45 K P = 10 K T = 12 P T = 13 K P T = 8. K P T = K + P + T K P K T P T + K P T = 20 + 30 + 45 10 12 13 + 8 = 68 CISC 1100/Fall, 2010/Chapter 2 29 / 49

Sequences: Finding patterns What number comes next? 1, 2, 3, 4, 5, 6 2, 6, 10, 14, 18, 22 1, 2, 4, 8, 16, 32 1, 3, 6, 10, 15, 21 1, 2, 6, 24, 120, 720 1, 1, 2, 3, 5, 8, 13, 21 CISC 1100/Fall, 2010/Chapter 2 30 / 49

Discovering the pattern Each term might be related to previous terms Each term might depend on its position number (1st, 2nd, 3rd,... ) Well-known sequences (even numbers, odd numbers) Some (or all) of the above CISC 1100/Fall, 2010/Chapter 2 31 / 49

2, 4, 6, 8, 10,... Can we relate a term to previous terms? Second term is 2 more than first term. Third term is 2 more than second term.. Any given term is 2 more than previous term. CISC 1100/Fall, 2010/Chapter 2 32 / 49

2, 4, 6, 8, 10,... Can we describe each term by its position in the sequence? Term at position 1 is 2. Term at position 2 is 4. Term at position 3 is 6.. Term at position n is 2n. CISC 1100/Fall, 2010/Chapter 2 33 / 49

Mathematical notation Write term in a sequence as a lower case letter, followed by a subscript denoting position number of the term (e.g., a 1, b 7, z k ). For the sequence 2, 4, 6, 8, 10,... : a 1 = 2. a 2 = 4. a n is nth term in the sequence. CISC 1100/Fall, 2010/Chapter 2 34 / 49

2, 4, 6, 8, 10,... What is a 3? 6 What is a 5? 10 What is a 6? 12 What is a n if n = 5? 10 What is a n+1 if n = 5? 12 CISC 1100/Fall, 2010/Chapter 2 35 / 49

Recursive formula Recursive formula for a sequence: each term is described in relation to previous term(s). For example: a n = 2a n 1 So a 3 = 2a 2 = 2 (2 a 1 ) = 4a 1 = 4 (2a 0 ) = 8a 0 = 2 (8a 1 ) = 16a 1 =... Problem: Need a starting point (initial condition) such as a 1 = 1 So: Example: a n = 2a n 1 for n 2 a 1 = 2 a 3 = 2a 2 = 2 (2 a 1 ) = 4a 1 = 4 2 = 8 CISC 1100/Fall, 2010/Chapter 2 36 / 49

Fibonacci sequence 1, 1, 2, 3, 5, 8, 13,... Recursive formula: a n = a n 1 + a n 2 for n 3 a 2 = 1 a 1 = 1 What s a 10? Top-down solution: a 10 = a 9 + a 8 = (a 8 + a 7 ) + (a 7 + a 6 ) = a 8 + 2a 7 + a 6... Too hard! Better way? Work bottom-up via a grid. n 1 2 3 4 5 6 7 8 9 10 a n 1 1 2 3 5 8 13 21 34 55 CISC 1100/Fall, 2010/Chapter 2 37 / 49

Recursion Recursive formula corresponds to recursive function in a programming language. Fibonacci formula Recursive function a n = a n 1 + a n 2 for n 3 a 2 = 1 a 1 = 1 int a(n) { if (n == 1) return 1; if (n == 2) return 1; return a(n-1) + a(n-2); } CISC 1100/Fall, 2010/Chapter 2 38 / 49

Exercise: Find recursive formula 2, 4, 6, 8, 10,... a n = a n 1 + 2 for n 2 a 1 = 2 1, 3, 6, 10, 15,... a n = a n 1 + n for n 2 a 1 = 1 2, 2, 4, 6, 10, 16,... a n = a n 1 + a n 2 for n 3 a 2 = 2 a 1 = 2 CISC 1100/Fall, 2010/Chapter 2 39 / 49

Finding a closed formula Write each term in relation to its position Example: 2, 4, 6, 8, 10,... a 1 = 2 = 2 1 a 2 = 4 = 2 2 a 3 = 6 = 2 3 More generally, a n = 2n. CISC 1100/Fall, 2010/Chapter 2 40 / 49

Find the closed formulas 1, 3, 5, 7, 9,... a n = 2n 1 3, 6, 9, 12, 15,... b n = 3n 8, 13, 18, 23, 28,... c n = 5n + 3 3, 9, 27, 81, 243,... d n = 3 n CISC 1100/Fall, 2010/Chapter 2 41 / 49

Recursive formulas vs. closed formulas Recursive formula It s often easier to find a recursive formula for a given sequence. It s often harder to evaluate a given term. Closed formula It s often harder to find a closed formula for a given sequence. It s often easier to evaluate a given term. CISC 1100/Fall, 2010/Chapter 2 42 / 49

Closed formula recursive formula Write out a few terms. See if you can figure out how a given term relates to previous terms. Example: r n = 3n + 4. We find n 1 2 3 4 5... r n 7 10 13 16 19... r n = r n 1 + 3 for n 2 r 1 = 7 CISC 1100/Fall, 2010/Chapter 2 43 / 49

Closed formula recursive formula Can also use algebraic manipulation. Let s try r n = 3n + 4 again. Initial condition is easiest substitute n = 1 into closed form: r 1 = 3 1 + 4 = 7 Recursive formula: Try to describe r n in terms of r n 1 : So i.e., r n = 3n + 4 r n 1 = 3(n 1) + 4 = 3n 3 + 4 = 3n + 1 r n r n 1 = (3n + 4) (3n + 1) = 3, r n = r n 1 + 3 CISC 1100/Fall, 2010/Chapter 2 44 / 49

Another example s n = 2 n 2 Initial condition: s 1 = 2 1 2 = 0. Recursive formula: We have s n = 2 n 2 and So s n 1 = 2 n 1 2 s n = 2 n 2 = 2 2 n 1 2 = 2 2 n 1 4 + 2 = 2 (2 n 1 2) + 2 = 2s n 1 + 2 CISC 1100/Fall, 2010/Chapter 2 45 / 49

Exercise Find the recursive formulas for the following sequences: a n = 2n + 7 a 1 = 9 a n = a n 1 + 2 for n 2. b n = 2 n 1 b 1 = 1 b n = 2b n 2 + 1 for n 2. CISC 1100/Fall, 2010/Chapter 2 46 / 49

Summations Summing the terms in a sequence: important enough to have its own notation ( sigma notation ): Parts of speech? n a i = a 1 + a 2 + + a n i=1 Large Σ: summation i = 1 at bottom: We want to start summation at term #1 of the sequence. n at the top: We want to stop summation at the nth term of the sequence Portion to the right of the Σ n i=1 : Closed form of sequence we want to sum. CISC 1100/Fall, 2010/Chapter 2 47 / 49

Examples of Σ-notation: 5 (3i + 7) = (3 1 + 7) + (3 2 + 7) + (3 3 + 7) + (3 4 + 7) i=1 + (3 5 + 7) = 10 + 13 + 16 + 19 + 22 = 80 6 (j 2 2) = (2 2 2) + (3 2 2) + (4 2 2) + (5 2 2) + (6 2 2) j=2 = 2 + 7 + 14 + 23 + 34 = 80 Note: Parentheses are important! 5 3i + 7 = (3 1 + 3 2 + 3 3 + 3 4 + 3 5) + 7 = 52 i=1 CISC 1100/Fall, 2010/Chapter 2 48 / 49

Converting a sum into Σ-notation 3 + 7 + 11 + 15 + 19 = = 0 + 3 + 8 + 15 + 24 = 5 (4i 1) i=1 5 (4j 1) j=1 5 (k 2 1) k=1 CISC 1100/Fall, 2010/Chapter 2 49 / 49