Introduction to Symbolic Computation Release 1.0.0

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Symbolic Computation Release 1.0.0 Introduction to Symbolic Computation Release 1.0.0 Jan Verschelde May 02, 2019 Contents 0 Preface 1 1 Part I: First Steps 3 1.1 Lecture 1: Welcome!...........................................3 1.1.1 What is Computer Algebra?..................................3 1.1.2 What is SageMath?.......................................4 1.1.3 Running SageMath.......................................4 1.1.4 Which systems in SageMath are used?.............................5 1.1.5 Assignments..........................................5 1.2 Lecture 2: the notebook – structuring and documenting work flow...................5 1.2.1 the Jupyter notebook in CoCalc................................6 1.2.2 Formatting a Notebook.....................................6 1.3 Lecture 3: Sage as a Calculator – getting Help.............................8 1.3.1 Getting Started.........................................8 1.3.2 Getting Help..........................................9 1.3.3 The Packages in Sage...................................... 10 1.3.4 Assignments.......................................... 11 1.4 Lecture 4: Exact and Floating-Point Numbers.............................. 11 1.4.1 Integer and Rational Numbers................................. 11 1.4.2 Floating-Point Numbers.................................... 13 1.4.3 Assignments.......................................... 13 1.5 Lecture 5: Complex and Algebraic Numbers.............................. 14 1.5.1 Complex Numbers....................................... 14 1.5.2 Algebraic Numbers....................................... 15 1.5.3 Assignments.......................................... 17 1.6 Lecture 6: Symbols, Variables, and References............................. 17 1.6.1 Expressions and Names..................................... 18 1.6.2 Verification of Solutions.................................... 18 1.6.3 Evaluation of Expressions................................... 19 1.6.4 References and Shared Values................................. 20 1.6.5 Assignments.......................................... 21 1.7 Lecture 7: Data Types and Data Structures............................... 21 1.7.1 Coercing to the Basic Number Types.............................. 21 1.7.2 Random Numbers........................................ 22 1.7.3 Components of Expressions.................................. 23 1.7.4 Storing Data with Functions.................................. 23 i 1.7.5 Assignments.......................................... 25 1.8 Lecture 8: Evaluation and Execution.................................. 25 1.8.1 Addition and Multiplication Tables............................... 25 1.8.2 Expression Trees........................................ 28 1.8.3 Assignments.......................................... 31 1.9 Lecture 9: Input/Output Formats – Saving Data............................. 31 1.9.1 Files in Python......................................... 32 1.9.2 Saving and Loading SageMath Objects............................. 32 1.9.3 Pickling Objects......................................... 33 1.9.4 Assignments.......................................... 34 1.10 Lecture 10: Code Generation with Cython............................... 34 1.10.1 A Motivating Example..................................... 35 1.10.2 Executing in Pure Python.................................... 35 1.10.3 Vectorization with numpy.................................... 36 1.10.4 Cython code........................................... 37 1.10.5 Assignments.......................................... 38 2 Part II: Polynomials and Expressions 39 2.1 Lecture 11: Univariate and Multivariate Polynomials.......................... 39 2.1.1 Polynomials as Expressions.................................. 39 2.1.2 Univariate Polynomials..................................... 40 2.1.3 Multivariate Polynomials.................................... 42 2.1.4 Assignments.......................................... 42 2.2 Lecture 12: Rational Functions and Conversions............................ 43 2.2.1 Rational Expressions...................................... 43 2.2.2 Conversions........................................... 44 2.2.3 Assignments.......................................... 45 2.3 Lecture 13: Representation of Expressions............................... 45 2.3.1 Expression Trees........................................ 45 2.3.2 Evaluation of Expressions................................... 48 2.3.3 Assignments.......................................... 50 2.4 Lecture 14: Substitution, Expansion, and Factorization......................... 50 2.4.1 Substitution........................................... 50 2.4.2 Expansion............................................ 52 2.4.3 Factorization.......................................... 53 2.4.4 Assignments.......................................... 53 2.5 Lecture 15: Normalizing Expressions.................................. 53 2.5.1 Normal and Canonical Form.................................. 54 2.5.2 Rewriting Multivariate Polynomials.............................. 54 2.5.3 A Numerical Test on Equality................................. 55 2.5.4 Assignments.......................................... 55 2.6 Lecture 16: Review of the First 14 Lectures............................... 56 2.7 Lecture 17: the First Midterm Exam................................... 56 2.7.1 Questions on the Spring 2017 First Midterm Exam...................... 57 2.7.2 Questions on the Fall 2018 First Midterm Exam........................ 57 2.7.3 Questions on the Spring 2019 First Midterm Exam...................... 58 3 Part III: Calculus 61 3.1 Lecture 18: Defining Mathematical Functions.............................. 61 3.1.1 Functions in Sage and in Python................................ 61 3.1.2 Step Functions......................................... 62 3.1.3 Piecewise Functions...................................... 63 3.1.4 Combining Functions...................................... 63 3.1.5 Assignments.......................................... 63 ii 3.2 Lecture 19: Recursive Functions..................................... 64 3.2.1 Memoization in Python..................................... 64 3.2.2 Memoization in Sage...................................... 67 3.2.3 Assignments.......................................... 68 3.3 Lecture 20: Working with Functions................................... 69 3.3.1 List Comprehensions...................................... 69 3.3.2 Composing Functions...................................... 70 3.3.3 Functions Returning Functions................................. 72 3.3.4 Assignments.......................................... 73 3.4 Lecture 21: Symbolic and Numeric Differentiation........................... 73 3.4.1 Symbolic Differentiation.................................... 74 3.4.2 Numerical Differentiation.................................... 74 3.4.3 Implicit Differentiation..................................... 75 3.4.4 Plotting the Tangent Line.................................... 75 3.4.5 Assignments.......................................... 77 3.5 Lecture 22: Integration and Summation................................. 77 3.5.1 Indefinite and Definite Integrals................................ 78 3.5.2 Assisting the Integrator..................................... 78 3.5.3 Symbolic Summation...................................... 80 3.5.4 Assignments.......................................... 80 3.6 Lecture 23: Series, Approximations, and Limits............................. 81 3.6.1 Taylor Series.......................................... 81 3.6.2 Taylor Series in SymPy..................................... 82 3.6.3 Power Series.......................................... 82 3.6.4 Approximations......................................... 83 3.6.5 Limits.............................................. 85 3.6.6 Assignments.......................................... 85 3.7 Lecture 24: Symbolic-Numeric Computation.............................. 86 3.7.1 Interval arithmetic........................................ 86 3.7.2 Constrained Optimization.................................... 88 3.7.3 Assignments.......................................... 90 4 Part IV: Plotting and Solving Equations 91 4.1 Lecture 25: Two Dimensional Plots................................... 91 4.1.1 Plotting Formulas and Functions................................ 91 4.1.2 Curves in the Plane....................................... 94 4.1.3 Assignments.......................................... 97 4.2 Lecture 26: Plotting in Three Dimensions and Beyond......................... 99 4.2.1 Surface Plots.......................................... 99 4.2.2 Space Curves.......................................... 100 4.2.3 Four Dimensional Plots with Colormaps............................ 106 4.2.4 Assignments.......................................... 110 4.3 Lecture 27: Animations......................................... 110 4.3.1 Animating Plots......................................... 110 4.3.2 Designing an Animation.................................... 112 4.3.3 Animating Surfaces....................................... 115 4.3.4 Assignments.......................................... 115 4.4 Lecture 28: Solving Equations...................................... 117 4.4.1 Polynomials in One Variable.................................. 117 4.4.2 Solving Systems of Polynomial Equations........................... 118 4.4.3 Groebner Bases......................................... 122 4.4.4 Assignments.......................................... 123 4.5 Lecture 29: Linear Algebra......................................
Recommended publications
  • Sagemath and Sagemathcloud
    Viviane Pons Ma^ıtrede conf´erence,Universit´eParis-Sud Orsay [email protected] { @PyViv SageMath and SageMathCloud Introduction SageMath SageMath is a free open source mathematics software I Created in 2005 by William Stein. I http://www.sagemath.org/ I Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 2 / 7 SageMath Source and language I the main language of Sage is python (but there are many other source languages: cython, C, C++, fortran) I the source is distributed under the GPL licence. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 3 / 7 SageMath Sage and libraries One of the original purpose of Sage was to put together the many existent open source mathematics software programs: Atlas, GAP, GMP, Linbox, Maxima, MPFR, PARI/GP, NetworkX, NTL, Numpy/Scipy, Singular, Symmetrica,... Sage is all-inclusive: it installs all those libraries and gives you a common python-based interface to work on them. On top of it is the python / cython Sage library it-self. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 4 / 7 SageMath Sage and libraries I You can use a library explicitly: sage: n = gap(20062006) sage: type(n) <c l a s s 'sage. interfaces .gap.GapElement'> sage: n.Factors() [ 2, 17, 59, 73, 137 ] I But also, many of Sage computation are done through those libraries without necessarily telling you: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage : G . g a p () Group( [ (3,4), (1,2,3)(4,5) ] ) Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 5 / 7 SageMath Development model Development model I Sage is developed by researchers for researchers: the original philosophy is to develop what you need for your research and share it with the community.
    [Show full text]
  • Redberry: a Computer Algebra System Designed for Tensor Manipulation
    Redberry: a computer algebra system designed for tensor manipulation Stanislav Poslavsky Institute for High Energy Physics, Protvino, Russia SRRC RF ITEP of NRC Kurchatov Institute, Moscow, Russia E-mail: [email protected] Dmitry Bolotin Institute of Bioorganic Chemistry of RAS, Moscow, Russia E-mail: [email protected] Abstract. In this paper we focus on the main aspects of computer-aided calculations with tensors and present a new computer algebra system Redberry which was specifically designed for algebraic tensor manipulation. We touch upon distinctive features of tensor software in comparison with pure scalar systems, discuss the main approaches used to handle tensorial expressions and present the comparison of Redberry performance with other relevant tools. 1. Introduction General-purpose computer algebra systems (CASs) have become an essential part of many scientific calculations. Focusing on the area of theoretical physics and particularly high energy physics, one can note that there is a wide area of problems that deal with tensors (or more generally | objects with indices). This work is devoted to the algebraic manipulations with abstract indexed expressions which forms a substantial part of computer aided calculations with tensors in this field of science. Today, there are many packages both on top of general-purpose systems (Maple Physics [1], xAct [2], Tensorial etc.) and standalone tools (Cadabra [3,4], SymPy [5], Reduce [6] etc.) that cover different topics in symbolic tensor calculus. However, it cannot be said that current demand on such a software is fully satisfied [7]. The main difference of tensorial expressions (in comparison with ordinary indexless) lies in the presence of contractions between indices.
    [Show full text]
  • Tuto Documentation Release 0.1.0
    Tuto Documentation Release 0.1.0 DevOps people 2020-05-09 09H16 CONTENTS 1 Documentation news 3 1.1 Documentation news 2020........................................3 1.1.1 New features of sphinx.ext.autodoc (typing) in sphinx 2.4.0 (2020-02-09)..........3 1.1.2 Hypermodern Python Chapter 5: Documentation (2020-01-29) by https://twitter.com/cjolowicz/..................................3 1.2 Documentation news 2018........................................4 1.2.1 Pratical sphinx (2018-05-12, pycon2018)...........................4 1.2.2 Markdown Descriptions on PyPI (2018-03-16)........................4 1.2.3 Bringing interactive examples to MDN.............................5 1.3 Documentation news 2017........................................5 1.3.1 Autodoc-style extraction into Sphinx for your JS project...................5 1.4 Documentation news 2016........................................5 1.4.1 La documentation linux utilise sphinx.............................5 2 Documentation Advices 7 2.1 You are what you document (Monday, May 5, 2014)..........................8 2.2 Rédaction technique...........................................8 2.2.1 Libérez vos informations de leurs silos.............................8 2.2.2 Intégrer la documentation aux processus de développement..................8 2.3 13 Things People Hate about Your Open Source Docs.........................9 2.4 Beautiful docs.............................................. 10 2.5 Designing Great API Docs (11 Jan 2012)................................ 10 2.6 Docness.................................................
    [Show full text]
  • Performance Analysis of Effective Symbolic Methods for Solving Band Matrix Slaes
    Performance Analysis of Effective Symbolic Methods for Solving Band Matrix SLAEs Milena Veneva ∗1 and Alexander Ayriyan y1 1Joint Institute for Nuclear Research, Laboratory of Information Technologies, Joliot-Curie 6, 141980 Dubna, Moscow region, Russia Abstract This paper presents an experimental performance study of implementations of three symbolic algorithms for solving band matrix systems of linear algebraic equations with heptadiagonal, pen- tadiagonal, and tridiagonal coefficient matrices. The only assumption on the coefficient matrix in order for the algorithms to be stable is nonsingularity. These algorithms are implemented using the GiNaC library of C++ and the SymPy library of Python, considering five different data storing classes. Performance analysis of the implementations is done using the high-performance computing (HPC) platforms “HybriLIT” and “Avitohol”. The experimental setup and the results from the conducted computations on the individual computer systems are presented and discussed. An analysis of the three algorithms is performed. 1 Introduction Systems of linear algebraic equations (SLAEs) with heptadiagonal (HD), pentadiagonal (PD) and tridiagonal (TD) coefficient matrices may arise after many different scientific and engineering prob- lems, as well as problems of the computational linear algebra where finding the solution of a SLAE is considered to be one of the most important problems. On the other hand, special matrix’s char- acteristics like diagonal dominance, positive definiteness, etc. are not always feasible. The latter two points explain why there is a need of methods for solving of SLAEs which take into account the band structure of the matrices and do not have any other special requirements to them. One possible approach to this problem is the symbolic algorithms.
    [Show full text]
  • CAS (Computer Algebra System) Mathematica
    CAS (Computer Algebra System) Mathematica- UML students can download a copy for free as part of the UML site license; see the course website for details From: Wikipedia 2/9/2014 A computer algebra system (CAS) is a software program that allows [one] to compute with mathematical expressions in a way which is similar to the traditional handwritten computations of the mathematicians and other scientists. The main ones are Axiom, Magma, Maple, Mathematica and Sage (the latter includes several computer algebras systems, such as Macsyma and SymPy). Computer algebra systems began to appear in the 1960s, and evolved out of two quite different sources—the requirements of theoretical physicists and research into artificial intelligence. A prime example for the first development was the pioneering work conducted by the later Nobel Prize laureate in physics Martin Veltman, who designed a program for symbolic mathematics, especially High Energy Physics, called Schoonschip (Dutch for "clean ship") in 1963. Using LISP as the programming basis, Carl Engelman created MATHLAB in 1964 at MITRE within an artificial intelligence research environment. Later MATHLAB was made available to users on PDP-6 and PDP-10 Systems running TOPS-10 or TENEX in universities. Today it can still be used on SIMH-Emulations of the PDP-10. MATHLAB ("mathematical laboratory") should not be confused with MATLAB ("matrix laboratory") which is a system for numerical computation built 15 years later at the University of New Mexico, accidentally named rather similarly. The first popular computer algebra systems were muMATH, Reduce, Derive (based on muMATH), and Macsyma; a popular copyleft version of Macsyma called Maxima is actively being maintained.
    [Show full text]
  • SNC: a Cloud Service Platform for Symbolic-Numeric Computation Using Just-In-Time Compilation
    This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TCC.2017.2656088, IEEE Transactions on Cloud Computing IEEE TRANSACTIONS ON CLOUD COMPUTING 1 SNC: A Cloud Service Platform for Symbolic-Numeric Computation using Just-In-Time Compilation Peng Zhang1, Member, IEEE, Yueming Liu1, and Meikang Qiu, Senior Member, IEEE and SQL. Other types of Cloud services include: Software as a Abstract— Cloud services have been widely employed in IT Service (SaaS) in which the software is licensed and hosted in industry and scientific research. By using Cloud services users can Clouds; and Database as a Service (DBaaS) in which managed move computing tasks and data away from local computers to database services are hosted in Clouds. While enjoying these remote datacenters. By accessing Internet-based services over lightweight and mobile devices, users deploy diversified Cloud great services, we must face the challenges raised up by these applications on powerful machines. The key drivers towards this unexploited opportunities within a Cloud environment. paradigm for the scientific computing field include the substantial Complex scientific computing applications are being widely computing capacity, on-demand provisioning and cross-platform interoperability. To fully harness the Cloud services for scientific studied within the emerging Cloud-based services environment computing, however, we need to design an application-specific [4-12]. Traditionally, the focus is given to the parallel scientific platform to help the users efficiently migrate their applications. In HPC (high performance computing) applications [6, 12, 13], this, we propose a Cloud service platform for symbolic-numeric where substantial effort has been given to the integration of computation– SNC.
    [Show full text]
  • Multipermutations 1.1. Generating Functions
    CORE Metadata, citation and similar papers at core.ac.uk Provided by Elsevier - Publisher Connector JOURNALOF COMBINATORIALTHEORY, Series A 67, 44-71 (1994) The r- Multipermutations SEUNGKYUNG PARK Department of Mathematics, Yonsei University, Seoul 120-749, Korea Communicated by Gian-Carlo Rota Received October 1, 1992 In this paper we study permutations of the multiset {lr, 2r,...,nr}, which generalizes Gesse| and Stanley's work (J. Combin. Theory Ser. A 24 (1978), 24-33) on certain permutations on the multiset {12, 22..... n2}. Various formulas counting the permutations by inversions, descents, left-right minima, and major index are derived. © 1994 AcademicPress, Inc. 1. THE r-MULTIPERMUTATIONS 1.1. Generating Functions A multiset is defined as an ordered pair (S, f) where S is a set and f is a function from S to the set of nonnegative integers. If S = {ml ..... mr}, we write {m f(mD, .... m f(mr)r } for (S, f). Intuitively, a multiset is a set with possibly repeated elements. Let us begin by considering permutations of multisets (S, f), which are words in which each letter belongs to the set S and for each m e S the total number of appearances of m in the word is f(m). Thus 1223231 is a permutation of the multiset {12, 2 3, 32}. In this paper we consider a special set of permutations of the multiset [n](r) = {1 r, ..., nr}, which is defined as follows. DEFINITION 1.1. An r-multipermutation of the set {ml ..... ran} is a permutation al ""am of the multiset {m~ ....
    [Show full text]
  • An Introduction to Numpy and Scipy
    An introduction to Numpy and Scipy Table of contents Table of contents ............................................................................................................................ 1 Overview ......................................................................................................................................... 2 Installation ...................................................................................................................................... 2 Other resources .............................................................................................................................. 2 Importing the NumPy module ........................................................................................................ 2 Arrays .............................................................................................................................................. 3 Other ways to create arrays............................................................................................................ 7 Array mathematics .......................................................................................................................... 8 Array iteration ............................................................................................................................... 10 Basic array operations .................................................................................................................. 11 Comparison operators and value testing ....................................................................................
    [Show full text]
  • 40 Chapter 6 the BINOMIAL THEOREM in Chapter 1 We Defined
    Chapter 6 THE BINOMIAL THEOREM n In Chapter 1 we defined as the coefficient of an-rbr in the expansion of (a + b)n, and r tabulated these coefficients in the arrangement of the Pascal Triangle: n Coefficients of (a + b)n 0 1 1 1 1 2 1 2 1 3 1 3 3 1 4 1 4 6 4 1 5 1 5 10 10 5 1 6 1 6 15 20 15 6 1 ... n n We then observed that this array is bordered with 1's; that is, ' 1 and ' 1 for n = 0 n 0, 1, 2, ... We also noted that each number inside the border of 1's is the sum of the two closest numbers on the previous line. This property may be expressed in the form n n n%1 (1) % ' . r&1 r r This formula provides an efficient method of generating successive lines of the Pascal Triangle, but the method is not the best one if we want only the value of a single binomial coefficient for a 100 large n, such as . We therefore seek a more direct approach. 3 It is clear that the binomial coefficients in a diagonal adjacent to a diagonal of 1's are the 40 n numbers 1, 2, 3, ... ; that is, ' n. Now let us consider the ratios of binomial coefficients 1 to the previous ones on the same row. For n = 4, these ratios are: (2) 4/1, 6/4 = 3/2, 4/6 = 2/3, 1/4. For n = 5, they are (3) 5/1, 10/5 = 2, 10/10 = 1, 5/10 = 1/2, 1/5.
    [Show full text]
  • Q-Combinatorics
    q-combinatorics February 7, 2019 1 q-binomial coefficients n n Definition. For natural numbers n; k,the q-binomial coefficient k q (or just k if there no ambi- guity on q) is defined as the following rational function of the variable q: (qn − 1)(qn−1 − 1) ··· (q − 1) : (1.1) (qk − 1)(qk−1 − 1) ··· (q − 1) · (qn−k − 1)(qn−k−1 − 1) ··· (q − 1) For n = 0, k = 0, or n = k, we interpret the corresponding products 1, as the value of the empty product. If we exclude certain roots of unity from the domain of q, (1.1) is equal to (qn − 1)(qn−1 − 1) ··· (qn−k+1 − 1) (1.2) (qk − 1)(qk−1 − 1) ··· (q − 1) · 1 (qn−1 + ::: + q + 1) ··· (q2 + q + 1)(q + 1) · 1 = : (qk−1 + ::: + q + 1) ··· (q2 + q + 1)(q + 1) · 1(qn−k−1 + ::: + q + 1) ··· (q2 + q + 1)(q + 1) · 1 As the notation starts to be overwhelming, we introduce to q-analogue of the positive integer n, n−1 denoted by [n] or [n]q, as q + ::: + q + 1; and the q-analogue of the factorial of the positive integer n, denoted by [n]! or [n]q!, as [n]q! = [1]q · [2]q ··· [n]q. With this additional notation, we also can say n [n] ! = q ; (1.3) k q [k]q![n − k]q! when we avoid certain roots of unity with q. It is easy too see from (1.1) that n n = = 1 0 q n q and that for every 0 ≤ k ≤ n the symmetry rule n n = k q n − k q holds.
    [Show full text]
  • New Directions in Symbolic Computer Algebra 3.5 Year Doctoral Research Student Position Leading to a Phd in Maths Supervisor: Dr
    Cadabra: new directions in symbolic computer algebra 3:5 year doctoral research student position leading to a PhD in Maths supervisor: Dr. Kasper Peeters, [email protected] Project description The Cadabra software is a new approach to symbolic computer algebra. Originally developed to solve problems in high-energy particle and gravitational physics, it is now attracting increas- ing attention from other disciplines which deal with aspects of tensor field theory. The system was written from the ground up with the intention of exploring new ideas in computer alge- bra, in order to help areas of applied mathematics for which suitable tools have so far been inadequate. The system is open source, built on a C++ graph-manipulating core accessible through a Python layer in a notebook interface, and in addition makes use of other open maths libraries such as SymPy, xPerm, LiE and Maxima. More information and links to papers using the software can be found at http://cadabra.science. With increasing attention and interest from disciplines such as earth sciences, machine learning and condensed matter physics, we are now looking for an enthusiastic student who is interested in working on this highly multi-disciplinary computer algebra project. The aim is to enlarge the capabilities of the system and bring it to an ever widening user base. Your task will be to do research on new algorithms and take responsibility for concrete implemen- tations, based on the user feedback which we have collected over the last few years. There are several possibilities to collaborate with people in some of the fields listed above, either in the Department of Mathematical Sciences or outside of it.
    [Show full text]
  • The Binomial Theorem and Combinatorial Proofs Shagnik Das
    The Binomial Theorem and Combinatorial Proofs Shagnik Das Introduction As we live our lives, we are faced with innumerable decisions on a daily basis1. Can I get away with wearing these clothes again before I have to wash them? Which frozen pizza should I have for dinner tonight? What excuse should I use for skipping the gym today? While it may at times seem tiring to be faced with all these choices on a regular basis, it is this exercise of free will that separates us from the machines we live with.2 This multitude of choices, then, provides some measure of our own vitality | the more options we have, the more alive we truly are. What, then, could be more important than being able to count how many options one actually has?4 As we have already seen during our first week of lectures, one of the main protagonists in these counting problems is the binomial coefficient, whose definition is given below. n Definition 1. Given non-negative integers n and k, the binomial coefficient k denotes the number of subsets of size k of a set of n elements. Equivalently, it is the number of unordered choices of k distinct elements from a set of n elements. However, the binomial coefficient leads a double life. Not only does it have the above definition, but also the formula below, which we proved in lecture. Proposition 2. For non-negative integers n and k, n nk n(n − 1)(n − 2) ::: (n − k + 1) n! = = = : k k! k! k!(n − k)! In this note, we will prove several more facts about this most fascinating of creatures.
    [Show full text]