Further exploration of the klee-minty problem

DEPARTEMEN

ISSN:

MATEMATIKA

FMIPA - INSTITUT

PERTANIAN

C o m p a rfn g

O p tim ism

D iscrim in a n t

o t E rro r R a te E stIm a to fS

A n a lysis b y M o n te

o n M u ltlva rfa te


1412-677XjihgfedcbaZY

BOGaR

In

ca rto S im u la tio n

1

N o rm a l D a ta

I W a ya n M a n g ku NMLKJIHGFEDCBA

A la m a t R e d a k s f:
D e p a rte m e n M a te m a tik a

B ffu rka si
K a le ckl


F M IP A -/n s titu t P e rta n ia n B o g o r

JJn.

H o p t p a d a M o d e l S iklu s B isn ls K a ld o rT a n p a W a ktu T u n d a

N u rra ch m a w a ti

A K u sn a n to .
d a n ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA

13

M e ra llti, K a m p u s IP S
D ra m a g a -

Bogor

Pendugaan

B e rb e n tu k

Kom ponen

P e rfo d ik F u n g slln te n slta s

F u n g si P e rto d ik K a li T re n K u a d ra tik

S uatu P roses P o isso n N o n -H o m o g e n
R a m d a n l,

P h o n e jF a x :(0 2 6 1 )

P ., I vutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
W. M a n g ku , o e n R . B u d ia rti

19

8625276


f-m a rt: m a th @ lp b .a c J d

I

M a sa la h

D lrfch le t u n tu k P e tS a m a a n

HI

B e d a d a la m

iI/)
lll<

G m t T e rb o b o ti

\'H

Iff.


G a m a d l, A D . d a n
F u rth e r E xp lO ra tio n
B ib P a ru h u m

E.

K h a tJza

of

S ila la h i

th e K le e -M in ty

31

)!l"

41


~i
I
III

P ro b le m

Vol. 9, No.2, Desern bcr 2010

ISSN : 1412-677X

Journal of Mathematics and Its Applications

Jurnal Matematika dan Aplikasinya

PIMPINAN REDAKSI
Dr. Jaharuddin,

MS.


EDITOR
Dr. Ir. Sri Nurdiati, MSc.
Dr. Ir. Hadi Sumarno, MS.
Dr. Ir. I Wayan Mangku, MSc.
Dr. Ir. Endar H. Nugrahani, MS.
Dr. Paian Sianturi

ALAMA T REDAKSI:

Departemen Matematika
FM[PA - Institut Pertanian Bogor
Jln. Meranti, Kampus IPB Dramaga
Bogor
Phone.lFax: (0251) 8625276
I
Email:math@ipb.ac.idihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCB
jihg
I

i'


3T.ffl1!l merupakan

media

yang

mernuat

inforrnasi

hasil penelitian

terapan, bagi para matematikawan
atau para pengguna
nomor) setiap tahun (periode Juli dan Desember).

matematika.

matematika


baik

3TJill\!l diterbitkan

murni

maupun

