MAT5939-03 ACM Computing Seminar – Fall 2016

Course Information (syllabus)

Time & Place: Monday 6:45PM - 8:00PM, LOV 102
Instructor: Matt Hancock
Office Hours: Tues 12-2, Thurs 2-4, 409 B MCH
Email: mhancock@math.fsu.edu

Resources

Programming Language Guides

Programming assignment resources

Assignments

Week Assignment
1 <2016-08-29 Mon> Install gcc / g++; write and compile "hello world".
2 <2016-09-12 Mon> Compute the value of the truncated sum,
  \(s_N := \sum_{n=1}^N \frac{1}{n^2}\)
  and the absolute error,
  \(a_N := \vert{}\frac{\pi^2}{6} - s_N\vert{}\)
  while \(a_N > 10^{-5}\). For each iteration, print
  \(N\), \(s_N\), \(a_N\)
  if \(N\) is a multiple of \(100\).
3 <2016-09-19 Mon> The files, x.txt, and y.txt contain 101 sampled
  points. The x values are not sampled equidistantly.
  Write functions to read both files, and approximate
  the definite integral of the sampled function over
  the values given, using the trapezoidal rule.
  Modularize your code, i.e., use header and
  implementation files
4 <2016-09-26 Mon> Add a member function, norm, to the vector class
  discussed in the C++ guide. The function should
  have the signature:
   
  double norm(double p);
   
  and should implement the vector p-norm. The function
  would be then called like:
   
  x.norm(1.53);
   
  where x is a vector object. Write a test script
  that loops through values of p=1, 1.1, ..., 1.9, 2
  and for each value of p, prints the average p-norm
  of 100 vectors of length 10 whose components are
  uniform random on [0,1] (see the C++ guide section
  on generating random numbers).
5 <2016-10-03 Mon> Extend the vector class given in the guide, by
  adding functions dot, operator+, operator-,
  and operator==. Implement these as friend
  functions.
   
  dot should implement the inner product between
  two vectors, x and y, while operator+ and
  operator- should implement component-wise addition
  and subtraction.
   
  The behavior of operator== should be
  such that x==y returns true for vectors if
  abs(x[i]-y[i]) < 1e-10
  for all the components of the vectors, x and y.
7 <2016-10-17 Mon> Write a squarematrix class that inherits from the
  matrix template class. The constructor should only
  accept a single argument to create the matrix, rather
  than two like the normal matrix class.
   
  Add a member function, unique to the squarematrix
  class, that computes the matrix determinant
  recursively using the Laplace expansion. Test your
  algorithm on square matrices, \(A \in R^{n \times n}\),
  where \(A_{ij} = ni + j\), where \(i=0,\ldots,n-1\) and
  \(j=0,\ldots,n-1\) for \(n=2,3,\ldots,100\).