Your SlideShare is downloading. ×
0
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
readpfds_6.3.2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

readpfds_6.3.2

663

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
663
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. * reverseはmonotonicな関数* reverseの実行には|r|ステップかかる* |r|ステップ = 借金* 最も外側にあるreverse suspは|f|回のtailの後にforce* |r| =~ |f| の時reverseして、* オペレーション毎に借金を1つ返済するなら、* reverseをforceするまでにその借金を返済すれば良い
  • 2. let q0 = (m, f, m, r)let q1 = tail q0 # <= f ++ reverse r -- |r|借金let q2 = tail q1let q3 = tail q2...let qm = tail qm-1 # <= force (reverse r) -- 返済期限ここの時任意のkで分岐が発生したとするとqkからqmまで分岐先でも二重に実行されることになる。
  • 3. let q0 = (m, f, m, r)let q0 = q0let q1 = tail q0 # <= f ++ reverse r -- |r|借金...let qm = tail qm-1 # <= force (reverse r) -- 返済期限let q1 = tail q0 # <= f ++ reverse r -- |r|借金...let qm = tail qm-1 # <= force (reverse r) -- 返済期限
  • 4. d(i) = fのi番目の要素における借金D(i) = 0からiまでのd(j)を足しこんだものさらに↓を不変条件とするD(i) <= min(2i, |f| - |r|)

×