Experimental Mathematics with Python and Sage

Similar documents
MAC Learning Objectives. Learning Objectives (Cont.)

Sequences, Series, and Probability Part I

Chapter 8 Sequences, Series, and the Binomial Theorem

Week 3: Binomials Coefficients. 26 & 28 September MA204/MA284 : Discrete Mathematics. Niall Madden (and Emil Sköldberg)

The Binomial Theorem. Step 1 Expand the binomials in column 1 on a CAS and record the results in column 2 of a table like the one below.

The Binomial Theorem and Consequences

3.1 Properties of Binomial Coefficients

Asymptotic Notation. Instructor: Laszlo Babai June 14, 2002

Chapter 15 - The Binomial Formula PART

(2/3) 3 ((1 7/8) 2 + 1/2) = (2/3) 3 ((8/8 7/8) 2 + 1/2) (Work from inner parentheses outward) = (2/3) 3 ((1/8) 2 + 1/2) = (8/27) (1/64 + 1/2)

Probability Distribution Unit Review

Lecture 2. Multinomial coefficients and more counting problems

Binomial Coefficient

EXERCISES ACTIVITY 6.7

The Binomial Theorem 5.4

5.9: The Binomial Theorem

Probability Distributions: Discrete

ANALYSIS OF THE BINOMIAL METHOD

Computational Finance Binomial Trees Analysis

Remarks. Remarks. In this section we will learn how to compute the coefficients when we expand a binomial raised to a power.

NOTES ON FIBONACCI TREES AND THEIR OPTIMALITY* YASUICHI HORIBE INTRODUCTION 1. FIBONACCI TREES

30. 2 x5 + 3 x; quintic binomial 31. a. V = 10pr 2. b. V = 3pr 3

CSE 21 Winter 2016 Homework 6 Due: Wednesday, May 11, 2016 at 11:59pm. Instructions

10 5 The Binomial Theorem

Investigating First Returns: The Effect of Multicolored Vectors

6.1 Binomial Theorem

Class Notes: On the Theme of Calculators Are Not Needed

1. (a) Expand (1 + 2x 2 ) in ascending powers of x up to and including the term in x 3. (3)

9/16/ (1) Review of Factoring trinomials. (2) Develop the graphic significance of factors/roots. Math 2 Honors - Santowski

TWO-PERIODIC TERNARY RECURRENCES AND THEIR BINET-FORMULA 1. INTRODUCTION

10-6 Study Guide and Intervention

Unit 9 Day 4. Agenda Questions from Counting (last class)? Recall Combinations and Factorial Notation!! 2. Simplify: Recall (a + b) n

Ex 1) Suppose a license plate can have any three letters followed by any four digits.

BINOMIAL TRANSFORMS OF QUADRAPELL SEQUENCES AND QUADRAPELL MATRIX SEQUENCES

6.3 The Binomial Theorem

COMPUTER SCIENCE 20, SPRING 2014 Homework Problems Recursive Definitions, Structural Induction, States and Invariants

CIVL Discrete Distributions

Quadrant marked mesh patterns in 123-avoiding permutations

Binomial Probability

Advanced Numerical Methods

arxiv: v1 [math.co] 31 Mar 2009

Tutorial 11: Limit Theorems. Baoxiang Wang & Yihan Zhang bxwang, April 10, 2017

Partial Fractions. A rational function is a fraction in which both the numerator and denominator are polynomials. For example, f ( x) = 4, g( x) =

6-3 Dividing Polynomials

5.1 Personal Probability

CIVL Learning Objectives. Definitions. Discrete Distributions

Mathematics for Algorithms and System Analysis

MS-E2114 Investment Science Lecture 4: Applied interest rate analysis

Probability Distributions: Discrete

The Binomial Distribution

Word Expression Algebraic Expression Example. Let z first odd integer Then z 2 second consecutive odd integer z 4 third consecutive odd integer

P.1 Algebraic Expressions, Mathematical models, and Real numbers. Exponential notation: Definitions of Sets: A B. Sets and subsets of real numbers:

Probability. An intro for calculus students P= Figure 1: A normal integral

Lattice Paths and Their Generalizations

Multiple Eisenstein series

The Pill Problem, Lattice Paths and Catalan Numbers

