SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
In python implement a special type of spanning tree in which a subset of the vertices nust be leaf
node. The output spanning tree may not be a MST. So here is the problem: Input: undirected
graph G=(V,E); edge weights w(e), and a subset U of the of the vertices. Jutput: a spanning tree
that has nodes in U as leaf nodes and the total weight of the node is ninimum. Can you find an
algorithm that runs in time 0(ElogV) time? Why? Or why not? Test your code on the following
instance of the problem
G=(V,E)V={A,B,C,D,E,F,G,H,I}E={(AB,10),(AC,12),(BC,9),(BD,8),(CE,3),(CF,1),(DE,7),(DG
,8),(DH,5),(EF,3)(FH,6),(G,H,9),(GI,2),(HI,11)}whereABisalinkwithweight10.J={A,D,F}.

Contenu connexe

Plus de nijamabdulkarim

In order to identify genetic factors affecting susceptibiity to lepro.pdf
 In order to identify genetic factors affecting susceptibiity to lepro.pdf In order to identify genetic factors affecting susceptibiity to lepro.pdf
In order to identify genetic factors affecting susceptibiity to lepro.pdfnijamabdulkarim
 
In ecology, the number of people, other living organisms, or crops th.pdf
 In ecology, the number of people, other living organisms, or crops th.pdf In ecology, the number of people, other living organisms, or crops th.pdf
In ecology, the number of people, other living organisms, or crops th.pdfnijamabdulkarim
 
Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdf
 Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdf Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdf
Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdfnijamabdulkarim
 
Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdf
 Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdf Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdf
Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdfnijamabdulkarim
 
Indicate whether the following items are Included in or Excluded f.pdf
 Indicate whether the following items are Included in or Excluded f.pdf Indicate whether the following items are Included in or Excluded f.pdf
Indicate whether the following items are Included in or Excluded f.pdfnijamabdulkarim
 