dua kali (dua

Harga langganan per volume, termasuk biaya pos, Vo1.9, No, I dan 2:
Institusi/Perpustakaan
Rp. 350.000,- (dalam IPB), Rp. 500.000,- (luar IPB)
Staf/Perorangan
Rp. 200,000,- (dalam IPB), Rp.250.000,- (luar IPB)
Mahasiswa Rp. 75.000,Penulis makalah yang diterima dikenai biaya administrasi Rp.25.000,- per lernbar
Semua pembayaran

biaya dapat ditransfer


mclalui:

Retno Budiarti
BNI Cabang Bogor
No. Rek. 000291007-5

i' '

ISS
3f:ffl£l, vutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Vol. 9, No.2, Desember 2010

: 1412-677X

Journal of Mathematics and Its Applications

Jurnal Matematika dan Aplikasinya

1:1

(I

ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA

D A FTA R IS I

III,
1 '

C o m p a rin g

of E rro r R a te E stim a to rs

O p tim ism

D iscrim in a n t

A n a lysis

on M u ltiva ria te

b y M o n te

N o rm a l

in

C a rlo S im u la tio n

1

D a ta

I W ayan M a n g ku
B ifu rka si

H o p f p a d a M o d e l S iklu s B isn is K a ld o r-

K a /e cki T a n p a W a ktu T u n d a
N u rra ch m a w a ti
Pendugaan
B e rb e n tu k

13

A. K u sn a n to .

dan

Kom ponen

P e rio d ik F u n g si In te n sita s

F u n g si P e rio d ik

K a li T re n K u a d ra tik

S uatu P ro se s P o isso n N o n -H o m o g e n
R a m d a n i,
M a sa la h

P ., I

W. M a n g ku , d a n R . B u d ia rti

D irich le t

I':

G raf T e rb o b o ti

!I

G a rn a d i, A .D . d a n

u n tu k

19

P ersam aan B e d a d a /a m

31

E. K h a tiza

.i. \

F u rth e r

E xp lo ra tio n

B ib P a ru h u m

of th e K le e -M in ty

S ila /a h i

P ro b le m

41

FURTHER EXPLORATION OF
THE KLEE-MINTY PROBLEM.
am PARUHUM SILALAHI

Faculty
Jl. Meranti,

Department
of Mathematics,
of Mathematics
and Natural Sciences,
Bogar Agricultural
University

Kampus

IPB Darmaga,

Bogar,

16680 Indonesia

I
ABSTRACT.
The Klee-Minty problem is explored in this paper.
The coordinates formulas of all vertices of the Klee-Minty cube
are presented.
The subset representation of the vertices of the
Klee-Minty cube is discussed. How to construct the Klee-Minty
path is showed. It turns out that there are rich structures in the
Klee-Minty path. We explore these structures.edcbaZYXWVUTSRQPONMLKJIHGFEDCBA
K e y w o r d s : Klee-Minty cube, Klee-Minty path, Klee-Minty problem.ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA

1. INTRODUCTION

The Klee-Minty (KM) problem is a problem that had been presented
by Klee and Minty in [3J. The n-dimensional KM problem is given by:
mm
subject to

Yn
P Y k -l

~

Yk ~

1-

P Y k - l,

k

= 1, ... , n ,

(1)

wherejihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
P is small positive number by which the unit cube [O,lJn
is
squashed, and Y o = O. The domain (we denote as en), which is called
KM-cube, is a perturbation of the unit cube in R". If p = 0 then
the domain is the unit cube and for p E (O,~) it is a perturbation
of the unit cube which is contained in the unit cube itself. Since the
perturbation is small, the domain has the same number of vertices as
the unit cube, i.e. 2 n .
The KM-problem has become famous because Klee and Minty found
a pivoting rule such that the simplex method requires 2 n - 1 iterations
to solve the problem (1).
1 - Y k -l
In this paper, we explore the KM problem further. We provides formulas for the coordinates of all vertices of the KM cube, and discuss
the subset representation of the vertices of the KM cube. Then we
Y k -l

~

Yk ~

41

\'

42ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
B lB P A I1 U H U d S fL A L A fll vutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLK

describe the KM path.jihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
V.,Te show that when using the subset representation, the KM path can easily be constructed by using the so-called
flip p in g operation.
It, turns out that there are rich structures in the
KM path. We explore these structures.
2.

VERTICES

OF THE KLEE-MINTY

CUBE

With the n-dimensional EM problem as defined in (1), we define the
slack vectors 2.. andedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
S according to
2 ..k = Y k - P Y k - l,

k = l,

,n ,

(2)

s k = l- Y k - P Y k - l,

k = l,

,n .

(3)

For any vertex of the KM cube we have either Q .k = 0 or Sk = 0, for each
k . As a consequence,
each vertex can be characterized by the subset
of the index set J= {I, 2, ... , n } consisting of the indices k for which
S k vanishes (and hence 2 ..k is positive).
Therefore, given a vertex v we
define
S; = {k
: S k = O} == { k : 2 ..k > O} .
Note that the KM cube has 2 n vertices. Since 2 n is also the number
of subsets of the index set J, each subset S of the index set uniquely
determines a vertex. We denote this vertex as v S . Given S , the coordinates of v S in the y-space can easily be solved from (2) and (3),
because we then have S k = 0 if k E Sand Q .k = 0 if k ~ S , which yields
n equations in the entries of the vector y. When defining Y o = 0 and
S
y = v , one easily deduces that.
l - P Y k - l,
Yk

= {

kE S,

k

P Y k - L,

d
'F

(4 )

S.

Since Y o = 0, we have Y1 E {O,I}. This together with (4) implies that
Y k is a polynomial in P whose degree is at most k - 1. Moreover, the
coefficients of this polynomial take only the values 0, 1 and -1 , and
the nonzero coefficients alternate between 1 and -1. Finally if Y k = 1= 0
then the lowest degree t.erm has coefficient I.
'vVecan be more specific. Let
S = {81' 82, ...

80 =

, 8 m },

0 <

81

<

82

< ... <

8m

<

8 m +1 :=

n + l.

Then the entries of yare given by the following lemma. In this lemma
we define an empty sum to be equal to zero.
Lemma 1.

O ne has

YS;

=

L ( - l ) ,+ J p - " - s ) ,

0:::; i:::; m,

(5)

j= 1

and
k ~ S.

(6)

JMA,

9.jihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
N O .2 , DESEMJ3ER, 201.0, 41-53
43

VOL.

tt

P ro o]. If k
S then the definition of S implies thatedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
S i ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
< k < S i + 1 for
some i, with 0 ~ i ~ m. It follows from (4) that in that case
_
-

Yk

P Y k -l

_
-

_
.

t



P

-

k -s i-1

_
-

Y s i+ l

k= s ;

P

Y S il

proving (6).
So it remains to prove (5). The proof uses induction with respect to
the index i in (5). Before entering this proof it may be worth noting
that (5) expresses Y S i as a polynomial in P of degree s , - S l . The lowest
degree term occurs for j = i , and hence this term equals (-1 )2i p O = 1.
For i = 0 the sum in (5) becomes empty, whence we obtain Y o = 0,
as it should. This proves that (5) holds if i = O. Now assume that (5)
holds for some i, with 0 ~ i < m. Since S i + l E S , according to (4) we
have
= 1-

Y S i+ l

(7)

P Y S i+ l-l.

At this stage we need to distinguish two cases: S i + l - 1 E S (case I)
and S i + l - 1 S (case II).
In case I we must have S i + l -1 = s . . Since (5) holds for Y S i it follows
from (7) that

tt

.
Y S,+I

=

1 - py s, , = 1 -

f)

(_ l)i+ jp S i-S j

,\,i,

r - L ....J = 1

= 1 - L ~ = l(

= 1+

-l)i+ j

p S i+ l-s j

L ~ = 1 ( -1 )i+l+ j

p S i+ I-S j

.

In case II we may use (6), which gives
,
_
Y 8,+1 1

=

p S i+ l-l-s iy

=

,\,i,
L ....J = 1

,

s,

(_ l)i+ j

=
P

p S i+ I-1 -s i

S i+ l-l-S j

,\,i,

L....J=l

(_ l)i+ jp s i-S j

I

,

I

whence (7) yields that
Y S i+ 1

=

1-

P 2 ~ )_ 1 )i+ jp S i+ l-l-S j

=

1+

j
I)_ l)i+ l+ p s i+ I-S j.

