1 Background: Balancing Chemical Reactions

Size: px
Start display at page:

Download "1 Background: Balancing Chemical Reactions"

Transcription

1 MSE 35 Balancing Chemical Reactions Instructor: R.G. Erdmann In this project, worth -2 points, you will write software to automatically balance chemical reactions. Background: Balancing Chemical Reactions. Balancing a Single Reaction The basic requirement in writing a balanced chemical reaction is that the total number of elements of each element is conserved (and, for electrochemical reactions, that the total charge is conserved). Thus, the basic problem in balancing a chemical reaction is finding stoichiometric coefficients on the reacting species that satisfy these constraints. For example, consider the problem of writing a balanced chemical reaction involving the species H 2 O, H 2, and O 2 : xh 2 + yo 2 + zh 2 O =, In this convention, in which all species have been written on the same side of the equal sign, positive stoichiometric coefficients will be taken to be products, while negative coefficients represent reactants. It it seen that in this example there are three unknowns, but only two conservation equations can be written since there are only two elements present. Thus, the solution to this system is only specified to within a multiplicative constant. This is because any balanced chemical reaction is still balanced if each of the stoichiometric coefficients is multiplied by a common non-zero factor. Thus, to obtain a unique solution, one of the stoichiometric coefficients must be specified. In the example above, specifying that z = results in two equations for the two unknowns x, and y: 2x + y = 2 (conservation of H), () x + 2y = (conservation of O), (2) for which the solution is x = and y = /2. The negative values for x and y indicate that they are reactants while the chosen value of z = implies that it is a product. Thus, we have H O 2 = H 2 O as the final balanced reaction. To further understand the structure of the problem, we write () in matrix form: ( ) ( ) ( ) 2 x 2 =. 2 y It can be seen that the first column of the matrix, ( 2 ), corresponds to the number of atoms of H and O in the first chemical species, H 2. The second column of the matrix, ( 2 ), corresponds to the number of atoms of H and O in the second chemical species, O 2. Finally, the righthand side of (3), ( ) 2, corresponds to the negative of the number of atoms of H and O in the

2 specie for which we specified a stoichiometric coefficient of unity, H 2 O. Thus, in the general case, a chemical reaction can be written involving n species and n elements by specifying a value for one of the n stoichiometric coefficients and writing n conservation equations for the remaining n unspecified coefficients. The equations can be easily assembled in matrix form by stacking column vectors with entries corresponding to the numbers of elements in each species, with the right-hand side corresponding to the negative of the column vector for the species with a specified stoichiometric coefficient of unity. To illustrate further, consider the problem of writing a balanced chemical reaction among the following species: CO, H 2 O, CO 2, and CH 4. There are four species involving three elements, so a single chemical reaction can be written involving these species: xco + yh 2 O + zco 2 + wch 4 =. Ordering the elements alphabetically as C, H, O, then we have the following column vectors for each of the species: CO : H 2 O : 2 CO 2 : CH 4 : 4. 2 If we specify w = then the system of equations is easily assembled as x 2 y = 4, 2 z or, equivalently, Solving this system, we obtain x = 4, y = 2, and z = 3. Thus, Ax = b. (3) 4 CO + 2 H 2 O = CH CO 2..2 Writing Systems of Chemical Reactions In the general case in which the number of unique species is s and the number of elements is e, we can write a system of r = s e independent chemical reactions among the species. To see how this is done, consider the problem of writing reactions among the following species: CO, H 2 O, CO 2, CH 4, H 2, C. We have s = 6 chemical species and e = 3 elements, so we can write a set of r = 3 independent chemical reactions. Each of the three reactions will take the form u CO + v H 2 O + w CO 2 + x CH 4 + y H 2 + z C =, where some of the stoichiometric coefficients may, of course, be zero. Given that we have six unknowns but can still only write three conservation equations for any given reaction, we must specify three of the six unknown stoichiometric coefficients manually. 2

3 .2. Choosing which coefficients to specify In choosing which stoichiometric coefficients to solve for and which to specify manually, it is important to choose sets which will enable us to write balanced chemical reactions. Choosing the wrong set may result in equations that have no solution, as will be demonstrated in the following example. As an example of what can happen if the wrong set is chosen, suppose that we choose to manually specify u, v, and w and solve for x, y, and z. The simplest way manually set the coefficients is to set one of u, v, or w equal to unity and the others equal to zero. There are three ways to do this, each resulting in a different chemical reaction. Denoting the unknown stoichiometric coefficients for the nth balanced chemical reaction as x n, y n, and z n, then we now have three chemical reactions to balance: CO + H 2 O + CO 2 + x CH 4 + y H 2 + z C =, (4) CO + H 2 O + CO 2 + x 2 CH 4 + y 2 H 2 + z 2 C =, (5) CO + H 2 O + CO 2 + x 3 CH 4 + y 3 H 2 + z 3 C =. (6) Again ordering the elements alphabetically as C, H, O, then the column vectors containing the element content of each species are given as CO : H 2 O : 2 CO 2 : CH 4 : 4 H 2 : 2 C :. 2 In attempting to balance (4) or (5) or (6), we would write x 4 2 y = or 2 or, z 2 respectively. But none of these equations has a solution since the matrix is singular: 4 2 =, where the A denotes the determinant of the entries of matrix A. Thus, when we choose the coefficients for which to solve (and thereby choose which coefficients to set manually), we must choose a set that forms a non-singular matrix. As an example of an acceptable choice, suppose that we wish to solve for u, v, and w, and manually set x, y, and z. Taking the same approach as before in which one coefficient is set to unity and the others to zero, we again have three reactions to balance: u CO + v H 2 O + w CO 2 + CH 4 + H 2 + C =, u 2 CO + v 2 H 2 O + w 2 CO 2 + CH 4 + H 2 + C =, u 3 CO + v 3 H 2 O + w 3 CO 2 + CH 4 + H 2 + C =. 3

4 To balance these three reactions, we must solve three linear systems: u 2 v = 4, 2 w u 2 2 v 2 = 2, and 2 w 2 u 3 2 v 3 =. 2 w 3 These can be condensed into a single matrix equation by writing u u 2 u 3 2 v v 2 v 3 = w w 2 w 3 Denoting the left-hand coefficient matrix as A, the right-hand matrix as B, and the matrix of unknowns as U, then we have A U = B, (7) for which the solution is U = A B. (8) Solving this system numerically (in SciPy using scipy.linalg.solve(a,b)) gives u u 2 u U = v v 2 v 3 = 2. w w 2 w 3 3 Thus, the stoichiometric coefficients for reaction n appear in column n of U. Writing the reactions in standard form, we have 2 Problem Statement 4 CO + 2 H 2 O = 3 CO 2 + CH 4, CO + H 2 O = CO 2 + H 2, 2 CO = CO 2 + C. This project is worth or 2 points, depending on the level of difficulty you choose. You will design software to automatically balance and print one or more chemical reactions given a list of chemical species. The chemical species will be represented in string form with element names and subscripts all joined together. Thus, H 2 O is represented as H2O, CH 4 is represented as CH4, and so on. 4

5 2. Required for both - and 2-point options Implement the following regardless of whether you are implementing the - or 2-point options:. Parsing: Write a function using the pyparsing module which will take a string representing a chemical species and return a list of tuples consisting of elements and corresponding subscripts. In the absence of a subscript, the subscript should be. Example: calling your function with an input of H2SO4 should return an output of [( H, 2), ( S,), ( O,4)]. Note: To assist in this portion of the project, a link to a working chemical species parser is given on the projects web page. 2. Determining unique elements: Write a function which, when given a list of species, will return an alphabetized list of the unique elements contained in the set of species. Make use of the parser from the previous step. Example: calling your function with an input of [ CO, H2O, CO2, CH4 ] should return an output of [ C, H, O ] 3. Extracting elemental column vectors: Write a function which, when given a chemical species and an element list such as that returned from the last function, will return the elements of the column vector of element contents. Example: calling your function with inputs of CH4 and [ C, H, O ] should return an output of [, 4, ]. 4. Constructing the left-hand coefficient matrix: Write a function which, when given a list of chemical species and a list of elements, will return a 2-D array representing the right-hand coefficient matrix A in either (3) or (7). Example: calling your function with inputs of [ CO, H2O, CO2 ] and [ C, H, O ] should return an output of array([[,, ], [, 2, ], [,, 2]]). Hint: column vectors c, c2, c3 and c4 can be assembled into a matrix with c [c, c2, c3, c4] in SciPy. 5. Representing a balanced chemical reaction as a string: Write a function which, when given a list of chemical species and an array of stoichiometric coefficients for those species will return a string representation of the balanced chemical reaction. Reactants and products should be written on the left and right sides of the equal sign, respectively. Chemical species on one side of the equal sign should be separated by + characters. Species with stoichiometric coefficients of zero should not be included, and species with coefficients of one should be included without any coefficient. Example: calling your function with inputs of [ CO, H2O, CO2, CH4, H2, C ] and [-4., -2., 3.,,.,.] should return (not print) a string output of 4 CO + 2 H2O = 3 CO2 + CH Point option only (single chemical reactions) Implement the following only if you are choosing the -point option for this project: 5

6 . Balancing a single chemical reaction: Write a function which, when given a list of chemical species, will either (a) raise an exception if the number of species minus the number of elements is not one, or (b) return a string representing a balanced chemical reaction involving those species. Examples: (a) Calling your function with an input of [ CO, H2O, CO2, CH4 ] should return an output of 4 CO + 2 H2O = 3 CO2 + CH4 or an equivalent balanced reaction. (Note: this reaction was obtained by setting the coefficient on CH 4 to unity, but other equivalent reactions could be obtained by setting other coefficients instead.) (b) Calling your function with an input of [ CO, H2O, CO2, CH4, H2, C ] should raise an exception with an error message along the lines of RuntimeError: the number of species minus the number of elements is not. Cannot write a single balanced reaction for this system. 2. Testing and Demonstration: Include several tests of your code with several different sets of chemical species. Print the results in an easily-understood format point option only (systems of chemical reactions) Implement the following only if you are choosing the 2-point option for this project:. Finding and balancing a set of independent chemical reactions: Write a function which, when given a list of chemical species, will either (a) raise an exception if it is not possible to write a set of balanced chemical reactions with the given species, or (b) return a list of strings representing a complete independent set of balanced chemical reaction involving those species. Examples: (a) Calling your function with an input of [ CO, H2O, CO2, CH4, H2, C ] should return an output of [ 4 CO + 2 H2O = 3 CO2 + CH4, CO + H2O = CO2 + H2, 2 CO = CO2 + C ] or an equivalent set of three independent balanced reactions. (Note: these reaction were obtained by choosing coefficients as explained above, but other equivalent reactions could be obtained by setting other admissible subsets of coefficients instead.) (b) Calling your function with an input of [ C, H2, S, O2 ] should raise an exception with an error message along the lines of RuntimeError: A set of balanced reactions cannot be written among the given species. 6