Indicate whether the items described below are inputs (I), outputs (O.pdf
 Indicate whether the items described below are inputs (I), outputs (O.pdf Indicate whether the items described below are inputs (I), outputs (O.pdf
Indicate whether the items described below are inputs (I), outputs (O.pdfnijamabdulkarim
 
Indicate whether each of the following statements is true or false. C.pdf
 Indicate whether each of the following statements is true or false. C.pdf Indicate whether each of the following statements is true or false. C.pdf
Indicate whether each of the following statements is true or false. C.pdfnijamabdulkarim
 
Indigo The grandmother hypothesis speculates that women raise their .pdf
 Indigo The grandmother hypothesis speculates that women raise their .pdf Indigo The grandmother hypothesis speculates that women raise their .pdf
Indigo The grandmother hypothesis speculates that women raise their .pdfnijamabdulkarim
 
Indicate the balances in the three stockholders equity accounts afte.pdf
 Indicate the balances in the three stockholders equity accounts afte.pdf Indicate the balances in the three stockholders equity accounts afte.pdf
Indicate the balances in the three stockholders equity accounts afte.pdfnijamabdulkarim
 
ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdf
 ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdf ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdf
ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdfnijamabdulkarim
 
In which of these circumstances is it advisable to use a POST request.pdf
 In which of these circumstances is it advisable to use a POST request.pdf In which of these circumstances is it advisable to use a POST request.pdf
In which of these circumstances is it advisable to use a POST request.pdfnijamabdulkarim
 
In development of an embryonic axis of Drosophila, segregation of cyt.pdf
 In development of an embryonic axis of Drosophila, segregation of cyt.pdf In development of an embryonic axis of Drosophila, segregation of cyt.pdf
In development of an embryonic axis of Drosophila, segregation of cyt.pdfnijamabdulkarim
 
In which of the following independent situations has Jean made a gift.pdf
 In which of the following independent situations has Jean made a gift.pdf In which of the following independent situations has Jean made a gift.pdf
In which of the following independent situations has Jean made a gift.pdfnijamabdulkarim
 
In what collection mechanism the partidies are electricaliy charged a.pdf
 In what collection mechanism the partidies are electricaliy charged a.pdf In what collection mechanism the partidies are electricaliy charged a.pdf
In what collection mechanism the partidies are electricaliy charged a.pdfnijamabdulkarim
 
In what way do the exponential growth model and geometric growth mode.pdf
 In what way do the exponential growth model and geometric growth mode.pdf In what way do the exponential growth model and geometric growth mode.pdf
In what way do the exponential growth model and geometric growth mode.pdfnijamabdulkarim
 
in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdf
 in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdf in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdf
in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdfnijamabdulkarim
 
In this practical assignment, using the business process of a ficti.pdf
 In this practical assignment, using the business process of a ficti.pdf In this practical assignment, using the business process of a ficti.pdf
In this practical assignment, using the business process of a ficti.pdfnijamabdulkarim
 
In this distribution, where would the Mean, Median and Mode lie on th.pdf
 In this distribution, where would the Mean, Median and Mode lie on th.pdf In this distribution, where would the Mean, Median and Mode lie on th.pdf
In this distribution, where would the Mean, Median and Mode lie on th.pdfnijamabdulkarim
 
In this activity, you will 1. visit the websile Budget O1. The. Unit.pdf
 In this activity, you will 1. visit the websile Budget O1. The. Unit.pdf In this activity, you will 1. visit the websile Budget O1. The. Unit.pdf
In this activity, you will 1. visit the websile Budget O1. The. Unit.pdfnijamabdulkarim
 
In the world of shipping documentation, which document serves the pur.pdf
 In the world of shipping documentation, which document serves the pur.pdf In the world of shipping documentation, which document serves the pur.pdf
In the world of shipping documentation, which document serves the pur.pdfnijamabdulkarim
 

Plus de nijamabdulkarim (20)

In order to identify genetic factors affecting susceptibiity to lepro.pdf
 In order to identify genetic factors affecting susceptibiity to lepro.pdf In order to identify genetic factors affecting susceptibiity to lepro.pdf
In order to identify genetic factors affecting susceptibiity to lepro.pdf
 
In ecology, the number of people, other living organisms, or crops th.pdf
 In ecology, the number of people, other living organisms, or crops th.pdf In ecology, the number of people, other living organisms, or crops th.pdf
In ecology, the number of people, other living organisms, or crops th.pdf
 
Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdf
 Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdf Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdf
Inflation and the Quantity Theory of Money End of Chapter Problem 14.pdf
 
Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdf
 Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdf Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdf
Individuals with Swyers Syndrome (XYSRY)tend to not develop gonads. .pdf
 
Indicate whether the following items are Included in or Excluded f.pdf
 Indicate whether the following items are Included in or Excluded f.pdf Indicate whether the following items are Included in or Excluded f.pdf
Indicate whether the following items are Included in or Excluded f.pdf
 
Indicate whether the items described below are inputs (I), outputs (O.pdf
 Indicate whether the items described below are inputs (I), outputs (O.pdf Indicate whether the items described below are inputs (I), outputs (O.pdf
Indicate whether the items described below are inputs (I), outputs (O.pdf
 
Indicate whether each of the following statements is true or false. C.pdf
 Indicate whether each of the following statements is true or false. C.pdf Indicate whether each of the following statements is true or false. C.pdf
Indicate whether each of the following statements is true or false. C.pdf
 
Indigo The grandmother hypothesis speculates that women raise their .pdf
 Indigo The grandmother hypothesis speculates that women raise their .pdf Indigo The grandmother hypothesis speculates that women raise their .pdf
Indigo The grandmother hypothesis speculates that women raise their .pdf
 
Indicate the balances in the three stockholders equity accounts afte.pdf
 Indicate the balances in the three stockholders equity accounts afte.pdf Indicate the balances in the three stockholders equity accounts afte.pdf
Indicate the balances in the three stockholders equity accounts afte.pdf
 
ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdf
 ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdf ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdf
ind let Y denote the number of defective tires. (b) Compute P(X1 and .pdf
 
In which of these circumstances is it advisable to use a POST request.pdf
 In which of these circumstances is it advisable to use a POST request.pdf In which of these circumstances is it advisable to use a POST request.pdf
In which of these circumstances is it advisable to use a POST request.pdf
 
In development of an embryonic axis of Drosophila, segregation of cyt.pdf
 In development of an embryonic axis of Drosophila, segregation of cyt.pdf In development of an embryonic axis of Drosophila, segregation of cyt.pdf
In development of an embryonic axis of Drosophila, segregation of cyt.pdf
 
In which of the following independent situations has Jean made a gift.pdf
 In which of the following independent situations has Jean made a gift.pdf In which of the following independent situations has Jean made a gift.pdf
In which of the following independent situations has Jean made a gift.pdf
 
In what collection mechanism the partidies are electricaliy charged a.pdf
 In what collection mechanism the partidies are electricaliy charged a.pdf In what collection mechanism the partidies are electricaliy charged a.pdf
In what collection mechanism the partidies are electricaliy charged a.pdf
 
In what way do the exponential growth model and geometric growth mode.pdf
 In what way do the exponential growth model and geometric growth mode.pdf In what way do the exponential growth model and geometric growth mode.pdf
In what way do the exponential growth model and geometric growth mode.pdf
 
in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdf
 in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdf in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdf
in timperitint. Fatly acider ars the major cocttinurai al Arithly sat.pdf
 
In this practical assignment, using the business process of a ficti.pdf
 In this practical assignment, using the business process of a ficti.pdf In this practical assignment, using the business process of a ficti.pdf
In this practical assignment, using the business process of a ficti.pdf
 
In this distribution, where would the Mean, Median and Mode lie on th.pdf
 In this distribution, where would the Mean, Median and Mode lie on th.pdf In this distribution, where would the Mean, Median and Mode lie on th.pdf
In this distribution, where would the Mean, Median and Mode lie on th.pdf
 
In this activity, you will 1. visit the websile Budget O1. The. Unit.pdf
 In this activity, you will 1. visit the websile Budget O1. The. Unit.pdf In this activity, you will 1. visit the websile Budget O1. The. Unit.pdf
In this activity, you will 1. visit the websile Budget O1. The. Unit.pdf
 
In the world of shipping documentation, which document serves the pur.pdf
 In the world of shipping documentation, which document serves the pur.pdf In the world of shipping documentation, which document serves the pur.pdf
In the world of shipping documentation, which document serves the pur.pdf
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 

Dernier (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

In python implement a special type of spanning tree in which a subset.pdf

  • 1. In python implement a special type of spanning tree in which a subset of the vertices nust be leaf node. The output spanning tree may not be a MST. So here is the problem: Input: undirected graph G=(V,E); edge weights w(e), and a subset U of the of the vertices. Jutput: a spanning tree that has nodes in U as leaf nodes and the total weight of the node is ninimum. Can you find an algorithm that runs in time 0(ElogV) time? Why? Or why not? Test your code on the following instance of the problem G=(V,E)V={A,B,C,D,E,F,G,H,I}E={(AB,10),(AC,12),(BC,9),(BD,8),(CE,3),(CF,1),(DE,7),(DG ,8),(DH,5),(EF,3)(FH,6),(G,H,9),(GI,2),(HI,11)}whereABisalinkwithweight10.J={A,D,F}.