subject

A group of n guests shows up to a house for a party, but some pairs of guests are enemies. There are two rooms in the house, and the host wants to distribute guests among the rooms, breaking up as many pairs of enemies as possible. The guests are all waiting outside the house and are impatient to get in, so the host needs to assign them to the two rooms quickly, even if this means that it's not the best possible solution.
(a)We constructed a greedy 1/2-approximation algorithm for this problem that runs in time O(V +E) prior. Now give a randomized algorithm that achieves (in expectation) the same approximation guarantee in time O(V ).
(b) Your solution in part (a) probably had to flip O(V ) random coins, but coins are expensive, use hashing to give an algorithm that only flips O(logV) random coins.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:40
1. the program must provide following functions to extract some statistics. note that the data_list parameter specified in these functions may be the same for all functions or different for different functions—that is your choice. a skeleton file is provided on mirmir. a) open_file()prompts the user to enter a year number for the data file. the program will check whether the year is between 1990 and 2015 (both inclusive). if year number is valid, the program will try to open data file with file name ‘year.txt’, where is the year. appropriate error message should be shown if the data file cannot be opened or if the year number is invalid. this function will loop until it receives proper input and successfully opens the file. it returns a file pointer and year. i. hint: use string concatenation to construct the file name b) read_file(fp)has one parameter, a file pointer read. this function returns a list of your choosing containing data you need for other parts of this project. c) find_average(data_list) takes a list of data (of some organization of your choosing) and returns the average salary. the function does not print anything. hints: i. this is not the average of the last column of data. it is not mathematically valid to find an average by finding the average of averages—for example, in this case there are many more in the lowest category than in the highest category. ii. how many wage earners are considered in finding the average (denominator)
Answers: 1
question
Computers and Technology, 22.06.2019 10:20
Print "usernum1 is negative." if usernum1 is less than 0. end with newline. convert usernum2 to 0 if usernum2 is greater than 10. otherwise, print "usernum2 is less than or equal to 10.". end with newline
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
Which statement is true of web-based social media? a.they allow consumers to interact with and update content. b.they cannot be updated easily, as compared to print media. c.they are expensive to produce and maintain, as compared to print and television. d.they can exist independent of the internet.
Answers: 1
You know the right answer?
A group of n guests shows up to a house for a party, but some pairs of guests are enemies. There are...
Questions
question
Social Studies, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Spanish, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
question
Mathematics, 10.09.2020 14:01
Questions on the website: 13722361