Selasa, 18 Oktober 2016

Menentukan Indeks Nilai



Procedure menentukan _indeks_nilai(input:nilai, output:indeks)
Kamus :
indeks = char
Algoritma :
//menentukan indeks nilai
                if (nilai >= 80)then
                                indeks = 'A'
                else
                                if (nilai >= 70 and nilai < 80)then
                                                indeks = 'B'
                                else
                                                if (nilai >= 60 and nilai < 70)then
                                                                indeks = 'C'
                                                else
                                                                if (nilai >= 50 and nilai < 60)then
                                                                                indeks = 'D'
                                                                else
                                                                                indeks = 'E'
                                                                endif
                                                endif
                                endif
                endif
                output("indeks nilai anda =  ", indeks)
                output("ket : ")
                depend on (indeks) //memberi keterangan dari setiap indeks
                                'A' :
                                                output ("Sangat Baik")
                                'B' :
                                                output ("Baik")
                                'C' :
                                                output ("Cukup")
                                'D' :
                                                output ("Kurang")
                                ‘E’:
                                                output("Sangat Kurang")                                                             
enddepend
EndAlgoritma


Mencari T(n) :

T(n) Min(n) :1

Tentukan Big O , Big Ω , Big Θ

Big O : T(n) =1

             T(n) ≤ Og(n)

             4 ≤  n (untuk semua n ≥ 1)

             C = 1 n0=1


Big Ω : T(n) =1

             T(n) ≥ Ωg(n)

             1 ≥ n (untuk semua n ≤ 1)

             C = 1 n0=1


Big Θ : C1g(n) =1

             C2g(n) =1

             C2g(n) ≤ t(n) ≤ C1g(n)

             0 ≤ 1 ≤2

             C1 = 0, C2 = , n0= 0

T(n) Max(n) :1

Tentukan Big O , Big Ω , Big Θ

Big O : T(n) =1

             T(n) ≤ Og(n)

             4 ≤  n (untuk semua n ≥ 1)

             C = 1 n0=1


Big Ω : T(n) =1

             T(n) ≥ Ωg(n)

             1 ≥ n (untuk semua n ≤ 1)

             C = 1 n0=1


Big Θ : C1g(n) =1

             C2g(n) =1

             C2g(n) ≤ t(n) ≤ C1g(n)

             0 ≤ 1 ≤2

             C1 = 0, C2 = , n0= 0

T(n) Avrg(n) :1

Tentukan Big O , Big Ω , Big Θ

Big O : T(n) =1

             T(n) ≤ Og(n)

             4 ≤  n (untuk semua n ≥ 1)

             C = 1 n0=1


Big Ω : T(n) =1

             T(n) ≥ Ωg(n)

             1 ≥ n (untuk semua n ≤ 1)

             C = 1 n0=1


Big Θ : C1g(n) =1

             C2g(n) =1

             C2g(n) ≤ t(n) ≤ C1g(n)

             0 ≤ 1 ≤2

             C1 = 0, C2 = , n0=0

Tidak ada komentar:

Posting Komentar