Assignment 1

合集下载

研究生英语翻译 Assignment 1

研究生英语翻译 Assignment 1

Moreover, much of the new wealth turned out to be pure illusion, paper wealth that could vanish as magically as it had appeared.
而且,很多新财富现在看来纯粹是一场镜 花水月.纸面财富来得快,去得也快.
The fantasy that everyone can become rich in the information economy has soured in today’s reality, and many now wonder whether they will keep their job or be able to meet their rent and pay off their credit cards. 网络经济时代人人都可暴富的神话,被今 天的现实击得粉碎.现在许多人都不知道 能否保得住工作,能否付得起房租,能否付 得清信用卡的透支款.
Assignment 1
But the collapse of the dot-com economy and thd the prospects of a serious economic slowdown at this writing in 2001, have put the fabled new economy in a different light. 但是,2000年网络经济崩溃,高新技术板块 的纳斯达克指数大跌, 2001年本文写作时 经济面临严重衰退.这一切都使得虚幻的 新经济成为明日黄花.
We are learning that the boom never really did reach millions of Americans, since the bulk of the new wealth created in the 1990s was pocketed mainly by the very rich. 我们开始明白,千百万美国人根本没有从 这次经济繁荣中受益,因为20世纪90年代 所创造的大量新财富主要都被富人纳入 囊中.

Assignment 1

Assignment 1

数据结构与算法分析(2017年秋季学期),Assignment #1截止日期:2017年9月21日星期四姓名:________________ 学号:___________________ 班级:_______________在答题之前,请仔细阅读以下注意事项:(1)请独立完成作业。

(2)本作业包含五个大题,请用英语简单明确作答。

(3)请于截止日期前将作业纸质版本交给本班学习委员,学习委员在9月21日星期四上课开始前将作业集中交给我。

(4)请务必按时提交作业,从9月21日10点40分开始计时,迟交24小时内作业总分扣30%,迟交24小时之后,该次作业计0分。

1.Define an ADT for a set of integers (remember that a set may not contain duplicates). Your ADTshould contain the following seven operations:a)Insert: insert an integer into a set;b)Delete: remove an integer from a set;c)Size: return the size of a set currently;d)Empty: return if a set is empty;e)Union: return the union of two sets;f)Intersection: return the intersection of two sets;g)SetDifference: return the difference of two sets.Each operation should be clearly defined in terms of its input and output.2.State whether each of the following relations is a partial ordering, and explain why or why not.a)“isFatherOf” on the set of people.b)“isOlderThan” on the set of people.c)“noLessThan” on the set of integers.d){(a,b),(a,a),(b,a)} on the set of {a,b}.e){(2,1),(1,3),(2,3)} on the set of {1,2,3}.3.Answer the following two questions.a)Prove that x log a y = y log a x for any a > 0, x > 0, and y > 0.b)Derive the closed form of the recurrence relation: f(n) = 2 f(n/2) + 2n, with f(1) = 1.To simplify the problem, you may assume that n is a power of 2. That is, the relation holds for n = 2t for some non-negative integer t.4.For each pair of the following functions, determine whether f(n) is in O(g(n)), f(n)is in Ω(g(n)),or f(n) = Θ(g(n)).a)f(n) = log(n2); g(n) = log n + 7b)f(n) = log(n2); g(n) = √nc)f(n) = log n; g(n) = n log n + nd)f(n) = n; g(n) = (log n)25.Let P be an array storing integers.a)Write in pseudocode an algorithm to find a sub-array of P with the largest sum. That is, youralgorithm takes as input an array P, its size n, and returns two array indexes i and j with i≤j, such that the sum: P[i]+P[i+1]+...+P[j−1]+P[j] is as large as possible.For example, if P={−1,5,−3,7,−2}, your algorithm should return 1 and 3.b)Analyze the time complexity of your algorithm in the worst case.。

Assignment 1.doc``

Assignment 1.doc``

Assignment 1:Please translate the following ten sentences. You can put your translation right below the sentence.1.You are welcome to send for our free catalogue.欢迎您索函我们的免费目录2.The set of equipment is quite late arrivals for doctors to use.这一系列供医生使用的装备来得是相当的晚。

3.I questioned the wisdom of her going there with Tim.我怀疑她和蒂姆一起来这是否是明智的。

4.She is being polite.她故意装出一副有礼貌的样子。

5.He had a sound feeling that idioms were the backbone of language andhe was all for the racy phrases.他认为谚语是语言中的支柱,并主张使用这些生动的语言,他的看法是有道理的。

6.The black people were fighting against the segregation of thegovernment.黑人曾经和政府的种族隔离相对抗。

7.I had the muscle, and they made money out of it.我有力量,并且他们应该利用我的力量赚钱。

8.I drank some ice tea, but it made me more thirsty.我刚才喝了冰茶,但是它让我觉得更口渴了。

9.He is a wicked tennis player.他是一个没有道德素养的网球运动员。

10.M y work, my family, my friends were more than enough to fill mytime.干工作,做家务,与朋友相处这些已经足够占据了我的大部分时间。

assignment-1

assignment-1

assignment-1 Find a database system in you lifeDiscover a database system in your life, submit a report which discusses the application background , the functions it provides and what data/information need to be stored in such a system with the functions you proposed above生活中的数据库近年来,随着计算机网络技术的飞速发展,数据库在我们生活中的应用越来越广泛,例如学校的学生管理系统、图书馆的图书管理系统、各大网站的后台数据库、各个企业的财务管理系统等等。

这些系统和网站都依靠着数据库的支持,才能正常运行。

最近阿里巴巴的上市引起了许多人的关注,而阿里巴巴集团旗下的淘宝网也已经成为了人们日常生活中必不可少的东西。

而淘宝网能够正常运行,少不了数据库的支持。

我们要想在淘宝网上买东西,首先必须要有一个淘宝账户,所以,我们需要进行注册,输入自己的用户名、密码等相应资料,而我们的账户信息就存储在淘宝网的后台数据库中,因为有了数据库的支持,我们可以看到自己的交易记录、收藏的商品、物流的信息等等。

商家需要将自己的商品信息进行存储,商品的价格、库存、颜色、尺寸等等信息都会存储到数据库里,因为数据库,我们才能浏览到商品,获知商品的各种信息。

