# How to create a partially ordered tree that works as a priority queue

Page 1 of 1

## 1 Replies - 1203 Views - Last Post: 28 August 2013 - 02:22 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=327851&amp;s=90cb6fe5bdfeb604ba8d01209992cd93&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 wjd39

Reputation: 0
• Posts: 1
• Joined: 28-August 13

# How to create a partially ordered tree that works as a priority queue

Posted 28 August 2013 - 11:47 AM

I am working on a homework problem for Dijkstra's shortest paths algorithm and part of the requirement is to use a partially ordered tree instead of a priority queue. This is the first time looking at Dijkstra's algorithm and i am not sure how the priority queue would be used to begin with so using a partially ordered tree instead has me completely lost. I am looking for an explanation of how the priority queue would be used and how a partially ordered tree can replace it. Thanks.

Is This A Good Question/Topic? 0

## Replies To: How to create a partially ordered tree that works as a priority queue

### #2 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 12243
• Posts: 45,332
• Joined: 27-December 08

## Re: How to create a partially ordered tree that works as a priority queue

Posted 28 August 2013 - 02:22 PM

What you want to use is a binary heap. The root element of a binary heap is the smallest element in the collection, which will be removed on pop() operations.

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }