A dip in the reservoir Maintaining sample synopses of evolving datasets
关于介绍一个物品英语作文不少于五句话

关于介绍一个物品英语作文不少于五句话An Object of Timeless Elegance: The Fountain PenIn a world increasingly dominated by digital devices and electronic communication, the humble fountain pen remains a cherished and timeless object. Far more than a mere writing instrument, the fountain pen is a testament to the enduring allure of craftsmanship, the tactile pleasure of putting pen to paper, and the enduring human desire to leave a tangible mark on the world.At its core, the fountain pen is a deceptively simple device, consisting of a nib, a reservoir for ink, and a mechanism to deliver that ink onto the page. Yet, within this seemingly straightforward design lies a rich history and a level of engineering prowess that is truly remarkable. The earliest iterations of the fountain pen can be traced back to the 10th century, with the first modern incarnations emerging in the 19th century as a solution to the messy and unreliable dip pens that had long been the writing instruments of choice.Over the decades, fountain pen design has evolved, withmanufacturers constantly striving to improve the flow of ink, the balance and heft of the pen, and the overall user experience. From the sleek, minimalist designs of contemporary brands to the ornate, elaborately decorated pens of bygone eras, each fountain pen is a unique work of art, imbued with its own personality and character.One of the most captivating aspects of the fountain pen is the way it connects the writer to the act of writing. Unlike the impersonal, digital interfaces of modern technology, the fountain pen requires a level of engagement and tactile awareness that is deeply satisfying. The gentle pressure of the nib against the paper, the smooth flow of ink, and the subtle variations in line width and shading all contribute to a sensory experience that is simply unmatched by any other writing instrument.Moreover, the fountain pen encourages a more thoughtful and deliberate approach to writing. With no backspace or delete function, the writer must commit to each word, each stroke of the pen, and the resulting text becomes a tangible record of the creative process. This connection between hand, pen, and paper can be incredibly powerful, fostering a sense of mindfulness and concentration that is often lacking in our fast-paced, digital world.Beyond its practical applications, the fountain pen has also become a symbol of sophistication, elegance, and personal style. A well-chosenfountain pen can be a powerful accessory, reflecting the owner's taste, personality, and even professional status. From the boardroom to the café, the fountain pen h as the ability to command attention and convey a sense of refinement and attention to detail.Of course, the enduring appeal of the fountain pen is not limited to its aesthetic qualities or its connection to the written word. For many enthusiasts, the act of collecting and maintaining these pens is a deeply rewarding hobby in its own right. The endless variety of nib styles, ink colors, and design features provides a never-ending source of fascination, as collectors seek out rare, vintage, or custom-made pens to add to their prized collections.Furthermore, the fountain pen community is a vibrant and passionate one, with enthusiasts sharing their knowledge, techniques, and experiences with one another. From online forums to specialized stores and events, the fountain pen world is a testament to the power of shared interests and the enduring appeal of analog technologies in a digital age.In a world that often seems to be moving at breakneck speed, the fountain pen offers a welcome respite, a chance to slow down, to savor the moment, and to engage in a more mindful and deliberate form of self-expression. Whether you are a seasoned collector or simply someone who appreciates the beauty and craftsmanship of awell-made writing instrument, the fountain pen is a timeless object that continues to captivate and inspire.。
Reservoir control

水利水电类专业英语—武汉大学出版社—刘景植主编— p23 文章Reservoir controlUncontrolled detention basins,as described in the above ,have been built in the past. However, since the last few decades can be used more efficiently when the reservoirs are controlled. This control may consist of a gate in the conduit and perhaps also a gate on the spillway crest. As a result, we may be able to use the reservoir more efficiently form a viewpoint of flood control and, moreover, we may be able to use the reservoir also for water supply purposes without harming the flood control interests. In order to develop these thoughts in an orderly fashion, let us first discuss in general the areas of freedom that we have in designing and controlling a reservoir, we may distinguish the following variables:1)Capacity of reservoir ;2)Diameter and control of conduit ;3)Length and control of spillway.In the initial stages of our flood control study, the most economic capacity of the reservoir is an unknown quantity. In fact, we do not even know if a reservoir of any size will be economic! Let us therefore assume that we have prepared a storage capacity versus elevation curve for the dam site and that we have arbitrarily chosen one or a few reservoir capacities for preliminary investigation. We should qualify this last statement a little more precisely. We can, namely, select arbitrarily either a full supply level, or a spillway crest level, or a maximum flood level, or the elevation of the top of the dam. Let us assume for the present discussion that we have selected the maximum flood level. This level corresponds to a certain capacity on the storage-elevation curve. This figure is often quoted as the storage capacity of a flood control reservoir.Having established arbitrarily, and for the time being, the capacity of the reservoir, let us turn to the next variable: the control and diameter of the conduits. In Figure 2 (a) is repeated the outflow hydrograph of the detention basin of Figure 1(b).It may be seen that although the storage capacity is substantial, the peak flow reduction is very significant. The situation could be improved if more water was discharged from the reservoir during the early part of the flood, so that more storage capacity would be available during the peak of the flood when it is needed. Let us assume for a moment that we have an extremely large conduit. We could then simply let the river run through the conduit during the early part of the flood without filling up the reservoir, as shown in Figure 2 (b). When the river has reached a discharged O2, we start closing the gate of the conduit. The reservoir now begins to fill. We keep adjusting the gate on the conduit, so that its outflow remains constant at O2. The reservoir will have reached its maximum storage level when the recession curve of the flood hydrograph reaches a magnitude of O2. It will be appreciated, by comparing Figure 2(a) and 2(b) that with the same available storage capacity the second method of operation results in much lower reservoir outflows and therefore greater flood control benefits.Now that we have fixed the capacity of the reservoir and the diameter of the conduit, the only remaining variable is the spillway. We shall assume that from a hydrologic study of the drainage basin, the spillway design flood has been determined. In the hydraulic design of the spillway there are actually tow areas of freedom: first of all the length of the spillway; secondly, the spillway can be gated or ungated. The design of an ungated spillway of given length would take place somewhat as follows. The spillway design flood is routed through the reservoir and the maximumreservoir level and spillway discharge are found. The maximum reservoir level is shown as stage in Figure 3(a). The maximum spillway flow forms the basis of the design of the stilling basin.Maintaining the same maximum reservoir level at stage 1, we could also design a spillway of smaller length. In order to pass the same spillway design flood without exceeding stage 1, it is obviously necessary to lower the crest of the spillway, as is shown in Figure 3(b).The advantage of the design in Figure 3(b) over the design in Figure 3(a) is mainly its lower cost. In case we are dealing with an earth dam, the saving of narrower spillway may be substantial. When dealing with a concrete gravity dam the saving would be relatively small since we need a gravity section in any case. The disadvantage is in its lesser effectiveness of peak reduction of medium and small floods. Such floods reach the spillway crest in Figure 3(b) earlier than they do in Figure 3(a), and therefore they will not attain as high a reservoir elevation. A lower reservoir elevation means less flood water gone into storage, which in turn means a larger outflow.This disadvantage of the lower spillway crest can be eliminated when the spillway is equiped with a gate, as shown in Figure 3(c). The small and medium floods can now be stored more effectively in the reservoir, and the outflow would be at least as low as in Figure 3(a). In fact, with a good flood forecasting system, the conduit gates and spillway gates can be manipulation in such a way that the small and medium floods are stored up to stage 4 in Figure 3(c). Assuming that this elevation is higher than the maximum elevation that those same floods would have attained in Figure 3(a), this would in effect mean a further reduction of flood peaks. Since flood forecasting is not always reliable, the width of the spillway in Figure 3(c) should be greater than in Figure 3(b), so that when the flood turns out to be greater than expected the gates can be opened, and the reservoir levels maintained below stage 1.A gated spillway would yield further advantage, when the reservoir is part of a flood control system, including other reservoir. Many situations are possible whereby is would be advantage to completely stop the outflow from certain reservoir, if only for a few days, in order to reduce the peak flows in critical areas of the drainage basin. Assuming that the reservoir has already risen above the spillway crest, such a manipulation would only be possible when the conduits and the spillway are both equipped with gates.Google翻译的:水库控制不受控制的蓄滞洪区,在上面所述,在过去已建成。
高考英语 考前突破阅读理解能力 社会生活 纽约警方破获香烟走私集团素材

