...Discrete Math for Computer Science Students Ken Bogart Dept. of Mathematics Dartmouth College Scot Drysdale Dept. of Computer Science Dartmouth College Cliff Stein Dept. of Industrial Engineering and Operations Research Columbia University ii c Kenneth P. Bogart, Scot Drysdale, and Cliff Stein, 2004 Contents 1 Counting 1.1 Basic Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Sum Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summing Consecutive Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Product Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Two element subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Important Concepts, Formulas, and Theorems . . . . . . . . . . . . . . . . . . . . Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Counting Lists, Permutations, and Subsets. . . . . . . . . . . . . . . . . . . . . . Using the Sum and Product Principles . . . . . . . . . . . . . . . . . . . . . . . . Lists and functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Bijection Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . k-element permutations of a set . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counting subsets...
Words: 71201 - Pages: 285
...Kelley England ENG-200/Dr. Roemer 12/14/05 “Cargoes” By: John Masefield In the poem “Cargoes,” the author, John Masefield, writes about nostalgia and progress. The gritty realities of modern life are set against the golden age of the “Stately Spanish galleon” and the even more distant glamour of the “Quinquereme of Ninevah.” The author evokes the senses using multiple kinds of imagery in each stanza of the poem. The poem encompasses the past and the future of the changing ships and cargoes throughout various periods of history. John Masefield was born in 1878 in Ledbury, England. He married his wife, Constance, at the age of 23 and had two children, a boy and a girl. He suffered tragedies early in his life such as his mother’s death when he was 6, both of his grandparents’ deaths at the age of 7, and his father having a mental breakdown five years later and then dying when John was 12 years old. His Aunt and Uncle took on the responsibility of raising him and at the age of 13, his Aunt sent him to the sea-cadet ship the HMS Conway to train for a life at sea. It was aboard this ship that he developed a love for story telling. Sea life did not suit John and on his second voyage he deserted his ship in New York City and began to travel the countryside, taking whatever odd jobs he could find, often sleeping outdoors and eating very little. After 3 years, he was ready to return to England. John became a very big admirer of William Butler Yeats and after many letters...
Words: 608 - Pages: 3
...Even though Oak Ridge High School and Pacific High School are both institutions of learning, they each differ in at least four ways. The first difference between Oak Ridge High School and Pacific High School is their location. Oak Ridge High is located in Conroe, Texas. Whereas, Pacific High School is located in Pacific, Missouri. The second difference between Oak Ridge High School and Pacific High School is their work/study program. Oak Ridge High School had what was called Vocational Office - Career Club of Texas (VOCCT). VOCCT was a class that prepared students for the workplace. The teacher would assign specific students to be officers like: President, Vice President, Sectary, Treasurer and so on. This class allowed the student to go to school each day until 11:00 am. Then, the student would work the last half of the day. At Pacific High School they had what was called Distributive Education Club of America (DECA). DECA was very similar to VOCCT in that it was a class that prepared the students for the work place and had officers as well, but the students were not allowed to leave school until 1:00pm. The third difference between Oak Ridge High School and Pacific High School is that Oak Ridge High School had a drill team that would perform dance routines during half time at the football games. Whereas, Pacific High School did not have a drill team at all. The fourth difference between Oak Ridge High School and Pacific High School is the structure. Oak Ridge...
Words: 341 - Pages: 2
...performance-- as well as managing and guiding one's decisions and processes for completing a task, also comes into play; finally, the obligation to report, explain, and be answerable to resulting consequences when implementing those actions is quite significant. To put it simply, when taking accountability for something, you are acknowledging and assuming responsibility for your actions.If I go further in depth with this particular topic, we can see that this system of accountability can actually be created by breaking down the very word "accountability," into separate synonyms (words that have the same or similar meaning) and can be categorized as such. The word "count," in "accountability" implies the action of finding the number of elements of a finite set of objects. The traditional way of counting consists of continually increasing a (mental or spoken) counter by a unit for every element of the set, in some order, while marking (or displacing) those elements to avoid visiting the same element more than once, until no unmarked elements are left; if the counter was set to one after the first object, the value after visiting the final object gives the desired number of elements....
Words: 308 - Pages: 2
...and D = {blue, white, red}are sets of natural numbers and set of colors respectively. b) Element of Set: A number, letter, item or any other object contained in a Set is called Element of a Set. In a) above, elements of Set C are 1,2,3 and 4. c) Order of a Set: are special binary relations. Suppose that P is a set and that ≤ is a relation on P, Then ≤ is a partial order if it is reflexive, antisymmetric and transitive. d) Null Set: is the unique set having no elements; its size or cardinality (count of elements in a set) is zero. Common notations for the empty set include "{}", " ", and " ". e) Finite Set: a finite set is a set that has a finite number of elements. For example, is a finite set with five elements. The number of elements of a finite set is a natural number (non-negative integer),and is called the cardinality of the set. A set that is not finite is called infinite. For example, the set of all positive integers is infinite: f) Proper Subset: A proper subset is a grouping of numbers in which all the numbers for two quantities have the same numbers, but are not equal. g) Data: are values of qualitative or quantitative variables belonging to a set of items. h) Statistics: Statistics is a branch of mathematics that deals with the collection, organization and interpretation of data. i) Probability: is a measure or estimation of how likely it is that something will happen or that a statement is true. Probabilities are given a value between...
Words: 496 - Pages: 2
...There are some things that happen to cows and whales. One of the things, both cows and whales are eaten by people in some countries as edible meat. Another thing, although they are living different places like ocean and land, they have their own lives. It seems that cows and whales are in a same situation. But there are some differences that could be compared. First, many cows are slaughtered everyday. On the other hand, whales are protected by national law recently. Second, cows are important provisions for all over the world. However, whales are important edible animals only in a few countries. Finally, there is the biggest difference between cows and whales. It is that whales are free in the huge ocean until caught by people, and cows will be grown up in the field by the people to eat. The first difference between cows and whales is that cows are the most popular edible meat all over the world. Therefore, many cows are butchered everyday. Of course, there are several reasons that people use cows to their provisions. Because cows are easy for farmers to breed, and they are not as clever as other animals. On the other hand, whales have been protected by a law. (The United Nations Convention on the Law of the Sea) Therefore, every whaler has been limited in number to catch the whales recently. The reason of this law is whales are not easy to breed as cows. And they are such a clever animals more than any other kind of animal. The second difference is that cows are important...
Words: 484 - Pages: 2
...Data Structure and Algorithms UNIT – I PART- A Questions & Answers 1. What is an algorithm? An algorithm is a finite set of instructions that , if followed, accomplishes a particular task. 2. What are the characteristics of an algorithm? Input – Zero or more quantities Output – At least one quantity Definiteness – each instruction is clear and unambiguous Finiteness – terminate after a finite number of steps Efficiency – easily understandable 3. Define Space Complexity The Space complexity of an algorithm is the amount of memory it needs to run to completion 4. Define Time Complexity Time complexity of an algorithm is the amount of computer time it needs to run to completion 5. What are asymptotic notations? The notations that enables us to make meaningful statements about the time and space complexity of a program is called asymptotic notations. 6. What are the various asymptotic notations used to define the efficiency of an algorithm? Big ‘Oh’ (O) Omega (Ω) Theta (θ) Little ‘oh’ (o) Little Omega 7. What is information? Information is a recorded or communicated material that has some meaning associated with symbolic representation. 8. What are the aspects to be considered to ensure information transfer between source and destination? Syntactic – Physical form of information Semantic – Meaning Pragmatic – Action taken as a result of interpretation of information 9. State the Markov algorithm It takes the input string X and through a number...
Words: 425 - Pages: 2
...Exercise 4.1, problem 5a for i := 1 to 123 do for j := 1 to i do print i * j a) How many times is the print statement of the third line executed? Since we have to count iterations starting from one until 123, the first count would be 1 then 3 then 6 and so forth. The segment can be translated to (n)(n+1)/2 where 123 would be (n). (123)(123 + 1)/2 The statement is executed 7626 times. Exercise 4.2, problem 18a a) How many permutations of 1, 2, 3 have k ascents, for k = 0, 1, 2? Ascent can be determined by simply looking at its numbers. In the case of 123, 3 > 2 and 2 >1 so there are 2 ascents. 123 = 2 321 = 0 231 = 1 213 = 1 132 = 1 312 = 1 k = 0 1 k = 1 4 k = 2 1 Exercise 4.3, problem 22a Solve each problem (if possible), and then convert the results to base 10 to check your answers. Watch for any overflow errors. 8 4 2 1 0101 5 + 0001 1 0110 6 Exercise 4.4, problem 1a 1. For each of the following pairs a, b ∈ Z+, determine gcd (a, b) and express it as a linear combination of a, b. a) 231, 1820 1820 = 7 (231) + 203 0 < 203 < 231 231 = 1 (203) + 28 0 < 203 < 28 203 = 7 (28) + 7 0 < 28 < 7 28 = 4 (7) + 0 7 gcd(1820, 231) = 7 7 = 203 – 7 (28) 203 – 7 (231 – 203) 8 (203) – 7 (231) 8 (1820 – 7 (231)) – 7(231) 8 (1820) – 63 (231) Exercise 5.1, problem 4 For which sets A, B is it true that A X B = B...
Words: 597 - Pages: 3
...Teaching First Graders to Count to 15 A group of 10 first-grade students who can already count rationally to 10 are now ready to expand their counting prowess to 15. The first step is to make sure they are comfortable with some basic counting principles. The first principle that must be reviewed is one-to one correspondence. Using the numbers with which the students are already familiar (1-10) the students will be given a calendar with all of the days of the week blacked out so there are simply squares arranged numerically. For this portion of the exercise the squares with numbers greater than 10 will be blacked out as well. We will review the calendar starting with “1” and continue to “9”. The students will be asked to point to the square sequentially and count together 1,2,3…9. The students will be asked how many number 1’s, there are, how many 2’s, etc. The teacher will piggy-back on this explaining how each square was counted only once and each had its own number. This will continue until the students’ exhibit through teacher observation an understanding of one-to-one correspondence. The next principle will be the stable order rule. Again the students will count the numbered squares in order. The teacher will count the squares for the students in a random mixed-up order and ask the students if said counting was correct. Of course the students will recognize it’s not at which point the teacher will stress stable order rule of numbers in a fixed order every...
Words: 1118 - Pages: 5
...Module 3 Written Assignment: Part 3 General Expectations: (i). For full credit, your written assignments must be accompanied by a narrative explanation/rationale for the process that you used to solve each problem. How did you choose the steps? What is the logic behind the choices that you made? Explain why the problems were solved the way they were solved. Use complete sentences, good English, and proper mathematical notation. (ii). For full credit, your written assignments must include the statement of each problem so the reader knows what you are trying to demonstrate. In cases where the assignment refers you to a book problem, you must also copy the statement of the appropriate problem in the book. Note: Be sure to do the practice exercises in this assignment. They have been carefully chosen to help you understand the material needed to do the assigned exercises that immediately follow. Section 3.1: Practice: Do # 1a and 1c from Section 3.1. Check your answers in the back of the book. 1. Let f = {(Mindy, Subaru), (Jasmine, Toyota), (Sharon, VW), (Roger, Kia), (Jose, VW)}. (a.) What is the domain of this relation? (b.) What is the range? (c.) Is this a function? Why or why not? (d.) Is this relation one-to-one? Why or why not? (d.) Define g as {(Mindy, Subaru), (Jasmine, Toyota), (Sharon, VW), (Roger, Kia), (Jose, Oldsmobile)}. Is g a one-to-one function? Why or why not? 2. Prove that the function f : R → R given by f (x) = 4x − 3 is surjective. [You may use the Proof...
Words: 772 - Pages: 4
...An Introduction to Real Analysis John K. Hunter 1 Department of Mathematics, University of California at Davis 1 The author was supported in part by the NSF. Thanks to Janko Gravner for a number of corrections and comments. Abstract. These are some notes on introductory real analysis. They cover the properties of the real numbers, sequences and series of real numbers, limits of functions, continuity, differentiability, sequences and series of functions, and Riemann integration. They don’t include multi-variable calculus or contain any problem sets. Optional sections are starred. c John K. Hunter, 2014 Contents Chapter 1. Sets and Functions 1 1.1. Sets 1 1.2. Functions 5 1.3. Composition and inverses of functions 7 1.4. Indexed sets 8 1.5. Relations 11 1.6. Countable and uncountable sets 14 Chapter 2. Numbers 21 2.1. Integers 22 2.2. Rational numbers 23 2.3. Real numbers: algebraic properties 25 2.4. Real numbers: ordering properties 26 2.5. The supremum and infimum 27 2.6. Real numbers: completeness 29 2.7. Properties of the supremum and infimum 31 Chapter 3. Sequences 35 3.1. The absolute value 35 3.2. Sequences 36 3.3. Convergence and limits 39 3.4. Properties of limits 43 3.5. Monotone sequences 45 3.6. The lim sup and lim inf 48 3.7. Cauchy sequences ...
Words: 103793 - Pages: 416
...Generalization: A generalization of this problem as well as its preceding problem (When is Cheryl’s Birthday) would be to connect these questions to the ideas of the birthday paradox, and an even bigger idea of the pigeonhole principle. In math, the pigeonhole principle states that if there are n items to be put into m containers, with the criteria that n > m, then at least one container will hold more than one item. (Herstein, 1964) Another way to explain this principle in a more quantitative way would be to say that for natural numbers k and m, if n = km + 1 objects are distributed among m sets, then the pigeonhole principle asserts that at least one of the sets will contain at least k + 1 objects. (Youtube) This pigeonhole principle can...
Words: 902 - Pages: 4
...[pic] ENGD3016 Solid Mechanics Assignment 1: Finite Element Analysis Name: Wei Zhang ID: P14021978 Date: Dec17th 2015 Abstract 1.0 Introduction 2.0 Objectives 3.0 Matlab 4.0 Solidworks 4.1 Model of truss 1 4.2 Model of truss 2 5.0 Comparison of the two trusses 6.0 Comparison between MATLAB and SOLIDWORKS 6.1 Comparison of results 6.2 Advantages and disadvantages 7.0 Conclusion Appendix Abstract The purpose of this report is to based on two different 2D pictures of trusses to finite element analysis from two ways. First carried out the selection of materials, and choosing the size of the pipe. Two methods were used two different software for finite element analysis, solidworks and MATLAB. By comparing the simulation results with two software to make sure which is the better way. It was found that the results of MATLAB are more accurate, solidworks results more intuitive. According to the calculation results of the two methods, truss 2 is more reliable. 1.0 Introduction Finite element analysis method using a mathematical approximation of the real physical system to simulation. Also use simple and interacting elements, namely unit, you can use a limited number of unknown quantities to approximate the infinite unknowns real system.The engineering is relying on the...
Words: 2550 - Pages: 11
...Finite Difference Methods 1 Finite Difference Methods A finite difference method obtains a price for a derivative by solving the partial differential equation numerically Example: • An American put option on a stock that pays a continuous dividend yield q. ƒ ƒ 2ƒ 2 2 (r q) S ½ 2 S rf t S S • Finite difference methods aim to represent the differential equation in the form of a difference equation • We form a grid by considering equally spaced time values and stock price values • Define ƒi,j as the value of ƒ at time iDt when the stock price is jDS 3 Implicit Finite Difference Method In ƒ ƒ 1 2 2 2ƒ (r q) S S rƒ 2 t S 2 S we set at the node (i,j): ƒ ƒ i ,j 1 ƒ i ,j 1 S 2DS and: 2 ƒ ƒ i ,j 1 ƒ i ,j ƒ i ,j ƒ i ,j 1 DS 2 DS DS S 2 ƒ ƒ i ,j 1 ƒ i ,j 1 2ƒ i ,j 2 S D S2 or If we also set ƒ ƒ i 1,j ƒi ,j t Dt we obtain the implicit finite difference method. Re-arranging we get: a j ƒi ,j 1 b j ƒi ,j c j ƒi ,j 1 ƒi 1,j where: The Boundary Conditions • Example: American put fN,j=0 fN,j=0 N,j a j ƒi,j 1 b j ƒi,j c j ƒi ,j 1 ƒi 1,j • N-1 equations • N-1 unkowns • Exactly 1 solution fN,j=max(K-jΔS,0) f0,j=K 6 Explicit Finite Difference Method If f S and 2 f S 2 are assumed to be the same at the (i 1,j ) point as they are at the (i,j ) point we obtain the explicit finite difference method f i 1, j 1 f i...
Words: 769 - Pages: 4
...HISTORY Bachelors in Industrial & Manufacturing Engineering University of Engineering & Technology, Lahore, Pakistan F.sc (Pre-Engineering) Army Public Degree College, Sargodha Cantt. 2009 – 2013 2007 – 2009 CGPA: 3.7 85% MAJORS AND SPECIALIZATION Management: Production and Operation Management, Operations Research, Total Quality Management, Work Study and Methods Engineering, Engineering Ergonomics Manufacturing: Machining Process, Manufacturing Process Design: Machine Design, Production Tooling Design, Engineering Design and Graphics Mechanics: Mechanics of Materials, Fluid Mechanics, Mechanics of Machines Mechanical: Thermodynamics, Plant Engineering Control Engineering: Computer Integrated Manufacturing, Finite Element Analysis, Automation and Robotics, Instrumentation and Control PROJECTS Senior Year Project Application and Study of TIG and MIG Welding’s on mechanical and metallurgical properties of low carbon steels and Al alloys under different welding parameters (Current & Voltage) Course Projects Formulated a business plan for setting up a bullet proof cars factory in Pakistan With complete details in terms of Marketing, Organizational and Financial plans Analyzed & Identified misalignments and vibrations in gearing system by using vibration analyzer Investigated & formulated techniques to increase the demand and supply of hamburgers Studied and Improved the ergonomic concerns of an Industrial Environment Designed drilling...
Words: 387 - Pages: 2