15-251 Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions.

Slides:



Advertisements
Similar presentations
Meet Manager Training Updated April Step 1: Set up your meet Download the meet template Restore the template Purge Old Data Setup Meet Information,
Advertisements

Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions.
Mechanism Design without Money Lecture 1 Avinatan Hassidim.
Exponential Functions Logarithmic Functions
Calculus Weeks 3&4. Integration by parts This is another way to try and integrate products. It is in fact the opposite of the product rule for derivatives:
Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the.
Mathematical Induction II Lecture 14: Nov
Tic-Tac-Toe Factoring
Today: 1. Hand back/review Test 1 2. Lecture on Section 3.1, with HW 3.1 due tomorrow 3. Daily Quiz at end of hour, on Test 1 questions.
Great Theoretical Ideas in Computer Science.
Snick  snack CPSC 121: Models of Computation 2009 Winter Term 1 Introduction to Induction Steve Wolfman 1.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 20 Instructor: Paul Beame.
“Muddy point” one-minute papers
Dr. Tatiana Erukhimova [year] Overview of Today’s Class Folders Syllabus and Course requirements Tricks to survive Mechanics Review and Coulomb’s Law.
Recursion Lecture 17: Nov 11. Quiz int hello(int n) { if (n==0) return 0; else printf(“Hello World %d\n”,n); hello(n-1); } 1.What would the program do.
Experiments in Behavioral Network Science 2: Kings and Pawns Networked Life CSE 112 Spring 2007 Michael Kearns & Stephen Judd.
By Jennifer Adams. The traditional approach (or algorithm) for large number division is the most abstract and difficult approach to division. Yet many.
Sequential circuit design
Spring 2012 MATH 250: Calculus III. Course Topics Review: Parametric Equations and Polar Coordinates Vectors and Three-Dimensional Analytic Geometry.
Please close your laptops and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily homework quiz will be given.
Binomial PDF and CDF Section Starter Five marbles are on a table. Two of them are going to be painted with a “W” and the rest will be painted.
A quadratic equation is a second degree polynomial, usually written in general form: The a, b, and c terms are called the coefficients of the equation,
Power Series as Functions. Defining our Function In general, we can say that That is, if the series converges at x = a, then is a number and we can define.
Great Theoretical Ideas in Computer Science for Some.
College Algebra Fifth Edition James Stewart Lothar Redlin Saleem Watson.
Calculus II Tools for Applied Mathematics. What to Remember from Calculus I The derivative of a function measures its instantaneous rate of change (slope)
Great Theoretical Ideas in Computer Science.
Using School fusion A great interactive tool to aid in communication for students, parents and YOU!!! Property of TSVest 2006.
Lecture 5.2: Special Graphs and Matrix Representation CS 250, Discrete Structures, Fall 2013 Nitesh Saxena Adopted from previous lectures by Zeph Grunschlag.
Lecture 5: Network Flow Algorithms Single-Source Shortest-Path (SSSP) (Dijkstra's Algorithm) Max Flow - Min Cut (Ford-Fulkerson) Job Sequencing.
Please close your laptops and turn off and put away your cell phones, and get out your note-taking materials.
Great Theoretical Ideas in Computer Science.
Basic Integration Rules Lesson 8.1. Fitting Integrals to Basic Rules Consider these similar integrals Which one uses … The log rule The arctangent rule.
1 Put your name if you want your attendance credit. Please put your as well. CSC 320 is done at 11:30 so I did NOT fill in the box for 11:30 for.
Week 11 - Wednesday.  What did we talk about last time?  Exam 2 post-mortem  Combinations.
ACT MATH STRATEGIES. Tips to remember No ACT Math question should take more than a minute Focus on trying to get 2 out of 3 questions correct Skills that.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
In section 11.9, we were able to find power series representations for a certain restricted class of functions. Here, we investigate more general problems.
Check whether these things are on your desk. If not, please raise your hand. –Pen –Receipt –“Summary of the experiment” Fill in the receipt following the.
Generating Functions and Counting Trees. Today’s Plan 1.Generating functions for basic sequences 2.Operations on generating functions 3.Counting 4.Solve.
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
This is an example of an infinite series. 1 1 Start with a square one unit by one unit: This series converges (approaches a limiting value.) Many series.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Area Under the Curve We want to approximate the area between a curve (y=x 2 +1) and the x-axis from x=0 to x=7 We want to approximate the area between.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
CSEP 521 Applied Algorithms Richard Anderson Winter 2013 Lecture 3.
CSE 143 Lecture 13 Recursive Backtracking slides created by Ethan Apter
Data Structures and Algorithms in Java AlaaEddin 2012.
Great Theoretical Ideas in Computer Science for Some.
Study Skills for School Success! Please note this information comes from another teacher:Miss Cantillon.
Great Theoretical Ideas in Computer Science for Some.
Welcome! Cinda Heeren Lecturer Department of CS UIUC The Beauty of Computer Science.
A fun way to factor quadratics!.  You start by identifying the a, b and c values in your quadratic expression or equation.  Remember the form is ax.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Trigonometric identities Trigonometric formulae
The Beauty of Computer Science
Shooters Hill, Post 16 College
Lecture 5.2: Special Graphs and Matrix Representation
Monochrome Despite Himself
Multiply using the Distributive Property
Geometry 15 Jan 2013 Warm up: Check your homework. For EACH PROBLEM: √ if correct. X if incorrect. Work with your group mates to find and correct any.
Generating Functions II
Great Theoretical Ideas in Computer Science
5.1 Power Series Method Section 5.1 p1.
Factoring Trinomials.
How To Sign a PDF form with your existing signature Step 1 Step 2
Factoring Trinomials.
you get to solve puzzles!
Tic-Tac-Toe Factoring
Visual Algebra for Teachers
Presentation transcript:

Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions

MORE Generating Functions Lecture 7 (February 2, 2010) Adam Blank

Announcements You are now breathing manually Homework 3 is due tonight Please submit a collaborators graph again. It doesn’t matter what you name it. You do not also have to list your collaborators in the pdf Homework 4 is out This assignment is non-trivial Start early! Exam 1 will be in recitation next week Don’t be late! We will (tentatively) have a review session on Saturday We will you with updates

What good are Generating Functions anyway?

What good are Generating Functions anyway? They're fun! Solving recurrences precisely They are often easier than the alternative!

Some Terminology Closed form of a Generating Function Closed form for a Recurrence

Let’s do some problems!

Domino Domination We have a board, and we would like to fill it with dominos. We have two colors of dominos: green and blue. The green ones must be used in pairs (so that they don’t get blue!), and they must be vertical. How many ways can we tile our board?

Domino Domination We have a board, and we would like to fill it with dominos. We have two colors of dominos: green and blue. The green ones must be used in pairs (so that they don’t get blue!), and they must be vertical. How many ways can we tile our board? This is a combinatorial question! How should we proceed?!?! Write a recurrence!

Domino Domination So now we have a recurrence…but now what?

Domino Domination Now we derive a closed form using generating functions! Let We know the base cases: Note that these base cases are actually correct. is the number of ways to tile a board.

Domino Domination Now we derive a closed form using generating functions! Let

Domino Domination Now we derive a closed form using generating functions! Let

Domino Domination Now we have a closed form for the generating function! …what now? Let

Domino Domination Now we have a closed form for the generating function! …what now? Let

Domino Domination Now we have a closed form for the generating function! …what now? Let

Rogue Recurrence Solve this recurrence…or else! Let for n>2,,

Rogue Recurrence Solve this recurrence…or else! Let for n>2,,

Rogue Recurrence Solve this recurrence…or else! Let for n>2,,

Rogue Recurrence Solve this recurrence…or else! Let for n>2,, What next? Partial fractions?

Rogue Recurrence No. Let’s be sneaky instead!

Rogue Recurrence Now back to the recurrence… Let for n>2,,

Double Sums OMGWTFBBQ! Let’s revisit the last lecture… We would like to swap the summations. All we have done here is re-group the addition.

Double Sums OMGWTFBBQ! We know that…

Double Sums OMGWTFBBQ! We know that… So…

Dainty Diners 2n nobles want to sit down to dinner at a table and shake hands. They are picky and will not shake hands in any way, in which one or more noble reaches over another. How many ways can the nobles shake hands?

Dainty Diners Look at an arbitrary person, and think about who he could shake hands with.

Dainty Diners Noble 0 can shake hands with 2, 4, or 6. He can shake hands with even numbered people! When he shakes hands with someone, it splits the remaining people into two groups

Dainty Diners First, we choose which person the 0th person shakes hands with, then we choose the two sub-groups created by this choice # of ways 2n nobles can shake hands # of ways 2k nobles can shake hands # of ways 2(n-k-1) nobles can shake hands Choose which person the 0th person shakes hands with

Dainty Diners n=1: n>1: Let

Dainty Diners What now? Our usual trick of putting the terms in terms of P(x) doesn’t seem to be possible!

Dainty Diners Idea! Isolate the double summation and list out some terms. Is there a pattern??

Dainty Diners Let C(x) be an arbitrary generating function! Suppose we take k terms from the left. We need n-k from the second to make n total powers of k.

Dainty Diners After some “magic” (see Newton’s Binomial Theorem):

Here’s What You Need to Know… Generating Functions How to solve recurrences Summation techniques Simple partial fractions Simple differentiation (mostly remember how to use generating functions to solve recurrences)