アットウィキロゴ
大久保弘崇
掲示板 掲示板 ページ検索 ページ検索 メニュー メニュー

大久保弘崇

Errata-6

最終更新:

hirotakaohkubo

- view
管理者のみ編集可

Chapter 12


p.80 l.-2

Wrong:

[3,1,3,0,1] \ll [2,0,3,4,0] = [2,1,3,0,1]
Correct:

[3,1,3,0,1] \ll [2,0,3,4,0] = [3,1,4,0,1]

p.80 l.-1

Wrong: The operation << is
Correct: The operator << is

p.84 l.5 and l.6

Wrong: subseq
Correct: select

p.85 Fig12.1

Wrong:
pass (e@(x,y):xys) xss = step xys [] [x] [] xss
 where
  step [] as bs cs xss           = pass as (bs:pass cs xss)
  step (e@(x,y'):xys) as bs cs xss | y' < y = step xs (e:as) bs cs xss
                                   | y' = y = step xs as (x:bs) cs xss
                                   | y' > y = step xs as bs (e:cs) xss
Correct:
pass ((x,y):xys) xss = step xys [] [x] [] xss
 where
  step [] as bs cs xss                    = pass as (bs:pass cs xss)
  step (e@(x,y'):xys) as bs cs xss | y' < y = step xys (e:as) bs cs xss
                                   | y' ==y= step xys as (x:bs) cs xss
                                   | y' > y = step xys as bs (e:cs) xss
My proposal:
pass ((x0,y0):xys) xss = pass lows (equals : pass highs xss) where
  (lows, equals, highs) = step xys ([],[x0],[])
  step (e@(x,y):xys) (ls,eqs,hs) | y < y0 = step xys (e:ls, eqs, hs)
                                 | y ==y0 = step xys (ls, x:eqs, hs)
                                 | y > y0 = step xys (ls, eqs, e:hs)
  step [] triple = triple

p.88 Fig12.2

Wrong: install i = (i, ...
Correct: install i = let j=i+k in(i, ...

p.88 l.5

Wrong: whose second components
Correct: whose first components

p.88 T(n,k)

In mathematical notation, it should be

T(n,k) = \max_{1 \le x \le n} \big ( n-1 + T(x,k-1) + 2T(\frac{n-x}{2},k) \big )

Place comment here

Name
Message
記事メニュー
最近更新されたスレッド
人気記事ランキング
ウィキ募集バナー