纽约警方破获香烟走私集团New York officials say they have busted a multi-million dollar cigarette smuggling ring.纽约官员称,他们破获一个价值数百万美元的香烟走私集团。
About 20,000 cartons were brought toNew York per week by distributorsOfficials allege that three of the 16 Palestinian immigrants charged had links to known terrorists.The state's attorney general said investigators had recovered only "a fraction" of the proceeds from sales of more than a million untaxed cartons(纸板盒).The amount of money involved remains unclear, but records show the suspects deposited at least $55m (£36m).The scheme cost the state an estimated $80m in tax revenue, said officials in a press conference on Thursday.The alleged ringleaders, brothers Basel and Samir Ramadan, were arrested on Wednesday in Maryland.Investigators said they had found $1.5m in cash - some stashed in black plastic bin bags - in the home and car of Basel Ramadan.'Astounding profits'According to police, the scheme involved buying large quantities of cigarette cartons from a wholesaler in Virginia, hiding them in a public storage building in Delaware and bringing them to New York City and upstate New York for sale at markets and grocery stores.New York City Police missioner Ray Kelly said that one of the suspects used to run a business in the 1990s partly funded by Omar Abdel-Rahman, a blind cleric serving a life sentence for a conspiracy to blow up New York City landmarks.Another was the "confidant", Mr Kelly said, of a Lebanese immigrant convicted of a deadly shooting attack in 1994 on a van full of Jewish students on Brooklyn Bridge.He said a third suspect used to live in the same apartment as the secretary of a key fundraiser for the Palestinian militant group, Hamas.Officials have not linked the proceeds of the cigarette sales to any militant fundraising, but said they would keep pursuing the missing money."This dangerous criminal ring was able to generate astounding profits that we are still continuing to trace," said New York Attorney General Eric Schneiderman in a statement.。
高级口译教程 笔记 unit 3

UNIT THREE BUSINESS NEGOCIATION第一篇进出口商品交易会import and export commodities fair 销售部经理sales managersupply department 采购部brochure 宣传小册子scope of business 经营范围machine tool 机床workmanship 工艺make an inquiry 询价quotation 报价C.I.F Seattle 西雅图到岸价(*cost, insurance. freight) 调整价格adjust the pricecompetitive 具有竞争力bulk 很大substantially 大大地展台exhibition stand第二篇经营的新品new line of business 汽车零部件auto partsupdate 调整at the cost of 不惜以……为代价our part 我方发盘/报盘offer折扣discountsupplies 货物free sample 免费样品inspection 检验floor offer 底盘counter-offer 还盘合同格式format of contract规格specification单价unit price保险费由贵方承担the insurance premium should be borne by your sidebusiness transaction 生意顺利成交TEXTPASSAGE ONE英汉双向交互译:1.欢迎光临上海进出口商品交易会。
我叫陈明。
我是上海机械公司的销售部经理。
Welcome to Shanghai Import and Export Commodities Fair. My name is Ming Chen. I am Sales manager of the Shanghai Machinery Company Inc..2.Hi, Mr. Chen. My name is Sean Hudson. I am from Seattle, USA. I am in charge of the supply department of the Pacific Trading Company Ltd.您好,陈先生!我叫肖恩•哈德逊,来自美国西雅图,是太平洋贸易有限公司的采购部主任。
研究生英语阅读教程(提高级 第三版)课后翻译答案(单独整理的)

Lesson 11.就连乔·巴顿,对全球变暖持怀疑态度、来自得克萨斯州的共和党众议员,都谴责BP 管理人员“对安全和环境问题表现得漠不关心”。
2.显然,考虑到清理费用和对BP 声誉的影响,高管们真希望可以回到过去,多花些钱让“深水地平线”更安全。
他们没有增加这笔费用就表明他们认为钻机在当时的状态下不会出问题。
3.埃克森公司瓦尔迪兹漏油事件发生后,在1990 年的一个法案很少引人注意的一项条款中,美国国会将钻机泄漏清理费用的责任上限定为7 500 万美元。
即使对旅游业、渔业等造成的经济损失高达数十亿美元,责任方也仅需要支付7 500 万美元。
4.不过,如果认为我们目前仍然低估的只是那些突然间引人注目的风险,那是非常愚蠢的。
Lesson21It is a cliché,as it is to talk of apocalypse and nightmare,but when something is beyond our experience,we reach for the points of reference we have.说到世界末日和噩梦又是老生常谈,但是当事情超出我们的经验时,我们总会寻找现有的东西作为参照。
2Lest you should ever forget the smallness of being human,the iconic Mount Fuji,instantly reco gnisable yet somehow different on every viewing,is an extinct volcano.唯恐你会忘记作为人类的渺小,标志性富士山,一眼即能认出但不知何故每次观看又呈现出不同景象,就是一座死火山。
3It surprised me,over the following months that the gas attack seemed to dominate the national media coverage,whereas Kobe,after the initial weeks of horrifying footage,slipped somewhat i nto the background.在随后的几个月里,让我吃惊的是毒气攻击似乎占据了国家媒体报道的主要内容,而阪神大地震经过了最初几周骇人听闻的电视报道后,已经退居次位了。
研究生公共英语教材阅读B第3、4、10、11、14课文原文及翻译

Unite 3 Doctor’s Dilemma: Treat or Let Die?Abigail Trafford1. Medical advances in wonder drugs, daring surgical procedures, radiation therapies, and intensive-care units have brought new life to thousands of people. Yet to many of them, modern medicine has become a double-edged sword.2. Doctor’s power to treat with an array of space-age techniques has outstripped the body’s capacity to heal. More medical problems can be treated, but for many patients, there is little hope of recovery. Even the fundamental distinction between life and death has been blurred.3. Many Americans are caught in medical limbo, as was the South Korean boxer Duk Koo Kim, who was kept alive by artificial means after he had been knocked unconscious in a fight and his brain ceased to function. With the permission of his family, doctors in Las Vegas disconnected the life-support machines and death quickly followed.4. In the wake of technology’s advances in medicine, a heated debate is taking place in hospitals and nursing homes across the country --- over whether survival or quality of life is the paramount goal of medicine.5. “It gets down to what medicine is all about, ” says Daniel Callahan, director of the Institute of Society, Ethics, and the Life Sciences in Hastings-on-Hudson, New York. “Is it really to save a life? Or is the larger goal the welfare of the patient?”6. Doctors, patients, relatives, and often the courts are being forced to make hard choices in medicine. Most often it is at the two extremes of life that these difficultyethical questions arise --- at the beginning for the very sick newborn and at the end for the dying patient.7. The dilemma posed by modern medical technology has created the growing new discipline or bioethics. Many of the country’s 127 medical s chools now offer courses in medical ethics, a field virtually ignored only a decade ago. Many hospitals have chaplains, philosophers, psychiatrists, and social workers on the staff to help patients make crucial decisions, and one in twenty institutions has a special ethics committee to resolve difficult cases.Death and Dying8. Of all the patients in intensive-care units who are at risk of dying, some 20 percent present difficult ethical choices --- whether to keep trying to save the life or to pull back and let the patient die. In many units, decisions regarding life-sustaining care are made about three times a week.9. Even the definition of death has been changed. Now that the heart-lung machine can take over the functions of breathing and pumping blood, death no longer always comes with the patient’s “last gasp” or when the heart stops beating. Thirty-one states and the District of Columbia have passed brain-death statutes that identify death as when the whole brain ceases to function.10. More than a do zen states recognize “living wills” in which the patients leave instructions to doctors not to prolong life by feeding them intravenously or by other methods if their illness becomes hopeless. A survey of California doctors showed that 20 to 30 percent were following instructions of such wills. Meanwhile, the hospicemovement, which its emphasis on providing comfort --- not cure --- to the dying patient, has gained momentum in many areas.11. Despite progress in society’s understanding of death and dying, t heory issues remain. Example: A woman, 87, afflicted by the nervous-system disorder of Parkinson’s disease, has a massive stroke and is found unconscious by her family. Their choices are to put her in a nursing home until she dies or to send her to a medical center for diagnosis and possible treatment. The family opts for a teaching hospital in New York city. Tests show the woman’s stroke resulted from a blood clot that is curable with surgery. After the operation, she says to her family: “Why did you bring me back to this agony?” Her health continues to worsen, and two years later she dies.12. On the other hand, doctors say prognosis is often uncertain and that patients, just because they are old and disabled, should not be denied life-saving therapy. Ethicists also fear that under the guise of medical decision not to treat certain patients, death may become too easy, pushing the country toward the acceptance of euthanasia.13. For some people, the agony of watching high-technology dying is too great. Earlier this year, Woodrow Wilson Collums, a retired dairyman from Poteet, Texas, was put on probation for the mercy killing of his older brother Jim, who lay hopeless in his bed at a nursing home, a victim of severe senility resul ting from Alzheimer’s disease. After the killing, the victim’s widow said: “I think God, Jim’s out of his misery. I hate to think it had to be done the way it was done, but I understand it. ”Crisis in Newborn Care14. At the other end of the life span, technology has so revolutionized newborn carethat it is no longer clear when human life is viable outside the womb. Newborn care has got huge progress, so it is absolutely clear that human being can survive independently outside the womb. Twenty-five years ago, infants weighting less than three and one-half pounds rarely survived. The current survival rate is 70 percent, and doctors are “salvaging” some babies that weigh only one and one-half pounds. Tremendous progress has been made in treating birth deformities such as spina bifida. Just ten years ago, only 5 percent of infants with transposition of the great arteries --- the congenital heart defect most commonly found in newborns --- survived. Today, 50 percent live.15. Yet, for many infants who owe their lives to new medical advances, survival has come at a price. A significant number emerge with permanent physical and mental handicaps.16. “The question of treatment and nontreatment of seriously ill newborns is not a single one,”says Thomas Murray of the Hastings Center. “But I feel strongly that retardation or the fact that someone is going to be less than perfect is not good grounds for allowing an infant to die.”17. For many parents, however, the experience of having a sick newborn becomes a lingering nightmare. Two years ago, an Atlanta mother gave birth to a baby suffering from Down’s Syndrome, a form of mental retardation; the child also had blocked intestines. The doctors rejected the parents’ plea not to operate, and today the child, severely retarded, still suffers intestinal problems.18. “Every time Melanie has a bowel movement, she cries,” explains her mother.“She’s not able to take care of herself, and we won’t live forever. I wanted to save her from sorrow, pain, and suffering. I don’t understand the emphasis on life at all costs, and I’m very angry at the doctors and the hospital. Who will take care of Melanie after we’re gone? Where will you doctors be then?”Changing Standards19. The choices posed by modern technology have profoundly changed the practice of medicine. Until now, most doctors have been activists, trained to use all the tools in their medical arsenals to treat disease. The current trend is toward nontreatment as doctors grapple with questions not just of who should get care but when to take therapy away.20. Always in the background is the threat of legal action. In August, two California doctors were charged with murdering a comatose patient by allegedly disconnecting the respirator and cutting off food and water. In 1981, a Massachusetts nurse was charged with murdering a cancer patient with massive doses of morphine but was subsequently acquitted.21. Between lawsuits, government regulations, and patients’ rights, many doctors feel they are under siege. Modern technology actually has limited their ability to make choices. More recently, these actions are resolved by committees.Public Policy22. In recent years, the debate on medical ethics has moved to the level of national policy. “It’s just beginning to hit us that we don’t have unlimited resources,” says Washington Hospital Center’s Dr. Lynch. “You can’t talk about ethics without talkingethics without talking about money.”23. Since 1972. Americans have enjoyed unlimited access to a taxpayer-supported, kidney dialysis program that offers life-prolonging therapy to all patients with kidney failure. To a number of police analysts, the program has grown out of control --- to a $1.4billion operation supporting 61,000 patients. The majority are over 50, and about a quarter have other illness, such as cancer or heart disease, conditions that could exclude them from dialysis in other countries.24. Some hospitals are pulling back from certain lifesaving treatment. Massachusetts General Hospital, for example, has decided not perform heart transplants on the ground that the high costs of providing such surgery help too few patients. Burn units --- through extremely effective --- also provide very expensive therapy for very few patients.25. As medical scientists push back the frontiers of therapy, the moral dilemma will continue to grow for doctors and patients alike, making the choice of to treat the basic question in modern medicine.1. 在特效药、风险性手术进程、放疗法以及特护病房方面的医学进展已为数千人带来新生。
美国Atmos Energy公司管理员James M. Doyle写的关于管道设备检查的文件说明书