j= 1

j= 1

We conclude that in both cases we have
i+l

i

Y S i-j-1

=

1+

I)

_ 1 )i+ 1 + j

p S i+ I-S j

=

j= 1

I)

_ 1 )i+ 1 + j

,

j= l

o

which completes the proof.
3. THE

p S i+ I-S j

KLEE-MINTY

PATH

As already mentioned previously, Klee and Minty found a pivoting
rule such that the simplex method requires 2 n -1 iterations to solve the
problem (1). This implies that the method passes through all vertices
of the KM cube before finding the optimal vertex (which is of course
the zero vector). We call this path along all vertices the KM path. It

is well known in which order the vertices are visited. This can be easily
described by using the subset representation of the vertices introduced
in the previous section. The. path starts at vertex (0, ... ,0,1) whose
S 1 ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
= {n }. Thesubsequent
subsets are obtained by
subset is the subsetjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
an operation which we call flip p in g · an index with respect to a subset
S [4]. Given a subset S and an index i, flipping i (with respect to S )
means that we add i to S if i t/:. S , and remove i from S if i E S . Now
let S k denote the subset corresponding to the k-th vertex on the KM
path. Then S k+l is obtained from S k as follows:
• if ISkl is odd, then flip 1;
• if ISkl is even, then flip the element. following the smallest eleS i:
ment inedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Denoting the resulting sequence as P n , we can now easily construct
KM path for small values of n :
P 1:

{I} - t 0

P

{2}
{3}
{4}

2:

P 3:

P4:

-t

{1,2} -7 {I} - t 0
- t {I, 3} -7 {I, 2,3} - t {2, 3}
-t {1,4} -t {I,2,4} -7 {2,4}
{1,3,4} -t {3,4} -t P 3 .

