Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Question
Chapter C.4, Problem 7E
Program Plan Intro
Toshow the given equation.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Consider a Diffie-Hellman scheme with a common prime q = 17 and a primitive root α = 3.
a) If user A has a private key XA=4, what is A’s public key, YA?
b) A sends YA to B. If B has a private key XB=6, what is the shared secret key, K that B can calculate and share with A?
c) If B computes YB and sends it to A, what is the shared secret Key, K computed by A?
Consider a logistic regression classifier that implements the 2-input OR gate. At iteration t, the parameters are given by w0=0, w1=0, w2=0. Given binary input (x1,x2), output of logistic regression is given by 1/(1+exp(-w0-w1*x1-w2*x2)).
What will be value of the loss function at t?
What will be the values of w0, w1 and w2 at (t+1) with learning rate ɳ=1?
Many forms of cryptography are based on the following discrete log problem. Choose a cyclic group G (produced by one generator g) with finitely many elements. Alice and Bob want to set up a secret communication and need a secret key for that, which becomes a group element from G. They set up the following exchange (the so-called Diffie-Hellman protocol):
1. Alice chooses a secret group element a and sends unsecured g^a to Bob
2.Bob chooses a secret group element b and sends unsecured g^b to Alice
3. Alice calculates (g^b )^a and keeps this group element secret
4.Bob calculates (g^a )^b and keeps this group element secret
Since a cyclic group is abelian, Alice and Bob now share the secret key (g^b )^a=(g^a )^b. The blue group elements are publicly known, the red elements are secret. The discrete log problem presented to an eavesdropper is computing say a from the publicly known data G,g,g^a. The naming of the problem comes from the solution a= glog(ga ) which is generally difficult to…
Chapter C Solutions
Introduction to Algorithms
Ch. C.1 - Prob. 1ECh. C.1 - Prob. 2ECh. C.1 - Prob. 3ECh. C.1 - Prob. 4ECh. C.1 - Prob. 5ECh. C.1 - Prob. 6ECh. C.1 - Prob. 7ECh. C.1 - Prob. 8ECh. C.1 - Prob. 9ECh. C.1 - Prob. 10E
Ch. C.1 - Prob. 11ECh. C.1 - Prob. 12ECh. C.1 - Prob. 13ECh. C.1 - Prob. 14ECh. C.1 - Prob. 15ECh. C.2 - Prob. 1ECh. C.2 - Prob. 2ECh. C.2 - Prob. 3ECh. C.2 - Prob. 4ECh. C.2 - Prob. 5ECh. C.2 - Prob. 6ECh. C.2 - Prob. 7ECh. C.2 - Prob. 8ECh. C.2 - Prob. 9ECh. C.2 - Prob. 10ECh. C.3 - Prob. 1ECh. C.3 - Prob. 2ECh. C.3 - Prob. 3ECh. C.3 - Prob. 4ECh. C.3 - Prob. 5ECh. C.3 - Prob. 6ECh. C.3 - Prob. 7ECh. C.3 - Prob. 8ECh. C.3 - Prob. 9ECh. C.3 - Prob. 10ECh. C.4 - Prob. 1ECh. C.4 - Prob. 2ECh. C.4 - Prob. 3ECh. C.4 - Prob. 4ECh. C.4 - Prob. 5ECh. C.4 - Prob. 6ECh. C.4 - Prob. 7ECh. C.4 - Prob. 8ECh. C.4 - Prob. 9ECh. C.5 - Prob. 1ECh. C.5 - Prob. 2ECh. C.5 - Prob. 3ECh. C.5 - Prob. 4ECh. C.5 - Prob. 5ECh. C.5 - Prob. 6ECh. C.5 - Prob. 7ECh. C - Prob. 1P
Knowledge Booster
Similar questions
- Write a Python program to create a Markov model of order k, and then use that model to generate text. Our Markov model will be stored in a dictionary. The keys of the dictionary will be k-grams, and the value for each key will also be a dictionary, storing the number of occurrences of each character that follows the k-gram. Note how, for instance, the key 'ga' in the dictionary has the value {'g': 4, 'a': 1}. That is because, following 'ga' in the input text, the letter 'g' appears four times and the letter 'a' appears one time. write the functions: get_grams(text, k): Returns a dictionary of k-grams as described above, using the input string text and the given positive integer k. Do not form k-grams for the last k characters of the text. combine_grams(grams1, grams2): Takes two k-gram dictionaries and combines them, returning the new combined dictionary. All key-value pairs from both dictionaries should be added into the new dictionary. If a key exists in both dictionaries, then…arrow_forwardFor each pair of atomic sentences, give the most general unifier if it exists: 1. P(N, M, z), P(x, y, N). 2. Q(x, y, M), Q(N, M, x). 3. Knows(y, y), Knows(Father(x), x).arrow_forwardComputer Science A way to avoid overfitting in Deep Neural Networks is to add an additional term R to the loss function L (for example L can be the cross entropy loss) as follows: L(w) + λR(w). (1) You know that one choice for R is the L2 norm, i.e. R(w) = ||w||2 2 . One friend of yours from the School of Maths told you however that there’s no need to use squares (i.e. powers of two) and that you can achieve the same effect by using absolute values, i.e. the L1 norm: R(w) = ||w||1. Would you agree with him? i.e. is the use of the L2 norm equivalent to using the L1 norm for regularization purposes? Justify your answerarrow_forward
- Please answer the following question in depth with full detail. Suppose that we are given an admissible heuristic function h. Consider the following function: 1-h'(n) = h(n) if n is the initial state s. 2-h'(n) = max{h(n),h'(n')−c(n',n)} where n' is the predecessor node of n. where c(n',n) min_a c(n',a,n). Prove that h' is consistent.arrow_forwardLet R=ABCDEGHK and F= {ABK→C, A→DG, B→K, K→ADH, H→GE} . Is it in BCNF? Prove your answer.arrow_forwardMatch the following sentence to the best suitable answer: - A. B. C. D. for the linear congruence ax=1(mod m), x is the inverse of a, if__________ - A. B. C. D. What is -4 mod 9 ? - A. B. C. D. The solution exists for a congruence ax=b(mod m) such that GCD(a,m)=1 and - A. B. C. D. (107+22)mod 10 is equivalent to :_________ A. 5 B. c divides b C. GCD(a,m)=1 D. 9 mod 10arrow_forward
- Consider a Diffie-Hellman scheme with a common prime q = 23 and a generator g = 5. Bob has public key PUB(B) = 8, what is the shared secret key K?arrow_forwardShow that for f(n) = 2n2 and g(n) = 20n + 3n2 , f(n) is θ(g(n)). How many ways can it be shown? Also Show that for g(n) = 10n2and f(n) = n! + 3 , f(n) is Ω(g(n)). How many ways can it be shown? Discuss with the instructor.arrow_forwardConsider a Diffie-Hellman scheme with a common prime q = 11 and a primitive root α = 2. Show that 2 is a primitive root of 11. If user A has public key YA = 9, what is A’s private key XA? If user B has public key YB = 3, what is the secret key K shared with A?arrow_forward
- Consider a proof of the following fact: For all n ≥ 4, 2n ≥ n2 What should be proven in the inductive step?(mcqs) a) For n=4, 2n ≥ n^2 b) For n=1, 2n ≥ n2 c) For every k ≥ 4, if 2k ≥ k2, then 2k+1 ≥ (k+1)2 d) 2k ≥ k2arrow_forwardLet's say that Alice and Bob are exchanging keys using Diffie-Hellman key exchange using multiplicative group Z*499 and generator g=7. Let's say that Alice chooses secret exponent x=5 and receives the number 123 from Bob. What number should Alice send to Bob?_______ What number do Alice and Bob compute as their shared secret?________ Express each of your answers as an integer.arrow_forwardSolving using DFS on the below graph A come before Zarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole