Mathematics for Algorithm and System Analysis



Similar documents
WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Discrete Mathematics. Hans Cuypers. October 11, 2007

STAT 360 Probability and Statistics. Fall 2012

Discrete Mathematics Problems

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

Alabama Department of Postsecondary Education

Data Structure [Question Bank]

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Institute of Actuaries of India Subject CT3 Probability and Mathematical Statistics

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

Why? A central concept in Computer Science. Algorithms are ubiquitous.

MATH BOOK OF PROBLEMS SERIES. New from Pearson Custom Publishing!

How To Understand And Solve A Linear Programming Problem

Lecture 16 : Relations and Functions DRAFT

Midterm Practice Problems

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

MATH. ALGEBRA I HONORS 9 th Grade ALGEBRA I HONORS

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

Social Media Mining. Graph Essentials

Sequence of Mathematics Courses

Algebra I Credit Recovery

Functions CHAPTER 2. Introduction. 2.1 Some Basic Terminology. Terminology for Sets

Math 1050 Khan Academy Extra Credit Algebra Assignment

Cartesian Products and Relations

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

A 2-factor in which each cycle has long length in claw-free graphs

Mathematics (MAT) MAT 061 Basic Euclidean Geometry 3 Hours. MAT 051 Pre-Algebra 4 Hours

Complexity Classes P and NP

How To Understand And Solve Algebraic Equations

096 Professional Readiness Examination (Mathematics)

Graph Theory Problems and Solutions

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

Florida Math for College Readiness

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Exponential time algorithms for graph coloring

BookTOC.txt. 1. Functions, Graphs, and Models. Algebra Toolbox. Sets. The Real Numbers. Inequalities and Intervals on the Real Number Line

Tree-representation of set families and applications to combinatorial decompositions

GRAPH THEORY LECTURE 4: TREES

Chapter 3. Distribution Problems. 3.1 The idea of a distribution The twenty-fold way

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Discrete Math for Computer Science Students

A Course in Discrete Structures. Rafael Pass Wei-Lung Dustin Tseng

E3: PROBABILITY AND STATISTICS lecture notes

Introduction to Algorithms. Part 3: P, NP Hard Problems

PRE-CALCULUS GRADE 12

Expression. Variable Equation Polynomial Monomial Add. Area. Volume Surface Space Length Width. Probability. Chance Random Likely Possibility Odds

SIMS 255 Foundations of Software Design. Complexity and NP-completeness

Guessing Game: NP-Complete?

Exam study sheet for CS2711. List of topics

Mathematical Induction. Lecture 10-11

APPLIED MATHEMATICS ADVANCED LEVEL

SCORE SETS IN ORIENTED GRAPHS

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

DRAFT. Algebra 1 EOC Item Specifications

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

Lecture 7: NP-Complete Problems

ML for the Working Programmer

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

On the k-path cover problem for cacti

Master of Arts in Mathematics

Examination paper for MA0301 Elementær diskret matematikk


Just the Factors, Ma am

Lecture 17 : Equivalence and Order Relations DRAFT

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Graphs without proper subgraphs of minimum degree 3 and short cycles

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

Best Monotone Degree Bounds for Various Graph Parameters

Small Maximal Independent Sets and Faster Exact Graph Coloring

Curriculum Map Statistics and Probability Honors (348) Saugus High School Saugus Public Schools

Statistics I for QBIC. Contents and Objectives. Chapters 1 7. Revised: August 2013

Near Optimal Solutions

Binary Search Trees CMPSC 122

Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally

KEANSBURG SCHOOL DISTRICT KEANSBURG HIGH SCHOOL Mathematics Department. HSPA 10 Curriculum. September 2007

The program also provides supplemental modules on topics in geometry and probability and statistics.

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

1 A duality between descents and connectivity.

Generating models of a matched formula with a polynomial delay

CRLS Mathematics Department Algebra I Curriculum Map/Pacing Guide

MATHEMATICAL METHODS OF STATISTICS

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Every tree contains a large induced subgraph with all degrees odd

PES Institute of Technology-BSC QUESTION BANK

Indiana State Core Curriculum Standards updated 2009 Algebra I

COURSE SYLLABUS

Algebra 1 Course Title

Probability and Statistics Vocabulary List (Definitions for Middle School Teachers)

Mathematics. Mathematics MATHEMATICS Sacramento City College Catalog. Degree: A.S. Mathematics AS-T Mathematics for Transfer

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Appendix 3 IB Diploma Programme Course Outlines

Math 131 College Algebra Fall 2015

Lecture 13 - Basic Number Theory.

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

Graphical degree sequences and realizations

Transcription:

Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved.

Preface Discrete mathematics is an essential tool in almost all subareas of computer science. Interesting and challenging problems in discrete mathematics arise in programming languages, computer architecture, networking, distributed systems, database systems, AI, theoretical computer science, and other areas. The course. The University of California, San Diego, has a lower-division two-quarter course sequence in discrete mathematics that includes Boolean arithmetic, combinatorics, elementary logic, induction, graph theory and finite probability. These courses are core undergraduate requirements for majors in Computer Science, Computer Engineering, and Mathematics-Computer Science. This text, Mathematics for Algorithm and System Analysis, was developed for the second quarter and A Short Course in Discrete Mathematics was developed for the first quarter. Because some students transfer into the second quarter of the course without having taken the first quarter, there is some overlap between the two texts and, with appropriate students, this text could be used without the first. This book consists of four units of study (Counting and Listing CL; Functions Fn; Decision Trees and Recursion DT; and Basic Concepts of Graph Theory GT), each divided into four sections. Each section contains a representative selection of problems. These vary from basic to more difficult, including proofs for study by mathematics students or honors students. The first three sections in units CL and Fn are primarily a review of material in A Short Course in Discrete Mathematics needed for this course. The review questions. Multiple Choice Questions for Review appear at the end of each unit. The explanatory material in this book is directed towards giving students the mathematical language and sophistication to recognize and articulate the ideas behind these questions and to answer questions that are similar in concept and difficulty. Many variations of these questions have been successfully worked on exams by most beginning students using this book at UCSD. Students who master the ideas and mathematical language needed to understand these review questions gain the ability to formulate, in the neutral language of mathematics, problems that arise in various applications of computer science. This skill greatly facilitates their ability to discuss problems in discrete mathematics with other computer scientists and with mathematicians. iii

Table of Contents Asterisks (stars) are used in the text to mark more difficult material that is not needed in later sections. Unit CL: Basic Counting and Listing Section 1: Lists with Repetitions...CL-1 set, list, multiset, sequence, word, permutation, k-set, k-list, k-multiset, k-lists with repetition, rule of product, Cartesian product, lexicographic order (lex order), dictionary order, rule of sum, composition of a positive integer Section 2: Lists Without Repetition..... CL-9 k-lists without repetition, Stirling s formula for approximating n!, circular arrangements, words from a collection of letters Section 3: Sets......CL-13 set intersection, set union, set difference, set complement, symmetric difference, set product (Cartesian product), binomial coefficients, generating functions, binomial theorem, full house (card hand), two pairs (card hand), rearranging words, multinomial coefficients, card hands and multinomial coefficients, recursions, set partitions, Stirling numbers of the second kind (S(n, k)), straight (card hand), Bell numbers B n Section 4: Probability and Basic Counting....CL-28 sample space, selections done uniformly at random, event, probability function, combining events, Venn diagrams, odds, hypergeometric probabilities, fair dice, geometric probability, principle of inclusion exclusion, birthday problem Multiple Choice Questions for Review... CL-41 Unit Fn: Functions Section 1: Some Basic Terminology... Fn-1 direct product, intersection, union, symmetric difference, domain, range, codomain, one-line notation, surjection, onto, injection, one-to-one, bijection, permutation, relation, functional relation, two-line notation Section 2: Permutations...Fn-7 composition, cycle, cycle form of permutation, involution, permutation matrices, derangements v

Section 3: Other Combinatorial Aspects of Functions.....Fn-14 image, inverse image, coimage, image size and Stirling numbers, strictly increasing, strictly decreasing, weakly increasing, weakly decreasing, monotone, multisets, lists without repetition, restricted growth functions and partitions Section 4: Functions and Probability... Fn-21 random variable, probability function, event, probability distribution function, expectation, covariance, variance, standard deviation, correlation, independent events, independent random variables, product spaces, generating random permutations, joint distribution function, marginal distributions, binomial distribution, Poisson distribution, normal distribution, standard normal distribution, cumulative distribution, central limit theorem, normal approximation to binomial, Poisson approximation to binomial, Tchebycheff s inequality Multiple Choice Questions for Review.....Fn-41 Unit DT: Decision Trees and Recursion vi Section 1: Basic Concepts of Decision Trees....DT-1 decision trees, vertices, root, edges, degree of vertex, down degree, child, parent, leaves, internal vertex, height of leaf, path to vertex, traversals of decision tree, depth first vertices, depth first edges, breadth first, preorder, postorder, lengthfirst lex order, dictionary order, permutations in lex order, partial permutation, rank of leaf, direct insertion order for permutations, backtracking, Latin squares, domino coverings, strictly decreasing functions, unlabeled balls into boxes, isomorph rejection Section 2: Recursive Algorithms.... DT-15 recursive algorithm, simplest case reduction, recursive algorithm for 0-1 sequences, sorting by recursive merging, recursive approach, recursive solutions, local description for permutations in lex order, recursive description of Towers of Hanoi, decision tree for Towers of Hanoi, recursion and stacks, configuration analysis of Towers of Hanoi, abandoned leaves and RANK, characteristic functions and subsets, Gray code for subsets, decision tree for Gray code for subsets, local description of Gray code, Towers of Hanoi with four poles Section 3: Decision Trees and Conditional Probability.....DT-27 conditional probability, independent events, Venn diagrams, probabilities of leaves, probabilities of edges, probabilistic decision trees, decision trees and Bayesian methods, Bayes theorem, multiplication theorem for conditional probabilities, sequential sampling, the SAT problem, first moment method, tournaments, gambler s ruin problem Section 4: Inductive Proofs and Recursive Equations... DT-40 induction, recursive equations, induction hypothesis, inductive step, base case, prime factorization, sum of first n integers, local description, recurrence relation,

binomial coefficients C(n, k), Stirling numbers S(n, k), guessing solutions to recurrences, linear two term recurrence, constant coefficients, characteristic equation, two real roots, one real root, complex roots, recursion for derangements, Fibonacci recurrence relation, recurrence relation for derangements Multiple Choice Questions for Review.....DT-52 Unit GT: Basic Concepts in Graph Theory Section 1: What is a Graph?....GT-1 computer network example, simple graph, graph, vertices, edges, set theoretic description of graph, pictorial description of a graph, incidence function, vertices joined by an edge, adjacent vertices, edge incident on a vertex, simple graphs are graphs, form of a graph, equivalence relations, equivalence classes, blocks, binary relations, reflexive, symmetric, transitive, equivalent forms, isomorphism of graphs, graph isomorphism as an equivalence relation, degree of a vertex, loops, parallel edges, isolated vertices, degree sequences and isomorphism, random graphs Section 2: Digraphs, Paths, and Subgraphs.... GT-13 flow of commodities, directed graph, digraph, simple digraph, simple graphs as simple digraphs, directed loops, digraphs and binary relations, symmetric binary relations and simple graphs with loops, complete simple graphs, path, trail, walk, vertex sequence, walk implies path, restrictions of incidence functions, subgraphs, subgraph induced by edges, subgraph induced by vertices, cycles, connected graphs, connected components and equivalence classes, connectivity in digraphs, Eulerian trail, Eulerian circuit, Hamiltonian cycle, Hamiltonian graph, bicomponents of graphs, bipartite graphs, oriented simple graphs, antisymmetry, order relations, Hasse diagrams, covering relations, counting trees Section 3: Trees.......GT-24 tree, alternative definitions of a tree, rooted graph, rooted tree, parent, child, sibling, leaf, internal vertices, unique paths in trees, rooted plane tree, RP-tree, traversing RP-trees, depth first sequences, breadth first sequences, spanning trees, minimum spanning trees, greedy algorithms, Prim s algorithm, Kruskal s algorithm, lineal or depth-first spanning trees, algorithm for depth-first spanning trees, bipartite graphs and depth first spanning trees, degree sequences of trees, binary trees, full binary trees, height and leaf restrictions in binary trees Section 4: Rates of Growth and Analysis of Algorithms... GT-37 comparing algorithms, machine independence, example of finding the maximum, Θ notation, O notation, properties of Θ and O, Θ as an equivalence relation, sufficiently large, eventually positive, asymptotic, little oh notation, using Θ to compare polynomial evaluation algorithms, average running time, tractable, intractable, graph coloring problem, traveling salesman problem, clique problem, N P-complete problems, NP-hard, NP-easy, chromatic number of a graph, almost good algorithms, almost correct algorithms, close algorithms, polynomial time, exponential time, Θ and series, Θ and logs vii

Multiple Choice Questions for Review.....GT-51 Solutions to Exercises Notation Index Subject Index viii