Schmidt Cryptohack - Gram

The challenge on CryptoHack tasks you with implementing the Gram-Schmidt orthogonalization algorithm to find an orthogonal basis from a given set of basis vectors. The Algorithm Given a basis , the algorithm constructs an orthogonal basis through the following steps:

: CryptoBook - Gram-Schmidt Orthogonalization provides the mathematical foundations used within the CryptoHack curriculum. gram schmidt cryptohack

basis = [[1,2], [3,4]] orthogonal = gram_schmidt(basis) for u in orthogonal: print([float(x) for x in u]) # For readability # But submit as Fractions: (Fraction(1,1), Fraction(2,1)) # and (Fraction(4,5), Fraction(-2,5)) The challenge on CryptoHack tasks you with implementing

LLL is a . It attempts to transform a "bad" basis into a "good" one. 1)) # and (Fraction(4