the priority queue adt formallywe model an element and its priority as key-value pair we define the priority queue adt to support the following methods for priority queue pp add(kv)insert an item with key and value into priority queue min)return tuple( , )representing the key and value of an item in priority queue with minimum key (but do not remove the item)an error occurs if the priority queue is empty remove min)remove an item with minimum key from priority queue pand return tuple( , )representing the key and value of the removed iteman error occurs if the priority queue is empty is empty)return true if priority queue does not contain any items len( )return the number of items in priority queue priority queue may have multiple entries with equivalent keysin which case methods min and remove min may report an arbitrary choice of item having minimum key values may be any type of object in our initial model for priority queuewe assume that an element' key remains fixed once it has been added to priority queue in section we consider an extension that allows user to update an element' key within the priority queue example the following table shows series of operations and their effects on an initially empty priority queue the "priority queuecolumn is somewhat deceiving since it shows the entries as tuples and sorted by key such an internal representation is not required of priority queue operation add( ,ap add( ,cp add( ,bp add( ,dp minp remove minp remove minlen(pp remove minp remove minp is emptyp remove minreturn value ( , ( , ( , ( , ( ,ctrue "errorpriority queue {( , ){( , )( , ){( , )( , )( , ){( , )( , )( , )( , ){( , )( , )( , )( , ){( , )( , )( , ){( , )( , ){( , )( , ){( , ){{{