PERIODIC INSPECTION OF REGFULATORS AND RELIEF VALVESJames M. DoyleOperations SupervisorAtmos Energy Co.106 N. BradshawDenton, Texas USAIntroductionInspections and tests on regulators and relief valves is a Department of Transportation Compliance rule. The sections within the DOT manual stating the rule include 192.351 through 192.359, 192.751, 192.479, 192.481, 192.739, and 192.741. Keep in mind; these rules are the minimum required tests. Your Company or Regulatory Agency may be more stringent and require more or detailed testing. You must also keep in mind that the Manufacturer of your equipment will also provide a guideline pertaining to maintenance. These tests are not only required for safe, reliable service to your Customers, but also could be used in any legal proceeding for documentation and purpose.There are many important tasks and precautionary measures to perform and inform before you actually start the actual testing. Listing these items and performing a checklist could provide to be a reminder. Some station designs and equipment installations may require more than one person to perform a safe, reliable test. Plan the procedure within your work group, be sure all safety equipment and notifications are in place, perform the task and document the results according to your Company procedures.We must also be aware of the Operator Qualifications rule. The Technician must be completely OQ qualified and have the proof of all the required OQ tests readily accessible.Most importantly, these required DOT and Regulatory Agency tests are done for the safety of the system, customers and you.CommunicationsBefore the testing begins, there may be many other departments within your company and customers that requires to be notified of the task. SCADA systems may be attached to the piping. These systems which are called telemeters or RTU’s are used to control pressures within the system.Customers within a local, general area may need to be notified of blowing gas noise or smell. This notification is easy and could eliminate a possible emergency situation. Local Authorities may require a notification as well.Customer call center notification is also a good policy. In case of a passerby or some one not within your communications loop, does notify the Call Center of a possible indecent, the Center will be aware of the task and can explain the reasoning to the person for their concern and call.Prepare and observeBe aware of your surroundings. The station and components must be readily accessible and protected from stress, rain and debris. The station must also be protected from equipment submerge possibilities if within a possible flooding area. Traffic control or concerns should be implemented if required. This could revert back to the communication effort to Authorities. Observe the stations surroundings such as a fence or vehicular crash barriers. Be aware of above head power lines, or any source of ignition.Review the station design and recognize the flow pattern of the station. Observe valve locations and their correct operation. By-passing the station may be required. Check all valves before the testing for proper operation and required locking devices. Be attentive to pressure setting stamps or tags. Check pipe fittings such as nipples. These fittings must meet wall thickness requirements in which the system Maximum Allowable Operating Pressure (MAOP) dictates. Check for atmospheric corrosion issues. All above ground piping must be properly coated as to eliminate atmospheric corrosion. Observe station Cathodic protection insulators (if applicable). Be sure tubing and or nipples are not connected to the piping around an insulator. This could result in a transient or stray current coming into contact with your measurement electronic devices.Use the proper tools and equipment, along with your PPE. Do not take a short cut! Injuries are usually the out come of a short cut.In summation, prepare yourself and others before the task begins. These items listed aboveif found abnormal may affect the proper operation of the station and therefore nullify your efforts during the tests.Test minimum requirementsWhen you are ready to begin the testing of the regulator(s), be sure you have made your communication efforts, surveyed your surroundings and made all safety precautions, recognize the station design and flow pattern, and installed all appropriate gauges along the station piping for monitoring pressures as you test.According to the DOT Rule, 192.739 all pressure reducing devices such as single reducing regulator(s) and a worker/monitor set up must be test once each calendar year, not to exceed 15 months. The Technician must monitor inlet and outlet pressures as the testing is performed (that is the minimum requirement). The Technician must also be positively knowledgeable of the systems normal operational pressure and MAOP. A Lock-up test may be performed, as well as proper operation of the equipment. The regulator vents must be protected from debris and rain, and if inside a structure, the vent must be piped to the outside atmosphere. A worker/monitor set-up system must be recognized as to which regulator is performing what duty in the system, and the correct pressure settings known. A stamp or tag may provide to be very useful when attached to the equipment.Manufacturer requirements for maintenance should be considered during every inspection or test, along with your Regulatory Agency requirements.Relief valve or pressure limitingRelief Valve testing is also required just as pressure reducing devices are under the sub part 192 sections of the DOT rule. These devices must be test once each calendar year, not to exceed 15 months. The relief valves proper operational test is imperative to safety for the system and protection to our customers should a failure occur. Relief valves are set to a pressure that will allow the activation of the device so that the systems MAOP are not compromised. That pressure setting must be stamped or tagged on the device and accessible at all times. A valve located under the relieving device must also be locked into the open position during normal conditions. Rain caps or other barriers must be placed on the device as to not allow debris or rain to penetrate the internal components of the device.The capacity of the relief valve must be reviewed annually. If any station parameter is changed, such as spring ranges, regulator core size, component changes, or anything that may affect the capacity of the station output, a review of that relief valve capacity must be checked and calculated by qualified personnel. This may require a new calculation sheet, and or re-sizing of the component.NotablesAnother part of the DOT rule 192.741 that applies to regulator stations concerns recording pressures that are output into the system.If a system has more that one regulator station providing service, the Operator must have pressure recording device(s) placed within the system, or a telemeter/RTU monitoring the output of the station. These recording devices will provide feedback on indications of high or low abnormal system pressure. When an indication such as this occurs, the regulator(s) must be inspected for proper operation and any unsatisfactory condition found repaired.If the system has only one regulator station providing service, the Operator has the discretion of installing such pressure recording or telemeter/RTU equipment. The Operator should take into account several items before making that decision. These items may include Customer count, location, condition or any safety related issue.DocumentationAll DOT test required documentation must be kept for the life of the facility. These records should be accessible by Regulatory Authorities and other Company Personnel at all times. The Technician must be accurate and complete with all testing information. These documents not only provide the information required to satisfy the DOT Rule, but can also be used in a legal proceeding.ConclusionThe testing procedures for satisfying the DOT section 192 sub-parts for regulators and relief valves is all about safety. That safety is specifically stated to our systems that provide ourCustomers the fuel for their comforts. As stated, the DOT sub-part 192 sections applicable to this compliance is the minimum requirement necessary. There are many other items of importance that we as Operators must observe during these tests. Ironically, all these items also immediately bring safety and reliable service to the fore front.Our OQ procedures must also be followed as to the competency of the Technician and the tasks being performed.Refer to your Vendors or manufacturers of the specific equipment that your Company chooses to purchase and use. They are a great source for specific training needs.。
2006年5月三级笔译实务试题参考答案