the

-t

-7 P 2

-7

{2,3,4}

Table 1 shows the subsets and the corresponding
KM path for n = 4. The corresponding tables for n
subtables, as indicated. Note that if subsets S a n d
and y = vs and y ' = V S ', then we have
Yi

=

y~ ,

1~ i

<

n,



+

Y :l

=

-t

{1,2,3,4}

vectors y for the
= 2 and n = 3 are
S ' differ only in n ,
L

Obviously, the subsets of two subsequent vertices differ only in one
element. For the corresponding subsets, S k and S k+l say, we denote
this element by i k . Then we have S i k = 0 in one of these vertices, and
in the other vertex S i > 0, or equivalently § .i k = O. On the interior of
the edge connecting these two vertices we will have § .i k > 0 and S i k > O.
If n = 4 then, when following the KM path, the flipping index i k runs
through the following sequence:
k

1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1.
So if n = 4 then the flipping index 8 times equals 1, 4 times 2, 2 times
3, and once 4.
Table 2 shows the slack vector §. and Table 3 the slack vector S [or
each of the vertices. For a graphical illustration (with n = 3) we refer
to Figure 1.
4. S E Q U E N C E O F V E R T IC E S IN T H E K L E E -M IN T Y
PATH
One easily observes that for n E {2, 3, 4}, the second half of P n is
just P n - 1 whereas the first half of P n arises by reversing the order of the
sequence P n - 1 and adding the element n to each sets in the resulting

JMA,
r--.

VOL. 9, NO.2, DESEtvIBER,

2010, 41-53

edcbaZYXWVUTSRQPONMLKJIHGFEDCBA
S vutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Yi
Y2
Y3
{4}
0
0
0

{1,4}
{1,2,4}
{2,4}
{2,3,4}
{1,2,3,4}
{1,3,4}
{3,4}
{3}
{1,3}
{1,2,3}
{2,3}
{2}
{1,2}
{I}

0

45

,,

Y4
1

1 _ p3
p _ p2
1 - p2 + p3
I- p
1 _ p2
1
0
P
1 _ P + p2
1 -p
1
0
1 _ p + p2 _ p3
] _ p + p2
1- p
1
1 _ p2
1 - (J + p 3
1jihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
p
I-p
0
0
1
0
1
0
P
1
_
p
2
P
_
p3
p
1
1 _ p + p2
P _ p2 + p3
I-p
1
P _ p2
1
0
1- P
p2
1
p
0
p2 _ p3
p _ p2
1 -p
1
3
p2
1
p
P
1
1

0

,p

0

TABLE L The KM path

p2

0
(in the v-space)

0
for n

= 4.

P::-l

we have
sequence.
Hence, when denoting the first half of P n as
for n E {2, 3, 4} that P n = P ::- 1 ---t P n - 1 . Indeed, when defining P o = 0
then this pattern holds for each n ~ 1, as stated in the following lemma.
Lemma

2. fO T' n ~ 1, o n e h a s
(8)

P r o o f . The proof uses induction
with respect to n . We already know
that the lemma holds if n ~ 4. Therefore, (8) holds if n = 1. Suppose
that n ~ 2. Let S k denote the k - t h subset in the sequence P n - 1 . By
the induction hypothesis
we have S1 = { n - I} and S2n-J = 0. The
For 2 ~ k ~ 2n-t, we
first set in P n is the set {n} = {n} U S2n-J.
consider the set S = S k U {n} and we show below that its successor
This will imply that the 2n-l_th set in P n is
is the set S k-l U {n}.
S1 U { n } = { n - 1, n } , whose successor is the set { n - I}, the first set
of P n - 1. This makes clear that it suffices for the proof of the lemma if
we show that for each set S k in P n - 1 the successor of S k U {n} is the
set S k-1 U {n}. This can be shown as follows.
If ISI is even then the successor of S in P n arises by flipping the
element following the smallest element in S . If this smallest element
equals n -1 then we must have S = { n - 1, n } , and then the successor

B IB l'A IW H U I\l

S IL 1 \L A H I jihgfedcbaZYXWVUTSRQPONMLKJIHGFEDC

S edcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Q1
S2
~

~

0
{4}vutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
0
0
1
] - 2p3
{1,4}
1
0
0
{l,2,4}
1 - 2p
1
1 - 2p2 + 2p3
0
{2,4}
0
1
12p2
0
{2,3,4}
0
1
1- 2p
1 - 2p + 2p2
{1,2,3,4}
12p
1
1 - 2p + 2p2 1 - 2p + 2p2 - 2p3
1 - 2p2
{1,3,4}
1
0
1 - 2p + 2p3
{3,4}
0
0
1
1 - 2p
0
{3}
a
1
0
1 - 2p2
1
{1,3}
a
0
{1,2,3}
1
1 - 2p 1 - 2p + 2p2
0
{2,3}
0
1
1 - 2p
0
0
1
{2}
0
0
{l,2}
1
12p
0
0

{I}

1

0

0

0

0

0

0

0

0

TABLE 2. The KM path (in the s-space) for

n

= 4.

of S is the set { n - 1} = S l, which is the first element of P n - 1 . Otherwise the smallest element is at most n - 2, and then, since ISkl is odd,
the successor of S is equal to S k-l U {n }. The latter follows since S
and S k-1 have the same smallest element and ISk-ll is even.
If ISI is odd then the successor of S in P ; arises by flipping l. Since
ISkl is even flipping 1 yields the predecessor of S k in P n - 1 , which is
S k-1 ' Hence we find again that the successor of S is S k - l U {n}. This
completes the proof.
0
According to this lemma, the index i that occurs K times as flipping
index in P n - 1 will occur 2 K times in P n , i.e. K times in
and K
times in P n - 1 . The index n flips only at the last set in P ::- 1 , which gives
the first set in P n - 1 . These sets are { n -l,n}
\ {OJ and { n -I} \ {O}
respectively. The complement operation of {OJ is applied to adjust
for the case where n = l. As an immediate consequence we have the
following corollary.

P::-1

Corollary
It flip s fo r
w h ic h y ie ld s

1.

T h e i n d e x i, 1 ~ i ~ T L , n e v e r f l i p s

th e fir s t
th e s e t

tim e

in P i w h e n

a p p lie d to th e s e t

0 S; k < i.

{i - 1, i} \ {O}

J

{i - I} \ {O} .

From Lemma 2, for 0 ~ i <
P; :

in P i, fo r

-n

P n -1

--1

n,

we can obtain

-n -l

P n -2

--1 ...

--1

-i+ 1

Pi

--1

P i'

(9)

JMA, VOL. 9, NO.2, DESEMBER,

47jihgfedcbaZYXWVUTSRQPONMLK

2010, 41-53

.54
.5ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
83
82
1

S

0

1 - 2p2
0
I - edcbaZYXWVUTSRQPONMLKJIHGFEDCBA
2p

0

{1,2,4}
{2,4}
{2,3,4}
{1,2,3,4}
{1,3,4}
{3,4}
{3}
{1,3}
{1,2,3}
{2,3}

1

1

1

{4}
{l,4}

0

0

1
1

0

1-

1-

1-

2p

1
1

1
1
0

1-

2p

a

a
0

{2}

1
1

{1,2}

0

0

{I}

a

(/)

1

0
1-

0

2p2

a
a
a

2p

a
a
a
a
a
a
a
a

a
a

a
a

+

2p

1-

0

a
1-

11-

+

1-

2p

1-

+

2p3

2p2

2p2

+

2p2

1-

2p3

2p3

1

3. The KM path (in the s-space) for

TABLE

2p3

2p2 -

1-

1

1

+

2p

2p

2p

1 - 2p + 2p2
1 - 2p2

2p

2p

n

= 4.

According to Corollary 1, index i is flipped for the first time in
hence we have the next corollary.

P i,

Corollary

set

2.

The

{i - l,i} \ {a},

i flip s

in d e x

w h ic h

y ie ld s

fo r

th e

th e

la s t

tim e

in

Pn

at

th e

{i - I} \ {O}.

set

The sequence P::-1 is equal to the sequence which is obtained by
reversing the sequence
-n -1

P n -2

--t

...

--t

p -H 1
i
--t

p

i

and by adding the element n to each sets in the resulting sequence.
Thus the next corollary follows.
Corollary

{i - 1 ,n }

3.
\

The

{a},

in d e x

w h ic h

i flip s

y ie ld s

th e

JO T

set

th e

first

{i - 1 ,i ,n }

Moreover, by letting J , be any subset of
following corollary.
Corollary

4.

The

in d e x

i flip s

{i-l,i}\{O}UJi

in

Pn
or

w hen

tim e
\

J\

in

Pn

at

th e

set

{a}.

{I, ... ,i}, we have the

it is a p p lie d

to

e ith e r

{i-l}\{O}UJi.

P r o o f . Let us consider P n as in (9). The flipping indexes of two sets that
connecting two sequences of sets consecutively are n , n -1 , ... , i + 1 . In

.w

................•••••••••••

SILALAHIedcbaZYXWVUTSRQPONMLKJIHGFEDCBA

BIB PARUHUM

48

Y3

{3}
• 1

---~~-ihgfedcbaZYXWVUTSRQPONMLK
/

"

/"
/~~ ~ ,.:t' J --'-:-- - - - 1 - - - - - - - - '/" '- 1 '
/
y
1

I-p + p



1

'"'"

~SL---:"~1{2,3}

..

~t

.-

_""::::0...,.,-

I-p

"

/

I //
-1 /

1

1. Unit cube (red dashed),
dashed) and KM path (blue solid) for

FIGURE

KM cube
n = 3.

(blue

this case there is no index which is equal to i . In P i , flipping an index i
is only applied to the set {i - 1, i}\ {O} which yield the set {i - 1} \ {O}.
Let us call the pair of two sets, where an index i is flipped with respect
to one of the sets and another one is its successor, as pair of sets with
flipping index i. Generally, the pairs of sets with flipping index i that
appear in p;+1, k ~ i, definitely equal to pairs of sets which is resulted
from the union of each set of pair of sets with flipping index i in P k by
{k + 1}. By taking J , as any subset of :1\ {1, ... , i}, we obtain that
the pairs of sets with flipping index i in P n are {i - 1, i} \ {O} U J , and
{i - 1} \ {O} U J ; This implies the corollary.
0
The following corollary expresses how many times the index i is
Ripped in P n .
\Ve have discussed this number for small value of n

·1

previously.
III

Lemma 3.

T h e in d e x

i, 1 ~ i ~ n ,

2n - i

is flip p e d

tim e s .

in P n e x a c tly

.JMA,

VOL.

9, NO.2,

I)J:;SCMDEH,

49edcbaZYXWVUTSRQPONMLKJIHGF

20JO, -11-5:3

The index n is Hipped only 1 time injihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
P n . By using the recursive
pattern of P n as in Lemma.2 and Coronary 1, in P n , the index
P r o o f.

n -

1 , is flipped 2 times,
2, is flipped 4 times,

n -

k ,

n -

1

is flipped 2k times,

, is flipped

2 11 - 1

times.

The lemma follows by takingihgfedcbaZYXWVUTSRQPONMLKJIHGF
i = ti - k ,
0
When n is given, the set S k is uniquely determined by k, and vice
versa. Moreover, for each k (2 ~ k : ~ 211), the sets S k - l and S k
differ only in one element. This means that the sequence P n defines
a so-called G r a y c o d e . Such codes have been studied thoroughly, also
because of their many applications. 1 It may be worth mentioning some
results from the literature that make the one-to-one correspondence
between k and S k more explicit. The next proposition is the main
result (Theorem 6(ii)) in [1].2
Proposition

1 . O n e h a s i E S k if a n d

l

n

2

-

2i

k

1J

o n ly

+ 2 mod 2

if

=

(10)

1.

Given k, by computing the left-hand side expression in (10) for i =
1,2, ... , n we get the set S k . Conversely, when S k is given we can
find k (also in ti iterations) by using Corollary 24 in [1]. This goes as
follows. V \Te first form the binary representation b .; ... b 2 b l of S k , with
b , = 1 if i E S k and b , = a otherwise. We then replace b , by a if the
number of 1's in b ., ... b 2 b 1 to the left of b , (including b , itself) is even,
and by 1 if this number is odd. The resulting binary n-word a n · .. a 2 a l
is the binary representation of some natural number, let it be K. Then
n
k = 2 - K. For example, let S k = {2,3} and n = 4. Then
Sk

==

bn·

..

b2b1

=

0110

-t

a n ...

a2al

=

0100 == 4

-t

k

=

24 - 4

=

12,

which is in accordance with Table 1.
lCray codes were first designed to speed up telegraphy, but now have numerous
applications such as in addressing microprocessors, hashing algorithms, distributed
systems, detecting/correcting
channel noise and in solving problems such as the
Towers of Hanoi, Chinese Ring and Brain and Spinout.
2Jt simplifies an earlier result ill 12], 118111ely

