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 4E
Program Plan Intro
To show that value of the maximum of the binomial distribution b(k; n, p) is approximately for the given statement.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Please written by computer source
Consider the same house rent prediction problem where you are supposed to predict price
of a house based on just its area. Suppose you have n samples with their respective areas,
x(1), x(2), ... , x(n), their true house rents y(1), y(2),..., y(n). Let's say, you train a linear regres-
sor that predicts f(x()) = 00 + 01x(e). The parameters 6o and 0, are scalars and are learned
by minimizing mean-squared-error loss with L2-regularization through gradient descent with
a learning rate a and the regularization strength constant A. Answer the following questions.
1. Express the loss function(L) in terms of x), y@), n, 0, 01, A.
2. Compute L
3. Compute
4. Write update rules for 6, and O1
Consider the same house rent prediction problem where you are supposed to predict price
of a house based on just its area. Suppose you have n samples with their respective areas,
x(¹), x(²),...,x(n), their true house rents y(¹), y(2),..., y(n). Let's say, you train a linear regres-
sor that predicts f(x)) = 0 + 0₁x). The parameters, and 0₁ are scalars and are learned
by minimizing mean-squared-error loss with L1-regularization through gradient descent with
a learning rate a and the regularization strength constant A. Answer the following questions.
1. Express the loss function(L) in terms of x(i),y(i), n, 00, 01, X.
2. Compute L
200
ƏL
3. Compute 20₁
4. Write update rules for 0o and 0₁
Hint:
d|w|
dw
undefined
-1
w>0
w=0
w <0
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
- The task is to implement density estimation using the K-NN method. Obtain an iidsample of N ≥ 1 points from a univariate normal (Gaussian) distribution (let us callthe random variable X) centered at 1 and with variance 2. Now, empirically obtain anestimate of the density from the sample points using the K-NN method, for any valueof K, where 1 ≤ K ≤ N. Produce one plot for each of the following cases (each plotshould show the following three items: the N data points (instances or realizations ofX) and the true and estimated densities versus x for a large number – e.g., 1000, 10000– of discrete, linearly-spaced x values): (i) K = N = 1, (ii) K = 2, N = 10, (iii) K = 10,N = 10, (iv) K = 10, N= 1000, (v) K = 100, N= 1000, (vi) K = N = 50,000. Pleaseprovide appropriate axis labels and legends. Thus there should be a total of six figures(plots),arrow_forwardSolve it, Take Your time but solve needs to be accurate! Thanksarrow_forwardN.png ... If gcd(a, m) = 1, then the unique solution xo to ax = b (mod m) is equal to (1) xo = ab (mod m) (2) xo = ab (mod m), where b is the inverse of b. (3) xo = ām (mod m), where ā is the inverse of a. (4) xo = āb (mod m), where ā is the inverse of a. A Choice (2) (B) Choice (1) Choice (4) (D) Choice (3)arrow_forward
- It is known that a natural law obeys the quadratic relationship y = ax“. What is the best line of the form y = px + q that can be used to model data and minimize Mean-Squared-Error if all of the data points are drawn uniformly at random from the domain [0,1]? r* ur, a,arrow_forwardProve or Disprove: For all real valued functions f, if f(n) is O(n²), then ƒ(2m) is O(m²). Prove or Disprove: For all real valued functions f, if f(n) is O(2¹), then f(2m) is O(2m).arrow_forwardANY help would be greatly appreciated. From 1965 to 1974, in U.S. there were M= 17,857,857 male livebirths and F= 16,974,194 female livebirths. We model the number of male livebirth as a binomial distribution withparameterssize = M+F and prob = p. The following code computes the maximum likelihood estimator for p. male = 17857857 female = 16974194 ll <-function(p){dbinom(male, size = male+female, prob=p, log=TRUE) } ps <-seq(0.01, 0.99, by = 0.001) ll.ps <-ll(ps) plot(ps, ll.ps, type='l') phat <- ps[which.max(ll.ps)] abline(v = phat, col='blue') QUESTION: For this problem, can you give a theoretical formula for the maximum likelihood estimator,ˆp, usingMandF? (No need to compute the numerical value.)arrow_forward
- A random variable X with two-sided exponential distribution given by has moment generating function given by M X (t)= e^ t +e^ -t -2 t^ 2 . f x (x)= x+1,&-1\\ 1-x,&0<= x<=1 - 1 <= x <= 0 (a) Using M_{X}(t) or otherwise, find the mean and variance of X. (b) Use Chebychev inequality to estimate the tail probability, P(X > delta) , for delta > 0 and compare your result with the exact tail probability.arrow_forwardcreate a truth table for a. (p^q) V~q b. r =>(p V q)arrow_forwardShow that T(n) = 8n° + 2n + 1 is in O(n) using the definition of big-Oh. The definition of big-Oh: T(n) = O(f(n)) if there are positive constants c and no such that T(n) s cf(n) whennz noarrow_forward
- Please help step by step with Program R (CS) with explanation and a final code for understanding thank you.arrow_forwardFor a positive integer n, the binomial coefficient C(n,k) is defined as follows if Oarrow_forwardFind Binomial Coefficient for7C5 using dynamic programming approach. Also explain the relevantcomplexity.arrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_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