CSC 2300 Data Structures & Algorithms January 16, 2007 Chapter 1. Introduction.

Slides:



Advertisements
Similar presentations
Jessie Zhao Course page: 1.
Advertisements

Introduction to Set Theory
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
Chapter 5 Section 1 Sets Basics Set –Definition: Collection of objects –Specified by listing the elements of the set inside a pair of braces. –Denoted.
Sets 1.
Sets 1.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
February 5, 2015Applied Discrete Mathematics Week 1: Logic and Sets 1 Homework Solution PQ  (P  Q) (  P)  (  Q)  (P  Q)  (  P)  (  Q) truetruefalsefalsetrue.
Sets.
Functions.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Partially borrowed from Florida State University
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Chapter 3 Functions Functions provide a means of expressing relationships between variables, which can be numbers or non-numerical objects.
ICS 253: Discrete Structures I
Discrete Mathematics Math Review. Math Review: Exponents, logarithms, polynomials, limits, floors and ceilings* * This background review is useful for.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 3.1 Mathematical Foundation.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Sets Defined A set is an object defined as a collection of other distinct objects, known as elements of the set The elements of a set can be anything:
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
HALVERSON – MIDWESTERN STATE UNIVERSITY CMPS 2433 Chapter 2 – Part 2 Functions & Relations.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
Functions1 Elementary Discrete Mathematics Jim Skon.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Basic Structures: Functions Muhammad Arief download dari
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
MATH 224 – Discrete Mathematics
CompSci 102 Discrete Math for Computer Science
Chapter 2 With Question/Answer Animations. Section 2.1.
Rosen 1.6, 1.7. Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by.
Basic Structures: Sets, Functions, Sequences, and Sums.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Discrete Mathematics Set.
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
Fr: Discrete Mathematics by Washburn, Marlowe, and Ryan.
Chapter 7 Sets and Probability Section 7.1 Sets What is a Set? A set is a well-defined collection of objects in which it is possible to determine whether.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 1 The Foundations: Logic, Sets,
CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Design and Analysis of Algorithms.
The Basic Concepts of Set Theory. Chapter 1 Set Operations and Cartesian Products.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Section 2.3. Section Summary  Definition of a Function. o Domain, Cdomain o Image, Preimage  One-to-one (Injection), onto (Surjection), Bijection 
Chapter 2 1. Chapter Summary Sets The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions and sequences.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Sets and Operations TSWBAT apply Venn diagrams in problem solving; use roster and set-builder notation; find the complement of a set; apply the set operations.
ICS 253: Discrete Structures I
The set of whole numbers less than 7 is {1, 2, 3, 4, 5, 6}
Sets Finite 7-1.
Functions Section 2.3.
CHAPTER 2 Set Theory A B C.
Set Definition: A set is unordered collection of objects.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Sets Section 2.1.
CS 2210:0001 Discrete Structures Sets and Functions
Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement.
Discrete Math (2) Haiming Chen Associate Professor, PhD
2.1 Sets Dr. Halimah Alshehri.
Discrete Mathematics CS 2610
ICS 253: Discrete Structures I
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Lecture Sets 2.2 Set Operations.
Functions Section 2.3.
Presentation transcript:

CSC 2300 Data Structures & Algorithms January 16, 2007 Chapter 1. Introduction

Class Room New Classroom: Ricketts 211 Course web page:

Initial Plan for Grades Ten labs: 15% Ten homework:20% Exam 120% Exam 220% Final25%

Today’s Class We begin our study of the mathematical background for the design and analysis of algorithms. We need a mathematical basis and a set of analytical tools for  Predicting efficiency of algorithms  Choosing between different algorithms to solve the same problem Just implementing and testing algorithms is not sufficient.

Sets A set is an unordered collection of distinct objects (called elements). These elements may be anything, including other sets. There are many special sets with special designations:  Z is the set of integers  N is the set of natural numbers (integers beginning with 0)  R is the set of real numbers  The set with no elements, often called the “null set” or the “empty set,” is denoted { } or ø

Elements of Set The elements of a set may be specified in a number of ways. The simplest one is to list the elements, e.g., V = {a, u, e, i, o}. We use the notation “a ε V” to say “a is an element of V. ” Another way to specify the elements of a set is to describe them logically using what is referred to as “set-builder notation.” For example, S = {x | x ε R and 0 ≤ x ≤ 1} is the set of all real numbers in the interval from 0 to 1, inclusive of end points.

Subset A set S is a subset of another set T if and only if each element of S is also an element of T. This is denoted by S T. The power set of a set S, denoted by P(S), is the collection of all subsets of S. The cardinality of a set S, denoted by |S|, is the number of distinct elements of S.

Cartesian Product The Cartesian product of two sets, A and B, denoted by A×B, is the set of all ordered pairs (a, b), where a ε A and b ε B, i.e., A × B = {(a, b) | a ε A, b ε B} New sets may be formed from existing sets, S and T, by a variety of operations, such as union (S U T), intersection (S ∩ T), set difference (S − T) and set complement. Set complement requires the notion of a “universal set” U, from which set elements can be drawn.

Set Difference Most of these set operations should be familiar. The only one that might be new is set difference: S − T = {x | x ε S and x T}. Two sets, A and B, are said to be disjoint if A ∩ B = { }.

Exercise Given S = {a, b} and T = {0, a, {1, 2}}. a. List the elements of T. b. List all subsets of S. c. What is |S|? What is |T|? d. What are S ∩ T and S − T?

Functions A function, f, is a mapping from one set A, called the domain, to another set B, called the co-domain, that associates each element of A with a single element of B. We write this asf : A → B. If a ε A and f maps a to b, we write f(a) = b. The range of f is the set containing all b ε B such that f(a) = b for some a ε A.

Special Functions Special functions of interest  Floor: f(x) =. This is the largest integer less than or equal to x.  Ceiling: f(x) =. This is the smallest integer greater than or equal to x.  Factorial: f(n) = n!. Note that the domain of this function is the natural numbers.

Exponentiation (base b)

Logarithm

Exercises

Summations

Special Summation Formulas

Rules for Manipulation

Exercise 1

Exercises 2 and 3