Chapter 31_9
算法导论 第三版 第31章 答案 英

Chapter31Michelle Bodnar,Andrew LohrApril12,2016Exercise31.1-1By the given equation,we can write c=1·a+b,with0≥b<a.By the definition of remainders given just below the division theorem,this means that b is the remainder when c is divided by a,that is b=c mod a.Exercise31.1-2Suppose that there are onlyfinitely many primes p1,p2,...,p k.Then p= p1p2···p k+1isn’t prime,so there must be some p i which divides it.However, p i·(p1···p i−1p i+1···p k)<p and p·(p1···p i−1p i+1···p k+1)>p,so p i can’t divide p.Since this holds for any choice of i,we obtain a contradiction.Thus, there are infinitely many primes.Exercise31.1-3a|b means there exists k1∈Z so that k1a=b.b|c means there exists k2∈Z so that k2b=c.This means that(k1k2)a=c.Since the integers are a ring, k1k2∈Z,so,we have that a|c.Exercise31.1-4Let g=gcd(k,p).Then g|k and g|p.Since p is prime,g=p or g=1.Since 0<k<p,g<p.Thus,g=1.Exercise31.1-5By Theorem31.2,since gcd(a,n)=1,there exist integers p,q so that pa+qn=1,so,bpa+bqn=b.Since n|ab,there exists an integer k so that kn=ab.This means that knp+pqn=(k+q)pn=b.Since n divides the left hand side,it must divide the right hand side as well.Exercise31.1-61Observe that p k =p !k !(p −k )!=p (p −1)···(p −k +1)k !.Let q =(p −1)(p −2)···(p −k +1).Since p is prime,k !|p .However,we know that p k is an integer becauseit is also a counting formula.Thus,k !divides pq .By Corollary 31.5,k !|q .Write q =ck !.Then we have p k =pc ,which is divisible by p .By the binomial theorem and the fact that p | p k for 0<k <p ,(a +b )p =p k =0p k a k b p −k ≡a p +b p (mod p ).Exercise 31.1-7First,suppose that x =yb +(x mod b ),(x mod b )=za +((x mod b )mod a ),and ka =b .Then,we have x =yka +(x mod b )=(yk +z )a +((x mod b )mod a ).So,we have that x mod a =((x mod b )mod a ).For the second part of the problem,suppose that x mod b =y mod b .Then,by the first half of the problem,applied first to x and then to b,x mod a =(x mod b )mod a =(y mod b )mod a =y mod a .So,x ≡y mod a .Exercise 31.1-8We can test in time polynomial in βwhether or not a given β-bit number is a perfect k th power.Then,since two to the βth power is longer than the number we are given,we only need to test values of k between 2and β,thereby keeping the runtime polynomial in β.To check whether a given number n is a perfect k th power,we will be using a binary search like technique.That is,if we want to find the k-th root of a number,we initially know that it lies somewhere between 0and the number itself.We then look at the number of the current range of number under con-sideration,raise it to the k th power in time polynomial in β.We can do this by the method of repeated squaring discussed in section 31.6.Then,if we get a number larger than the given number when we perform repeated squaring,we know that the true k th root is in the lower half of the range in consideration,if it is equal,it is the midpoint,if larger,it is the upper half.Since each time,we are cutting down the range by a factor of two,and it is initially a range of length Θ(2β),the number of times that we need to raise a number the the k th power is Θ(β).Putting it all together,with the O (β3)time exponentiation,we get that the total runtime of this procedure is O (β5).Exercise 31.1-9For (31.6),we see that a and b in theorem 31.2which provides a characteri-zation of gcd appear symmetrically,so swapping the two won’t change anything.For (31.7),theorem 31.2tells us that gcd’s are defined in terms of integer linear combinations.If we had some integer linear combination involving a and2b,we can changed that into one involving(-a)and b by replacing the multiplier of a with its negation.For(31.8),by repeatedly applying(31.6)and(31.7),we can get this equality for all four possible cases based on the signs of both a and b.For(31.9),consider all integer linear combinations of a and0,the thing we multiply by will not affect thefinal linear combination,so,really we are just taking the set of all integer multiples of a andfinding the smallest element. We can never decrease the absolute value of a by multiplying by an integer (|ka|=|k||a|),so,the smallest element is just what is obtained by multiplying by1,which is|a|.For(31.10),again consider possible integer linear combinations na+mka, we can rewrite this as(n+km)a,so it has absolute value|n+km||a|.Since the first factor is an integer,we can’t have it with a value less than1and still have a positivefinal answer,this means that the smallest element is when thefirst factor is1,which is achievable by setting n=1,m=0.Exercise31.1-10Consider the prime factorization of each of a,b,and c,written as a= p1p2...p k where we allow repeats of primes.The gcd of b and c is just the product of all p i such that p i appears in both factorizations.If it appears multi-ple times,we include it as many times as it appears on the side with the fewest occurrences of p i.(Explicitly,see equation31.13on page934).To get the gcd of gcd(b,c)and a,we do this again.Thus,the left hand side is just equal to the intersection(with appropriate multiplicities)of the products of prime factors of a,b,and c.For the right hand side,we consider intersectingfirst the prime factors of a and b,and then the prime factors of c,but since intersections are associative,so is the gcd operator.Exercise31.1-11Suppose to a contradiction that we had two different prime decomposition. First,we know that the set of primes they both consist of are equal,because if there were any prime p in the symmetric difference,p would divide one of them but not the other.Suppose they are given by(e1,e2,...,e r)and(f1,f2,...,f r) and suppose that e i<f i for some position.Then,we either have that p e i+1i divides a or not.If it does,then the decomposition corresponding to{e i}is wrong because it doesn’t have enough factors of p i,otherwise,the one corre-sponding to{f i}is wrong because it has too many.Exercise31.1-12Standard long division runs in O(β2),and one can easily read offthe re-mainder term at the end.3Exercise 31.1-13First,we bump up the length of the original number until it is a power of two,this will not affect the asymptotics,and we just imagine padding it with zeroes on the most significant side,so it does not change its value as a number.We split the input binary integer,and split it into two segments,a less significant half and an more significant half m ,so that the input is equal to m 2β/2+ .Then,we recursively convert m and to decimal.Also,since we’ll need it later,we compute the decimal versions of all the values of 22i up to 2β.There are only lg(β)of these numbers,so,the straightforward approach only takes time O (lg 2(β))so will be overshadowed by the rest of the algorithm.Once we’ve done that,we evaluate m 2β/2+ ,which involves computing the product of two numbers and adding two numbers,so,we have the recurrenceT (β)=2T (β/2)+M (β/2)Since we have trouble separating M from linear by a n for some epsilon,the analysis gets easier if we just forget about the fact that the difficulty of the multiplication is going down in the subcases,this concession gets us the runtime that T (β)∈O (M (β)lg(β))by master theorem.Note that there is also a procedure to convert from binary to decimal that only takes time Θ(β),instead of the given algorithm which is Θ(M (β)lg(β))∈Ω(βlg(β))that is rooted in automata theory.We can construct a deterministic finite transducer between the two languages,then,since we only need to take as many steps as there are bits in the input,the runtime will be linear.We would have states to keep track of the carryover from each digit to the next.Exercise 31.2-1First,we show that the expression given in equation (31.13)is a common divisor.To see that we just notice thata =(r i =1p e i −min(e i ,f i )i )r i =1p min(e i ,f i )i andb =(r i =1p f i −min(e i ,f i )i )ri =1p min(e i ,f i )i Since none of the exponents showing up are negative,everything in sight is an integer.Now,we show that there is no larger common divisor.We will do this by showing that for each prime,the power can be no higher.Suppose we had some common divisor d of a and b .First note that d cannot have a prime factor that doesn’t appear in both a or b ,otherwise any integer times d would also have that factor,but being a common divisor means that we can write both a and b as an integer times d .So,there is some sequence {g i }so that d = r i =1p gi i .4Now,we claim that for every i,g i≤min(e i,f i).Suppose to a contradiction that there was some i so that g i>min(e i,f i).This means that d either has more factors of p i than a or than b.However,multiplying integers can’t cause the number of factors of each prime to decrease,so this is a contradiction,since we are claiming that d is a common divisor.Since the power of each prime in d is less than or equal to the power of each prime in c,we must have that d≤c. So,c is a GCD.Exercise31.2-2We’ll create a table similar to that offigure31.1:a b a/b d x y899493129-6114934061295-640687429-1587581291-1582922901290-2910Thus,(d,x,y)=(29,−6,11).Exercise31.2-3Let c be such that a=cn+(a mod n).If k=0,it is trivial,so suppose k< 0.Then,EUCLID(a+kn,n)goes to line3,so returns EUCLID(n,a mod n). Similarly,EUCLID(a,n)=EUCLID((a mod n)+cn,n)=EUCLID(n,a mod n).So,by correctness of the Euclidean algorithm,gcd(a+kn,n)=EUCLID(a+kn,n)=EUCLID(n,a mod n)=EUCLID(a,n)=gcd(a,n)Exercise31.2-4Algorithm1ITERATIVE-EUCLID(a,b)1:while b>0do2:(a,b)=(b,a mod b)3:end while4:return aExercise31.2-5We know that for all k,if b<F k+1<φk+1/√5,then it takes fewer than ksteps.If we let k=logφb+1,then,since b<φlogφb+2/√5=φ2√5·b,we havethat it only takes1+logφ(b)steps.5We can improve this bound to1+logφ(b/gcd(a,b)).This is because we knowthat the algorithm will terminate when it reaches gcd(a,b).We will emulate the proof of lemma31.10to show a slightly different claim that Euclid’s algorithm takes k recursive calls,then a≥gcd(a,b)F k+2and b≥gcd(a,b)F k+!.We will similarly do induction on k.If it takes one recursive call,and we have a>b,we have a≥2gcd(a,b)and b=gcd(a,b).Now,suppose it holds for k−1,we want to show it holds for k.Thefirst call that is made is of EUCLID(b,a mod b).Since this then only needsk−1recursive calls,we can apply the inductive hypothesis to get that b≥gcd(a,b)F k+1and a mod b≥gcd(a,b)F k.Since we had that a>b,we havethat a≥b+(a mod b)≥gcd(a,b)(F k+1+F k)=gcd(a,b)F k+2completing the induction.Since we have that we only need k steps so long as b<gcd(a,b)F k+1<gcd(a,b)φk+1.we have that logφ(b/gcd(a,b))<k+1.This is satisfied if we setk=1+logφ(b/gcd(a,b))Exercise31.2-6Since F k+1mod F k=F k−1we have gcd(F k+1,F k)=gcd(F k,F k−1).Sincegcd(2,1)=1we have that gcd(F k+1,F k)=1for all k.Moreover,since F k is increasing,we have F k+1/F k =1for all k.When we reach the base case ofthe recursive calls to EXTENDED-EUCLID,we return(1,1,0).The following returns are given by(d,x,y)=(d ,y ,x −y ).We will show that in general, EXTENDED-EUCLID(F k+1,F k)returns(1,(−1)k+1F k−2,(−1)k F k−1).We have already shown d is correct,and handled the base case.Now suppose the claim holds for k−1.Then EXTENDED-EUCLID(F k+1,F k)returns(d ,y ,x −y ) where d =1,y =(−1)k−1F k−2,x =(−1)k F k−3,so the algorithm returns(1,(−1)k−1F k−2,(−1)k F k−3−(−1)k−1F k−2)=(1,(−1)k+1F k−2,(−1)k(F k−3+F k−2)=(1,(−1)k+1F k−2,(−1)k F k−1) as desired.Exercise31.2-7To show it is independent of the order of its arguments,we prove the fol-lowing swap property,for all a,b,c,gcd(a,gcd(b,c))=gcd(b,gcd(a,c)).By applying these swaps in some order,we can obtain an arbitrary ordering on the variables(the permutation group is generated by the set of adjacent transposi-tions).Let a i be the power of the i th prime in the prime factor decompositionof a,similarly define b i and c i.Then,we have that6gcd(a,gcd(b,c))=i p min(a i,min(b i,c i)) i=i p min(a i,b i,c i) i=i p min(b i,min(a i,c i)) i=gcd(b,gcd(a,c))Tofind the integers{x i}as described in the problem,we use a similar approach as for EXTENDED-EUCLID.Exercise31.2-8From the gcd interpretation given in equation(31.13),it is clear that lcm(a1,a2)=a1·a2 gcd(a1,a2).More generally,lcm(a1,...,a n)=a1···a ngcd(···(gcd(gcd(a1,a2),a3),...),a n).Wecan compute the denominator recursively using the two-argument gcd opera-tion.The algorithm is given below,and runs in O(n)time.Algorithm2LCM(a1,...,a n)x=a1g=a1for i=2to n dox=x·a i)g=gcd(g,a i)end forreturn x/gExercise31.2-9For two numbers to be relatively prime,we need that the set of primes that occur in both of them are disjoint.Multiplying two numbers results in a number whose set of primes is the union of the two numbers multiplied. So,if we let p(n)denote the set of primes that divide n.By testing that gcd(n1n2,n3n4)=gcd(n1n3,n2n4)=1.We get that(p(n1)∪p(n2))∩(p(n3)∪(n4))=(p(n1)∪p(n3))∩(p(n2)∪(n4))=∅.Looking at thefirst equation,it gets us that p(n1)∩p(n3)=p(n1)∩p(n4)=p(n2)∩p(n3)=p(n2)∩p(n4)=∅.The second tells,among other things,that p(n1)∩p(n2)=p(n3)∩p(n4)=∅.This tells us that the sets of primes of any two elements are disjoint,so all elements are relatively prime.A way to view this that generalizes more nicely is to consider the complete graph on n vertices.Then,we select a partition of the vertices into two parts. Then,each of these parts corresponds to the product of all the numbers cor-responding to the vertices it contains.We then know that the numbers that7any pair of vertices that are in different parts of the partition correspond to will be relatively prime,because we can distribute the intersection across the union of all the prime sets in each partition.Since partitioning into two parts is equivalent to selecting a cut,the problem reduces to selecting lg(k)cuts of K n so that every edge is cut by one of the cuts.To do this,first cut the vertex set in as close to half as possible.Then,for each part,we recursively try to cut in in close to half,since the parts are disjoint,we can arbitrarily combine cuts on each of them into a single cut of the original graph.Since the number of time you need to divide n by two to get1is lg(n) ,we have that that is the number of times we need to take gcd.Exercise31.3-1+4012300123112302230133012·5123411234224133314244321Then,we can see that these are equivalent under the mappingα(0)=1,α(1)=3,α(2)=4,α(3)=2.Exercise31.3-2The subgroups of Z9and{0},{0,3,6},and Z9itself.The subgroups of Z∗13 are{1},{1,3,9},{1,3,4,9,10,12},{1,5,8,12},{1,12}and Z∗13itself. Exercise31.3-3Since S was afinite group,every element had afinite order,so,if a∈S , there is some number of times that you can add it to itself so that you get the identity,since adding any two things in S gets us something in S ,we have that S has the identity element.Associativity is for free because is is a property of the binary operation,no the space that the operation draws it’s arguments stly,we can see that it contains the inverse of every element,because we can just add the element to itself a number of times equal to one less than its order.Then,adding the element to that gets us the identity.Exercise31.3-48The only prime divisor of p e is p.From the definition of the Euler phi function,we haveφ(p e)=p e1−1p=p e−1(p−1).Exercise31.3-5To see this fact,we need to show that the given function is a bijection.Since the two sets have equal size,we only need to show that the function is onto. To see that it is onto,suppose we want an element that maps to x.Since Z∗n is afinite Abelian group by theorem31.13,we can take inverses,in particu-lar,there exists an element a−1so that aa−1=1mod n.This means that f a(a−1x)=aa−1x mod n=(aa−1mod n)(x mod n)=x mod n.Since we canfind an element that maps to any element of the range and the sizes of domain and range are the same,the function is a bijection.Any bijection from a set to itself is a permutation by definition.Exercise31.4-1First,we run extended Euclid on35,50and get the result(5,−7,10).Then, our initial solution is−7∗10/5=−14=36.Since d=5,we have four other solutions,corresponding to adding multiples of50/5=10.So,we also have that our entire solution set is x={6,16,26,36,46}.Exercise31.4-2If ax≡ay mod n then a(x−y)≡0mod n.Since gcd(a,n)=1,n doesn’t divide a unless n=1,in which case the claim is trivial.By Corollary31.5, since n divides a(x−y),n divides x−y.Thus,x≡y mod n.To see that the condition gcd(a,n)is necessary,let a=3,n=6,x=6,and y=2.Note that gcd(a,n)=gcd(3,6)=3.Then3·6≡3·2mod6,but6=2mod6.Exercise31.4-3it will work.It just changes the initial value,and so changes the order in which solutions are output by the program.Since the program outputs all val-ues of x that are congruent to x0mod n/b,if we shift the answer by a multiple of n/b by this modification,we will not be changing the set of solutions that the procedure outputs.Exercise31.4-4The claim is clear if a≡0since we can just factor out an x.For a=0, let g(x)=g0+g1x+...+g t−1x t−1.In order for f(x)to equal(x−a)g(x) we must have g0=f0(−a)−1,g i=(f i−g i−1)(−a)−1for1≤i≤t−1and9g t −1=f t .Since p is prime,Z ∗p ={1,2,...,p −1}so every element,includ-ing −a ,has a multiplicative inverse.It is easy to satisfy each of these equa-tions as we go,until we reach the last two,at which point we need to satisfy both g t −1=(f t −1−g t −2)(−a )−1and g t −1=f t .More compactly,we need f t =(f t −1−g t −2)(−a )−1.We will show that this happens when a is a zero of f .First,we’ll proceed inductively to show that for 0≤k ≤t −1we have a k +1g k =− k i =0f i a i .For the base case we have ag 0=−f 0,which holds.Assume the claim holds for k −1.Then we havea k +1g k =a k +1(f k −g k −1)(−a )−1=−a k f k +a k g k −1=−a k f k −k −1 i =0f i a i =ki =0f i a iwhich completes the induction step.Now we show that we can satisfy the equation given above.It will suffice to show that −a t f t =a t −1(f t −1−g t −2).a t −1(f t −1−g t −2)=a t −1f t −1−a t −1g t −2=a t −1f t −1+t −2 i =0f i a i =t −1i =0f i a i =−a t f twhere the second equality is justified by our earlier claim and the last equality is justified because a is a zero of f .Thus,we can find such a g .It is clear that a polynomial of degree 1can have at most 1distinct zero modulo p since the equation x =−a has at most 1solution by Corollary 31.25.Now suppose the claim holds for t >1.Let f be a degree t +1polynomial.If f has no zeros then we’re done.Otherwise,let a be a zero of f .Write f (x )=(x −a )g (x ).Then by the induction hypothesis,since g is of degree t ,g has at most t distinct zeros modulo p .The zeros of f are a and the zeros of g ,so f has at most t +1distinct zeros modulo p .Exercise 31.5-110These equations can be viewed as a single equation in the ring Z +5×Z 11+,in particular (x 1,x 2)=(4,5).This means that x needs to be the element in Z 55+that corresponds to the element (4,5).To do this,we use the process de-scribed in the proof of Theorem 31.27.We have m 1=11,m 2=5,c 1=11(11−1mod 5)=11,c 2=5(5−1mod 11)=45.This means that the corresponding solution is x =11·4+45·5mod 55=44+225mod 55=269mod 55=49mod 55.So,all numbers of the form 49+55k are a solution.Exercise 31.5-2Since 9·8·7=504,we’ll be working mod 504.We also have m 1=56,m 2=63,and m 3=72.We compute c 1=56(5)=280,c 2=63(7)=441,and c 3=72(4)=288.Thus,a =280+2(441)+3(288)mod 504=10mod 504.Thus,the desired integers x are of the form x =10+504k for k ∈Z .Exercise 31.5-3Suppose that x ≡a −1mod n .Also,x i ≡x mod n i and a i ≡a mod n i .What we then want to show is that x i ≡a −1i mod n i .That is,we want that a i x i ≡1mod n i .To see this,we just use equation 31.30.To get that ax mod n corresponds to (a 1x 1mod n 1,...,a k x k mod n k ).This means that 1corresponds to (1mod n 1,...,1mod n k ).This is telling us exactly what we needed,in particular,that a i x i ≡1mod n i .Exercise 31.5-4Let f (x )=f 0+f 1x +...+f d x d .Using the correspondence of Theorem 31.27,f (x )≡0mod n if and only if d i =0f i j x i j ≡0mod n j for j =1to k .The product formula arises by constructing a zero of f via choosing x 1,x 2,...,x k such that f (x j )≡0mod n j for each j ,then letting x be the number associated to (x 1,...,x k ).Exercise 31.6-1elementorder 112103545556107108109510211The smallest primitive root is2,and has the following values for ind11,2(x)x ind11,2(x)1102138425469778396105Exercise31.6-2To perform modular exponentiation by examining bits from right to left, we’ll keep track of the value of a2i as we go.See below for an implementation:Algorithm3MODULAR-EXPONENTIATION-R-to-L(a,b,n)c=0d=1s=alet b k,b k−1,...,b0 be the binary representation of bfor i=0to k doif b i==1thend=s·d mod nc=2i+cend ifs=s·s mod nend forreturn dExercise31.6-3Since we knowφ(n),we know that aφ(n)≡1mod n by Euler’s theorem. This tells us that a−1=aφ(n)−1because aa−1=≡aaφ(n)−1≡aφ(n)≡1mod n. Since when we multiply this expression times a,we get the identity,it is the inverse of a.We can then compute nφ(n)efficiently,sinceφ(n)<n,so can be represented without using more bits than was used to represent n.Exercise31.7-1For the secret key’s value of e we compute the inverse of d=3modφ(n)= 280.To do this,wefirst computeφ(280)=φ(23)φ(7)φ(5)=4·6·4=96.Since12any number raised to this will be one mod280,we will raise it to one less than this.So,we compute395≡3(32)47≡3(9(92)23)≡3(9(81(812)11))≡3(9(81(121(1212)5)))≡3(9(81(121(81(812)2≡3·9·81·121·81·81≡3·9·121≡187mod280Now that we know our value of e,we compute the encryption of M=100 by computing100187mod319,which comes out to an encrypted message of122 Exercise31.7-2We know ed=1modφ(n).Since d<φ(n)and e=3,we have3d−1= k(p−1)(q−1)for k=1or2.We have k=1if3d−1<n and k=2if 3d−1>n.Once we’ve determined k,p+q=n−(3d−1)/k+1,so we can now solve for p+q in time polynomial inβ.Replacing q−1by(p+q)−p−1 in our earlier equation lets us solve for p in time polynomial inβsince we need only perform addition,multiplication,and division on numbers bounded by n. Exercise31.7-3P A(M1)P A(M2)≡M e1M e2≡(M1M2)e≡P A(M1M2)mod nSo,if the attacker can correctly decode1100of the encrypted messages,hedoes the following.If the message is one that he can decrypt,he is happy,de-crypts it and stops.If it is not one that he can decrypt,then,he picks a random element in Z m,say x encrypts it with the public key,and multiplies that by theencrypted text,he then has a1100chance to be able to decrypt the new message.He keeps doing this until he can decrypt it.The number of steps needed follows a geometric distribution with a expected value of100.Once he’s stumbled upon one that he could decrypt,he multiplies by the inverses of all the elements that he multiplied by along the way.This recovers thefinal answer,and also can be done efficiently,since for every x,x n−2is x−1by Lagrange’s theorem.13Exercise31.8-1Suppose that we can write n= ki=1p e ii,then,by the Chinese remainder the-orem,we have that Z n∼=Z p e11×···×Z p e11.Since we had that n was not aprime power,we know that k≥2.This means that we can take the elementsx=(p e11−1,1,...,1)and y=(1,p e22−1,1,...,1).Since multiplication in theproduct ring is just coordinate wise,we have that the squares of both of theseelements is the all ones element in the product ring,which corresponds to1inZ n.Also,since the correspondence from the Chinese remainder theorem was a bijection,since x and y are distinct in the product ring,they correspond todistinct elements in Z n.Thus,by taking the elements corresponding to x and yunder the Chinese remainder theorem bijection,we have that we have found twosquareroots of1that are not the identity in Z n.Since there is only one trivialnon-identity squareroot in Z n,one of the two must be non-trivial.It turns outthat both are non-trivial,but that’s more than the problem is asking. Exercise31.8-2Let c=gcd(···(gcd(gcd(φ(p e11),φ(p e22)),φ(p e33)),...),φ(p e r r)).Then we haveλ(n)=φ(e e11)···φ(p e r r)/c=φ(n)/c.Since the lcm is an integer,λ(n)|φ(n).Suppose p is prime and p2|n.Sinceφ(p2)=p2(1−1p )=p2−p=p(p−1),we have that p must divideλ(n).however,since p divides n,it cannot divide n−1,so we cannot haveλ(n)|n−1.Now,suppose that is the product of fewer than3primes,that is n=pq for some two distinct primes p<q.Since both p and q were primes,λ(n)= lcm(φ(p),φ(q))=lcm(p−1,q−1).So,mod q−1,λ(n)≡0,however,since n−1=pq−1=(q−1)(p)+p−1,we have that n−1≡p−1mod q−1. Sinceλ(n)has a factor of q−1that n−1does not,meaning thatλ(n)|n−1.Exercise31.8-3First,we prove the following lemma.For any integers a,b,n,gcd(a,n)·gcd(b,n)≥gcd(ab,n).Let{p i}be an enumeration of the primes,then,by Theorem31.8,there is exactly one set of powers of these primes so that a=i p a ii,b=ip b ii,and n=ip n ii.gcd(a,n)=ip min(a i,n i)igcd(b,n)=ip min(b i,n i)igcd(ab,n)=ip min(a i+b i,n i)i14We combine thefirst two equations to get:gcd(a,n)·gcd(b,n)=ip min(a i,n i)i·ip min(b i,n i)i=i p min(a i,n i)+min(b i,n i) i≥i p min(a i+b i,n i) i=gcd(ab,n)Since x is a non-trivial squareroot,we have that x2≡1mod n,but x=1 and x=n−1.Now,we consider the value of gcd(x2−1,n).By theorem31.9, this is equal to gcd(n,x2−1mod n)=gcd(n,1−1)=gcd(n,0)=n.So,we can then look at the factorization of x2−1=(x+1)(x−1)to get thatgcd(x+1,n)gcd(x−1,n)≥nHowever,we know that since x is a nontrivial squareroot,we know that 1<x<n−1so,neither of the factors on the right can be equal to n.This means that both of the factors on the right must be nontrivial.Exercise31.9-1The Pollard-Rho algorithm wouldfirst detect the factor of73when it con-siders the element84,when we have x12because we then notice that gcd(814−84,1387)=73.Exercise31.9-2Create an array A of length n.For each x i,if x i=j,store i in A[j].If j is thefirst position of A which must have its entry rewritten,set t to be the entry originally stored in that spot.Then count how many additional x i’s must be computed until x i=j again.This is the value of u.The running time isΘ(t+u).Exercise31.9-3Assuming that p e divides n,by the same analysis as sin the chapter,it will take timeΘ(p e/2).To see this,we look at what is happening to the sequence mod p n.15x i +1=x i +1mod p e =f n (x i )mod p e=((x 2−1)mod n )mod p e =(x 2−1)mod p e=(x i )2−1mod p e =f p e (x i )So,we again are having the birthday paradox going on,but,instead of hop-ing for a repeat from a set of size p ,we are looking at all the equivalence classes mod p e which has size p e ,so,we have that the expected number of steps be-fore gettinga repeat in that size set is just the squareroot of its size,which is Θ(√p e )=Θ(p e/2).Exercise 31.9-4Problem 31-1a.If a and b are both even,then we can write them as a =2(a/2)and b =2(b/2)where both factors in each are integers.This means that,by Corollary 31.4,gcd(a,b )=2gcd(a/2,b/2).b.If a is odd,and b is even,then we can write b =2(b/2),where b/2is an integer,so,since we know that 2does not divide a ,the factor of two that is in b cannot be part of the gcd of the two numbers.This means that we have gcd(a,b )=gcd(a,b/2).More formally,suppose that d =gcd(a,b ).Since d is a common divisor,it must divide a ,and so,it must not have any even factors.This means that it also divides a and b/2.This means that gcd(a,b )≤gcd(a,b/2).To see the reverse,suppose that d =gcd(a,b/2),then it is also a divisor of a and b ,since we can just double whatever we need to multiply it by to get b/2.Since we have inequalities both ways,we have equality.c.If a and b are both odd,then,first,in analoge to theorem 31.9,we show that gcd(a,b )=gcd(a −b,b ).Let d and d be the gcd’s on the left and right respectively.Then,we have that there exists n 1,n 2so that n 1a +n 2b =d ,but then,we can rewrite to get n 1(a −b )+(n 1+n 2)b =d .This getsus d ≥d .To see the reverse,let n 1,n 2so that n 1(a −b )+n 2b =d .We rewrite to get n 1a +(n 2−n 1)b =d ,so we have d ≥d .This meansthat gcd(a,b )=gcd(a −b,b )=gcd(b,a −b ).From there,we fall into the case of part b.This is because the first argument is odd,and the second is the difference of two odd numbers,hence is even.This means we can halve the second argument without changing the quantity.So,gcd(a,b )=gcd(b,(a −b )/2)=gcd((a −b )/2,b ).16。
大学物理课件 光学第三十一章衍射

The condition of two objects are barely resolved by this criterion of an angle separation R (最小分辨角 ): 1.22l R arcsin d d Increasing l For a small angle, l R 1.22 (Rayleigh’s criterion) d Resolving power lf RP f 1.22 d R 1 d Resolvability(分辨本领): R 1.22l
Difference of interference & diffraction? No diffraction:
I I0
Lens
θ
3l l l l 0 2d d 2d 2d
l d
3l 2d
λ
a d
θ
θ
I
设双缝缝宽均为a,在 夫琅禾费衍射下,每缝 衍射图样位置相重叠
f
Considering the diffraction of light.
1. Diffraction (衍射) by a single slit
screen shadow screen
When the slit is wide, light travels in straight lines. When the slit gets narrow, light produces a diffraction pattern on the screen.
is called diffraction of light (P703).
ata100章节中英文对照

ata100章节中英文对照ATA100章节是航空行业中常用的维护标准,对飞机的维护保养、故障诊断等方面提供了详细的规范。
以下是ATA100章节中英文对照的内容:ATA Chapter 1 - Airworthiness LimitationsATA 第1章 - 适航限制ATA Chapter 2 - General Maintenance PracticesATA 第2章 - 一般维护规范ATA Chapter 3 - AirframeATA 第3章 - 机身结构ATA Chapter 4 - StructuresATA 第4章 - 结构ATA Chapter 5 - Surface Treatments and CoatingsATA 第5章 - 表面处理和涂层ATA Chapter 6 - Dimensions and AreasATA 第6章 - 尺寸和面积ATA Chapter 7 - Placards and MarkingsATA 第7章 - 标牌和标记ATA Chapter 8 - Weight and BalanceATA 第8章 - 重量和平衡ATA Chapter 9 - Aircraft ModificationsATA 第9章 - 飞机改装ATA Chapter 10 - Time Limits/Maintenance Checks ATA 第10章 - 时间限制/维护检查ATA Chapter 11 - Placards and MarkingsATA 第11章 - 标牌和标记ATA Chapter 12 - ServicingATA 第12章 - 服务ATA Chapter 13 - Structural RepairATA 第13章 - 结构修理ATA Chapter 14 - PropulsionATA 第14章 - 推进ATA Chapter 15 - FuelATA 第15章 - 燃料ATA Chapter 16 - PneumaticATA 第16章 - 气动ATA Chapter 17 - Fire ProtectionATA 第17章 - 火灾保护ATA Chapter 18 - LightsATA 第18章 - 灯ATA Chapter 19 - Equipment/FurnishingsATA 第19章 - 设备/内饰ATA Chapter 20 - Standard Practices - Airframe ATA 第20章 - 标准规范 - 机身ATA Chapter 21 - Air ConditioningATA 第21章 - 空调ATA Chapter 22 - Auto FlightATA 第22章 - 自动驾驶ATA Chapter 23 - CommunicationsATA 第23章 - 通讯ATA Chapter 24 - Electrical PowerATA 第24章 - 电力ATA Chapter 25 - Equipment/FurnishingsATA 第25章 - 设备/内饰ATA Chapter 26 - Fire ProtectionATA 第26章 - 火灾保护ATA Chapter 27 - Flight ControlsATA 第27章 - 飞行控制ATA Chapter 28 - FuelATA 第28章 - 燃料ATA Chapter 29 - Hydraulic PowerATA 第29章 - 液压ATA Chapter 30 - Ice and Rain Protection ATA 第30章 - 冰雪和雨保护ATA Chapter 31 - Indicating/Recording ATA 第31章 - 指示/记录ATA Chapter 32 - Landing GearATA 第32章 - 起落架ATA Chapter 33 - LightsATA 第33章 - 灯ATA Chapter 34 - NavigationATA 第34章 - 导航ATA Chapter 35 - OxygenATA 第35章 - 氧气ATA Chapter 36 - PneumaticATA 第36章 - 气动ATA Chapter 37 - VacuumATA 第37章 - 真空ATA Chapter 38 - Water/WasteATA 第38章 - 水/废物ATA Chapter 39 - Electrical - BITEATA 第39章 - 电 - 机自测试ATA Chapter 40 - Cabin SystemsATA 第40章 - 机舱系统ATA Chapter 41 - Water - Tank - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -。
Igor Pro中文操作手册 - 1

i8chapteri2iigorpro概览iigorpro概览9概观11术语11关于概观11概观1常用部分11启动igorpro11输入数据11绘制图形13润饰图片13附加一个注释15附加一个标签15使用偏好16制作一个页面布局pagelayout17保存你的工作18载入数据18添加到图像20补偿轨迹trace20取消补偿轨迹trace20在图形中绘制21生成一个重新编辑宏macro窗口22重新编辑图片23保存你的工作23使用igor文档23图形化编辑数据24生成一个categoryplot可选的25categoryplot选项可选的26控制窗口commandwindow27浏览waves28使用数据浏览器databrowser29合成数据29缩放与平移30制作多个坐标轴的图片30保存你的工作31使用游标32删除轨迹与坐标轴32创建一个堆叠坐标轴的图形32index9添加一个页面布局34保存你的工作34创建控件controls34创建一个关联规则dependency36保存你的工作36常用部分结束37概观2数据分析37启动igorpro37创建合成数据37对高斯分布进行快速曲线拟合38多曲线的高斯拟合38数据排序39对数据子范围进行拟合39在拟合完成后进行拟合推算40添加一个拟合41概观3直方图和曲线拟合41启动igorpro41创建合成数据42白噪音的直方图histogram42高斯噪音的直方图histogram43直方图数据的曲线拟合43曲线拟合残差可选的45编程可选47保存程序文件可选49载入编程文件可选50进一步探索50index10概观本章节我们通过典型的操作逐步介绍igor的主要功能
操作系统第九版部分课后作业习题答案分析解析

CHAPTER 9 Virtual Memory Practice Exercises9.1 Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault occurs.Answer:A page fault occurs when an access to a page that has not beenbrought into main memory takes place. The operating system veri?esthe memory access, aborting the program if it is invalid. If it is valid, a free frame is located and I/O is requested to read the needed page into the free frame. Upon completion of I/O, the process table and page table are updated and the instruction is restarted.9.2 Assume that you have a page-reference string for a process with m frames (initially all empty). The page-reference string has length p;n distinct page numbers occur in it. Answer these questions for anypage-replacement algorithms:a. What is a lower bound on the number of page faults?b. What is an upper bound on the number of page faults?Answer:a. nb. p9.3 Consider the page table shown in Figure 9.30 for a system with 12-bit virtual and physical addresses and with 256-byte pages. The list of freepage frames is D, E, F (that is, D is at the head of the list, E is second,and F is last).Convert the following virtual addresses to their equivalent physicaladdresses in hexadecimal. All numbers are given in hexadecimal. (Adash for a page frame indicates that the page is not in memory.)? 9EF? 1112930 Chapter 9 Virtual Memory? 700? 0FFAnswer:? 9E F - 0E F? 111 - 211? 700 - D00? 0F F - EFF9.4 Consider the following page-replacement algorithms. Rank thesealgorithms on a ?ve-point scale from “bad” to “perfect” according to the page-fault rate. Separate those algorithms that suffer from Belady’sanomaly from those that do not.a. LRU replacementb. FIFO replacementc. Optimal replacementd. Second-chance replacementAnswer:Rank Algorithm Suffer from Belady’s anomaly1 Optimal no2 LRU no3 Second-chance yes4 FIFO yes9.5 Discuss the hardware support required to support demand paging. Answer:For every memory-access operation, the page table needs to be consulted to check whether the corresponding page is resident or not and whetherthe program has read or write privileges for accessing the page. These checks have to be performed in hardware. A TLB could serve as a cache and improve the performance of the lookup operation.9.6 An operating system supports a paged virtual memory, using a central processor with a cycle time of 1 microsecond. It costs an additional 1 microsecond to access a page other than the current one. Pages have 1000 words, and the paging device is a drum that rotates at 3000 revolutionsper minute and transfers 1 million words per second. The following statistical measurements were obtained from the system:page other than the? 1 percent of all instructions executed accessed acurrent page.?Of the instructions that accessed another page, 80 percent accesseda page already in memory.Practice Exercises 31?When a new page was required, the replaced page was modi?ed 50 percent of the time.Calculate the effective instruction time on this system, assuming that the system is running one process only and that the processor is idle during drum transfers.Answer:(2 sec)(1sec + 0.008 ×effective access time = 0.99 ×(10,000 sec + 1,000 sec)+ 0.002 ×(10,000 sec + 1,000 sec)+ 0.001 ×9.7 Consider the two-dimensional array A:int A[][] = new int[100][100];where A[0][0] is at location 200 in a paged memory system with pages of size 200. A small process that manipulates the matrix resides in page 0 (locations 0 to 199). Thus, every instruction fetch will be from page 0. For three page frames, how many page faults are generated bythe following array-initialization loops, using LRU replacement andassuming that page frame 1 contains the process and the other two are initially empty?a. for (int j = 0; j < 100; j++)for (int i = 0; i < 100; i++)A[i][j] = 0;b. for (int i = 0; i < 100; i++)for (int j = 0; j < 100; j++)A[i][j] = 0;Answer:a. 5,000b. 509.8 Consider the following page reference string:1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.How many page faults would occur for the following replacement algorithms, assuming one, two, three, four, ?ve, six, or seven frames? Remember all frames are initially empty, so your ?rst unique pages will all cost one fault each.?LRU replacement? FIFO replacement?Optimal replacement32 Chapter 9 Virtual MemoryAnswer:Number of frames LRU FIFO Optimal1 20 20 202 18 18 153 15 16 114 10 14 85 8 10 76 7 10 77 77 79.9 Suppose that you want to use a paging algorithm that requires a referencebit (such as second-chance replacement or working-set model), butthe hardware does not provide one. Sketch how you could simulate a reference bit even if one were not provided by the hardware, or explain why it is not possible to do so. If it is possible, calculate what the cost would be.Answer:You can use the valid/invalid bit supported in hardware to simulate the reference bit. Initially set the bit to invalid. On ?rst reference a trap to the operating system is generated. The operating system will set a software bit to 1 and reset the valid/invalid bit to valid.9.10 You have devised a new page-replacement algorithm that you thinkmaybe optimal. In some contorte d test cases, Belady’s anomaly occurs. Is thenew algorithm optimal? Explain your answer.Answer:No. An optimal algorithm will not suffer from Belady’s anomaly beca an optimal algorithm replaces the page that will not—by de?nition—be used for the longest time. Belady’s anomaly occurs when a pagereplacement a lgorithm evicts a page that will be needed in theimmediatefuture. An optimal algorithm would not have selected such a page.9.11 Segmentation is similar to paging but usesnevariable-sized“pages.”De?two segment-replacement algorithms based on FIFO and LRU pagereplacement s chemes. Remember that since segments are not thesamesize, the segment that is chosen to be replaced may not be big enoughto leave enough consecutive locations for the needed segment. Considerstrategies for systems where segments cannot be relocated, and thosefor systems where they can.Answer:a. FIFO. Find the ?rst segment large enough to accommodate theincoming segment. If relocation is not possible and no one segmentis large enough, select a combination of segments whose memoriesare contiguous, which are “closest to the ?rst of the list” and which can accommodate the new segment. If relocation is possible,rearrange the memory so that the ?rstNsegments large enough forthe incoming segment are contiguous in memory. Add any leftoverspace to the free-space list in both cases.Practice Exercises 33b. LRU. Select the segment that has not been used for the longestperiod of time and that is large enough, adding any leftover spaceto the free space list. If no one segment is large enough, selecta combination of the “oldest” segments that are contiguous inmemory (if relocation is not available) and that are large enough.If relocation is available, rearrange the oldest N segments to becontiguous in memory and replace those with the new segment.9.12 Consider a demand-paged computer system where the degree of multiprogramming is currently ?xed at four. The system was recentlymeasured to determine utilization of CPU and the paging disk. The resultsare one of the following alternatives. For each case, what is happening?Can the degree of multiprogramming be increased to increase the CPU utilization? Is the paging helping?a. CPU utilization 13 percent; disk utilization 97 percentb. CPU utilization 87 percent; disk utilization 3 percentc. CPU utilization 13 percent; disk utilization 3 percentAnswer:a. Thrashing is occurring.b. CPU utilization is suf?ciently high to leave things alone, andincrease degree of multiprogramming.c. Increase the degree of multiprogramming.9.13 We have an operating system for a machine that uses base and limit registers, but we have modi?ed the ma chine to provide a page table.Can the page tables be set up to simulate base and limit registers? How can they be, or why can they not be?Answer:The page table can be set up to simulate base and limit registers provided that the memory is allocated in ?xed-size segments. In this way, the base of a segment can be entered into the page table and the valid/invalid bit used to indicate that portion of the segment as resident in the memory. There will be some problem with internal fragmentation.9.27.Consider a demand-paging system with the following time-measured utilizations:CPU utilization 20%Paging disk 97.7%Other I/O devices 5%Which (if any) of the following will (probably) improve CPU utilization? Explain your answer.a. Install a faster CPU.b. Install a bigger paging disk.c. Increase the degree of multiprogramming.d. Decrease the degree of multiprogramming.e. Install more main memory.f. Install a faster hard disk or multiple controllers with multiple hard disks.g. Add prepaging to the page fetch algorithms.h. Increase the page size.Answer: The system obviously is spending most of its time paging, indicating over-allocationof memory. If the level of multiprogramming is reduced resident processeswould page fault less frequently and the CPU utilization would improve. Another way toimprove performance would be to get more physical memory or a faster paging drum.a. Get a faster CPU—No.b. Get a bigger paging drum—No.c. Increase the degree of multiprogramming—No.d. Decrease the degree of multiprogramming—Yes.e. Install more main memory—Likely to improve CPU utilization as more pages canremain resident and not require paging to or from the disks.f. Install a faster hard disk, or multiple controllers with multiple hard disks—Also animprovement, for as the disk bottleneck is removed by faster response and morethroughput to the disks, the CPU will get more data more quickly.g. Add prepaging to the page fetch algorithms—Again, the CPU will get more datafaster, so it will be more in use. This is only the case if the paging actionis amenableto prefetching (i.e., some of the access is sequential).h. Increase the page size—Increasing the page size will result in fewer page faults ifdata is being accessed sequentially. If data access is more or less random, morepaging action could ensue because f ewer pages c an be kept in memory and moredata is transferred per page fault. So this change is as likely to decrease utilizationas it is to increase it.10.1、Is disk scheduling, other than FCFS scheduling, useful in a single-userenvironment? Explain your answer.Answer: In a single-user environment, the I/O queue usually is empty. Requests g enerally arrive from a single process for one block or for a sequence of consecutive blocks. In these cases, FCFS is an economical method of disk scheduling. But LOOK is nearly as easy to program and will give much better performance when multiple processes are performing concurrent I/O, such as when aWeb browser retrieves data in the background while the operating system is paging and another application is active in the foreground.10.2.Explain why SSTF scheduling tends to favor middle cylindersover theinnermost and outermost cylinders.The center of the disk is the location having the smallest average distance to all other tracks.Thus the disk head tends to move away from the edges of the disk.Here is another way to think of it.The current location of the head divides the cylinders into two groups.If the head is not in the center of the disk and a new request arrives,the new request is more likely to be in the group that includes the center of the disk;thus,the head is more likely to move in that direction.10.11、Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following disk-scheduling algorithms?a. FCFSb. SSTFc. SCANd. LOOKe. C-SCANAnswer:a. The FCFS schedule is 143, 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130. The total seek distance is 7081.b. The SSTF schedule is 143, 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774. The total seek distance is 1745.c. The SCAN schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 130, 86. The total seek distance is 9769.d. The LOOK schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 86. The total seek distance is 3319.e. The C-SCAN schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 86, 130. The total seek distance is 9813.f. (Bonus.) The C-LOOK schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 86, 130. The total seek distance is 3363.12CHAPTERFile-SystemImplementationPractice Exercises12.1 Consider a ?le currently consisting of 100 blocks. Assume that the?lecontrol block (and the index block, in the case of indexed allocation)is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous-allocation case, assume that there is no room to grow atthe beginning but there is room to grow at the end. Also assume thatthe block information to be added is stored in memory.a. The block is added at the beginning.b. The block is added in the middle.c. The block is added at the end.d. The block is removed from the beginning.e. The block is removed from the middle.f. The block is removed from the end.Answer:The results are:Contiguous Linked Indexeda. 201 1 1b. 101 52 1c. 1 3 1d. 198 1 0e. 98 52 0f. 0 100 012.2 What problems could occur if a system allowed a ?le system to be mounted simultaneously at more than one location?Answer:4344 Chapter 12 File-System ImplementationThere would be multiple paths to the same ?le, which could confuse users or encourage mistakes (deleting a ?le with one path deletes the?le in all the other paths).12.3 Why must the bit map for ?le allocation be kept on mass storage, ratherthan in main memory?Answer:In case of system crash (memory failure) the free-space list would not be lost as it would be if the bit map had been stored in main memory.12.4 Consider a system that supports the strategies of contiguous, linked, and indexed allocation. What criteria should be used in deciding which strategy is best utilized for a particular ?le?Answer:?Contiguous—if ?le is usually accessed sequentially, if ?le isrelatively small.?Linked—if ?le is large and usually accessed sequentially.? Indexed—if ?le is large and usually accessed randomly.12.5 One problem with contiguous allocation is that the user must preallocate enough space for each ?le. If the ?le grows to be larger than thespace allocated for it, special actions must be taken. One solution to this problem is to de?ne a ?le structure consisting of an initial contiguousarea (of a speci?ed size). If this area is ?lled, the operating system automatically de?nes an over?ow area that is linked to the initial contiguous area. If the over?ow area is ?lled, another over?ow areais allocated. Compare this implementation of a ?le with the standard contiguous and linked implementations.Answer:This method requires more overhead then the standard contiguousallocation. It requires less overheadthan the standard linked allocation.12.6 How do caches help improve performance? Why do systems not use more or larger caches if they are so useful?Answer:Caches allow components of differing speeds to communicate moreef?ciently by storing data from the slower device, temporarily, ina faster device (the cache). Caches are, almost by de?nition, moreexpensive than the device they are caching for, so increasing the numberor size of caches would increase system cost.12.7 Why is it advantageous for the user for an operating system to dynamically allocate its internal tables? What are the penalties to the operating system for doing so?Answer:tablesDynamic tables allow more ?exibility in system use growth —are never exceeded, avoiding arti?cial use limits. Unfortunately, kernel structures and code are more complicated, so there is more potentialfor bugs. The use of one resource can take away more system resources (by growing to accommodate the requests) than with static tables.Practice Exercises 4512.8 Explain how the VFS layer allows an operating system to support multiple types of ?le systems easily.Answer:VFS introduces a layer of indirection in the ?le system implementation. In many ways, it is similar to object-oriented programming techniques. System calls can be made generically (independent of ?le system type). Each ?le system type provides its function calls and data structuresto the VFS layer. A system call is translated into the proper speci?c functions for the target ?le system at the VFS layer. The calling program has no ?le-system-speci?c code, and the upper levels of the system call structures likewise are ?le system-independent. The translation at the VFS layer turns these generic calls into ?le-system-speci?c operations.。
chapter9讲义燃烧室空气动力学

9.2 燃烧室空气动力学燃烧室空气流动在燃烧室的设计和性能方面非常重要,如果有一个好的空气动力学的设计,并且与喷雾匹配良好,则燃烧室的气动热力性能就不会有太大的问题。
在燃烧室机匣内,头部端壁(含旋流器)和火焰筒壁面将燃烧室的流动分为两个部分,头部端壁、火焰筒以及机匣中的流动称为外部流动,而头部和火焰筒内部的流动称为内部流动。
见图9.26所示。
图9.26 燃烧室的内部流动和外部流动外部流动的主要特征是扩压降速,并保证流动均匀,不发生分离,为内部流动提供良好的进气条件。
内部流动分主燃区流动、掺混区和冷却壁面附近的流动。
主燃区的流动是形成回流区,实现燃烧室的高性能燃烧,掺混区的流动主要是保证燃烧室出口温度分布符合发动机总体的性能要求,当然,出口温度分布与主燃区的流动也有很密切的关系。
火焰筒壁面的流动主要是气膜流动,保证火焰筒壁面的高效冷却。
本小节主要集中在燃烧室的外部流动以及内部流动中的主燃区及掺混区流动。
见图9.27。
火焰筒壁面流动在火焰筒壁面冷却中叙述。
图9.27 燃烧室的流动过程9.2.1 扩压器流动在航空燃气涡轮发动机燃烧室中,为了减小燃烧过程的压力损失以及缩短燃烧室的长度,从压气机出口的高速气流首先进入扩压器,通过扩压器将压气机出口高速空气流动的动压头尽可能大的恢复成静压然后进入燃烧室火焰筒。
目前高性能航空燃气轮机为了追求高的压缩性能,压气机的负荷很大,而且压气机出口空气的流速很高。
目前典型的数据是压气机出口的动压头占来流总压的10%。
扩压器的功能就是尽量的恢复该部分能量。
否则,将导致燃烧过程中压力损失大,最终使得发动机的耗油率上升。
扩压器的性能要求如下:a)压力损失低,一般而言,扩压器的损失要小于压气机出口总压的2%;b)长度短,扩压器的长度应尽量短,减小发动机的长度和重量;c)前置扩压器中没有分离,除了在突扩区域中;d)出口气流在周向和径向都均匀;e)在所有工况下运行稳定;f)对压气机出口流场变化不敏感。
chapt讲义er31
我们有 0<= S <= 1
G >= S
现在求吞吐率S
S = G P成 P成为成功发送帧的概率
发 送 一
↓帧
P成 e2G
S GP成 Ge2G
t
t0 -tf t0
t0+tf
冲突危险区
15
若要取得最大吞吐率,对上式求导,令
( 1 2G )e2G 0
G 1 2
S max
1 0 .184 2e
dS 0 dG
是单位时间内发生的平均次数。
3
证明:
取 t 0,在 t 内,发生一次事件的概率 Pt
发生多次事件的概率 P0
不发生事件的概率 q1P1t
一、先求P0 (t)
P 0(tt)P 0(t)P 0(t)P 0(t)(1t) P 0(t tt)P 0(t)P 0(t)
4
两边取极限:
lt ioP m 0(t tt) P 0(t) lt i0 m P 0(t)
三.异步分时复用(ATDM),
将多个异步信号放在同一个信道上传送,到达目的后再分开。
为了解决不同异步信号在同一个信道传送的问题,在复用前必 须进行缓存。
四、波分多路复用WDM(Wave lengh Division Multiplexing)采
用光波折射原理,使用衍射光栅或梭柱。通道两端的波长差Δλ
13
3-3-1 ALOHA系统
一.纯ALOHA
采用的假设:1,2,3,4a,5c 前提条件:各帧长度相同 帧时tf:发送一个标准长度的帧所需时间
帧长(bit) tf 信道传输(b率p)s
t 产生率(负载)G:每帧时发送的平均帧数 G=α f
GkeG
Pk(tf)Pr(k) k!
[理学]考试题目:电路基础习题课_课后答案
3.7 把L=51mH的线圈(其电阻极小,可忽略不计),接在电压为220V、频率为 50Hz的交流电路中,要求:(1)绘出电路图;(2)求出电流I的有效值;(3) 求出XL。
解:(1)绘出电路图如右图所示; (2)电流有效值为
U 220 103
I
13.75
L 314 51
(3)线圈感抗为
解:根据电路图可画出相量示意图如图所示,由相量图中的电压三角形又可 导出阻抗三角形,由阻抗三角形可得
XC
1
C
10 6 314 0.1
31847
tg 30 X C R
R X C 31847 55165 tg 30 0.5773
4.5 已知RLC串联电路的参数为R=20Ω,L=0.1H,C=30μF,当信号频率分别为 50Hz、1000Hz时,电路的复阻抗各为多少?两个频率下电路的性质如何?
解:(1)电流表A的读数即电路中总电流,即
I 52 (20 25)2 7.07
(2)频率提高一倍时,感抗增大一倍而使得通过电感的电流减半,即A2读 数为10A;容抗则减半而使通过电容的电流加倍,即A3读数为50A。所以总 电流表A的读数为
I 52 (10 50)2 40.3
0 L
1500
计算结果表明,当并谐电路中再并入一个电阻时,电路的品质因数降低,选择性变差
5.10 一个R=13.7Ω,L=0.25mH的电感线圈,与C=100pF的电容器分别接成串 联和并联谐振电路,求谐振频率和两种谐振情况下电路呈现的阻抗。
解:①串联谐振时,电路的谐振频率为
1
10 6
f 0 2
R 2 (0.22 (2.5 52 5) 7.1
第三十一章 免疫缺陷病及检验
第三十一章免疫缺陷病及检验Chapter 31 Immunodeficiency Disease and Immunoassay第一部分教学内容和要求一、目的要求·掌握:免疫缺陷病的概念、分类、临床基本特征,各类免疫缺陷病的主要免疫学检测方法的选择;熟悉:原发性免疫缺陷病的代表性疾病,AIDS的发病机制及免疫学异常;了解:原发性免疫缺陷病的发病机制。
二、教学内容1.免疫缺陷病的分类,免疫缺陷病的特征2.原发性免疫缺陷病:原发性B细胞缺陷病,原发性T细胞缺陷病,原发性联合免疫缺陷病,原发性吞噬细胞缺陷病,原发性补体系统缺陷病。
3.继发性免疫缺陷病的常见原因,获得性免疫缺陷综合征。
4.免疫缺陷病检验:B细胞缺陷病的检测,T细胞缺陷病的检测,吞噬细胞缺陷病的检测,补体系统缺陷病的检测,基因诊断,获得性免疫缺陷综合征的检测。
第二部分测试题一、选择题(一)单项选择题(A型题)1.以下何种免疫缺陷发生率最高A.T细胞免疫缺陷B.B细胞免疫缺陷C.联合免疫缺陷D.补体缺陷E.吞噬细胞缺陷2.DiGeorge综合征是A.先天性骨髓发育不良B.先天性胸腺发育不良C.性联低丙球蛋白血症D.选择性IgA缺乏E.先天性补体缺陷3.遗传性血管神经性水肿为何种缺陷A.C1q B.C2 C.C3 D.C1抑制剂E.C44.血清中免疫球蛋白含量缺乏,一般应考虑何种病A.轻链病B.重链病C.免疫缺陷病D.免疫增殖病E.自身免疫病5.评价B细胞功能的试验是A.淋巴细胞转化B.血清中免疫球蛋白检测C.迟发型皮肤过敏试验D.CD3检测E.移动抑制试验6.哪种方法可检测细胞免疫缺陷患者的细胞免疫功能A.溶血空斑形成试验B.免疫球蛋白检测C.淋巴细胞对PHA的应答D.NBT还原试验E.速发性皮肤过敏试验7.某人体检发现血清HIV抗体阳性,说明其患有A.艾滋病B.HIV感染C.需做确诊试验D.免疫缺陷E.需做CD4测定8.下列关于选择性IgA缺乏症的叙述,哪项是错误的A.是最常见的体液免疫缺陷病之一B.血清IgA和sIgA均减少C.常伴有消化道和呼吸道感染D.少数伴有自身免疫病和超敏反应病E.应用丙种球蛋白替代治疗有较好疗效9.下列哪种病不属于原发性B细胞免疫缺陷A.Bruton综合征B.选择性IgA缺乏症C.性联高IgM综合征D.DiGeorge综合征 E.普通变异型免疫缺陷病10.Bruton综合征患者反复持久的细菌感染常发生在A.新生儿期B.出生半年内C.半岁-2岁D.学龄期E.青少年期11.HIV的确认试验为A.ELISA测HIV抗体B.免疫印迹法测HIV抗体C.血凝试验测HIV抗体D.胶体金免疫层析法测HIV抗体E.放射免疫法测HIV抗体12.慢性肉芽肿是哪类疾病A.T细胞免疫缺陷病B.B细胞免疫缺陷病C.联合免疫缺陷病D.吞噬细胞缺陷病E.补体功能缺陷13.检测白细胞内杀伤功能的方法是A.四唑氮蓝还原试验B.溶血空斑试验C.淋巴细胞转化试验D.趋化试验E.黏附抑制试验14.下列哪一种原发性免疫缺陷病发生率最高A.Digeorge B.选择性IgA缺乏症C.重症联合免疫缺陷D.慢性肉芽肿E.遗传性血管神经性水肿15.Boyden小室常用于测定A.白细胞吞噬功能B.白细胞趋化功能C.白细胞杀伤功能D.淋巴细胞抑制功能E.白细胞调理功能16.性联重症联合免疫缺陷病的发病机制A.C3缺乏B.C1INH缺乏C.胸腺发育不良D.髓过氧化物酶缺乏E.IL-2受体γ链基因突变17.采用胚胎胸腺移植治疗有效的是A.性联低丙种球蛋白血症B.DiGeorge综合征C.Bruton病D.选择性IgA缺乏症E.慢性肉芽肿病18.腺苷脱氨酶缺陷属于A.细胞免疫缺陷B.体液免疫缺陷C.联合免疫缺陷D.吞噬细胞缺陷E.补体缺陷(二)多项选择题(X型题)1.细胞免疫缺陷病的基本特征A.反复病毒、真菌、胞内细菌感染B.对许多抗原不产生迟发型皮肤超敏反应C.外周血淋巴细胞减少D.常有发生恶性肿瘤的倾向E.多数不伴有体液免疫功能障碍2.以体液免疫为主的免疫缺陷病其免疫学异常有A.患者血清免疫球蛋白水平明显降低B.患者结核菌素皮肤试验常为阴性C.患者外周血SmIg+细胞数降低D.患者外周血淋巴细胞E花环形成率减低E.患者易发生化脓性细菌感染3.下列哪些疾病属于体液免疫缺陷A.Digeorge综合征B.Bruton病C.G-6-PD缺乏症D.选择性IgA缺乏症E.慢性肉芽肿4.有助于诊断细胞免疫缺陷为主的免疫缺陷病的试验A.CD3、CD4、CD8测定B.膜表面免疫球蛋白测定C.淋巴细胞转化试验D.结核菌素皮肤试验E.血清免疫球蛋白测定5.获得性免疫缺陷综合症的典型特征A.CD4﹢/CD8﹢比例倒置B.Kaposio肉瘤C.卡氏肺囊虫肺炎D.抗HIV抗体阳性E.迟发型皮肤超敏反应减弱或消失6.关于Bruton病的描述,正确的是A.是体液免疫缺陷B.是细胞免疫缺陷C.女性发病,男性为携带者D.发病机制是BTK基因的缺陷E.出生6个月后反复发生化脓性感染7.关于Digeorge综合征的正确描述A.为先天性胸腺发育不良所致B.患者易感染病毒和真菌C.血清IgA缺乏而其他Ig含量增高D.常伴发甲状旁腺功能不全E.胚胎胸腺移植有效8.艾滋病特异与非特异的实验诊断方法有A.ELISA检测HIV抗体B.病毒培养C.HIV核酸检测D.CD亚群E.淋巴细胞转化试验9.HIV侵犯下列哪些细胞:A.CD4T细胞B.CD8T细胞C.神经胶质细胞D.单核细胞E.巨噬细胞二、填空题1.性联无丙种球蛋白血症是细胞缺陷性疾病,遗传方式为。
期权期货与其他衍生产品第九版课后习题与答案Chapter (32)
[1 e a (T t ) ] B(t T ) a Using the notation from Chapter 31, in Hull–White P(t T ) A(t T )e rB (t T ) . The standard deviation of the short rate is constant, . It follows from Itô’s lemma that the standard deviation of the bond price is P(t T ) B(t T ) . The volatility of the bond price is therefore v(t T )
vTT (t T ) a e a (T t )
Integrating vT (t T )
1 v(t T ) e a (T t ) (t ) a for some function . Using the fact that v(T T ) 0 , we must have
Problem 32.7. Show that equation (32.10) reduces to (32.4) as the i tend to zero. Equation (32.10 ) can be written
dFk (t ) k (t ) Fk (t )
i Fi (t ) i (t ) dt k (t ) Fk (t ) dz i m ( t ) 1 i Fi (t )
vT (t T ) s
vTT (t T ) 0
Integrating vT (t T )
v(t T ) sT (t ) for some function . Using the fact that v(T T ) 0 , we must have v(t T ) s(T t )
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Chapter 31ON our arrival in Denmark, we found the king and queen of that country elevated in two arm-chairs on a kitchen-table, holding a Court. The whole of the Danish nobility were in attendance; consisting of a noble boy in the wash-leather boots of a gigantic ancestor, a venerable Peer with a dirty face who seemed to have risen from the people late in life, and the Danish chivalry with a comb in its hair and a pair of white silk legs, and presenting on the whole a feminine appearance. My gifted townsman stood gloomily apart, with folded arms, and I could have wished that his curls and forehead had been more probable. Several curious little circumstances transpired as the action proceeded. The late king of the country not only appeared to have been troubled with a cough at the time of his decease, butto have taken it with him to the tomb, and to have brought it back. The royal phantom also carried a ghostly manuscript round its truncheon, to which it had the appearance of occasionally referring, and that, too, with an air of anxiety and a tendency to lose the place of reference which were suggestive of a state of mortality. It was this, I conceive, which led to the Shade's being advised by the gallery to `turn over!' - a recommendation which it took extremely ill. It was likewise to be noted of this majestic spirit that whereas it always appeared with an air of having been out a long time and walked an immense distance, it perceptibly came from a closely contiguous wall. This occasioned its terrors to be received derisively. The Queen of Denmark, a very buxom lady, though no doubt historically brazen, was considered by the public to have too much brass about her; her chin being attached to her diadem by a broad band of thatmetal (as if she had a gorgeous toothache), her waist being encircled by another, and each of her arms by another, so that she was openly mentioned as `the kettledrum.' The noble boy in the ancestral boots, was inconsistent; representing himself, as it were in one breath, as an able seaman, a strolling actor, a grave-digger, a clergyman, and a person of the utmost importance at a Court fencing-match, on the authority of whose practised eye and nice discrimination the finest strokes were judged. This gradually led to a want of toleration for him, and even - on his being detected in holy orders, and declining to perform the funeral service - to the general indignation taking the form of nuts. Lastly, Ophelia was a prey to such slow musical madness, that when, in course of time, she had taken off her white muslin scarf, folded it up, and buried it, a sulky man who had been long cooling his impatient nose against an ironbar in the front row of the gallery, growled, `Now the baby's put to bed let's have supper!' Which, to say the least of it, was out of keeping.Upon my unfortunate townsman all these incidents accumulated with playful effect. Whenever that undecided Prince had to ask a question or state a doubt, the public helped him out with it. As for example; on the question whether 'twas nobler in the mind to suffer, some roared yes, and some no, and some inclining to both opinions said `toss up for it;' and quite a Debating Society arose. When he asked what should such fellows as he do crawling between earth and heaven, he was encouraged with loud cries of `Hear, hear!' When he appeared with his stocking disordered (its disorder expressed, according to usage, by one very neat fold in the top, which I suppose to be always got up with a flat iron), a conversation took place inthe gallery respecting the paleness of his leg, and whether it was occasioned by the turn the ghost had given him. On his taking the recorders - very like a little black flute that had just been played in the orchestra and handed out at the door - he was called upon unanimously for Rule Britannia. When he recommended the player not to saw the air thus, the sulky man said, `And don't you do it, neither; you're a deal worse than him!' And I grieve to add that peals of laughter greeted Mr Wopsle on every one of these occasions.But his greatest trials were in the churchyard: which had the appearance of a primeval forest, with a kind of small ecclesiastical wash-house on one side, and a turnpike gate on the other. Mr Wopsle in a comprehensive black cloak, being descried entering at the turnpike, the gravedigger was admonished in a friendly way, `Look out! Here's the undertakera coming, to see how you're a getting on with your work!' I believe it is well known in a constitutional country that Mr Wopsle could not possibly have returned the skull, after moralizing over it, without dusting his fingers on a white napkin taken from his breast; but even that innocent and indispensable action did not pass without the comment`Wai-ter!' The arrival of the body for interment (in an empty black box with the lid tumbling open), was the signal for a general joy which was much enhanced by the discovery, among the bearers, of an individual obnoxious to identification. The joy attended Mr Wopsle through his struggle with Laertes on the brink of the orchestra and the grave, and slackened no more until he had tumbled the king off the kitchen-table, and had died by inches from the ankles upward.We had made some pale efforts in the beginning to applaudMr Wopsle; but they were too hopeless to be persisted in. Therefore we had sat, feeling keenly for him, but laughing, nevertheless, from ear to ear. I laughed in spite of myself all the time, the whole thing was so droll; and yet I had a latent impression that there was something decidedly fine in Mr Wopsle's elocution - not for old associations' sake, I am afraid, but because it was very slow, very dreary, very up-hill and down-hill, and very unlike any way in which any man in any natural circumstances of life or death ever expressed himself about anything. When the tragedy was over, and he had been called for and hooted, I said to Herbert, `Let us go at once, or perhaps we shall meet him.'We made all the haste we could down-stairs, but we were not quick enough either. Standing at the door was a Jewish man with an unnatural heavy smear of eyebrow, who caught my eyes as weadvanced, and said, when we came up with him:`Mr Pip and friend?'Identity of Mr Pip and friend confessed.`Mr Waldengarver?,' said the man, `would be glad to have the honour.'`Waldengarver?' I repeated - when Herbert murmured in my ear, `Probably Wopsle.'`Oh!' said I. `Yes. Shall we follow you?'`A few steps, please.' When we were in a side alley, he turned and asked, `How did you think he looked? - I dressed him.' I don't know what he had looked like, except a funeral; with the addition of a large Danish sun or star hanging round his neck by a blue ribbon, that had given him the appearance of being insured in some extraordinary Fire Office. But I said he had looked very nice.`When he come to the grave,' said our conductor, `he showed his cloak beautiful. But, judging from the wing, it looked to me that when he see the ghost in the queen's apartment, he might have made more of his stockings.'I modestly assented, and we all fell through a little dirty swing door, into a sort of hot packing-case immediately behind it. Here Mr Wopsle was divesting himself of his Danish garments, and here there was just room for us to look at him over one another's shoulders, by keeping the packing-case door, or lid, wide open.`Gentlemen,' said Mr Wopsle, `I am proud to see you. I hope, Mr Pip, you will excuse my sending round. I had the happiness to know you in former times, and the Drama has ever had a claim which has ever been acknowledged, on the noble and the affluent.'Meanwhile, Mr Waldengarver, in a frightful perspiration, was trying to get himself out of his princely sables.`Skin the stockings off, Mr Waldengarver,' said the owner of that property, `or you'll bust 'em. Bust 'em, and you'll bust five-and-thirty shillings. Shakspeare never was complimented with a finer pair. Keep quiet in your chair now, and leave 'em to me.'With that, he went upon his knees, and began to flay his victim; who, on the first stocking coming off, would certainly have fallen over backward with his chair, but for there being no room to fall anyhow.I had been afraid until then to say a word about the play. But then, Mr Waldengarver looked up at us complacently, and said: `Gentlemen, how did it seem to you, to go, in front?'Herbert said from behind (at the same time poking me),`capitally.' So I said `capitally.'`How did you like my reading of the character, gentlemen?' said Mr Waldengarver, almost, if not quite, with patronage. Herbert said from behind (again poking me), `massive and concrete.' So I said boldly, as if I had originated it, and must beg to insist upon it, `massive and concrete.'`I am glad to have your approbation, gentlemen,' said Mr Waldengarver, with an air of dignity, in spite of his being ground against the wall at the time, and holding on by the seat of the chair.`But I'll tell you one thing, Mr Waldengarver,' said the man who was on his knees, `in which you're out in your reading. Now mind! I don't care who says contrairy; I tell you so. You're out in your reading of Hamlet when you get your legs in profile. The last Hamlet as I dressed, made the same mistakes in hisreading at rehearsal, till I got him to put a large red wafer on each of his shins, and then at that rehearsal (which was the last) I went in front, sir, to the back of the pit, and whenever his reading brought him into profile, I called out "I don't see no wafers!" And at night his reading was lovely.'Mr Waldengarver smiled at me, as much as to say `a faithful dependent - I overlook his folly;' and then said aloud, `My viewis a little classic and thoughtful for them here; but they will improve, they will improve.'Herbert and I said together, Oh, no doubt they would improve. `Did you observe, gentlemen,' said Mr Waldengarver, `that there was a man in the gallery who endeavoured to cast derision on the service - I mean, the representation?'We basely replied that we rather thought we had noticed such a man. I added, `He was drunk, no doubt.'`Oh dear no, sir,' said Mr Wopsle, `not drunk. His employer would see to that, sir. His employer would not allow him to be drunk.'`You know his employer?' said I.Mr Wopsle shut his eyes, and opened them again; performing both ceremonies very slowly. `You must have observed, gentlemen,' said he, `an ignorant and a blatant ass, with a rasping throat and a countenance expressive of low malignity, who went through - I will not say sustained - the r?le (if I may use a French expression) of Claudius King of Denmark. That is his employer, gentlemen. Such is the profession!'Without distinctly knowing whether I should have been more sorry for Mr Wopsle if he had been in despair, I was so sorry for him as it was, that I took the opportunity of his turning round to have his braces put on - which jostled us out at thedoorway - to ask Herbert what he thought of having him home to supper? Herbert said he thought it would be kind to do so; therefore I invited him, and he went to Barnard's with us, wrapped up to the eyes, and we did our best for him, and he sat until two o'clock in the morning, reviewing his success and developing his plans. I forget in detail what they were, but I have a general recollection that he was to begin with reviving the Drama, and to end with crushing it; inasmuch as his decease would leave it utterly bereft and without a chance or hope. Miserably I went to bed after all, and miserably thought of Estella, and miserably dreamed that my expectations were all cancelled, and that I had to give my hand in marriage to Herbert's Clara, or play Hamlet to Miss Havisham's Ghost, before twenty thousand people, without knowing twenty words of it.我们一进戏院便等于到了丹麦,只见这个国家的国王和王后都高高地坐在两张扶手椅里,扶手椅就放在厨房用的菜桌上,正在执掌朝政。