Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Lab 1

  • To calculate the Euclidean distance between numbers which are placed in a pair of arrays.
  • We use the euclidean distance formula to calculate the Euclidean distance between two arrays denoted in the formula as p and q respectively, and the summation runs through all the elements of the arrays.
  • To calculate the Manhattan distance between numbers which are placed in a pair of arrays.
  • We use the manhattan distance formula to calculate the Manhattan distance between two arrays denoted in the formula as x and y respectively, and the summation runs through all the elements of the arrays.
  • Here we take the absolute magnitude of the distance between the pair of numbers, which gives the Manhattan distance between them.
  • To calculate the Minkowski distance between numbers which are placed in a pair of arrays, and using the given p value.
  • We use this formula to calculate the Minkowski distance between two arrays denoted in the formula as a and b respectively, and the summation runs through all the elements of the arrays.
  • Here we take the p’th root of the distance between the difference of the pair of numbers raised to the p’th power, which gives the Minkowski distance between them.