Math 22, Winter 2016, Home Page

Green Sheet

Homework from the text:
Chapter 1, section 1.7: 1,2,4,5,8-11,13-17,19,20,22-25.
Chapter 2 section 2.9: 2-6, 8-11,13,14,16,18,23,25.
Chapter 3, section 3.13: 2,4,5,6,7,11,12,14,16,17,24,25
Chapter 4, section 4.11: #5,10-14,17-19,21-23
Chapter 5, section 5.9: 2,4,6,9,14,19,20,24
Chapter 6, section 6.9: 2-5, Section 6.11: 1 and 2, Section 6.13: 1,3,7,8,10,16,15,17
Chapter 7, section 7.9: 1-8,10,11,14,17,19,21,24
Chapter 8, section 8.12: 1,3,6,7,8,11,16 (every other property starting with 1st), 19,22,25
Chapter 10, # 1-3,7-9,17-20,24,25
Chapter 11, section 11.10: 2,3,5,9-12,20-22,24
Chapter 12, # 5,6,8,10,15-17,23,24
Chapter 13, # 4,5,8,12,13

Research Experiences for Undergraduates (REUs)
You may be interested in being part of a summer research project funded by the National Science Foundation, entitled Research Experiences for Undergraduates (REUs). Many of these provide stipends and support for travel and lodging. There are literally hundreds of such programs in a variety of science disciplines, including mathematics, and are a great opportunity to get experience in doing research. See this site for information. Most applications are due in February and March, but each sets its own deadlines.

Class 18, Thu., Mar. 3
We went over more on trees, including finding a minimal spanning tree of a graph using Kruskal's algorithm. We also learned about Prufer's algorithm for encoding a labeled tree. We started on chapter 11 on planar graphs.

Please turn in homework for chapters 7 and 8 next Tuesday. The following Tuesday, Mar. 15, you will have your reports due (info emailed to you.)

Class 17, Tue, Mar. 1
We went over material on trees and also on recursions, and had exam 2.

Class 16, Thu, Feb. 25
We went over material from chapter 7 and began chapter 8 on linear recursions.
Second exam will be next Tuesday, Mar. 1, on chapters 3-7, plus Ramsey theory.
Homework for chapters 5 and 6 is due Tuesday, Mar. 1 after the exam.
Turn in the quiz we worked on Thursday also on Tuesday.

Class 15, Tue, Feb. 23
We went over material from chapter 7

Class 14, Thu., Feb. 18
We went over the Principle of Inclusion/Exclusion and more from chapter 7. Exam 2 has been moved to Tuesday, Mar. 1, when chapter 5 and 6 homework will also be due.

Here's the 4 rows of 5 trick.

Class 13, Tue., Feb. 16
We went over material from chapter 7.

Class 12, Thu., Feb. 11
Here is a great pdf on combinatorial proofs by Gary MacGillivray, with many examples.
You might like to see the same author's notes for Discrete Math, they summarize a lot of what you're studying very well.

Here is the handout on DNA codons. Print out and bring to class on Tuesday.
Here is the class assignment due Tuesday on "People-Permutations." Complete to turn in this Tuesday, Feb. 16.

Chapters 5 and 6 homework will be due on Thursday of this coming week.

Class 11, Tue., Feb. 9
We went over several proof problems and you were assigned to choose one to prove and turn in this Thursday. I'll describe these below again. We also went over material from chapter 6 on combinatorial proofs. For example, if C(n,k) represents "n choose k," or the number of ways to choose a subset of size k from a set of n distinct elements, then we examined proofs of the following:
(1) C(n,k) + C(n,k+1) = C(n+1,k+1)
(2) C(n,k) = C(n,n–k)
(3) C(n,0) + C(n,1) + C(n,2) +...+ C(n,n) = 2^n
(4) The coefficient of a^(n–k) b^k in the expansion of (a+b)^n is C(n,k)
(5) Assigned: why is C(n,0) – C(n,1) + C(n,2) – ...+ (–1)^n C(n,n) = 0