参考译文随着天气变暖,北极圈的冰层开始融化,海水涌上来开始侵蚀沿岸村落。
拜考夫斯凯村位于俄罗斯东北部沿海地区,居住着457个村民,这里的海岸线已经遭到破坏,海水正以每年15-18英尺的速度向内陆的房屋和采暖用油桶逼近。
“这里本来全都是冰,我们称之为永久冻土,但是现在已经开始融化了。
”对于居住在北极圈里的四百万人来说,气候变化给他们带来了新的机遇。
但是,这也威胁着他们赖以生存的环境和家园,而对于那些祖祖辈辈生活在冰雪荒原的人们来说,这还关乎他们能否保住自己的文化。
对北部地区的进一步开发随着北冰洋的融化加快了脚步,给当地人民带来了利益,也带来了危险。
在巴伦支海和卡拉海发现了广阔的油田,但人们担心先装满石油然后很快就是液化天燃气的轮船发生灾难事故,这些船将卷起海浪,穿过斯堪地那维亚半岛近海的捕鱼区,一直开往欧洲和北美州市场。
当越来越多的发电机、大烟囱和各种重型车辆进入这个地区帮助发展能源工业时,也会使这片处女地受到污染。
阿拉斯加州也存在着海岸侵蚀的问题,这迫使美国政府打算迁移数个因纽特人的村庄,每个村庄的预计搬迁费用高达一亿多美元。
在北极区,在极端冰冷环境里生存了几百年的本地部落注意到了气候和野生动物的变化,他们想去适应这种变化,但常常不知所措。
在挪威最北面的芬马克省,每到冬末,北极的大片土地一望无际,好像冰雪高原,万籁俱寂,偶尔只会听见几声驯鹿的鸣叫和摩托雪橇放牧驯鹿的轰鸣。
但是即使在那里,人们也感受到了北极的变化。
“驯鹿越来越不开心。
”31岁的养鹿人埃拉说道。
其实谈及保护环境和本土习俗,没有什么国家可以与挪威相提并论。
政府把开发石油获得的财富都用在了北极地区,萨米人的文化也因此得到了某种意义上的复兴。
但是无论有多少来自于政府的支持都无法让埃拉相信,他以鹿为生的日子将会和以往一样。
象德克萨斯州的养牛人,他对自己放养的驯鹿数量守口如瓶,但是他说,春秋两季气温上升,导致表层雪融化,天冷后结成冰,驯鹿就更难于刨食到地表的植物。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
A Dip in the Reservoir:Maintaining Sample Synopses of Evolving DatasetsRainer Gemulla Wolfgang Lehner Technische Universit¨at Dresden01099Dresden,Germany {gemulla,lehner}@inf.tu-dresden.dePeter J. HaasIBM Almaden Research Center San Jose,California,USAphaas@ABSTRACTPerhaps the mostflexible synopsis of a database is a ran-dom sample of the data;such samples are widely used to speed up processing of analytic queries and data-mining tasks,enhance query optimization,and facilitate informa-tion integration.In this paper,we study methods for in-crementally maintaining a uniform random sample of the items in a dataset in the presence of an arbitrary sequence of insertions and deletions.For“stable”datasets whose size remains roughly constant over time,we provide a novel sam-pling scheme,called“random pairing”(RP)which main-tains a bounded-size uniform sample by using newly inserted data items to compensate for previous deletions.The RP algorithm is thefirst extension of the almost40-year-old reservoir sampling algorithm to handle deletions.Experi-ments show that,when dataset-sizefluctuations over time are not too extreme,RP is the algorithm of choice with respect to speed and sample-size stability.For“growing”datasets,we consider algorithms for periodically“resizing”a bounded-size random sample upwards.We prove that any such algorithm cannot avoid accessing the base data,and provide a novel resizing algorithm that minimizes the time needed to increase the sample size.1. INTRODUCTIONBecause of itsflexibility,sampling is widely used for quick approximate query answering[1,5,10,9,12,24],statis-tics estimation[11,26],data stream processing[13,17,27], data mining[3,16,18,20],and data integration[2,14,15, 22].Uniform random sampling,in which all samples of the same size are equally likely,is the most fundamental of the available database sampling schemes.Uniform sampling is ubiquitous in applications:most statistical estimators—as well as the confidence-bound formulas for these estimators—assume an underlying uniform sample.Thus uniformity is a must if it is not known in advance how the sample will be used.Uniform sampling is also a building block for more complex sampling schemes,such as stratified sampling. Permission to copy without fee all or part of this material is granted pro-vided that the copies are not made or distributed for direct commercial ad-vantage,the VLDB copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Very Large Data Base Endowment.To copy otherwise,or to republish,to post on servers or to redistribute to lists,requires a fee and/or special permission from the publisher,ACM.VLDB ‘06, September 12-15, 2006, Seoul, Korea.Copyright2006VLDB Endowment,ACM1-59593-385-9/06/09.Methods for producing uniform samples are therefore key to modern database systems.In the simplest setting,the basic task is to compute a uni-form sample from a dataset that is stored on disk,such as a table in a relational database management system(RDBMS) or a repository of XML documents.In general,there are two alternative approaches to computing such a sample.First, the sample may be materialized on thefly as it is needed. In the setting of commercial RDBMS,Haas and K¨o nig[12] have shown that there is a trade-offbetween the uniformity of a sampling scheme and the cost of computing it.Even if some degree of non-uniformity is acceptable,online sam-ple materialization can still be too expensive.Moreover, it is often quite acceptable to use the same sample several times,in order to answer a set of queries or perform multiple analysis tasks.Taking advantage of this fact,an alternative approach[4,8,10,11,17]amortizes the cost of sampling over multiple uses by initially materializing a sample from a dataset and then incrementally maintaining the“sample synopsis”over time.Incremental sample maintenance is a very powerful tech-nique,because the abstract notion of the underlying“data-set”can be interpreted very broadly in applications.Indeed, the dataset can actually be an arbitrary view,e.g.,over the result of an arbitrary SQL query.Samples over views are particularly good candidates for incremental maintenance, because producing such samples on thefly can require very expensive base-data accesses.For example,most relational operators are not interchangeable with sampling[5,24],so that in most cases the sampling operator cannot be moved to the leaves of the query tree.Olken and Rotem[24,25] pioneered methods for incremental maintenance of sample views in relational databases;these methods synthesize tra-ditional view-maintenance techniques with database sam-pling algorithms.The idea is to,in effect,compute the “delta”(set of insertions,updates,and deletions)to the view as the underlying tables are updated and then apply gen-eral sample-maintenance methods to the resulting sequence of view modifications.Although computation of the deltas requires access to the base data,this expense is smoothly spread out over time,providing for fast query response.Also observe that the full view need never be materialized if only the sample is of interest,thereby saving space as well as time. The main deficiency of existing techniques for maintaining sample views is that they require expensive base-data ac-cesses over and above those needed to compute the deltas. This paper provides new methods for incrementally main-taining a uniform random sample of an evolving dataset.Weassume that the sample-maintenance component intercepts data insertion and deletion requests1on their way to the dataset,and maintains the sample locally.In this setting, the main challenges in sample maintenance are(1)to enforce statistical uniformity in the presence of arbitrary insertions and deletions,(2)to avoid accesses to the base data to the extent possible,because such accesses are typically expen-sive,and(3)to keep the sample size as stable as possible, avoiding oversized or undersized samples.We distinguish between“stable”datasets whose size(but not necessarily composition)remains roughly constant over time and“growing”datasets in which insertions occur more frequently than deletions over the long run.The former set-ting is typical of transactional database systems and data-bases of moving objects;the latter setting is typical of data warehouses in which historical data accumulates.For sta-ble datasets,it is highly desirable from a systems point of view to ensure that the sample size stays below a speci-fied upper bound,so that memory for the sample can be allocated initially,with no unexpected memory overruns oc-curring later on.Moreover,once memory has been allocated for the sample,the sample size should be kept as close to the upper bound as possible in order to maximize the statistical precision of applications that use the sample.That is,we want to use the allotted space efficiently.For growing data sets,maintaining a bounded sample is of limited practical interest.Over time,such a sample represents an increas-ingly small fraction of the dataset.Although a diminishing sampling fraction may not be a problem for tasks such as estimating a population sum,many other tasks—such as es-timating the number of distinct values of a specified popula-tion attribute—require the sampling fraction to be bounded from below.The goal for a growing data set is therefore to grow the sample in a stable and efficient manner,guaran-teeing an upper bound on the sample size at all times and using the allotted space efficiently.The best known method for incrementally maintaining a sample in the presence of a stream of insertions to the dataset is the classical“reservoir sampling”algorithm[21, 23],which maintains a simple random sample of a specified size.One deficiency of this method is that it cannot handle deletions,and the most obvious modifications for handling deletions either yield procedures for which the sample size systematically shrinks to0over time or which require expen-sive base-data accesses.2The other main deficiency is that the class of pure insertion streams—for which reservoir sam-pling is designed—results in growing datasets as discussed above;thus the usefulness of the bounded reservoir sample tends to diminish over time.Surprisingly,although reservoir sampling has been around for almost40years,the algorithm apparently has never been extended to deal with either dele-tions or growing datasets.In this paper we provide thefirst such extensions of reservoir sampling.In more detail,we address the challenges of incremental sample maintenance as follows.1.For stable datasets,we provide a new sampling scheme,called“random pairing”(RP),that maintains a bound-1We do not consider updates explicitly,since an update to the dataset can be trivially handled by updating the value of the corresponding sample element,if present.2A common approach is to periodically recompute the sam-ple from scratch[11].ed uniform sample in the presence of arbitrary inser-tions and deletions,without requiring expensive base-data accesses.RP can be viewed as a generalizationof both classical reservoir sampling and the”passive”stream-sampling algorithm of Babcock,et al.[1].RPis as least as fast as any other known uniform sam-pling scheme,and strictly faster than any scheme thataccesses the base data.The sample sizes produced byRP are more stable than those produced by any otheralgorithm that does not access base data and,pro-vided thatfluctuations in the dataset size are not tooextreme,are as stable as those produced by expensivealgorithms that require base-data accesses.Thus,ifthe dataset size is reasonably stable over time,RP isthe algorithm of choice for incrementally maintaininga bounded uniform sample.2.For growing datasets,we initiate the study of algo-rithms for periodically“resizing”a bounded-size ran-dom sample upwards,thereby allowing an ever-increas-ing sample size while at all times avoiding uncontrol-lably large samples.We prove that any such algo-rithm cannot avoid accessing the base data,and pro-vide a novel resizing algorithm that permits the sam-ple to grow over time while always enforcing a user-controlled upper bound on the sample size.We showhow to set the algorithm parameters to optimally bal-ance the time required to access the base data and thetime needed to subsequently enlarge the sample usingnewly inserted data.The remainder of this paper is organized as follows.InSection2,we review existing algorithms that are pertinentto incremental sample maintenance,and relate them to ournew techniques.Section3contains a description and cor-rectness proof of the RP algorithm.Section4describes ourresizing algorithm,and develops approximate cost formulasfor this algorithm that can be used to tune the key algo-rithm parameter.In Section5,we report results from anempirical performance study of the new and existing sample-maintenance algorithms;we also assess the accuracy of ourapproximate cost model for the resizing algorithm.We con-clude in Section6.2.UNIFORM SAMPLING SCHEMESIn this section,we describe the sampling problem moreprecisely and give an overview of various new and existingsampling schemes.Following[4],call a sampling scheme uni-form if the probability P(S;R)that the scheme producessample S when applied to dataset R satisfies P(S;R)= P(S ;R)whenever|S|=|S |.That is,all samples of the same size are equally likely to be produced.We say that S“is a uniform sample from R”if S is produced from R using auniform sampling scheme.We restrict attention throughoutto sampling without replacement.We consider a(possibly infinite)set T={t1,t2,...} of unique,distinguishable items that are inserted into and deleted from the dataset R over time;for example,T might correspond to afinite set of IP addresses,an infinite se-quence of text documents,or an infinite sequence of sales transactions over an evolving selection of products.In gen-eral,items that are deleted may be subsequently re-inserted. Without loss of generality,we assume throughout that R is initially empty.Thus we consider an infinite sequence oftransactionsγ=(γ1,γ2,...),where each transactionγi is either of the form+t k,which corresponds to the insertion of item t k into R,or of the form−t k,which corresponds to the deletion of item t k from R.We restrict attention to “feasible”sequences such that(i)at any time point,an item appears at most once in the dataset(so that the dataset is a true set and not a bag)and(ii)γn=−t k only if item t k is in the dataset just prior to the processing of the n th transaction.Our goal is to ensure that,after each transac-tion is processed,S is a uniform sample from R.We assume throughout that,as is usual in practice,the sequenceγof insertions and deletions to the data is oblivious to the be-havior of the sampling algorithm.Wefirst discuss two classical uniform schemes,Bernoulli sampling and reservoir sampling,that underlie all of the other sampling methods.We then discuss schemes that are appropriate for stable datasets and growing datasets.Fi-nally,we discuss the relationship of these schemes to some recent work on“distinct-value”(DV)sampling.2.1Two Classical SchemesBernoulli Sampling:In the Bernoulli sampling scheme with sampling rate q,denoted BERN(q),each inserted item is included in the sample with probability q and excluded with probability1−q,independent of the other items.For a dataset R,the sample size follows the binomial distributionBINOM(|R|,q),so that P{|S|=k}=|R|k q k(1−q)|R|−kfor k=0,1,...,|R|.Although the sample size is random, samples having the same size are equally likely,so that the scheme is indeed uniform,as defined previously.The main advantages of Bernoulli sampling are simplicity and ease of parallelization;the main disadvantage is the uncontrollable variability of the sample size.Indeed,the sample can be as large as|R|,so there is no effective upper bound. Reservoir Sampling(RS):This uniform scheme main-tains a random sample offixed size M,given a sequence of insertions.The procedure,as described in McLeod et al.[23],is as follows.Include thefirst M items into the sam-ple.For each successive insertion into the dataset,include the inserted item into the sample with probability M/|R|, where|R|is the size of the dataset just after the insertion; an included item replaces a randomly selected item in the sample.Vitter[28]significantly reduced the computational costs of RS by devising a method to directly generate the (random)number of arriving items to skip between consec-utive sample inclusions,thereby avoiding the need to“flip a coin”for each item.Efficient reservoir schemes that handle very large disk-based samples are provided in[8,17].2.2Schemes for Stable DatasetsStream-sampling methods:Babcock et al.[1]have proposed several sampling schemes for obtaining afixed-size uniform random sample from a moving window over a data stream.This setting corresponds to the special case in which each deletion from the dataset is immediately followed by an insertion,and these algorithms do not directly generalize to arbitrary sequences of insertions and deletions.The most pertinent of the algorithms in[1]is the“passive”algorithm. This algorithmfirst obtains a uniform sample from the ini-tial window.Whenever an item in the sample is deleted from the window,the corresponding newly inserted item takes the place of the deleted item in the sample.Brown and Haas[4]provide“approximate”stream-sampling algo-rithms for a warehouse in which“data partitions”are rolledin and out.The idea is to create samples of the data parti-tions that“shadow”the full partitions as they move throughthe warehouse.Again,these algorithms do not generalize toarbitrary,item-wise insertions and deletions,but the“merg-ing”algorithms in[4]can potentially be used to parallelizethe new algorithms in the current paper.Correlated acceptance-rejection(CAR):By adapt-ing the CAR algorithm of Olken and Rotem[25]to our set-ting,we obtain a method for maintaining uniform randomsamples in the presence of arbitrary insertions and deletions;this method requires access to the base data,however.Ourversion of CAR actually maintains a uniform sample withreplacement,i.e.,each item in the dataset may appear morethan once in the sample.Whenever an item is insertedinto the dataset,CAR generates a random number N fromthe binomial distribution BINOM(M,1/|R|)and replaces Nrandom items of the current sample by N copies of the newitem.Whenever an item is deleted from the dataset,CARreplaces each occurrence of this item by a random itemdrawn from the population.We obtain thefinal uniformsample without replacement by removing duplicates;thusthe gross sample size must be larger than M to compensatefor duplicate removal,and there is no effective lower boundon the sample size.Correlated acceptance-rejection without replace-ment(CAR WOR):This simple variant of the CAR algo-rithm executes standard RS at each insertion.Whenever anitem is deleted from the sample S,CARWOR replaces it bya random item from R\S.Although CARWOR maintainsthe sample size at its largest possible value,the algorithmrelies on frequent,expensive accesses to base data.Reservoir sampling with recomputation(RSR):Asmentioned previously,RS is designed to deal only with inser-tions.The simplest modification is to execute RS as usualat each insertion.At each deletion from the dataset,wecheck whether the item is in the sample;if so,we removeit and continue RS with a smaller sample size.The ob-vious problem with this approach is that the sample sizedecreases monotonically to zero.We therefore modify thisapproach using a device as in Gibbons et al.[11]:as soon asthe sample size falls below a prespecified lower bound,re-compute it from scratch using,for example,sequential sam-pling[29].Clearly,this approach(also called the“backingsample”method)does not yield a stable sample size,and itrequires repeated access to the base data.In spite of thesedeficiencies,RSR has been the sampling scheme of choicefor bounded-size uniform sampling.Bernoulli sampling with purging(BSP):This tech-nique combines Bernoulli sampling with an idea proposed byGibbons et al.[10],and can handle insertions and deletionswithout accessing base data.3The idea is to use BERN(q) sampling—allowing deletions,as in the MBERN(q)schemedescribed in Section2.3below—and to purge the sample ev-ery time it exceeds the upper bound.Starting with q=1,we decrease q at every purge step.With q being the newvalue of q,the sample is subsampled using BERN(q /q)sam-pling.This procedure is repeated until the sample size hasfallen below M.The choice of q is challenging:on the onehand,if q is chosen small with respect to q,the samplesize drops significantly below the upper bound in expecta-3We note that the specific sampling algorithms given in[10] do not produce uniform samples;see[4].tion.On the other hand,a high value of q leads to frequent purges,thereby reducing performance.Note that BSP does not maintain a true BERN(q)sample,because the sample size is bounded.Due to the difficulty of choosing q and,as discussed in the sequel,instability in the sample sizes,this algorithm can be difficult to use in practice.Random pairing(RP):Our new RP algorithm,de-scribed in Section3,maintains a bounded-size uniform sam-ple in the presence of arbitrary insertions and deletions with-out requiring access to the base data.As shown in our ex-periments,the RP algorithm produces samples that are sig-nificantly larger(i.e.,more space efficient)and more stable than those produced by BSP,at lower cost.2.3Schemes for Growing DatasetsModified Bernoulli Sampling:This uniform sampling scheme,denoted MBERN(q),is the simplest scheme for dealing with a growing data set.The MBERN(q)scheme treats each insertion identically to the ordinary BERN(q) scheme.Whenever an item is removed from the dataset,it is also removed from the sample,if present.As with BERN(q), the sample size is binomially distributed,and is100q%of the dataset size on average.Note that we do not consider the use of MBERN(q)for stable datasets because it cannot guarantee an upper bound on the sample size(nor can it guarantee a lower bound).Resizing:Our novel resizing method can be used with any stable-dataset sampling scheme.In this way we can grow the sample as the dataset grows,while guaranteeing an upper bound on the sample size at each time point.Resizing can even be used in conjunction with MBERN(q)sampling to increase the sampling rate q;see Section4.2.2.4Distinct-Value SamplingTo our knowledge,the only other sampling methods that handle arbitrary sequences of insertions and deletions are the two DV-sampling algorithms recently proposed in[6,7]. These two algorithms were designed for datasets in which items can appear multiple times;i.e.,datasets that are bags, not sets.The algorithms sample uniformly from the set of distinct items of a dataset,and also provide the number of occurrences for each sampled value(or a high-accuracy approximation thereof).In our setting,where each item in the dataset occurs only once,random sampling and DV-sampling coincide,so we could attempt to adapt the DV-sampling algorithms to our purpose.Both DV-sampling algorithms make use of a data struc-ture which—with some success probability p—maintains a single item chosen randomly from the set of distinct items. To maintain multi-item samples,multiple instances of the data structure are stored,so that sampling is with replace-ment.The two schemes[6,7]coincide when adapted to our setting:each data structure consists of the sum of the items(treated as integers)inserted into it,and a counter of the number of inserted items.The basic idea is that only a random fraction of the items added into or deleted from the dataset affect a data structure.In more detail,the adapted DV-sampling algorithm(call it DVS)would make use of a set of independent random hash functions,one for each instance of the data structure.The range of each hash function is{0,...,D−1},where D is the average size of the dataset.An item t affects a data structure only if the corresponding hash function satisfies h(t)=0.If a data structure contains exactly one item,then it“succeeds,”and returns this item as a random sample of size1;otherwise,it fails.The probability p of a success is approximately equal to e−1when D is large,so that DVS would exploit only1/3 of the available memory,at best.Not only is the space effi-ciency low,but the computational costs are also extremely high.For example,with1million copies of the data struc-ture,DVS requires10trillion hash operations to insert10 million tuples into the sample,which takes hours even with the fastest available hash functions.Schemes such as RP, which are tailored for unique-item sampling,can perform such an insertion in a matter of minutes.For these reasons, we focus on the uniform sampling schemes outlined in the previous sections.3.RANDOM PAIRINGTo motivate the idea behind the random-pairing scheme, wefirst consider an“obvious”passive algorithm for main-taining a bounded uniform sample S of a dataset R.The algorithm avoids accessing base data by making use of new insertions to“compensate”for previous deletions.When-ever an item is deleted from the data set,it is also deleted from the sample,if present.Whenever the sample size lies at its upper bound M,the algorithm handles insertions identi-cally to RS;whenever the sample size lies below the upper bound and an item is inserted into the dataset,the item is also inserted into the sample.Although simple,this algo-rithm is unfortunately incorrect,because it fails to guaran-tee uniformity.To see this,suppose that,at some stage, |S|=M<|R|=N.Also suppose that an item t−is then deleted from the dataset R,directly followed by an insertion of t+.Denote by S the sample after these two operations. If the sample is to be truly uniform,then the probability that t+∈S should equal M/N,conditional on|S|=M. Since t−∈S with probability M/N,it follows thatP t+∈S=P t−∈S,t+included+P t−∈S,t+included=M·1+1−M·M>M,(1)conditional on|S|=M.Thus an item inserted just after a deletion has an overly high probability of being included in the sample.The basic idea behind RP is to avoid the foregoing problem by including an inserted item into the sample with a probability less than1when the sample size lies below the upper bound.The key question is how to select the inclusion probability to ensure uniformity.3.1Algorithm DescriptionIn the RP scheme,every deletion from the dataset is even-tually compensated by a subsequent insertion.At any given time,there are0or more“uncompensated”deletions;the number of uncompensated deletions is simply the difference between the cumulative number of insertions and the cumu-lative number of deletions.The RP algorithm maintains a counter c1that records the number of uncompensated dele-tions in which the deleted item was in the sample(so that the deletion also decremented the sample size by1).The RP algorithm also maintains a counter c2that records the num-ber of uncompensated deletions in which the deleted item was not in the sample(so that the deletion did not affectAlgorithm1Random pairing1:c1:no.of deletions which have been in the sample2:c2:no.of deletions which have not been in the sample3:k:skip counter for reservoir sampling(initialized to1)4:M:upper bound on sample size5:R,S:dataset and sample,respectively6:Skip():reservoir-sampling skip function as in[28]7:[Skip(m,r)=0if r<m]8:9:Insert(t):10:if c1+c2=0then//execute plain reservoir sampling 11:k←k−112:if k=0then13:if|S|<M then14:insert t into S15:else16:overwrite a randomly selected element of S with t 17:end if18:k←Skip(M,|R|)+119:end if20:else//execute random-pairing step21:if Random()<c1c1+c2then22:c1←c1−123:insert t into S24:else25:c2←c2−126:end if27:end if28:29:Delete(t):30:if t∈S then31:c1←c1+132:remove t from S33:else34:c2←c2+135:end ifthe sample).Clearly,d=c1+c2is the total number of uncompensated deletions.The algorithm works as follows.Deletion of an item is handled by removing the item from the sample,if present, and by incrementing the value of c1or c2,as appropriate. If d=0,i.e.,there are no uncompensated deletions,then insertions are processed as in standard RS,using Vitter’s optimizations[28].If d>0,then weflip a coin at each insertion step,and include the incoming insertion into the sample with probability c1/(c1+c2);otherwise,we exclude the item from the sample.We then decrease either c1or c2,depending on whether the insertion has been included into the sample or not.The complete algorithm is given as Algorithm1.Conceptually,whenever an item is inserted and d>0, the item is paired with a randomly selected uncompensated deletion,called the“partner”deletion.The inserted item is included into the sample if its partner was in the sample at the time of its deletion,and excluded otherwise.The proba-bility that the partner was in the sample is c1/(c1+c2).For the purpose of the algorithm,it is not necessary to keep track of the identity of the random partner;it suffices to maintain the counters c1and c2.Note that if we repeat the calculation in(1)using RP,we now have P t−∈S,t+included=0, and we obtain the desired result P t+∈S =M/N.3.2An ExampleThe RP algorithm with M=2is illustrated in Figure1. Thefigure shows all possible states of the sample,along Figure1:Random pairing(possible outcomes&probability)with the probabilities of the various state transitions.Theexample starts after i=2items have been inserted into anempty dataset,i.e.,the sample coincides with R.The inser-tion of item t3leads to the execution of a standard RS stepsince there are no uncompensated deletions.This step hasthree possible outcomes,each equally likely.Next,we re-move items t2and t3from both the dataset and the sample.Thus,at i=5,there are two uncompensated deletions.Theinsertion of t4triggers the execution of a pairing step.Itemt4is conceptually paired with either t3or t2—these scenar-ios are denoted by a)and b)respectively—and each of thesepairings is equally likely.Thus t4compensates its partner,and is included in the sample if and only if the partner was inthe sample prior to its deletion.This pairing step amountsto including t4with probability c1/(c1+c2)and excluding t4with probability c2/(c1+c2),where the values of c1and c2depend on which path is taken through the tree of pos-sibilities.A pairing step is also executed at the insertion of t5,but this time there is only one uncompensated deletion left:t2in scenario a)or t3in scenario b).The probability of seeing a given sample at a given time point is computed by multiplying the probabilities along the path from the“root”at the far left to the node that represents the sample.Ob-serve that the sampling scheme is indeed uniform:at each time point,all samples of the same size are equally likely to have been materialized.3.3Correctness and Sample-Size Properties In this section we formally establish the uniformity prop-erty of the RP scheme with upper bound M(≥1)and also derive formulas for the mean and variance of the sample size.To establish uniformity,we actually prove a slightly stronger result that implies uniformity.Denote by R n the dataset and by S n sample after the n th processing step,i.e., after processing transactionγn.Also denote by c1,n and c2,n the value of the counters c1and c2after the n th step, and set d n=c1,n+c2,n.Finally,set u n=min(M,|R n|), v n=min(M,max1≤j≤n|R j|)=min(M,|R n|+d n),and l n=max(0,u n−d n);in light of(4)below,it can be seen that u n and l n are the largest and smallest possible sample sizes after the n th step,and v n is the largest possible sample。