还有商家的信息,如网店的创建时间、网店的评分、客服人员等等也会存储到数据库里。

如果我们选择网上付款,那各大银行的网银系统也需要有自己的数据库来存储客户的信息。

我简单的将数据库中存储的数据罗列下来:12345。

assignment 1_译析

assignment 1_译析

第一讲练习试将下列句子译成汉语:1.The many colors of a rainbow range from red on the outside to violet on the inside.彩虹有多种颜色,外圈红,内圈紫。

2. He had a disconcerting habit of expressing contradictory ideas in rapid succession.他有一种令人难堪的习惯:一会儿一个看法,自相矛盾,变化无常。

3.This was an intelligently organized and fervent meeting in a packed Town Hall, with Mr. Strong in the chair.这是一次精心组织起来的会议。

市政厅里济济一堂,热情洋溢,主持会议的是斯特朗先生。

4.Power can be transmitted over a great distance withpractically negligible loss if it is carried by an electric current.电流可以把动力传送到很远的地方,其消耗几乎可以忽略不计。

5.The present onslaught of vehicles poses a serious threat to urban life and pedestrian peace of mind.当前,车辆横冲直闯,严重地威胁着城市生活,路上行人无不提心吊胆。

6.Change of information, if any, concerning the contents of this section will be found in the appendix at the end of this book.本节内容如有更改,均见本书末附录。

7.She said, with perfect truth, that “it must be delightful to have a brother,”and easily got the pity of tender-hearted Amelia, for being alone in the world, an orphan without friends or kindred.她说道,“有个哥哥该多好啊,”这话说得入情入理。

北航计算机研究生课程_算法设计与分析__Assignment_1

北航计算机研究生课程_算法设计与分析__Assignment_1

一、解:设第k月的需求量为Nk(k=1,2,3,4)状态变量Xk:第k月初的库存量,X1=X5=0,0≤Xk≤Nk+…+N4决策变量Uk:第k月的生产量,max{0,Nk-Xk}≤Uk≤min{6,Nk+…+N4 - Xk}状态转移方程:X k+1 = Uk + Xk – Nk第k月的成本Vk = 0.5*(Xk - Nk) Uk=03 + Uk + 0.5*(Uk + Xk - Nk) Uk≠0设F k(Xk)是由第k月初的库存量Xk开始到第4月份结束这段时间的最优成本则F k(Xk) = min{Vk + F k+1(X k+1)} 1≤k≤4= min{ 3 + Uk + 0.5*(Uk + Xk - Nk) + F k+1(Uk + Xk - Nk) } Uk≠0min{ 0.5*(Xk - Nk) + F k+1(Xk - Nk) } Uk=0 F5(X5)=0四个月内的最优成本为F1(X1)=F1(0)详细计算步骤如下:(1)k=4时4(2)k=3时(3)k=2时(4)k=1时由以上计算可得,4个月的总最优成本为F1(0) = 20.5(千元)二、解:1、变量设定阶段k:已遍历过k个结点,k=1,2…6,7。

K=1表示刚从V1出发,k=7表示已回到起点V1状态变量Xk=(i,Sk):已遍历k个结点,当前位于i结点,还未遍历的结点集合为Sk。

则X1=(1,{2,3,4,5,6}),X6=(i,Φ),X7=(1,Φ)决策变量Uk=(i,j):已遍历k个结点,当前位于i结点,下一个结点选择j。

状态转移方程:X k+1 = T(Xk,Uk) = (j,Sk-{j})第k阶段的指标函数Vk = D[i,j]。

最优指标函数Fk(Xk) = Fk(i,Sk):已遍历k个结点,当前从i结点出发,访问Sk中的结点一次且仅一次,最后返回起点V1的最短距离。

则Fk(i,Sk) = min{ D[i,j] + F k+1(j,Sk-{j}) } 1≤k≤6F7(X7) = F7(1,Φ) = 02、分析:(1)k=6时,F6(i,Φ) = min{D[i,1] + F7(X7)} = D[i,1] i=2,3,4,5,63、伪代码和时间复杂度为方便计算,结点编号改为0到5.(1)用一张二维表格F[][]表示F(i,Sk),行数是n,列数是2n-1。

Assignment1

Assignment1

(1)
i=1
Consider the following small data set:
xy 13 -1 -2 24
• Solve for the value of θ1 that minimizes the cost function by substituting the values from the training set into the cost function, setting the derivative equal to zero, and solving for θ1. Show your work.
3
some θ0, θ1 such that J(θ0, θ1) = 0. Which of the statements below must then be true? (Check all that apply.)
A: This is not possible: By the definition of J(θ0, θ1), it is not possible for there to exist θ0 and θ1 so that J(θu,
v
)
2.
∂ ∂v
f
(u,
v)
3.
∂ ∂u
h(u,
v)
4.
∂ ∂v
h(u,
v
)
Partial Derivative Intuition Consider the contour plot of a function f (u, v) in Figure 1. For each of the following partial derivatives, state whether it is positive, negative, or equal to zero. Briefly explain. These questions can be answered from the contour plot without knowing the formula for the function.

Assignmen1(广告文本的翻译)

Assignmen1(广告文本的翻译)

Assignment: (做成PPT周三下午5点前发到老师邮箱,4人一组)1.上海无线电二厂上海无线电二厂是全国著名企业之一,专门生产收音机、收录机、通讯机、无线扩音机和音响设备。

冠以“红灯”、“飞乐”著名商标,享誉国内海外。

该产品款式新颖、音质优美、质量可靠、功能齐备。

它将赢得您的喜爱,并给您的家庭带来欢乐。

地址:中国上海市宜昌路九十六号电话:583500Shanghai No.2 Radio FactoryAs with you know, our Shanghai No.2 Radio Factory is one of the most famous enterprises in China. We specialized in the productions of radio sets, radio recorders, communication equipments, radio amplifiers and some other audio systems. Equipped with a complete range of functions and attractions of novel design, these famous brands of audio systems named “Red Lantern “and “Feile”, will certainly bring you the stunning sound. Moreover, the brands now are popular both home and abroad. And I’m sure that it will be the best choice for you and your family to have happiness.Address: No.96, Yi Chang Rode, Shanghai, ChinaTel: 5835002.西苑饭店西苑饭店是一座具有国际四星级水准的大型涉外饭店,位于北京三里河路,与进出口谈判大楼、北京图书馆、首都体育馆等相毗邻,环境优美,交通便利。

assignment 1

assignment 1

I. Translate the following sentences. Before translating, please rewrite them into modern Chinese.(TAP)For example:子曰:“巧言令色,鲜矣仁!”现代汉语:孔子说:“花言巧语,伪善的面貌,这种人,‘仁德’是不会多的。

”译文:The Master said, “It is rare, indeed, for a man with cunning words and an ingratiating countenance to be benevolent.”ingratiating:奉承的,讨好的countenance:面容,表情benevolent:仁慈,善行1.子曰:“温故而知新,可以为师矣。

”2.子曰:“君子不器。

”3.子贡问君子。

子曰:“先行其言则后从之。

”4.子曰:“君子周而不比,小人比而不周。

”5.子曰:“学而不思则罔,思而不学则殆。

”II. Translate the following passage into Chinese.When the boy came back the old man was asleep in the chair and the sun was down. The boy took the old army blanket off the bed and spread it over the back of the chair and over the old man’s shoulders. They were strange shoulders, still powerful although very old, and the neck was still strong too and the creases did not show so much when the old man was asleep and his head fallen forward. His shirt had been patched so many times that it was like the sail and the patches were faded to many different shades by the sun. The old man’s head was very old though and with his eyes closed there was no life in his face. The newspaper lay across his knees and the weight of his arm held it there in the evening breeze. He was barefooted.。

assignment1

assignment1

