# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

8 Pages

### ch03s7

Course: CS 2510, Fall 2009
School: Bowling Green
Rating:

Word Count: 576

#### Document Preview

Combinatorics, Sets, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright 2006 W.H. Freeman &amp; Co. MSCS Slides Probability Fundamental Theorem of Arithmetic FUNDAMENTAL THEOREM OF ARITHMETIC For every integer n 2, n is a prime number or can be written uniquely (ignoring ordering) as a product of prime numbers. We ignore the order in which we write the...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Ohio >> Bowling Green >> CS 2510

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Combinatorics, Sets, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright 2006 W.H. Freeman & Co. MSCS Slides Probability Fundamental Theorem of Arithmetic FUNDAMENTAL THEOREM OF ARITHMETIC For every integer n 2, n is a prime number or can be written uniquely (ignoring ordering) as a product of prime numbers. We ignore the order in which we write the factors: 2(3)(3) = 3(2)(3) If a and b are positive integers, then gcd(a,b) can always be written as a linear combination of a and b, that is, gcd(a,b) = ia + jb for some integers i and j. s q q gcd(420,66) = 6 = 3(420) - 19(66) Section 3.7 Number Theory 2 Fundamental Theorem of Arithmetic s The values 3 and 19 in gcd(420,66) = 3(420) - 19(66) are derived from the successive divisions done by the Euclidean algorithm: 420 = 6 * 66 + 24 66 = 2 * 24 + 18 24 = 1 * 18 + 6 18 = 3 * 6 + 0 s Rewriting the first three equations from the bottom up: 6 = 24 * 1 + 18 18 = 66 * 2 + 24 24 = 420 * 6 + 66 s Now we use these equations in a series of substitutions: 6 = 24 - 1 * 18 = 24 - 1 * (66 - 2 * 24) (substituting for 18) = 3 * 24 - 66 = 3 * (420 - 6 * 66) - 66 (substituting for 24) = 3 * 420 - 19 * 66 Section 3.7 Number Theory 3 Fundamental Theorem of Arithmetic q THEOREM ON gcd(a, b) Given positive integers a and b, gcd(a,b) is the linear combination of a and b that has the smallest positive value. From the theorem on gcd(a,b), it follows that a and b are relatively prime if and only if there exist integers i and j such that: ia + jb = 1 DEFINITION: RELATIVELY PRIME Two integers a and b are relatively prime if gcd(a,b) 1. Section 3.7 Number Theory 4 Fundamental Theorem of Arithmetic q THEOREM ON DIVISION BY PRIME NUMBERS Let p be a prime number such that p ab, where a and b are integers. Then, either p a or p b. To find the unique of factorization 825 as a product of primes, we can start by simply dividing 825 by successively larger primes: 825 = 3 * 275 = 3 * 5 * 55 = 3 * 5 * 5 * 11 = 3 * 52 * 11 q Doing the same on 455: 455 = 5 * 7 * 13 q From these factorizations, we can see that gcd(825, 455) = 5. Number Theory 5 Section 3.7 More on Prime Numbers q THEOREM ON SIZE OF PRIME FACTORS If n is a composite number, then it has a prime factor less than or equal to (n)1/2. Given n = 1021, let's find the prime factors of n or determine that n is prime. The value of (1021)1/2 is just less than 32. So the primes we need to test are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31. None divides 1021, so 1021 is prime. Section 3.7 Number Theory 6 More on Prime Numbers q q q THEOREM ON INFINITY OF PRIMES (EUCLID) There is an infinite number of prime numbers. Assume that there is a finite number of primes. Let the value of s = the sum of all primes + 1. Therefore, s is not prime. Thus, s is composite and by the fundamental theorem of arithmetic, s can be factored as a product of (some of) the prime numbers. Suppose that p is one of...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Bowling Green - CS - 2510
Relations, Functions, and M atricesMathematical Structures for Computer ScienceChapter 4Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesThe Mighty Mod FunctionThe Mighty Mod FunctionqqWe define the modulo n function as follows: If x = qn
Bowling Green - CS - 2510
Relations, Functions, and MatricesMathematical Structures for Computer ScienceChapter 4Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesRelations, Functions and MatricesMatrixqData about many kinds of problems can often be represented using
Bowling Green - CS - 2510
Graphs and TreesMathematical Structures for Computer ScienceChapter 5Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesGraphs and TreesTree TerminologyqqqA special type of graph called a tree turns out to be a very useful representatio
Bowling Green - CS - 2510
Gr aph Algor ithmsM athematical Str uctur es for Computer ScienceChapter 6Copyr ight 2006 W.H . F r eeman &amp; Co.M SCS SlidesGr aph Algor ithmsEuler Pat hqq qqqDEFINITION: EULER PATH An Euler path in a graph G is a path that uses e
Bowling Green - CS - 2510
Graph AlgorithmsMathematical Structures for Computer ScienceChapter 6Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesGraph AlgorithmsGraph Traversalqqq qGraph traversal is the process of writing out all the nodes of a simple, connect
Bowling Green - CS - 2510
Boolean Algebra and Computer LogicMathematical Structures for Computer ScienceChapter 7Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesBoolean Algebra StructureModels or AbstractionsqqMathematical principles are models or abstractions in
Bowling Green - CS - 2510
Boolean Algebra and Computer LogicMathematical Structures for Computer ScienceChapter 7Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesBoolean Logic and Computer LogicCombinational Networksq qqqqBasic logic elements Imagine that the
Bowling Green - CS - 2510
Boolean Algebra and Computer LogicMathematical Structures for Computer ScienceChapter 7Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesBoolean Logic and Computer LogicMinimizationqqqTo design a logic network for the function, the ideal
Bowling Green - CS - 2510
M odeling Arithmetic, Computation, and LanguagesMathematical Structures for Computer ScienceChapter 8Copyright 2006 W.H. Freeman &amp; Co.MSCS SlidesTuring MachinesTuring MachinesqA Turing machine is essentially a finite-state machine with
Bowling Green - CS - 2510
Bowling Green - CS - 2510
Bowling Green - CS - 2510
Bowling Green - CS - 2510
Bowling Green - CS - 2510
Bowling Green - CS - 2510
Iowa State - MR - 0518
Wallace's Farmer, IA 05-17-07 CSIF Embarks on Fourth Year of Service Rod Swoboda rswoboda@farmprogress.com The Coalition to Support Iowa's Farmers began its fourth year of service on May 11, helping livestock farmers grow responsibly and successfully
Iowa State - PUBLIC - 0518
Wallace's Farmer, IA 05-17-07 CSIF Embarks on Fourth Year of Service Rod Swoboda rswoboda@farmprogress.com The Coalition to Support Iowa's Farmers began its fourth year of service on May 11, helping livestock farmers grow responsibly and successfully
Stanford - PUBS - 20620
International Physicians for the Prevention of Nuclear Warhttp:/www.ippnw.org/NukeEPWsFull.html. Find a Topic.Go!Nuclear War PreventionNuclear Bunker Busters: The Medical Consequences1 of 86/1/04 1:20 PMInternational Physicians for the
CSU Northridge - VCEED - 002
CSU Northridge - VCEED - 002
(1) Discuss the processes of exchange of oxygen and carbon dioxide that occur at the alveoli and muscle cells of mammals. Include in your answer a description of the transport of these gases in the blood.Table 3.2: Grid for answering an essay quest
CSU Northridge - VCEED - 002
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41A B C The Sourcebook for Teaching Science Chapter 20.1DEFGHIJFigure 20.2 Sample Spreadsheet CalculationsTemperature c
CSU Northridge - VCEED - 002
Atmospheric Carbon Dioxide Concentrations at Mauna Loa Observatory(The Sourcebook for Teaching Science, Figure 20.8) Year ppmMar-58 Apr-58 May-58 Jun-58 Jul-58 Aug-58 Sep-58 Oct-58 Jan-59 Feb-59 Mar-59 Apr-59 May-59 Jun-59 Jul-59 Aug-59 Sep-59 Oct
CSU Northridge - VCEED - 002
Sourcebook for Teaching Science Chapter 20.4 Ozone pollution (24 h period) mountain beach valley hourAtmpspheric Ozone Concentration (one day period)0.90 0.90Atmpspheric Ozone Concentration (one day period)1 2 3 4 5 6 7 8 9 10 11 12 13
CSU Northridge - VCEED - 002
Sourcebook for Teaching Science Chapter 20.5 Age Profiles (2004) source: US Census Bureau Afghanistan GermanyPopulation Profiles40 percent of population 30 20 10 0 10-19 0-9 30-39 50-59 70-79 80-89 9020-29 40-49 60-69 Afghanistan USAage 09 10
CSU Northridge - VCEED - 002
Norm Herr Types of Graphs The Soucebook for Teaching Science (Chapter 20) Causes of Death in the US 2005 1 heart disease 654,092 2 cancer 550,270 3 stroke 150,147 4 chronic respiratory diseases 123,884 5 accidents 108,694 6 influenza &amp; pneumonia
CSU Northridge - VCEED - 002
The Sourcebook for Teaching Science - Chapter 20.7Seasonal High and Low Temperatures cityAtlanta Baltimore Boston Chicago Cleveland Dallas Denver Detroit Houston Kansas City Los Angeles Miami Minneapolis Nashville New Orleans New York Philadelphia
LSU - ETD - 04152009
ANALYSIS OF PROGRESSIVE LAG REINFORCMENT SCHEDULES AND ENVIRONMENTAL CUES ON VERBAL RESPONSE VARIABILITYA Dissertation Submitted to the Graduate Faculty of the Louisiana State University and Agricultural and Mechanical College in partial fulfillmen
CSU Northridge - VCEED - 002
Complete the following conceptual grid Table 9.3 Conceptual grid comparing three classes of fishtemperatur e regulation Agnatha Chondrichthyes Osteichthyes fins respiration skeleton swim bladder mouth examplesDrag this box off to see a solution to
CSU Northridge - VCEED - 002
California State UniversityNorthridgeAPPLICATION FOR ADMISSION TO MASTER'S DEGREE PROGRAM Science EducationDepartment of Secondary EducationMichael D. Eisner College of Education Personal Information (name street state, zip)home phone emai
CSU Northridge - VCEED - 002
California State UniversityNorthridgeAPPLICATION FOR ADMISSION TO MASTER'S DEGREE PROGRAM Science EducationDepartment of Secondary EducationMichael D. Eisner College of Education Personal Information (name street state, zip)home phone emai
Millersville - CS - 161
Essential Emacs Commands (by Gary M. Zoppetti)=(C = Control, M = Meta = ESC)Invoking Emacs (from the shell)-emacs &amp;run Emacs in the background (using X Windows)emacs -nwrun Emacs in a terminal window (cannot use menus)File Handling-C
Millersville - CS - 362
Introduction: C+, Data Structures Scope Resolution Operator Storage Containers -General -Vectors -Lists -Maps ADT's Classes -Declaration -Private/Public Sections time24 function addTime() Rectangle Class API -Constructor -Operations -RandomNumber Cl
Millersville - CS - 362
Heaps, Binary Files, and Bit Sets Complete Binary Trees Maximum and Minimum Heaps pushHeap () popHeap () Adjusting popHeap() Heap Sort Heapifying File Structure Direct File Access bitVector Class Lossless Compression Lossy Compression Example of Bui
Millersville - CS - 362
Divide and Conquer Building a Ruler: drawRuler() Merge Algorithm Partitioning and Merging of Sublists in mergeSort() mergeSort () Recursion Tree Quicksort Finding kth Largest Element powerSet() Example Recursive calls for fib(5)Lecture 14Effect
Millersville - CS - 362
Lecture 15 Graphs Graph Categories Example of Digraph Connectedness of Digraph Adjacency Matrix Adjacency Set1Graphs Graph G = (V, E) graph (digraph)V is a set of vertices E is a set of edges E consists of ordered pairs of vertices E = { (
Millersville - CS - 362
Sorting, Searching, Recursion Introduction to Algorithms Selection Sort Algorithm -Integer Version -String Version Template Syntax Recursion Sorting Alg. Search Algorithms Illustrating Binary Search Big-O Notation Constant Time Algorithms Linear Tim
Millersville - CS - 362
Containers Overview and Class VectorContainer Types Sequence Containers Associative Containers Adapter Classes The List Container Stack Containers Queue Containers Priority Queue Containers Set Containers Map Containers C+ Arrays Vectors Insertion S
Millersville - CS - 362
Pointers and Dynamic MemoryVertical / Horizontal View . . . Data Addresses in Memory Matrices Declaring Pointer Variables Assigning Values to Pointers Accessing Data with Pointers Arrays and Pointers Operator `new' Operator `delete' Copy Constructor
Millersville - CS - 362
List Container and IteratorsShifting blocks of elements. Linked Lists The list ADT CLASS list Constructors CLASS list Operations CLASS list:iterator Operations Inserting an element into a list Removing an element from a list Ordered lists Splicing t
Millersville - CS - 362
Lecture 9Binary Trees Tree Structures Tree Node Level and Path Length Binary Tree Definition Sample Trees Binary Tree Nodes Binary Search Trees Using Binary Search Trees - Removing Duplicates Find Insert, Erase1Trees k-ary trees= |V| - 1
Millersville - CS - 161
Building Java ProgramsChapter 1: Introduction to Java ProgrammingCopyright 2006 by Pearson Education1Chapter outlinebasic Java programs programs and programming languages output with println statements syntax and errors String liter
Millersville - CS - 161
Building Java ProgramsSupplement 3G: GraphicsCopyright 2006 by Pearson Education1Chapter outlinedrawing 2D graphics DrawingPanel and Graphics objects drawing and filling shapes coordinate system colors drawing with loops drawing wit
Millersville - CS - 161
Building Java ProgramsChapter 6: File ProcessingCopyright 2006 by Pearson Education1Chapter outlinefile input using Scanner File objects throwing exceptions file names and folder paths tokenbased file processinglinebased file pr
Millersville - CS - 161
Building Java ProgramsChapter 8: ClassesCopyright 2006 by Pearson Education1Chapter outlineobjects, classes, and objectoriented programming relationship between classes and objects abstractionanatomy of a class fields instance m
Millersville - CS - 161
Building Java ProgramsChapter 10: ArrayListCopyright 2006 by Pearson Education1Chapter outlineArrayList basic operations searching for elements wrapper classesComparable interface natural ordering and compareTo implementing Compa
Millersville - CS - 161
Building Java ProgramsChapter 11: Java Collections FrameworkCopyright 2006 by Pearson Education1Chapter outlineLists Collections LinkedList vs. ArrayList IteratorsSets TreeSet vs. HashSet Set operationsMaps Map operation
Millersville - CS - 161
Building Java ProgramsChapter 12: RecursionCopyright 2006 by Pearson Education1Chapter outlinethinking recursively recursive algorithms iteration vs. recursion integer exponentiation (pow) infinite recursion tracing recursive methods gre
Millersville - CS - 161
Building Java ProgramsChapter 13: Searching and SortingCopyright 2006 by Pearson Education1Chapter outlineSearching and sorting in the Java class libraries sequential and binary search sorting shuffling custom ordering with Comparator
Millersville - CS - 161
Building Java ProgramsChapter 14: Graphical User InterfacesCopyright 2006 by Pearson Education1Chapter outlineGUI basics Graphical input and output with JOptionPane Frames, buttons, labels, and text fields Changing a frame's layout Han
CSU Northridge - VCEED - 002
for California Public Schools1999 EDITIONHANDBOOKCIENCE AFETYCALIFORNIA DEPARTMENT OF EDUCATION SACRAMENTO, 1999TMENTOFEDUCAN TIODEPARTEOFCA LIF ORPublishing InformationThe Science Safety Handbook for Californi
CSU Northridge - VCEED - 002
APPENDIX MSample Chemical Inventory School Inventory prepared by Date acquired 8-94 2-94 Chemical name Acetic acid Acetone Concentration Type of /Purity container 1.0 99.5% Glass Metal can Quantity 1 liter 400 ml Hazard class Storage Storage locatio
Millersville - CS - 162
Intellectual Property (IP)Intellectual Property Creative works that have economic value and are protected by law IP law limits copying, performing, distributing protected works Purpose: provide economic incentive for individuals to produce works
Millersville - CS - 162
Building Java ProgramsClasses1Outlineobjects, classes, and objectoriented programming relationship between classes and objects abstractionanatomy of a class fields instance methods constructors encapsulationadvanced classes
Millersville - CS - 162
Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life cycle models Explore the notation of the Unified Modeling Language (UML) Examine issues related
CSU Northridge - VCEED - 002
APPENDIX 3.2 CHEMICAL STORAGE NFPA Hazard Codes The National Fire Protection Association developed a standard label to display chemical hazard ratings (see Appendix 3-3). The NFPA label is required by many institutions, industries, and municipalities
Millersville - CS - 162
Building Java ProgramsArrayList1OutlineArrayList basic operations searching for elements wrapper classesComparable interface natural ordering and compareTo implementing Comparable2ArrayList3Listslist: an ordered sequence
Millersville - CS - 162
Building Java ProgramsInheritance and Interfaces1Outlinebackground categories of employees relationships and hierarchies creating subclasses overriding behavior multiple levels of inheritance interacting with the superclass using the super
Millersville - CS - 162
Building Java ProgramsJava Collections Framework1OutlineLists Collections LinkedList vs. ArrayList IteratorsSets TreeSet vs. HashSet Set operationsMaps Map operations Map views TreeMap vs. HashMap2Lists3Collections
Iowa State - NR - 78044
Iowa State - NR - 91405
To Your HealthDecember 2008Enjoy Tasty (and Healthy) Party TreatsMany parties are focused on food particularly this time of year. Cookies, candies, pies, cakes, beverages of various kinds and so much more adorn tables. While all foods or bevera
Iowa State - ADE - 93901
Icebreakers and Group GamesTarget Audience: Youth 5-11 years old. Description: Icebreakers and other games are a good way to ease the tension as groups and/or teams are being formed. The 22 icebreakers and games in this collection are designed to he