l ¦C£ t© £ lB¥ C! j

5 „5§

¡¢

£

¢

The algorithm that achieves this is the following.

¦

‘

˜h¤ v ¢

¡¦ ¦

PT£&@©¢Q BC4PR 7 YCTQ ¢

7 © 4CDA Y8 ¡ ¥ HFDV8

5 ¢ § 76C@

DE 6 DQ S @ 6 D D S 8 D 5E

5

0 (%&$

'#

) 2

1 3

T

¬ XW

1. Choose two vectors such that .

¥( ¦ ¥( ¦

W W ¥ $! X W y

¬ g

¬

2. Set , Y!¦

S Y

T

W (( W

v

¬

3. For Do: !#V˜™(

Xu u y

§¬

u

4. ¥( © ¦

² ² §¬

u¦ u©

u¦u

u¦uS

5. ¦

W ¥ “u X u¥T

W"U u ¥² ² §¬ u ¥u u

6. £¥¢ X

W “u

T

’U u X

W

¬ ¬

W 0 X "U u ¥ ( "U u ¦ 0

7. . If Stop

X Y`

"U u S

W uX W u ¥(W u ¦ "U

W

¬

8.

"U u ¥

W ’U u – "U u ¥

SW

W

’U

W

¬

9.

’U u ¦

W "U u X "U u ¦

W

W

¬

10.

"U

W W"U

W"U

11. EndDo

X

u u r(

Note that there are numerous ways to choose the scalars in lines 7 and 8. S

T "U u ¦

W u ¥ "U

W

These two parameters are scaling factors for the two vectors and and can be

¬ X "U u ¥ ( "U u ¦ W"U W"U

selected in any manner to ensure that . As a result of lines 9 and 10 of the

WTW

( uy S uX

algorithm, it is only necessary to choose two scalars that satisfy the equality

X ’U u

W "U

W R±w°q ®

i

¥( u¦ ¬ u S u

X

’U "UW

W

"U

W

W"U

The choice taken in the above algorithm scales the two vectors so that they are divided

by two scalars which have the same modulus. Both vectors can also be scaled by their

u¦ u¥

2-norms. In that case, the inner product of and is no longer equal to 1 and the

"U

W "U

W

algorithm must be modi¬ed accordingly; see Exercise 3.

uX u r(

Consider the case where the pair of scalars is any pair that satis¬es the S

’U

W "U