CSC415/CI6226 2011 P rogramming A ssignment 1 (100 p oints) Objectives: I n t his a ssignment, y ou w ill•Build a s pelling c orrection e ngine•Build a t ext s earch e ngine w ith L ucene, a nd•Integrate y our s pelling c orrector i nto t he t ext s earch e ngineDue: M arch 10, 2011 (Thursday) 11:59pm. L ate s ubmissions a re a llowed b ut w ill b e p enalized a t a r ate of 10% p er d ay.Teams: Y ou a re a llowed (but n ot r equired) t o w ork i n p airs f or t his a ssignment. T eams o f t wo s hould only s ubmit o ne c opy o f t heir w ork. Y ou m ay (and a re e ncouraged t o) d iscuss w ith o ther t eams, b ut should N OT t ake a ny d etailed n otes f rom t he d iscussions t hat w ill a ppear v erbatim i n y our s ource c odes and r eports.Implementation: W e s trongly r ecommend t hat y ou w rite y our p rogram i n J ava, t hough y ou m ay u se other p rogramming l anguages (e.g. C, C++, P ython) w ithout o fficial s upport (e.g. L ucene). Delivery: Y ou s hould s ubmit t he f ollowings v ia e mail t o j ungjae.kim@.sg:•A z ip f ile t hat c ontains t he c odes y ou w rote (Do N OT i nclude d ata f iles a nd c ompiled l ibraries) •A t ext f ile w ith p rogram o utput•A d ocument i n r eadable E nglish s entences w ith f igures o r t ables a s n eeded. T he d ocument should N OT h ave m ore t han 4 p ages (excluding f igures a nd t ables). I t s hould c ontain o The n ames o f t eam m emberso Descriptions o f w hat y ou h ave d one f or e ach p art, r epresentative o utput f rom y our program, a ny n otable d esign d ecisions m ade o r t rade-­‐offs c onsidered (withjustifications), a nd a n e rror a nalysis o f w hen y our s ystem f ailso Detailed i nstructions o n h ow t o c ompile a nd r un t he c odes f or e ach p art, i ncluding where t o p lace d ata f iles a nd l ibraries u sed. I f y ou u se a ny o ther r esource f iles e xceptthose p rovided b y u s, p lease p lace t hem i n a W eb s ite (e.g. N TU M ySite) a nd d escribehow t o d ownload t hem s o t hat w e c an d ownload a nd t est t hem. P lease m ake s ure t heinstructions w ork o n o ther m achines e xcept y ours b efore s ubmission. Y ou w ill l osepoints i f y our c odes f ail t o c ompile o r r un o n t he e valuator’s m achine.If y our e mail s ubmission i s r eturned b ack t o y ou a s a s pam d ue t o t he c odes b y t he N TU e mail s ystem, you s hould s ubmit t he p rogram o utput a nd t he d ocument b y e mail b y t he d eadline a forementioned a nd bring a U SB m emory d evice w ith t he c odes t o t he o ffice (N4-­‐02c-­‐111) d uring o ffice h ours o n M arch 11. Honor c ode: Y ou s hould n ot l ook f or p roblem a nswers e lsewhere. B ut, i f m aterial i s t aken f rom elsewhere, t hen y ou s hould a cknowledge i t. Y ou a re n ot p ermitted t o g et p rogramming h elp f rom people o ther t han y our p artner. I n g eneral, w e w ill e xpect y ou t o a ct o n y our h onor.Part 1: S pelling C orrection (40 p oints)In t his p art y ou w ill b uild a n n-­‐gram b ased s pelling c orrector. I n l ecture 3 (tolerant r etrieval), w e s aw that o ne w ay t o o ffer s pelling s uggestions w as t o c ount t he p roportion o f c haracter n-­‐grams t hat o verlap between t he q uery w ord a nd k nown w ords f rom a c orpus. D oing s o w ill r equire a n i nverted i ndex t hat maps n-­‐grams t o d ictionary w ords a nd a s coring f unction t hat c ounts n-­‐gram o verlaps b etween candidate w ords. Y ou a re o n y our o wn f or b uilding t he i nverted i ndex -­‐ y ou s hould n ot u se a ny e xisting libraries o r c ode s nippets t o d o t his f or y ou. Y ou s hould i mplement t he J accard s core o f n-­‐gram o verlap as d escribed i n c lass a s t he s coring f unction f or c andidate r eplacements.Take a l ook a t t he s .ntu.ir.spell.SpellingCorrector i nterface:package .ntu.ir.spell;import java.util.List;/*** Basic interface for the spelling corrector.** @author dramage (revised by kim)*/public interface SpellingCorrector {/*** Returns a list of top-scoring spelling corrections for a given* (possibly misspelled) word. The list is expected to include* the best corrected spelling. The maximum length of the* returned list will be specified, while the actual length of* the list may be smaller than it.** @param word A single word whose spelling is to be checked.* @param max The maximum number of corrections in the* returned list. Should be greater than 0.* @return A list of top-scoring corrections, with better corrections* ordered first.*/public List<String> corrections(String word, int max);}Your n-­‐gram b ased s pelling c orrector w ill i mplement t his i nterface t o r eturn a l ist o f m ost l ikely candidate s pelling c orrections f or a g iven (possibly m isspelled) w ord.Your s pelling c orrector s hould r ead a ll t he w ords f rom a l arge f ile o f E nglish t ext. Y ou m ay u se t he t ext file (‘big.txt’) t hat c omes f rom P eter N orvig's p age o n H ow t o W rite a S pelling C orrector, w hich t akes a n alternative a pproach t o b uilding a s pell c hecker. [From N orvig's s ite: "The f ile i s a c oncatenation o f several p ublic d omain b ooks f rom P roject G utenberg a nd l ists o f m ost f requent w ords f rom W iktionary and t he B ritish N ational C orpus."]You m ust c omplete t he f ollowing s ub-­‐problems:1.1. I mplement a n n-­‐gram s pelling c orrector (named s .ntu.ir.spell.NGramSpellingCorrector) b asedon t he w ords i n t he f ile b ig.txt. B riefly d escribe y our i mplementation a nd p rovide s ome e xample mis-­‐spelled w ords a long w ith t he p ossible c orrections y our a lgorithm p rovides. W hat i s t he o utput of s .ntu.ir.spell.SpellingScorer c lass (see b elow) w hen r un w ith a rguments s hown b elow (a-­‐d)?What a re t he s ources o f e rrors?.ntu.ir.spell.NGramSpellingCorrector 1 ‘path t o s pelltest1.txt’.ntu.ir.spell.NGramSpellingCorrector 1 ‘path t o s pelltest2.txt’.ntu.ir.spell.NGramSpellingCorrector 10 ‘path t o s pelltest1.txt’.ntu.ir.spell.NGramSpellingCorrector 10 ‘path t o s pelltest2.txt’1.2. I n c lass, i t i s m entioned t hat a n n-­‐gram b ased c orrector c ould b e u sed i n c oncert w ith a n e ditdistance f unction. W rite a n i mplementation o f L evenshtein e dit d istance a nd a n ew i mplementation of S pellingCorrector, c alled N GramWithEditDistanceSpellingCorrector, t hat w raps t he u nderlying spelling c orrector a nd r e-­‐scores i ts o utput u sing t he w eighted e dit d istance f unction. I n p articular, use y our n-­‐gram s pelling c orrector t o g et s ome n umber o f c losest c andidates i n t he d ictionary, score e ach w ith t he E dit d istance f unction a nd t hen s uggest t he c orrections w ith l owest e ditdistance. P rovide o utput, e xamples, a nd e rror a nalysis a s y ou d id f or s ub-­‐problem 1.1, w hilereplacing ‘NGramSpellingCorrector' w ith ‘NGramWithEditDistanceSpellingCorrector' i n t hearguments.1.3. W rite a w eighted e dit d istance f unction a nd u se i t f or a n ew i mplementation o f S pellingCorrector,called N GramWithWeightedEditDistanceSpellingCorrector. Y ou s hould d efine y our o wn w eighting scheme, f or e xample, a llowing d ifferent w eights f or d ifferent k inds o f e dit o perations a nd d ifferent weights f or d ifferent c haracter r eplacements. H ow d id y ou f ind t he w eighting s cheme a nd w hy?What i s t he i mpact o f a ny c hanges o n t he s cheme? P rovide o utput, e xamples, a nd e rror a nalysis a s you d id f or s ub-­‐problem 1.1, w hile r eplacing ‘NGramSpellingCorrector' w ith‘NGramWithWeightedEditDistanceSpellingCorrector' i n t he a rguments.Using S pellingScorer a nd A utomatic Q uantitative G radingThe i ncluded c lass s .ntu.ir.spell.SpellingScorer p rovides a w ay t o t est t he r esults o f y our SpellingCorrector i mplementations a cross a c ollection o f s pelling e rrors (see t he N orvig's s ite). T o r un the S pellingScorer, y ou s hould p rovide t he f ollowing t hree a rguments:1.Java c lass o f t he s pelling c orrector t o b e t ested2.The m aximum n umber o f c orrections f or e ach m is-­‐spelling t o b e t ested.3.Path t o t he d ata f ile t o b e t ested (e.g. s pelltest1.txt, s pelltest2.txt).(You m ay r evise t he r eleased v ersion o f S pellingScorer f or y our p rogram i f n ecessary. F or e xample, i t does n ot a llow w hite s paces i n t he f ile p ath, a nd y ou c an r evise t o f ix t he p roblem.)For e xample, y ou m ay r un i t a s f ollows:$ j ava -­‐cp b in/ s .ntu.ir.spell.SpellingScorer s .ntu.ir.spell.NGramSpellingCorrector 1data/spelltest1.txtThe S pellingScorer c hecks, f or e ach m is-­‐spelling i n t he d ata f ile, i f t he l ist o f c orrections r eturned b y t he given S pellingCorrector i ncludes t he e xpected c orrected s pelling. S pellingScorer w ill r eport t he performance o f t he S pellingCorrector b ased o n t he d ata f ile.You m ust i nclude t he o utput o f t his p rogram i n y our s ubmission. W e a lso m ay u se t he S pellingScorer o n a d ifferent s et o f w ords t o e valuate t he q uality o f y our i mplementation.Part 2: L ucene (50 p oints)In t his p art y ou b uild u p a s earch e ngine f or t he c ollection o f 30,000+ T DT3 n ews a rticles (i.e. ‘tdt3.zip’) by u sing L ucene, a t ext s earch e ngine l ibrary w ritten i n J ava. T he c ollection c onsists o f t ext f iles, w here each f ile c ontains a n ews a rticle. A n e xample f ile i s s hown b elow.File: tdt3/19981001/CNN19981001_1600_1059.txt<DOC><DOCNO> CNN19981001.1600.1059 </DOCNO><DOCTYPE> NEWS </DOCTYPE><TXTTYPE> CAPTION </TXTTYPE><TEXT>General Motors is taking another step in its effort to lure customersback after strikes shut down most of its plants this summer. G.M.says it will install a safety and security system on many of its trucksand cars for free. The system is worth about $1,300. G.M. saw itsmarket share shrink from 31% in June to less than 21% in July as thestrike was taking place.</TEXT></DOC>Your t ask i s t o c reate a L ucene i ndex f or t he c ollection, w rite a p rogram t hat t akes i n a q uery f rom t he user (i.e. S ystem.in) a nd r eturns a l ist o f t op 20 d ocuments, a nd i ntegrate s pelling c orrectors w ith t he program. T he i ndex s hould h ave t he f ollowing t hree f ields: d ocno (called I Ds), d ate (inferrable f rom t he sub-­‐directory n ames, e.g., 19981001), a nd t ext.2.1 I mplement s ome q ueries i n t he p rogram t o f ind t he I Ds (e.g. C NN19981001.1600.1059) o f t he documents t hat m eet t he f ollowing c onditions:a)Documents t hat c ontain b oth “New Y ork” a nd “San F rancisco”b)Documents w here t he w ords ‘helicopter’ a nd ‘hurricane’ a ppear w ithin 5 w ords o f e ach o therc)Documents w hich c ontain t he n ame “Dan R onan” a nd w as p ublished i n N ovember 19982.2 A ssume t hat w e a re i nterested i n n ews a rticles a bout s tock m arket m ore t han o thers. W rite a program t o a utomatically c ollect t erms r elated t o s tock m arket (e.g. s tock, s hare, f und), f or e xample, from t he W ikipedia p age o n s tock m arket (/wiki/Stock_market). C ount t heir frequencies i n t he T DT3 a rticles a nd a ssign q uery-­‐independent w eights b etween 0 a nd 1 t o t he a rticles (cf. S ection 7.1.4 o f t he t extbook). R evise t he p rogram f rom 2.1 t o r erank t he r esults f rom t he L ucene index b y u sing t he q uery-­‐independent w eights: F or e xample, c onsidering a q uery q, o ne o f i ts r esultant articles d, a nd t he o riginal s core o f d g iven b y L ucene, s core(q,d), y ou m ay a dd t he q uery-­‐independent weight o f d, g(d), t o s core(d) t o o btain t he n ew s core o f d, s core’(q,d), a s f ollows:score’(q,d) = s core(q,d) + g(d)Find e xample q ueries w hose t op 20 d ocuments a re a ffected b y t he r eranking a nd t hose n ot a ffected. Discuss i f t he r eranking h elps u s a chieve t he g oal o f f ocusing o n s tock m arket a nd h ow t o i mprove i t.2.3 W rite a p rogram t hat t akes i n a m isspelled q uery, r uns t he b est s pell c orrector y ou w rote i n p art 1 o n this q uery t o s uggest a lternative s pellings, a nd q ueries t he L ucene i ndex u sing t he s uggested s pellings, printing o ut t he I Ds o f t op 20 d ocuments. S how o utput o f y our s ystem w here t he s pell c orrection d oes well a nd w here i t d oes p oorly. L ucene a lso h as a s pell c hecker. W rite a nother p rogram t hat u ses t he Lucene S pellChecker. C ompare t he r esults w ith t hose o f t he b est s pell c orrector f rom p art 1. W hich i s better a nd w hy? H ow c an y our e ngine b e i mproved?Credit f or a dvanced (10 p oints):Implement s ome o f y our s uggestions f or i mprovement f rom 2.2 a nd 2.3. T he q uality o f y our i dea, implementation, a nd w riteup w ill a ll b e c onsidered.References:•Lucene: h ttp:///java/docs/index.html•Information R etrieval a nd W eb S earch c ourse a t S tanford U niversity (source o f t his a ssignment): /class/cs276/•Topic D etection a nd T racking (TDT) P hase 3 (source o f t he T DT3 c orpus):/TDT3/Resource f iles p rovided a t t he c ourse s ite:•SpellingCorrector.java, S pellingScorer.java: A s m entioned a bove•big.txt: A c ollection o f d ocuments f rom w hich y ou m ay c ollect d ictionary w ords•spelltest1.txt, s pelltest2.txto Test d ata f iles f or s pelling c orrection, w here e ach l ine f ollows t he f ormat “a d ictionary word : a l ist o f i ncorrectly s pelled w ords”•tdt3.zip: A n ews a rticle c ollection。

英国文学史assignment 1

英国文学史assignment 1

Assignment 11.Who were the earliest settlers of Britton/England? What do you know about them (home,language, belief, life style)?The earliest settlers of Britain/England were Britons.They were ancient Celtic people from the island of Great Britain . They lived a tribal life ,spoke Celtic language, and had no belief. The Britons (sometimes Brythons or British) were the Celtic people culturally dominating Great Britain from the Iron Age through the Early Middle Ages. They spoke the Insular Celtic language known as British or Brythonic. They lived throughout Britain south of about the Firth of Forth; after the 5th century Britons also migrated to continental Europe, where they established the settlements of Brittany in France and the obscure Britonia in what is now Galicia, Spain. Their relationship to the Picts north of the Forth has been the subject of much discussion, though most scholars accept that the Pictish language during this time was a Brythonic language related to, but perhaps distinct from, British.2.What are the 3 conquests? What effects they had upon the nation?The first is the Roman Conquest. Romans brought Christianity to England. And one of the worst results of the Roman conquest was the growth of the slave system, private land ownership.The Romans made the part of island under their control a province of their huge empire, called Britannia, ruled by Roman governors. The Romans also built walls and forts across northern England to protect the province from the war like tribes of Scotland .The most famous of the walls was Hadrian's Wall, named after the Emperor Hadrian. During the Roman period, Christianity came to England. A number of things with Christian symbols on them that date from the 4th century AD have been found in various places in England.The second is the Anglo-Saxon Conquest. In 449 A.D., Britain was invaded by three Germanic tribes from the Northeast of Europe: Angles, Saxons and Jutes, who had reached the later stages of tribal society. At first they established some small kingdoms in Britain which by the 7th century were combined into a united kingdom called England (the land of Angles). Its people was called the English. The three dialects spoken by them naturally grew into a single language called Anglo-Saxon or Old English. Angles, Saxons and Jutes usually known as Anglo-Saxons are the first Englishmen. Language spoken by them is called the Old English, which is the foundation of English language and literature. With the Anglo-Saxon settlement in Britain, the history of English literature began.The third is Norman Conquest. Norman Conquest marks the establishment of feudalism in England. The conquest also greatly influenced the English language.3.Ideologically what is the most significant change in people’s spiritual life?The acceptation of Christianity is the most significant change in people’s spiritual life.4. How was the nation developed politically or what changes were there in the form of the social structure?After the Roman Conquest, the form of social was changed from slave society to feudal society. based on the ownership of land.5. In terms of literature, what influence had the French upon England?Due to the Norman influence, English passed from Old to Middle English. The French influence affected the English vocabulary, grammar, spelling and pronunciation and brought the romance style to England6. How many languages were spoken during the French reign? How do you understand modern English as a language?Two, they are French and Old English.Modern English as we know it has existed since about 1500, and Shakespeare's plays were written between 1592 and 1610 -- exact dates are not known. Shakespeare was using the same "English" that we use today, but as languages tend to do, the meanings of words and some words in their entirety have changed.。

Assignment 1(writing)

Assignment 1(writing)

Assignment 1Name the figures of speech used in each of the following sentences:1.Records fell like ripe apples on a windy day.2.My words swirled around his head like summer flies.3.He is a wolf in a sheep’s clothing.4.White Cloud Mountain is lungs of the City of Guangzhou.5.Hitler’s attack on Poland in 1939 was like lightning.6.The Wall Street definitely has more say in their policy making.7.An individual human existence should be like a river --- small at first, narrowlycontained within its banks, and rushing passionately over waterfalls. Gradually the river grows wider, the banks recede, the waters flow more quietly, and in the end, without any visible break, they become merged in the sea, and painlessly lose their individual being.8.He has a heart of stone.9. Water is to fish what masses are to soldiers.10. The grey hair should be respected.11. The kettle is boiling.12. They that sow in tears shall reap in joy.13. More haste, less speed.14.The influence of the Crown has increased.15. The hand that rocked the cradle ruled the country.16. Nervous hours came.17. Better to rein in hell, than serve in heav’n.18. To live a life half dead, a living death.19. IBM has a handsome increase of productivity this year.20. The child is father of the man.21. but the plea fell on deaf ears.22. The willows waved violently in the wind.23. It was creative destruction. (9.11 attack)24.All day long the sea waves sobbed with sorrow.25. He liked the cup a bit too much.26. The child gazed in wide-eyed astonishment at me.27. He always speaks to us in a cold pleasant manner.28. People often compare life to a road through the mountain because both have theirups and downs.29. A man who is full of himself is empty.30. She wept floods of tears.。

assignment 1 分析

assignment 1 分析

3. 我存在,我曾经存在。 I am,I was. 电影“Artificial Intelligence”,I am, I was. I think, so I am. (Decarte) 改译: I am here, I was here. ??? I exist, I ever existed. ???
4. 有想做的事,有值得爱的人,有美丽的梦。 I want something to do, someone to love and something to hope for.
语义问题: Someone to love指有一个人去爱,但原文中是“有值得 爱的人”,与原文不符。Something to hope for指“有事情去期待” 的意思,与原文中“有美丽的梦”仍不吻合。 改译:
17.生命是一场又一场的相遇和别离,后会有期。 Life is full of encounters and separations. See you some day.
语义问题:separation: n. a period of time that people spend apart from each other. 一般指长时间离别。所以在该句中用parting: n. the act or occasion of leaving a person or place”一词比较好,与原文 中所表达的意思相近。
2. 我希望活得有意义,活得深刻,汲取生命所有的精髓。 I wanted to live deliberately,live deep and suck out all the marrow of the life. (Walden) 语法问题:原文中的动词wanted用了过去式,过去式指的是在过去的时间内所发生的 事情,从原文中了解到这种渴望和希望应该经常存在,故用一般现在时want比较合适。 语义问题:deliberately有两个意思,分别是“done in a way that was planned, not by chance”和 “slowly and carefully”, deliberately 并不符合有意义的意思。deep可以指物理意 义上的深,情感上的深厚,知识的渊博,人性格深沉,这里指生活态度不恰当。尽管 deep也有做副词的时候,但多用于deep inside,deep into这种情况,在这里用deeply才 是正确的。而且此处用profoundly更好,语气更强,更能体现出活得深刻的意味。 文体问题:“汲取”在文中具有象征意义,指的是“学习”生命的意义。suck out指的 是吮吸,只是单纯的动作。marrow象征的是生命中的智慧,而marrow是生物上骨髓的 意思。 改译: I wanted to lead a meaningful and profound life, from which I receive all the wisdom of life.

1. Assignment 1 - discrimination of vowels

1. Assignment 1 - discrimination of vowels

Assignment 1 Discrimination of vowel soundsparison between monophthongs/iː/ —/ɪ/leave —live feel —fill read — ridheel —hill peach —pitch deed —did/e/ — /æ/men —man bed —bad lend —landmet —mat send —sand beg —bag/ɔ:/ — /ɒ/sport —spot chalk —chock caught —cotcork —cock forks —fox naught —not/ɑ:/ —/ʌ/calm —come march —much harm —humbarn —bun heart —hut dark —duck/u:/ — /ʊ/fool —full pool —pull cool —couldshoed —should wooed —would food —footparison between diphthongs/aʊ/ — /əʊ/now —no out —oat crowd —crowed blouse —blows couch —coach bow (v.) —bow (n.)/ɪə/— /eə/hear —hair fear —fair beer —bearcheer —chair dear —dare really —rarelyparison between monophthongs & diphthongs/i:/—/eɪ/me — may bee — bay eat — eightsee — say heat — hate feet — fatemeet — mate lead — laid read — raid/e/ —/eɪ/let — late pen — pain get — gatemen — main ate — eight wet — waittest — taste debt — date tell —tail/æ/ —/aɪ/fat —fight cat —kite back —bikehat —height lack —like sad —side/ɔ:/ — /əʊ/raw —row saw —so caught —coat walk —w oke ball —bowl call —coal/u:/ — /əʊ/cool —coal grew —grow fooled —fold room —roam soup —soap flute —float/aʊ/— /ɔ:/loud —lord shout —short howl —hall house —horse down —dawn town —torn/ɪə/ & /ɛə/hear, here — hair dear, deer — dare fear — fair, fare ear — air rear — rare pier — pearbeer — bear cheer — chair spear — spare really — rarely/eə/ — /æ/Mary —marry rarely —rally paired —pad glared —glad bared —bad careless —callous/eə/ —/e/vary —very Mary —merry shared —shed fairly —felly dared —dead barely —belly。

ASSIGNMENT1_00428113_许椽笔

ASSIGNMENT1_00428113_许椽笔

A Hedging StrategyThe question proposed to solve:It was late November 2006. The local sugar price in Chengdu saw a consistent decrease in the past one year, shown as figure 1. A large sugar producer in Chengdu would sell 1000 tons of sugar in early March 2007. In order to prevent the loss due to the continuing decrease in sugar price, the producer decided to use futures to lock in the current sugar price. It proposed to sell sugar futures at Zhengzhou Commodity Futures Exchange. So we need to decide how many futures contract the producer should sell in order to achieve the best hedge.3000350040004500500055001/06/065/26/0610/13/063/02/077/20/07Figure 11How to solve the problem:1. Decide which futures contract to use2. Find out the optimal hedge ratio3. Decide the number of contracts the company should sell4. Evaluate the effectiveness of the hedging strategyWhich futures contract to use?The company would sell the sugar in early March, 2007. At Zhengzhou Commodity Exchange, there was March 2007 futures contract which would mature on the 7thtrading day of March. Since this was the closest futures contract to the proposed selling date, the company should choose the SR703 contract.What was the optimal hedge ratio? INTRODUCTIONThree groups of hedge ratios have been documented in the literature. The first group is based on1The statistical software used (EVIEWS) could not recognize the legal holidays in China, so there is a discrepancy in the dates throughout this assignment.the regression approach, proposed by Ederington (1979), and is generally referred to as the traditional regression method (TRM). The second group is based on the modified regression method (MRM), which includes the cost of carrying a commodity in the regressions. The third group is based on the error-correction methodology (ECM). In this assignment, I will use the TRM and MRM methods. DATAThe data for this assignment were obtained from the website of Zhengzhou Commodity Exchange. Sugar futures and spot daily price data were for the period ranging from 2006/1/6 to 2007/9/28. The data used were divided into two periods: 2006/1/6 to 2006/11/31 for the optimal hedge ratio estimation, 2006/12/1 to 2007/3/2 for the completion and evaluation of the hedging strategy. For the spot price, the midpoint of the price level was used when a range was given as the spot price. Table 1 provides a summary statistics of the data used for estimating the hedge ratio.Spot and futures price within the range of 2006/1/6 and 2006/11/31:30003500400045005000550060001/063/175/268/0410/13The difference in spot price: D_S = Price_s-Price_s(-91)where D_S = change in spot price from 91 days ago-1000-800-600-400-20002004001/063/175/268/0410/13The difference in futures price: D_F03 = Price_F03-Price_F03(-91)(1) Where D_F03 = change in sugar futures (SR703) price from 91 days ago-2000-1500-1000-5005001/063/175/268/0410/13-2000-1500-1000-5005001/063/175/268/0410/13METHODOLOGYTraditional Hedge Ratio T echniquesTherefore, the βcoefficient of this regression gives the minimum-variance hedge ratio as suggested by Ederington (1979). The R-square gives a measure for the expected effectiveness of this hedge ratio.Modified Regression Hedge Ratio T echniquesssIn this situation, suppose the company would enter the futures market on 2006/12/01 and reverse out on 2007/03/02. The duration of the hedge would be 3 months (91days).The regression results are:TRM-1000-500500-2000-1500-1000-5000500D_F03D _SD_S vs. D_F03Dependent Variable: D_S Method: Least Squares Date: 10/31/07 Time: 10:11Sample(adjusted): 5/15/2006 11/15/2006Included observations: 133 after adjusting endpointsD_F03 0.412406 0.037404 11.02580 0.0000 R-squared0.481328 Mean dependent var -309.2105 Adjusted R-squared 0.477369 S.D. dependent var 313.3874 S.E. of regression 226.5579 Akaike info criterion 13.69880 Sum squared resid 6724030. Schwarz criterion 13.74227 Log likelihood -908.9703 F-statistic 121.5683 Durbin-Watson stat0.169503 Prob(F-statistic)0.000000The residual graph is as follows:-600-400-2000200400600-1000-50005005/156/127/108/079/0410/0210/30Therefore, the hedge ratio is 0.41. The regression has an R-square of 0.48. MRMModified_D_S = Change in Spot Price – Cost of Carrying Cost of Carrying = basis = spot price – futures price-1000-50050010001500-2000-1500-1000-5000500D_F03M O D I F I E D _D _SMODIFIED_D_S vs. D_F03Dependent Variable: MODIFIED_D_SMethod: Least SquaresDate: 10/31/07 Time: 10:20Sample(adjusted): 5/15/2006 11/15/2006Included observations: 133 after adjusting endpointsD_F03 0.202798 0.089622 2.262811 0.0253R-squared 0.037616 Mean dependent var 210.5714Adjusted R-squared 0.030270 S.D. dependent var 551.2560S.E. of regression 542.8487 Akaike info criterion 15.44646Sum squared resid 38603698 Schwarz criterion 15.48993Log likelihood -1025.190 F-statistic 5.120314Durbin-Watson stat 0.091331 Prob(F-statistic) 0.025293Theβcoefficient is 0.20, significant at the level of 5% with the R-square of 0.038. This regression result even presents worse desired features than the TRM. Therefore, I decided to use the hedge ratio according to TRM.How many contracts the company should sell?According to the TRMN = h*S/F= 0.41*1000/10= 41 contractsHow effective is the strategy?1) The net change in the value of assetsV alue change on the maturity date with the hedge:1000*(3690-4610) + 410*(3775-3699)-41*4 = - 889004V alue change without hedge:1000*(3690-4610) = - 920000Gain from the hedge:(-889004-(-920000))/(-920000) = 3.37%2) The change in variance during the range of 2006/12/1 to 2007/3/02The covariance matrix of spot and futures price changes from 2006/1/6 to 2006/11/30D_Price_F03 D_Price_SD_Price_F03 275852.31 113763.18D_Price_S 113763.18 97473.25The covariance matrix from 2006/12/1 to 2007/3/2D_Price_F03 D_Price_SD_Price_F03 28642.80 -45665.71D_Price_S -45665.71 218138.58V ariance without hedge: 218138.58V ariance with hedge: 0.59^2*218138.58-0.59*0.41*45665.71+0.41^2*28642.80=69702.36The variance is significantly reduced.However, the covariance matrix shows significant changes in the variance of spot price changes and covariance of the spot and futures price change. This indicates the ineffectiveness of estimating the future covariance and variance of price changes according to the historical data.Some thoughts about the hedging strategyThe hedging strategy provides better results than not hedge, but the strategy itself provides little protection to the company. The problem might be attributed to several factors.Deficiencies in the calculation method of the optimal hedge ratio:The hedge ratio calculation methodology might be defected.1) Changing covariance matrixThe data of spot and futures price changes may not be stationary and hence yield spurious regression results. The underlying assumption of the TRM and MRM is that the covariance matrix remains constant. But as shown in the previous covariance matrix, there are significant changes in the variance of spot price change and covariance of the spot and futures price change. This indicates that the estimation of the covariance matrix of historical data as the covariance matrix of the hedging period might be misleading. And this is also the main reason of the low effectiveness of the hedge strategy in this particular case.2) Changing average price changesAnother assumption underlies the regression-based technique is that average price changes will hold in the future. However, this may not be true. When there is trend in the price changes, the regression-based techniques can not give correct answers. In this particular case, it is highly likely that the data used presented unstationary features and the so the regression-base hedge ratio is defected.3) Loss of information available and convergence problemThis method does not incorporate the information available at the time the hedge is initiated. And it also fails to take care of the convergence problem.Deficiencies in the data usedQuestionable data frequencyThe frequency of the data used is also questionable. The daily tick price may present unstationary features while the weekly data may give better statistical features.The imperfections of the market:The market itself may be imperfect. The sugar futures just started to trade at Zhengzhou Commodity Exchange since January 2006. The market may not be liquid or efficient enough. The price changes may under-react or over-react due to irrational market participants. All of these factors can make the market price changes highly volatile. And there is also trading cost.REFERENCESDavid E. Bell, and William S. Krasker (1986). Estimating Hedge Ratios, Financial Management 15, 34-19Vivek Bhargava, and D.K. Malhotra (2007). Determining the Optimal Hedge Ratio: Evidence from Cotton and Soybean Markets, Journal of Business & Economic Studies, V ol. 13, No.1, 38-117Robert J. Myers (1991). Estimating Time-V arying Optimal Hedge Ratios on Futures Markets, The Journal of Futures Markets, V ol. 11, 39-53。

