Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms
|
|
- Kelly Cobb
- 6 years ago
- Views:
Transcription
1 Preview Greed Algorithms Greed Algorithms Coin Chnge Huffmn Code Greed lgorithms end to e simple nd strightforwrd. Are often used to solve optimiztion prolems. Alws mke the choice tht looks est t the moment, i.e., locll optiml choice Greed lgorithms mke locll optiml choices hoping tht the will led to gloll optiml solution. Of course, this is not lws true ut there re prolems for which it is. 1 2 Coin Chnge Coin Chnge Prolem Mke chnge for given mount using the smllest possile numer of coins. he ville coins re: dollrs (100 cents) qurters ( cents) dimes (10 cents) nickels (5 cents) pennies (1 cent) Greed strteg Sum = 0 Repetedl choose the lrgest coin k such tht Sum + k otl chnge mount 3 4 Coin Chnge Coin Chnge MAKE-CHANGE (n) C {100,, 10, 5, 1} // constnt. Sol {}; // set tht will hold the solution set. Sum 0 sum of item in solution set WHILE sum n = lrgest item in set C such tht sum + n IF no such item eists HEN REURN "No Solution" Sol Sol + {vlue of } sum sum + REURN Sol Greed methods do not work in ll cses!! For emple: Coin set = {8, 5, 1}; Chnge = 10. Greed Solution = {8, 1, 1} Optiml Solution (i.e., fewest # of coins) = {5, 5} 5 6 1
2 n ctivities require eclusive use of common resource. For emple, scheduling the use of clssroom. Set of ctivities S = { 1,..., n }. i needs the resource during the period [s i, f i ), which is the hlf-open intervl where s i = strt time nd f i = finish time. Gol: Select the lrgest possile set of non-overlpping ctivities. Alterntive prolems could hve different ojectives, e.g.: Schedule room for longest time. Mimize income rentl fees. 7 8 Consider some set of ctivities S sorted finish time: I S i F i One mimum-size mutull comptile set is { 1, 3, 6, 8 }. his set is not unique: 2, 5, 7, 9 lso works Generl Prolem Description Input: set of ctivities with strting times nd finish times. he ctivities re sorted finish time. Output: mimum size suset of comptile ctivities which could shre n ctivit room. Assume S set of ctivities S = { 1, 2,, n } Ech ctivit i hs strt time s i nd finishing time f i where 0 s i < f i < he set of ctivities S is sorted finishing time wo ctivities i nd j re comptile with ech other if their ctivtion times do not overlp f i s j or f j s i
3 (A Dnmic Progrmming Approch) 0 ime We cn use dnmic progrmming pproch s i i f i s i : strting time of ctivit i s k k Comptile ctivities: etween i nd j etween i nd l etween k nd j etween k nd l f k s j s l j f j l f l f i : finish time of ctivit i Let S ij denote the set of ctivities k comptile with ctivit i nd j. { S : f s f s } S ij k i k k j 13 (A Dnmic Progrmming Approch) (A Dnmic Progrmming Approch) f i 1 2 Some possile S ij re { 2, 4, 7 } { 2, 5, 7 } { 3, 5, 7 } s j Let c[i, j] e numer of ctivities in mimum-size of mutull comptile ctivities in S ij. We hve c[i, j] = 0 whenever S ij =. If k is used for mimum-size of mutull comptile ctivities of S ij, we lso use mimum-size of mutull comptile ctivities for S ik nd S kj (A Dnmic Progrmming Approch) (A Dnmic Progrmming Approch) f i S ik s k f k S kj s j Now we cn write recursive eqution 1 2 Some possile S ij re { 2, 4, 7 } { 2, 5, 7 } { 3, 5, 7 } c i, j] i k [ m k j Sij ( c[ i, k] c[ k, j] 1) if S if S ij ij
4 (A Dnmic Progrmming Approch) (A Greed Approch) When one considers the prolem of selecting ctivities one might hve sudden epiphn Dnmic progrmming lgorithm under construction (A Greed Approch) (A Recursive Greed Algorithm) When one considers the prolem of selecting ctivities one might hve sudden epiphn he ctivit we choose when solving suprolem is lws the one with the erliest finish time tht cn legll e scheduled. Wh? Becuse this greed choice leves the gretest possile leew for scheduling the remining ctivities. GREEDY-ACIVIY-SELECOR(s, f, i, n) { m = i + 1 while m <= n nd s[m] < f[i] // finds first ctivit in S i,n+1 m = m + 1; if m <= n return { m } GREEDY-ACIVIY-SELECOR(s, f, m, n) else return } (An Itertive Greed Algorithm) (A Greed Algorithm) IERAIVE-GREEDY-ACIVIY-SELECOR(s, f) { n = s.length A = { 1 } k = 1 for m = 2 to n { if s[m] f[k] { A = A { m } k = m } } return A he set of ctivities returned IERAIVE-GREEDY-ACIVIY-SELECOR(s,f) is the sme s the set returned GREEDY-ACIVIY-SELECOR(s,f,0,n) }
5 (A Greed Algorithm) Let s consider the following set of ctivities. Recll tht s i nd f i re the strt nd finish times for n ctivit i. (A Greed Algorithm) s i f i (A Greed Algorithm) (A Greed Algorithm) (A Greed Algorithm) (A Greed Algorithm)
6 Used for dt compression Binr chrcter codes cn e: Fied Length Codes ech chrcter is represented fied size unique code E.g., = 000, =001, c= 010, d = 011, Vrile Length Codes ech chrcter is represented vrile size unique code E.g., = 0, = 101, c= 100, d =111 Consider sving nd retrieving chrcters How do we encode chrcters into unique representtions? How do we decode encoded informtion? Prefi codes re one w to encode tet. A prefi code consists of set of words such tht no word in the set is prefi of nother word in the set. For emple: S = {0, 100, 101, 1100, 1101, 111} Huffmn used greed lgorithm for constructing n optiml prefi code clled the Huffmn code Let C: e set of n chrcters c C: e memer of C f(c): e the frequenc of chrcter c in file. he lgorithm uilds inr tree corresponding to the optiml prefi code in ottom-up mnner. he lgorithm strts with set of leves C which is sorted in incresing order of the frequenc f(c) Let Q = C, where Q is priorit queue (O(n) - uild hep) For i = 1 to C - 1 do Crete new node z. Get two minimum frequenc leves nd from Q where f[] f[] (O(2 log n) get m twice nd cll hepif twice) z s left child pointer (leled with 0) points to nd the right child pointer (leled with 1) points to f[z] = f[] + f[] Set Q = Q {, } {z} (O(log n)) End of for loop C: 12 B: 13 D: 16 C: 12 B: 13 D:
7 C: 12 B: 13 D: D: 16 C: 12 B: D: 16 D: 16 C: 12 B: 13 C: 12 B:
8 D: 16 C: 12 B:
9 A: 0 O (n log n) C: 100 B: 101 D: 111 F: 1100 E: Correctness of Huffmn Algorithm Lemm 1) Let C: set of n chrcters c C: memer of C f(c): frequenc of chrcter c in file., C hving the lowest frequencies. here eists n optiml prefi code for C where the code words for nd hve the sme length nd differ onl in the lst it. Correctness of Huffmn Algorithm Let e tree corresponding to prefi code. Let C: set of n chrcters c C: memer of C f(c): frequenc of chrcter c in file. d (c): the depth of c s lef in (numer of its need for encoding c). B(): numer of its required to encode file B ( ) f ( c) d ( c) cc Correctness of Huffmn Algorithm Correctness of Huffmn Algorithm Let, C (siling lef) nd d () nd d () re mimum nd f() f() in. Let f() nd f() is minimums such tht f() f() Also f() f() f() f() B( ) B( ') f ( c) d ( c) cc cc f ( ) d ( ) f ( ) d ( ) f ( ) d f ( ) d ( ) f ( ) d ( ) f ( ) d ( ) f ( ) d ( ) ( f ( ) f ( ))( d ( ) d ( )) 0 f ( c) d ' ' ( c) ( ) f ( ) d ' ( )
10 Correctness of Huffmn Algorithm Which mens tkes less its then for encoding file Also we cn compre nd nd conclude with tkes less its then for encoding file We cn conclude is n optiml tree in which nd pper s siling leves of mimum depth (lemm 1) Correctness of Huffmn Algorithm Lemm 2) Let C: set of n chrcters c C: memer of C f (c): frequenc of chrcter c in file., C hving the lowest frequencies. C = C {, } {z} f(z) = f() + f() : represent tree genertion optiml prefi code for the C hen the tree, otined from replcing the lef node for z with n internl node hving nd s children, presents n optiml prefi code for the lphet C. (see tet ook) 56 Correctness of Huffmn Algorithm heorem: Huffmn lgorithm produces n optiml prefi code Proof: from Lemm 1 nd Lemm 2, it is true
The Knapsack Problem. COSC 3101A - Design and Analysis of Algorithms 9. Fractional Knapsack Problem. Fractional Knapsack Problem
The Knpsck Prolem COSC A - Design nd Anlsis of Algorithms Knpsck Prolem Huffmn Codes Introduction to Grphs Mn of these slides re tken from Monic Nicolescu, Univ. of Nevd, Reno, monic@cs.unr.edu The - knpsck
More information4. GREEDY ALGORITHMS I
4. GREEDY ALGORITHMS I coin chnging intervl scheduling scheduling to minimize lteness optiml cching Lecture slides by Kevin Wyne Copyright 2005 Person-Addison Wesley http://www.cs.princeton.edu/~wyne/kleinberg-trdos
More informationLinear Inequalities. Work Sheet 1
Work Sheet 1 Liner Inequlities Rent--Hep, cr rentl compny,chrges $ 15 per week plus $ 0.0 per mile to rent one of their crs. Suppose you re limited y how much money you cn spend for the week : You cn spend
More informationData Structures LECTURE 10. Huffman coding. Example. Coding: problem definition
Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt
More informationTopics Covered AP Calculus AB
Topics Covered AP Clculus AB ) Elementry Functions ) Properties of Functions i) A function f is defined s set of ll ordered pirs (, y), such tht for ech element, there corresponds ectly one element y.
More informationHomework 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 informationConnected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs
Prm University, Mth. Deprtment Summry of lecture 9 Algorithms nd Dt Structures Disjoint sets Summry of this lecture: (CLR.1-3) Dt Structures for Disjoint sets: Union opertion Find opertion Mrco Pellegrini
More informationThe area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O
1 Section 5. The Definite Integrl Suppose tht function f is continuous nd positive over n intervl [, ]. y = f(x) x The re under the grph of f nd ove the x-xis etween nd is denoted y f(x) dx nd clled the
More informationp-adic Egyptian Fractions
p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction
More informationLinear 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 informationNFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.
NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic
More informationInterpreting Integrals and the Fundamental Theorem
Interpreting Integrls nd the Fundmentl Theorem Tody, we go further in interpreting the mening of the definite integrl. Using Units to Aid Interprettion We lredy know tht if f(t) is the rte of chnge of
More informationDuality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.
Dulity #. Second itertion for HW problem Recll our LP emple problem we hve been working on, in equlity form, is given below.,,,, 8 m F which, when written in slightly different form, is 8 F Recll tht we
More informationCS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata
CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or
More informationRegular expressions, Finite Automata, transition graphs are all the same!!
CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1
More informationFirst Midterm Examination
24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet
More information2.4 Linear Inequalities and Interval Notation
.4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or
More informationChapter 9 Definite Integrals
Chpter 9 Definite Integrls In the previous chpter we found how to tke n ntiderivtive nd investigted the indefinite integrl. In this chpter the connection etween ntiderivtives nd definite integrls is estlished
More informationChapter 3 Single Random Variables and Probability Distributions (Part 2)
Chpter 3 Single Rndom Vriles nd Proilit Distriutions (Prt ) Contents Wht is Rndom Vrile? Proilit Distriution Functions Cumultive Distriution Function Proilit Densit Function Common Rndom Vriles nd their
More informationTypes 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 information1 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 informationTypes of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2
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 informationSection 6: Area, Volume, and Average Value
Chpter The Integrl Applied Clculus Section 6: Are, Volume, nd Averge Vlue Are We hve lredy used integrls to find the re etween the grph of function nd the horizontl xis. Integrls cn lso e used to find
More informationSCHOOL 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 informationWhat Is Calculus? 42 CHAPTER 1 Limits and Their Properties
60_00.qd //0 : PM Pge CHAPTER Limits nd Their Properties The Mistress Fellows, Girton College, Cmridge Section. STUDY TIP As ou progress through this course, rememer tht lerning clculus is just one of
More informationTaylor Polynomial Inequalities
Tylor Polynomil Inequlities Ben Glin September 17, 24 Abstrct There re instnces where we my wish to pproximte the vlue of complicted function round given point by constructing simpler function such s polynomil
More informationLecture 2: January 27
CS 684: Algorithmic Gme Theory Spring 217 Lecturer: Év Trdos Lecture 2: Jnury 27 Scrie: Alert Julius Liu 2.1 Logistics Scrie notes must e sumitted within 24 hours of the corresponding lecture for full
More informationReview of Gaussian Quadrature method
Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge
More informationTries and suffixes trees
Trie: A dt-structure for set of words Tries nd suffixes trees Alon Efrt Comuter Science Dertment University of Arizon All words over the lhet Σ={,,..z}. In the slides, let sy tht the lhet is only {,,c,d}
More informationCMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014
CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA
More informationAdvanced Algebra & Trigonometry Midterm Review Packet
Nme Dte Advnced Alger & Trigonometry Midterm Review Pcket The Advnced Alger & Trigonometry midterm em will test your generl knowledge of the mteril we hve covered since the eginning of the school yer.
More informationParse trees, ambiguity, and Chomsky normal form
Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs
More informationCSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes
CSE 260-002: Exm 3-ANSWERS, Spring 20 ime: 50 minutes Nme: his exm hs 4 pges nd 0 prolems totling 00 points. his exm is closed ook nd closed notes.. Wrshll s lgorithm for trnsitive closure computtion is
More information, MATHS H.O.D.: SUHAG R.KARIYA, BHOPAL, CONIC SECTION PART 8 OF
DOWNLOAD FREE FROM www.tekoclsses.com, PH.: 0 903 903 7779, 98930 5888 Some questions (Assertion Reson tpe) re given elow. Ech question contins Sttement (Assertion) nd Sttement (Reson). Ech question hs
More informationCoalgebra, Lecture 15: Equations for Deterministic Automata
Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined
More information19 Optimal behavior: Game theory
Intro. to Artificil Intelligence: Dle Schuurmns, Relu Ptrscu 1 19 Optiml behvior: Gme theory Adversril stte dynmics hve to ccount for worst cse Compute policy π : S A tht mximizes minimum rewrd Let S (,
More informationAlignment of Long Sequences. BMI/CS Spring 2016 Anthony Gitter
Alignment of Long Sequences BMI/CS 776 www.biostt.wisc.edu/bmi776/ Spring 2016 Anthony Gitter gitter@biostt.wisc.edu Gols for Lecture Key concepts how lrge-scle lignment differs from the simple cse the
More informationConvert the NFA into DFA
Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:
More informationOptimal Network Design with End-to-End Service Requirements
ONLINE SUPPLEMENT for Optiml Networ Design with End-to-End Service Reuirements Anntrm Blrishnn University of Tes t Austin, Austin, TX Gng Li Bentley University, Wlthm, MA Prsh Mirchndni University of Pittsurgh,
More informationES.182A Topic 32 Notes Jeremy Orloff
ES.8A Topic 3 Notes Jerem Orloff 3 Polr coordintes nd double integrls 3. Polr Coordintes (, ) = (r cos(θ), r sin(θ)) r θ Stndrd,, r, θ tringle Polr coordintes re just stndrd trigonometric reltions. In
More informationAQA Further Pure 2. Hyperbolic Functions. Section 2: The inverse hyperbolic functions
Hperbolic Functions Section : The inverse hperbolic functions Notes nd Emples These notes contin subsections on The inverse hperbolic functions Integrtion using the inverse hperbolic functions Logrithmic
More informationFirst Midterm Examination
Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does
More informationHow 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 informationMinimal DFA. minimal DFA for L starting from any other
Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA
More informationBridging the gap: GCSE AS Level
Bridging the gp: GCSE AS Level CONTENTS Chpter Removing rckets pge Chpter Liner equtions Chpter Simultneous equtions 8 Chpter Fctors 0 Chpter Chnge the suject of the formul Chpter 6 Solving qudrtic equtions
More informationChapter 6 Techniques of Integration
MA Techniques of Integrtion Asst.Prof.Dr.Suprnee Liswdi Chpter 6 Techniques of Integrtion Recll: Some importnt integrls tht we hve lernt so fr. Tle of Integrls n+ n d = + C n + e d = e + C ( n ) d = ln
More informationare fractions which may or may not be reduced to lowest terms, the mediant of ( a
GENERATING STERN BROCOT TYPE RATIONAL NUMBERS WITH MEDIANTS HAROLD REITER AND ARTHUR HOLSHOUSER Abstrct. The Stern Brocot tree is method of generting or orgnizing ll frctions in the intervl (0, 1 b strting
More informationCalculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.
Clculus Module C Ares Integrtion Copright This puliction The Northern Alert Institute of Technolog 7. All Rights Reserved. LAST REVISED Mrch, 9 Introduction to Ares Integrtion Sttement of Prerequisite
More informationCS 188: Artificial Intelligence Spring 2007
CS 188: Artificil Intelligence Spring 2007 Lecture 3: Queue-Bsed Serch 1/23/2007 Srini Nrynn UC Berkeley Mny slides over the course dpted from Dn Klein, Sturt Russell or Andrew Moore Announcements Assignment
More informationBME 207 Introduction to Biomechanics Spring 2018
April 6, 28 UNIVERSITY O RHODE ISAND Deprtment of Electricl, Computer nd Biomedicl Engineering BME 27 Introduction to Biomechnics Spring 28 Homework 8 Prolem 14.6 in the textook. In ddition to prts -e,
More informationSection 4: Integration ECO4112F 2011
Reding: Ching Chpter Section : Integrtion ECOF Note: These notes do not fully cover the mteril in Ching, ut re ment to supplement your reding in Ching. Thus fr the optimistion you hve covered hs een sttic
More informationGrade 10 Math Academic Levels (MPM2D) Unit 4 Quadratic Relations
Grde 10 Mth Acdemic Levels (MPMD) Unit Qudrtic Reltions Topics Homework Tet ook Worksheet D 1 Qudrtic Reltions in Verte Qudrtic Reltions in Verte Form (Trnsltions) Form (Trnsltions) D Qudrtic Reltions
More informationIntroduction to Algebra - Part 2
Alger Module A Introduction to Alger - Prt Copright This puliction The Northern Alert Institute of Technolog 00. All Rights Reserved. LAST REVISED Oct., 008 Introduction to Alger - Prt Sttement of Prerequisite
More information(e) if x = y + z and a divides any two of the integers x, y, or z, then a divides the remaining integer
Divisibility In this note we introduce the notion of divisibility for two integers nd b then we discuss the division lgorithm. First we give forml definition nd note some properties of the division opertion.
More informationɛ-closure, Kleene s Theorem,
DEGefW5wiGH2XgYMEzUKjEmtCDUsRQ4d 1 A nice pper relevnt to this course is titled The Glory of the Pst 2 NICTA Resercher, Adjunct t the Austrlin Ntionl University nd Griffith University ɛ-closure, Kleene
More informationLINEAR 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 informationSeptember 13 Homework Solutions
College of Engineering nd Computer Science Mechnicl Engineering Deprtment Mechnicl Engineering 5A Seminr in Engineering Anlysis Fll Ticket: 5966 Instructor: Lrry Cretto Septemer Homework Solutions. Are
More informationCS 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 informationBases for Vector Spaces
Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything
More information1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.
York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech
More informationCS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018
CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA
More information0.1 THE REAL NUMBER LINE AND ORDER
6000_000.qd //0 :6 AM Pge 0-0- CHAPTER 0 A Preclculus Review 0. THE REAL NUMBER LINE AND ORDER Represent, clssify, nd order rel numers. Use inequlities to represent sets of rel numers. Solve inequlities.
More informationAlgorithm Design and Analysis
Algorithm Design nd Anlysis LECTURE 5 Supplement Greedy Algorithms Cont d Minimizing lteness Ching (NOT overed in leture) Adm Smith 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov,
More information5.7 Improper Integrals
458 pplictions of definite integrls 5.7 Improper Integrls In Section 5.4, we computed the work required to lift pylod of mss m from the surfce of moon of mss nd rdius R to height H bove the surfce of the
More informationHW3, Math 307. CSUF. Spring 2007.
HW, Mth 7. CSUF. Spring 7. Nsser M. Abbsi Spring 7 Compiled on November 5, 8 t 8:8m public Contents Section.6, problem Section.6, problem Section.6, problem 5 Section.6, problem 7 6 5 Section.6, problem
More informationChapter 6 Notes, Larson/Hostetler 3e
Contents 6. Antiderivtives nd the Rules of Integrtion.......................... 6. Are nd the Definite Integrl.................................. 6.. Are............................................ 6. Reimnn
More informationSCHOOL OF ENGINEERING & BUILT ENVIRONMENT
SCHOOL OF ENGINEERING & BUIL ENVIRONMEN MARICES FOR ENGINEERING Dr Clum Mcdonld Contents Introduction Definitions Wht is mtri? Rows nd columns of mtri Order of mtri Element of mtri Equlity of mtrices Opertions
More informationFORM FIVE ADDITIONAL MATHEMATIC NOTE. ar 3 = (1) ar 5 = = (2) (2) (1) a = T 8 = 81
FORM FIVE ADDITIONAL MATHEMATIC NOTE CHAPTER : PROGRESSION Arithmetic Progression T n = + (n ) d S n = n [ + (n )d] = n [ + Tn ] S = T = T = S S Emple : The th term of n A.P. is 86 nd the sum of the first
More informationCounting intersections of spirals on a torus
Counting intersections of spirls on torus 1 The problem Consider unit squre with opposite sides identified. For emple, if we leve the centre of the squre trveling long line of slope 2 (s shown in the first
More informationTHE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.
THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS RADON ROSBOROUGH https://intuitiveexplntionscom/picrd-lindelof-theorem/ This document is proof of the existence-uniqueness theorem
More informationGlobal alignment. Genome Rearrangements Finding preserved genes. Lecture 18
Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re
More informationCS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions
CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p
More informationThis chapter will show you. What you should already know. 1 Write down the value of each of the following. a 5 2
1 Direct vrition 2 Inverse vrition This chpter will show you how to solve prolems where two vriles re connected y reltionship tht vries in direct or inverse proportion Direct proportion Inverse proportion
More informationProperties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives
Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn
More informationM344 - ADVANCED ENGINEERING MATHEMATICS
M3 - ADVANCED ENGINEERING MATHEMATICS Lecture 18: Lplce s Eqution, Anltic nd Numericl Solution Our emple of n elliptic prtil differentil eqution is Lplce s eqution, lso clled the Diffusion Eqution. If
More informationGoals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite
Unit #8 : The Integrl Gols: Determine how to clculte the re described by function. Define the definite integrl. Eplore the reltionship between the definite integrl nd re. Eplore wys to estimte the definite
More informationThe Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms
The Minimum Lel Spnning Tree Prolem: Illustrting the Utility of Genetic Algorithms Yupei Xiong, Univ. of Mrylnd Bruce Golden, Univ. of Mrylnd Edwrd Wsil, Americn Univ. Presented t BAE Systems Distinguished
More informationMatrix Solution to Linear Equations and Markov Chains
Trding Systems nd Methods, Fifth Edition By Perry J. Kufmn Copyright 2005, 2013 by Perry J. Kufmn APPENDIX 2 Mtrix Solution to Liner Equtions nd Mrkov Chins DIRECT SOLUTION AND CONVERGENCE METHOD Before
More informationI1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3
2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is
More information10 Vector Integral Calculus
Vector Integrl lculus Vector integrl clculus extends integrls s known from clculus to integrls over curves ("line integrls"), surfces ("surfce integrls") nd solids ("volume integrls"). These integrls hve
More informationDEFINITION The inner product of two functions f 1 and f 2 on an interval [a, b] is the number. ( f 1, f 2 ) b DEFINITION 11.1.
398 CHAPTER 11 ORTHOGONAL FUNCTIONS AND FOURIER SERIES 11.1 ORTHOGONAL FUNCTIONS REVIEW MATERIAL The notions of generlized vectors nd vector spces cn e found in ny liner lger text. INTRODUCTION The concepts
More informationdy ky, dt where proportionality constant k may be positive or negative
Section 1.2 Autonomous DEs of the form 0 The DE y is mthemticl model for wide vriety of pplictions. Some of the pplictions re descried y sying the rte of chnge of y(t) is proportionl to the mount present.
More informationDERIVATIVES NOTES HARRIS MATH CAMP Introduction
f DERIVATIVES NOTES HARRIS MATH CAMP 208. Introduction Reding: Section 2. The derivtive of function t point is the slope of the tngent line to the function t tht point. Wht does this men, nd how do we
More informationJackson 2.26 Homework Problem Solution Dr. Christopher S. Baird University of Massachusetts Lowell
Jckson 2.26 Homework Problem Solution Dr. Christopher S. Bird University of Msschusetts Lowell PROBLEM: The two-dimensionl region, ρ, φ β, is bounded by conducting surfces t φ =, ρ =, nd φ = β held t zero
More information1 Error Analysis of Simple Rules for Numerical Integration
cs41: introduction to numericl nlysis 11/16/10 Lecture 19: Numericl Integrtion II Instructor: Professor Amos Ron Scries: Mrk Cowlishw, Nthnel Fillmore 1 Error Anlysis of Simple Rules for Numericl Integrtion
More informationDefinite Integrals. The area under a curve can be approximated by adding up the areas of rectangles = 1 1 +
Definite Integrls --5 The re under curve cn e pproximted y dding up the res of rectngles. Exmple. Approximte the re under y = from x = to x = using equl suintervls nd + x evluting the function t the left-hnd
More information( dg. ) 2 dt. + dt. dt j + dh. + dt. r(t) dt. Comparing this equation with the one listed above for the length of see that
Arc Length of Curves in Three Dimensionl Spce If the vector function r(t) f(t) i + g(t) j + h(t) k trces out the curve C s t vries, we cn mesure distnces long C using formul nerly identicl to one tht we
More information1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.
York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech
More informationGenetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary
Outline Genetic Progrmming Evolutionry strtegies Genetic progrmming Summry Bsed on the mteril provided y Professor Michel Negnevitsky Evolutionry Strtegies An pproch simulting nturl evolution ws proposed
More informationLexical Analysis Part III
Lexicl Anlysis Prt III Chpter 3: Finite Automt Slides dpted from : Roert vn Engelen, Florid Stte University Alex Aiken, Stnford University Design of Lexicl Anlyzer Genertor Trnslte regulr expressions to
More informationMathematics Number: Logarithms
plce of mind F A C U L T Y O F E D U C A T I O N Deprtment of Curriculum nd Pedgogy Mthemtics Numer: Logrithms Science nd Mthemtics Eduction Reserch Group Supported y UBC Teching nd Lerning Enhncement
More informationIntroduction 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 informationCS 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 informationThe size of subsequence automaton
Theoreticl Computer Science 4 (005) 79 84 www.elsevier.com/locte/tcs Note The size of susequence utomton Zdeněk Troníček,, Ayumi Shinohr,c Deprtment of Computer Science nd Engineering, FEE CTU in Prgue,
More informationFarey 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 information7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus
7.1 Integrl s Net Chnge nd 7. Ares in the Plne Clculus 7.1 INTEGRAL AS NET CHANGE Notecrds from 7.1: Displcement vs Totl Distnce, Integrl s Net Chnge We hve lredy seen how the position of n oject cn e
More informationHomework 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 informationDesigning Information Devices and Systems I Spring 2018 Homework 7
EECS 16A Designing Informtion Devices nd Systems I Spring 2018 omework 7 This homework is due Mrch 12, 2018, t 23:59. Self-grdes re due Mrch 15, 2018, t 23:59. Sumission Formt Your homework sumission should
More information8 factors of x. For our second example, let s raise a power to a power:
CH 5 THE FIVE LAWS OF EXPONENTS EXPONENTS WITH VARIABLES It s no time for chnge in tctics, in order to give us deeper understnding of eponents. For ech of the folloing five emples, e ill stretch nd squish,
More information