Factors of 10 = = 2 5 Possible pairs of factors:

Rises in forests of binary shrubs

A brief history of Riordan arrays

Realizability of n-vertex Graphs with Prescribed Vertex Connectivity, Edge Connectivity, Minimum Degree, and Maximum Degree

MATH 5510 Mathematical Models of Financial Derivatives. Topic 1 Risk neutral pricing principles under single-period securities models

CATEGORICAL SKEW LATTICES

Chapter 9 Section 9.1 (page 649)

Course Information and Introduction

Chapter 14 : Statistical Inference 1. Note : Here the 4-th and 5-th editions of the text have different chapters, but the material is the same.

Some Discrete Distribution Families

On equation. Boris Bartolomé. January 25 th, Göttingen Universität & Institut de Mathémathiques de Bordeaux

CSCE 750, Fall 2009 Quizzes with Answers

LECTURE 3: FREE CENTRAL LIMIT THEOREM AND FREE CUMULANTS

Section Sampling Distributions for Counts and Proportions

DESCENDANTS IN HEAP ORDERED TREES OR A TRIUMPH OF COMPUTER ALGEBRA

Name Class Date. Adding and Subtracting Polynomials

Finance 651: PDEs and Stochastic Calculus Midterm Examination November 9, 2012

tj= =n+6 U7D1 SEQUENCES AND SERIES Introduction A function can be used to generate a sequence of numbers Example: 1(x) = x2 generates

Case Study: Heavy-Tailed Distribution and Reinsurance Rate-making

Review of the Topics for Midterm I

PORTFOLIO OPTIMIZATION AND EXPECTED SHORTFALL MINIMIZATION FROM HISTORICAL DATA

Lecture 4: Divide and Conquer

Options Pricing Using Combinatoric Methods Postnikov Final Paper

Solution Week 60 (11/3/03) Cereal box prizes

Principles of Financial Computing

P VaR0.01 (X) > 2 VaR 0.01 (X). (10 p) Problem 4

Counting Basics. Venn diagrams

Stochastic Processes and Advanced Mathematical Finance. Multiperiod Binomial Tree Models

Math489/889 Stochastic Processes and Advanced Mathematical Finance Homework 4

A Polya Random Walk On A Lattice

Chapter Five. The Binomial Distribution and Related Topics

P (X = x) = x=25

Student Name: Teacher: Date: District: Miami-Dade County Public Schools. Assessment: 9_12 Mathematics Algebra II Exam 4

A No-Arbitrage Theorem for Uncertain Stock Model

Applied Mathematics Letters

Modular and Distributive Lattices

Drunken Birds, Brownian Motion, and Other Random Fun

Financial Modelling Using Discrete Stochastic Calculus

Non replication of options

Supporting Information

Lattice Tree Methods for Strongly Path Dependent

CPS-111:Tutorial 6. Discrete Probability II. Steve Gu Feb 22, 2008

The Binomial distribution

Review. What is the probability of throwing two 6s in a row with a fair die? a) b) c) d) 0.333

Transcription:

Experimental Mathematics with Python and Sage Amritanshu Prasad Chennaipy 27 February 2016

Binomial Coefficients ( ) n = n C k = number of distinct ways to choose k out of n objects k

Binomial Coefficients ( ) n = n C k = number of distinct ways to choose k out of n objects k ( ) n = k n! k!(n k)!.

How many binomial coefficients are odd? ( ) n = k n! k!(n k)!.

How many binomial coefficients are odd? ( ) n = k n! k!(n k)!. Question For how many numbers 0 k n is ( n k) odd?

How many binomial coefficients are odd? ( ) n = k n! k!(n k)!. Question For how many numbers 0 k n is ( n k) odd? sage : [ len ([ k for k in range ( n +1) if binomial (n, k )%2 ==1]) for n in range (20)] [1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8]

How many binomial coefficients are odd? ( ) n = k n! k!(n k)!. Question For how many numbers 0 k n is ( n k) odd? sage : [ len ([ k for k in range ( n +1) if binomial (n, k )%2 ==1]) for n in range (20)] [1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8] Write numbers in binary and count number of 1 s

