Invite the largest set of friends possible

Assignment Help Computer Engineering
Reference no: EM132142062

Question :

Suppose you are organizing a party for a large group of your friends. Your friends are pretty opinionated, though, and you don't want to invite two friends if they don't like each other.

So you have asked each of your friends to give you an "enemies" list, which identifies all the other people among your friends that they dislike and for whom they know the feeling is mutual.

Your goal is to invite the largest set of friends possible such that no pair of invited friends dislike each other.

To solve this problem quickly, one of your relatives (who is not one of your friends) has offered a simple greedy strategy, where you would repeatedly invite the person with the fewest number of enemies from among your friends who is not an enemy of someone you have already invited, until there is no one left who can be invited.

Show that your relative's greedy algorithm may not always result in the maximum number of friends being invited to your party.

Reference no: EM132142062

Questions Cloud

Is this a good design choice and why : Suppose that new, more powerful arithmetic instruction are added to the instruction set.
Describe the effects of employment discrimination on wages : Describe the effects of employment discrimination on wages. How could this impact ones business decisions in relation to labor costs?
Create a preliminary design for a possible two-table : Create a preliminary design for a possible two-table database for this scenario locating the fields in the most appropriate tables.
Describe both law of demand and law of supply : Describe both "Law of Demand" & "Law of Supply" regarding price changes relative to the substitution and income effect? In your response.
Invite the largest set of friends possible : Your goal is to invite the largest set of friends possible such that no pair of invited friends dislike each other.
Why were not you motivated : Describe a situation where you were no motivated at all... What was missing? Why weren't you motivated? (again use a work situation if you can).
Describe the three forms of price discrimination : Describe the three forms of price discrimination and give examples of where each kind is applied. What would prevent a firm attempting to price discriminate.
How many inputs could we process on the new machine : Given a new machine that is 64 times as fast, how many inputs could we process on the new machine in t seconds?
Describe three key inputs and variable costs : Describe three key inputs (or factors of production) and fixed and variable costs involved in the production of your chosen product or service.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd