Reasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Reasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples"

Transcription

1 Chir of Softwre Engineering Resoning nd progrmming Einführung in die Progrmmierung Introduction to Progrmming Prof. Dr. Bertrnd Meyer Octoer 2006 Ferury 2007 Lecture 5: Invrints nd Logic Logic is the sis of Mthemtics: proofs re only vlid if they follow the rules of logic. Softwre development: Conditions in contrcts: x must not e zero, so tht we cn clculte x+ 7 x. Conditions in progrm ctions: If i is positive, then execute this instruction. (to e introduced in lter lecture) Intro. to Progrmming, lecture 1: Overview 4 Boolen expressions A condition is expressed s oolen expression. It consists of oolen vriles (identifiers denoting oolen vlues) oolen opertors (not, or, nd, =, implies) nd represents possile oolen vlues (truth vlues, either or ). 2 Intro. to Progrmming, lecture 1: Overview 5 Resoning Exmples Progrmming is resoning. Logic is the science of resoning. We use logic in our every dys life: Socrtes is humn. All humns re mortl. Therefore Socrtes must e mortl. Exmples of oolen expressions (with rin_tody nd cuckoo_sng_lst_night s oolen vriles): rin_tody ( oolen vrile is oolen expression) not rin_tody (not cuckoo_sng_lst_night) implies rin_tody (Prentheses group su-expressions.) Intro. to Progrmming, lecture 1: Overview 3 Intro. to Progrmming, lecture 1: Overview 6 1

2 Negtion (not) Complex expressions not For ny oolen expression e nd ny vlues of vriles: Exctly one of e nd not e hs vlue. Exctly one of e nd not e hs vlue. One of e nd not e hs vlue. (Principle of the Excluded Middle.) Not oth of e nd not e hve vlue. (Principle of Non-Contrdiction.) Build more complex oolen expressions y using the oolen opertors. Exmple: nd ( nd (not c)) Intro. to Progrmming, lecture 1: Overview 7 Intro. to Progrmming, lecture 1: Overview 10 Disjunction (or) Truth ssignment nd truth tle or Truth ssignment for set of vriles: prticulr choice of vlues ( or ), for every vrile. or opertor is non-exclusive. or opertor is commuttive. Disjunction principle: An or disjunction hs vlue except if oth opernds hve vlue. A truth ssignment stisfies n expression if the vlue for the expression is. A truth tle for n expression with n vriles hs n+1 columns 2 n rows Intro. to Progrmming, lecture 1: Overview 8 Intro. to Progrmming, lecture 1: Overview 11 Conjunction (nd) Comined truth tle for sic opertors nd not or nd nd opertor is commuttive. Dulity of nd nd or: properties of either opertor yield properties of other (negting + swpping nd ) Conjunction principle: An nd conjunction hs vlue except if oth opernds hve vlue. Intro. to Progrmming, lecture 1: Overview 9 Intro. to Progrmming, lecture 1: Overview 12 2

3 Tutologies De Morgn s lws Tutology: oolen expression tht hs vlue for every possile truth ssignment. Exmples: or (not ) not ( nd (not )) ( nd ) or ((not ) or (not )) De Morgn s Lws: Tutologies (not ( or )) = ((not ) nd (not )) (not ( nd )) = ((not ) or (not )) More tutologies: ( nd ( or c)) = (( nd ) or ( nd c)) ( or ( nd c)) = (( or ) nd ( or c)) Intro. to Progrmming, lecture 1: Overview 13 Intro. to Progrmming, lecture 1: Overview 16 Contrdictions Contrdiction: oolen expression tht hs vlue for every possile truth ssignment. Exmples: nd (not ) Stisfile: for t lest one truth ssignment the expression yields. Any tutology is stisfile. No contrdiction is stisfile. Binding Order of inding (strting with tightest inding): not, nd, or, implies (to e introduced), =. nd nd or re ssocitive: nd ( nd c) = ( nd ) nd c or ( or c) = ( or ) or c Style rules: When writing oolen expression, drop the prentheses: Around the expressions of ech side of = if whole expression is n equivlence. Around successive elementry terms if they re seprted y the sme ssocitive opertors. Intro. to Progrmming, lecture 1: Overview 14 Intro. to Progrmming, lecture 1: Overview 17 Equivlence (=) = = opertor is commuttive ( = hs sme vlue s = ). = opertor is reflexive ( = is tutology for ny ). Sustitution: For ny expressions u, v nd e, if u = v is tutology nd e is the expression otined from e y replcing every occurrence of u y v, then e = e is tutology. Impliction (implies) implies implies, for ny nd, is the vlue of (not ) or In implies : is ntecedent, consequent Impliction principle: An impliction hs vlue except if its ntecedent hs vlue nd its consequent hs vlue In prticulr, lwys if ntecedent is Intro. to Progrmming, lecture 1: Overview 15 Intro. to Progrmming, lecture 1: Overview 18 3