7 Hints: (a) This will require finding a subset of chemical species among the given set such that the determinant of the coefficient matrix A for that subset is non-zero. This in turn will require the ability to iterate through the subsets of the given set of species. A link to a function for generating the length-n combinations drawn from a list of given elements is provided on the projects web page. For example, the supplied function, called combinations functions as follows when called to generate length-3 combinations from a length-6 list of species: >>> from pprint import pprint >>> pprint(list(combinations([ CO, H2O, CO2, CH4, H2, C ], 3))) [[ CO, H2O, CO2 ], [ CO, H2O, CH4 ], [ CO, H2O, H2 ], [ CO, H2O, C ], [ CO, CO2, CH4 ], [ CO, CO2, H2 ], [ CO, CO2, C ], [ CO, CH4, H2 ], [ CO, CH4, C ], [ CO, H2, C ], [ H2O, CO2, CH4 ], [ H2O, CO2, H2 ], [ H2O, CO2, C ], [ H2O, CH4, H2 ], [ H2O, CH4, C ], [ H2O, H2, C ], [ CO2, CH4, H2 ], [ CO2, CH4, C ], [ CO2, H2, C ], [ CH4, H2, C ]] Thus, the return from the combinations function be iterated over to find a set of elements for which the determinant of the corresponding element matrix A is non-zero. (b) Scipy s linalg.solve(a,b) can be used to solve a linear system in which A and B are matrices or 2-D arrays. (c) Scipy s linalg.det(a) can be used to calculate the determinant of a matrix or 2-D array A. (d) Testing and Demonstration: Include several tests of your code with several different sets of chemical species. Print the results in an easily-understood format. In your tests, include the example worked out in Sec

Math Studio College Algebra

Math Studio College Algebra Math 100 - Studio College Algebra Rekha Natarajan Kansas State University November 19, 2014 Systems of Equations Systems of Equations A system of equations consists of Systems of Equations A system of

More information

A First Course on Kinetics and Reaction Engineering Example 1.4

A First Course on Kinetics and Reaction Engineering Example 1.4 Example 1.4 Problem Purpose This example illustrates the process of identifying reactions that are linear combinations of other reactions in a set and eliminating them until a mathematically independent

More information

Section 1.1: Systems of Linear Equations

Section 1.1: Systems of Linear Equations Section 1.1: Systems of Linear Equations Two Linear Equations in Two Unknowns Recall that the equation of a line in 2D can be written in standard form: a 1 x 1 + a 2 x 2 = b. Definition. A 2 2 system of

More information

Section Summary. Sequences. Recurrence Relations. Summations Special Integer Sequences (optional)

Section Summary. Sequences. Recurrence Relations. Summations Special Integer Sequences (optional) Section 2.4 Section Summary Sequences. o Examples: Geometric Progression, Arithmetic Progression Recurrence Relations o Example: Fibonacci Sequence Summations Special Integer Sequences (optional) Sequences

More information

2 What is Chemical Reaction Stoichiometry (CRS)?

2 What is Chemical Reaction Stoichiometry (CRS)? CRS, c 1998 R. W. Missen & W. R. Smith, all rights reserved 1 2 What is Chemical Reaction Stoichiometry (CRS)? 2.1 A definition We define chemical stoichiometry as the constraints placed on the composition

More information

Recurrence Relations and Recursion: MATH 180

Recurrence Relations and Recursion: MATH 180 Recurrence Relations and Recursion: MATH 180 1: Recursively Defined Sequences Example 1: The sequence a 1,a 2,a 3,... can be defined recursively as follows: (1) For all integers k 2, a k = a k 1 + 1 (2)

More information

Vector, Matrix, and Tensor Derivatives

