Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

someone wants to throw a party and is deciding whom to invite. He has n mathematicians to choose from, and for each mathematician i, he

someone wants to throw a party and is deciding whom to invite. He has n mathematicians to choose from, and for each mathematician i, he has Friends[i], which is a linked list of i's friends among the n mathematicians. He wants to pick as many people as possible subject to the constraint that each invited mathematician has at least 10 of their friends at the party. Give an efficient greedy algorithm that takes as input the list of n mathematicians and the lists of their friends, and outputs the largest possible set of party invitees. Assume that friendship is symmetric.

(a) State this problem as a graph problem: what is the input graph G =(V,E) That is, what are the vertices? What are the edges? What is the set of

invitees in graph-theoretic terms (is it a subset of edges or vertices and with what properties)?

(b) Describe your greedy algorithm in plain English. In what sense is your algorithm greedy?

(c) Give a formal proof of correctness for your algorithm.

(d) Describe your algorithm in pseudocode.

(e) State and justify the running time of your algorithm.

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

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago