Motivasi Hidup

Hanya orang yang berani gagal total,akan meraih keberhasilan total (Jhon F.Kennedy)

Senin, 01 Mei 2017

Metode Pengukuran Jarak

STUDI KASUS : Kandungan Gizi yang terdapat pada beberapa jenis Kopi instan sbb :
  • Kopi Good Day 


  • Kopi Nescape  
     
  • Kopi ABC 
  •  Kopi Kapal Api Grande 
                                                                                      diketahui komposisinya seperti tabel dibawah ini.

 



A.Jarak eucledian
      Rumus  --->  De(p,q,r,s) = [(x-s)2+(y-t)2+(z-u)2+ (w-v)2]1/2


      A,B = [(1000-870)2 + (20-7)2 + (10-29)2 + (200-148)2]1/2  = √20134

      A,C = [(1000-1100)2 + (20-0)2 + (10-250)2 + (200-10)2]1/2 = √104100

      A,D = [(1000-900)2 + (20-20)2 + (10-10)2 + (200-170)2]1/2 = √10900




      B,C = [(870-1100)2 + (7-0)2 + (29-250)2 + (148-10)2]1/2  = √120834

      B,D = [(870-900)2 + (7-20)2 + (29-10)2 + (148-170)2]1/2 = √1914




      C,D = [(1100-900)2 + (0-20)2 + (250-10)2 + (10-170)2]1/2  = √123600








B. Jarak D4 (jarak city-block)

       ----->      Rumus            D4(p,q,r,s)  =  |x-s|+|y-t|+|z-u|+|w-v|




      A,B  = |1000-870|+|20-7|+|10-29|+|200-148| = 214

      A,C =  |1000-1100|+|20-0|+|10-250|+|200-10| = 550

      A,D = |1000-900|+|20-20|+|10-10|+|200-170| = 130





      B,C  = |870-1100|+|7-0|+|29-250|+|148-10| = 596

      B,D =  |870-900|+|7-20|+|29-10|+|148-170| = 84




     C,D = |1100-900|+|0-20|+|250-10|+|10-170| = 620








C. Jarak D8 (jarak papan catur)

  ------>    Rumus              D8(p,q,r,s) = max( |x-s|,|y-t|,|z-u|,|w-v| )



      A,B  = max ( |1000-870|,|20-7|,|10-29|,|200-148|) = 130

      A,C = max ( |1000-1100|,|20-0|,|10-250|,|200-10|) = 240

      A,D = max ( |1000-900|,|20-20|,|10-10|,|200-170|) = 100





      B,C  = max ( |870-1100|,|7-0|,|29-250|,|148-10|) = 230

      B,D =  |870-900|+|7-20|+|29-10|+|148-170| = 30




     C,D = max (|1100-900|,|0-20|,|250-10|,|10-170| = 240