当前位置:文档之家› 第二次作业

第二次作业

第二次作业
第二次作业

1 Divide and Conquer

A group of n Ghostbusters is battling n ghosts. Each Ghostbuster is armed with a proton pack, which shoots a stream at a ghost, eradicating it. A stream goes in a straight line and terminates when it hits the ghost. The Ghostbusters decide upon the following strategy. They will pair off with the ghosts, forming n Ghostbuster-ghost pairs, and then simultaneously each Ghostbuster will shoot a stream at his chosen ghost. As we all know, it is very dangerous to let streams cross, and so the Ghostbusters must choose pairings for which no streams will cross. Assume that the position of each Ghostbuster and each ghost is a fixed point in the plane and that no three positions are collinear.

i Argue that there exists a line passing through one Ghostbuster and one ghost such the number of Ghostbusters on one side of the line equals the number of ghosts on the same side. Describe how to find such a line in O(n log n) time.

ii Give an O(n2 log n)-time algorithm to pair Ghostbusters with ghosts in such a way that no streams cross.

Answer:

i -ii: We assume that all the points in the plane are not in same X or Y axis using mark to stand for ghostbuster or ghosts(mark 0 stand for ghostbuster and mark 1 stand for ghosts).(This can not affect the problem because when we get the same X or Y , we can add or minus a very little value to let all points’ X or Y are not same). First we get the deepest point (in other word, the minimum Y value). Also we compute the other points with this point ‘s angle in X axis and sort these other points with this angle. Then we iterate in this order, and get another mark which is different from the deepest point's mark also we line this two

point ,and compute the bottom mark 0 's number and mark 1's number, they are the same , then we find the pair which is the deepest point and the iterate point. So we use this line to divide all points into two parts and recursive do the same above operation until the points' number is only 2 then we only get the line to connect this two points.

Algorithm:

Get_Pair(points[1-2N])

if N>1

initial a array points[1-2N] stand for the points of ghostbusters and ghosts

find the deepest point min_Point in the array points

initial the pair_Point and the index with 0

get the other 2N-1 points with this min_Point 's angle in X axis and sort these angles

initial num1 with 0 stand for the number of the other 2N-1 points which's mark is same with min_Point

initial num2 with 0 stand for the number of the other 2N-1 points which's mark is not same with min_Point

for i=1 to 2N-1

if min_Point's mark is same with points[i]'s mark

num1++

else

num2++

endif

if num1+1==num2

get this point pair_Point

index=i

break;

endif

endfor

print this pair (min_Point,pair_Point)

using pair_Point to divide points into two parts point_one[1-index-1] and

point_two[index+1-2*N]

Get_Pair(point_one[1-index-1])

Get_Pair(point_two[index+1-2*N])

else

get the line to connect this two points

endif

We will prove this algorithm is O(n log n) time, first we get the deepest point in O(n) time, next we compute the other points with this deepest point 's angle in X axis in O(n) time, we use quick_sort to sort these n angles in O(n log n). Last we iterator these angles in O(n) to find the pair. So all time we consume is only O(n log n) time.

Next we will prove this algorithm always can find the pair. Now we assume the deepest point stand for the Ghostbusters using mark=0, so above this point, we have n-1

Ghostbusters(mark=0) and n Ghosts(mark=1). So we can sort n-1 0 and n 1 in whole arrangement, no matter how we sort, we can get a index in 1 , which before this 1 we have the same number of 0 and 1. We can replace this problem with a new problem, we have a road for (0,0) point to (n-1,n) point , we only can move the one step in the X or Y direction. No matter which road we have, we must cross the line Y=X it means we must get the Ghost. Before this ghost, we have the same number of ghosts and ghostbusters.

Last, we will prove that solving this problem is O(n2 log n).

Easily, we get the T(n)=2*T(n/2)+O(n log n).

We use mathematical induction for assuming that T(n)<= O(n2 log n)

n=1, T(1)=O(n log n)<=O(n2 log n)

assume n

then n=k, T(k)=2*T(k/2)+O(k log k)<=2*O(k2 log (k/2)/ 4)+O(k log k)

=O(k2 log(k/2) /2)+O(k log k)

<=O(k2 log k)

2 Divide and Conquer

You are interested in analyzing some hard-to-obtain data from two separate databases. Each database contains n numerical values-so there are 2n values total-and you may assume that no two values are the same. You’d like to determine the median of this set of 2n values, which we will define here to be the n th smallest value.

However, the only way you can access these values is through queries to the databases. In a single query, you can specify a value k to one of the two databases, and the chosen database will return the k th smallest value that it contains. Since queries are expensive, you would like

to compute the median using as few queries as possible.

Give an algorithm that finds the median value using at most O(log n) queries.

Answer:

First we can assume the two arrays are in ascending order because in this question we can specify a value k to one of the two arrays, and this system will return the k’t h smallest value that it contains. So in the following two arrays: An and Bn. (each array contains n different value and is in ascending order)

So we get the median of two arrays: A[n/2] and B[n/2]. Before the A[n/2] value, there are only n/2-1 values, the same , before the B[n/2] value, there are only n/2-1

values.(A[n/2]!=B[n/2] because all 2n values are not same). So we only have two conditions: i: A[n/2]

values(n/2-1 before A[n/2] and n/2-1 before B[n/2] and 1 stand for A[n/2] itself). The same , before the A[n/2] value, there must be at most n/2-1+n/2-1=n-2. So the two arrays’ median value must be in the interval A[n/2+1] to A[n] and in the interval B[1] to B[n/2]. We can divide this problem into one small problem . At last , A and B only have one value , we get the small one which is the result.

ii: A[n/2]>B[n/2] , the same, the two arrays’ median value must be in the interval A[1] to

A[n/2] and in the interval B[n/2+1] to B[n].

Algorithm:

Get_Median(A[1-n],B[1-n])

If the A and B only have one element then

Return the small one

Else

Get the median a and b stand for A and B

If a

Return Get_Median(A[n/2+1-n],B[1-n/2])

