Data Structures and Algorithms in Java
6th Edition
ISBN: 9781118771334
Author: Michael T. Goodrich
Publisher: WILEY
expand_more
expand_more
format_list_bulleted
Question
Chapter 4, Problem 43C
Program Plan Intro
Preconditions:
- Consider the scenario that Bob built a website and he just share the URL (Uniform Resource Locator) only to “n” friends from 1 to n.
- The bob told that the friend number “i” can visit the website at most “i” times. He had a counter “C” that keeps track of total number of visits to the site.
- Now, let us determine the minimum number of visits that the Bob’s friend has made during the maximum number of times.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A town wishes to build a trail between city A, city B, city C, city D, and city E. The distances, in miles, between any two of the destinations are given in the table. Use the table to answer parts (a) and (b)
below.
A
B
C
D
E
A
*
154
134
216
129
B
154
*
195
51
243
C
134
195
*
225
220
D
216
51
225
*
308
E
129
243
220
308
*
a) Use Kruskal's algorithm to determine the minimum-cost spanning tree that would link each location to create the least expensive trail. Choose the correct graph below.
A.
ABCD154216225E129
B.
ABCD15419551E129
C.
ABCD15413451E129
D.
ABCD154134216E129
b) If the cost of building such a trail is $3700 per mile, what is the cost of building the trail determined in part (a)?
The cost is:
Only C/C++
What is the security requirement on password hashing?
Given a password w, its hash is calculated as . This question is about the security requirement on function h.
(a) Can we use any function as h for password hashing? For example, can we use the "mod 100" function, which is a common computer science function?
(Given any integer value x, "mod 100" function works by "x mod 100," which is a value between [0, 99]; for example, if x = 105, x mod 100 = 5; x = 1000000, x mod 100 = 0;)
(b) If not, what is the security requirement on h?
Chapter 4 Solutions
Data Structures and Algorithms in Java
Ch. 4 - Prob. 1RCh. 4 - The number of operations executed by algorithms A...Ch. 4 - The number of operations executed by algorithms A...Ch. 4 - Prob. 4RCh. 4 - Prob. 5RCh. 4 - Prob. 6RCh. 4 - Prob. 7RCh. 4 - Prob. 8RCh. 4 - Prob. 9RCh. 4 - Prob. 10R
Ch. 4 - Prob. 11RCh. 4 - Prob. 12RCh. 4 - Prob. 13RCh. 4 - Prob. 14RCh. 4 - Prob. 15RCh. 4 - Prob. 16RCh. 4 - Prob. 17RCh. 4 - Prob. 18RCh. 4 - Prob. 19RCh. 4 - Prob. 20RCh. 4 - Prob. 21RCh. 4 - Prob. 22RCh. 4 - Show that 2n+1 is O(2n).Ch. 4 - Prob. 24RCh. 4 - Prob. 25RCh. 4 - Prob. 26RCh. 4 - Prob. 27RCh. 4 - Prob. 28RCh. 4 - Prob. 29RCh. 4 - Prob. 30RCh. 4 - Prob. 31RCh. 4 - Prob. 32RCh. 4 - Prob. 33RCh. 4 - Prob. 34RCh. 4 - Prob. 35CCh. 4 - Prob. 36CCh. 4 - Prob. 37CCh. 4 - Prob. 38CCh. 4 - Prob. 39CCh. 4 - Prob. 40CCh. 4 - Prob. 41CCh. 4 - Prob. 42CCh. 4 - Prob. 43CCh. 4 - Draw a visual justification of Proposition 4.3...Ch. 4 - Prob. 45CCh. 4 - Prob. 46CCh. 4 - Communication security is extremely important in...Ch. 4 - Al says he can prove that all sheep in a flock are...Ch. 4 - Consider the following justification that the...Ch. 4 - Consider the Fibonacci function, F(n) (see...Ch. 4 - Prob. 51CCh. 4 - Prob. 52CCh. 4 - Prob. 53CCh. 4 - Prob. 54CCh. 4 - An evil king has n bottles of wine, and a spy has...Ch. 4 - Prob. 56CCh. 4 - Prob. 57CCh. 4 - Prob. 58CCh. 4 - Prob. 59CCh. 4 - Prob. 60PCh. 4 - Prob. 61PCh. 4 - Perform an experimental analysis to test the...Ch. 4 - Prob. 63P
Knowledge Booster
Similar questions
- How many can 3 digits be formed using the digits from 1 to 5 if the digit 2 is never there in the number?If f(x) = 2.x^3 and g(x) = x + 1. What is (g o f) (x)?arrow_forwardWrite a PL/SQL program with an IMPLICIT cursor that goes through the table KUCERA and measures the length of each word. Then it should insert every word into the correct table. So a word of length 3 letters, such as SHE would go into the table THREEL. All words with more than 5 letters go into the table MORETHANFIVEL.arrow_forwardIn an RSA system, the public key of a given user is e = 65, n = 2881. What is the private key of this user? Hint: First use trial-and-error to determine p and q; then use the extended Euclidean algorithm to find the multiplicative inverse of 31 modulo n. Write it understandable.arrow_forward
- Her public key certificate is valid from 1000 hours on the 9th November 2013 to 1000 hours on the 9th November 2014, according to Alice's certificate. As of the 15th of March 2014, the certificate was cancelled. This list is published every day at midnight by the CA. Dates are determined by the following:As soon as Alice's certificate arrives in the CRL and as soon as it departs from the CRL, respectivelyPlease describe the solution in detail.arrow_forwardWrite a complete C program using hashing : Prompt the user to search for the student id by the student's namearrow_forwardProgram thisarrow_forward
- Implementarrow_forwardCreate a technique that employs an exponential amount of queries of the following type. The amount is it less than x? to identify a number p/q that is rational and such that 0 p q N. Hint: No two fractions can differ by more than 1/N 2 when their denominators are smaller than N.arrow_forwardThe message M is converted to message digest using the hash function H(). The sender A sends the encrypted message digest to the receiver B and the receiver decrypts the message to authenticate the sender. The private key is called Pr and the public key is called Py respectively. The message received by the receiver is?arrow_forward
- A message is made of 10 numbers between 00 and 99. A hash algorithm creates a digest out of this message by adding all numbers modulo 100. The resulting digest is a number between 00 and 99. Does this algorithm meet the first criterion of a hash algorithm? Does it meet the second criterion? Does it meet the third criterion?arrow_forwardWhich of these is NOT a characteristic of a secure hash algorithm? a. Collisions should be rare. b. A message cannot be produced from a predefined hash. c. The results of a hash function should not be reversed. d. The hash should always be the same fixed size.arrow_forwardAssume: - A password is 4 characters in length, and there 12 different characters from which we can select. - The password file includes 64 passwords, an attacker has a dictionary of 128000 common passwords, and the probability of having a password from password file in the dictionary is 0.2. - Work is defined as number of computed hashes. - Work time = 3xWork seconds. Example: Work = 10 hashes, then Work time = 3x10 = 30 seconds. What is the expected number of hours needed to find the password for a specific user if salts are used and dictionary is used? O 35.307 O 13.973 O 8.640 O Answer not given O 17.579arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education