CS336 F07 Counting 2. Example Consider integers in the set {1, 2, 3, …, 1000}. How many are divisible by either 4 or 10?

Slides:



Advertisements
Similar presentations
THE WELL ORDERING PROPERTY Definition: Let B be a set of integers. An integer m is called a least element of B if m is an element of B, and for every x.
Advertisements

Review for CS1050. Review Questions Without using truth tables, prove that  (p  q)   q is a tautology. Prove that the sum of an even integer and an.
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Section 4.1: The Basics of Counting As we have seen, one way to count the number of objects in a finite set S is to produce a one-to-one correspondence.
2 – 7 Problem Solving: Consecutive Integers
Counts objects in order.. Counts each object only once.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
Analytical Methods in CS (CIS 505)
Discrete Mathematics Lecture 7 Alexander Bukharovich New York University.
Functions f( ) = A B Lecture 15: Nov 4.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
What is the best way to start? 1.Plug in n = 1. 2.Factor 6n 2 + 5n Let n be an integer. 4.Let n be an odd integer. 5.Let 6n 2 + 5n + 4 be an odd.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Chapter 8 The principle of Inclusion and Exclusion Yen-Liang Chen Dept of Information Management National Central University.
Cardinality of a Set “The number of elements in a set.” Let A be a set. a.If A =  (the empty set), then the cardinality of A is 0. b. If A has exactly.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Chapter 2 The Basic Concepts of Set Theory © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Cardinality of Sets Section 2.5.
Objectives: By the end of class, I will be able to:  Identify sets  Understand subsets, intersections, unions, empty sets, finite and infinite sets,
Sequences & Summations CS 1050 Rosen 3.2. Sequence A sequence is a discrete structure used to represent an ordered list. A sequence is a function from.
Sequences and Summations
15.4 Permutations with Repetition. How many different ways can the letters of MEXICO be arranged?
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Generalized Permutations and Combinations
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
5.6 Generating Permutations and Combinations Generating Permutations Many different algorithms have been developed to generate the n! permutations of this.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
Chapter 5: Sequences, Mathematical Induction, and Recursion 5.9 General Recursive Definitions and Structural Induction 1 Erickson.
A Universal Turing Machine
2.1 Sets and Whole Numbers Remember to Silence Your Cell Phone and Put It In Your Bag!
Set Theory Trashketball ‘Cause your Quiz is next class.
Counting Techniques. L172 Agenda Section 4.1: Counting Basics Sum Rule Product Rule Inclusion-Exclusion.
INFIINITE SETS CSC 172 SPRING 2002 LECTURE 23. Cardinality and Counting The cardinality of a set is the number of elements in the set Two sets are equipotent.
Mathematical Preliminaries
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
9.1 Sets, Intersections, and Unions  Standard 1.0  8 Key Terms.
1 Partial Orderings Aaron Bloomfield CS 202 Epp, section ???
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.
Functions (Mappings). Definitions A function (or mapping)  from a set A to a set B is a rule that assigns to each element a of A exactly one element.
Module #10: Proof Strategies Rosen 5 th ed., §3.1 (already covered)
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 2.6 Infinite Sets.
Introduction to Graph Theory & its Applications
Pigeonhole Principle. If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons A function from one finite.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
“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.
Generating Permutations and Combinations “Traveling Salesman Problem” – A salesman must visit 6 cities; what’s the best order in which to visit them? Assume.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
1.1 Subsets of Real Numbers
Discrete Mathematics CS 2610
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Aaron Bloomfield CS 202 Epp, section ???
The Basic Concepts of Set Theory
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CS 3630 Database Design and Implementation
Discrete Math (2) Haiming Chen Associate Professor, PhD
The Basic Concepts of Set Theory
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Section 2.6 Infinite Sets.
Copyright © Zeph Grunschlag,
Copyright © Zeph Grunschlag,
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Math 0332 Subsets Name ________________________
Terminology and Symbols
Presentation transcript:

CS336 F07 Counting 2

Example Consider integers in the set {1, 2, 3, …, 1000}. How many are divisible by either 4 or 10?

Example Given sets A and B, each of cardinality n>0, how many functions map A in a one-to-one fashion onto B?

Example Given the set of r symbols {a 1, …, a r }, how many different strings of length n>0 exist (allowing repetition)?

Example Given the set of r symbols {a 1, …, a r }, how many different strings of length n exist that contain exactly one a 1 (allowing repetition)?

Example Given the set of r symbols {a 1, …, a r }, how many different strings of length n exist that contain at least one a 1 (allowing repetition)?

Example Given the set of r symbols {a 1, …, a r }, how many different strings of length n exist that contain at least two a 1 ’s (allowing repetition)?

Example Given the set of r symbols {a 1, …, a r }, how many different strings of length n>0 exist (not allowing repetition)? Given the set of r symbols {a 1, …, a r }, how many different strings of length n exist that contain exactly one a 1 (not allowing repetition)? Given the set of r symbols {a 1, …, a r }, how many different strings of length n exist that contain at least one a 1 (not allowing repetition)?

Example Given the set of r symbols {a 1, …, a r }, how many different selections of length n>0 exist (ignoring order not allowing repetition)? Given the set of r symbols {a 1, …, a r }, how many different selections of length n exist that contain at least one a 1 (ignoring order and not allowing repetition)?

Example A be a set of cardinality p. Consider ordered strings of length m using the elements of A. How many such strings have the mth component a repetition of one of the preceding m-1?

Example For n>0, Let A = {1, 2, …, 2n}. How many subsets of A contain exactly k 1 even numbers and k 2 odd numbers?