Student: Yu Cheng (Jade) Math 475 Homework #5 April 21, 2010

Similar documents
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Lecture 14: Section 3.3

These axioms must hold for all vectors ū, v, and w in V and all scalars c and d.

Name: Section Registered In:

3. Mathematical Induction

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Lecture 3: Finding integer solutions to systems of linear equations

Section IV.1: Recursive Algorithms and Recursion Trees

Solutions to Math 51 First Exam January 29, 2015

Notes on Determinant

by the matrix A results in a vector which is a reflection of the given

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

THE DIMENSION OF A VECTOR SPACE

Continued Fractions and the Euclidean Algorithm

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Math 215 HW #6 Solutions

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

Recall that two vectors in are perpendicular or orthogonal provided that their dot

SECTION 10-2 Mathematical Induction

Linear Algebra Notes

Similarity and Diagonalization. Similar Matrices

8 Square matrices continued: Determinants

1 VECTOR SPACES AND SUBSPACES

MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.

MATH 423 Linear Algebra II Lecture 38: Generalized eigenvectors. Jordan canonical form (continued).

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

6.2 Permutations continued

7 Gaussian Elimination and LU Factorization

Solving Systems of Linear Equations

Full and Complete Binary Trees

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Sample Induction Proofs

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

Solution to Homework 2

University of Lille I PC first year list of exercises n 7. Review

Linear Algebra I. Ronald van Luijk, 2012

Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013

A =

Math 312 Homework 1 Solutions

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Systems of Linear Equations

Linear Algebra Notes for Marsden and Tromba Vector Calculus

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

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Math 115 Spring 2011 Written Homework 5 Solutions

Methods for Finding Bases

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Lecture 1: Systems of Linear Equations

CS 103X: Discrete Structures Homework Assignment 3 Solutions

MATH APPLIED MATRIX THEORY

Inner Product Spaces

NOTES ON LINEAR TRANSFORMATIONS

Quotient Rings and Field Extensions

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Solving Systems of Linear Equations Using Matrices

Row Echelon Form and Reduced Row Echelon Form

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

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

Dynamic Programming. Lecture Overview Introduction

8 Divisibility and prime numbers

Reduced echelon form: Add the following conditions to conditions 1, 2, and 3 above:

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

Mathematical Induction. Mary Barnes Sue Gordon

8 Primes and Modular Arithmetic

What is Linear Programming?

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

Vector and Matrix Norms

3. INNER PRODUCT SPACES

MATH10040 Chapter 2: Prime and relatively prime numbers

Solution of Linear Systems

Matrix Representations of Linear Transformations and Changes of Coordinates

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

Linear Codes. Chapter Basics

6. Cholesky factorization

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

Orthogonal Diagonalization of Symmetric Matrices

1.5 SOLUTION SETS OF LINEAR SYSTEMS

IRREDUCIBLE OPERATOR SEMIGROUPS SUCH THAT AB AND BA ARE PROPORTIONAL. 1. Introduction

1 Sets and Set Notation.

Special Situations in the Simplex Algorithm

10.2 Series and Convergence

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

LEARNING OBJECTIVES FOR THIS CHAPTER

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

Basic Proof Techniques

Lecture Notes 2: Matrices as Systems of Linear Equations

mod 10 = mod 10 = 49 mod 10 = 9.

To give it a definition, an implicit function of x and y is simply any relationship that takes the form:

4.5 Linear Dependence and Linear Independence

Examination paper for TMA4115 Matematikk 3

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the school year.

Solving Systems of Linear Equations

E3: PROBABILITY AND STATISTICS lecture notes

Tensor invariants of SL(n), wave graphs and L-tris arxiv:math/ v1 [math.rt] 27 Feb 1998

is in plane V. However, it may be more convenient to introduce a plane coordinate system in V.

Linear Programming: Theory and Applications

Transcription:

Student: Yu Cheng (Jade) Math 475 Homework #5 April 1, 010 Course site Exercises 4 Problem 1: The procedure below takes an array of integers and determines if some elements occur three (or more) times in the array. Which of the following big-o estimates: log,, log,, log,, log,, and best describes the worst-case running time of the algorithm. public boolean hasthreeequal(int[] arr) { int n = array.length; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[i] == arr[j]) { for (int k = j + 1; k < n; k++) { if (arr[i] == arr[k]) { return true; return false; The big-o runtime complexity of this procedure is. For the worst case, there shouldn t be any same threes in the middle. If so, function will return without executing the rest of the loops. The elements shouldn t be all different either. If so the most inner loop won t execute. So there are pairs of same elements in the worst case. In this case, the inner loop gets to execute once throughout one round of the middle loop execution. An example of such array is 1, 1,,, 3, 3, 1 1 1 1 1 3 1.

Therefore the runtime complexity of the given procedure is, as we drop the lower order terms and the constants. Problem : Show! We will prove! by induction using the recursive relation of Bell numbers, 1 Base cases: Recall the definition of Bell numbers,, the number of ways to partition items. So we have the following simple cases. 0 1 0! 1 1 1 1! 1 1 1! 3 1 3 1 5 3! 6. Inductive cases: We assume that! holds for, where 3. Based on the assumption, we need to prove, 1 1! holds as well, where 3. 1 1 1 1 1 1 1! 1!.

