Kanonik Huffman kod sözcükleri uzunluklarının evrim stratejileri algoritması ile belirlenmesi


Creative Commons License

Oral M., Aşşık M. M.

Gazi Üniversitesi Mühendislik Mimarlık Fakültesi Dergisi, cilt.38, sa.2, ss.771-780, 2022 (SCI-Expanded) identifier

  • Yayın Türü: Makale / Tam Makale
  • Cilt numarası: 38 Sayı: 2
  • Basım Tarihi: 2022
  • Doi Numarası: 10.17341/gazimmfd.882745
  • Dergi Adı: Gazi Üniversitesi Mühendislik Mimarlık Fakültesi Dergisi
  • Derginin Tarandığı İndeksler: Science Citation Index Expanded (SCI-EXPANDED), Scopus, Academic Search Premier, Art Source, Compendex, TR DİZİN (ULAKBİM)
  • Sayfa Sayıları: ss.771-780
  • Çukurova Üniversitesi Adresli: Evet

Özet

Huffman kodlama, veri sıkıştırma alanında yaygın bir şekilde kullanılmaktadır. Kanonik Huffman kodlama ise, Huffman kodlamanın bir alt kümesidir ve daha kısa başlık ve daha az hafıza yeri kullanılması gibi bazı avantajlara sahiptir. Bu nedenle bu kodlamayla ilgili geliştirme çalışmaları devam etmektedir. Cebirsel Kanonik Huffman Kodlama (CKHK) da bu çalışmalardan birisidir ve bu algoritma ile en iyi değere en yakın Huffman kod uzunlukları cebirsel yoldan elde edilmektedir. Bu çalışmada, kanonik Huffman kodlarının üretimine esas olan kod uzunluklarını Evrimsel Stratejiler (ESs) ile elde eden bir algoritma önerilmekte ve söz konusu algoritma aynı zamanda CKHK algoritmasının ESs yöntemi ile en iyileştirilmesi anlamına gelmektedir. ESs çoğunlukla mutasyonu kullanan bir evrimsel algoritmadır. Tek bir ata çoğalarak kendi kopyalarını oluşturur. Kopyalar mutasyona uğratılarak çocuklar elde edilir. Çocuklar ve atanın arasından en iyi uygunluk değerine sahip birey bir sonraki neslin atası seçilir. Durma şartı sağlanıncaya kadar bu döngü devam eder. Bu çalışmada ilk ata olarak CKHK ile edilen uzunluk dizisi kullanılmıştır. Bu atanın mutasyonla evrimleşmesi sonucunda en iyi değere ulaşılmıştır. Optimum değere ulaşmak için gerekli döngü sayısı testler sonucunda sabit bir sayı olarak belirlenmiş olup, bu durumda zaman karmaşıklığı, n alfabe sayısı olmak üzere O(n²) olarak tespit edilmiştir. Kullanılan hafıza miktarı ise çoklu bireyler nedeniyle O(n²) bayttır.
Huffman coding is widely used in data compression. Canonical Huffman coding is a subset of Huffman coding and has some advantages, such as shorter header and less memory usage. Therefore, studies on this coding have been continuing. The algorithm producing the lengths of Algebraic Canonical Huffman Codes (ACHC) is one of these studies and this algorithm obtains the code lengths nearest to optimum value. In this study, an algorithm obtaining the code lengths that are the basis for the production of canonical Huffman codes using Evolutionary Strategies (ESs) is proposed, and this algorithm means that the ACHC algorithm is optimized by the ESs method. ESs is an evolutionary algorithm that mostly uses the mutation. Replication creates many copies of a single ancestor. The copies are mutated to produce offspring. Among the offspring and the ancestor, the individual with the best fitness value is chosen as the ancestor of the next generation. This cycle continues until the stop criteria is met. In this study, the length array obtained by ACHC was used as the first ancestor. The optimum value was achieved as a result of the evolution of this ancestor by mutation. As a result of the tests, the required number of cycles to reach the optimum value was determined as a fixed number. In this case, the time complexity is O (n²), where n is the number of symbols used. The amount of memory used is O (n²) because of the usage of multiple individuals.