Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
A company is planning a party for its employees. The organizers of the party want it to be a fun party, so they have assigned a fun rating to every employee (for any employee x, x's fun rating is denoted by fun(x)) and are planning to invite employees that will maximize fun. The employees at the company are organized into a strict hierarchy, which is encoded as a tree T rooted at the president root(T) of the company. Each node is an immediate supervisor of its children. However, there is a restriction: An employee and his immediate supervisor (his parent in the tree) cannot both attend, because otherwise there would be no fun at all.
a) Give an algorithm that makes a guest list for the party that maximizes the sum of fun ratings of the guests. Denoting the total number of company employees by n, your function should have O(n) time complexity. Show the pseudocode, argue that your algorithms is correct, and argue that its complexity is indeed O(n). Again, make sure that for any guest, the guest's immediate supervisor does not attend (and at the same time, that the overall fun rating of guests is maximized).
b) How would you modify your algorithm to always select the president of the company (regardless of his fun rating or the consequences on the overall amount of fun we can achieve)? How would the time complexity change? Show the modification of the pseu- docode, argue that your modification solves this part correctly, and explain what the new time complexity is.
Data Structures and Algorithm Design
Write the selection sort algorithm
Write algorithm to settle following question: A bank account starts out with $10,000. Interest is compounded monthly at 6 percent per year (0.5 percent per month).
Calculate the worst-case run-time complexity of your algorithm and prove optimality of the solution it gives. Suppose that the road is a straight line with a western end and an eastern end.
Which of the system changeover methods is the most expensive? Why? Which of the system changeover methods is the most risky? Why?
In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.
The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.
"Compression algorithms are often used in forensics. Suppose you are involved in a case and have been asked by the lawyer to explain, in general terms.
Assume we tried to simplify RSA cryptosystem using just prime p instead of composite modulus N = pq. As in RSA, we would have encryption exponent.
Compare the average behavior of insertion sort for n elements with that of the n insertions into an initially-empty straight array implementation of a priority queue
Determine the Inorder, preorder and postorder traversal
Question 1. Explain five types of information systems, and give an example of each. Question 2. Describe three common reasons for a systems request. Try and find one not listed in the text.
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!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd