• Title/Summary/Keyword: 힙

Search Result 92, Processing Time 0.022 seconds

Insertion/Deletion algorithms on M-heap with an array representation (배열 표현을 이용한 M-힙에서 삽입/삭제 알고리즘)

  • Jung Hae-Jae
    • The KIPS Transactions:PartA
    • /
    • v.13A no.3 s.100
    • /
    • pp.261-266
    • /
    • 2006
  • Priority queues can be used in applications such as scheduling, sorting, and shortest path network problem. Fibonacci heap, pairing heap, and M-heap are priority queues based on pointers. This paper proposes a modified M-heap with an way representation, called MA-heap, that resolves the problem mentioned in [1]. The MA-heap takes O(1) amortized time and O(logn) time to insert an element and delete the max/min element, respectively. These time complexities are the same as those of the M-heap. In addition, it is much easier to implement an MA-heap than a heap proposed in [5] since it is based on the simple traditional heap.

A Study on the Runtime Test of Priority Queues (우선순위 큐 성능 시험에 관한 연구)

  • Jung, Hae-Jae
    • The KIPS Transactions:PartA
    • /
    • v.17A no.4
    • /
    • pp.167-172
    • /
    • 2010
  • This paper proposes a set of runtime test models for priority queues and shows the runtime test results based on the proposed test models for the representative priority queues: the traditional heap, post-order heap, and pairing heap. Among these heaps, the traditional heap is the worst in time complexity analyzed. But, according to our experimental results based on the test models proposed, it is shown that the slowest one is the pairing heap that utilizes pointers and the fastest one is the traditional heap. For the two implicit heaps, these results are in contrary to the fact that the post-order heap is better than the traditional heap in time complexity analyzed.

Implicit D-Ary AM-Heap (묵시 다원 AM-힙)

  • Jung, Haejae
    • KIPS Transactions on Computer and Communication Systems
    • /
    • v.7 no.12
    • /
    • pp.289-294
    • /
    • 2018
  • This paper proposes an implicit d-ary priority queue, called AM(d)-heap that is a generalized version of AM-heap, in which insert operation takes constant amortized time and remove operation takes O(logn) time. According to our experimental results, the best performance was shown when d is 4 or 8. Also, AM(d)-heap is about 1.5~1.8 times faster than the postorder heap.

Heap Consumption Analyzer Using Code Embedding (코드 삽입을 이용한 힙 사용량 분석기)

  • Joo, Seong-Yong;Jo, Jang-Wu
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2006.10b
    • /
    • pp.566-570
    • /
    • 2006
  • 프로그램의 힙 사용량이나 수행 시간과 같은 프로그램의 동적인 속성을 분석하기 위해서 프로파일러가 이용된다. 자바에서는 가상기계와 프로파일러의 통신을 목적으로 JVM TI 같은 프로파일러를 위한 인터페이스를 제공한다. 그러나 자바 가상기계 구현 명세는 프로파일러 인터페이스 구현을 요구하지 않는다. 프로파일러 인터페이스를 구현하지 않는 자바 가상기계에서는 JVM TI를 사용하는 프로파일러를 이용할 수 없다. 본 논문에서는 프로파일러 인터페이스를 사용하지 않는 힙 사용량 분석 기법을 제안했다. 이 방법은 힙 사용 정보를 추출하기 위한 코드를 소스파일에 삽입한다. 이 방법은 힙 사용량 분석 시 자바에서 제공하는 인터페이스를 사용하지 않기 때문에, 표준 인터페이스를 구현하지 않는 가상기계에서도 힙 사용 정보 분석을 수행할 수 있다.

  • PDF

8-heap* : A fast 8-ary implicit Priority queue (8-힢*: 빠른 8-원 묵시 우선순위 큐)

  • Jung, Hae-jae
    • The KIPS Transactions:PartA
    • /
    • v.11A no.3
    • /
    • pp.213-216
    • /
    • 2004
  • Proirity queues(PQ) can be used in applications such as scheduling or sorting. The data structures for PQ can be constructed with or without pointers. The implicit representation without pointers uses less memory space than pointer-based representation. It if shown that a 2-heap, a traditional Implicit PQ based on a binary tree, is slower than an f-heap based on a 8-ary tree. This is because 8-heap utilizes cache memory more efficiently This paper presents a novel fast implicit heap called 8-heap* which is easier to implement. Experimental results show that the 8-heap* is faster than 8-heap as well as 2-heap.

