<s>
In	O
mathematics	O
,	O
the	O
Bareiss	B-Algorithm
algorithm	I-Algorithm
,	O
named	O
after	O
Erwin	O
Bareiss	O
,	O
is	O
an	O
algorithm	O
to	O
calculate	O
the	O
determinant	O
or	O
the	O
echelon	O
form	O
of	O
a	O
matrix	B-Architecture
with	O
integer	O
entries	O
using	O
only	O
integer	O
arithmetic	O
;	O
any	O
divisions	O
that	O
are	O
performed	O
are	O
guaranteed	O
to	O
be	O
exact	O
(	O
there	O
is	O
no	O
remainder	O
)	O
.	O
</s>
<s>
The	O
general	O
Bareiss	B-Algorithm
algorithm	I-Algorithm
is	O
distinct	O
from	O
the	O
Bareiss	B-Algorithm
algorithm	I-Algorithm
for	O
Toeplitz	B-Algorithm
matrices	I-Algorithm
.	O
</s>
<s>
Obviously	O
the	O
determinant	O
is	O
integer	O
if	O
all	O
matrix	B-Architecture
entries	O
are	O
integer	O
.	O
</s>
<s>
Gaussian	B-Algorithm
elimination	I-Algorithm
has	O
O(n3 )	O
complexity	O
,	O
but	O
introduces	O
division	O
,	O
which	O
results	O
in	O
round-off	O
errors	O
when	O
implemented	O
using	O
floating	O
point	O
numbers	O
.	O
</s>
<s>
Division-free	O
algorithm	O
—	O
performs	O
matrix	B-Architecture
reduction	O
to	O
triangular	O
form	O
without	O
any	O
division	O
operation	O
.	O
</s>
<s>
The	O
program	O
structure	O
of	O
this	O
algorithm	O
is	O
a	O
simple	O
triple-loop	O
,	O
as	O
in	O
the	O
standard	O
Gaussian	B-Algorithm
elimination	I-Algorithm
.	O
</s>
<s>
However	O
in	O
this	O
case	O
the	O
matrix	B-Architecture
is	O
modified	O
so	O
that	O
each	O
entry	O
contains	O
the	O
leading	O
principal	O
minor	O
 [  ] 	O
.	O
</s>
<s>
Output	O
:	O
The	O
matrix	B-Architecture
is	O
modified	O
in-place	O
,	O
each	O
entry	O
contains	O
the	O
leading	O
minor	O
[],entry	O
contains	O
the	O
determinant	O
of	O
the	O
original	O
.	O
</s>
<s>
During	O
execution	O
of	O
the	O
Bareiss	B-Algorithm
algorithm	I-Algorithm
,	O
every	O
integer	O
that	O
is	O
computed	O
is	O
the	O
determinant	O
of	O
a	O
submatrix	O
of	O
the	O
input	O
matrix	B-Architecture
.	O
</s>
<s>
Otherwise	O
,	O
the	O
Bareiss	B-Algorithm
algorithm	I-Algorithm
may	O
be	O
viewed	O
as	O
a	O
variant	O
of	O
Gaussian	B-Algorithm
elimination	I-Algorithm
and	O
needs	O
roughly	O
the	O
same	O
number	O
of	O
arithmetic	O
operations	O
.	O
</s>
<s>
It	O
follows	O
that	O
,	O
for	O
an	O
n	O
×	O
n	O
matrix	B-Architecture
of	O
maximum	O
(	O
absolute	O
)	O
value	O
2L	O
for	O
each	O
entry	O
,	O
the	O
Bareiss	B-Algorithm
algorithm	I-Algorithm
runs	O
in	O
O(n3 )	O
elementary	O
operations	O
with	O
an	O
O( 	O
nn/22nL	O
)	O
bound	O
on	O
the	O
absolute	O
value	O
of	O
intermediate	O
values	O
needed	O
.	O
</s>
<s>
Its	O
computational	O
complexity	O
is	O
thus	O
O(n5L2(log(n )	O
2+L2	O
)	O
)	O
when	O
using	O
elementary	O
arithmetic	O
or	O
O(n4L(log(n )	O
+L	O
)	O
log(log(n )	O
+L	O
)	O
)	O
)	O
by	O
using	O
fast	B-Algorithm
multiplication	I-Algorithm
.	O
</s>
