SlideShare a Scribd company logo
1 of 1
Let P be an implementation of a min priority queue where: pint() takes 0(1) time. Initially, P has
0 elements. Insert(rr) takes 0(log2(s)) time where s is the number of elements in P. P. Insert()
adds one element to P. P. Delete Min() takes 0(/s) time where s is the number of elements in P.
P. Delete Min() removes one element from P. Consider the following procedure whose input is
an undirected graph G. Edges of G are represented by an adjacency LIST, weight(ui) is a positive
weight assigned to vertex (v*). Proc2(g) P. Init(); for each vertex Vi of G do for each edge (vi,
V_j) incident on Vi do Let n be the number of vertices of G and let m be the number of edges of
G. Assume that m >n. (a) Analyze lines 1-6 of Proc2 giving a bound on their asymptotic running
time in terms of n and m. (b) Analyze lines 7-10 of Proc2 giving a bound on their asymptotic
running time in terms of n and m. (c) Give the asymptotic running time of Proc2 in terms of n
and m.
Solution
(a) here the code executes for m(n-1) times hence the asymptotic running time for 1-6 lines of
proc2 is O(mn)
(b) here the code from 7-10 of proc2 runs for 2*number of edges times . This is because of
undirected graph each edge weight will be inserted twice into the p hence the asymptotic
notation representing the running time is O(2m)=> O(m)
(c) here simply we can obtain the result by adding the answers of (a) and (b) given above
Hence the asymptotic running time is : O(m(n+1)) => O(mn+m)

More Related Content

Similar to Let P be an implementation of a min priority queue where- pint() takes.docx

Graph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph AlgorithmsGraph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph Algorithmshtttuneti
 
03 Cap 2 - fourier-analysis-2015.pdf
03 Cap 2 - fourier-analysis-2015.pdf03 Cap 2 - fourier-analysis-2015.pdf
03 Cap 2 - fourier-analysis-2015.pdfROCIOMAMANIALATA1
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notationsajinis3
 
Embedding and np-Complete Problems for 3-Equitable Graphs
Embedding and np-Complete Problems for 3-Equitable GraphsEmbedding and np-Complete Problems for 3-Equitable Graphs
Embedding and np-Complete Problems for 3-Equitable GraphsWaqas Tariq
 
Higher formal homeworks unit 2
Higher formal homeworks   unit 2Higher formal homeworks   unit 2
Higher formal homeworks unit 2sjamaths
 
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy AnnotationsToru Tamaki
 
Parallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsParallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsJonny Daenen
 
Hormann.2001.TPI.pdf
Hormann.2001.TPI.pdfHormann.2001.TPI.pdf
Hormann.2001.TPI.pdfssuserbe139c
 
Dynamical systems solved ex
Dynamical systems solved exDynamical systems solved ex
Dynamical systems solved exMaths Tutoring
 
Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...
Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...
Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...AIRCC Publishing Corporation
 
Improving initial generations in pso algorithm for transportation network des...
Improving initial generations in pso algorithm for transportation network des...Improving initial generations in pso algorithm for transportation network des...
Improving initial generations in pso algorithm for transportation network des...ijcsit
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanationsGopi Saiteja
 
Matlab solved tutorials 2017 june.
Matlab solved tutorials  2017 june.Matlab solved tutorials  2017 june.
Matlab solved tutorials 2017 june.musadoto
 
Graph for Coulomb damped oscillation
Graph for Coulomb damped oscillationGraph for Coulomb damped oscillation
Graph for Coulomb damped oscillationphanhung20
 

Similar to Let P be an implementation of a min priority queue where- pint() takes.docx (20)

Graph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph AlgorithmsGraph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph Algorithms
 
Annotations.pdf
Annotations.pdfAnnotations.pdf
Annotations.pdf
 
03 Cap 2 - fourier-analysis-2015.pdf
03 Cap 2 - fourier-analysis-2015.pdf03 Cap 2 - fourier-analysis-2015.pdf
03 Cap 2 - fourier-analysis-2015.pdf
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
Embedding and np-Complete Problems for 3-Equitable Graphs
Embedding and np-Complete Problems for 3-Equitable GraphsEmbedding and np-Complete Problems for 3-Equitable Graphs
Embedding and np-Complete Problems for 3-Equitable Graphs
 
bode_plot By DEV
 bode_plot By DEV bode_plot By DEV
bode_plot By DEV
 
