MiniProject 1: Create a python script with a function that takes two
real numbers $a$ and $b$ as its inputs. The script should then output
the numbers $a(b-N)$, $\frac ab$, and $a+b+N$, on separate lines,
where $N$ is the number of letters
in your first name. Your script should have the function at the top and then
should have a sample of different calls of the function within the script.
Thus, when you run the script, it should give those different outputs in the console.
MiniProject 2: Create a python script with a function that takes two
positive integers $m$ and $k$ as its inputs. The function then should output
two integers. The first output should be the number of integers between 1 and $m$
(inclusive) that do not have any factors that are the integers 2 through $k$.
The second output should be the sum of those integers.
Your script should have the function at the top and then
should print out instructions for the user.
Next it should ask the user (in the console) to input the numbers $m$ and $k$, and then the script
should output the results.
The main class project is a computational linear algebra project that can be coded either
in R or in python. Undergraduates may choose the platform, and graduate students need to
submit two versions of the same project (one in R, the other in python). Students may choose
a project within each of the categories listed below, but each individual project will be different.
The project must be chosen by April 4 through email correspondence with KR, and
the primary part of the project should be sent to KR by April 14 (worth 85%).
Then KR will send corrections and additional tasks (worth 15%). The final script and associated files
are due by email on
April 21. Students may consult with each other concerning general techniques, but specific
questions should be brought to KR. Students may use publicly available code snippets as long as they
are cited and fully explained with comments (check with KR to be sure).
The project (both primary part and additional tasks) will be graded
according to the following criteria:
Does the project sufficiently cover the given project problem or question?(30%)
Does the code produce the correct outcomes?(30%)
Is the code efficient?(5%)
Are comments placed on every line of code accurate and sufficient to explain the variables and
algorithms used? (20%)
Are code references cited, as needed? (5%)
Does implementation of the project show originality and aesthetic qualities? (10%)
Ratings of ???: You make a GUI that allows people to list favorites in order (Movies, products,
research projects, etc. -- you choose). The program downloads the data into a spreadsheet (csv or xlsx), where the
columns correspond to the things being rated, and the rows correspond to people who are making the ratings.
There should be many empty areas of the spreadsheet.
In a separate program, the column items are given an overall ranking based on the input from the csv file.
How does it do that? There should be more than one method. First, you should make up one method that
does this, using only the csv file data. Second, you should think of different ways of filling in the
missing data randomly, and then calculate averages over the random choices and corresponding sorting.
Third, using some of fill-in methods, use truncated singular value decomposition to change the matrix to
find the overall ranking.
Scheduling groups: A big group of people (eg students) would like to participate in
a number of activities (eg classes or workshops) that occur at 3 (or 4, or 5) different times.
There is a limit to the number of people who can attend each activity (and different activities can
have different limits).
You make a GUI that allows each person to submit their
1st through 5th (or 6th or ...) preferences, and this program updates a spreadsheet (csv file or
xlsx file) with the information (ie preferences). The columns should correspond to the preferences,
and the rows correspond to the people attending. With a separate program, the entire conference/whatever
is scheduled, with the attendees placed in the appropriate activities. The output of the program is also
an xlsx or csv file with all of that information. You get to choose the exact application (eg types
of activities, etc.). The code should be designed to keep people as happy as is possible (ie. minimizing a
unhappiness function), given the
preferences.
Wave decompositions:
Functions $g$ that are periodic of period $L$ means that $g(x+L)=g(x)$ for all $x$, meaning that the graph
repeats itself after $L$ units along the $x$-axis. For example, $\sin(x)$ has period $2\pi$. A Fourier series
decomposes a wave of period $L$ into a linear combination of waves $\sin(\frac{2*\pi}Lx)$,
$\cos(\frac{2*\pi}Lx)$, $\sin(\frac{4*\pi}Lx)$,
$\cos(\frac{4*\pi}Lx)$, etc. These correspond to harmonics in a musical tone. The numbers $\frac{1}L$,
$\frac{2}L$, $\frac{3}L$ are the frequencies of the wave corresponding to the different
harmonics. The constants in the
linear combination are given by integral formulas. In this project, a given wave (given by an input of a
sound or formula or spreadsheet data of a function) is decomposed into its Fourier pieces (i.e. computing
the constants).
They should be illustrated nicely.
Fast Fourier Transform(FFT): The Fast Fourier Transform is a specific algorithm (that is very
efficient) to calculate the discrete Fourier transform of a function (that is assumed to be periodic).
It is similar to the Fourier Series decomposition mentioned above.
This project should compute Fast Fourier transforms (without using built-in functions) and should
illustrate interesting properties. Included in the project should be examples where the discrete Fourier
transform gives both expected and unexpected results. Some knowledge of complex numbers will be used in
this project.
Graphs and Networks:
Directed graphs consist of a collection of vertices (identified by numbers 1 through n) and a
collection of directed edges
([i,j] for an edge from vertex i to vertex j).
This project should (a) draw the directed graph, given the vertex and edge sets. (b) compute properties
of the graph (How many ways can you get from point i to point j in 26 steps?, What is the number of loops
of length 5? Can the graph be drawn without crossings on the plane?)
Sports and Probabilities:
When an individual plays a sport or game, such as tic-tac-toe, baseball, chess, track, golf, checkers, etc.,
there are a finite number of parameters that
determine the current state of the game. (example: some parameters for baseball are score, balls/strikes,
number of outs, people on bases, player batting) If a competitor has played for a long time, one can calculate
probabilities that the game moves from one state to another, and you can put those values into
a matrix. Then by multiplying the matrix by the current state, you can determine the likelihood of
a competitor winning or loosing in 2 moves, 3 moves, etc. This project takes data from a spreadsheet
and determines probabilities of winning/scoring, given the current state of the game.