Vector, Matrix, and Tensor Derivatives Vector, Matrix, and Tensor Derivatives Erik Learned-Miller The purpose of this document is to help you learn to take derivatives of vectors, matrices, and higher order tensors (arrays with three dimensions

More information

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence Section 2.4 Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations Introduction Sequences are ordered lists of elements.

More information

MATH Examination for the Module MATH-3152 (May 2009) Coding Theory. Time allowed: 2 hours. S = q

MATH Examination for the Module MATH-3152 (May 2009) Coding Theory. Time allowed: 2 hours. S = q MATH-315201 This question paper consists of 6 printed pages, each of which is identified by the reference MATH-3152 Only approved basic scientific calculators may be used. c UNIVERSITY OF LEEDS Examination

More information

Stoichiometry. Please take out your notebooks

Stoichiometry. Please take out your notebooks Stoichiometry Please take out your notebooks Stoichiometry stochio = Greek for element metry = measurement Stoichiometry is about measuring the amounts of elements and compounds involved in a reaction.

More information

Conditioning and Stability

Conditioning and Stability Lab 17 Conditioning and Stability Lab Objective: Explore the condition of problems and the stability of algorithms. The condition number of a function measures how sensitive that function is to changes

More information

Math 1314 Week #14 Notes

Math 1314 Week #14 Notes Math 3 Week # Notes Section 5.: A system of equations consists of two or more equations. A solution to a system of equations is a point that satisfies all the equations in the system. In this chapter,

More information

General Chemistry I The Mole Map. Dr. Koni Stone Chapter 3, clicker 3

General Chemistry I The Mole Map. Dr. Koni Stone Chapter 3, clicker 3 General Chemistry I The Mole Map Dr. Koni Stone Chapter 3, clicker 3 How many moles of sodium carbonate are in 50.5 grams of sodium carbonate? A. 106 moles B. 4.76 x 10-1 moles C. 2.10 moles D. 5.35 x

More information

Sections 6.1 and 6.2: Systems of Linear Equations

Sections 6.1 and 6.2: Systems of Linear Equations What is a linear equation? Sections 6.1 and 6.2: Systems of Linear Equations We are now going to discuss solving systems of two or more linear equations with two variables. Recall that solving an equation

More information

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, 1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, v, x, y, z as per the pumping theorem. 3. Prove that

More information

Stoichiometry. Lab. FCJJ 16 - Solar Hydrogen Science Kit. Goals. Background. Procedure + 2 O 2 CH 4 CO H2O

Stoichiometry. Lab. FCJJ 16 - Solar Hydrogen Science Kit. Goals. Background. Procedure + 2 O 2 CH 4 CO H2O Goals Predict reaction yields with stoichiometry Use an electrolyzer to generate H2 and O2 Make calculations based on data Background When reactants combine in a chemical reaction, they always do so in

More information

Math 110 (Fall 2018) Midterm II (Monday October 29, 12:10-1:00)

Math 110 (Fall 2018) Midterm II (Monday October 29, 12:10-1:00) Math 110 (Fall 2018) Midterm II (Monday October 29, 12:10-1:00) Name: SID: Please write clearly and legibly. Justify your answers. Partial credits may be given to Problems 2, 3, 4, and 5. The last sheet

More information

Sec$on Summary. Sequences. Recurrence Relations. Summations. Ex: Geometric Progression, Arithmetic Progression. Ex: Fibonacci Sequence

Sec$on Summary. Sequences. Recurrence Relations. Summations. Ex: Geometric Progression, Arithmetic Progression. Ex: Fibonacci Sequence Section 2.4 Sec$on Summary Sequences Ex: Geometric Progression, Arithmetic Progression Recurrence Relations Ex: Fibonacci Sequence Summations 2 Introduc$on Sequences are ordered lists of elements. 1, 2,

More information

Matrices: 2.1 Operations with Matrices

Matrices: 2.1 Operations with Matrices Goals In this chapter and section we study matrix operations: Define matrix addition Define multiplication of matrix by a scalar, to be called scalar multiplication. Define multiplication of two matrices,

More information

(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB

(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB (Linear equations) Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots

More information

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27 Chapter 2 Ma 322 Fall 2013 Ma 322 Sept 23-27 Summary ˆ Matrices and their Operations. ˆ Special matrices: Zero, Square, Identity. ˆ Elementary Matrices, Permutation Matrices. ˆ Voodoo Principle. What is

More information

Integer Division. Student Probe

Integer Division. Student Probe Student Probe What is 24 3? Answer: 8 Integer Division Lesson Description This lesson is intended to help students develop an understanding of division of integers. The lesson focuses on using the array

More information

We use the overhead arrow to denote a column vector, i.e., a number with a direction. For example, in three-space, we write

We use the overhead arrow to denote a column vector, i.e., a number with a direction. For example, in three-space, we write 1 MATH FACTS 11 Vectors 111 Definition We use the overhead arrow to denote a column vector, ie, a number with a direction For example, in three-space, we write The elements of a vector have a graphical

More information

Equilibrium. Why? Model 1 A Reversible Reaction. At what point is a reversible reaction completed?

Equilibrium. Why? Model 1 A Reversible Reaction. At what point is a reversible reaction completed? Why? Equilibrium At what point is a reversible reaction completed? Most of the reactions that we have studied this year have been forward reactions once the reactant has changed into the product it stays

More information

Chem 116 POGIL Worksheet - Week 7 Kinetics to Equilibrium

Chem 116 POGIL Worksheet - Week 7 Kinetics to Equilibrium Chem 116 POGIL Worksheet - Week 7 Kinetics to Equilibrium Why? Most chemical reactions are reversible. This means that once products are formed, they can react to reform the reactants. If we allow a reaction

More information

MA 125 CALCULUS I SPRING 2007 April 27, 2007 FINAL EXAM. Name (Print last name first):... Student ID Number (last four digits):...

MA 125 CALCULUS I SPRING 2007 April 27, 2007 FINAL EXAM. Name (Print last name first):... Student ID Number (last four digits):... CALCULUS I, FINAL EXAM 1 MA 125 CALCULUS I SPRING 2007 April 27, 2007 FINAL EXAM Name (Print last name first):............................................. Student ID Number (last four digits):........................

More information

I never let my schooling get in the way of my education.

I never let my schooling get in the way of my education. Chemistry NT I never let my schooling get in the way of my education. Mark Twain Chem NT Chemical Equilibrium Module Describing Chemical Equilibrium The Equilibrium Constant Equilibrium Constant for Sums

More information

LS.1 Review of Linear Algebra

LS.1 Review of Linear Algebra LS. LINEAR SYSTEMS LS.1 Review of Linear Algebra In these notes, we will investigate a way of handling a linear system of ODE s directly, instead of using elimination to reduce it to a single higher-order

More information

Designing Information Devices and Systems I Spring 2018 Homework 5

Designing Information Devices and Systems I Spring 2018 Homework 5 EECS 16A Designing Information Devices and Systems I Spring 2018 Homework All problems on this homework are practice, however all concepts covered here are fair game for the exam. 1. Sports Rank Every

More information

MthSc 103 Test 3 Spring 2009 Version A UC , 3.1, 3.2. Student s Printed Name:

MthSc 103 Test 3 Spring 2009 Version A UC , 3.1, 3.2. Student s Printed Name: Student s Printed Name: Instructor: CUID: Section # : Read each question very carefully. You are NOT permitted to use a calculator on any portion of this test. You are not allowed to use any textbook,

More information

Automata Theory (2A) Young Won Lim 5/31/18

Automata Theory (2A) Young Won Lim 5/31/18 Automata Theory (2A) Copyright (c) 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Last Name: First Name NetID Discussion Section: Discussion TA Name:

Last Name: First Name NetID Discussion Section: Discussion TA Name: Physics 213 Final Exam Spring 2014 Last Name: First Name NetID Discussion Section: Discussion TA Name: Instructions Turn off your cell phone and put it away. This is a closed book exam. You have 2 hours

More information

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages: CS100: DISCRETE STRUCTURES Lecture 3 Matrices Ch 3 Pages: 246-262 Matrices 2 Introduction DEFINITION 1: A matrix is a rectangular array of numbers. A matrix with m rows and n columns is called an m x n

More information

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations. POLI 7 - Mathematical and Statistical Foundations Prof S Saiegh Fall Lecture Notes - Class 4 October 4, Linear Algebra The analysis of many models in the social sciences reduces to the study of systems

More information

MOLECULAR FORMULA AND EMPIRICAL FORMULA

MOLECULAR FORMULA AND EMPIRICAL FORMULA MOLECULAR FORMULA AND EMPIRICAL FORMULA Molecular Formula is a formula indicating the actual number of atoms of each element making up a molecule. The molecular formula must accurately state the exact

More information

Introduction to Computers & Programming

Introduction to Computers & Programming 16.070 Introduction to Computers & Programming Theory of computation: What is a computer? FSM, Automata Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT Models of Computation What is a computer? If you

More information

Day 6: 6.4 Solving Polynomial Equations Warm Up: Factor. 1. x 2-2x x 2-9x x 2 + 6x + 5

Day 6: 6.4 Solving Polynomial Equations Warm Up: Factor. 1. x 2-2x x 2-9x x 2 + 6x + 5 Day 6: 6.4 Solving Polynomial Equations Warm Up: Factor. 1. x 2-2x - 15 2. x 2-9x + 14 3. x 2 + 6x + 5 Solving Equations by Factoring Recall the factoring pattern: Difference of Squares:...... Note: There

More information

Definition of the Drazin Inverse

Definition of the Drazin Inverse 15 The Drazin Inverse Lab Objective: The Drazin inverse of a matrix is a pseudoinverse which preserves certain spectral properties of the matrix. In this lab, we compute the Drazin inverse using the Schur

More information

LINEAR ALGEBRA. VECTOR CALCULUS

LINEAR ALGEBRA. VECTOR CALCULUS im7.qxd 9//5 :9 PM Page 5 Part B LINEAR ALGEBRA. VECTOR CALCULUS Part B consists of Chap. 7 Linear Algebra: Matrices, Vectors, Determinants. Linear Systems Chap. 8 Linear Algebra: Matrix Eigenvalue Problems

More information

OPERATIONS RESEARCH. Linear Programming Problem

OPERATIONS RESEARCH. Linear Programming Problem OPERATIONS RESEARCH Chapter 1 Linear Programming Problem Prof. Bibhas C. Giri Department of Mathematics Jadavpur University Kolkata, India Email: bcgiri.jumath@gmail.com MODULE - 2: Simplex Method for

More information

1 Background: The Gray-Scott Reaction-Diffusion System

1 Background: The Gray-Scott Reaction-Diffusion System MSE 350 Modeling 2-D Reaction-Diffusion Instructor: R.G. Erdmann In this project, worth 3 points, you will simulate the dynamics of the Gray-Scott reaction diffusion system. (see the following: http://www-swiss.ai.mit.edu/projects/amorphous/

More information

Computational Fluid Dynamics Prof. Sreenivas Jayanti Department of Computer Science and Engineering Indian Institute of Technology, Madras

Computational Fluid Dynamics Prof. Sreenivas Jayanti Department of Computer Science and Engineering Indian Institute of Technology, Madras Computational Fluid Dynamics Prof. Sreenivas Jayanti Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 20 Equations governing fluid flow with chemical reactions

More information

Page Points Score Total: 100

Page Points Score Total: 100 Math 1130 Spring 2019 Sample Midterm 3c 4/11/19 Name (Print): Username.#: Lecturer: Rec. Instructor: Rec. Time: This exam contains 10 pages (including this cover page) and 10 problems. Check to see if

More information

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence Section 2.4 1 Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations 2 Introduction Sequences are ordered lists of

More information

Krylov Subspaces. Lab 1. The Arnoldi Iteration

Krylov Subspaces. Lab 1. The Arnoldi Iteration Lab 1 Krylov Subspaces Lab Objective: Discuss simple Krylov Subspace Methods for finding eigenvalues and show some interesting applications. One of the biggest difficulties in computational linear algebra

More information

A factor times a logarithm can be re-written as the argument of the logarithm raised to the power of that factor

A factor times a logarithm can be re-written as the argument of the logarithm raised to the power of that factor In this section we will be working with Properties of Logarithms in an attempt to take equations with more than one logarithm and condense them down into just a single logarithm. Properties of Logarithms:

More information

Python & Numpy A tutorial

Python & Numpy A tutorial Python & Numpy A tutorial Devert Alexandre School of Software Engineering of USTC 13 February 2012 Slide 1/38 Table of Contents 1 Why Python & Numpy 2 First steps with Python 3 Fun with lists 4 Quick tour

More information

Determinants and Cramer's Rule

Determinants and Cramer's Rule eterminants and ramer's Rule This section will deal with how to find the determinant of a square matrix. Every square matrix can be associated with a real number known as its determinant. The determinant

More information

Homework 5: Sampling and Geometry

Homework 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 information

Getting Started with Communications Engineering

Getting Started with Communications Engineering 1 Linear algebra is the algebra of linear equations: the term linear being used in the same sense as in linear functions, such as: which is the equation of a straight line. y ax c (0.1) Of course, if we

More information

Introduction to Determinants

Introduction to Determinants Introduction to Determinants For any square matrix of order 2, we have found a necessary and sufficient condition for invertibility. Indeed, consider the matrix The matrix A is invertible if and only if.

More information

Finite Math Section 6_1 Solutions and Hints

Finite Math Section 6_1 Solutions and Hints Finite Math Section 6_1 Solutions and Hints by Brent M. Dingle for the book: Finite Mathematics, 7 th Edition by S. T. Tan. DO NOT PRINT THIS OUT AND TURN IT IN!!!!!!!! This is designed to assist you in

More information

Review Questions REVIEW QUESTIONS 71

Review Questions REVIEW QUESTIONS 71 REVIEW QUESTIONS 71 MATLAB, is [42]. For a comprehensive treatment of error analysis and perturbation theory for linear systems and many other problems in linear algebra, see [126, 241]. An overview of

More information

Methodology for Analysis of Metallurgical Processes

Methodology for Analysis of Metallurgical Processes Methodology for Analysis of Metallurgical Processes Metallurgical and chemical processes are classified as batch, continuous and semibatch 1. Batch processes The feed is charged into a vessel at the beginning

More information

CA Compiler Construction

CA Compiler Construction CA4003 - Compiler Construction Bottom Up Parsing David Sinclair Bottom Up Parsing LL(1) parsers have enjoyed a bit of a revival thanks to JavaCC. LL(k) parsers must predict which production rule to use

More information

Math 3191 Applied Linear Algebra

Math 3191 Applied Linear Algebra Math 191 Applied Linear Algebra Lecture 8: Inverse of a Matrix Stephen Billups University of Colorado at Denver Math 191Applied Linear Algebra p.1/0 Announcements We will not make it to section. tonight,

More information

(i.e., equilibrium is established) leads to: K = k 1

(i.e., equilibrium is established) leads to: K = k 1 CHEMISTRY 104 Help Sheet #8 Chapter 12 Equilibrium Do the topics appropriate for your lecture http://www.chem.wisc.edu/areas/clc (Resource page) Prepared by Dr. Tony Jacob Nuggets: Equilibrium Constant

More information

Chapter 4 Systems of Linear Equations; Matrices

Chapter 4 Systems of Linear Equations; Matrices Chapter 4 Systems of Linear Equations; Matrices Section 5 Inverse of a Square Matrix Learning Objectives for Section 4.5 Inverse of a Square Matrix The student will be able to identify identity matrices

More information

Problem Set 4 Solutions

Problem Set 4 Solutions Introduction to Algorithms October 8, 2001 Massachusetts Institute of Technology 6.046J/18.410J Singapore-MIT Alliance SMA5503 Professors Erik Demaine, Lee Wee Sun, and Charles E. Leiserson Handout 18

More information

I&C 6N. Computational Linear Algebra

I&C 6N. Computational Linear Algebra I&C 6N Computational Linear Algebra 1 Lecture 1: Scalars and Vectors What is a scalar? Computer representation of a scalar Scalar Equality Scalar Operations Addition and Multiplication What is a vector?

More information

Computing Radioimmunoassay Analysis Dose-Response Curves

Computing Radioimmunoassay Analysis Dose-Response Curves Computing Radioimmunoassay Analysis Dose-Response Curves Gary D. Knott, Ph.D. Civilized Software, Inc. 12109 Heritage Park Circle Silver Spring MD 20906 Tel.: (301)-962-3711 email: csi@civilized.com URL:

More information

Quantification of JEOL XPS Spectra from SpecSurf

Quantification of JEOL XPS Spectra from SpecSurf Quantification of JEOL XPS Spectra from SpecSurf The quantification procedure used by the JEOL SpecSurf software involves modifying the Scofield cross-sections to account for both an energy dependency

More information

6-2 Matrix Multiplication, Inverses and Determinants

6-2 Matrix Multiplication, Inverses and Determinants Find AB and BA, if possible. 1. A = A = ; A is a 1 2 matrix and B is a 2 2 matrix. Because the number of columns of A is equal to the number of rows of B, AB exists. To find the first entry of AB, find

More information

Linear System of Equations

Linear System of Equations Linear System of Equations Linear systems are perhaps the most widely applied numerical procedures when real-world situation are to be simulated. Example: computing the forces in a TRUSS. F F 5. 77F F.

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2 MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS SYSTEMS OF EQUATIONS AND MATRICES Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

8.1 Chemical Properties and Changes. chemical property chemical change dissolving

8.1 Chemical Properties and Changes. chemical property chemical change dissolving 8.1 Chemical Properties and Changes chemical property chemical change dissolving Ability to Change 8.1 Chemical Properties and Changes In a chemical change, the properties that give a substance its identity

More information

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa CS:4330 Theory of Computation Spring 2018 Regular Languages Finite Automata and Regular Expressions Haniel Barbosa Readings for this lecture Chapter 1 of [Sipser 1996], 3rd edition. Sections 1.1 and 1.3.

More information

5.1 Introduction to Matrices

5.1 Introduction to Matrices 5.1 Introduction to Matrices Reminder: A matrix with m rows and n columns has size m x n. (This is also sometimes referred to as the order of the matrix.) The entry in the ith row and jth column of a matrix

More information

CHAPTER 4 THE COMMON FACTOR MODEL IN THE SAMPLE. From Exploratory Factor Analysis Ledyard R Tucker and Robert C. MacCallum

CHAPTER 4 THE COMMON FACTOR MODEL IN THE SAMPLE. From Exploratory Factor Analysis Ledyard R Tucker and Robert C. MacCallum CHAPTER 4 THE COMMON FACTOR MODEL IN THE SAMPLE From Exploratory Factor Analysis Ledyard R Tucker and Robert C. MacCallum 1997 65 CHAPTER 4 THE COMMON FACTOR MODEL IN THE SAMPLE 4.0. Introduction In Chapter

More information

WeatherHawk Weather Station Protocol

WeatherHawk Weather Station Protocol WeatherHawk Weather Station Protocol Purpose To log atmosphere data using a WeatherHawk TM weather station Overview A weather station is setup to measure and record atmospheric measurements at 15 minute

More information

Efficient Cryptanalysis of Homophonic Substitution Ciphers

Efficient Cryptanalysis of Homophonic Substitution Ciphers Efficient Cryptanalysis of Homophonic Substitution Ciphers Amrapali Dhavare Richard M. Low Mark Stamp Abstract Substitution ciphers are among the earliest methods of encryption. Examples of classic substitution

More information

Stochastic processes. MAS275 Probability Modelling. Introduction and Markov chains. Continuous time. Markov property

Stochastic processes. MAS275 Probability Modelling. Introduction and Markov chains. Continuous time. Markov property Chapter 1: and Markov chains Stochastic processes We study stochastic processes, which are families of random variables describing the evolution of a quantity with time. In some situations, we can treat

More information

Experiment 1 Scientific Writing Tools

Experiment 1 Scientific Writing Tools Experiment 1 Scientific Writing Tools OUTCOMES After completing this experiment, the student should be able to: insert a variety of mathematical equations into a Word document. draw line structures of

More information

Computation Theory Finite Automata

Computation Theory Finite Automata Computation Theory Dept. of Computing ITT Dublin October 14, 2010 Computation Theory I 1 We would like a model that captures the general nature of computation Consider two simple problems: 2 Design a program

More information

CPE 310: Numerical Analysis for Engineers

CPE 310: Numerical Analysis for Engineers CPE 310: Numerical Analysis for Engineers Chapter 2: Solving Sets of Equations Ahmed Tamrawi Copyright notice: care has been taken to use only those web images deemed by the instructor to be in the public

More information

Chapter No. 1 BASIC CONCEPTS Short Question With Answer Q.1 Calculate the grams atoms in 0.4 gm of potassium. Gram atoms of potassium = = = 0.01 grams atoms Q.2 23 grams of sodium and 238 gram of uranium

More information

Ma/CS 6b Class 24: Error Correcting Codes

Ma/CS 6b Class 24: Error Correcting Codes Ma/CS 6b Class 24: Error Correcting Codes By Adam Sheffer Communicating Over a Noisy Channel Problem. We wish to transmit a message which is composed of 0 s and 1 s, but noise might accidentally flip some

More information

MATH 22A: LINEAR ALGEBRA Chapter 1

MATH 22A: LINEAR ALGEBRA Chapter 1 MATH 22A: LINEAR ALGEBRA Chapter 1 Steffen Borgwardt, UC Davis original version of these slides: Jesús De Loera, UC Davis January 10, 2015 Vectors and Matrices (1.1-1.3). CHAPTER 1 Vectors and Linear Combinations

More information

Chapter 2. Matrix Arithmetic. Chapter 2

Chapter 2. Matrix Arithmetic. Chapter 2 Matrix Arithmetic Matrix Addition and Subtraction Addition and subtraction act element-wise on matrices. In order for the addition/subtraction (A B) to be possible, the two matrices A and B must have the

More information

Creating Phase and Interface Models

Creating Phase and Interface Models Creating Phase and Interface Models D. G. Goodwin Division of Engineering and Applied Science California Institute of Technology Cantera Workshop July 25, 2004 Every Cantera simulation involves one or

More information

Chem 11 UNIT 3: STOICHIOMETRY Name:

Chem 11 UNIT 3: STOICHIOMETRY Name: Chem 11 UNIT 3: STOICHIOMETRY Name: Ms. Pirvu Period: Writing & Balancing Equations Chemical reactions can be described by chemical equations. Recall Law of Conservation of Mass mass cannot be nor. This

More information

Maximum sum contiguous subsequence Longest common subsequence Matrix chain multiplication All pair shortest path Kna. Dynamic Programming

Maximum sum contiguous subsequence Longest common subsequence Matrix chain multiplication All pair shortest path Kna. Dynamic Programming Dynamic Programming Arijit Bishnu arijit@isical.ac.in Indian Statistical Institute, India. August 31, 2015 Outline 1 Maximum sum contiguous subsequence 2 Longest common subsequence 3 Matrix chain multiplication

More information

CMP 309: Automata Theory, Computability and Formal Languages. Adapted from the work of Andrej Bogdanov

CMP 309: Automata Theory, Computability and Formal Languages. Adapted from the work of Andrej Bogdanov CMP 309: Automata Theory, Computability and Formal Languages Adapted from the work of Andrej Bogdanov Course outline Introduction to Automata Theory Finite Automata Deterministic Finite state automata

More information

Deterministic Finite Automaton (DFA)

Deterministic Finite Automaton (DFA) 1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

More information

5 Linear Algebra and Inverse Problem

5 Linear Algebra and Inverse Problem 5 Linear Algebra and Inverse Problem 5.1 Introduction Direct problem ( Forward problem) is to find field quantities satisfying Governing equations, Boundary conditions, Initial conditions. The direct problem

More information

CLASS 12th. Chemical Kinetics

CLASS 12th. Chemical Kinetics CLASS 12th Chemical Kinetics Chemical Kinetics 01. Types of Reactions On the basis of reaction rates, the chemical reactions have been classified into the following three groups Very fast or instantaneous

More information

Computer Science 160 Translation of Programming Languages

Computer Science 160 Translation of Programming Languages Computer Science 160 Translation of Programming Languages Instructor: Christopher Kruegel Building a Handle Recognizing Machine: [now, with a look-ahead token, which is LR(1) ] LR(k) items An LR(k) item

More information

Matrix Basic Concepts

Matrix Basic Concepts Matrix Basic Concepts Topics: What is a matrix? Matrix terminology Elements or entries Diagonal entries Address/location of entries Rows and columns Size of a matrix A column matrix; vectors Special types

More information

2013/2014 SEMESTER 1 MID-TERM TEST. 1 October :30pm to 9:30pm PLEASE READ THE FOLLOWING INSTRUCTIONS CAREFULLY:

2013/2014 SEMESTER 1 MID-TERM TEST. 1 October :30pm to 9:30pm PLEASE READ THE FOLLOWING INSTRUCTIONS CAREFULLY: 2013/2014 SEMESTER 1 MID-TERM TEST MA1505 MATHEMATICS I 1 October 2013 8:30pm to 9:30pm PLEASE READ THE FOLLOWING INSTRUCTIONS CAREFULLY: 1. This test paper consists of TEN (10) multiple choice questions

More information

Algebra Student Signature: Parent/Carer signature:

Algebra Student Signature: Parent/Carer signature: Preparing yourself for Mathematics at Guilsborough Algebra Student Signature: Parent/Carer signature: Dear student, This booklet contains work which you need to complete over the summer. It is designed

More information

MA 125 CALCULUS I FALL 2006 December 08, 2006 FINAL EXAM. Name (Print last name first):... Instructor:... Section:... PART I

MA 125 CALCULUS I FALL 2006 December 08, 2006 FINAL EXAM. Name (Print last name first):... Instructor:... Section:... PART I CALCULUS I, FINAL EXAM 1 MA 125 CALCULUS I FALL 2006 December 08, 2006 FINAL EXAM Name (Print last name first):............................................. Student ID Number:...........................

More information

DYNAMICS OF PARALLEL MANIPULATOR

DYNAMICS OF PARALLEL MANIPULATOR DYNAMICS OF PARALLEL MANIPULATOR The 6nx6n matrices of manipulator mass M and manipulator angular velocity W are introduced below: M = diag M 1, M 2,, M n W = diag (W 1, W 2,, W n ) From this definitions

More information

NOTES Mole Concept Chapter 3

NOTES Mole Concept Chapter 3 Chapter 3 Vocabulary: NOTES Mole Concept Chapter 3 average atomic mass- Avogadro's Numberchemical equationempirical formula- Haber process- the weighted average mass of the atoms in a naturally occurring

More information

Section Summary. Definition of a Function.

Section Summary. Definition of a Function. Section 2.3 Section Summary Definition of a Function. Domain, Codomain Image, Preimage Injection, Surjection, Bijection Inverse Function Function Composition Graphing Functions Floor, Ceiling, Factorial

More information

Introduction to Techniques for Counting

Introduction to Techniques for Counting Introduction to Techniques for Counting A generating function is a device somewhat similar to a bag. Instead of carrying many little objects detachedly, which could be embarrassing, we put them all in

More information

Chapter 14: Chemical Equilibrium. Mrs. Brayfield

Chapter 14: Chemical Equilibrium. Mrs. Brayfield Chapter 14: Chemical Equilibrium Mrs. Brayfield 14.2: Dynamic Equilibrium Remember from chapter 13 that reaction rates generally increase with increasing concentration of the reactions and decreases with

More information

Moles and Chemical Formulas 11

Moles and Chemical Formulas 11 Moles and Chemical Formulas 11 LABORATORY GOALS Determine the simplest formula of a compound. Calculate the percent water in a hydrate. Determine the formula of a hydrate. LAB INFORMATION Time: Comments:

More information

8.4. Systems of Equations in Three Variables. Identifying Solutions 2/20/2018. Example. Identifying Solutions. Solving Systems in Three Variables

8.4. Systems of Equations in Three Variables. Identifying Solutions 2/20/2018. Example. Identifying Solutions. Solving Systems in Three Variables 8.4 Systems of Equations in Three Variables Copyright 2010 Pearson Education, Inc. Publishing as Pearson Addison- Wesley Identifying Solutions Solving Systems in Three Variables Dependency, Inconsistency,

More information

Linear Algebra Using MATLAB

Linear Algebra Using MATLAB Linear Algebra Using MATLAB MATH 5331 1 May 12, 2010 1 Selected material from the text Linear Algebra and Differential Equations Using MATLAB by Martin Golubitsky and Michael Dellnitz Contents 1 Preliminaries

More information

The Reaction module. Cu) Isothermal standard state reactions (oxidation of copper) of pure (Al)) Two phase single component equilibrium (ideal

The Reaction module. Cu) Isothermal standard state reactions (oxidation of copper) of pure (Al)) Two phase single component equilibrium (ideal Table of contents The module Use to calculate the thermochemical properties of a species or a chemical reaction. accesses only compound type databases. Note that assumes all gases to be ideal and ignores

More information