This preview shows page 1. Sign up to view the full content.
Unformatted text preview: [30] Homework 3. Programming Assignment The goal of this assignment is to ﬁnd good approximations of
n (2)
Hn = 1
k2
k=1 and
n! = 1 · 2 · 3 · · · n
for large n (n → ∞).
(2) [15] Evaluation of (Zeta Function) Hn :
(2) Tabulate and plot Hn for a range of n (e.g., 1 ≤ n ≤ 1000) using your favorite programming language (Maple or Mathematica are ﬁne). Based on this numerical computation
(2)
ﬁnd a good approximation of Hn for large n up to a constant term. That is, ﬁnd a simple
(2)
function f (n) (e.g., f (n) = log n) such that Hn ≈ f (n) + constant (and this approximation you should check on your plots and/or tables). For example, your computations may
√
(2)
indicate that Hn ≈ n n + 3.2n + 4 (this is not the correct answer!).
[15] Stirling’s Approximation:
Tabulate and plot n log k
k=1 for a range of n (e.g., 1 ≤ n ≤ 1000). Based on this numerical computation ﬁnd a good
approximation of
n log n! = log k
k=1 for large n up to a log n term, if possible. That is, your answer may look like this
log n! ≈? n2 log n + n + 3 log n.
Include your program in the homework writeup. 1 ...
View Full
Document
 Fall '08
 W.Szpankowski

Click to edit the document details