The Simply Typed Lambda Calculus
|
|
- Αναστάσιος Χριστόπουλος
- 6 χρόνια πριν
- Προβολές:
Transcript
1 Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and sophisticated type systems the answer is often no (it s undecidable.) We ll first look at type inference for the simply typed lambda calculus. Then we ll look at type inference in ML (i.e., Hindley-Milner inference).
2 The Simply Typed Lambda Calculus x : τ Γ Γ x : τ Γ, x : τ 1 e : τ 2 Γ λx. e : τ 1 τ 2 Γ e 1 : τ 1 τ 3 Γ e 2 : τ 1 Γ (e 1 e 2 ) : τ 3 The main constraint on the inferred types is that the type of e 2 needs to be equal to the parameter type of e 1. An alternative presentation (from Milner) attaches types to every subexpression and expresses all the constraints as equalities. x τ Γ Γ, x ρ e σ τ = ρ σ Γ x τ Γ (λx ρ. e σ ) τ Γ e ρ Γ e σ ρ = σ τ Γ (e ρ e σ) τ
3 Type Inference First initialize all the attached types with unique unknowns, that is, type variables. For example: ((λf. (f 1)) (λx. x)) becomes ((λf α1. (f α2 1 α3 ) α4 ) α5 (λx α6. x α7 ) α8 ) α9 We can change the type system to generate a set of equalities over these variables. x α Γ Γ x β {α = β} Γ, x α e β C Γ (λx α. e β ) γ {γ = α β} C Γ e α C 1 Γ e β C 2 Γ (e α e β ) γ {α = β γ} C 1 C 2
4 Example For this program ((λf α1. (f α2 1 α3 ) α4 ) α5 (λx α6. x α7 ) α8 ) α9 we generate the following equations: α 3 = int α 1 = α 2 α 2 = α 3 α 4 α 5 = α 1 α 4 α 6 = α 7 α 8 = α 6 α 7 α 5 = α 8 α 9
5 Solving equations by unification We can solve the equations by a process of normalization that simplifies the set of equations. The two main rules are: Reduction: replace an equation of the form τ1 τ 2 = τ 3 τ 4 with two equations: τ 1 = τ 3 and τ 2 = τ 4. Variable elimination: suppose there is a equation of the form α = τ. If α ftv(τ) then report an error. Otherwise substitute τ for α in all the other equations. The auxiliary rules are: Replace τ = α with α = τ. Remove equations of the form α = α, int = int, bool = bool, etc. If there is an equation τ = τ where the head type constructor differs on each side, then stop and report failure. (e.g., int = int int)
6 Example α 3 = int, α 1 = α 2, α 2 = α 3 α 4, α 5 = α 1 α 4, α 6 = α 7, α 8 = α 6 α 7, α 5 = α 8 α 9 α 3 = int, α 1 = α 2, α 2 = int α 4, α 5 = α 1 α 4, α 6 = α 7, α 8 = α 6 α 7, α 5 = α 8 α 9 α 3 = int, α 1 = α 2, α 2 = int α 4, α 5 = α 2 α 4, α 6 = α 7, α 8 = α 6 α 7, α 5 = α 8 α 9 α 3 = int, α 1 = α 2, α 2 = int α 4, α 5 = α 2 α 4, α 6 = α 7, α 8 = α 6 α 7, α 5 = α 8 α 9 α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4 ) α 4, α 6 = α 7, α 8 = α 6 α 7, α 5 = α 8 α 9
7 Example, continued α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4 ) α 4, α 6 = α 7, α 8 = α 6 α 7, α 5 = α 8 α 9 α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4 ) α 4, α 6 = α 7, α 8 = α 6 α 7, (int α 4 ) α 4 = α 8 α 9 α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4 ) α 4, α 6 = α 7, α 8 = α 7 α 7, (int α 4 ) α 4 = α 8 α 9 α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4 ) α 4, α 6 = α 7, α 8 = α 7 α 7, (int α 4 ) α 4 = (α 7 α 7 ) α 9 == reduction = α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4 ) α 4, α 6 = α 7, α 8 = α 7 α 7, (int α 4 ) = (α 7 α 7 ), α 4 = α 9
8 Example, continued α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4) α 4, α 6 = α 7, α 8 = α 7 α 7, (int α 4) = (α 7 α 7), α 4 = α 9 == reduction = α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4) α 4, α 6 = α 7, α 8 = α 7 α 7, int = α 7, α 4 = α 7, α 4 = α 9 == flip = α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4) α 4, α 6 = α 7, α 8 = α 7 α 7, α 7 = int, α 4 = α 7, α 4 = α 9 α 3 = int, α 1 = int α 4, α 2 = int α 4, α 5 = (int α 4 ) α 4, α 6 = int, α 8 = int int, α 7 = int, α 4 = int, α 4 = α 9 α 3 = int, α 1 = int int, α 2 = int int, α 5 = (int int) int, α 6 = int, α 8 = int int, α 7 = int, α 4 = int, int = α 9 == flip = α 3 = int, α 1 = int int, α 2 = int int, α 5 = (int int) int, α 6 = int, α 8 = int int, α 7 = int, α 4 = int, α 9 = int
9 Example: the solution So for this program ((λf α1. (f α2 1 α3 ) α4 ) α5 (λx α6. x α7 ) α8 ) α9 the solution is: So we have α 1 = int int, α 2 = int int, α 3 = int, α 4 = int, α 5 = (int int) int, α 6 = int, α 8 = int int, α 7 = int, α 9 = int ((λf int int. (f int int 1 int ) int ) (int int) int (λx int. x int ) int int ) int
10 Most general unifier Sometimes the solution is underconstrained and there are many solutions. for example, (λx α1. x α2 ) α3 gives rise to the following equations {α 1 = α 2, α 3 = α 1 α 2 }. Here s some solutions: 1. {α 1 = int, α 2 = int, α 3 = int int} 2. {α 1 = bool, α 2 = bool, α 3 = bool bool} 3. {α 1 = α 2, α 3 = α 2 α 2 } Which solution is the best? The most general unifier is the solution that can be instantiated to match any other solution. Solution 3 is the most general unifier. Instantiate α 2 int to get solution 1 and α 2 bool to get solution 2. The unification algorithm always returns the most general unifier.
11 Hindley-Milner (ML-like) Inference The family of ML languages provide let-polymorphism, which is a restricted form of the parametric polymorphism in System F. Not only does the inference algorithm figure out the types, but it also figures out what should be generic and where instantiation should happen. Example: let f = λ x. x in (f true, f 1) is equivalent to the following in System F let f = Λα. λ x : α. x in (f[bool] true, f[int] 1)
12 The Hindley-Milner Type System Universal quantification ( ) is only allowed at the top of a type. T ::= bool T T S ::= T α. T The right-hand side of a let is inferred to be polymorphic. Γ e 1 : T 1 Γ, x : α. T 1 e 2 : T 2 α FTV(Γ) = Γ let x = e 1 in e 2 : T 2 and instantiation happen implicitly when a variable is used x : α. T Γ Γ x : [α T ]T
13 Generalization generalize(γ, τ) = let α = ftv(τ) in let β = ftv(γ) in let γ = α β in γ. τ
14 Algorithm J infer(γ, e, E) = case e of x let α. T = Γ(x) and β be fresh type variables in (E, [α β]t ) (e 1 e 2 ) let (R, ρ) = infer(γ, e 1, E) in let (S, σ) = infer(r(γ), e 2, R) in let U = unify({s(ρ) = σ β} S) where β is fresh in (U, U(β)) λx. e let (R, ρ) = infer((γ, x : β), e, E) where β is fresh in (R, R(β) ρ) let x = e 1 in e 2 let (R, ρ) = infer(γ, e 1, E) in let τ = generalize(r(γ), ρ) in let (S, σ) = infer((r(γ), x : τ), e 2, R) in (S, σ)
15 Algorithm W infer(γ, e) = case e of x let α. T = Γ(x) and β be fresh type variables in (, [α β]t ) (e 1 e 2 ) let (R, ρ) = infer(γ, e 1 ) in let (S, σ) = infer(r(γ), e 2 ) in let U = unify(s(ρ) = σ β) where β is fresh in (U S R, U(β)) λx. e let (R, ρ) = infer((γ, x : β), e) where β is fresh in (R, R(β) ρ) let x = e 1 in e 2 let (R, ρ) = infer(γ, e 1 ) in let τ = generalize(r(γ), ρ) in let (S, σ) = infer((r(γ), x : τ), e 2 ) in (S R, σ)
C.S. 430 Assignment 6, Sample Solutions
C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order
Section 8.3 Trigonometric Equations
99 Section 8. Trigonometric Equations Objective 1: Solve Equations Involving One Trigonometric Function. In this section and the next, we will exple how to solving equations involving trigonometric functions.
Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016
Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Dynamic types, Lambda calculus machines Apr 21 22, 2016 1 Dynamic types and contracts (a) To make sure you understand the
4.6 Autoregressive Moving Average Model ARMA(1,1)
84 CHAPTER 4. STATIONARY TS MODELS 4.6 Autoregressive Moving Average Model ARMA(,) This section is an introduction to a wide class of models ARMA(p,q) which we will consider in more detail later in this
CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS
CHAPTER 5 SOLVING EQUATIONS BY ITERATIVE METHODS EXERCISE 104 Page 8 1. Find the positive root of the equation x + 3x 5 = 0, correct to 3 significant figures, using the method of bisection. Let f(x) =
Homework 3 Solutions
Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For
Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics
Fourier Series MATH 211, Calculus II J. Robert Buchanan Department of Mathematics Spring 2018 Introduction Not all functions can be represented by Taylor series. f (k) (c) A Taylor series f (x) = (x c)
Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)
Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts
Other Test Constructions: Likelihood Ratio & Bayes Tests
Other Test Constructions: Likelihood Ratio & Bayes Tests Side-Note: So far we have seen a few approaches for creating tests such as Neyman-Pearson Lemma ( most powerful tests of H 0 : θ = θ 0 vs H 1 :
Inverse trigonometric functions & General Solution of Trigonometric Equations. ------------------ ----------------------------- -----------------
Inverse trigonometric functions & General Solution of Trigonometric Equations. 1. Sin ( ) = a) b) c) d) Ans b. Solution : Method 1. Ans a: 17 > 1 a) is rejected. w.k.t Sin ( sin ) = d is rejected. If sin
3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β
3.4 SUM AND DIFFERENCE FORMULAS Page Theorem cos(αβ cos α cos β -sin α cos(α-β cos α cos β sin α NOTE: cos(αβ cos α cos β cos(α-β cos α -cos β Proof of cos(α-β cos α cos β sin α Let s use a unit circle
Finite Field Problems: Solutions
Finite Field Problems: Solutions 1. Let f = x 2 +1 Z 11 [x] and let F = Z 11 [x]/(f), a field. Let Solution: F =11 2 = 121, so F = 121 1 = 120. The possible orders are the divisors of 120. Solution: The
Areas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
Section 7.6 Double and Half Angle Formulas
09 Section 7. Double and Half Angle Fmulas To derive the double-angles fmulas, we will use the sum of two angles fmulas that we developed in the last section. We will let α θ and β θ: cos(θ) cos(θ + θ)
derivation of the Laplacian from rectangular to spherical coordinates
derivation of the Laplacian from rectangular to spherical coordinates swapnizzle 03-03- :5:43 We begin by recognizing the familiar conversion from rectangular to spherical coordinates (note that φ is used
6.3 Forecasting ARMA processes
122 CHAPTER 6. ARMA MODELS 6.3 Forecasting ARMA processes The purpose of forecasting is to predict future values of a TS based on the data collected to the present. In this section we will discuss a linear
Fractional Colorings and Zykov Products of graphs
Fractional Colorings and Zykov Products of graphs Who? Nichole Schimanski When? July 27, 2011 Graphs A graph, G, consists of a vertex set, V (G), and an edge set, E(G). V (G) is any finite set E(G) is
2 Composition. Invertible Mappings
Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Composition. Invertible Mappings In this section we discuss two procedures for creating new mappings from old ones, namely,
About these lecture notes. Simply Typed λ-calculus. Types
About these lecture notes Simply Typed λ-calculus Akim Demaille akim@lrde.epita.fr EPITA École Pour l Informatique et les Techniques Avancées Many of these slides are largely inspired from Andrew D. Ker
Areas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
Matrices and Determinants
Matrices and Determinants SUBJECTIVE PROBLEMS: Q 1. For what value of k do the following system of equations possess a non-trivial (i.e., not all zero) solution over the set of rationals Q? x + ky + 3z
Concrete Mathematics Exercises from 30 September 2016
Concrete Mathematics Exercises from 30 September 2016 Silvio Capobianco Exercise 1.7 Let H(n) = J(n + 1) J(n). Equation (1.8) tells us that H(2n) = 2, and H(2n+1) = J(2n+2) J(2n+1) = (2J(n+1) 1) (2J(n)+1)
Example Sheet 3 Solutions
Example Sheet 3 Solutions. i Regular Sturm-Liouville. ii Singular Sturm-Liouville mixed boundary conditions. iii Not Sturm-Liouville ODE is not in Sturm-Liouville form. iv Regular Sturm-Liouville note
forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with
Week 03: C lassification of S econd- Order L inear Equations In last week s lectures we have illustrated how to obtain the general solutions of first order PDEs using the method of characteristics. We
Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.
Exercises 0 More exercises are available in Elementary Differential Equations. If you have a problem to solve any of them, feel free to come to office hour. Problem Find a fundamental matrix of the given
Chapter 6: Systems of Linear Differential. be continuous functions on the interval
Chapter 6: Systems of Linear Differential Equations Let a (t), a 2 (t),..., a nn (t), b (t), b 2 (t),..., b n (t) be continuous functions on the interval I. The system of n first-order differential equations
Solutions to Exercise Sheet 5
Solutions to Eercise Sheet 5 jacques@ucsd.edu. Let X and Y be random variables with joint pdf f(, y) = 3y( + y) where and y. Determine each of the following probabilities. Solutions. a. P (X ). b. P (X
Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1
Eon : Fall 8 Suggested Solutions to Problem Set 8 Email questions or omments to Dan Fetter Problem. Let X be a salar with density f(x, θ) (θx + θ) [ x ] with θ. (a) Find the most powerful level α test
ST5224: Advanced Statistical Theory II
ST5224: Advanced Statistical Theory II 2014/2015: Semester II Tutorial 7 1. Let X be a sample from a population P and consider testing hypotheses H 0 : P = P 0 versus H 1 : P = P 1, where P j is a known
( y) Partial Differential Equations
Partial Dierential Equations Linear P.D.Es. contains no owers roducts o the deendent variables / an o its derivatives can occasionall be solved. Consider eamle ( ) a (sometimes written as a ) we can integrate
Statistical Inference I Locally most powerful tests
Statistical Inference I Locally most powerful tests Shirsendu Mukherjee Department of Statistics, Asutosh College, Kolkata, India. shirsendu st@yahoo.co.in So far we have treated the testing of one-sided
Overview. Transition Semantics. Configurations and the transition relation. Executions and computation
Overview Transition Semantics Configurations and the transition relation Executions and computation Inference rules for small-step structural operational semantics for the simple imperative language Transition
Homework 8 Model Solution Section
MATH 004 Homework Solution Homework 8 Model Solution Section 14.5 14.6. 14.5. Use the Chain Rule to find dz where z cosx + 4y), x 5t 4, y 1 t. dz dx + dy y sinx + 4y)0t + 4) sinx + 4y) 1t ) 0t + 4t ) sinx
PARTIAL NOTES for 6.1 Trigonometric Identities
PARTIAL NOTES for 6.1 Trigonometric Identities tanθ = sinθ cosθ cotθ = cosθ sinθ BASIC IDENTITIES cscθ = 1 sinθ secθ = 1 cosθ cotθ = 1 tanθ PYTHAGOREAN IDENTITIES sin θ + cos θ =1 tan θ +1= sec θ 1 + cot
2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.
EAMCET-. THEORY OF EQUATIONS PREVIOUS EAMCET Bits. Each of the roots of the equation x 6x + 6x 5= are increased by k so that the new transformed equation does not contain term. Then k =... - 4. - Sol.
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Αν κάπου κάνετε κάποιες υποθέσεις να αναφερθούν στη σχετική ερώτηση. Όλα τα αρχεία που αναφέρονται στα προβλήματα βρίσκονται στον ίδιο φάκελο με το εκτελέσιμο
EE512: Error Control Coding
EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3
SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions
SCHOOL OF MATHEMATICAL SCIENCES GLMA Linear Mathematics 00- Examination Solutions. (a) i. ( + 5i)( i) = (6 + 5) + (5 )i = + i. Real part is, imaginary part is. (b) ii. + 5i i ( + 5i)( + i) = ( i)( + i)
Every set of first-order formulas is equivalent to an independent set
Every set of first-order formulas is equivalent to an independent set May 6, 2008 Abstract A set of first-order formulas, whatever the cardinality of the set of symbols, is equivalent to an independent
Approximation of distance between locations on earth given by latitude and longitude
Approximation of distance between locations on earth given by latitude and longitude Jan Behrens 2012-12-31 In this paper we shall provide a method to approximate distances between two points on earth
Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit
Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ting Zhang Stanford May 11, 2001 Stanford, 5/11/2001 1 Outline Ordinal Classification Ordinal Addition Ordinal Multiplication Ordinal
Math221: HW# 1 solutions
Math: HW# solutions Andy Royston October, 5 7.5.7, 3 rd Ed. We have a n = b n = a = fxdx = xdx =, x cos nxdx = x sin nx n sin nxdx n = cos nx n = n n, x sin nxdx = x cos nx n + cos nxdx n cos n = + sin
9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr
9.9 #. Area inside the oval limaçon r = + cos. To graph, start with = so r =. Compute d = sin. Interesting points are where d vanishes, or at =,,, etc. For these values of we compute r:,,, and the values
Second Order RLC Filters
ECEN 60 Circuits/Electronics Spring 007-0-07 P. Mathys Second Order RLC Filters RLC Lowpass Filter A passive RLC lowpass filter (LPF) circuit is shown in the following schematic. R L C v O (t) Using phasor
Reminders: linear functions
Reminders: linear functions Let U and V be vector spaces over the same field F. Definition A function f : U V is linear if for every u 1, u 2 U, f (u 1 + u 2 ) = f (u 1 ) + f (u 2 ), and for every u U
Lecture 2. Soundness and completeness of propositional logic
Lecture 2 Soundness and completeness of propositional logic February 9, 2004 1 Overview Review of natural deduction. Soundness and completeness. Semantics of propositional formulas. Soundness proof. Completeness
Instruction Execution Times
1 C Execution Times InThisAppendix... Introduction DL330 Execution Times DL330P Execution Times DL340 Execution Times C-2 Execution Times Introduction Data Registers This appendix contains several tables
ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?
Teko Classes IITJEE/AIEEE Maths by SUHAAG SIR, Bhopal, Ph (0755) 3 00 000 www.tekoclasses.com ANSWERSHEET (TOPIC DIFFERENTIAL CALCULUS) COLLECTION # Question Type A.Single Correct Type Q. (A) Sol least
Srednicki Chapter 55
Srednicki Chapter 55 QFT Problems & Solutions A. George August 3, 03 Srednicki 55.. Use equations 55.3-55.0 and A i, A j ] = Π i, Π j ] = 0 (at equal times) to verify equations 55.-55.3. This is our third
Chapter 6: Systems of Linear Differential. be continuous functions on the interval
Chapter 6: Systems of Linear Differential Equations Let a (t), a 2 (t),..., a nn (t), b (t), b 2 (t),..., b n (t) be continuous functions on the interval I. The system of n first-order differential equations
Galatia SIL Keyboard Information
Galatia SIL Keyboard Information Keyboard ssignments The main purpose of the keyboards is to provide a wide range of keying options, so many characters can be entered in multiple ways. If you are typing
DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.
DESIGN OF MACHINERY SOLUTION MANUAL -7-1! PROBLEM -7 Statement: Design a double-dwell cam to move a follower from to 25 6, dwell for 12, fall 25 and dwell for the remader The total cycle must take 4 sec
HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:
HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying
Solution Series 9. i=1 x i and i=1 x i.
Lecturer: Prof. Dr. Mete SONER Coordinator: Yilin WANG Solution Series 9 Q1. Let α, β >, the p.d.f. of a beta distribution with parameters α and β is { Γ(α+β) Γ(α)Γ(β) f(x α, β) xα 1 (1 x) β 1 for < x
Strain gauge and rosettes
Strain gauge and rosettes Introduction A strain gauge is a device which is used to measure strain (deformation) on an object subjected to forces. Strain can be measured using various types of devices classified
Block Ciphers Modes. Ramki Thurimella
Block Ciphers Modes Ramki Thurimella Only Encryption I.e. messages could be modified Should not assume that nonsensical messages do no harm Always must be combined with authentication 2 Padding Must be
Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3
Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 1 State vector space and the dual space Space of wavefunctions The space of wavefunctions is the set of all
Second Order Partial Differential Equations
Chapter 7 Second Order Partial Differential Equations 7.1 Introduction A second order linear PDE in two independent variables (x, y Ω can be written as A(x, y u x + B(x, y u xy + C(x, y u u u + D(x, y
If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2
Chapter 3. Analytic Trigonometry 3.1 The inverse sine, cosine, and tangent functions 1. Review: Inverse function (1) f 1 (f(x)) = x for every x in the domain of f and f(f 1 (x)) = x for every x in the
A Note on Intuitionistic Fuzzy. Equivalence Relation
International Mathematical Forum, 5, 2010, no. 67, 3301-3307 A Note on Intuitionistic Fuzzy Equivalence Relation D. K. Basnet Dept. of Mathematics, Assam University Silchar-788011, Assam, India dkbasnet@rediffmail.com
ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω
0 1 2 3 4 5 6 ω ω + 1 ω + 2 ω + 3 ω + 4 ω2 ω2 + 1 ω2 + 2 ω2 + 3 ω3 ω3 + 1 ω3 + 2 ω4 ω4 + 1 ω5 ω 2 ω 2 + 1 ω 2 + 2 ω 2 + ω ω 2 + ω + 1 ω 2 + ω2 ω 2 2 ω 2 2 + 1 ω 2 2 + ω ω 2 3 ω 3 ω 3 + 1 ω 3 + ω ω 3 +
6.1. Dirac Equation. Hamiltonian. Dirac Eq.
6.1. Dirac Equation Ref: M.Kaku, Quantum Field Theory, Oxford Univ Press (1993) η μν = η μν = diag(1, -1, -1, -1) p 0 = p 0 p = p i = -p i p μ p μ = p 0 p 0 + p i p i = E c 2 - p 2 = (m c) 2 H = c p 2
TMA4115 Matematikk 3
TMA4115 Matematikk 3 Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim Spring 2010 Lecture 12: Mathematics Marvellous Matrices Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet
Econ Spring 2004 Instructor: Prof. Kiefer Solution to Problem set # 5. γ (0)
Cornell University Department of Economics Econ 60 - Spring 004 Instructor: Prof. Kiefer Solution to Problem set # 5. Autocorrelation function is defined as ρ h = γ h γ 0 where γ h =Cov X t,x t h =E[X
Section 9.2 Polar Equations and Graphs
180 Section 9. Polar Equations and Graphs In this section, we will be graphing polar equations on a polar grid. In the first few examples, we will write the polar equation in rectangular form to help identify
If we restrict the domain of y = sin x to [ π 2, π 2
Chapter 3. Analytic Trigonometry 3.1 The inverse sine, cosine, and tangent functions 1. Review: Inverse function (1) f 1 (f(x)) = x for every x in the domain of f and f(f 1 (x)) = x for every x in the
( ) 2 and compare to M.
Problems and Solutions for Section 4.2 4.9 through 4.33) 4.9 Calculate the square root of the matrix 3!0 M!0 8 Hint: Let M / 2 a!b ; calculate M / 2!b c ) 2 and compare to M. Solution: Given: 3!0 M!0 8
CRASH COURSE IN PRECALCULUS
CRASH COURSE IN PRECALCULUS Shiah-Sen Wang The graphs are prepared by Chien-Lun Lai Based on : Precalculus: Mathematics for Calculus by J. Stuwart, L. Redin & S. Watson, 6th edition, 01, Brooks/Cole Chapter
Partial Differential Equations in Biology The boundary element method. March 26, 2013
The boundary element method March 26, 203 Introduction and notation The problem: u = f in D R d u = ϕ in Γ D u n = g on Γ N, where D = Γ D Γ N, Γ D Γ N = (possibly, Γ D = [Neumann problem] or Γ N = [Dirichlet
Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013
Notes on Average Scattering imes and Hall Factors Jesse Maassen and Mar Lundstrom Purdue University November 5, 13 I. Introduction 1 II. Solution of the BE 1 III. Exercises: Woring out average scattering
Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.
Bayesian statistics DS GA 1002 Probability and Statistics for Data Science http://www.cims.nyu.edu/~cfgranda/pages/dsga1002_fall17 Carlos Fernandez-Granda Frequentist vs Bayesian statistics In frequentist
ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα είναι μικρότεροι το 1000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Διάρκεια: 3,5 ώρες Καλή
Problem Set 3: Solutions
CMPSCI 69GG Applied Information Theory Fall 006 Problem Set 3: Solutions. [Cover and Thomas 7.] a Define the following notation, C I p xx; Y max X; Y C I p xx; Ỹ max I X; Ỹ We would like to show that C
CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS
CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS EXERCISE 01 Page 545 1. Use matrices to solve: 3x + 4y x + 5y + 7 3x + 4y x + 5y 7 Hence, 3 4 x 0 5 y 7 The inverse of 3 4 5 is: 1 5 4 1 5 4 15 8 3
From the finite to the transfinite: Λµ-terms and streams
From the finite to the transfinite: Λµ-terms and streams WIR 2014 Fanny He f.he@bath.ac.uk Alexis Saurin alexis.saurin@pps.univ-paris-diderot.fr 12 July 2014 The Λµ-calculus Syntax of Λµ t ::= x λx.t (t)u
Sequent Calculi for the Modal µ-calculus over S5. Luca Alberucci, University of Berne. Logic Colloquium Berne, July 4th 2008
Sequent Calculi for the Modal µ-calculus over S5 Luca Alberucci, University of Berne Logic Colloquium Berne, July 4th 2008 Introduction Koz: Axiomatisation for the modal µ-calculus over K Axioms: All classical
SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM
SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM Solutions to Question 1 a) The cumulative distribution function of T conditional on N n is Pr T t N n) Pr max X 1,..., X N ) t N n) Pr max
Μηχανική Μάθηση Hypothesis Testing
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Μηχανική Μάθηση Hypothesis Testing Γιώργος Μπορμπουδάκης Τμήμα Επιστήμης Υπολογιστών Procedure 1. Form the null (H 0 ) and alternative (H 1 ) hypothesis 2. Consider
Differential equations
Differential equations Differential equations: An equation inoling one dependent ariable and its deriaties w. r. t one or more independent ariables is called a differential equation. Order of differential
D Alembert s Solution to the Wave Equation
D Alembert s Solution to the Wave Equation MATH 467 Partial Differential Equations J. Robert Buchanan Department of Mathematics Fall 2018 Objectives In this lesson we will learn: a change of variable technique
Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.
Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο The time integral of a force is referred to as impulse, is determined by and is obtained from: Newton s 2 nd Law of motion states that the action
Appendix to On the stability of a compressible axisymmetric rotating flow in a pipe. By Z. Rusak & J. H. Lee
Appendi to On the stability of a compressible aisymmetric rotating flow in a pipe By Z. Rusak & J. H. Lee Journal of Fluid Mechanics, vol. 5 4, pp. 5 4 This material has not been copy-edited or typeset
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 10η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Ψηφιακή Οικονομία Διάλεξη 0η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών Best Response Curves Used to solve for equilibria in games
Differentiation exercise show differential equation
Differentiation exercise show differential equation 1. If y x sin 2x, prove that x d2 y 2 2 + 2y x + 4xy 0 y x sin 2x sin 2x + 2x cos 2x 2 2cos 2x + (2 cos 2x 4x sin 2x) x d2 y 2 2 + 2y x + 4xy (2x cos
Lanczos and biorthogonalization methods for eigenvalues and eigenvectors of matrices
Lanzos and iorthogonalization methods for eigenvalues and eigenvetors of matries rolem formulation Many prolems are redued to solving the following system: x x where is an unknown numer А a matrix n n
Quadratic Expressions
Quadratic Expressions. The standard form of a quadratic equation is ax + bx + c = 0 where a, b, c R and a 0. The roots of ax + bx + c = 0 are b ± b a 4ac. 3. For the equation ax +bx+c = 0, sum of the roots
SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM
SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM Solutions to Question 1 a) The cumulative distribution function of T conditional on N n is Pr (T t N n) Pr (max (X 1,..., X N ) t N n) Pr (max
Proving with Computer Assistance Lecture 2. Herman Geuvers
Proving with Computer Assistance Lecture 2 Herman Geuvers 1 Typed λ calculus as the basis for a Proof Assistant (e.g. Coq) λ-term program proof type specification formula Integrated system for proving
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Ψηφιακή Οικονομία Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών Τέλος Ενότητας Χρηματοδότηση Το παρόν εκπαιδευτικό υλικό έχει αναπτυχθεί
Συστήματα Διαχείρισης Βάσεων Δεδομένων
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Συστήματα Διαχείρισης Βάσεων Δεδομένων Φροντιστήριο 9: Transactions - part 1 Δημήτρης Πλεξουσάκης Τμήμα Επιστήμης Υπολογιστών Tutorial on Undo, Redo and Undo/Redo
Tridiagonal matrices. Gérard MEURANT. October, 2008
Tridiagonal matrices Gérard MEURANT October, 2008 1 Similarity 2 Cholesy factorizations 3 Eigenvalues 4 Inverse Similarity Let α 1 ω 1 β 1 α 2 ω 2 T =......... β 2 α 1 ω 1 β 1 α and β i ω i, i = 1,...,
ECE Spring Prof. David R. Jackson ECE Dept. Notes 2
ECE 634 Spring 6 Prof. David R. Jackson ECE Dept. Notes Fields in a Source-Free Region Example: Radiation from an aperture y PEC E t x Aperture Assume the following choice of vector potentials: A F = =
Figure A.2: MPC and MPCP Age Profiles (estimating ρ, ρ = 2, φ = 0.03)..
Supplemental Material (not for publication) Persistent vs. Permanent Income Shocks in the Buffer-Stock Model Jeppe Druedahl Thomas H. Jørgensen May, A Additional Figures and Tables Figure A.: Wealth and
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Procedures and Functions Stored procedures and functions are named blocks of code that enable you to group and organize a series of SQL and PL/SQL
Space-Time Symmetries
Chapter Space-Time Symmetries In classical fiel theory any continuous symmetry of the action generates a conserve current by Noether's proceure. If the Lagrangian is not invariant but only shifts by a
The challenges of non-stable predicates
The challenges of non-stable predicates Consider a non-stable predicate Φ encoding, say, a safety property. We want to determine whether Φ holds for our program. The challenges of non-stable predicates
HISTOGRAMS AND PERCENTILES What is the 25 th percentile of a histogram? What is the 50 th percentile for the cigarette histogram?
HISTOGRAMS AND PERCENTILES What is the 25 th percentile of a histogram? The point on the horizontal axis such that of the area under the histogram lies to the left of that point (and to the right) What
EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)
EPL 603 TOPICS IN SOFTWARE ENGINEERING Lab 5: Component Adaptation Environment (COPE) Performing Static Analysis 1 Class Name: The fully qualified name of the specific class Type: The type of the class
CE 530 Molecular Simulation
C 53 olecular Siulation Lecture Histogra Reweighting ethods David. Kofke Departent of Cheical ngineering SUNY uffalo kofke@eng.buffalo.edu Histogra Reweighting ethod to cobine results taken at different