Here are the three problems for one of which you must write up a proof:
(1) If you two color the edges of K(6) then there will be at least two solid color K(3)s ("triangles"). Hint: start with the fact that there is already one such triangle, as we proved in class.
(2) The doodle theorem: draw a continuous closed loop on a sheet of paper, such that every intersection point has an even number of edges leaving or entering the point (thus the doodle completely crosses itself at each point). You may also draw more than one such closed loop and the theorem is still true: prove that the regions created may be two colored so no two regions adjacent through an edge are the same color.
(3) The piles problem: start with n objects. At each step divide a pile with more than 1 object into two smaller piles of sizes 1 or more, for example the first step produces piles of size k and n–k. Find the product of the two new pile sizes, in this case k(n–k). As a final step, when all piles are of size 1, add all the products accumulated. Prove that however the piles are divided, the sum will be the n–1st triangular number.

Chapters 5 and 6 homework will not be due until next Thursday at the earliest.

Class 10, Thu., Feb. 4
We went over new material on modular arithmetic and also introduced binomial coefficients (from chapter 6). We will be examining "combinatoric proofs." Here's the Wikipedia entry on combinatoric proofs, which has a few examples. Here are a few more examples. Here's a site with slides for most of the same counting proofs we've seen in class. Here's a counting explanation for one problem, in detail.

Here are some notes on modular arithmetic; the notes have more than we've covered in class.

Class 9, Tue., Feb. 2
We went over the exam and also some homework problems (Ch. 3 and 4 HW due this Thursday, Feb . 4)

We also went over equivalence relations, and one of the most important such relations, congruence or modular arithmetic.
We saw that addition, subtraction and multiplication work much like equality, while division is problematic:
If a ≡ b (mod m) then a+c ≡ b+c, a–c ≡ b–c, and ac ≡ bc (mod m),
while if ka ≡ kb (mod km) then a ≡ b (mod m), while it might not be true that a ≡ b (mod km).
However, if k is "relatively prime" to m, meaning k and m share no common factors, then ka ≡ kb (mod m) does imply that a ≡ b (mod m). (I asked you to try to prove this latter statement!)

We also briefly saw the use of the Euclidean Algorithm for finding the greatest common divisor of two numbers.

Class 8, Thu., Jan. 28
Chapter 3 and 4 homework will be due next Thursday, Feb. 4.

We went over Ramsey theor (see Ramsey numbers) and saw the proof that if the edges of K(6) are colored blue and red then the pigeonhole principle guarantees that there will be either a red or a blue K(3). Can you use this to prove that there are actually two solid colored triangles, or K(3)s, when the edges of K(6) are colored with two colors?

We also went over induction - see this excellent Wikipedia page for more on induction, including its equivalence to the well-ordering axiom, which states that every set of positive integers contains a least element.

Start with a pile of n identical objects. At each step divide a pile with k > 1 objects into two smaller piles with r and s elements. At each step calculate rs. When all piles are of size 1, calculate the sum of all the rs products. We proved by induction that the sum will be T(k–1), the k–1st triangle number. I gave you a hint about how to find a "visual proof" of this.

If at each step you instead calculate 1/r + 1/s, and when all piles are of size 1 calculate the product of the all the above sums, then does each starting number k lead to only one calculated result? Find a formula for this result, and prove that this formula is correct using induction!

We had exam 1 in this class.

Class 7, Tue., Jan. 26
We went over more graph theory, especially info on how to tell if one graph is the same or "isomorphic" to another.
We saw some examples of pairs of graphs with the same numbers of vertices, edges and degrees, but which are non-isomorphic.

Here is info on Six degrees of separation, the Kevin Bacon game, and Erdos numbers. You can find even more of this nonsensical stuff at the Erdos/Bacon/Sabbath site.

Class 6, Thu., Jan. 21
We went over more material from chapter 3 on graphs. Your first exam is next Tuesday, Jan. 26, which will be open book, open notes and homework, calculator allowed. Bring a scantron (the half page kind). The exam will cover chapters 1,2, and 3, except for Ramsey theory, which we have not covered yet. Homework for chapters 1 and 2 can be turned in Tuesday after the exam.

