3. You’re doing some stress-testing on various models of glass jars to การแปล - 3. You’re doing some stress-testing on various models of glass jars to ไทย วิธีการพูด

3. You’re doing some stress-testing

3. You’re doing some stress-testing on various models of glass jars to determine the height
from which they can be dropped and still not break. The setup for this experiment, on
a particular type of jar, is as follows. You have a ladder with n rungs, and you want to
find the highest rung from which you can drop a copy of the jar and not have it break.
We call this the highest safe rung.
3
It might be natural to try binary search: drop a jar from the middle rung, see if it
breaks, and then recursively try from rung n/4 or 3n/4 depending on the outcome.
But this has the drawback that you could break a lot of jars in finding the answer.
If your primary goal were to conserve jars, on the other hand, you could try the
following strategy. Start be dropping a jar from the first rung, then the second rung,
and so forth, climbing one higher each time until the jar breaks. In this way, you only
need a single jar – at the moment it breaks, you have the correct answer – but you
may have to drop it n times (rather than log n as in the binary search solution).
So, here is the trade-off: it seems you can perform fewer drops if you’re willing to break
more jars. To understand better how this trade-off works at a quantitative level, let’s
consider how to run this experiment given a fixed “budget” of k  1 jars. In other
words, you have to determine the correct answer – the highest safe rung – and can use
at most k jars in doing so.
(a) Suppose you are given a budget of k = 2 jars. Describe a strategy for finding the
highest safe rung that requires you to drop a jar at most f(n) times, for some
function f(n) that grows slower than linearly. (In other words, it should be the
case that limn!1 f(n)/n = 0.)
(b) Now suppose you have a budget of k > 2 jars, for some given k. Describe a
strategy for finding the highest safe rung using at most k jars. If fk(n) denotes
the number of times you need to drop a jar according to your strategy, then the
functions f1; f2; f3; : : : should have the property that each grows asymptotically
slower than the previous one: limn!1 fk(n)/fk
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
3. คุณกำลังทำบางอย่างความเครียดการทดสอบในรูปแบบต่าง ๆ ขวดแก้วเพื่อกำหนดความสูงซึ่งพวกเขาสามารถลดลง และยัง ไม่ทำลาย การตั้งค่านี้ทดลอง ในขวด บางชนิดมีดังนี้ คุณมีบันได ด้วย n rungs และคุณต้องการค้นหารุ้งสูงซึ่งคุณสามารถลบสำเนาขวด และไม่มีมันทำลายเราเรียกนี้ปลอดภัยสูงรุ่ง3มันอาจจะธรรมชาติพยายามค้นหาแบบไบนารี: ร่วงเป็นขวดกลางรุ้ง ดูมันตัวแบ่ง และ recursively ลองจากรุ้ง n/4 วัน 3 คืน/4 ตามผลแต่มีข้อเสียเปรียบที่ว่า คุณสามารถทำลายมากขวดในการหาคำตอบถ้าเป้าหมายหลักของคุณได้เพื่อ ประหยัดขวด คง คุณสามารถลองการกลยุทธ์ต่อไปนี้ เริ่มต้นจะวางขวดที่จากรุ่งแรก แล้วรุ่งสองและอื่น ๆ หนึ่งปีนเขาสูงกันจนแบ่งขวด ด้วยวิธีนี้ คุณเท่านั้นต้องการขวดเดียว – ในขณะที่มันแบ่ง มีคำตอบถูกต้อง – แต่คุณอาจต้องปล่อย n ครั้ง (แทน n ในล็อกในการแก้ปัญหาการค้นหาแบบทวิภาค)ดังนั้น นี่คือการ trade-off: ดูเหมือนว่า คุณสามารถลดลงน้อยกว่าถ้าคุณยินดีที่จะแบ่งขวดเพิ่มเติม เข้าใจดีว่า trade-off นี้ทำงานในระดับเชิงปริมาณ ลองพิจารณาวิธีการรันการทดลองนี้ให้ถาวร "งบประมาณ" k 1 ขวด ในที่อื่น ๆคำ คุณต้องกำหนด –สูงสุดเซฟรุ่ง – คำตอบถูก และสามารถใช้มากที่สุด เคไหใน(ก) สมมติว่าคุณจะได้รับงบประมาณของ k = 2 ขวด อธิบายกลยุทธ์สำหรับการค้นหาปลอดภัยสูงสุดรุ่งที่ต้องการวางขวดมากที่สุด f(n) เวลา บางf(n) ฟังก์ชันที่เติบโตช้ากว่าเชิงเส้น (ในคำอื่น ๆ ควรมีการกรณีที่ limn ! 1 f (n) /n = 0)(ข) ขณะนี้ สมมติว่าคุณมีงบประมาณของ k > 2 ไห สำหรับบางคุณกำหนด Describe เป็นกลยุทธ์ในการค้นหาปลอดภัยสูงสุดที่รุ้งใช้ k ขวดมากที่สุด ถ้าหมายถึง fk(n)จำนวนครั้งที่คุณจำเป็นต้องวางขวดตามกลยุทธ์ของคุณ นั้นฟังก์ชัน f1 f2 f3 ::: ควรมีคุณสมบัติแต่ละขยาย asymptoticallyช้ากว่านี้: limn ! 1 fk(n)/fk
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2025 I Love Translation. All reserved.

E-mail: