l1 (2) - Advanced Algorithms Lecture Outline January 05,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Advanced Algorithms Lecture Outline January 05, 2011 Counting Counting is a part of combinatorics, an area of mathematics which is concerned with the arrangement of objects of a set into patterns that satisfy certain constraints. We will mainly be interested in the number of ways of obtaining an arrangement, if it exists. Before we delve into the subject, let’s take a small detour and understand what a set is. Below are some relevant deFnitions. A set is an unordered collection of objects. The objects of a set are sometimes referred to as its elements or members. If a set is Fnite and not too large it can be described by listing out all its elements, e.g., { a,e,i,o,u } is the set of vowels in the English alphabet. Note that the order in which the elements are listed is not important. Hence, { a,e,i,o,u } is the same set as { i,a,o,u,e } . If V denotes the set of vowels then we say that e belongs to the set V , denoted by e V or e ∈ { a,e,i,o,u } . Two sets are equal if and only if they have the same elements. The cardinality of S , denoted by | S | , is the number of distinct elements in S . A set A is said to be a subset of B if and only if every element of A is also an element of B . We use the notation A B to denote that A is a subset of the set B , e.g., { a,u } ⊆ { a,e,i,o,u } . Note that for any set S , the empty set {} = ∅ ⊆ S and S S . If A B and A n = B the we say that A is a proper subset of B ; we denote this by A B . In other words, A is a proper subset of B if A B and there is an element in B that does not belong to A . A power set of a set S , denoted by P ( S ), is a set of all possible subsets of S . ±or example, if S = { 1 , 2 , 3 } then P ( S ) = {∅ , { 1 } , { 2 } , { 3 } , { 1 , 2 } , { 2 , 3 } , { 1 , 3 } , { 1 , 2 , 3 }} . In this example | P ( S ) | = 8. Another way to describe a set is by explicitly stating the properties that all members of the set must have. ±or instance, the set of all positive even numbers less than 100 can be written as { x | x is a positive integer less than 100 } . Some of the commonly used sets in discrete mathematics are: N = { 0 , 1 , 2 , 3 ,... } , Z = { ... , 2 , 1 , 0 , 1 , 2 ,... } , Q = { p/q | p Z and q Z ,and q n = 0 } , and R is the set of real numbers. Understanding the above terminology related to sets is enough to get us started on counting. Theorem. If m and n are integers and m n , then there are n m + 1 integers from m to n inclusive.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Lecture Outline January 05, 2011 Example. How many three-digit integers (integers from 100 to 999 inclusive) are divisible by 5? Solution. The Frst number in the range that divisible by 5 is 100 (5 × 20) and the last one that is divisible by 5 is 995 (5 × 199). Using the above theorem, there are 199 20+1 = 180 numbers from 100 to 999 that are divisible by 5. Tree Diagram.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/31/2011 for the course COMP 101 taught by Professor Rajivsir during the Winter '10 term at National.

Page1 / 8

l1 (2) - Advanced Algorithms Lecture Outline January 05,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online