strings, dictionaries, and files
|
|
- Liliana Hancock
- 5 years ago
- Views:
Transcription
1 strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module filepoly 3 Real Algebraic Geometry surf to visualize algebraic curves and surfaces visualization with surfex MCS 507 Lecture 18 Mathematical, Statistical and Scientific Software Jan Verschelde, 8 October 2012 Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
2 strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module filepoly 3 Real Algebraic Geometry surf to visualize algebraic curves and surfaces visualization with surfex Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
3 data structures Python glues with strings, files, and dictionaries: String representations of objects serve well to pass data between different programs. On files we store objects permanently. A dictionary associates keys to values and scales well to organize large data sets. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
4 multivariate polynomials Our mathematical object of today is a polynomial in several variables with complex coefficients. The basic data structure is a tuple of two lists: a list of coefficients of type complex, a list of tuples, exponents are natural numbers. The monomial ( j)*x1**2*x2**4 is the kth element in the exponent list: (2, 4) and kth coefficient: ( j). Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
5 random polynomials We generate random polynomials as follows: 1 Generate a list C of random coefficients: c = cos(θ) + I sin(θ) for angles θ uniformly distributed in [0, 2π]. 2 Generate a list E of random exponents, the exponents of a monomial are stored in a tuple t: 1 for a number of variables n choose an index k {0, 1,...,n 1}, 2 do a coin flip e [0, 1]: t k = t k + e, and repeat d times for a monomial of degree d. So a polynomial p is then the tuple (C, E). Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
6 string representations Defining a string representation for (C, E): instead of tuple of lists, we see p as a polynomial, we verify (C, E) as a sympy expression with eval. For n variables, we have n symbols in the list S. p = "" for all c C and e E do t = str(c) for all k {0, 1,...,n} do if e k > 0 then t = t + * + S k if e k > 1 then t = t + ** + str(e k ) p = p + t Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
7 strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module filepoly 3 Real Algebraic Geometry surf to visualize algebraic curves and surfaces visualization with surfex Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
8 duplicate monomials If we generate many monomials of low degree, then duplicate exponents are very likely. Goal: add coefficients of monomials with same exponents. Store (C, E) into a dictionary D: D[e] = c for all pairs (c, e) with c C, e E. Every key in the dictionary is unique: if D.has_key(e), then D[e] = D[e] + c. Then p is described as D = {e : c, e E, c C}. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
9 a polynomial on file Five monomials in three unknowns: Every line has one monomial: real and complex part of the coefficient, followed by n natural numbers. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
10 files in Python Opening and closing files: file = open(name, w ) for writing, file = open(name, r ) for reading. file.close() sends buffer to file when w. Writing and reading lines to file: s = str(data); file.write(s + \n ) line = file.readline() L = line.split( ) The result of line.split( ) is a list L of items which are separated by spaces in the string line. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
11 split and join To convert lines separated by spaces to a comma separated value (csv) file, we convert lines with split and join: >>> line = " " >>> L = line.split( ) >>> L [ , ,, 3, 0, 1 ] >>> s =,.join(l) >>> s ,0.0841,,3,0,1 >>> line.split() [ , , 3, 0, 1 ] Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
12 two Python modules We develop the code in two files: 1 A module to generate random polynomials: generate coefficients C and exponents E, turn (C, E) into string representation and then into sympy expression. 2 A module to make a dictionary representation and write/read a random polynomial to/from file. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
13 strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module filepoly 3 Real Algebraic Geometry surf to visualize algebraic curves and surfaces visualization with surfex Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
14 random coefficients def random_coefficient(): Returns a random complex coefficient, uniformly distributed on the unit circle. from math import cos, sin, pi from random import uniform u = uniform(0,2*pi) return complex(cos(u),sin(u)) Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
15 random exponents def random_exponent(n,d): Returns an n-tuple obtained after d coin flips. from random import randint L = [0 for i in xrange(n)] for i in xrange(d): L[randint(0,n-1)] += randint(0,1) return tuple(l) Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
16 a random polynomial def randpoly(n,d,m): A random polynomial in n variables of degree at most d and m terms is returns as a tuple of two lists: coefficients and exponents. C = [random_coefficient() for i in xrange(m)] E = [random_exponent(n,d) for i in xrange(m)] return (C,E) Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
17 the main function def main(): Prompts the user for number of variables, largest degree, number of monomials, and then generates a random polynomial. n = input( give number of variables : ) d = input( give the largest degree : ) m = input( give number of monomials : ) (C,E) = randpoly(n,d,m) print coefficients & exponents :, (C,E) S = [ x + str(i) for i in xrange(1,n+1)] strp = strpoly(s,c,e) print string representation :, strp Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
18 monomials as strings def strmon(s,c,e): Returns a string representation of a monomial using the list of symbols in S, the coefficient c, and the exponents e. r = ( + + str(c)) for i in xrange(len(e)): if e[i] > 0: r += ( * + S[i]) if e[i] > 1: r += ( ** + str(e[i])) return r Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
19 polynomials as strings def strpoly(s,c,e): Returns a string representation of a polynomial in the variables in S with coefficients in C and exponents in E. p = "" for i in xrange(len(c)): p += strmon(s,c[i],e[i]) return p Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
20 sympy expressions import sympy as sp def sympypoly(s,c,e): Turns the polynomial with coefficients in C, exponents in E and symbols in S into a sympy expression. strp = strpoly(s,c,e) sp.var(s) return eval(strp) Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
21 strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module filepoly 3 Real Algebraic Geometry surf to visualize algebraic curves and surfaces visualization with surfex Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
22 polynomials in sympy >>> import sympy as sp >>> x,y = sp.var( x,y ) >>> s = 2*x + y - 8 >>> p = eval(s) >>> p 2*x + y - 8 >>> type(p) <class sympy.core.add.add > >>> q = sp.poly(p) >>> type(q) <class sympy.polys.polytools.poly > >>> q Poly(2*x + y - 8, x, y, domain= ZZ ) >>> q.terms() [((1, 0), 2), ((0, 1), 1), ((0, 0), -8)] Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
23 the main function import randpoly as rp import sympy as sp def main(): Tests manipulation of a random polynomial as a sympy polynomial. (C,E) = rp.randpoly(3,7,5) S = [ x, y, z ] p = rp.sympypoly(s,c,e) q = sp.poly(p) print a random polynomial :, q Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
24 the I in sympy $ python filepoly.py a random polynomial : Poly( *x**2*z**2*I *x**2*z** *x*y**2*z*I *x*y**2*z *x*y*z*I *x*y*z *y*z**3*I *y*z** *y*z**2*I *y*z**2, x, y, z, I, domain= RR ) Problem: I is another variable in sympy, exponent tuples are 4-tuples in the example above. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
25 sympy Poly dict def dictpoly(p): Returns a dictionary representation of the polynomial p. The imaginary unit I is the last power of every exponent. R = {} T = p.terms() for t in T: (e,c) = t a = e[0:-1] Ideg = e[len(e)-1] cf = (c if Ideg == 0 else complex(0,c)) if not R.has_key(a): R[a] = cf else: R[a] += cf return R Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
26 tableau format def strexp(e): Returns a string representation of the exponent in the tuple e. s = "" for d in e: s += ( + str(d)) return s def dictprint(n,d): Prints the tableau format of the dictionary D, n = #variables. print len(d), n for k in D.keys(): c = D[k] print sp.re(c), sp.im(c), strexp(k) Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
27 writing to file def dictwrite(name,n,d): Writes the dictionary D in tableau format to file with the given name. file = open(name, w ) s = str(len(d)) + + str(n) + \n file.write(s) for k in D.keys(): c = D[k] s = str(sp.re(c)) s += + str(sp.im(c)) s += + strexp(k) + \n file.write(s) file.close() Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
28 extracting monomials def cffexp(s): Returns the tuple of coefficient and exponent stored in s. L = s.split( ) c = complex(eval(l[0]),eval(l[1])) e = [] for k in xrange(2,len(l)): if L[k]!= : e.append(eval(l[k])) return (c, tuple(e)) Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
29 reading from file def dictread(name): Opens the file with name, reads it and returns the dictionary representation of the polynomial stored in the file. file = open(name, r ) line = file.readline() L = line.split( ); n = eval(l[1]) s = reading + L[0] + monomials s += in + str(n) + variables... print s; D = {} while True: s = file.readline() if s == : break (c,e) = cffexp(s); D[e] = c file.close() return D Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
30 strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module filepoly 3 Real Algebraic Geometry surf to visualize algebraic curves and surfaces visualization with surfex Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
31 surf surf is a tool to visualize algebraic curves and surfaces. Free software distributed under the GNU General Public License with homepage at Developed since 1996 (version dates from 2006), the authors are Stephan Endrass, Hans Huelf, Ruediger Oertel, Ralf Schmitt, Kai Schneider and Johannes Beigel. It aims to visualize real algebraic geometry: 1 plane curves defined by one polynomial in two variables 2 space curves defined by two polynomials in three variables 3 surface defined by one polynomial in three variables with stable enough algorithms to handle curve/surface singularities (points with multiplicities), although it is best if the equations are reduced (free of multiple components). Real root finding is at the heart of the algorithms in surf. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
32 27 lines on a cubic surface Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
33 using surf The distribution comes with many examples. The picture on the previous slide is the surface defined in the script clebsch27lines.pic. Scripts have the suffix.pic and can be loaded into surf or surf can be started with the name of the script at the command line. $ surf clebsch27lines.pic Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
34 strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module filepoly 3 Real Algebraic Geometry surf to visualize algebraic curves and surfaces visualization with surfex Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
35 surfex surfex is distributed under the GNU General Public License. surfex is written by by Oliver Labs and Stephan Holzer It needs surf, Javaview, and convert (for the animations). The PhD thesis of Oliver Labs (Mainz, 2005) on Hypersurfaces with Many Singularities. History Constructions Algorithms Visualization provides a good background for the software. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
36 ray tracing Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
37 the raytraced picture Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
38 Summary + Exercises Strings, dictionaries, and files help glue programs. Exercises: 1 Suppose our multivariate polynomials would be products of linear equations. Describe how you would change the data structures. Explain why expanding the polynomials with sympy is a very bad idea. 2 Change the module randpoly so that dense polynomials are generated. A polynomial of degree d is dense if all monomials of degree d appear with nonzero coefficient. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
39 homework & midterm The fourth homework is due on Friday 19 October, 10AM: exercises 3 and 6 of Lecture 13; exercises 2 and 4 of Lecture 14; exercises 1 and 3 of Lecture 15; exercises 2 and 5 of Lecture 16; exercises 3 and 4 of Lecture 17. Friday 12 October is our midterm exam, which could be either or An in-class conventional exam, open book and notes, but without computer; A take-home exam due on Monday 15 October at 10AM which must be solved individually, but will need the use of software. Scientific Software (MCS 507) Strings, Dictionaries, and Files 8 Oct / 39
strings, dictionaries, and files
strings, dictionaries, and 1 2 MCS 507 Lecture 18 Mathematical, Statistical and Scientific Software Jan Verschelde, 3 October 2011 strings, dictionaries, and 1 2 data structures Python glues with strings,,
More informationOutline. policies for the second part. with answers. MCS 260 Lecture 10.5 Introduction to Computer Science Jan Verschelde, 9 July 2014
Outline 1 midterm exam on Friday 11 July 2014 policies for the second part 2 some review questions with answers MCS 260 Lecture 10.5 Introduction to Computer Science Jan Verschelde, 9 July 2014 Intro to
More informationSingular in Sage. MCS 507 Lecture 40 Mathematical, Statistical and Scientific Software Jan Verschelde, 23 November 2011
bases Singular in Sage 1 2 bases MCS 507 Lecture 40 Mathematical, Statistical Scientific Software Jan Verschelde, 23 November 2011 Singular in Sage bases 1 2 bases bases Singular Singular is a computer
More informationWhat is a constant? A Constant is a number representing a quantity or value that does not change.
Worksheet -: Algebraic Expressions What is a constant? A Constant is a number representing a quantity or value that does not change. What is a variable? A variable is a letter or symbol representing a
More informationAlgebraic Expressions and Equations: Classification of Expressions and Equations *
OpenStax-CNX module: m21848 1 Algebraic Expressions and Equations: Classification of Expressions and Equations * Wade Ellis Denny Burzynski This work is produced by OpenStax-CNX and licensed under the
More informationMATHEMATICS 9 CHAPTER 7 MILLER HIGH SCHOOL MATHEMATICS DEPARTMENT NAME: DATE: BLOCK: TEACHER: Miller High School Mathematics Page 1
MATHEMATICS 9 CHAPTER 7 NAME: DATE: BLOCK: TEACHER: MILLER HIGH SCHOOL MATHEMATICS DEPARTMENT Miller High School Mathematics Page 1 Day 1: Creating expressions with algebra tiles 1. Determine the multiplication
More information27 Wyner Math 2 Spring 2019
27 Wyner Math 2 Spring 2019 CHAPTER SIX: POLYNOMIALS Review January 25 Test February 8 Thorough understanding and fluency of the concepts and methods in this chapter is a cornerstone to success in the
More informationRational Univariate Representation
Rational Univariate Representation 1 Stickelberger s Theorem a rational univariate representation (RUR) 2 The Elbow Manipulator a spatial robot arm with three links 3 Application of the Newton Identities
More informationOutline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014
Outline 1 midterm exam on Friday 11 July 2014 policies for the first part 2 questions with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014 Intro
More informationRewriting Polynomials
Rewriting Polynomials 1 Roots and Eigenvalues the companion matrix of a polynomial the ideal membership problem 2 Automatic Geometric Theorem Proving the circle theorem of Appolonius 3 The Division Algorithm
More informationCSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer
CSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Monday October 3: Discussion Assignment
More informationLESSON 6.2 POLYNOMIAL OPERATIONS I
LESSON 6. POLYNOMIAL OPERATIONS I LESSON 6. POLYNOMIALS OPERATIONS I 63 OVERVIEW Here's what you'll learn in this lesson: Adding and Subtracting a. Definition of polynomial, term, and coefficient b. Evaluating
More informationAbstract Data Type (ADT) maintains a set of items, each with a key, subject to
Lecture Overview Dictionaries and Python Motivation Hash functions Chaining Simple uniform hashing Good hash functions Readings CLRS Chapter,, 3 Dictionary Problem Abstract Data Type (ADT) maintains a
More informationExtremal Behaviour in Sectional Matrices
Extremal Behaviour in Sectional Matrices Elisa Palezzato 1 joint work with Anna Maria Bigatti 1 and Michele Torielli 2 1 University of Genova, Italy 2 Hokkaido University, Japan arxiv:1702.03292 Ph.D.
More information5.1 Monomials. Algebra 2
. Monomials Algebra Goal : A..: Add, subtract, multiply, and simplify polynomials and rational expressions (e.g., multiply (x ) ( x + ); simplify 9x x. x Goal : Write numbers in scientific notation. Scientific
More informationProblem 1. Answer: 95
Talent Search Test Solutions January 2014 Problem 1. The unit squares in a x grid are colored blue and gray at random, and each color is equally likely. What is the probability that a 2 x 2 square will
More informationComputing the coefficients for the power series solution of the Lane- Emden equation with the Python
Computing the coefficients for the power series solution of the Lane- Emden equation with the Python library SymPy 1/25/15 Klaus Rohe, D-85625 Glonn, email: klaus-rohe@t-online.de Abstract It is shown
More informationHilbert Polynomials. dimension and counting monomials. a Gröbner basis for I reduces to in > (I)
Hilbert Polynomials 1 Monomial Ideals dimension and counting monomials 2 The Dimension of a Variety a Gröbner basis for I reduces to in > (I) 3 The Complexity of Gröbner Bases a bound on the degrees of
More informationCubic Splines; Bézier Curves
Cubic Splines; Bézier Curves 1 Cubic Splines piecewise approximation with cubic polynomials conditions on the coefficients of the splines 2 Bézier Curves computer-aided design and manufacturing MCS 471
More informationMath 4370 Exam 1. Handed out March 9th 2010 Due March 18th 2010
Math 4370 Exam 1 Handed out March 9th 2010 Due March 18th 2010 Problem 1. Recall from problem 1.4.6.e in the book, that a generating set {f 1,..., f s } of I is minimal if I is not the ideal generated
More informationLecture for Week 2 (Secs. 1.3 and ) Functions and Limits
Lecture for Week 2 (Secs. 1.3 and 2.2 2.3) Functions and Limits 1 First let s review what a function is. (See Sec. 1 of Review and Preview.) The best way to think of a function is as an imaginary machine,
More informationHow could you express algebraically, the total amount of money he earned for the three days?
UNIT 4 POLYNOMIALS Math 11 Unit 4 Introduction p. 1 of 1 A. Algebraic Skills Unit 4 Polynomials Introduction Problem: Derrek has a part time job changing tires. He gets paid the same amount for each tire
More informationAlgebraic Expressions
Algebraic Expressions 1. Expressions are formed from variables and constants. 2. Terms are added to form expressions. Terms themselves are formed as product of factors. 3. Expressions that contain exactly
More informationApplied Linear Algebra in Geoscience Using MATLAB
Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in
More informationUnderstand the vocabulary used to describe polynomials Add polynomials Subtract polynomials Graph equations defined by polynomials of degree 2
Section 5.1: ADDING AND SUBTRACTING POLYNOMIALS When you are done with your homework you should be able to Understand the vocabulary used to describe polynomials Add polynomials Subtract polynomials Graph
More informationSept , 17, 23, 29, 37, 41, 45, 47, , 5, 13, 17, 19, 29, 33. Exam Sept 26. Covers Sept 30-Oct 4.
MATH 23, FALL 2013 Text: Calculus, Early Transcendentals or Multivariable Calculus, 7th edition, Stewart, Brooks/Cole. We will cover chapters 12 through 16, so the multivariable volume will be fine. WebAssign
More informationMath 21a Practice Final Exam (Fall 2000) 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11) 12) : Total
Math 21a Practice Final Exam (Fall 2000) 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11) 12) : Total Name: Section TF: Allcock Chen Karigiannis Knill Liu Rasmussen Rogers Taubes Winter Winters Instructions: Print your
More informationIf the pull is downward (Fig. 1), we want C to point into the page. If the pull is upward (Fig. 2), we want C to point out of the page.
11.5 Cross Product Contemporary Calculus 1 11.5 CROSS PRODUCT This section is the final one about the arithmetic of vectors, and it introduces a second type of vector vector multiplication called the cross
More informationDimensions = xyz dv. xyz dv as an iterated integral in rectangular coordinates.
Math Show Your Work! Page of 8. () A rectangular box is to hold 6 cubic meters. The material used for the top and bottom of the box is twice as expensive per square meter than the material used for the
More informationRoot Finding with Newton s Method
Root Finding with Newton s Method 1 Newton s Method derivation of the method an implementation with SymPy and Julia 2 Convergence of Newton s Method linear and quadratic convergence geometric convergence
More informationcomputing an irreducible decomposition of A B looking for solutions where the Jacobian drops rank
Diagonal Homotopies 1 Intersecting Solution Sets computing an irreducible decomposition of A B 2 The Singular Locus looking for solutions where the Jacobian drops rank 3 Solving Systems restricted to an
More informationAnnouncements August 31
Announcements August 31 Homeworks 1.1 and 1.2 are due Friday. The first quiz is on Friday, during recitation. Quizzes mostly test your understanding of the homework. There will generally be a quiz every
More informationIntroduction to Gröbner Bases for Geometric Modeling. Geometric & Solid Modeling 1989 Christoph M. Hoffmann
Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann Algebraic Geometry Branch of mathematics. Express geometric facts in algebraic terms in order
More informationMaster of Intelligent Systems - French-Czech Double Diploma. Hough transform
Hough transform I- Introduction The Hough transform is used to isolate features of a particular shape within an image. Because it requires that the desired features be specified in some parametric form,
More informationSparse Polynomial Multiplication and Division in Maple 14
Sparse Polynomial Multiplication and Division in Maple 4 Michael Monagan and Roman Pearce Department of Mathematics, Simon Fraser University Burnaby B.C. V5A S6, Canada October 5, 9 Abstract We report
More informationMath Fall 05 - Lectures notes # 1 - Aug 29 (Monday)
Math 110 - Fall 05 - Lectures notes # 1 - Aug 29 (Monday) Name, class, URL (www.cs.berkeley.edu/~demmel/ma110) on board See Barbara Peavy in 967 Evans Hall for all enrollment issues. All course material
More informationRemarks on the Cayley Representation of Orthogonal Matrices and on Perturbing the Diagonal of a Matrix to Make it Invertible
Remarks on the Cayley Representation of Orthogonal Matrices and on Perturbing the Diagonal of a Matrix to Make it Invertible Jean Gallier Department of Computer and Information Science University of Pennsylvania
More informationAnnouncements September 19
Announcements September 19 Please complete the mid-semester CIOS survey this week The first midterm will take place during recitation a week from Friday, September 3 It covers Chapter 1, sections 1 5 and
More informationAnnouncements Wednesday, November 7
Announcements Wednesday, November 7 The third midterm is on Friday, November 16 That is one week from this Friday The exam covers 45, 51, 52 53, 61, 62, 64, 65 (through today s material) WeBWorK 61, 62
More informationAnnouncements Monday, November 13
Announcements Monday, November 13 The third midterm is on this Friday, November 17 The exam covers 31, 32, 51, 52, 53, and 55 About half the problems will be conceptual, and the other half computational
More informationECS130 Scientific Computing. Lecture 1: Introduction. Monday, January 7, 10:00 10:50 am
ECS130 Scientific Computing Lecture 1: Introduction Monday, January 7, 10:00 10:50 am About Course: ECS130 Scientific Computing Professor: Zhaojun Bai Webpage: http://web.cs.ucdavis.edu/~bai/ecs130/ Today
More informationComplex Numbers. Visualize complex functions to estimate their zeros and poles.
Lab 1 Complex Numbers Lab Objective: Visualize complex functions to estimate their zeros and poles. Polar Representation of Complex Numbers Any complex number z = x + iy can be written in polar coordinates
More informationMAT01A1: Complex Numbers (Appendix H)
MAT01A1: Complex Numbers (Appendix H) Dr Craig 14 February 2018 Announcements: e-quiz 1 is live. Deadline is Wed 21 Feb at 23h59. e-quiz 2 (App. A, D, E, H) opens tonight at 19h00. Deadline is Thu 22 Feb
More informationPrologue: General Remarks on Computer Algebra Systems
Prologue: General Remarks on Computer Algebra Systems Computer algebra algorithms allow us to compute in, and with, a multitude of mathematical structures. Accordingly, there is a large number of computer
More informationSolution to Homework 8, Math 2568
Solution to Homework 8, Math 568 S 5.4: No. 0. Use property of heorem 5 to test for linear independence in P 3 for the following set of cubic polynomials S = { x 3 x, x x, x, x 3 }. Solution: If we use
More informationSolving Polynomial Systems in the Cloud with Polynomial Homotopy Continuation
Solving Polynomial Systems in the Cloud with Polynomial Homotopy Continuation Jan Verschelde joint with Nathan Bliss, Jeff Sommars, and Xiangcheng Yu University of Illinois at Chicago Department of Mathematics,
More informationMCS 260 Exam 2 13 November In order to get full credit, you need to show your work.
MCS 260 Exam 2 13 November 2015 Name: Do not start until instructed to do so. In order to get full credit, you need to show your work. You have 50 minutes to complete the exam. Good Luck! Problem 1 /15
More informationChapter 7: Exponents
Chapter 7: Exponents Algebra 1 Chapter 7 Notes Name: Algebra Homework: Chapter 7 (Homework is listed by date assigned; homework is due the following class period) HW# Date In-Class Homework Section 7.:
More informationCOMP 175 COMPUTER GRAPHICS. Lecture 04: Transform 1. COMP 175: Computer Graphics February 9, Erik Anderson 04 Transform 1
Lecture 04: Transform COMP 75: Computer Graphics February 9, 206 /59 Admin Sign up via email/piazza for your in-person grading Anderson@cs.tufts.edu 2/59 Geometric Transform Apply transforms to a hierarchy
More informationTropical Algebraic Geometry
Tropical Algebraic Geometry 1 Amoebas an asymptotic view on varieties tropicalization of a polynomial 2 The Max-Plus Algebra at Work making time tables for a railway network 3 Polyhedral Methods for Algebraic
More informationUnit 3 Factors & Products
1 Unit 3 Factors & Products General Outcome: Develop algebraic reasoning and number sense. Specific Outcomes: 3.1 Demonstrate an understanding of factors of whole number by determining the: o prime factors
More informationChapter 7: Exponents
Chapter : Exponents Algebra Chapter Notes Name: Algebra Homework: Chapter (Homework is listed by date assigned; homework is due the following class period) HW# Date In-Class Homework M / Review of Sections.-.
More informationP.1: Algebraic Expressions, Mathematical Models, and Real Numbers
Chapter P Prerequisites: Fundamental Concepts of Algebra Pre-calculus notes Date: P.1: Algebraic Expressions, Mathematical Models, and Real Numbers Algebraic expression: a combination of variables and
More informationCOS 341: Discrete Mathematics
COS 341: Discrete Mathematics Midterm Exam Fall 2006 Print your name General directions: This exam is due on Monday, November 13 at 4:30pm. Late exams will not be accepted. Exams must be submitted in hard
More informationOrdinary Differential Equations
Ordinary Differential Equations 1 2 3 MCS 507 Lecture 30 Mathematical, Statistical and Scientific Software Jan Verschelde, 31 October 2011 Ordinary Differential Equations 1 2 3 a simple pendulum Imagine
More informationHomework 1/Solutions. Graded Exercises
MTH 310-3 Abstract Algebra I and Number Theory S18 Homework 1/Solutions Graded Exercises Exercise 1. Below are parts of the addition table and parts of the multiplication table of a ring. Complete both
More informationCS412: Introduction to Numerical Methods
CS412: Introduction to Numerical Methods MIDTERM #1 2:30PM - 3:45PM, Tuesday, 03/10/2015 Instructions: This exam is a closed book and closed notes exam, i.e., you are not allowed to consult any textbook,
More informationMath 0312 EXAM 2 Review Questions
Name Decide whether the ordered pair is a solution of the given system. 1. 4x + y = 2 2x + 4y = -20 ; (2, -6) Solve the system by graphing. 2. x - y = 6 x + y = 16 Solve the system by substitution. If
More informationI have read and understand all of the instructions below, and I will obey the University Code on Academic Integrity.
Midterm Exam CS 341-451: Foundations of Computer Science II Fall 2016, elearning section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all
More informationMATH 2554 (Calculus I)
MATH 2554 (Calculus I) Dr. Ashley K. University of Arkansas February 21, 2015 Table of Contents Week 6 1 Week 6: 16-20 February 3.5 Derivatives as Rates of Change 3.6 The Chain Rule 3.7 Implicit Differentiation
More informationElementary Algebra Basic Operations With Polynomials Worksheet
Elementary Algebra Basic Operations With Polynomials Worksheet Subjects include Algebra, Geometry, Calculus, Pre-Algebra, Basic Math, 100% free calculus worksheet, students must find Taylor and Maclaurin
More informationAlgebra. Practice Pack
Algebra Practice Pack WALCH PUBLISHING Table of Contents Unit 1: Algebra Basics Practice 1 What Are Negative and Positive Numbers?... 1 Practice 2 Larger and Smaller Numbers................ 2 Practice
More informationGröbner Bases. eliminating the leading term Buchberger s criterion and algorithm. construct wavelet filters
Gröbner Bases 1 S-polynomials eliminating the leading term Buchberger s criterion and algorithm 2 Wavelet Design construct wavelet filters 3 Proof of the Buchberger Criterion two lemmas proof of the Buchberger
More informationECS120 Fall Discussion Notes. October 25, The midterm is on Thursday, November 2nd during class. (That is next week!)
ECS120 Fall 2006 Discussion Notes October 25, 2006 Announcements The midterm is on Thursday, November 2nd during class. (That is next week!) Homework 4 Quick Hints Problem 1 Prove that the following languages
More informationTypes of Real Integrals
Math B: Complex Variables Types of Real Integrals p(x) I. Integrals of the form P.V. dx where p(x) and q(x) are polynomials and q(x) q(x) has no eros (for < x < ) and evaluate its integral along the fol-
More informationCombining Like Terms in Polynomials
Section 1 6: Combining Like Terms in Polynomials Polynomials A polynomial is an expression that has two or more terms each separated by a + or sign. If the expression has only one term it is called a monomial.
More information6. 2 Multiplying Polynomials
Name Class Date 6. 2 Multiplying Polynomials Essential Question: How do you multiply polynomials, and what type of expression is the result? Explore Analyzing a Visual Model for Polynomial Multiplication
More informationPolynomial comes from poly- (meaning "many") and -nomial (in this case meaning "term")... so it says "many terms
Polynomials Polynomial comes from poly- (meaning "many") and -nomial (in this case meaning "term")... so it says "many terms Polynomials A polynomial looks like this: Term A number, a variable, or the
More informationAnnouncements Monday, November 13
Announcements Monday, November 13 The third midterm is on this Friday, November 17. The exam covers 3.1, 3.2, 5.1, 5.2, 5.3, and 5.5. About half the problems will be conceptual, and the other half computational.
More informationSection 5.2 Polynomials, Sums, and Differences
Department of Mathematics Grossmont College October 2, 2012 4.1 Systems of Linear Equations in Two Variables Learning Objectives: Give the degree of a polynomial Add and subract polynomials evaluate a
More information1.3 Distance and Midpoint Formulas
Graduate Teacher Department of Mathematics San Diego State University Dynamical Systems Program August 29, 2011 In mathematics, a theorem is a statement that has been proven on the basis of previously
More informationCS 221 Lecture 9. Tuesday, 1 November 2011
CS 221 Lecture 9 Tuesday, 1 November 2011 Some slides in this lecture are from the publisher s slides for Engineering Computation: An Introduction Using MATLAB and Excel 2009 McGraw-Hill Today s Agenda
More informationNotater: INF3331. Veronika Heimsbakk December 4, Introduction 3
Notater: INF3331 Veronika Heimsbakk veronahe@student.matnat.uio.no December 4, 2013 Contents 1 Introduction 3 2 Bash 3 2.1 Variables.............................. 3 2.2 Loops...............................
More informationExam: 4 hour multiple choice. Agenda. Course Introduction to Statistics. Lecture 1: Introduction to Statistics. Per Bruun Brockhoff
Course 02402 Lecture 1: Per Bruun Brockhoff DTU Informatics Building 305 - room 110 Danish Technical University 2800 Lyngby Denmark e-mail: pbb@imm.dtu.dk Agenda 1 2 3 4 Per Bruun Brockhoff (pbb@imm.dtu.dk),
More informationScripting Languages Fast development, extensible programs
Scripting Languages Fast development, extensible programs Devert Alexandre School of Software Engineering of USTC November 30, 2012 Slide 1/60 Table of Contents 1 Introduction 2 Dynamic languages A Python
More informationCSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer
CSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 Announcements Project 1 due next Friday at
More informationTropical Algebraic Geometry 3
Tropical Algebraic Geometry 3 1 Monomial Maps solutions of binomial systems an illustrative example 2 The Balancing Condition balancing a polyhedral fan the structure theorem 3 The Fundamental Theorem
More informationShenandoah University. (PowerPoint) LESSON PLAN *
Shenandoah University (PowerPoint) LESSON PLAN * NAME DATE 10/28/04 TIME REQUIRED 90 minutes SUBJECT Algebra I GRADE 6-9 OBJECTIVES AND PURPOSE (for each objective, show connection to SOL for your subject
More informationNumerical Linear Algebra
Numerical Analysis, Lund University, 2018 96 Numerical Linear Algebra Unit 8: Condition of a Problem Numerical Analysis, Lund University Claus Führer and Philipp Birken Numerical Analysis, Lund University,
More informationProperties of Linear Transformations from R n to R m
Properties of Linear Transformations from R n to R m MATH 322, Linear Algebra I J. Robert Buchanan Department of Mathematics Spring 2015 Topic Overview Relationship between the properties of a matrix transformation
More informationAdding and Subtracting Polynomials Polynomials in the Sun
Adding and Subtracting Polynomials SUGGESTED LEARNING STRATEGIES: Shared Reading, Questioning the Text, Create Representations, Vocabulary Organizer, Note Taking A solar panel is a device that collects
More informationPre-Algebra Lesson Plans
EMS 8 th Grade Math Department Math Florida Standard(s): Learning Goal: Assessments Algebra Preview: Polynomials May 2 nd to June 3 rd, 2016 MAFS.912.A-SSE.1.1b (DOK 2) Interpret expressions that represent
More information2. Algebraic functions, power functions, exponential functions, trig functions
Math, Prep: Familiar Functions (.,.,.5, Appendix D) Name: Names of collaborators: Main Points to Review:. Functions, models, graphs, tables, domain and range. Algebraic functions, power functions, exponential
More informationLiteral Equations Manipulating Variables and Constants
Literal Equations Manipulating Variables and Constants A literal equation is one which is expressed in terms of variable symbols (such as d, v, and a) and constants (such as R, g, and π). Often in science
More informationGRADUATE RECORD EXAMINATIONS. Math Review. Chapter 2: Algebra
GRADUATE RECORD EXAMINATIONS Math Review Chapter 2: Algebra Copyright 2010 by Educational Testing Service. All rights reserved. ETS, the ETS logo, GRADUATE RECORD EXAMINATIONS, and GRE are registered trademarks
More informationAlgebra 2 CP Semester 1 PRACTICE Exam
Algebra 2 CP Semester 1 PRACTICE Exam NAME DATE HR You may use a calculator. Please show all work directly on this test. You may write on the test. GOOD LUCK! THIS IS JUST PRACTICE GIVE YOURSELF 45 MINUTES
More informationEvaluate and simplify.
Math 52 Midterm Practice Exam The following exercises are taken from the book s end-of-chapter Practice Tests. The exercise numbers here correspond to the numbers in those tests. The answers to these exercises
More informationAN INTRODUCTION TO AFFINE TORIC VARIETIES: EMBEDDINGS AND IDEALS
AN INTRODUCTION TO AFFINE TORIC VARIETIES: EMBEDDINGS AND IDEALS JESSICA SIDMAN. Affine toric varieties: from lattice points to monomial mappings In this chapter we introduce toric varieties embedded in
More informationAnnouncements Wednesday, September 27
Announcements Wednesday, September 27 The midterm will be returned in recitation on Friday. You can pick it up from me in office hours before then. Keep tabs on your grades on Canvas. WeBWorK 1.7 is due
More informationLesson 2: Introduction to Variables
Lesson 2: Introduction to Variables Topics and Objectives: Evaluating Algebraic Expressions Some Vocabulary o Variable o Term o Coefficient o Constant o Factor Like Terms o Identifying Like Terms o Combining
More informationAnnouncements Wednesday, November 7
Announcements Wednesday, November 7 The third midterm is on Friday, November 6 That is one week from this Friday The exam covers 45, 5, 52 53, 6, 62, 64, 65 (through today s material) WeBWorK 6, 62 are
More informationISSUED BY KENDRIYA VIDYALAYA - DOWNLOADED FROM Chapter - 2. (Polynomials)
Chapter - 2 (Polynomials) Key Concepts Constants : A symbol having a fixed numerical value is called a constant. Example : 7, 3, -2, 3/7, etc. are all constants. Variables : A symbol which may be assigned
More informationNumerical Irreducible Decomposition
Numerical Irreducible Decomposition Jan Verschelde Department of Math, Stat & CS University of Illinois at Chicago Chicago, IL 60607-7045, USA e-mail: jan@math.uic.edu web: www.math.uic.edu/ jan CIMPA
More informationSolutions for Problem Set #4 due October 10, 2003 Dustin Cartwright
Solutions for Problem Set #4 due October 1, 3 Dustin Cartwright (B&N 4.3) Evaluate C f where f(z) 1/z as in Example, and C is given by z(t) sin t + i cos t, t π. Why is the result different from that of
More informationMCS 563 Spring 2014 Analytic Symbolic Computation Monday 27 January. Gröbner bases
Gröbner bases In this lecture we introduce Buchberger s algorithm to compute a Gröbner basis for an ideal, following [2]. We sketch an application in filter design. Showing the termination of Buchberger
More informationReal monoid surfaces
Real monoid surfaces Pål H. Johansen, Magnus Løberg, Ragni Piene Centre of Mathematics for Applications, University of Oslo, Norway Non-linear Computational Geometry IMA, May 31, 2007 Outline Introduction
More informationHomework 5: Sampling and Geometry
Homework 5: Sampling and Geometry Introduction to Computer Graphics and Imaging (Summer 2012), Stanford University Due Monday, August 6, 11:59pm You ll notice that this problem set is a few more pages
More informationLECTURE 5, FRIDAY
LECTURE 5, FRIDAY 20.02.04 FRANZ LEMMERMEYER Before we start with the arithmetic of elliptic curves, let us talk a little bit about multiplicities, tangents, and singular points. 1. Tangents How do we
More information4 Hilbert s Basis Theorem and Gröbner basis
4 Hilbert s Basis Theorem and Gröbner basis We define Gröbner bases of ideals in multivariate polynomial rings and see how they work in tandem with the division algorithm. We look again at the standard
More informationESCI 386 Scientific Programming, Analysis and Visualization with Python. Lesson 18 - Linear Algebra
ESCI 386 Scientific Programming, Analysis and Visualization with Python Lesson 18 - Linear Algebra 1 Matrix Operations In many instances, numpy arrays can be thought of as matrices. In the next slides
More information