Else

Return Get_Median(A[1-n/2],B[n/2+1-n])

Endif

Endif

Now , we will prove this algorithm is O(log n) time.

In algorithm: we can have T(n)=T(n/2)+c when n>1 and T(1)=c (c is the constant value) , So we get T(n)=clog n. Then this algorithm is O(log n) time.

3 Divide and Conquer

Given a convex polygon with n vertices, we can divide it into several separated pieces, such that every piece is a triangle. When n = 4, there are two different ways to divide the polygon; When n = 5, there are five different ways.

Give an algorithm that decides how many ways we can divide a convex polygon with n vertices into triangles.

Answer:

We get the f(n) to stand for : the number of different ways to divide the n-polygon.

f(1)=1;

f(n)=f(1)*f(n-1)+f(2)*f(n-2)+....+f(n-1)*f(1) n>1;

So the algorithm is:

int f(int n)

If n==1

return 1;

Else

int result=0;

for i=1 to n-1

result+=f(i)*f(n-i);

Endfor

return result;

Endif

4 Counting Inversions

Recall the problem of finding the number of inversions. As in the course, we are given a sequence of n numbers a1, ..., a n, which we assume are all distinct, and we define an inversion to be a pair i < j such that a i > a j .

We motivated the problem of counting inversions as a good measure of how different two orderings are. However, one might feel that this measure i s too sensitive. Let’s call a pair a significant inversion if i < j and a i > 3a j .

Given an O(n log n) algorithm to count the number of significant inversions between two orderings.

Answer:

Given a sequence of n numbers , we use a array D[1-n] which contains this n numbers. We can use Sort_Count function in the normal CountingInversions. Assume we divide D[1-n] into two half array D1[1-n/2] for D[1-n/2] and D2[1-n/2] for D[n/2+1-n], and we have already sort the two arrays D1 and D2 and computed the inversions’ numbers. Now what we only should do is to get the D1[i] and D2[j] (i and j is 1-n/2) and look whether this two number is inversed and at the same time we should merge this two sorted array.

Now let us describe this problem: we already get two sorted arrays D1[1-n/2] and D2[1-n/2], we set three indexes i and j1 and j2, i and j2 is to iterate D1 and D2, j1 is to .D2[j1-j2-1]

i: D1[i]3*D2[j1] then we add InverseCount with the number of D1 remaining arrays . (InverseCount stand for the current number of inversions) and at the same time, we add j1 to look the next element in D2. Else, we insent D1[i] value into new sorted array and add i to look the next element in D1.

ii: D1[i]>D2[j2]. We insert D2[j2] value into new new sorted array and add j2 to look the next element in D2.

Algorithm:

Merge_and_Count(D1[1-n],D2[1-n])

Initial InverseCount , i, j1, j2 with 0

Initial new array NEW_D which contains all elements in ascending order

While D1 and D2 all is not empty

If D1[i]

If D1[i]>3*D2[j1]

Add InverseCount with the number of D1’s remaining’s elements

Increment j1

Else

Insert D1[i] into NEW_D

Increment i

Endif

Else

Insert D2[j2] into NEW_D

Increment j2

Endif

EndWhile

While D2 is not empty

Insert D2[j2] into NEW_D

Increment j2

EndWhile

While D1 is not empty

If j1 is not iterate to the end of D2

If D1[i]>3*D2[j1]

Add InverseCount with the number of D1’s remaining’s elements

Increment j1

Else

Insert D1[i] into NEW_D

Increment i

Endif

Else

Insert D1[i] into NEW_D

Increment i

Endif

EndWhile

Return InverseCount

Sort_and_Count(l,r)

If l

Get middle m between l and r

Get RCL is Sort_and_Count(l,m) which stand for the left half array ‘s inversion’s number

Get RCR is Sort_and_Count(m+1,r) which stand for the right half array’s inversion’s number

Get RLR is Merge_and_Count(D1[l-m],D2[m+1-r]) which stand for the left and right ‘s inversion’s number

Return RCL+RCR+RLR

Endif

5 Counting Inversions

The attached file Q5.txt contains 100,000 integers between 1 and 100,000 (each row has a single integer), the order of these integers is random and no integer is repeated.

1. Write a program to implement the SORT-AND-COUNT algorithms in your favorite lan-guage, find the number of inversions in the given file.

2. In the lecture, we count the number of inversions in O(n log n) time, using the MERGE-SORT idea. Is it possible to use the QUICK-SORT idea instead ?

If possible, implement the algorithm in your favorite language, run it over the given file, and compare its running time with the one above. If not, give a explanation.

Answer:

1: C++ Code:

#include

#include

#include

#include

using namespace std;

int N=100000;

int data[100000];

ofstream out("res.txt");

long long merge_count(int l,int m,int r)

{

int count=0;

int* L=(int*)malloc((m-l+1)*sizeof(int));

int* R=(int*)malloc((r-m)*sizeof(int));

//memcpy(L,data+l*sizeof(int),(m-l+1)*sizeof(int));

//memcpy(R,data+(m+1)*sizeof(int),(r-m)*sizeof(int));

for(int i=l;i<=m;i++)

L[i-l]=data[i];

for(int i=m+1;i<=r;i++)

R[i-m-1]=data[i];

int i=0,j=0,k=l;

for(;i

{

if(L[i]>R[j])

{

data[k++]=R[j++];

count+=m-l-i+1;

}

else

{

data[k++]=R[i++];

}

}

for(;i

{

data[k++]=L[i++];

}

for(;j

{

data[k++]=R[j++];

}

return count;

}

long long inversion_Counting(int l,int r)

{

if(l

{

int m=(l+r)>>1;

long long L=inversion_Counting(l,m);

long long R=inversion_Counting(m+1,r);

long long LR=merge_count(l,m,r);

out<

return L+R+LR;

}

else

return 0;

}

int main()

{

ifstream in("Q5.txt");

for(int i=0;i

in>>data[i];

cout<

return 0;

}

The result is 1693706111.

2. We cannot use QUICK_SORT idea to implement the InverseCounting. Because we cannot have the two sorted half array. When we use Merge_Sort, we first get two sorted half array and can compute one number in left array and another number in right array. In fact, we do the Merge_Sort function is the same with visiting tree in postorder. But we do the Quick_Sort function is the same with visiting tree in preorder. Only in postorder, we first get the two half arrays(the node's two children) in order, so we can visit the

node itself.

6 Sorting

The M ERGE-S ORT, Q UICK-S ORT and M ODIFIED-Q UICK-S ORT algorithms in the lecture slides are all recursive. However, by using a stack, all of them can be implemented in a iterative way. 1. Implement both the recursive version and iterative version of the three algorithms in

your favorite language.

2.Run your implementation over three integer arrays whose sizes are 100, 000, 1, 000, 000,10, 000, 000 respectively. Record their running times and make a comparison.

Answer:

with C++ code in Linux System using Eclipse:

M ERGE-S ORT Q UICK-S ORT

100, 00040ms 50ms

1, 000, 000980ms 422ms

10, 000, 00011486ms 4980ms

M ERGE-S ORT-Itr Q UICK-S ORT-Itr

100, 000114ms 46ms

1, 000, 0001306ms 547ms 10, 000, 00014765ms 6429ms

第二次作业

1 Divide and Conquer A group of n Ghostbusters is battling n ghosts. Each Ghostbuster is armed with a proton pack, which shoots a stream at a ghost, eradicating it. A stream goes in a straight line and terminates when it hits the ghost. The Ghostbusters decide upon the following strategy. They will pair off with the ghosts, forming n Ghostbuster-ghost pairs, and then simultaneously each Ghostbuster will shoot a stream at his chosen ghost. As we all know, it is very dangerous to let streams cross, and so the Ghostbusters must choose pairings for which no streams will cross. Assume that the position of each Ghostbuster and each ghost is a fixed point in the plane and that no three positions are collinear. i Argue that there exists a line passing through one Ghostbuster and one ghost such the number of Ghostbusters on one side of the line equals the number of ghosts on the same side. Describe how to find such a line in O(n log n) time. ii Give an O(n2 log n)-time algorithm to pair Ghostbusters with ghosts in such a way that no streams cross. Answer: i -ii: We assume that all the points in the plane are not in same X or Y axis using mark to stand for ghostbuster or ghosts(mark 0 stand for ghostbuster and mark 1 stand for ghosts).(This can not affect the problem because when we get the same X or Y , we can add or minus a very little value to let all points’ X or Y are not same). First we get the deepest point (in other word, the minimum Y value). Also we compute the other points with this point ‘s angle in X axis and sort these other points with this angle. Then we iterate in this order, and get another mark which is different from the deepest point's mark also we line this two point ,and compute the bottom mark 0 's number and mark 1's number, they are the same , then we find the pair which is the deepest point and the iterate point. So we use this line to divide all points into two parts and recursive do the same above operation until the points' number is only 2 then we only get the line to connect this two points. Algorithm: Get_Pair(points[1-2N]) if N>1 initial a array points[1-2N] stand for the points of ghostbusters and ghosts find the deepest point min_Point in the array points initial the pair_Point and the index with 0 get the other 2N-1 points with this min_Point 's angle in X axis and sort these angles initial num1 with 0 stand for the number of the other 2N-1 points which's mark is same with min_Point initial num2 with 0 stand for the number of the other 2N-1 points which's mark is not same with min_Point for i=1 to 2N-1 if min_Point's mark is same with points[i]'s mark num1++ else num2++ endif if num1+1==num2

名词解释第二次作业1

名词解释第二次作业 10商英1班曹婉10020103 1.Romanticism At the turn of the 18th and 19th centuries romanticism appeared in England as a new trend in literature. It rose and under the impetus of the Industrial Revolution and French Revolution. Romanticism prevailed in england during the period 1798---1832.generally speaking,the romanticists expressed the ideology and sentiment of these classes and social strata who were discontent with,and opposed to,the development of capitalism.but owing to difference in social and political attitudes ,they split into two schools. Some romantic writers reflected the thinking of classes ruined by the bourgeoisie, and by way of protest against capitalist development turned to the feudal past. These were the elder generation of romanticists, sometimes called escapist romanticists, including Wordsworth, Coleridge and Southey. Others expressed the aspirations of the classes created by capitalism and held out an ideal, though a vague one, of a future society free from oppression and exploitation. These were the younger generation of romanticists and sometimes called active romanticists represented by Byron, Shelley and Keats. So the general feature of the works of the romanticists is dissatisfaction with the bourgeois society. Their writings are filled with strong-willed heroes, formidable events, tragic situations, powerful conflicting passions, and exotic pictures. Sometimes they resort to symbolic methods. With the active romanticists, symbolic pictures represent a vague idea of some future society, while with the escapist romanticists; these often take on a mystic color. Romantic prose of the time was represented by Lamb, Hazlitt, De Q uincey and Hunt. The only great novelist in this period was Walter Scott. 2 English Critical Realism In the period of tense class struggle appeared a new literary trend-critical realism. English critical realism of the 19th century flourished in the forties and in the early fifties. The critical realists described with much vividness and great artistic skill the chief traits of the English society and criticized the capitalist system from a democratic viewpoint. The English critical realists of the 19th century not only gave a satirical portrayal of the bourgeoisie and all the ruling classes, but also showed profound sympathy for the common people. The major contribution made by the 19th century critical realists lies in their perfection of the novel.Humour and satire were used in the English realistic novels of the 19th century. Through the sketches of various negative characters given birth to by the capitalist system, critical realism reveals the corrupting influence of the rule of cash o upon human nature. Here lies the root of the democratic and humanistic character of the critical realism of the 19th century Charles Dickens was the greatest representative of English critical realism. With striking force and truthfulness, he creates pictures of bourgeois civilization, describing the misery and sufferings of the common people.David Copperfield was his favourite among all his books. Thackeray, like Dickens, was a representative of critical realism in 19th century England. One of his masterpieces is Vanity Fair.

第2次作业答案

《局域网组网工程》第2次作业答案 第8章至第13章 注:作业中的“操作题”,同学们可以根据自己的条件选择完成。 第8章组建无线局域网 一、填空题 (1) 无线网卡主要有三种类型,分别是___________,____________,____________。[笔记 本电脑专用的PCMCIA无线网卡、台式机专用的PCI无线网卡、笔记本电脑与台式电脑都可以使用的USB无线网卡] (2) 当前的PCI无线网卡大多由___________和____________两部分组成。[无线PCMCIA网 卡、PCI接口网卡] (3) IEEE 802.11的运作模式主要有___________和____________两种。[点对点模式、基站模 式] 二、选择题 (1) 目前使用最多的无线局域网标准是_____________。[C] A. IEEE 802.3 B. IEEE 802.11 C. IEEE 802.11b D. 以上都不是 (2) 组建无线局域网最基本的设备是_____________。[A] A. 无线网卡 B. 无线AP C. 无线网桥 D. 无线Hub (3) 设置无线网卡或无线AP的参数是_______、_______和_______,SSID表示_______。[A、 C、D、B] A. 数据安全方式 B. 网络名称 C. 通信频道 D. 网络类型 (4) 不是无线局域网拓扑结构的是_____________。[D] A. 网桥连接型结构 B. Hub接入型结构 C. 无中心结构 D. 总线型结构 三、问答题 (1) 简述使用无线网卡组网与使用无线AP组网的两种方法的联系与差别。 (2) 简述组建无中心结构的无线网的方法。 四、操作题(根据自己的条件选做) (1) 使用三台装有无线网卡的台式机或笔记本电脑组建一个独立的无线网络。 (2) 使用一台无线AP,一方面组成一个无线网络,另一方面实现与一个有线网络的连接。 无线网络至少包括两台计算机,有线网络也至少包括两台计算机,整个网络是基站模式。 第9章局域网接入Internet 一、填空题 (1) Internet上的各计算机之间使用______________协议进行通信。[TCP/IP] (2) 列举局域网接入Internet的三种方式____________、____________、____________。 [局域网拨号上网、ADSL宽带入网、局域网专线入网]

工程流体力学A第2次作业

一 一、单项选择题(本大题共20小题,每小题1分,共20分)在每小题列出的四个备选项中 只有一个是符合题目要求的,请将其代码填写在题后的括号内。错选、多选或未选均无分。 1.欲使水力最优梯形断面渠道的宽度和深度相等,则相应的渠道边坡系数m=( C )。 A 0.25 B 0.50 C 0.75 D 1.0 2.静止液体作用在平面上的静水总压力A p P c =,这里c c gh p ρ=为( B ) A 、受压面形心处的绝对压强 B 、受压面形心处的相对压强 C 、压力中心处的绝对压强 D 、压力中心处的相对压强 3.平衡流体的等压面方程为( D ) A 、0=--z y x f f f B 、0=++z y x f f f C 、0d d d =--z f y f x f z y x D 、0d d d =++z f y f x f z y x 4.绝对压强的起量点为( A ) A 、绝对真空 B 、当地大气压 C 、液面压强 D 、标准大气压 5.渐变流过流断面近似为( D ) A 、旋转抛物面 B 、双曲面 C 、对数曲面 D 、平面 6.已知突然扩大管道突扩前后管段的直径之比5.0/21=d d ,则相应的断面平均流速之比=21/v v ( B ) A 、8 B 、4 C 、2 D 、1 7.流速水头的表达式为( D ) A 、22v B 、22v ρ C 、22gv D 、g v 22 8.已知动力黏度μ的单位为s Pa ?,则其量纲=μdim ( D ) A 、1MLT - B 、T ML -1 C 、LT M -1 D 、1 -1T ML - 9.下列各组物理量中,属于同一量纲的为( D ) A 、密度、重度、黏度 B 、流量系数、流速系数、渗流系数 C 、压强、切应力、质量力 D 、水深、管径、测压管水头 10.底宽为b 、水深为h 的矩形断面渠道的水力半径=R ( A ) A 、h b bh 2+ B 、bh h b 2+ C 、) (2h b bh + D 、bh h b )(2+ 11.突然扩大管段的局部水头损失=j h ( B ) A 、g v v 221- B 、g v v 2)(221- C 、g v v 22221- D 、g v v 22221+

第二次作业答案

1、在系统不受外力作用的非弹性碰撞过程中 ( C ) (A) 动能和动量都守恒; (B) 动能和动量都不守恒; (C) 动能不守恒、动量守恒; (D) 动能守恒、动量不守恒。 2、粒子B 的质量是粒子A 的质量的4倍,开始时粒子A 的速度为)43(j i +,粒子B 的速 度为)72(j i -,由于两者的相互作用,粒子A 的速度变为)47(j i -,此时粒子B 的 速度等于 ( A ) (A) )5(j i -; (B) )72(j i -; (C) 0; (D) )35(j i -。 3、力kN j i F )53( +=,其作用点的矢径为m j i r )34( -=,则该力对坐标原点的力矩大 小为 ( B ) (A)m kN ?-3; (B) m kN ?29; (C) m kN ?19; (D) m kN ?3。 4、对一个绕固定水平轴O 匀速转动的转盘,沿图示的同一水平直 线从相反方向射入两颗质量相同、速率相等的子弹,并停留在盘中,则子弹射入后转盘的角速度应 ( B ) (A)增大; (B) 减小; (C) 不变; (D) 无法确定。 1一飞轮作匀减速运动,在5s 内角速度由40πrad/s 减到10πrad/s ,则飞轮在这5s 内总共转过了 62.5 圈。 2如图所示,一弹簧竖直悬挂在天花板上,下端系一个质量为m 的重物,在O 点处平衡,设x 0为重物在平衡位置时弹簧的伸长量。以弹簧原长O' 处为弹性 势能和重力势能零点,则在平衡位置O 处的重力势能为___0mgx -_________。 3一人站在转动的转台上,在他伸出的两手中各握有一个重物,若此人向着胸部 缩回他的双手及重物,忽略所有摩擦,则系统的角动量____保持不变________,系统的转动动能_____增大_______。(填增大、减小或保持不变) 4一长为l ,质量均匀的链条,放在光滑的水平桌面上,若使其长度的很小一段悬于桌边下 (长度近似为0),然后由静止释放,任其滑动,则它全部离开桌面时的速率为 。(重力加速度为g )

第二次作业答案

第二次作业答案标准化管理部编码-[99968T-6889628-J68568-1689N]

1.指令中为什么使用隐地址方式。 答:简化地址结构。 2.简述堆栈操作的特点,并举例说明。 答:先进后出(或后进先出),例子略。 3. 指令字长16位,可含有3、2、1或0个地址,每个地址占4位。请给出一个操作码扩展方案。 和CISC的中文名称是什么。 RISC(Reduced Instruction Set Computer):精简指令集计算机 CISC(Complex Instruction Set Computer):复杂指令集计算机 5.简述80%和20%规律。 答:80%的指令是简单指令,占运行时间的20%;20%的指令是复杂指令,占运行时间的80%。 6.简化地址结构的基本方法是什么 答:采用隐地址 7.如何用通用I/O指令实现对各种具体设备的控制 答: 1)I/O指令中留有扩展余地 2)I/O接口中设置控制/状态寄存器 8.什么是I/O端口 答:I/O接口中的寄存器 9.对I/O设备的编址方法有哪几种请简要解释。 1)单独编址:I/O地址空间不占主存空间,可与主存空间重叠。 具体分为编址到寄存器和编址到设备两种。 编址到设备:每个设备有各自的设备编码;I/O指令中给出设备码,并指明访问该设备的哪个寄存器。 编址到寄存器:为每个寄存器(I/O端口)分配独立的端口地址;I/O指令中给出端口地址。 2)统一编址:为每个寄存器(I/O端口)分配总线地址;访问外设时,指令中给出总线地址。I/O端口占据部分主存空间。 10.用堆栈存放返回地址,则转子指令和返回指令都要使用的寄存器是什么 答:堆栈指针SP 11.给出先变址后间址、先间址后变址和相对寻址三种寻址方式对有效地址的计算方法。 先变址后间址:EA =((R)+D) 先间址后变址:EA =(R)+(D) 相对寻址:EA =(PC)±D 12.各种寻址方式的操作数放于何处,如何形成操作数的有效地址。 答:除寄存器直接寻址方式操作数放在寄存器中之外,其它寻址方式操作数均在主存中。 立即寻址:指令中提供操作数 直接寻址:指令直接给出操作数地址 寄存器寻址:指令中给出寄存器号就是有效地址 间接寻址:指令中给出间址单元地址码(操作数地址的地址),按照该地址访问主存中的某间址单元,从中取出操作数的地址

《数据库原理及应用》第二次在线作业参考答案

作业 第1题关系规范化中的删除操作异常是指() 您的答案:A 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第2题设计性能较优的关系模式称为规范化,规范化主要的理论依据是()。 您的答案:A 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第3题规范化理论是关系数据库进行逻辑设计的理论依据。根据这个理论, 关系数据库中的关系必须满足:其每一属性都是()。 您的答案:B 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第4题关系数据库规范化是为解决关系数据库中()问题而引入的。 您的答案:A 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第5题当关系模式R(A,B)已属于3NF,下列说法中()是正确的。 您的答案:B 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第6题关系模型中的关系模式至少是()。

题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第7题在关系模式R中,若其函数依赖集中所有候选关键字都是决定因素,则R最高范式是()。 您的答案:C 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第8题当B属性函数依赖于A属性时,属性A和B的联系是()。 您的答案:B 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第9题以下关于ER模型向关系模型转换的叙述中,()是不正确的。 您的答案:C 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第10题关系模式中,满足2NF的模式,()。 您的答案:B 题目分数:0.5 此题得分:0.5 批注:逻辑数据库设计 第11题 E-R模型用于数据库设计的()阶段。 您的答案:B 题目分数:0.5 此题得分:0.5 批注:概念数据库设计 第12题消除了部分函数依赖的1NF的关系模式,必定是()。 您的答案:B 题目分数:0.5

第二次作业

1、一个数据库包含多个不同的数据库对象,()不是SQL Server中的数据库对象。 A、查询 B、视图 C、表 D、存储过程 2、安装SQL Server后,数据库服务器已经自动建立了4个系统数据库,()不是系统数据库。 A、master数据库 B、tempdb数据库 C、pubs数据库 D、msdb数据库 3、创建数据库的Transact-SQL命令是()。 A、CREATE DATA B、CREATE DATABASE C、DEFINE DATA D、DEFINE DATABASE 4、修改数据库的Transact-SQL命令是()。 A、ALTER DATABASE B、ALTER DATA C、UPDATE DATA 5、删除数据库“student”的Transact-SQL命令是()。 A、DELETE DATA STUDENT B、DELETE DATABASE STUDENT

C、DROP DATA STUDENT D、DROP DATABASE STUDENT 6、以下关于数据库model的叙述中,正确的是()。 A、model数据库是SQL Server示例数据库 B、model数据库用于保存所有的临时表和临时存储过程 C、model数据库用作在系统上创建的所有数据库的模板 D、model数据库用于记录SQL Server系统的所有系统级别信息 7、SQL Server 2008的物理存储主要包括两类文件()。 A、主数据文件、次要数据文件 B、数据文件、事务日志文件 C、表文件、索引文件 D、事务日志文件、文本文件 8、用于存储数据库中表和索引等数据库对象信息的文件为()。 A、数据文件 B、事务日志文件 C、文本文件 D、图像文件 9、数据库备份的作用是()。 A、保障安全性 B、一致性控制 C、故障后的恢复 D、数据的转储 10、事务日志文件用于保存()。

第二次作业及参考答案

第二次作业及参考答案 1如何设计实验条件使欲了解的电极基本过程(如电化学反应过程)成为电极系统的受控过程? 答:设计实验条件使欲了解的电极基本过程成为电极系统的受控过程,需要了解该电极过程在电极总过程中的具体位置。例如对于简单电极过程,电极过程等效电路为: 要使电化学反应过程(等效电路元件为Rct)成为电化学测量过程中电极过程的受控步骤,即要使得电极过程的等效电路简化为 则应该设计如下实验条件: (1)采用鲁金毛细管、高导电率的支持电解质或断电流法、恒电位仪正反馈法等措施,以减小或补偿掉电解液欧姆电阻,电极的电子导体选用高导电率材料作电子导电物质,以减小或忽略掉电子导体的欧姆电阻; (2)电化学测量时采用小幅值外加激励信号,当外加激励作用于电极一段时间、双电层充(放)电结束但浓差极化还没出现时进行测量,以忽略双电层充放电过程和浓差极化的影响。 (3)当电化学反应物可溶时,可采用旋转圆盘电极、在适宜的高转速下对电极进行测量,以忽略浓差极化对电极过程研究的干扰。 2什么是支持电解质?作用是什么? 答:支持电解质:电导率强、浓度大、在电化学测量过程中承担溶液电迁移任务而不参与电化学反应的物质。可以使溶液的离子强度和电导率在测量过程中保持稳定,获得重现性良好的可靠数据。作用:(1)增强溶液导电性,减小溶液欧姆压降;(2)承担溶液电迁移任务,消除反应物或产物的电迁移传质;(3)支持电解质浓度大,离子迁移数大,溶液离子强度主要取决于支持电解质,可以忽略测量过程中因反应物或产物离子消耗引起的离子强度的变化,电极反应各物种扩散系数可近似视为常数;(4)有利于紧密双电层电容的构建,减小分散层电势(1电势)的影响;(5)加入支持电解质后溶液密度大,可以忽略因电活性物质浓度梯度引起的溶液密度差,从而减小或忽略界面附近的对流传质。 3 工作电极分类? 答:按电极是否作为反应物参与电极反应,工作电极分为两类:第一类工作电极和第二类工作电极。第一类工作电极可称为活性工作电极,电极既承担电子导电的任务,又作为反应物参与电极反应。第二类工作电极又称为惰性工作电极,

第二次作业答案

第二次作业答案 第二次作业答案 2019年4月9日 同学们: 你们好!完成此次作业首先需要大家对教材第3至第4章内容进行学习,之后才能作 以下作业。 一、单选题 1、一般地,银行贷款利率和存款利率的提高,分别会使股票价格发生如下哪种变化?() A 、上涨、下跌 B、上涨、上涨 C、下跌、下跌 D、下跌、上涨 2、通常,当政府采 取积极的财政和货币政策时,股市行情会()。 A 、看涨 B、走低 C、不受影响 D、无 法确定 3、判断产业所处生命周期阶段的最常用统计方法是()。 A 、相关分析 B、回归 分析 C、判别分析法 D、主成分分析法 4、某支股票年初每股市场价值是30元,年底的市场价值是35元,年终分红5元, 则该股票的收益率是()。 A 、10% B、14.3% C、16.67% D、33.3% 5、某人投资了三种股票,这三种股票的方差—协方差矩阵如下表,矩阵第(i ,j )位置上的元素为股票I 与j 的协方差,已知此人投资这三种股票的比例分别为0.1,0.4,0.5,则该股票投资组合的风险是()。方差—协方差 A B C A 100 120 130 B 120 144 156 C 130 156 169 A 、9.2 B、8.7 C、12.3 D、10.4 6、对于几种金融工具的风险性比较,正确的是()。 A 、股票>债券>基金 B、债券>基金>股票 C 、基金>债券>股票 D、股票>基金>债券 7、纽约外汇市场的美元对英镑汇率的标价方法是()。 A 、直接标价法 B、间接 标价法 C、买入价 D、卖出价

8、一美国出口商向德国出售产品,以德国马克计价,收到货款时,他需要将100万 德国马克兑换成美元,银行的标价是USD/DEM:1.9300-1.9310,他将得到()万美元. A 、51.5 B、51.8 C、52.2 D、52.6 9、2000年1月18日伦敦外汇市场上美元对英镑汇率是:1英镑=1.6360—1.6370美元,某客户买入50000英镑,需支付()美元。 A. 、30562.35 B、81800 C、81850 D、30543.68 10、马歇尔—勒纳条件表明的是,如果一国处于贸易逆差中,会引起本币贬值,本币 贬值会改善贸易逆差,但需要具备的条件是()。 A 、本国不存在通货膨胀 B、没有政 府干预 C 、利率水平不变 D、进出口需求弹性之和必须大于1 二、多选题 1、下列影响股票市场的因素中属于基本因素的有()。 A .宏观因素 B.产业因素 C.区域因素 D.公司因素 E.股票交易总量 2、产业发展的趋势分析是产业分析的重点和难点,在进行此项分析时着重要把握()。 A .产业结构演进和趋势对产业发展的趋势的影响 B .产业生命周期的演变对 于产业发展的趋势影响 C .国家产业改革对产业发展趋势的导向作用 D .相关产业发展 的影响 E .其他国家的产业发展趋势的影响 3、技术分析有它赖以生存的理论基础——三大假设,它们分别是() A .市场行 为包括一切信息 B .市场是完全竞争的 C .所有投资者都追逐自身利益的最大化 D .价格沿着趋势波动,并保持趋势 E .历史会重复 4、下面会导致债券价格上涨的有()。 A .存款利率降低 B .债券收益率下降 C .债券收益率上涨 D .股票二级市场股指上扬 E .债券的税收优惠措施 5、某证券投资基金的基金规模是30亿份基金单位。若某时点,该基金有现金10亿元,其持有的股票A (2000万股)、B (1500万股),C (1000万股)的市价分别为10元、20元、30元。同时,该基金持有的5亿元面值的某种国债的市值为6亿元。另外, 该基金对其基金管理人有200万元应付未付款,对其基金托管人有100万元应付未付款。 则() A .基金的总资产为240000万元 B .基金的总负债为300万元 C .基金总净值位237000万元 D .基金单位净值为0.79元 E .基金单位净值为 0.8元

人力资源管理-第二次至第四次作业答案

第二次作业:形成性考核二(A) 一、单项选择题(共 10 道试题,共 30 分。) 1. 不同社会形态,不同的文化背景,都会反映和影响人的价值观念、行为方式、思维方式。这 说明人力资源具有什么特征?A A. 社会性 B. 再生性 C. 实效性 D. 能动性 2. 在理论界通常将()看作人力资本理论的创立者、人力资本之父。B A. 亚当.斯密 B. 舒尔茨 C. 泰勒 D. 马斯洛 3. 人力资源开发要抓住人的年龄最有利于职业要求的阶段来实施最有利的激励措施,这是因为 人力资源具有()特征。B A. 能动性 B. 时效性 C. 社会性 D. 再生性 4. 确保组织生存发展过程中对人力资源的需求的人力资源管理环节是()。B A. 人员招聘 B. 人力资源规划 C. 培训 D. 工作分析 5. 人力资源需求预测方法中的专家判断法又称()。A A. 德尔菲法 B. 马尔可夫分析法 C. 回归分析法 D. 经验判断法 6. 由组织的各级管理者,根据需要预测对各种人员需要量,人力资源管理的规划人员把各部门 的预测进行综合,形成总体预测方案,这种方法称为()。C A. 管理人员判断法 B. 经验预测法 C. 微观集成法 D. 德尔菲法 7. 工作性质完全相同的职位系列称作()。B A. 职级 B. 职系

C. 职组 D. 职等 8. 工作评价的对象是()。A A. 职位 B. 任职者 C. 职级 D. 职称 9. ()就是要评定工作的价值,制定工作的等级,以确定工资收入的计算标准。B A. 工作分析 B. 工作评价 C. 职等 D. 职级 10. ()的缺点是备选对象范围狭窄。 A. 内部招聘 B. 外部招聘 C. 校园招聘 D. 人才猎取 二、多项选择题(共 10 道试题,共 30 分。) 1. 人力资本与物质资本具有以下特点()。AB A. 两者对经济都具有生产性的作用 B. 两者都需要投资才能形成 C. 物资资本对现代国民经济增长和国民收入增加的作用比人力资本要重要得 多 D. 物质资本和人力资本都不具备继承或转让的属性 2. 人力资源具有以下特征:全 A. 社会性 B. 时效性 C. 能动性 D. 再生性 3. 人力资源供给小于需求,可以采取的办法是()。ABC A. 进行技术创新,提高劳动生产率 B. 在法律允许的范围内,增加员工工作时间 C. 录用临时人员

第二次作业参考答案

第二次作业参考答案 1、中等长度输电线路的集中参数等值电路有那两种形式?电力系统分析计算中采用哪一种?为什么? 答:中等长度输电线路的集中参数等值电路有τ型等值电路和π型等值电路两种,电力系统分析计算中采用π型等值电路。因为电力系统分析计算通常采用节点电压法,为减少独立节点的数目,所以采用π型等值电路。 2、为什么要采用分裂导线?分裂导线对电晕临界电压有何影响? 答:采用分裂导线是为了减小线路的电抗,但分裂导线将使电晕临界电压降低,需要在线路设计中予以注意。 3、输电线路进行全换位的目的是什么? 答:输电线路进行全换位的目的是使输电线路各相的参数(电抗、电纳)相等。 4、变压器的τ形等值电路和T 形等值电路是否等效?为什么? 答:变压器的τ形等值电路和T 形等值电路不等效,τ形等值电路是将T 形等值电路中的励磁值路移到一端并用相应导纳表示所得到的等值电路,是T 形等值电路的近似电路。 5、已知110KV 架空输电线路长度为80km,三相导线平行布置,线间距离为4m ,导线型号为LGJ -150,计算其参数并画出其等值电路。(LGJ-150导线计算外径为17mm ) 解:由于线路为长度小于100km 的短线路,线路的电纳和电导可以忽略不计,因而只需计算其电抗和电阻。 )(5426.1m D m ≈?==500(cm ),导线计算半径)(5.82 17 cm r == ,标称截面为)(1502mm S =,取导线的电阻率为km mm /.5.312Ω=ρ。 )/(21.0150 5.311km S r Ω===ρ )/(416.00157.05 .8500 lg 1445.01km x Ω=+= 输电线路的总电阻和总电抗分别为: )(8.168021.01Ω=?==l r R 、)(28.3380416.01Ω=?==l x X 输电线路的单相等值电路如图

人力资源管理A第2次作业

人力资源管理A第2次作业 一、主观题(共21道小题) 1. HRM主要工作涉及到四方面内容,即:选人、育人、用人、留人。 2.2. HRM中,选人时应考虑最合适的人,即最适原则高于最优原则。 3. X、Y、Z理论分别是道格拉斯·麦格雷戈、道格拉斯·麦格雷戈、威廉·大内提出的。 4.4. 市场里的企业是一个人力资本与非人力资本的特别合约。 5. 企业里的人力资本应包括企业家的人力资本、经理的人力资本、普通雇员的人力资本。此外,配置能力也应是人力资本概念的一部分,那些造成非均衡的事件也构成了对这种能力的需求。 6. 美国经济学家西奥多·舒尔茨是对人力资本研究最具划时代的经济学家。 7. 根据劳动态度的不同,人们的劳动类型有被动劳动、主动劳动、创造劳动三种。 8. 根据动机与激励理论,人的行为是由动机支配的;在朝向一定目标的前提下,能力、积极性、工作成绩三者之间关系可以这样描述:工作成绩=能力×积极性。 9. 权力的需要、归属的需要、成功的需要是成就动机理论的核心内容。 10. 期望理论可以用公式表示为:激发力量=效价×期望(M=V×E)。 11. 激励机制 答:激励机制指组织系统中,激励主体通过激励因素与激励客体之间相互作用的方式。12. 人力资源开发 答:就是把人视为一种稀缺资源,以人为中心,强调人与事的统一发展,特别注重人的潜能的开发。 13. 人事管理 答:视人为成本,以事为中心,注重现有人员的管理,主要是人员的招收、任用、调配、和奖惩的静态管理。 14. 质量圈 答:日本将戴明环:PDCA的管理思想与日本的实际结合,把质量控制的责任交给车间,就这样形成了质量圈。 15. 气质 答:气质是指人们的行为的动力特点,体现人们心理过程的速度、强度、稳定性、指向性等特征,例如人反应是灵活还是稳定,情感是强烈还是沉稳的等等。 16. 能力 答:能力,是指人们行为的效率特点,分为实际能力和潜在能力;前者是与某种知识和技艺相结合的能力,是实际生活中表现出来的能力。后者是掌握某种知识和技能的可能性大小,是实际能力赖以形成的个体基础。 17. 性格 答:性格,指人们行为的方式特点,是人们对待现实的习惯性态度。 18. 个性 答:个性也称为人格,也就是个体特殊性,主要是指个体的意识倾向性;是人们心理和品质的稳定特征,由气质、能力、性格等方面因素构成。 19. 简述需要五层次理论与ERG理论的异同。 答:1、同[1]、生存需要,与马斯洛的生理与安全需要相同。[2]、关系需要,与马斯洛的安全、社交、尊重的需要相同。[3]、成长需要,与马斯洛的尊重及自我实现的需要相近。2、异[1]、需要层次理论以“满足——前进途径”为基础,但ERG理论除此之外,还有“挫折——退缩”,退而求其次;[2]、ERG理论表明,在某一时间可有一个以上需要发生,这

《现代汉语》第二次作业答案

《现代汉语》第二次作业答案 你的得分: 98.5 完成日期:2018年01月29日 16点10分 说明:每道小题选项旁的标识是标准答案。 一、单项选择题。本大题共20个小题,每小题 2.0 分,共40.0分。在每小题给出的选项中,只有一项是符合题目要求的。 1.对普通话而言,汉语方言是一种() A.地域分支 B.并立的独立语言 C.民族共同语的高级形式 D.对立的独立语言 2.就与普通话的差别来说,七大方言中()与普通话距离最大。 A.吴方言 B.闽、粤方言 C.湘、赣方言 D.客家方言 3.发音时,气流从舌两边发出来的音叫() A.舌音 B.舌面音 C.边音 D.卷舌音 4.舌尖后音包括() A.j、q、x B.zh、ch、sh、r C.zh、ch、sh、r、l D.d、t、n、l 5.舌位后、半高、唇不圆的元音韵母是() A. e B.o C. a D.i 6.i和e的区别在于() A.舌位的高低不同 B.舌位的前后不同 C.嘴唇的圆与不圆 D.舌位的前后不同和嘴唇的圆与不圆 7.根据普通话声韵配合规律,与f相拼的韵母是() A.开口呼、合口呼 B.齐齿呼、撮口呼 C.开口呼、齐齿呼 D.合口呼、撮口呼 8.轻声的作用是()

A.使语音有抑扬顿挫的变化,可以增加语音的音乐性 B.可以使生理上得到调节,避免劳累 C.可以区别一些词的词性和意义 D.感情色彩有强弱 9.从汉字的造字方法来看,"禾、衣、果"三个字都是() A.象形字 B.指事字 C.会意字 D.形声字 10.从下列四组字中选出造字法与另三组不同的一组:() A.萌旺佐 B.芳响何 C.草睛伙 D.莫明信 11.我国第一部以偏旁部首整理出来的字书是() A.《说文解字》 B.《集韵》 C.《康熙字典》 D.《中华大字典》 12.“凹”和“凸”两个字的笔画数都是()。 A.5笔 B.6笔 C.7笔 D.8笔 13.下列各组词中全部是联绵词的是() A.仓猝、唐突、阑干、苗条、蝙蝠 B.坎坷、蟋蟀、枇杷、卢布、拮据 C.详细、伶俐、逍遥、葫芦、蒙胧 D.游弋、叮咛、摩托、喽罗、吩咐 14."喂养"和"饲养"的区别是() A.动作的行为特点不同 B.动作行为的施事者不同 C.语义轻重不同 D.支配对象不同 15."反法西斯主义者"中的语素有() A.两个 B.三个 C.四个 D.五个 16."惆怅"一词是() A.叠韵词 B.双声词 C.音译词 D.非双声叠韵词

大学英语一第二次作业答案A

作业答案 -------------------------------------------------------------------------------- 作业名称:大学英语(一)第二次作业 作业总分:100 通过分数:60 起止时间:2015-5-4 至2015-5-29 23:59:00 标准题总分:100 详细信息: 题号:1 题型:单选题(请在以下几个选项中选择唯一正确答案)本题分数:2 内容: You ___________ such a long essay. The teacher only asked us to write 300 words, and you have written 600. A、mustn't have written B、needn't have written C、didn't write D、didn't need to write 正确答案:B 题号:2 题型:单选题(请在以下几个选项中选择唯一正确答案)本题分数:2 内容: When he worked there, he _________ go to that tea house at the street corner after work every day. A、would B、should C、had better D、might 正确答案:A 题号:3 题型:单选题(请在以下几个选项中选择唯一正确答案)本题分数:2 内容: The old people can join in various organized _____, such as sight-seeing tours and theatre visits. A、acts B、active C、actions D、activities 正确答案:D 题号:4 题型:单选题(请在以下几个选项中选择唯一正确答案)本题分数:2 内容:

相关主题
文本预览
相关文档 最新文档