Field Usage Pattern in Typical Java Programs (전형적 자바 프로그램에서 필드의 사용 형태)

  • Yang, Hee-Jae
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2005.11a
    • /
    • pp.865-867
    • /
    • 2005
  • 자바 프로그램은 클래스의 집합으로 이루어지며 클래스는 필드와 메소드로 구성된다. 필드는 힙 메모리에 저장되므로 필드의 사용 형태는 힙 메모리의 사용 형태에 직접적인 영향을 미친다. 즉 자바 힙 메모리의 사용을 분석하기 위해서는 필드의 사용 형태를 분석해야 한다는 것이다. 본 논문에서는 전형적 자바 프로그램에서 필드가 어떻게 사용되어지는지를 정성적으로 분석하고 실험을 통해 확인하였다. 본 연구의 결과는 자바가상기계의 힙 메모리 구조 개발에 도움을 줄 것이며, 나아가 효율적인 자바가상기계의 개발을 가능하게 할 것으로 기대된다.

  • PDF

An Algorithm to Insert Safe Deallocations for Efficient Memory Usage (효율적인 메모리 사용을 위한 free 명령어 삽입 알고리즘)

  • 이욱세
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2002.10d
    • /
    • pp.655-657
    • /
    • 2002
  • 메모리 반납(deallocation) 명령어는 프로그램에게 할당된 힙 셀(heap cell)을 반납하는 명령어로 힙 사용량을 낮추어 주지만, 잘못된 반납으로 인해 심각한 오류를 일으킬 수 있다. 본 논문에서는 재귀적인 자료구조(recursive data structure),를 안전하게 반납하는 명령어를 삽입하는 알고리즘을 제시한다. 메모리의 모양새를 분석하고 나중에 쓰이지 않을 힙 셀들을 추정하여 반납 명령어를 삽입한다. 분석시 요약 수준을 적절히 조절함으로써 빠르면서도 정확하게 분석한다. 또한, 실행시간에 부가적인 정보를 전달하여 일찍 힙 셀을 반납할 수 있도록 한다. 제시한 알고리즘으로 메모리 반납을 하지 않는 프로그램에 반납 명령어를 삽입하여 전체 메모리 할당량의 5.2-98.7%를 반납할 수 있었다.

  • PDF

Data Pointer Encoding for Defense against Heap Attack (힙 공격으로부터 방어를 위한 데이터 포인터 인코딩)

  • Kim, Kyung-Tae;Pyo, Chang-Woo
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2010.06c
    • /
    • pp.550-553
    • /
    • 2010
  • 버퍼 오버플로우의 공격은 스택의 영역뿐만 아니라 데이터 세그먼트나 힙 영역에서도 다양한 형태가 가능하다. 이 논문은 힙 영역에 대한 동적 메모리 할당 함수의 취약점 공격을 방지하는 방안을 제시한다. 제안된 방법은 데이터 포인터의 값을 암호화 하여 저장하고, 참조할 때 복호화 한다. 힙 공격은 원하는 주소에 원하는 값을 기록할 수 있게 하기 때문에 데이터 변수 또는 포인터 공격에 활용될 수 있다. 데이터 포인터 암호화는 아직 알려지지 않은 데이터 포인터와 변수에 대한 공격까지 방어할 수 있을 것으로 예상된다.

  • PDF

IMI-Heap: An Implicit Double-Ended Priority Queue with Constant Insertion Amortized Time Complexity (IMI-힙: 상수 삽입 전이 시간 복잡도를 가진 묵시 양단 우선순위 큐)

  • Jung, Haejae
    • KIPS Transactions on Computer and Communication Systems
    • /
    • v.8 no.2
    • /
    • pp.29-34
    • /
    • 2019
  • Priority queues, one of the fundamental data structures, have been studied for a long time by computer scientists. This paper proposes an implicit double-ended priority queue, called IMI-heap, in which insert operation takes constant amortized time and each of removal operation of the minimum key or the maximum key takes O(logn) time. To the author's knowledge, all implicit double-ended priority queues that have been published, perform insert, removeMin and removeMax operations in O(logn) time each. So, the proposed IMI-heap is superior than the published heaps in terms of insertion time complexity.The abstract should concisely state what was done, how it was done, principal results, and their significance.

Merging Algorithm for Relaxed Min-Max Heaps Relaxed min-max 힙에 대한 병합 알고리즙

  • Min, Yong-Sik
    • The Journal of the Acoustical Society of Korea
    • /
    • v.14 no.1E
    • /
    • pp.73-82
    • /
    • 1995
  • This paper presents a data structure that implements a mergeable double-ended priority queue ; namely, an improved relaxed min-max-pair heap. It suggests a sequential algorithm to merge priority queues organized in two relaxed min-max heaps : kheap and nheap of sizes k and n, respecrively. This new data sturuture eliminates the blossomed tree and the lazying method used to merge the relaxed min-max heaps in [8]. As a result, the suggested method in this paper requires the time complexity of O(log(log(n/k))*log(k)) and the space complexity of O(n+), assuming that $k{\leq}{\lfloor}log(size(nheap)){\rfloor}$ are in two heaps of different sizes.

  • PDF