Jl

13IB P;\ RU H edcbaZYXWVUTSRQPONMLKJIHGFEDCBA
U l'v [ SlLA LAHIihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA

50

5. EDGES OF

T H E K L E E -M IN T Y

PATH

An edge of the KM path in e n is a line segment connecting tw o
consecutive vertices of the KM path. As before, we represent the k-th
S k and
vertex on the KM path by the set S i : The edge connectingjihgfedcbaZYXWVUTSRQPONMLKJIHGFE
S k+1 is denoted as e k . The set of all edges of the n-dimensional K M
path, denoted by E n , is therefore given by
2"-1

En

=

U

ek·

(1 1 )

k=l

Remember that S k and S k+1 differ only in one element, which we denote
as i k . On the interior of the edge connecting these two vertices we have
§ .i k
> 0 and 5 i k > O. For any j = 1= i k , we have s , = 0 if j E S k n S k+1
and § 'j = 0 otherwise. So it follows that if j = 1= i k then either § 'j = 0 on
e k or 5 j = 0 on e k .
For i k = 1= 1, we have either §.1 = 0 or 51 = 0, which implies either
Y 1 = 0 or Y 1 = 1 on e k .
Since for any j < i k we have either § 'j = 0 or
5 j = 0 on e k , we may conclude that Y j is constant on e k · Summarizing,
we may state that on e k we have the following properties:
(i) u , > 0 or s ., > 0,
j = 1= i k : 5 j = 0 or § 'j = 0,
1 ~ j < i k : Y j is constant.
Table 4 and Table 5 shows the slack vector §. and 5 on
The subtables show §. and 5 for n = 1, n = 2 and n = 3.