Higher formal homeworks unit 2
Higher formal homeworks   unit 2Higher formal homeworks   unit 2
Higher formal homeworks unit 2
 
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
 
ch3.ppt
ch3.pptch3.ppt
ch3.ppt
 
Design & Analysis of Algorithms Assignment Help
Design & Analysis of Algorithms Assignment HelpDesign & Analysis of Algorithms Assignment Help
Design & Analysis of Algorithms Assignment Help
 
Parallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsParallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-Joins
 
DAA_LECT_2.pdf
DAA_LECT_2.pdfDAA_LECT_2.pdf
DAA_LECT_2.pdf
 
Hormann.2001.TPI.pdf
Hormann.2001.TPI.pdfHormann.2001.TPI.pdf
Hormann.2001.TPI.pdf
 
Dynamical systems solved ex
Dynamical systems solved exDynamical systems solved ex
Dynamical systems solved ex
 
Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...
Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...
Automated Information Retrieval Model Using FP Growth Based Fuzzy Particle Sw...
 
Improving initial generations in pso algorithm for transportation network des...
Improving initial generations in pso algorithm for transportation network des...Improving initial generations in pso algorithm for transportation network des...
Improving initial generations in pso algorithm for transportation network des...
 
Optimisation random graph presentation
Optimisation random graph presentationOptimisation random graph presentation
Optimisation random graph presentation
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
 
Matlab solved tutorials 2017 june.
Matlab solved tutorials  2017 june.Matlab solved tutorials  2017 june.
Matlab solved tutorials 2017 june.
 
Graph for Coulomb damped oscillation
Graph for Coulomb damped oscillationGraph for Coulomb damped oscillation
Graph for Coulomb damped oscillation
 

More from darlened3

Lightning strike is deadly- and it happens due to the fact that Questi.docx
Lightning strike is deadly- and it happens due to the fact that Questi.docxLightning strike is deadly- and it happens due to the fact that Questi.docx
Lightning strike is deadly- and it happens due to the fact that Questi.docxdarlened3
 
Light travelling through the air (n - 1) strikes the surface of a diam.docx
Light travelling through the air (n - 1) strikes the surface of a diam.docxLight travelling through the air (n - 1) strikes the surface of a diam.docx
Light travelling through the air (n - 1) strikes the surface of a diam.docxdarlened3
 
Lets say your company doesn-'t want to upgrade from Windows Server 200.docx
Lets say your company doesn-'t want to upgrade from Windows Server 200.docxLets say your company doesn-'t want to upgrade from Windows Server 200.docx
Lets say your company doesn-'t want to upgrade from Windows Server 200.docxdarlened3
 
Let-'s shift our focus a little and talk about Telehealth- Using to re.docx
Let-'s shift our focus a little and talk about Telehealth- Using to re.docxLet-'s shift our focus a little and talk about Telehealth- Using to re.docx
Let-'s shift our focus a little and talk about Telehealth- Using to re.docxdarlened3
 
Let L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docx
Let L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docxLet L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docx
Let L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docxdarlened3
 
Look at the energy curve for butane and oxygen combining to form CO2.docx
Look at the energy curve for butane and oxygen combining to  form CO2.docxLook at the energy curve for butane and oxygen combining to  form CO2.docx
Look at the energy curve for butane and oxygen combining to form CO2.docxdarlened3
 
List regional priority credits available for Long Island- Do you think.docx
List regional priority credits available for Long Island- Do you think.docxList regional priority credits available for Long Island- Do you think.docx
List regional priority credits available for Long Island- Do you think.docxdarlened3
 
List the most common arguments and describe the effect of that argumen.docx
List the most common arguments and describe the effect of that argumen.docxList the most common arguments and describe the effect of that argumen.docx
List the most common arguments and describe the effect of that argumen.docxdarlened3
 
Listed below are current asset items for Lester Company at December 31.docx
Listed below are current asset items for Lester Company at December 31.docxListed below are current asset items for Lester Company at December 31.docx
Listed below are current asset items for Lester Company at December 31.docxdarlened3
 
List some ways in which the privacy threats posed by cyber technology.docx
List some ways in which the privacy threats posed by cyber technology.docxList some ways in which the privacy threats posed by cyber technology.docx
List some ways in which the privacy threats posed by cyber technology.docxdarlened3
 
List three factors that contribute to the severity of acid rock draina.docx
List three factors that contribute to the severity of acid rock draina.docxList three factors that contribute to the severity of acid rock draina.docx
List three factors that contribute to the severity of acid rock draina.docxdarlened3
 
List the GL entries (debit and credit) for the following items - list.docx
List the GL entries (debit and credit) for the following items - list.docxList the GL entries (debit and credit) for the following items - list.docx
List the GL entries (debit and credit) for the following items - list.docxdarlened3
 
list examples of the internet entities( switches- web servers- mail se.docx
list examples of the internet entities( switches- web servers- mail se.docxlist examples of the internet entities( switches- web servers- mail se.docx
list examples of the internet entities( switches- web servers- mail se.docxdarlened3
 
List and define the factors that are important to successful implement.docx
List and define the factors that are important to successful implement.docxList and define the factors that are important to successful implement.docx
List and define the factors that are important to successful implement.docxdarlened3
 
List some places that may be using Network Address Translation (NAT) a.docx
List some places that may be using Network Address Translation (NAT) a.docxList some places that may be using Network Address Translation (NAT) a.docx
List some places that may be using Network Address Translation (NAT) a.docxdarlened3
 
List Five differences in the Format of Foreign vs Domestic Companies I.docx
List Five differences in the Format of Foreign vs Domestic Companies I.docxList Five differences in the Format of Foreign vs Domestic Companies I.docx
List Five differences in the Format of Foreign vs Domestic Companies I.docxdarlened3
 
List and define the types of System Software- How does System Software.docx
List and define the types of System Software- How does System Software.docxList and define the types of System Software- How does System Software.docx
List and define the types of System Software- How does System Software.docxdarlened3
 
List and define the types of System Software- How does System Software (1).docx
List and define the types of System Software- How does System Software (1).docxList and define the types of System Software- How does System Software (1).docx
List and define the types of System Software- How does System Software (1).docxdarlened3
 
List 6 reasons WHY we treat wastewater focused on the different types.docx
List 6 reasons WHY we treat wastewater focused on the different types.docxList 6 reasons WHY we treat wastewater focused on the different types.docx
List 6 reasons WHY we treat wastewater focused on the different types.docxdarlened3
 
Linux distributions are becoming more and more user friendly- There is.docx
Linux distributions are becoming more and more user friendly- There is.docxLinux distributions are becoming more and more user friendly- There is.docx
Linux distributions are becoming more and more user friendly- There is.docxdarlened3
 

More from darlened3 (20)

Lightning strike is deadly- and it happens due to the fact that Questi.docx
Lightning strike is deadly- and it happens due to the fact that Questi.docxLightning strike is deadly- and it happens due to the fact that Questi.docx
Lightning strike is deadly- and it happens due to the fact that Questi.docx
 
Light travelling through the air (n - 1) strikes the surface of a diam.docx
Light travelling through the air (n - 1) strikes the surface of a diam.docxLight travelling through the air (n - 1) strikes the surface of a diam.docx
Light travelling through the air (n - 1) strikes the surface of a diam.docx
 
Lets say your company doesn-'t want to upgrade from Windows Server 200.docx
Lets say your company doesn-'t want to upgrade from Windows Server 200.docxLets say your company doesn-'t want to upgrade from Windows Server 200.docx
Lets say your company doesn-'t want to upgrade from Windows Server 200.docx
 
Let-'s shift our focus a little and talk about Telehealth- Using to re.docx
Let-'s shift our focus a little and talk about Telehealth- Using to re.docxLet-'s shift our focus a little and talk about Telehealth- Using to re.docx
Let-'s shift our focus a little and talk about Telehealth- Using to re.docx
 
Let L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docx
Let L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docxLet L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docx
Let L(x1- x2- x3- x4- x5- x6- x7) - 2x3 + 3x4 + 8x6 + x7- Is L a linea.docx
 
Look at the energy curve for butane and oxygen combining to form CO2.docx
Look at the energy curve for butane and oxygen combining to  form CO2.docxLook at the energy curve for butane and oxygen combining to  form CO2.docx
Look at the energy curve for butane and oxygen combining to form CO2.docx
 
List regional priority credits available for Long Island- Do you think.docx
List regional priority credits available for Long Island- Do you think.docxList regional priority credits available for Long Island- Do you think.docx
List regional priority credits available for Long Island- Do you think.docx
 
List the most common arguments and describe the effect of that argumen.docx
List the most common arguments and describe the effect of that argumen.docxList the most common arguments and describe the effect of that argumen.docx
List the most common arguments and describe the effect of that argumen.docx
 
Listed below are current asset items for Lester Company at December 31.docx
Listed below are current asset items for Lester Company at December 31.docxListed below are current asset items for Lester Company at December 31.docx
Listed below are current asset items for Lester Company at December 31.docx
 
List some ways in which the privacy threats posed by cyber technology.docx
List some ways in which the privacy threats posed by cyber technology.docxList some ways in which the privacy threats posed by cyber technology.docx
List some ways in which the privacy threats posed by cyber technology.docx
 
List three factors that contribute to the severity of acid rock draina.docx
List three factors that contribute to the severity of acid rock draina.docxList three factors that contribute to the severity of acid rock draina.docx
List three factors that contribute to the severity of acid rock draina.docx
 
List the GL entries (debit and credit) for the following items - list.docx
List the GL entries (debit and credit) for the following items - list.docxList the GL entries (debit and credit) for the following items - list.docx
List the GL entries (debit and credit) for the following items - list.docx
 
list examples of the internet entities( switches- web servers- mail se.docx
list examples of the internet entities( switches- web servers- mail se.docxlist examples of the internet entities( switches- web servers- mail se.docx
list examples of the internet entities( switches- web servers- mail se.docx
 
List and define the factors that are important to successful implement.docx
List and define the factors that are important to successful implement.docxList and define the factors that are important to successful implement.docx
List and define the factors that are important to successful implement.docx
 
List some places that may be using Network Address Translation (NAT) a.docx
List some places that may be using Network Address Translation (NAT) a.docxList some places that may be using Network Address Translation (NAT) a.docx
List some places that may be using Network Address Translation (NAT) a.docx
 
List Five differences in the Format of Foreign vs Domestic Companies I.docx
List Five differences in the Format of Foreign vs Domestic Companies I.docxList Five differences in the Format of Foreign vs Domestic Companies I.docx
List Five differences in the Format of Foreign vs Domestic Companies I.docx
 
List and define the types of System Software- How does System Software.docx
List and define the types of System Software- How does System Software.docxList and define the types of System Software- How does System Software.docx
List and define the types of System Software- How does System Software.docx
 
List and define the types of System Software- How does System Software (1).docx
List and define the types of System Software- How does System Software (1).docxList and define the types of System Software- How does System Software (1).docx
List and define the types of System Software- How does System Software (1).docx
 
List 6 reasons WHY we treat wastewater focused on the different types.docx
List 6 reasons WHY we treat wastewater focused on the different types.docxList 6 reasons WHY we treat wastewater focused on the different types.docx
List 6 reasons WHY we treat wastewater focused on the different types.docx
 
Linux distributions are becoming more and more user friendly- There is.docx
Linux distributions are becoming more and more user friendly- There is.docxLinux distributions are becoming more and more user friendly- There is.docx
Linux distributions are becoming more and more user friendly- There is.docx
 

Recently uploaded

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Let P be an implementation of a min priority queue where- pint() takes.docx

  • 1. Let P be an implementation of a min priority queue where: pint() takes 0(1) time. Initially, P has 0 elements. Insert(rr) takes 0(log2(s)) time where s is the number of elements in P. P. Insert() adds one element to P. P. Delete Min() takes 0(/s) time where s is the number of elements in P. P. Delete Min() removes one element from P. Consider the following procedure whose input is an undirected graph G. Edges of G are represented by an adjacency LIST, weight(ui) is a positive weight assigned to vertex (v*). Proc2(g) P. Init(); for each vertex Vi of G do for each edge (vi, V_j) incident on Vi do Let n be the number of vertices of G and let m be the number of edges of G. Assume that m >n. (a) Analyze lines 1-6 of Proc2 giving a bound on their asymptotic running time in terms of n and m. (b) Analyze lines 7-10 of Proc2 giving a bound on their asymptotic running time in terms of n and m. (c) Give the asymptotic running time of Proc2 in terms of n and m. Solution (a) here the code executes for m(n-1) times hence the asymptotic running time for 1-6 lines of proc2 is O(mn) (b) here the code from 7-10 of proc2 runs for 2*number of edges times . This is because of undirected graph each edge weight will be inserted twice into the p hence the asymptotic notation representing the running time is O(2m)=> O(m) (c) here simply we can obtain the result by adding the answers of (a) and (b) given above Hence the asymptotic running time is : O(m(n+1)) => O(mn+m)