A Simple PDF
A Simple PDF
A Simple PDF
just for use in the Virtual Mechanics tutorials. More text. And more
text. And more text. And more text. And more text.
And more text. And more text. And more text. And more text. And more
text. And more text. Boring, zzzzz. And more text. And more text. And
more text. And more text. And more text. And more text. And more text.
And more text. And more text.
And more text. And more text. And more text. And more text. And more
text. And more text. And more text. Even more. Continued on page 2 ...
Simple PDF File 2
...continued from page 1. Yet more text. And more text. And more text.
And more text. And more text. And more text. And more text. And more
text. Oh, how boring typing this stuff. But not as boring as watching
paint dry. And more text. And more text. And more text. And more text.
Boring. More, a little more text. The end, and just as well.
RESEARCHCONTRIBUTIONS
A B S T R A C T : S e ve ralne w m e thods are pre s e nte dfor ing, a n d p ro b a b ilis tic a lg o rith m s . In te re s t in th is s u b je c t
s e le cting n records at random w ith o u t re place m e ntfrom a s te m s fro m wo rk o n a n e w e xte rn a l s o rtin g m e th o d
file containing N records. Each algorithm s e le cts the records c a lle d Bu c ke tS o rt th a t u s e s ra n d o m s a m p lin g fo r p re -
for the s am ple in a s e que ntialm a n n e r--in the s am e orde r p ro c e s s in g[7].
the records appe ar in the file . The algorithm s are online in O n e wa y to s e le c t th e n re c o rd s is to g e n e ra te a n
that the records for the s am ple are s e le cte dite rative ly w ith in d e p e n d e n tra n d o m in te g e r k b e twe e n I a n d N a n d to
no preprocessing. The algorithm s re quire a cons tant am ount s e le c t th e kth re c o rd if it h a s n o t a lre a d y b e e n s e le c te d ;
of s pace and are s hort and e as y to im ple m e nt. The m ain this p ro c e s s is re p e a te d u n til n re c o rd s h a ve b e e n s e -
re s ult of this pape r is the de s ign and analys is of Algorithm D, le cte d. (If n > N /2 , it is fa s te r to s e le c t th e N - n
which does the s am pling in O(n) tim e , on the average; re c o rd s not in th e s a mple .) Th is is a n e xa m p le o f a
roughly n uniform random variate s are ge ne rate d,and nons e que ntialalgorithm b e c a u s eth e re c o rd s in th e s a m -
approxim ate ly n e xpone ntiationope rations (of the form ab, p le m ig h t n o t b e s e le c te d in lin e a r o rd e r. F o r e xa m p le ,
for real num be rs a and b) are pe rform e d during the th e 8 4 th re c o rd in th e file m a y b e s e le c te d b e fo re th e
s am pling. This s olve s an ope n proble m in the lite rature . 16th re c o rd in th e file is s e le c te d .Th e a lg o rith m re -
CPU tim ings on a large m ainfram e com pute rindicate that q u ire s th e g e n e ra tio n o f O(n) u n ifo rm ra n d o m va ria te s ,
Algorithm D is s ignificantly fas te r than the s am pling a n d it ru n s in O(n) tim e if th e re is e n o u g h e xtra s p a c e
algorithm s in us e today. to c h e c k in c o n s ta n t tim e wh e th e r th e kth re c o rd h a s
a lre a d y b e e n s e le c te d . Th e c h e c kin g c a n b e d o n e in
O(N) s p a c e u s in g a bit a rra y o r with O(n) p o in te rs u s in g
1. INTR O DUC TIO N h a s h in g te c h n iq u e s (e .g,, [2, 6]}. In e ith e r ca s e , th e
Ma n y c o m p u te r s c ie n c e a n d s ta tis tics a p p lic a tio n s s p a c e re q u ire d m a y b e p ro h ib itive .
ca ll for a s a m p le o f n re c o rd s s e le c te d ra n d o m ly with - Ofte n, we wa n t th e n re c o rd s in th e s a m p le to b e in
o u t re p la c e m e n tfro m a file c o n ta in in g N re c o rd s th e s a m e o rd e r th a t th e y a p p e a r in th e file s o th a t th e y
o r fo r a ra n d o m s a m p le o f n in te g e rs fro m th e s e t c a n b e a c c e s s e ds e q u e n tia lly, for e xa m p le , if th e y re -
{1, 2, 3 . . . . . NI. Bo th typ e s o f ra n d o m s a m p lin g a re s ide o n d is k o r ta pe . In o rd e r to a c c o m p lis h th is u s in g a
e s s e n tia lly e q u iva le n t; fo r c o n ve n ie n c e ,in th is p a p e r n o n s e q u e n tia la lg o rith m , we m u s t s ort th e re c o rd s b y
we re fe r to th e fo rm e r typ e o f s a m p lin g , in wh ic h re c - th e ir in d ic e s afte r th e s a m p lin g is d o n e . Th is re q u ire s
o rd s a re s e le c te d .S o m e im p o rta n t u s e s o f s a m p lin g in- O(n log n) tim e u s in g a c o m p a ris o n -b a s e ds o rtin g a lgo-
c lu d e m a rke t s u rve ys , q u a lity c o n tro l in m a n u fa c tu r- rith m like q u ic ks o rt o r h e a p s o rt;a d d re s s -c a lc u la tio n
S ome of this re s e a rchwa s done while th e a u th o rwa s cons ultingfor th e IBM s o rtin g c a n re d u c e th e s o rtin g tim e to O(n), o n th e a ve r-
P a le Alto S cie ntific Ce nte r, S upport wa s a ls o provide d in pa rt by NS F Re s e a rch a ge , b u t it re q u ire s s p a c e fo r O(n) p o in te rs . No n s e q u e n -
Gra nt MCS -81-05324,by a n IBM re s e a rchcontra ct, a n d by ONR a n d DARP A
u n d e r Contra ct N00014-83.K-0146a nd ARP A O rd e r No. 4786. An e xte n d e d tia l a lg o rith m s th u s ta ke n o n lin e a r tim e , o r th e ir s p a c e
a bs tra ct of this re s e a rcha ppe a rsin [10]. re q u ire m e n ts a re ve ry la rg e a n d th e a lg o rith m is s o m e -
©1984ACMO001.0782/84/0700-0703
75¢ wh a t c o m p lic a te d .
o
3 . THR E E N E W S E Q U E N TIAL ALG O R ITHMS
o...
• •
We d e fin e S (n , N ) to b e th e ra n d o m va ria b le th a t c o u n ts
th e n u m b e r of re c o rd s to s k ip o v e r b e fo re s e le c tin gth e
n e xt re c o rd for th e s a m p le . Th e p a ra m e te rn is th e I ° :iii8 8 , . , • *1
n u m b e r of re c o rd s re m a in in gto b e s e le c te d ,a n d N is N/n N - n N
th e to ta l n u m b e r o f re c o rd s le ft in th e file . In o th e r
wo rd s , th e (S (n, N) + 1)s t re c o rd is th e n e xt o n e s e - FIGURE 1. The probability funcUon f(s ) = ProbIS = s } is g ra phe d
le c te d . O fte n we will a b b re via teS (n , N ) b y S in wh ic h a s a function of s . The me a n a nd s tandard de viation of S a re both
ca s e th e p a ra m e te rsn a n d N will b e im p lic it. approximately N/n. The quantities cgls) and his) that are used in
In th is s e c tio n , th re e n e w m e th o d s (Alg o rith m s A, B, Algorithm D are a ls o g ra phe d for the c a s e in whic h the random
a n d C) for s e q u e n tia lra n d o m s a m p lin ga re p re s e n te d variable X is integer-valued.
a n d a n a lyz e d .A fo u rth n e w m e th o d (Alg o rith m D),
wh ic h is th e m a in re s u lt of th is p a p e r, is d e s c rib e da n d Th e e xp re s s io nn / ( N - s ) is th e p ro b a b ility th a t th e
a n a lyz e din S e c tio n s4 a n d 5. E a c h m e th o d d e c id e s (s + 1)s t re c o rd is s e le c te dfor th e s a m p le , g ive n th a t th e
wh ic h re c o rd to s a m p le n e xt b y g e n e ra tin gS a n d b y firs t s re c o rd s a re n o t s e le c te d .Th e p ro b a b ility fu n c tio n
s kip p in g th a t m a n y re c o rd s . Th e g e n e ra lfo rm of a ll /(s ) = P rob{S = s}, for 0 <_ s <_ N - n, is e q u a l to F(s ) -
fo u r a lg o rith m s is a s follows : F(s - 1). S u b s titu tin g(3-1), we ge t th e fo llo win g two
e xp re s s io n sfo r/(s ), 0 _< s _< N - n :
S te p 1. G e n e ra tea ra n d o m va ria te S (n , N }.
S te p 2. S kip o ve r th e n e xt S (n , N ) re c o rd s in th e file n (N - s - 1)a =l n (N - n)~ (3-3)
a n d s e le c t th e fo llo win g o n e for th e s a m p le . f(s ) = ~ (N - 1)n=l = N (N - 1)~
S e t N : = N - S (n , N ) - 1 a n d n := n - 1.
R e tu rn to S te p 1 if n > 0. Wh e n s < 0 o r s > N - n, we d e fin e f{s ) = O. An
a lte rn a te d e riva tio n of (3-3} fo llo ws fro m th e c o m b in a -
Th e fo u r m e th o d s d iffe r fro m o n e a n o th e r in h o w th e y to ria l id e n tity
p e rfo rm S te p 1. G e n e ra tin gS in vo lve s g e n e ra tin go n e o r
m o re ra n d o m va ria te s th a t a re u n ifo rm ly d is trib u te d
b e twe e n0 a n d 1. As in Alg o rith m S in th e la s t s e c tio n ,
a ll u n ifo rm v a ria te s a re a s s u m e d to b e in d e p e n d e n t o f o n e
a n o th e r. Th e e xp e c te dva lu e ~ ( S ) is e q u a l to
Th e ra n g e of S (n, N) is th e s e t of in te g e rs in th e
in te rva l 0 ___s < N - n. Th e d is trib u tio n fu n c tio n F(s ) = N-n
P ro b lS -< s }, for 0 _<s ___N - n, c a n b e e xp re s s e din two 3 Y (S ) = • s f(s } - n + 1' (3-4)
wa ys :
a n d th e va ria n c e va r(S ) is e q u a l to
F(s ) = 1 (N - s - 1)n (N - n)+~-~
- Nn = 1 - N~ .t • (3 - 1}
va r(S ) = Y~ s Zf(s ) - _~(S )2 = {N + 1)(N - n )n (3-5}
(n + 2}(n + 1}2
{We u s e th e n o ta tio n a b to d e n o te th e "fa llin g p o we r"
a(a - 1) . . . (a - b + 1) = a !/{a - b)!.) We h a ve F(s ) = 0 Both th e e xp e c te dva lu e a n d th e s ta n d a rdd e via tio n o f S
for s < 0 a n d F(s ) = 1 for s _> N - n. Th e two fo rm u la s a re = N / n . Th e p ro b a b ility fu n c tio n f(s ) is g ra p h e d in
in (3-1} fo llo w b y in d u c tio n fro m th e re la tio n F ig u re 1.
1 - F(s ) = P ro b lS > s}
3 .1 Alg o rith m A
Th is is , b y fa r, th e s im p le s t o f th e fo u r m e th o d s . It is
= P r o b lS > s - 1 1 -N_ s b a s e d o n th e o b s e rva tio nth a t f(s ) is e q u a l to th e d iffe r-
e n c e F(s ) - F(s - 1). We c a n g e n e ra teS b y s e ttin g it
e q u a l to th e m in im u m va lu e s s u c h th a t U -< F(s ),
= ( l- F ( s - 1 ) ) 1 N- " (3-2)
wh e re U is u n ifo rm ly d is trib u te d o n th e u n it in te rva l.
n(
c~= N - n +1 ' (4-3) -N -n + l
(, 1
s ;1 , if O <s <N - n ;
- N - n + 1 ffl 1 - - - = c lg ,(s + 1).
hi(s ) = N-n +l - -
Th e "~ " te rm in th e a b o ve d e riva tio n fo llo ws b e c a u s e
I. 0, o th e rwis e . N - s - l- k N -s -1
-< , for 0_< k_< n - 2. Th e firs t
N -k N
Th e ra n d o m va ria b le X~ with d e n s ity gl(x) h a s th e be ta
in e q u a lity c a n b e p ro ve d in th e s a m e wa y:
dis tribution s c a le d to th e in te rva l [0, N] a n d with p a ra m -
e te rs a = 1 a n d b = n. It is th e c o n tin u o u s c o u n te rp a rt n N s -n +l
o f S , a s m e n tio n e d in th e b e g in n in g o f th is s e c tio n : Th e h~(s ) =- ~ • -- n + T
va lu e o f X1 c a n b e th o u g h t o f a s th e s m a lle s t o f n re a l
n u m b e rs c h o s e n in d e p e n d e n tlya n d u n ifo rm ly fro m th e n (N-s - 1~
< -- = f(s ).
in te rva l [0, N]. - N (N - 1) "-~
We c a n g e n e ra te X1 ve ry q u ic kly with o n ly o n e u n i-
Th e "<__"te rm fo llo ws s in c e
fo rm o r e xp o n e n tia lra n d o m va ria te . Le t Z1, Z2 . . . . . Z,
d e n o te n in d e p e n d e n ta n d u n ifo rm ly c h o s e n re a l n u m - N - s - n +l <N N S - l- k
N - n +l - ZT-- ~ . , fo r 0 _ < k _ < n - 2 . I
b e rs fro m th e in te rva l [0, N]. We d e fin e Gl(x) to b e th e
d is trib u tio n fu n c tio n o f X1. By in d e p e n d e n c e ,we h a ve Th e s e c o n d c h o ic e fo r th e p a ra m e te rsis
G~(x) = P rob{X, _< x}
= 1 - P rob{Xl > x}
g 2 (s )-~ n-l(1 n t'
1 ~ -- , s >_ 0;
= 1- H P ro b{Zk>X} n N-1
l~_k<_n C 2 = - - - - ;
(4 -5 )
(,-;y
n --1 N
=1-
It is we ll kn o wn th a t we c a n g e n e ra te a ra n d o m va ria te
h2(s ) =
{ (1
N ~,1--
if O <_ s <_ N - n ;
X2:=l(InU)/In(l
N-I)] Wh e n n / N ~ c~, th e tim e re q u ire d to d o th e n - 1 e xtra
"Is n -> a N ? " te s ts will b e c o m p e n s a te dfo r b y th e de -
c re a s e dtim e for g e n e ra tin gS ; if n / N ~e a , th is m o d ific a -
or (4-6) tio n will c a u s e a s light in c re a s e in th e ru n n in g tim e
(a p p ro xim a te ly 1 -2 p e rc e n t). An im p o rta n t a d va n ta g e
×. o f this m o d ific a tio n wh e n X~ is u s e d fo r X in th e re je c -
tio n te c h n iq u e is to g u a rd a g a in s t "wo rs t c a s e " b e h a v-
wh e re U is u n ifo rm ly d is trib u te d o n th e u n it in te rva l ior, wh ic h h a p p e n s wh e n th e va lu e o f N d e c re a s e s
a n d Y is e xp o n e n tia lly d is trib u te d . Th is is e a s y to d ra s tic a lly a n d b e c o m e s ro u g h ly e q u a l to n a s a re s u lt
p ro ve : Le t p d e n o te th e fra c tio n (n - 1 )/(N - 1). We o f a ve ry la rge va lu e o f S b e in g g e n e ra te d ;in s u c h ca s e s ,
h a ve X2 = s if a n d o n ly if s ~ (In U)/ln (1 - p) < s + 1, th e ru n n in g tim e o f th e re m a in d e r o f th e a lg o rith m will
wh ic h is e q u iva le n t to th e c o n d itio n (1 - p)5 _> U > (1 - be q u ite la rge , o n th e a ve ra g e u n le s s th e m o d ific a tio n is
p)~+l, a n d this o c c u rs with p ro b a b ility ga (s ) = p(1 - p)L us e d.
Th e fo llo win g le m m a s h o ws th a t (4-5) s a tis fie s re - Th e im p le m e n ta tio n s o f Alg o rith m D in th e Ap p e n -
q u ire m e n ts (4-1) a n d (4-2). dix us e a s lig h tly d iffe re n t m o d ific a tio n , in wh ic h a "Is
n _> a N? " te s t is d o n e a t th e s ta rt o f e a c h lo o p u n til th e
LEMMA 3.
te s t is tru e , a fte r wh ic h Alg o rith m A is c a lle d to finis h
The choice s g2(s ), c2, and h2(s ) in (4-5) s a tis fy the re lation
th e s a mpling. Th e re s u ltin g p ro g ra m is s im p le r th a n th e
h2(s ) -- f(s ) ~ c2g2(s ) firs t m o d ific a tio n , a n d it s till p ro te c ts a g a in s t wo rs t-c a s e
b e h a vio r.
PROOF
Th is p ro o f is a lo n g th e lin e s o f th e p ro o f o f Le m m a 2. 5 .2 Th e S p e c ia l Ca s e n -" 1
To p ro ve th e firs t in e q u a lity, we n o te th a t Th e s e c o n d m o d ific a tio n s p e e d s u p th e g e n e ra tio n o f S
n ( N - n ) ~- n ( N - n y wh e n o n ly o n e re c o rd re m a in s to b e s e le c te d .Th e ra n -
f(s } - ~ (N 1}~-<- -N \ N - 1 / d o m va rib le S (1, N) is u n ifo rm ly d is trib u te d a m o n g th e
in te g e rs 0 ~ s -< N - 1; th u s wh e n n = 1 we c a n
g e n e ra te S d ire c tly b y s e ttin g S := LNUJ , wh e re U is
n ~ N N ~ FJ - = c .x.(s ). u n ifo rm ly d is trib u te d o n th e u n it in te rva l. (The c a s e
U -- 1 h a p p e n s with z e ro p ro b a b ility s o wh e n we h a ve
Th e firs t in e q u a lity c a n be p ro ve d in th e s a m e wa y: U = 1, we c a n a s s ign S a rb itra rily.) Th is m o d ific a tio n
n (N -s -n + 1)s n (N -n ) ~ c a n be a p p lie d to a ll th e s a m p lin g a lg o rith m s d is c u s s e d
h.(s} = ~ N~ s - <- N ( N- - 1- ) -~- f( s ) . | in this pa pe r.
f nN if n < a N ; (Th e s ym b o l H, d e n o te s th e n th h a rm o n ic n u m b e r 1 +
V '(n , N) _< N - n + 1' (6-2) 1 /2 + . . - + 1 /n .) Th is c o m p le te s th e a rg u m e n t.
n, if n >_ a N.
PROOF 6 . 2 Av e ra g e E x e c u tio n Tim e T ( n , IV )
fo jo
if n2/N <_ fl, n < aN;
= cld4 (x + 1)gl(x) dx - d4 (x + 1)h~(x) dx.
d l+ n(1 + 1 +ln--(nn2/N!)(d2+da)+ dsn
Th e firs t in te g ra l is T(n, N) (6-7)
cld4(..~(Xl) + 1) = Cld4
N+n +l
n+l
+d 4 +1+6 (ln N + N ,
Th e d iffe re n c e o f th e two in te g ra ls is b o u n d e d b y 7 . E MP IR IC AL C O MP AR IS O N S
Alg o rith m s S , A, C, a n d D h a ve b e e n im p le m e n t e d in
3d4Q F O R TR AN 77 o n a n IBM 3081 m a in fra m e c o m p u te r in
w h ile n > 0 d o
b e g in
if N x R A N D O M ( ) < n t h e n
b e g in
S e le c t th e n e x t re c o rd in th e file fo r th e s a m p le ;
n :=n - 1
e nd
e ls e S k ip o v e r th e n e x t re c o rd (d o n o t in c lu d e it in th e s a m p le );
N :=N - 1
e nd;
to p : = N - orig_r~;
fo r n : = orig_r~ d o w n t o 2 do
b e g in
{ S t e p A1 }
V : = R A N D O M ( );
{ S t e p A2 }
S : = O;
quot : = to p ~ N ;
w h ile quot > V d o
b e g in
S : = S + 1;
top : = to p - 1;
N : = N - 1;
quot : = quot x t o p / N
e nd;
{ S t e p A3 }
S k ip o v e r th e n e x t S re c o rd s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le ;
N:=N-1
e nd;
{ S p e c ia l c a s e n = 1 }
S : = T R U N C ( N x R A N D O M ( )1;
S k ip o v e r th e n e x t S r e c o r d s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le ;
ALGORITHMA: The variablesV and quot have type real All other variables havetype integer.
lim it : = N - o r/g _ n + 1;
for n := o rig _ n d o w n t o 2 d o
be gin
{ S te p s C1 a n d C 2 }
m in _ X := lim it; ....
fo r m a lt := N d o w n t o lim it d o
be gin
X := m a lt x R A N D O M ( );
if X < m in _ X t h e n m in _ X := X
e nd;
S := T R U N C ( m in . . X ) ;
{ S te p C 3 }
S k ip o v e r th e n e x t S re c o rd s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le ;
N :=N - S - 1 ;
lim it := lim it - S
e nd;
{ S p e c ia l c a s e n = 1 }
s := TRUNC(N × RANDOM( ));
S k ip o v e r th e n e x t S re c o rd s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le ;
ALGORITHM C: The variables X and min_X have type real. All other variables have type integer.
V_prim e := E X P ( L O G ( R A N D O M ( ))/n );
q u a n tl := N - n + 1; q u a n t2 := q u a n tl / N ;
thre s hold := alpha_inve rs e × n;
w h ile (n > 1) a n d (th re s h o ld < N ) d o
b e g in
lo o p
{ S te p D2: G e n e ra te U a n d X }
lo o p
X := N × (1.0 - V_prim e );
S := T R U N C ( X ) ;
if S < q u a n tl t h e n b r e a k lo o p ;
V_prim e := E X P ( L O G ( R A N D O M ( ))/n )
e n d lo o p ;
y := R A N D O M ( )/q u a n t2 ; { U is th e va lu e re tu rn e d b y R A N D O M }
{ S te p D3: Ac c e p t? }
LHS := E ~ X P (LO G (y )/(n - 1));
R H S := ((q u a n tl - S ) / q u a n t l) x ( N / ( N - X));
ff LHS < R H S t h e n
b e g in { Ac c e p t S , s in c e U < h ( [X J ) / c g ( X ) }
V_prim e := L H S / R H S ;
b r e a k lo o p
e nd;
{ S te p D4: Ac c e p t? }
fin - 1 >S th e n
b e g in b o tto m := N - n; lim it := N - S e n d
e ls e b e g in b o tto m := N - S - 1; lim it := q u a n tl e n d ;
fo r top := N - 1 d o w n t o lim it d o
b e g in y := y × to p ~b o tto m ; b o tto m := b o tto m - 1 e n d ;
ff E X P ( L O G ( y ) / ( n - 1)) < N / ( N - X ) t h e n
b e g in { Ac c e p t S , s in c e U < f ( L X J ) / c g ( X ) }
V_prim e := E X P ( L O G ( R A N D O M ( ) ) / ( n - 1));
b r e a k lo o p
e nd;
V_prim e := E X P ( L O G ( R A N D O M ( ))/n )
e n d lo o p ;
{ S te p Db: S e le ct th e (S + 1)s t re c o rd }
S k ip o v e r th e n e xt S re c o rd s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le ;
N := N - S - 1 ; n :=n -1 ;
q u a n tl := q u a n tl - S ; q u a n t2 : - q u a n tl / N ;
thre s hold := thre s hold - alpha_inve rs e
e nd;
if n > 1 t h e n Call A lg o rith m A to finis h th e s a m p lin g
e ls e b e g in { S p e c ia l ca s e n = 1 }
S := T R U N C ( N × V_prim e );
S k ip o v e r th e n e x t S re c o rd s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le
e nd;
V_prim e := L O G ( R A N D O M ( ));
q u a n tl := N - n + 1;
thre s hold := alpha_inve rs e x n;
w h ile (n > 1) a n d (th re s h o ld < N ) d o
b e g in
q u a n t2 : : (q u a n tl - 1 ) / ( N - 1); q u a n t3 := LO G (q u a n t2 );
lo o p
{ S te p D2: G e n e ra te U a n d X }
lo o p
S := T R U N C ( V _ p rim e /q u a n t3 ); { X is e q u a l to S }
if S < q u a n tl t h e n b r e a k lo o p ;
V_prim e := L O G ( R A N D O M ( ) )
e n d lo o p ;
LHS := L O G ( R A N D O M ( )); { U is th e va lu e re tu rn e d b y R A N D O M }
{ S te p D3: Ac c e p t? }
R H S := S x (LO G ((q u a n tl - S ) / ( N - S )) - q u a n t3 );
if LHS < R H S t h e n
b e g in { Ac c e p t S , s ince U < h (LX J )/c g (X ) }
V_prim e := LHS - R HS ;
b r e a k lo o p
e nd;
{ S te p D4: Ac c e p t? }
y := 1.0;
ifn - l> S t h e n
b e g in b o tto m : : N - n; lim it := N - S e n d
e ls e b e g in b o tto m :-- N - S - 1; lim it := q u a n tl e n d ;
fo r top := N - 1 d o w n t o lim it d o
b e g in y := y x to p ~b o tto m ; b o tto m := b o tto m - 1 e n d ;
V_prim e : : L O G ( R A N D O M ( ));
if q u a n t3 < - ( L O G ( y ) + L H S ) / S t h e n
b r e a k lo o p { Ac c e p t S , s ince U < f ( L X J ) / c a ( X ) }
e n d lo o p ;
{ S te p Db: S e le ct th e (S + 1)s t re c o rd }
S k ip ove r th e n e x t S re c o rd s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le ;
N::N-S -1 ; n :-n -1 ;
q u a n tl := q u a n tl - S ;
thre s hold := t h re s h o ld - alpha_inve rs e
e nd;
if n > 1 t h e n Call A lg o rith m A to finis h th e s a m p lin g
e ls e b e g in { S p e c ia l ca s e n = 1 }
S := T R U N C ( N × R A N D O M ( ));
S k ip o v e r th e n e x t S re c o rd s a n d s e le c t th e fo llo w in g o n e fo r th e s a m p le
e nd;
C O R R IG E N D U M: Hu m a n A s p e c ts o f C o m p u tin g
Iz a k B e n b a s a ta n d Ya ir W a n d . C o m m a n d a b b r e v ia t io n b e h a v io r in h u m a n - c o m p u t e r in t e r a c t io n . C o m m u n . A C M 27,
4 (Ap r. 1 9 8 4 ), 3 7 6 -3 8 3 . P a g e 3 8 0 : T a b le II s h o u ld re a d :
Average Weighted
No. of Command No. of Percent Distribution of No. of
Characters Name Times Characters Used Characters Average
in Command Used Used for Group
1 2 3 4 5 6 7 8
4 VARY 86 5 7 3 85 3.69
4 RUSH 280 5 20 4 71 3.41
4 SORT 5 0 0 0 100 4.00
4 HELP 25 0 0 0 100 4.00
4 EXIT 12 0 25 0 75 3.50
4 STOP 3 0 0 0 100 4.00 3.52
5 POINT 442 27 4 17 1 51 3.46
5 ORDER 27 7 0 7 0 85 4.56
5 NAMES 28 0 0 7 0 93 4.86 3.60
6 SELECT 87 0 0 15 0 0 85 5.55
6 REPORT 596 0 0 62 0 0 37 4.09
6 CANCEL 35 0 0 14 0 0 86 5.57 4.34
7 COLUMNS 10 0 0 40 0 20 0 40 -- 5.00 5.00
8 QUANTITY 404 40 1 14 17 12 0 0 17 3.45
8 SIMULATE 520 1 0 88 0 0 0 0 11 3.51 3.48
• E x c l u d e s users w h o did not use abbreviations.
Pdf995 makes it easy and affordable to create professional-quality documents in the popular PDF file format. Its easy-to-use interface
helps you to create PDF files by simply selecting the "print" command from any application, creating documents which can be viewed
on any computer with a PDF viewer. Pdf995 supports network file saving, fast user switching on XP, Citrix/Terminal Server, custom
page sizes and large format printing. Pdf995 is a printer driver that works with any Postscript to PDF converter. The pdf995 printer
driver and a free Converter are available for easy download.
PdfEdit995 offers a wealth of additional functionality, such as: combining documents into a single PDF; automatic link insertion;
hierarchical bookmark insertion; PDF conversion to HTML or DOC (text only); integration with Word toolbar with automatic table of
contents and link generation; autoattach to email; stationery and stamping.
Signature995 offers state-of-the-art security and encryption to protect your documents and add digital signatures.
Automatic insertion of embedded links Option to attach PDFs to email after creation
Hierarchical Bookmarks Automatic text summarization of PDF
Support for Digital Signatures documents
Support for Triple DES encryption Easy integration with document management
Append and Delete PDF Pages and Workflow systems
Batch Print from Microsoft Office n-Up printing
Asian and Cyrillic fonts Automatic page numbering
Integration with Microsoft Word toolbar Simple Programmers Interface
PDF Stationery Option to automatically display PDFs after
Combining multiple PDF's into a single PDF creation
Three auto-name options to bypass Save As dialog Custom resizing of PDF output
Imposition of Draft/Confidential stamps Configurable Font embedding
Support for large format architectural printing Support for Citrix/Terminal Server
Convert PDF to JPEG, TIFF, BMP, PCX formats Support for Windows 2003 Server
Convert PDF to HTML and Word DOC conversion Easy PS to PDF processing
Convert PDF to text Specify PDF document properties
Automatic Table of Contents generation Control PDF opening mode
Support for XP Fast User Switching and multiple user Can be configured to add functionality to
sessions Acrobat Distiller
Standard PDF Encryption (restricted printing, modifying, Free: Creates PDFs without annoying
copying text and images) watermarks
Support for Optimized PDF Free: Fully functional, not a trial and does not
Support for custom page sizes expire
Over 5 million satisfied customers
Over 1000 Enterprise Customers worldwide
D
VRML become the standard language for interactive simulation within the World Wide
Web.
The first version of VRML allows for the creation of virtual worlds with limited
VE
interactive behavior. These worlds can contain objects which have hyperlinks to other
worlds, HTML documents or other valid MIME types. When the user selects an object
with a hyperlink, the appropriate MIME viewer is launched. When the user selects a link
to a VRML document from within a correctly configured WWW browser, a VRML
viewer is launched. Thus VRML viewers are the perfect companion applications to
standard WWW browsers for navigating and visualizing the Web. Future versions of
O
VRML will allow for richer behaviors, including animations, motion physics and real-
time multi-user interaction.
This document specifies the features and syntax of Version 1.0 of VRML.
R
The history of the development of the Internet has had three distinct phases; first, the
development of the TCP/IP infrastructure which allowed documents and data to be stored
in a proximally independent way; that is, Internet provided a layer of abstraction between
data sets and the hosts which manipulated them. While this abstraction was useful, it was
also confusing; without any clear sense of "what went where", access to Internet was
restricted to the class of sysops/net surfers who could maintain internal cognitive maps of
the data space.
A
Next, Tim Berners-Lee’s work at CERN, where he developed the hypermedia system
known as World Wide Web, added another layer of abstraction to the existing structure.
This abstraction provided an "addressing" scheme, a unique identifier (the Universal
Resource Locator), which could tell anyone "where to go and how to get there" for any
piece of data within the Web. While useful, it lacked dimensionality; there’s no there
there within the web, and the only type of navigation permissible (other than surfing) is
by direct reference. In other words, I can only tell you how to get to the VRML Forum
home page by saying, "http://www.wired.com/", which is not human-centered data. In
fact, I need to make an effort to remember it at all. So, while the World Wide Web
provides a retrieval mechanism to complement the existing storage mechanism, it leaves
a lot to be desired, particularly for human beings.
Finally, we move to "perceptualized" Internetworks, where the data has been sensualized,
that is, rendered sensually. If something is represented sensually, it is possible to make
sense of it. VRML is an attempt (how successful, only time and effort will tell) to place
D
humans at the center of the Internet, ordering its universe to our whims. In order to do
that, the most important single element is a standard that defines the particularities of
perception. Virtual Reality Modeling Language is that standard, designed to be a
universal description language for multi-participant simulations.
VE
These three phases, storage, retrieval, and perceptualization are analogous to the human
process of consciousness, as expressed in terms of semantics and cognitive science.
Events occur and are recorded (memory); inferences are drawn from memory
(associations), and from sets of related events, maps of the universe are created (cognitive
perception). What is important to remember is that the map is not the territory, and we
should avoid becoming trapped in any single representation or world-view. Although we
O
need to design to avoid disorientation, we should always push the envelope in the kinds
of experience we can bring into manifestation!
R
This document is the living proof of the success of a process that was committed to being
open and flexible, responsive to the needs of a growing Web community. Rather than re-
invent the wheel, we have adapted an existing specification (Open Inventor) as the basis
from which our own work can grow, saving years of design work and perhaps many
PP
mistakes. Now our real work can begin; that of rendering our noospheric space.
History
VRML was conceived in the spring of 1994 at the first annual World Wide Web
Conference in Geneva, Switzerland. Tim Berners-Lee and Dave Raggett organized a
A
Birds-of-a-Feather (BOF) session to discuss Virtual Reality interfaces to the World Wide
Web. Several BOF attendees described projects already underway to build three
dimensional graphical visualization tools which interoperate with the Web. Attendees
agreed on the need for these tools to have a common language for specifying 3D scene
description and WWW hyperlinks -- an analog of HTML for virtual reality. The term
Virtual Reality Markup Language (VRML) was coined, and the group resolved to begin
specification work after the conference. The word ’Markup’was later changed to
’Modeling’to reflect the graphical nature of VRML.
Shortly after the Geneva BOF session, the www-vrml mailing list was created to discuss
the development of a specification for the first version of VRML. The response to the list
invitation was overwhelming: within a week, there were over a thousand members. After
an initial settling-in period, list moderator Mark Pesce of Labyrinth Group announced his
intention to have a draft version of the specification ready by the WWW Fall 1994
conference, a mere five months away. There was general agreement on the list that, while
this schedule was aggressive, it was achievable provided that the requirements for the
D
first version were not too ambitious and that VRML could be adapted from an existing
solution. The list quickly agreed upon a set of requirements for the first version, and
began a search for technologies which could be adapted to fit the needs of VRML.
VE
The search for existing technologies turned up a several worthwhile candidates. After
much deliberation the list came to a consensus: the Open Inventor ASCII File Format
from Silicon Graphics, Inc. The Inventor File Format supports complete descriptions of
3D scenes with polygonally rendered objects, lighting, materials, ambient properties and
realism effects. A subset of the Inventor File Format, with extensions to support
networking, forms the basis of VRML. Gavin Bell of Silicon Graphics has adapted the
Inventor File Format for VRML, with design input from the mailing list. SGI has publicly
O
stated that the file format is available for use in the open market, and have contributed a
file format parser into the public domain to bootstrap VRML viewer development.
R
PP
A
A Graphical Representation of Inverse VRML Uptake
90
140 Programmers Artists
80
Technical Writers Musicians
120 QA Politicians
70
Other Dentists
100 60
D
80 50
40
60
30
VE 40
20
0
20
10
0
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
50
60
70
80
90
100
110
120
130
140
Days after download Days after download
O
Change the number in red below to adjust for download rate and/or bandwidth.
EANx EANx
fsw Air
CF Min 32% 36%
80.0 149.12 0
61.4 114.43 10
49.8 92.846 20
41.9 78.102 30 180
36.2 67.402 40 120
A
Adobe PDF is an ideal format for electronic document distribution as it overcomes the
problems commonly encountered with electronic file sharing.
• Anyone, anywhere can open a PDF file. All you need is the free Adobe Acrobat
Reader. Recipients of other file formats sometimes can't open files because they
don't have the applications used to create the documents.
• PDF files always display exactly as created, regardless of fonts, software, and
operating systems. Fonts, and graphics are not lost due to platform, software, and
version incompatibilities.
• The free Acrobat Reader is easy to download and can be freely distributed by
anyone.
• Compact PDF files are smaller than their source files and download a
page at a time for fast display on the Web.
I am ome random PDF file.