Some things to know about for exam 1 (taken from last year's Math 22 web site - look through that site!):
(1) Be able to draw a graph with a given set of degrees.
(2) Be able to represent a graph with a matrix and know how to use powers of the adjacency
matrix to find numbers of paths between vertices.
(3) Be able to decide whether two graphs are isomorphic.
(4) Understand the use of logical connectives, and be able to build the truth table for a logical
statement
(5) Understand the difference between a statement, its converse, its inverse, and its
contrapositive.
(6) Be able to give a simple proof by contradiction.
(7) Use the pigeonhole principle.
(8) Decide whether or not a function is one-to-one, onto, both, or neither.
(9) Use the multiplication and addition principles to solve counting problems.
(10) Decide how many functions there are from set A to set B.
(11) Use quantifiers for "for all" and "there exists" and their negatives.
(12) Use set operations like complement, cross product, union, intersection, and set difference. 
(13) Use odds and evens to solve problems - for example, know that the sum of two odd numbers is even, a positive integral power of an odd number is odd, etc.
(14) Be able to find the cross product (also called the Cartesian product) of two finite sets.
(15) Know the structure of important graphs such as the cycle C(n), complete graph K(n), the complete bipartite graph K(m,n),etc.

Class 5, Tue., Jan. 19
We went over questions from chapter 1 and 2 and went over new material from chapter 3 on graphs.
Chapter 1 and 2 homework are due on Thursday.

More material on truth tables and also material on functions. Two of the logical connectives we learned about, that are not in the text, are NOR and NAND - you are responsible for knowing about these! We also learned about Russell's Paradox.

Class 4, Thu., Jan. 14
The subsitute Kejian Shi went over material from chapter 3 and gave a handout on modular arithmetic.

Class 3, Tue, Jan. 12
The substitute Kejian Shi went over material from chapter 2 and gave a quiz on the pigeonhole principle and counting problems.

Class 2, Thu., Jan. 7, 2016
We went over some of chapter 1 material, and did more with modular arithmetc.
We also went over most of the material from chapter 2, at least briefly.
You should be working on the homework for chapters 1 and 2, though I have not yet announced the due date since so many of you do not yet have the textbook. (I did email you the chapter 1 pdf though.)

Class 1, Tue., Jan. 5, 2016
The take-away game, in which each player removes 1 or 2 counters on each move, the last player to move winning. What is a winning strategy? (Multiples of 3 are losing positions.)

A little more about modular arithmetic.
Here's a site on modular arithmetic.
Here's a site which will do modular arithmetic calculations for you.
Here's a site on modular arithmetic by Susan Addington.

We played The pattern game and saw how columns repeated in multiples of 3, rows in twos.

We also saw how to count the number of subsets of a 3-element set either using the sum principle (by counting how many sets there are with 0, 1, 2, or 3 elements) and adding those numbers, since they represent disjoint collections of sets. We also saw how to count them using the product principle, as the number of elements in the Cartesian product {0,1}X{0,1}X{0,1} = the binary strings of length 3.

In the pigeonhole principle "magic trick," I ask you to choose seven numbers from the list 1,2,3,...,12. The properties each of your lists had were:
(1) A pair of your numbers had a sum of 13.
(2) A pair of your numbers had a difference of 6.
(3) A pair of your numbers had a difference of 3.
(4) A pair of your numbers had the property that they have no divisors other than 1 in common (they are "relatively prime.")
(5) A pair of your numbers had the property that one divided the other equally.
(6) After striking out one of your numbers, two subsets of your numbers had the same sum.
We saw how the pigeonhole principle explained why properties 1-5 are true. Number 5 was tricky, and involved labeling the six pigeonholes with different numbers of numbers!
Property 6 is similar to an example in the text; in this case the we have to show that there are more possible subsets than there are possible sums.
The number of subsets of a six element set is 2 ^6 = 64, while the maximum sum of any such subset is 7+8+9+10+11+12 = 57, so two subsets must have the same sum.

Your first assignment is to read chapter one and work the “Check Yourself” problems as
you read (not to be turned in, answers are in the back). As part of the homework that you will
turn in, do the chapter 1.7 problems in the homework list above.

The following is an approximate guide to what we will study this quarter:
Class 2

The pigeonhole principle.

Homework:
Read and work on homework from chapter 1. Chapters 1 and 2 homework will be due together when we have finished chapter 2.

Class 3
Material on sets, logic, and truth tables.

Class 4
The "graph alphabet," and graph theory.
Add to your homework the following: find two graphs with the same numbers of vertices, edges, and set of degrees, but which are different graphs. That is they are "non-isomorphic." There are plenty of examples with only 5 or 6 vertices. Your graph should be a "simple" graph with no loops or multiple edges.
Find all simple graphs with 4 vertices.
Here is that free graph and geometry software, Geogebra which might be useful in doing homework.

Examples of functions from the integers Z to the integers Z which are
1 to 1 and onto
Not 1 to 1 and not onto
1 to 1 but not onto
Find a function from Z to Z which is onto but not 1 to 1. You might try using the ceiling or floor function.

More material on truth tables and also material on functions. Two of the logical connectives we learned about, that are not in the text, are NOR and NAND - you are responsible for knowing about these! We also learned about Russell's Paradox.

More about modular arithmetic, and did the mod 9 trick. The trick works because a number's digit sum is the same if the digits are rearranged. The digit sum is congruent to the number itself with respect to mod 9.I asked you to try to figure out why this is true. Here's a hint: rewrite the number as a "polynomial" in powers of 10. For instance, 357 = 3(10^2) + 5(10^1) + 7(10^0). Then convert to mod 9 ....

Class 5
We went over more graph theory, especially info on how to tell if one graph is the same or "isomorphic" to another.
We saw some examples of pairs of graphs with the same numbers of vertices, edges and degrees, but which are non-isomorphic.
We saw that if the edges of K(6) are colored blue and red then the pigeonhole principle guarantees that there will be either a red or a blue K(3).

Class 6
Material from the end of chapter 3, and also induction proofs in chapter 4. What is wrong with the proof by induction that all cows are the same color?

Class 7
Exam 1.
More from chapter 4 and also some from chapter 5.3 on modular arithmetic.
More about Ramsey numbers, which were introduced when we played the "color the edges of K(6) game", which we proved cannot end in a draw.

Class 8
More from chapter 5.

Class 9
Chapter 6 on combinatorics.

Class 10
Questions about combinatoric or counting proofs. Here's the Wikipedia entry on combinatoric proofs, which has a few examples. Here are a few more examples. Here's a site with slides for most of the same counting proofs we've seen in class. Here's a counting explanation for one problem, in detail.

Class 11
Chapter 7 material.

Class 12
Chapter 6 and 7 material including the Principle of Inclusion/Exclusion (PIE).

Class 13
"Linear homogeneous recurrence relations of the second order" and the Fibonacci numbers (see chapter 8).
Permutahedron for four elements, and its connection to the musical form change-ringing, as well as to DNA analysis.

Class 14
Recursion relations and the Fibonacci numbers, including how they are found as the numbers of spirals on pine cones.

Here are some more links on Fibonacci numbers:
Vi Hart's Fibonacci number videos. (We watched the first of 3 in class.)
A great site about Fibonacci numbers.
Fibonacci site with lots of pictures and interactive applets.
Interactive site that helps explain phyllotaxis, which is the pattern of spirals in many plants.
Pingala's possible use of the Fibonacci Numbers
Rachel Hall who credits Indian mathematician/musician with the Fibonacci numbers - see her article "Math for Poets and Drummers" listed at her site.

Class 15
Exam 2 and more on recursion relations.

Class 16
Counting problems. Modular arithmetic material including the Euclidean algorithm and solving ax=b (mod m)
Recursions: Pick two starting numbers. Create a sequence in which the next number is the previous number minus the number previous to the previous, that is a(n) = a(n-1) - a(n-2). Solve and find a(60,000).

Class 17
New material on generating functions.

Careful introduction to generating functions, Please add the following homework problems at the end of it to your homework: 1b, 2b, 3a, 4c, 11
Here is the Wikipedia entry on generating functions - more complete, but more terse.

Class 18
Generating functions, including looking at how the Fibonacci numbers may be set up as a generating function and thus the rational polynomial x/(x^2 + x –1).
Trees, including tree traversals inorder, preorder, and postorder, and their relationship to calculations.

Class 19
Surfaces like toruses, trying to embed K(5) and K(3,3) in the plane.
The Euler formula ve + f =2 and realated formulas, and use them to show that K(5) and K(3,3) are non-planar.
Euler circuits (each edge once) and Hamiltonian cycles (each vertex once), and how to Eulerize" a street network by adding a minimal number of "double-back" streets to make all degrees even. How to use "surgery" to find an Euler circuit in a connected graph with all even degree vertices.
Two simple "greedy algorithms" (the nearest neighbor and cheapest link algorithms) for finding the minimal Hamiltonian cycle (the Traveling Salesperson Problem, or TSP) in a weighted graph might not work, and we might need to use "brute force", which means examining every one of the (n-1)! cycles in K(n).
Some applications to circuit boards: using the Euler formula to find a lower bound for the thickness and thus the number of circuit boards needed to design a circuit graph, and how solving the TSP would simplify circuit board welding patterns.
Proving the TSP is NP-complete (or not!) would win you $1,000,000 and instant fame - it is the most important unsolved problem in this branch of mathematics.
Prufer's algorithm for codes for labeled trees and Kruskal's algorithm for finding a minimal spanning tree for a graph.

Extra homework: can you show how to embed K(7) in the torus with no edges crossing? Google it and you can find lots of images (if you give up!)

Class 20
Coloring problems and Prufer's algorithm.

Class 21
More on coloring problems and Dijstra's Algorithm.
The doodling theorem (see Vi Hart's videos on doodling in math class.)

Links and notes from previous classes

Some things to know about for exam 1:
(1) Be able to draw a graph with a given set of degrees.
(2) Be able to represent a graph with a matrix and know how to use powers of the adjacency
matrix to find numbers of paths between vertices.
(3) Be able to decide whether two graphs are isomorphic.
(4) Understand the use of logical connectives, and be able to build the truth table for a logical
statement
(5) Understand the difference between a statement, its converse, its inverse, and its
contrapositive.
(6) Be able to give a simple proof by contradiction.
(7) Prove a statement by induction.
(8) Use the pigeonhole principle.
(9) Decide whether or not a function is one-to-one or onto.
(10) Use the multiplication and addition principles to solve counting problems.
(11) Decide how many functions there are from set A to set B.
(12) Use quantifiers for "for all" and "there exists" and their negatives.
(13) Use set operations like complement, cross product, union, intersection, and set difference.

List of things to study for exam 2:
Calculations with factorials and binomial coefficients
Principle of inclusion exclusion examples
What makes something an equivalence relation
Counting problems
Permutations (counts where order matters)
Combinations (counts where order does not matter)
Numbers of subsets of different sizes
Solution so modular arithmetic problems of the form ax = b (mod m)
Number of ways to distribute n identical balls into k distinct boxes
Number of ways to rearrange the letters in a name, when some letters identical
Counting or combinatorial proofs
Solve linear homogeneous recursion relations of order two

Final Exam study questions from past quarter.

Introduction to generating functions, and associated homework problems 1b, 2b, 3a, 4c, 11
Here is the Wikipedia entry on generating functions - more complete, but more terse.

Euler circuits, Hamiltonian cycles, and Dijkstra's Algorithm for the shortest path between two vertices. How to Eulerize a connected graph so that all degrees are even, and tried the greedy algorithms Nearest Neighbor and Cheapest Link, as well as Brute Force, to solve the Traveling Salesperson Problem (TSP).

The 100 prisoners, 100 keys, and 100 boxes puzzle is explained at this link.
The AMATYC exam past questions:
http://www.amatyc.org/?page=SMLPastQuestions

Combinatoric or counting proofs. Here's the Wikipedia entry on combinatoric proofs, which has a few examples. Here are a few more examples. Here's a site with slides for most of the same counting proofs we've seen in class. Here's a counting explanation for one problem, in detail.

Big oh notation. Here's another link.

Start with a pile of n identical objects. At each step divide a pile with k > 1 objects into two smaller piles with r and s elements. At each such step calculate 1/r + 1/s. When all piles are of size 1 calculate the product of the all the above sums. Call the result f(n). Is f(n) an actual function (that is, does each n lead to only one calculated result?) Find a formula for this result, and prove that this formula is correct using induction.

The mod 9 trick: The trick works because a number's digit sum is the same if the digits are rearranged. The digit sum is congruent to the number itself with respect to mod 9. I asked you to try to figure out why this is true. Here's a hint: rewrite the number as a "polynomial" in powers of 10. For instance, 357 = 3(10^2) + 5(10^1) + 7(10^0). Then convert to mod 9 ....

Why the number of subsets in a set A, with cardinality |A|=n is 2^n.
Binary strings and the binary base system.

To see some of the ideas about the use of binary systems in ancient Africa, see Ron Eglash's Ted Talk.
For history relating use of binary in India and China (as in the I Ching), see the Wikipedia entry on binary. See also a note on the use of octal systems by Native Americans, and the proposal 200 years ago for octal rather than base ten metric system at this page.

The game Set.
The Fido puzzle from class: Where's Fido? Add the bottlecaps puzzle at the end of the handout to your homework.
Two of the logical connectives we learned about, that are not in the text, are NOR and NAND.
Russell's Paradox.

Six degrees of separation, the Kevin Bacon game, and Erdos numbers.
Find an onto function which is not one-to-one, which maps the integers Z onto Z.
Can you draw the complete bipartite graph K(3,3) on paper without the edges crossing?

Ramsey numbers

Here is a site with a huge number of mathematical tiling results.

Here is that free graph and geometry software, Geograbra.

Here are the seven questions from the "magic trick" that also uses Hamming error-correcting codes:
Think of a number from 0 to 15
Answer the following 7 questions with Yes or No, and write down your answers in order. You are allowed to lie at most once:
1. Is the number 8 or greater?
2. Is it in the set {4,5,6,7,12,13,14,15}?
3. Is it in the set {2,3,6,7,10,11,14,15}?
4. Is it odd?
5. Is it in the set {1,2,4,7,9,10,12,15}?
6. Is it in the set {1,2,5,6,8,11,12,15}?
7. Is it in the set {1,3,4,6,8,10,13,15}?

Here is the puzzle that uses the idea of error-correcting codes:
Three players enter a room and a red or blue hat is placed on each person's head. The color of each hat is determined by a coin toss, with the outcome of one coin toss having no effect on the others. Each person can see the other players' hats but not his own.
No communication of any sort is allowed, except for an initial strategy session before the game begins. Once they have had a chance to look at the other hats, the players must simultaneously guess the color of their own hats or pass. The group shares a hypothetical $3 million prize if at least one player guesses correctly and no players guess incorrectly.
What strategy should the players adopt?

Vi Hart's first (of three) videos on Fibonacci numbers.

Why the probability of a derangement is 1/e when "reading" card names.
We also had an initial look at generating functions.

Here's a nice introduction to generating functions.

The pattern game

In the pigeonhole principle "magic trick," I ask you to choose seven numbers from the list 1,2,3,...,12. The properties each of your lists had were:
(1) A pair of your numbers had a sum of 13.
(2) A pair of your numbers had a difference of 6.
(3) A pair of your numbers had a difference of 3.
(4) A pair of your numbers had the property that they have no divisors other than 1 in common (they are "relatively prime.")
(5) A pair of your numbers had the property that one divided the other equally.
(6) After striking out one of your numbers, two subsets of your numbers had the same sum.
We saw how the pigeonhole principle explained why properties 1-5 are true. Number 5 was tricky, and involved labeling the six pigeonholes with different numbers of numbers!
Property 6 is similar to an example in the text; in this case the we have to show that there are more possible subsets than there are possible sums.
The number of subsets of a six element set is 2 ^6 = 64, while the maximum sum of any such subset is 7+8+9+10+11+12 = 57, so two subsets must have the same sum.
We also saw a geometric version of the PHP, used to show why 5 Starbucks located in a 2 mile by 2 mile square must include two that are within 1.5 miles of each other.

The "handoff" problem, and noted that counting problems often involve making assumptions about exactly what is to be counted, then insuring that our count is consistent with our interpretation of the problem.