Maximum number of friends

Assignment Help Basic Computer Science
Reference no: EM131288859

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: EM131288859

Questions Cloud

How would you approach the development of a training program : How would you approach the development of a training program to address management's deficiencies? For the purpose of this assignment, let us assume that the manager is struggling with how to handle a conflict between subordinates or employees.
How marketers use behavioral segmentation in consumer market : How can marketers use behavioral segmentation in consumer markets? Discuss, using an example for each method of behavioral segmentation.
What is its change in working capital : Suppose Provo, Inc., had net income of $30 million for the most recent fiscal period. If its depreciation and amortization for the period is $3 million and its cash flow from operations is $35 million, what is its change in working capital for thi..
Actor-businessman arnold schwarzenegger : In the 2003 California gubernatorial recall election, the ballot contained 135 candidates, including people with various listings for their current job, including "actor," "comedian," and even "adult film actress."
Maximum number of friends : Show that your relative's greedy algorithm may not always result in the maximum number of friends being invited to your party.
Discuss ideas for applications of the google glass device : Discuss ideas for applications of the Google Glass device among the business and institutional markets. How can these applications be incorporated into online, mobile, and social media marketing?
Prepare a form 1040 and all required schedules : Prepare a one-page, one sided, typed, formal client letter; include the date, taxpayer name, address, city, state & zip code, salutation and formal closing signature line.
Calculate the payback period : Internal rate of return i. Modified internal rate of return, assuming reinvestment at 0% j. Modified internal rate of return, assuming reinvestment at 10%
What items are popular for high end pet products : Where is our competitors located and how well are they doing as a organization. What items are popular for high end pet products? How big is our market?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Difference between self-learning and self-organization

Kohonen networks are known as tools that let us look into multidimensional spaces of data. Can you explain this description?

  Briefly describe the earned value schedule indicators

Briefly describe the earned value schedule indicators table in MS Project 2010. Under what circumstances would a project manager use this table

  What are the implications for companies seeking to learn

Mark Jamison of Kimberly Clark notes that it is business processes and not the technology (e.g RFID)itself, what bring value to the supply chain.What does he means by that. what are the implications for companies seeking to learn from the likes of..

  Report on ethics by programmers and computer professionals

Ethical codes are in place for one to understand difference between right and wrong.  But the ethics change based on the surrounding and individuals point of view.

  Discuss the pros and cons of buying software

Are there any instances when a firm would pass up such software and decide to prepare custom code? If so, what are they?Discuss the pros and cons of buying software vs. creating custom software.

  Computing a mathematical discipline a scientific discipline

Name the four areas in which a practitioner in computer science must be skilled.2) Is computing a mathematical discipline, a scientific discipline, or an engineering discipline? Explain in 50 words or less.

  Systematic approach to building classification models

A classification technique (or classifier) is a systematic approach to building classification models from an input data set. Examples include decision tree classifiers, rule-based classifiers, neural networks, support vector machines, and naïve B..

  How large video memory is required to store image

How large a video memory is required to store a 640 X 480 image during display? A 1600 X 900 image? A 1440 X 1080 image?

  Write name of storage location involved in the code

Recognize each dependency by type; write the two instructions involved; recognize which instruction is dependent; and name storage location involved.

  Store configuration information on motherboard in cmos

Why do you believe the trend is to store configuration information on the motherboard in CMOS setup rather than by using jumpers or switches?

  Designing a game system

Suppose that you are designing a game system that responds to players' pressing buttons and toggling joysticks. The prototype system is failing to react in time to these input events.

  Conditions bubble sort

Discuss why and under what conditions bubble sort may be inefficient when the array to be sorted is very large.

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