SlideShare une entreprise Scribd logo
1  sur  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)

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Dernier (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

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)