Therefore we ve shown that if! holds for, it also holds for 1. In addition, we also have the base cases proved. Hence we ve shown that the expression! holds for all 0. Problem 3: Let be a vector space of dimension 4 over a finite field with elements and let be the lattice of subspaces. Find and the number of covers in this lattices. If you express as powers of and take the limit as goes to infinity, it has the form plus lower order terms. Find and. We will use the q-nominal coefficients formula to compute the number of elements in the vector space lattice. The vector space dimension is 4, so we have. 4 0 4 1 4 4 3 4 4 4! 4! 4! 4! 4! 0! 4! 1! 3!!! 3! 1! 4! 0! 4! 4! 0! 4! 1! 3! 4! 4!! 4 3 1 1 1 1 1 1 1 1 1 3 3. 1 We will calculate by counting the number of lines on each level of the vector space lattice, from the dimension above to the one below. 4 1 1 0 4 1 4 3 3 4 4 4 3 4! 1! 4!! 1! 3! 0! 1!!! 1! 1! 4! 3! 4! 4! 3! 1!! 1! 4! 0! 3! 1! 1 1 1 1 1

1 1 1 1 1 1 1. Now we have, we also have. So, if we express in the form of, The term needs to rise to the power of. The coefficient can be computed as below, Therefore, if we express as powers of and take the limit as goes to infinity, (in other words, we drop the lower order terms), we have, where, and., Problem 4: An matrix is doubly stochastic if 0 1 and each row sum and each column sum is 1. Prove that if is doubly stochastic then it has a diagonal all of whose entries are nonzero. We will prove the given statement using Frobenius-König theorem. Frobenius-König theorem states a matrix, which contains a zero in every one of its diagonals, has a zero sub-matrix of size, where 1. Assumption: Let s assume there is a doubly stochastic matrix that has no diagonal containing all nonzero entries. In other words, we assume every diagonal of this doubly stochastic matrix has a zero entry. Therefore, we can apply Frobenius-König theorem on this matrix. This matrix, therefore, has a zero sub-matrix where 1. Contradiction: Now, let s just look at the zero sub-matrix. Since every row sum and every column sum of a doubly stochastic matrix is 1. The rows and the columns that this submatrix resides would contribute 1 1 1 1 that much to the total entry summation of this matrix. However, the summation of all entries in this doubly stochastic matrix is only. We have 1, this is a conflict. Conclusion: the assumption, there is a doubly stochastic matrix that has no diagonal containing all nonzero entries, was incorrect. Hence, we ve shown a doubly stochastic matrix has a diagonal all of whose entries are nonzero.

Example: If we have a 4 4 doubly stochastic matrix, and it has no diagonal containing all nonzero entries. We apply Frobenius-König theorem on it. After some row exchanges and some column exchanges, we would get a zero sub-matrix, where 4 1 5. Let s just say the 3 sub-matrix on the top left corner is a zero sub-matrix. In other words, we now have three rows and two columns intersect into zeros. 0 0 0 0 0 0 1 1 1 1 1 5 However, according to the definition of doubly stochastic matrix, we have 1 1 1 1 4 The total sum can t be smaller than a partial sum. Therefore, this is a contradiction. Section 8.6 Exercise 1: Prove that the Stirling numbers of the second kind satisfy the following relations: a., 1 1, 1 Recall the definition of Stirling numbers of the second kind,, is the number of ways to partition items to nonempty blocks. There is only one way to partition items into 1 block. Therefore, 1 1, where 1.

b., 1, There are ways to form a subset from a collection of items, including the empty subset. In the context of partitions, selecting the current set of items is the same as selecting the rest of the items. Therefore, there are ways to form partitions if we count empty set. Exclude the one that has the empty subset, we have 1 ways to form partitions from items. In other words,, 1. c., 1, To form 1 partitions from items, we simply choose items to form one partition and place the rest of them, the items, in their own partitions, partitions. There are ways to select the two items that go together, so there are ways to form 1 partitions from items. In other words,, 1. d., 3 3, 4 We will prove, 3 3 where, by induction based on the recurrence 4 relation of the Stirling numbers of the second kind,, 1, 1, 1. Base case:, 0 is defined to be 0. 3, 1 is the number of ways to partition 3 items into 1 block. There s only one way to do so., 0 0 3 3 0 4 Note 0, where 3, 1 1 3 3 3 3 1 4 Note 0, where Inductive cases: We assume that, 3 3 holds for, where. We will 4 1 1 now prove 1, 1 3 also holds, where. 3 4, 1, 1, 1 1, 1 1, 1,. Using the recursive relation, and the conclusion from the previous exercise,, 1, where we can derive the following equation.

1, 1 1, 1, 1 3 3 4 1!!!! 3! 3! 3! 4! 4! 1 1 13. 4 We now simplify the right side of the to be proven equation, 1 1 1! 3 3 4 3!! 3 1! 4! 3! 1 1 13. 4 1 1 So, we ve shown 1, 1 3 3 4 holds if, 3 3 4 holds. Plus the base cases, we ve proven that, 3 3 holds for all. 4 Exercise 19: Prove that the Stirling numbers of the first kind satisfy the following formulas: a., 1 1!, 1 Recall the definition of Stirling numbers of the first kind,, is the number of ways to partition items to circular groups There are! permutations of items. Every permutations fall into a same circular group. For example, we have a set with four items,,,,. The following four permutations fall into the same circular group,,,,,,,,,,,, and,,,. Therefore there are! 1! ways to partition items into 1 circular group, where 1. b., 1, 1 The argument is quite similar to the argument for, 1. To form 1 circular groups from items, we simply choose items to form one circular group (,,, are in the same circular group), and then we place the rest of items, the of them, in their own groups,

groups. There are ways to select the two items that go together, so there are ways to form 1 circular groups from items. In other words,, 1.