Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING PYTHON!!!! USING PYTHON!!!! USING PYTHON!!!! USING PYTHON!!!! USING PYTHON!!!! Problem 2: Diameters of random graphs Grading criteria: code correctness for a; soundness of methodology

USING PYTHON!!!!

image text in transcribedUSING PYTHON!!!!

USING PYTHON!!!!

USING PYTHON!!!!

USING PYTHON!!!!

Problem 2: Diameters of random graphs Grading criteria: code correctness for a; soundness of methodology and thoroughness for b and c. r Edit ? a. Let G be a graph on n vertices. We say that G is compact if any two vertices are connected by a path of length at most log2 n. Write a Python function to test whether a given graph is compact. 19 b. For p E [0, 1], consider a graph on n = 100 vertices in which each pair of vertices is joined by an edge with probability p (uniformly at random). Estimate the minimum value of p for which the probability that the resulting graph is compact exceeds 1/2. Justify your guess with some numerical evidence. 20 c. For m a positive integer, consider a graph on n = 100 vertices with exactly m edges, chosen uniformly at random from all graphs with these properties. Estimate the minimum value of m for which the 1 probability that the resulting graph is compact exceeds 1/2. Justify your guess with some numerical evidence. Problem 2: Diameters of random graphs Grading criteria: code correctness for a; soundness of methodology and thoroughness for b and c. r Edit ? a. Let G be a graph on n vertices. We say that G is compact if any two vertices are connected by a path of length at most log2 n. Write a Python function to test whether a given graph is compact. 19 b. For p E [0, 1], consider a graph on n = 100 vertices in which each pair of vertices is joined by an edge with probability p (uniformly at random). Estimate the minimum value of p for which the probability that the resulting graph is compact exceeds 1/2. Justify your guess with some numerical evidence. 20 c. For m a positive integer, consider a graph on n = 100 vertices with exactly m edges, chosen uniformly at random from all graphs with these properties. Estimate the minimum value of m for which the 1 probability that the resulting graph is compact exceeds 1/2. Justify your guess with some numerical evidence

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions