Question: Question 2 . Let L be the lattice generated by the basis B = { ( 3 , 1 , - 2 ) , (
Question Let be the lattice generated by the basis
Which of the following sets are also bases for the same lattice
Prove your answer for each. If the basis generates the same lattice, find the
change of basis matrix A such that the matrix whose columns are the
vectors of in order and matrix the matrix with columns given by
then In this case, compute the Hadamard constants of each basis,
and determine which is the better basis for
Alice and Bob use the GGH cryptosystem to communicate. Alice's private
key, the dimension the matrix of column vectors cdots, and
public key where is a matrix of elementary column operations, is
given in the file hwdata.txt Encoding and decoding functions, encode
and decode, are also given. Bob sends Alice an encrypted message e given by
where is the vector correspoding to the encoded message. Notice that since
is also a basis for and the vector WminLcdots
####################### FUNCTIONS #######################
### You can safely run this entire block at any point ###
### until you see the next block begin below. ###
def Hm:
This function returns the Hadamard constant of the assumed square
matrix m
n mdimensions
return RRabsmdetprodRRnormmcolumni for i in rangenn
def encodes:
s strs
if lens n:
printError string too long.
return
return vectorZZordsi for i in rangelens for i in rangenlens
def decodes:
v
for i in rangelens:
if si:
return joinv
vappendchrsi
return joinv
def printmatrixM:
This gives an output you can copypaste and get back
as a matrix by saying matrixthe output here
return x for x in Mrowi for i in rangen
def KnapsackMatrixM S:
Return the row matrix which corresponds to the knapsack problem
v
n lenM
for i in rangen:
t for j in rangen
ti
tn Mi
vappendt
t for j in rangen
tn S
vappendt
### End of functions block ###
###################################################
#################### PROBLEMS ####################
V matrix
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