How many binomial coefficients are odd? ( ) n = k n! k!(n k)!. Question For how many numbers 0 k n is ( n k) odd? sage : [ len ([ k for k in range ( n +1) if binomial (n, k )%2 ==1]) for n in range (20)] [1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8] Write numbers in binary and count number of 1 s 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011,... 0, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 3,...

How many binomial coefficients are odd? ( ) n = k n! k!(n k)!. Question For how many numbers 0 k n is ( n k) odd? sage : [ len ([ k for k in range ( n +1) if binomial (n, k )%2 ==1]) for n in range (20)] [1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8] Write numbers in binary and count number of 1 s 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011,... 0, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 3,... Let ν(n) denote the number of 1 s in binary expansion of n.

How many binomial coefficients are odd? ( ) n = k n! k!(n k)!. Question For how many numbers 0 k n is ( n k) odd? sage : [ len ([ k for k in range ( n +1) if binomial (n, k )%2 ==1]) for n in range (20)] [1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8] Write numbers in binary and count number of 1 s 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011,... 0, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 3,... Let ν(n) denote the number of 1 s in binary expansion of n. Conjecture No. of odd binomial coefficients of the form ( n k) for fixed n is 2 ν(n).

Binomial coefficients in Pascal s triangle (Meru Prastaara)

( nk ) = number of paths from the apex to the kth position in the nth row.

Binomial coefficients in Pascal s triangle (Meru Prastaara)

Binomial coefficients in Pascal s triangle (Meru Prastaara)

Binomial coefficients in Pascal s triangle (Meru Prastaara)

Binomial coefficients in Pascal s triangle (Meru Prastaara)

Recurrence Relation If 2 k n < 2 k+1, a n = 2a n 2 k.

a 42 = 2 a 10 = 2 2 a 2 = 2 2 2.

a 42 = 2 a 10 = 2 2 a 2 = 2 2 2. In terms of binary expansions: 42 = 101010 10 = 1010 2 = 10

a 42 = 2 a 10 = 2 2 a 2 = 2 2 2. In terms of binary expansions: 42 = 101010 10 = 1010 2 = 10 Total number of times you double is the number of times 1 appears in the binary expansion.

Integer Partition 5 = 5 = 4 + 1 = 3 + 2 = 3 + 1 + 1 = 2 + 2 + 1 = 2 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1

Integer Partition 5 = 5 = 4 + 1 = 3 + 2 = 3 + 1 + 1 = 2 + 2 + 1 = 2 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 p(5) = 7 sage : [ number_of_partitions ( n) for n in range (19)] [1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 231, 297, 385]

Big Open Problem in Mathematics Find an exact closed formula for p(n)

Hardy and Ramanujan p(n) 1 4n 3 exp(π 2n/3) as n.

sage : number_of_partitions (100000) 2749351056977569651267751632098635268817342931598005475 8203125984302147328114964173055050741660736621590157844 7742962489404930630702004617927644930335101160793424571 9015571894350972531246610845200636955893446424871682878 9832182345009262853831404597021307130674510624419227311 2389997022844086093709355316296978515695698921961084801 58600569421098519 is based on the Hardy-Ramanujan-Rademacher formula:

Young s lattice

The f -statistic of a partition f λ = Number of paths from the apex to λ in Young s lattice

How often in f λ odd? sage : [ len ([ la for la in Partitions ( n) if la. dimension ()%2 == 1]) for n in range (19)] [1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 16, 16, 32, 32, 64, 64, 16, 16, 32]

How often in f λ odd? sage : [ len ([ la for la in Partitions ( n) if la. dimension ()%2 == 1]) for n in range (19)] [1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 16, 16, 32, 32, 64, 64, 16, 16, 32] Powers of 2 again!

Odd Partitions in Young s lattice form a binary tree

If the binary expansion of n has 1 s in the places k 1, k 2,..., k r, number of partitions of n for which f λ is odd is: c n = s k 1+k 2 + +k r Example n = 42 = 101010 = 2 5 + 2 3 + 2 1 c 42 = 2 5+3+1 = 2 8 = 256.

Why mathematicians use Sage Easy to program (uses python) Free Developed by research mathematicians - caters to their needs Open source Can also be used to learn and teach calculus, linear algebra, etc.

www.sagemath.org