4 Impliction in ordinry lnguge implies in ordinry lnguge often mens custion, s in if then Reversing implictions (2) Correct: implies = (not ) implies (not ) If the wether stys like this, skiing will e gret this week-end. If you put this stuff in your hnd luggge, they won t let you through. Exmple: All the people who live ner the lke re rich. She is not rich, so she cn t e living in Küsncht live_ner_lke implies rich = (not rich) implies (not live_ner_lke ) Intro. to Progrmming, lecture 1: Overview 19 Intro. to Progrmming, lecture 1: Overview 22 Misunderstnding implictions Impliction Whenever is, implies is, regrdless of : If tody is Wednesdy, 2+2=5. If 2+2=5, tody is Wednesdy. Both of the ove implictions re. Cses in which is tell us nothing out the truth of the consequent. Intro. to Progrmming, lecture 1: Overview 20 Intro. to Progrmming, lecture 1: Overview 23 Reversing implictions (1) It is not generlly true tht implies = (not ) implies (not ) Exmple (wrong!): All the people in Zurich who live ner the lke re rich. I do not live ner the lke, so I m not rich. live_ner_lke implies rich [1] Semistrict oolen opertors (1) Exmple oolen-vlued expression (x is n integer): x +7 x >1 for x <= -7 Undefined for x = 0 (not live_ner_lke ) implies (not rich ) [2] Intro. to Progrmming, lecture 1: Overview 21 Intro. to Progrmming, lecture 1: Overview 24 4

5 Semistrict oolen opertors (2) Ordinry vs. non-strict oolen opertors BUT: Division y zero: x must not e 0. (x /= 0) nd ( x +7 > 0 ) x Use Ordinry oolen opertors (nd nd or) if you cn gurntee tht oth opernds re defined. nd then, if condition only mkes sense when nother is true. or else, if condition only mkes sense when nother is flse. Exmple: If you re not single, then your spouse must sign the contrct. is_single or else spouse_must_sign Intro. to Progrmming, lecture 1: Overview 25 Intro. to Progrmming, lecture 1: Overview 28 Semistrict oolen opertors (3) Non-strict impliction BUT: nd is commuttive (progrm would crsh). We need non-commuttive version of nd (nd or): Non-strict oolen opertors. Exmple: If you re not single, then your spouse must sign the contrct. (not is_single) implies spouse_must_sign Definition of implies: in our cse, lwys non-strict! implies = (not ) or else Intro. to Progrmming, lecture 1: Overview 26 Intro. to Progrmming, lecture 1: Overview 29 Non-strict opertors (nd then, or else) Eiffel keywords nd mthemticl symols nd then : hs sme vlue s nd if nd re defined, nd hs whenever hs vlue. or else : hs sme vlue s or if nd re defined, nd hs whenever hs vlue. (x /= 0) nd then ( x +7 ) x >0 Non-strict opertors llow us to define n order of expression evlution (left to right). Importnt for progrmming when undefined ojects my cuse progrm crshes. Eiffel keyword not or nd = implies Common mthemticl symol ~ or Intro. to Progrmming, lecture 1: Overview 27 Intro. to Progrmming, lecture 1: Overview 30 5

6 Propositionl nd predicte clculus Existentilly quntified expression Propositionl clculus: property p holds for single oject Predicte clculus: property p holds for severl ojects Boolen expression: s : SOME_SET s.some_property if nd only if t lest one memer of SOME_SET stisfies property some_property Proving : Find one element of SOME_SET tht stisfies the property : Prove tht no element of SOME_SET stisfies the property (test ll elements) Intro. to Progrmming, lecture 1: Overview 31 Intro. to Progrmming, lecture 1: Overview 34 Generlizing or Universlly quntified expression G : group of ojects, p : property or: Does t lest one of the ojects in G stisfy p? Is t lest one sttion of Line 8 n exchnge? Sttion_Blrd.is_exchnge or Sttion_Lourmel.is_exchnge or Sttion_Boucicut.is_exchnge or (ll sttions of Line 8) Existentil quntifier: exists, or s : Sttions_8 s.is_exchnge There exists n s in Sttions_8 such tht s.is_exchnge is true Boolen expression: s: SOME_SET s.some_property if nd only if every memer of SOME_SET stisfies property some_property wht out empty sets? not ( s: SOME_SET not s.some_property) Proving : Prove tht every element of SOME_SET stisfies the property (test ll elements) : Find one element of SOME_SET tht does not stisfies the property Intro. to Progrmming, lecture 1: Overview 32 Intro. to Progrmming, lecture 1: Overview 35 Generlizing nd Dulity nd: Does every oject in G stisfy p? Are ll sttions of Trm 8 exchnges? Sttion_Blrd.is_exchnge nd Sttion_Lourmel.is_exchnge nd Sttion_Boucicut.is_exchnge nd (ll sttions of Line 8) Generliztion of DeMorgn s lws: not ( s : SOME_SET P ) = s : SOME_SET not P not ( s : SOME_SET P ) = s : SOME_SET not P Universl quntifier: for_ll, or s: Sttions_8 s.is_exchnge For ll s in Sttions8 s.is_exchnge is true Intro. to Progrmming, lecture 1: Overview 33 Intro. to Progrmming, lecture 1: Overview 36 6

7 Empty sets s : SOME_SET some_property with SOME_SET empty lwys s : SOME_SET some_property with SOME_SET empty lwys Intro. to Progrmming, lecture 1: Overview 37 Key concepts Logic s tool for resoning Boolen opertors: truth tles Properties of oolen opertors: don t use truth tles! Predicte clculus: to tlk out logicl properties of sets Non-strict oolen opertors Intro. to Progrmming, lecture 1: Overview 38 End of lecture 5 Intro. to Progrmming, lecture 1: Overview 39 7

Boolean Algebra. Boolean Algebra

Boolean Algebra. Boolean Algebra Boolen Alger Boolen Alger A Boolen lger is set B of vlues together with: - two inry opertions, commonly denoted y + nd, - unry opertion, usully denoted y ˉ or ~ or, - two elements usully clled zero nd

More information

Lecture 2 : Propositions DRAFT

Lecture 2 : Propositions DRAFT CS/Mth 240: Introduction to Discrete Mthemtics 1/20/2010 Lecture 2 : Propositions Instructor: Dieter vn Melkeeek Scrie: Dlior Zelený DRAFT Lst time we nlyzed vrious mze solving lgorithms in order to illustrte

More information

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation CS2N: The Coming Revolution in Computer Architecture Lortory 2 Preprtion Ojectives:. Understnd the principle of sttic CMOS gte circuits 2. Build simple logic gtes from MOS trnsistors 3. Evlute these gtes

More information

Fachgebiet Rechnersysteme1. 1. Boolean Algebra. 1. Boolean Algebra. Verification Technology. Content. 1.1 Boolean algebra basics (recap)

Fachgebiet Rechnersysteme1. 1. Boolean Algebra. 1. Boolean Algebra. Verification Technology. Content. 1.1 Boolean algebra basics (recap) . Boolen Alger Fchgeiet Rechnersysteme. Boolen Alger Veriiction Technology Content. Boolen lger sics (recp).2 Resoning out Boolen expressions . Boolen Alger 2 The prolem o logic veriiction: Show tht two

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

More information

INF1383 -Bancos de Dados

INF1383 -Bancos de Dados 3//0 INF383 -ncos de Ddos Prof. Sérgio Lifschitz DI PUC-Rio Eng. Computção, Sistems de Informção e Ciênci d Computção LGER RELCIONL lguns slides sedos ou modificdos dos originis em Elmsri nd Nvthe, Fundmentls

More information

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows: Improper Integrls The First Fundmentl Theorem of Clculus, s we ve discussed in clss, goes s follows: If f is continuous on the intervl [, ] nd F is function for which F t = ft, then ftdt = F F. An integrl

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

Complexity in Modal Team Logic

Complexity in Modal Team Logic ThI Theoretische Informtik Complexity in Modl Tem Logic Julin-Steffen Müller Theoretische Informtik 18. Jnur 2012 Theorietg 2012 Theoretische Informtik Inhlt 1 Preliminries 2 Closure properties 3 Model

More information

Learning Goals. Relational Query Languages. Formal Relational Query Languages. Formal Query Languages: Relational Algebra and Relational Calculus

Learning Goals. Relational Query Languages. Formal Relational Query Languages. Formal Query Languages: Relational Algebra and Relational Calculus Forml Query Lnguges: Reltionl Alger nd Reltionl Clculus Chpter 4 Lerning Gols Given dtse ( set of tles ) you will e le to express dtse query in Reltionl Alger (RA), involving the sic opertors (selection,

More information

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

Lecture 1. Functional series. Pointwise and uniform convergence.

Lecture 1. Functional series. Pointwise and uniform convergence. 1 Introduction. Lecture 1. Functionl series. Pointwise nd uniform convergence. In this course we study mongst other things Fourier series. The Fourier series for periodic function f(x) with period 2π is

More information

Elements of Computing Systems, Nisan & Schocken, MIT Press. Boolean Logic

Elements of Computing Systems, Nisan & Schocken, MIT Press. Boolean Logic Elements of Computing Systems, Nisn & Schocken, MIT Press www.idc.c.il/tecs Usge nd Copyright Notice: Boolen Logic Copyright 2005 Nom Nisn nd Shimon Schocken This presenttion contins lecture mterils tht

More information

Introduction to Electrical & Electronic Engineering ENGG1203

Introduction to Electrical & Electronic Engineering ENGG1203 Introduction to Electricl & Electronic Engineering ENGG23 2 nd Semester, 27-8 Dr. Hden Kwok-H So Deprtment of Electricl nd Electronic Engineering Astrction DIGITAL LOGIC 2 Digitl Astrction n Astrct ll

More information

MATH 573 FINAL EXAM. May 30, 2007

MATH 573 FINAL EXAM. May 30, 2007 MATH 573 FINAL EXAM My 30, 007 NAME: Solutions 1. This exm is due Wednesdy, June 6 efore the 1:30 pm. After 1:30 pm I will NOT ccept the exm.. This exm hs 1 pges including this cover. There re 10 prolems.

More information

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique? XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Softwre Engineering using Forml Methods Propositionl nd (Liner) Temporl Logic Wolfgng Ahrendt 13th Septemer 2016 SEFM: Liner Temporl Logic /GU 160913 1 / 60 Recpitultion: FormlistionFormlistion: Syntx,

More information

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

More information

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

4.1. Probability Density Functions

4.1. Probability Density Functions STT 1 4.1-4. 4.1. Proility Density Functions Ojectives. Continuous rndom vrile - vers - discrete rndom vrile. Proility density function. Uniform distriution nd its properties. Expected vlue nd vrince of

More information

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

The Bernoulli Numbers John C. Baez, December 23, x k. x e x 1 = n 0. B k n = n 2 (n + 1) 2

The Bernoulli Numbers John C. Baez, December 23, x k. x e x 1 = n 0. B k n = n 2 (n + 1) 2 The Bernoulli Numbers John C. Bez, December 23, 2003 The numbers re defined by the eqution e 1 n 0 k. They re clled the Bernoulli numbers becuse they were first studied by Johnn Fulhber in book published

More information

Chapter 3 MATRIX. In this chapter: 3.1 MATRIX NOTATION AND TERMINOLOGY

Chapter 3 MATRIX. In this chapter: 3.1 MATRIX NOTATION AND TERMINOLOGY Chpter 3 MTRIX In this chpter: Definition nd terms Specil Mtrices Mtrix Opertion: Trnspose, Equlity, Sum, Difference, Sclr Multipliction, Mtrix Multipliction, Determinnt, Inverse ppliction of Mtrix in

More information

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada STRUCTURE OF CONCURRENCY Ryszrd Jnicki Deprtment of Computing nd Softwre McMster University Hmilton, ON, L8S 4K1 Cnd jnicki@mcmster.c 1 Introduction Wht is concurrency? How it cn e modelled? Wht re the

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Homework 6. This homework is due October 11, 2016, at Noon.

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Homework 6. This homework is due October 11, 2016, at Noon. EECS 16A Designing Informtion Devices nd Systems I Fll 2016 Bk Ayzifr, Vldimir Stojnovic Homework 6 This homework is due Octoer 11, 2016, t Noon. 1. Homework process nd study group Who else did you work

More information

u(t)dt + i a f(t)dt f(t) dt b f(t) dt (2) With this preliminary step in place, we are ready to define integration on a general curve in C.

u(t)dt + i a f(t)dt f(t) dt b f(t) dt (2) With this preliminary step in place, we are ready to define integration on a general curve in C. Lecture 4 Complex Integrtion MATH-GA 2451.001 Complex Vriles 1 Construction 1.1 Integrting complex function over curve in C A nturl wy to construct the integrl of complex function over curve in the complex

More information

DATABASTEKNIK - 1DL116

DATABASTEKNIK - 1DL116 DATABASTEKNIK - DL6 Spring 004 An introductury course on dtse systems http://user.it.uu.se/~udl/dt-vt004/ Kjell Orsorn Uppsl Dtse Lortory Deprtment of Informtion Technology, Uppsl University, Uppsl, Sweden

More information

Pre-Session Review. Part 1: Basic Algebra; Linear Functions and Graphs

Pre-Session Review. Part 1: Basic Algebra; Linear Functions and Graphs Pre-Session Review Prt 1: Bsic Algebr; Liner Functions nd Grphs A. Generl Review nd Introduction to Algebr Hierrchy of Arithmetic Opertions Opertions in ny expression re performed in the following order:

More information

The Dirichlet Problem in a Two Dimensional Rectangle. Section 13.5

The Dirichlet Problem in a Two Dimensional Rectangle. Section 13.5 The Dirichlet Prolem in Two Dimensionl Rectngle Section 13.5 1 Dirichlet Prolem in Rectngle In these notes we will pply the method of seprtion of vriles to otin solutions to elliptic prolems in rectngle

More information

dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω.

dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω. Chpter 8 Stility theory We discuss properties of solutions of first order two dimensionl system, nd stility theory for specil clss of liner systems. We denote the independent vrile y t in plce of x, nd

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics SCHOOL OF ENGINEERING & BUIL ENVIRONMEN Mthemtics An Introduction to Mtrices Definition of Mtri Size of Mtri Rows nd Columns of Mtri Mtri Addition Sclr Multipliction of Mtri Mtri Multipliction 7 rnspose

More information

Quadratic reciprocity

Quadratic reciprocity Qudrtic recirocity Frncisc Bozgn Los Angeles Mth Circle Octoer 8, 01 1 Qudrtic Recirocity nd Legendre Symol In the eginning of this lecture, we recll some sic knowledge out modulr rithmetic: Definition

More information

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp.

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp. MA123, Chpter 1: Formuls for integrls: integrls, ntiderivtives, nd the Fundmentl Theorem of Clculus (pp. 27-233, Gootmn) Chpter Gols: Assignments: Understnd the sttement of the Fundmentl Theorem of Clculus.

More information

expression simply by forming an OR of the ANDs of all input variables for which the output is

expression simply by forming an OR of the ANDs of all input variables for which the output is 2.4 Logic Minimiztion nd Krnugh Mps As we found ove, given truth tle, it is lwys possile to write down correct logic expression simply y forming n OR of the ANDs of ll input vriles for which the output

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

More information

Homework Solution - Set 5 Due: Friday 10/03/08

Homework Solution - Set 5 Due: Friday 10/03/08 CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

More information

63. Representation of functions as power series Consider a power series. ( 1) n x 2n for all 1 < x < 1

63. Representation of functions as power series Consider a power series. ( 1) n x 2n for all 1 < x < 1 3 9. SEQUENCES AND SERIES 63. Representtion of functions s power series Consider power series x 2 + x 4 x 6 + x 8 + = ( ) n x 2n It is geometric series with q = x 2 nd therefore it converges for ll q =

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

Linear Systems with Constant Coefficients

Linear Systems with Constant Coefficients Liner Systems with Constnt Coefficients 4-3-05 Here is system of n differentil equtions in n unknowns: x x + + n x n, x x + + n x n, x n n x + + nn x n This is constnt coefficient liner homogeneous system

More information

MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35

MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35 MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35 9. Modules over PID This week we re proving the fundmentl theorem for finitely generted modules over PID, nmely tht they re ll direct sums of cyclic modules.

More information

Continuous Random Variables

Continuous Random Variables STAT/MATH 395 A - PROBABILITY II UW Winter Qurter 217 Néhémy Lim Continuous Rndom Vribles Nottion. The indictor function of set S is rel-vlued function defined by : { 1 if x S 1 S (x) if x S Suppose tht

More information

Continuous Random Variables Class 5, Jeremy Orloff and Jonathan Bloom

Continuous Random Variables Class 5, Jeremy Orloff and Jonathan Bloom Lerning Gols Continuous Rndom Vriles Clss 5, 8.05 Jeremy Orloff nd Jonthn Bloom. Know the definition of continuous rndom vrile. 2. Know the definition of the proility density function (pdf) nd cumultive

More information

9.4. The Vector Product. Introduction. Prerequisites. Learning Outcomes

9.4. The Vector Product. Introduction. Prerequisites. Learning Outcomes The Vector Product 9.4 Introduction In this section we descrie how to find the vector product of two vectors. Like the sclr product its definition my seem strnge when first met ut the definition is chosen

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

MTH 505: Number Theory Spring 2017

MTH 505: Number Theory Spring 2017 MTH 505: Numer Theory Spring 207 Homework 2 Drew Armstrong The Froenius Coin Prolem. Consider the eqution x ` y c where,, c, x, y re nturl numers. We cn think of $ nd $ s two denomintions of coins nd $c

More information

The mth Ratio Convergence Test and Other Unconventional Convergence Tests

The mth Ratio Convergence Test and Other Unconventional Convergence Tests The mth Rtio Convergence Test nd Other Unconventionl Convergence Tests Kyle Blckburn My 14, 2012 Contents 1 Introduction 2 2 Definitions, Lemms, nd Theorems 2 2.1 Defintions.............................

More information

Good Review book ( ) ( ) ( )

Good Review book ( ) ( ) ( ) 7/31/2011 34 Boolen (Switching) Algebr Review Good Review book BeBop to the Boolen Boogie: An Unconventionl Guide to Electronics, 2 nd ed. by Clive Mxwell Hightext Publictions Inc. from Amzon.com for pprox.

More information

Analytically, vectors will be represented by lowercase bold-face Latin letters, e.g. a, r, q.

Analytically, vectors will be represented by lowercase bold-face Latin letters, e.g. a, r, q. 1.1 Vector Alger 1.1.1 Sclrs A physicl quntity which is completely descried y single rel numer is clled sclr. Physiclly, it is something which hs mgnitude, nd is completely descried y this mgnitude. Exmples

More information

Math 8 Winter 2015 Applications of Integration

Math 8 Winter 2015 Applications of Integration Mth 8 Winter 205 Applictions of Integrtion Here re few importnt pplictions of integrtion. The pplictions you my see on n exm in this course include only the Net Chnge Theorem (which is relly just the Fundmentl

More information

Context-Free Grammars and Languages

Context-Free Grammars and Languages Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

8 Laplace s Method and Local Limit Theorems

8 Laplace s Method and Local Limit Theorems 8 Lplce s Method nd Locl Limit Theorems 8. Fourier Anlysis in Higher DImensions Most of the theorems of Fourier nlysis tht we hve proved hve nturl generliztions to higher dimensions, nd these cn be proved

More information

EE273 Lecture 15 Asynchronous Design November 16, Today s Assignment

EE273 Lecture 15 Asynchronous Design November 16, Today s Assignment EE273 Lecture 15 Asynchronous Design Novemer 16, 199 Willim J. Dlly Computer Systems Lortory Stnford University illd@csl.stnford.edu 1 Tody s Assignment Term Project see project updte hndout on we checkpoint

More information

Acceptance Sampling by Attributes

Acceptance Sampling by Attributes Introduction Acceptnce Smpling by Attributes Acceptnce smpling is concerned with inspection nd decision mking regrding products. Three spects of smpling re importnt: o Involves rndom smpling of n entire

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Determinants Chapter 3

Determinants Chapter 3 Determinnts hpter Specil se : x Mtrix Definition : the determinnt is sclr quntity defined for ny squre n x n mtrix nd denoted y or det(). x se ecll : this expression ppers in the formul for x mtrix inverse!

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

ECON 331 Lecture Notes: Ch 4 and Ch 5

ECON 331 Lecture Notes: Ch 4 and Ch 5 Mtrix Algebr ECON 33 Lecture Notes: Ch 4 nd Ch 5. Gives us shorthnd wy of writing lrge system of equtions.. Allows us to test for the existnce of solutions to simultneous systems. 3. Allows us to solve

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

10. AREAS BETWEEN CURVES

10. AREAS BETWEEN CURVES . AREAS BETWEEN CURVES.. Ares etween curves So res ove the x-xis re positive nd res elow re negtive, right? Wrong! We lied! Well, when you first lern out integrtion it s convenient fiction tht s true in

More information

REVIEW Chapter 1 The Real Number System

REVIEW Chapter 1 The Real Number System Mth 7 REVIEW Chpter The Rel Number System In clss work: Solve ll exercises. (Sections. &. Definition A set is collection of objects (elements. The Set of Nturl Numbers N N = {,,,, 5, } The Set of Whole

More information

Variational Techniques for Sturm-Liouville Eigenvalue Problems

Variational Techniques for Sturm-Liouville Eigenvalue Problems Vritionl Techniques for Sturm-Liouville Eigenvlue Problems Vlerie Cormni Deprtment of Mthemtics nd Sttistics University of Nebrsk, Lincoln Lincoln, NE 68588 Emil: vcormni@mth.unl.edu Rolf Ryhm Deprtment

More information

Normal Forms for Context-free Grammars

Normal Forms for Context-free Grammars Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

More information

Resistors. Consider a uniform cylinder of material with mediocre to poor to pathetic conductivity ( )

Resistors. Consider a uniform cylinder of material with mediocre to poor to pathetic conductivity ( ) 10/25/2005 Resistors.doc 1/7 Resistors Consider uniform cylinder of mteril with mediocre to poor to r. pthetic conductivity ( ) ˆ This cylinder is centered on the -xis, nd hs length. The surfce re of the

More information

Intuitionistic Fuzzy Lattices and Intuitionistic Fuzzy Boolean Algebras

Intuitionistic Fuzzy Lattices and Intuitionistic Fuzzy Boolean Algebras Intuitionistic Fuzzy Lttices nd Intuitionistic Fuzzy oolen Algebrs.K. Tripthy #1, M.K. Stpthy *2 nd P.K.Choudhury ##3 # School of Computing Science nd Engineering VIT University Vellore-632014, TN, Indi

More information

MATH 1080: Calculus of One Variable II Fall 2017 Textbook: Single Variable Calculus: Early Transcendentals, 7e, by James Stewart.

MATH 1080: Calculus of One Variable II Fall 2017 Textbook: Single Variable Calculus: Early Transcendentals, 7e, by James Stewart. MATH 1080: Clculus of One Vrile II Fll 2017 Textook: Single Vrile Clculus: Erly Trnscendentls, 7e, y Jmes Stewrt Unit 2 Skill Set Importnt: Students should expect test questions tht require synthesis of

More information

CS/CE/SE 6367 Software Testing, Validation and Verification. Lecture 4 Code Coverage (II)

CS/CE/SE 6367 Software Testing, Validation and Verification. Lecture 4 Code Coverage (II) CS/CE/SE 6367 Softwre Testing, Vlidtion nd Verifiction Lecture 4 Code Coverge (II) 2/54 Lst Clss Code coverge Control-flow coverge Sttement coverge Brnch coverge Pth coverge Coverge Collection Tools EclEmm

More information

along the vector 5 a) Find the plane s coordinate after 1 hour. b) Find the plane s coordinate after 2 hours. c) Find the plane s coordinate

along the vector 5 a) Find the plane s coordinate after 1 hour. b) Find the plane s coordinate after 2 hours. c) Find the plane s coordinate L8 VECTOR EQUATIONS OF LINES HL Mth - Sntowski Vector eqution of line 1 A plne strts journey t the point (4,1) moves ech hour long the vector. ) Find the plne s coordinte fter 1 hour. b) Find the plne

More information

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

More information

Classification: Rules. Prof. Pier Luca Lanzi Laurea in Ingegneria Informatica Politecnico di Milano Polo regionale di Como

Classification: Rules. Prof. Pier Luca Lanzi Laurea in Ingegneria Informatica Politecnico di Milano Polo regionale di Como Metodologie per Sistemi Intelligenti Clssifiction: Prof. Pier Luc Lnzi Lure in Ingegneri Informtic Politecnico di Milno Polo regionle di Como Rules Lecture outline Why rules? Wht re clssifiction rules?

More information

USA Mathematical Talent Search Round 1 Solutions Year 21 Academic Year

USA Mathematical Talent Search Round 1 Solutions Year 21 Academic Year 1/1/21. Fill in the circles in the picture t right with the digits 1-8, one digit in ech circle with no digit repeted, so tht no two circles tht re connected by line segment contin consecutive digits.

More information

Math 360: A primitive integral and elementary functions

Math 360: A primitive integral and elementary functions Mth 360: A primitive integrl nd elementry functions D. DeTurck University of Pennsylvni October 16, 2017 D. DeTurck Mth 360 001 2017C: Integrl/functions 1 / 32 Setup for the integrl prtitions Definition:

More information

3.1 Review of Sine, Cosine and Tangent for Right Angles

3.1 Review of Sine, Cosine and Tangent for Right Angles Foundtions of Mth 11 Section 3.1 Review of Sine, osine nd Tngent for Right Tringles 125 3.1 Review of Sine, osine nd Tngent for Right ngles The word trigonometry is derived from the Greek words trigon,

More information

Sturm-Liouville Theory

Sturm-Liouville Theory LECTURE 1 Sturm-Liouville Theory In the two preceing lectures I emonstrte the utility of Fourier series in solving PDE/BVPs. As we ll now see, Fourier series re just the tip of the iceerg of the theory

More information

Polynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230

Polynomial Approximations for the Natural Logarithm and Arctangent Functions. Math 230 Polynomil Approimtions for the Nturl Logrithm nd Arctngent Functions Mth 23 You recll from first semester clculus how one cn use the derivtive to find n eqution for the tngent line to function t given

More information

The final exam will take place on Friday May 11th from 8am 11am in Evans room 60.

The final exam will take place on Friday May 11th from 8am 11am in Evans room 60. Mth 104: finl informtion The finl exm will tke plce on Fridy My 11th from 8m 11m in Evns room 60. The exm will cover ll prts of the course with equl weighting. It will cover Chpters 1 5, 7 15, 17 21, 23

More information

#A29 INTEGERS 17 (2017) EQUALITY OF DEDEKIND SUMS MODULO 24Z

#A29 INTEGERS 17 (2017) EQUALITY OF DEDEKIND SUMS MODULO 24Z #A29 INTEGERS 17 (2017) EQUALITY OF DEDEKIND SUMS MODULO 24Z Kurt Girstmir Institut für Mthemtik, Universität Innsruck, Innsruck, Austri kurt.girstmir@uik.c.t Received: 10/4/16, Accepted: 7/3/17, Pulished:

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More information

Matrix & Vector Basic Linear Algebra & Calculus

Matrix & Vector Basic Linear Algebra & Calculus Mtrix & Vector Bsic Liner lgebr & lculus Wht is mtrix? rectngulr rry of numbers (we will concentrte on rel numbers). nxm mtrix hs n rows n m columns M x4 M M M M M M M M M M M M 4 4 4 First row Secon row

More information

Math 259 Winter Solutions to Homework #9

Math 259 Winter Solutions to Homework #9 Mth 59 Winter 9 Solutions to Homework #9 Prolems from Pges 658-659 (Section.8). Given f(, y, z) = + y + z nd the constrint g(, y, z) = + y + z =, the three equtions tht we get y setting up the Lgrnge multiplier

More information

Resources. Introduction: Binding. Resource Types. Resource Sharing. The type of a resource denotes its ability to perform different operations

Resources. Introduction: Binding. Resource Types. Resource Sharing. The type of a resource denotes its ability to perform different operations Introduction: Binding Prt of 4-lecture introduction Scheduling Resource inding Are nd performnce estimtion Control unit synthesis This lecture covers Resources nd resource types Resource shring nd inding

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

STURM-LIOUVILLE BOUNDARY VALUE PROBLEMS

STURM-LIOUVILLE BOUNDARY VALUE PROBLEMS STURM-LIOUVILLE BOUNDARY VALUE PROBLEMS Throughout, we let [, b] be bounded intervl in R. C 2 ([, b]) denotes the spce of functions with derivtives of second order continuous up to the endpoints. Cc 2

More information

Deciding Hyperproperties

Deciding Hyperproperties ne.jpeg Deciding Hyperproperties Bernd Finkeiner nd Christopher Hhn Rective Systems Group Srlnd University, Germny Highlights of Logic, Gmes nd Automt Brussels, 06.-09. Septemer 2016 0 Informti Lekge Hertleed

More information

The solutions of the single electron Hamiltonian were shown to be Bloch wave of the form: ( ) ( ) ikr

The solutions of the single electron Hamiltonian were shown to be Bloch wave of the form: ( ) ( ) ikr Lecture #1 Progrm 1. Bloch solutions. Reciprocl spce 3. Alternte derivtion of Bloch s theorem 4. Trnsforming the serch for egenfunctions nd eigenvlues from solving PDE to finding the e-vectors nd e-vlues

More information

Shape and measurement

Shape and measurement C H A P T E R 5 Shpe nd mesurement Wht is Pythgors theorem? How do we use Pythgors theorem? How do we find the perimeter of shpe? How do we find the re of shpe? How do we find the volume of shpe? How do

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

More information

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

Signal Flow Graphs. Consider a complex 3-port microwave network, constructed of 5 simpler microwave devices:

Signal Flow Graphs. Consider a complex 3-port microwave network, constructed of 5 simpler microwave devices: 3/3/009 ignl Flow Grphs / ignl Flow Grphs Consider comple 3-port microwve network, constructed of 5 simpler microwve devices: 3 4 5 where n is the scttering mtri of ech device, nd is the overll scttering

More information

Line Integrals. Partitioning the Curve. Estimating the Mass

Line Integrals. Partitioning the Curve. Estimating the Mass Line Integrls Suppose we hve curve in the xy plne nd ssocite density δ(p ) = δ(x, y) t ech point on the curve. urves, of course, do not hve density or mss, but it my sometimes be convenient or useful to

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

The Dirac distribution

The Dirac distribution A DIRAC DISTRIBUTION A The Dirc distribution A Definition of the Dirc distribution The Dirc distribution δx cn be introduced by three equivlent wys Dirc [] defined it by reltions δx dx, δx if x The distribution

More information

LINEAR ALGEBRA APPLIED

LINEAR ALGEBRA APPLIED 5.5 Applictions of Inner Product Spces 5.5 Applictions of Inner Product Spces 7 Find the cross product of two vectors in R. Find the liner or qudrtic lest squres pproimtion of function. Find the nth-order

More information