Assignment 1

Assignment 1

5. Health Plus Export Company is currently unrated. It is incorporated in a country with a credit rating of A-. What credit risk weight is assigned to Food Plus Export Company under Basel 2? a) b) c) d) 20% 50% 100% 150%
11. With regard to securitisation (and its use to reduce a bank’s asset base), a clean-up call is: a) b) c) an option that permits the securitisation exposures to be called before all of the underlying exposures have been repaid. a call that renews the credit protection within a synthetic securitisation structure a process by which underlying assets in default of their conditions are removed from the
4. What risk weighting is given to claims on the International Fund for Agricultural Development (IFAD) assuming it has a credit rating of BBB+ ? a) b) c) d) 0% 20% 50% 100%

Assignment 1 – Write each word 3 times each

Assignment 1 – Write each word 3 times each

Assignment 1– Write each word 3 times each.1._________________________________________________________2._________________________________________________________3._________________________________________________________4._________________________________________________________5._________________________________________________________6._________________________________________________________7._________________________________________________________8._________________________________________________________9._________________________________________________________10._________________________________________________________11._________________________________________________________12._________________________________________________________13._________________________________________________________14._________________________________________________________15._________________________________________________________16._________________________________________________________18._________________________________________________________19._________________________________________________________20._________________________________________________________ Assignment 2– List your words in alphabetical order.1._________________________________________________________2._________________________________________________________3._________________________________________________________4._________________________________________________________5._________________________________________________________6._________________________________________________________7._________________________________________________________8._________________________________________________________9._________________________________________________________11._________________________________________________________12._________________________________________________________13._________________________________________________________14._________________________________________________________15._________________________________________________________16._________________________________________________________17._________________________________________________________18._________________________________________________________19._________________________________________________________20._________________________________________________________ Assignment 3– Use each of your words in a completesentence.1._________________________________________________________2._________________________________________________________4._________________________________________________________5._________________________________________________________6._________________________________________________________7._________________________________________________________8._________________________________________________________9._________________________________________________________10._________________________________________________________11._________________________________________________________12._________________________________________________________13._________________________________________________________14._________________________________________________________15._________________________________________________________16._________________________________________________________17._________________________________________________________18._________________________________________________________19._________________________________________________________20._________________________________________________________Spelling PracticeSpelling Websites– Use the following sites to study your spelling words in fun ways. You can type in the list of words, then play games and complete other activities./SpellingTest/FreeSpellingTest.htmlOther ways to practice words …∙Write your words in shaving cream∙Use magnet letters and cookie sheets∙Write your words on a dry erase board∙Write your words outside with chalk∙Use a Q-tip and water to paint on a chalkboard∙Use a tape recorder to record yourself spelling the words ∙Practice your words out loud with a parent or sibling ∙Type your words on a typewriter or a computer∙Paint your words∙Use toothpicks or pipe cleaners to form your wordsName __________________ Date ____________ Lesson _____ Spelling Homework Checklist1._____ Complete the spelling rule sheet.2._____ Write your spelling words 3 times each.3._____ List your words in alphabetical order.4._____ Use each of your words in a complete sentence.5._____ Study for your test. Use the list of suggestions on thelast page.6._____ Check off all assignments. The entire packet should beturned in by Friday.----------------------------------------------GradingSpelling Rule Page - _____ out of 53 Times Each - _____ out of 5Alphabetical Order - _____ out of 5Sentences - _____ out of 5Total Weekly Homework Grade - _____ out of 20。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档