(ii)
(iii)

We therefore can describe the edge e k as follows
ek
= {y E en : for any j = 1= ik, S j = 0 if j E S knS k+1,

e

§ 'j

k for

=

n

=

4.

0 otherwise}.

Or, in other words, since

s, U

n S k+1) U {id ,

S k+1 = (S I,;

we may write

,

Further elaborating

5j

{

en :
= 0 if j E
= 0 if j tJ.

}

E

y

ek =

§ 'j

n S k+l,
S k U S k+1
Sk

(12)

.

(iii) we get the following lemma.

I'
M

Lemma
j < ik

4.
O T I-e

Let

il,;

b e th e flip p in g

e le m e n t

/0 1 '

has
Yj

=

I, j = i k - I,
{ 0, o t h e r w i s e .

S kI

th e n

o n er. [or

1 <

§.J
§.l
§.2
EdgeihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA

{4} - {1,4}

(0, 1)

{1,4} - {1,2,4}

1

(0,1 -

{1,2,4} - {2,4}

(0, 1)

{2,4} - {2,3,4}

0

{2,3,4} - {1,2,3,4}

(0, 1)

( 1 - 2 p ,1 )

(1 -

1

( 0 ,1 - 2 p )

(1 -

{1,2,3,4}

- {1,3,4}

{1,3,4} - {3,4}

(0, 1)

0

~

0edcbaZYXWVUTSRQPONMLKJIHGFEDCBA
( 1 - 2 p 3 ,1 )
0

(1 -

2p2

( 1 - 2 p ,1 )

0

(1 -

2p2,

1

(0,1 -

2p)

0

2p,
2p
(1 -

1-

+

(1 -

2p)
2p

2p2,
2p2,

+
1-

2p2)
2p2)

(1 -

2p

(1 -

2p

1)

+
+

(1 -

2p

+

2p3,

1-

+

2p2 -

2p3,

2p3,

1-

2p

2p,

1-

2p

0

0

1

( 0 ,1 - 2 p )

{3} - {1,3}

(0, 1)

0

( 1 - 2 p 2 ,1 )

0

{1,3} - {I, 2, 3}
{l,2,3}

- {2,3}

1
(0,1)

{2, 3} - {2}

0

{2} - {I, 2}

(0, 1)

(0,1-2p)

(1 -

( 1 - 2 p ,1 )

0

( 1 - 2 p + 2 p 2 ,1 - 2 p 2 )
2p,

1-

2p

+

0

2p2)

2p2

2p2,

{3, 4} - {3}

1

( 0 ,1 - 2 p )

0

( 1 - 2 p ,1 )

0

0

1-

2p3)

+

'-

:s:
::t>

2p3)

<

1-

2p2)

1-

2p

+
+

2p2 2p3)

+

o
r.2p2)
2p3)

e:

z

o
tv
G

l':
u:
L-J

'7

w

t!

r:
,,,,;,

o
c

"'""
,
G'

{1,2}-{1}

{I} - 0

1

(0, 1)
TABLE

(0,1 0

2p)

c...:

0

0

0

0

4. Edges of the KM path (in s-space) for

n =

4.

~

I,

Edge

{4} - {1,4}
{1,4} - {1,2,4}
{1,2,4} - {2,4}
{2,4} - {2,3,4}
{2,3,4} - {1,2,3,4}
{1,2,3,4}- {1,3,4}
{1,3,4} - {3,4}
{3,4} - {3}
{3} - {1,3}
{1,3} - {1,2,3}
{1,2,3} - {2,3}
{2,3} - {2}
{2} - {1,2}
{1,2} - {I}

{l}-0

81

82

83

11 - 2 p 2 , 1)
( 1 - 2 p ,l)
(0,1)edcbaZYXWVUTSRQPONMLKJIHGFEDCBA
(1 - 2 p + 2 p 2 ,l2p2)
( O ,l- 2 p )
0
(1 - 2 p , 1 - 2 p + 2 p 2 )
(0,1)
0
1
( O ,l- 2 p )
0
0
(0,1)
0
(
O
,l2
p
)
0
0
(0,1) ( 1 - 2 p ,l)
0
1
1
0
(0,1) ( 1 - 2 p ,l)
0
( O ,l- 2 p )
0
0
0
0
(0,1)
1
0
( 0 ,1 - 2 p )
(1 - 2 p , 1 - 2 p + 2 p 2 )
0
(0,1)
2p2)
( O ,l- 2 p )
(1 - 2 p 2 p 2 ,l0
(1- 2 p 2 ,l)
(0,1) ( 1 - 2 p ,l)
TABLE

84

0
0
0
0
0
0
0
( O ,l- 2 p )

(1 - 2 p , 1 - 2 p + 2 p 3 )
(1- 2 p + 2 p 3 , 1 - 2 p + 2 p 2 - 2 p 3 )
(1- 2 p + 2 p 2 - 2 p 3 , 1 - 2 p + 2 p 2 )
(1 - 2 p + 2 p 2 , 1 - 2 p 2 )
(1- 2 p 2 , 1 - 2 p 2 + 2 p 3 )
(1 2p2 + 2p3, 1 - 2p3)
(1 - 2 p 3 , 1)

5. Edges of the KivI path (in 8-space) for n = 4.

vu

J1\'lA, VOL. 9, NO.2,

DESEI'vfBER,

2010, 41-53

53edcbaZYXWVUTSRQPONMLKJIHG

The only different element injihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
S k and S k+ 1 definitely is the index
i k that we flip in the set,sk' According to Corollary 4, the only different
element i k happens in pair of sets { i k - 1, id \ {O} U s .; and { i k - I} \
{O}ihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
U J ik , where J ik is any subset of :1\ {I, ... , id . This means that
on the edge connecting S k and S k+ l we have
P r o o f.

.§.l

= 0,

.§.2

= 0, ... , . § . i k - 2 = 0,

S ik -l

= O.

From s, = 0 we get YI = O. Then subsequently we get Y 2 = 0, ... , Y i k - 2 =
Y ik -l
= 1 from .§.2 = 0, ... , . § . i k - 2 = 0, S i k - l = 0, which proves the
0
lemma.
One may use Table 1 to verify Lemma 4 for n ~ 4.

0,

REFERENCES
[1] M.W. Bunder, K.P. Tognetti, and G.E. Wheeler. On binary reflected Gray codes
and functions. D i s c r e t e M a t h e m a t i c s , 308: 1690-1700, 2008.
[2] M. Conder. Explicit definition of the binary reflected Gray codes. D i s c r e t e M a i h e m a t i c s , 195:245-249, 1999.
[3] V. Klee and G.J. Minty. How good is the simplex algorithm? In I n e q u a l i t i e s ,
III { P r o c . T h i r d S y m p o s ., U n i v . C a l i f o r n i a , L o s A n g e l e s , C a l i f ., 1969; d e d i c a t e d
to th e m e m o r y
o f T h e o d o r e S. M o t z k i n ) ,
pages 159-175. Academic Press, New
York, 1972.
[4] C. Roos. An exponential example for Terlaky's pivoting rule for the criss-cross
simplex method. M a t h e m a t i c a l P r o g r a m m i n g , 46:79-84, 1990.