From 3db5dc870321aca73b2f9244862b5a4ccca2d0e6 Mon Sep 17 00:00:00 2001
From: Zackary Glazewski <77465877+zackglazewski@users.noreply.github.com>
Date: Sun, 1 Oct 2023 18:08:33 -0700
Subject: [PATCH 1/6] ZG - add profile picture and info. r
---
_info/staff.md | 6 +++---
...S16-zackGlazewski.jpg => CS24-F23-Zackary-G.jpg} | Bin
2 files changed, 3 insertions(+), 3 deletions(-)
rename _info/staff/{CS16-zackGlazewski.jpg => CS24-F23-Zackary-G.jpg} (100%)
diff --git a/_info/staff.md b/_info/staff.md
index a5f04b1b..441b3468 100644
--- a/_info/staff.md
+++ b/_info/staff.md
@@ -32,9 +32,9 @@ TBD
## Zackary Glazewski, LA
-
+
-Hello everyone! My name is Zack Glazewski and I'm a 3rd year CS Major. I feel very excited to help you all not only learn, but enjoy the process along the way. Some more information about me: I love cats (I have a cat named Link who is bascially my child), playing piano, and developing my own games. I'm always happy to help, so please don't hesitate if you have any questions. I look forward to meeting you all!
+Hello everyone! My name is Zack Glazewski and I'm a 4th year CS Major. I feel very excited to help you all learn and enjoy the process along the way. Some more information about me: I love cats (I have a cat named Link), playing piano, and developing my own games. I'm always happy to help, so please don't hesitate if you have any questions. I look forward to meeting you all!
@@ -50,4 +50,4 @@ Hello everyone! My name is Karanina Zim
-Hello everyone! My name is Torin Schlunk
\ No newline at end of file
+Hello everyone! My name is Torin Schlunk
diff --git a/_info/staff/CS16-zackGlazewski.jpg b/_info/staff/CS24-F23-Zackary-G.jpg
similarity index 100%
rename from _info/staff/CS16-zackGlazewski.jpg
rename to _info/staff/CS24-F23-Zackary-G.jpg
From 03c092e8b030140ae3c217dffa05a5d8132fb9b2 Mon Sep 17 00:00:00 2001
From: Zackary Glazewski
Date: Wed, 15 Nov 2023 16:34:10 -0800
Subject: [PATCH 2/6] ZG - update pa02 writeup
---
backup_pa/Part2RuntimeBenchmarks.svg | 1 +
backup_pa/pa02.md | 65 ++++++++++++++++++----------
2 files changed, 42 insertions(+), 24 deletions(-)
create mode 100644 backup_pa/Part2RuntimeBenchmarks.svg
diff --git a/backup_pa/Part2RuntimeBenchmarks.svg b/backup_pa/Part2RuntimeBenchmarks.svg
new file mode 100644
index 00000000..4f4d0bb0
--- /dev/null
+++ b/backup_pa/Part2RuntimeBenchmarks.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/backup_pa/pa02.md b/backup_pa/pa02.md
index d40b8085..369e7936 100644
--- a/backup_pa/pa02.md
+++ b/backup_pa/pa02.md
@@ -2,8 +2,8 @@
num: pa02
ready: true
desc: "Application of data structures to a movie dataset"
-assigned: 2023-02-23 9:00:00.00-8
-due: 2023-03-14 23:59:59.00-8
+assigned: 2023-11-20 9:00:00.00-8
+due: 2023-12-04 23:59:59.00-8
---
# Collaboration policy
@@ -11,6 +11,8 @@ This assignment must be completed solo.
# Introduction
+Please read the entire writeup before beginning the PA. In particular, take a look at part 3a to understand your requirements for a full score before attempting to implement a solution. You are graded on efficiency.
+
In this assignment, you will
* Use a container data structure from the C++ Standard Template Library (STL) to store and query data.
* Analyze the time and space complexity of your algorithms.
@@ -43,9 +45,14 @@ Obtain the starter code from this repo:
* `input_100_random.csv`
* `input_1000_ordered.csv`
* `input_1000_random.csv`
-
-You are given 6 datasets in CSV files. Each CSV file:
-* has either 20, 100, or 1000 entries
+* `input_76920_ordered.csv`
+* `input_76920_random.csv`
+* `prefix_small.txt`
+* `prefix_medium.txt`
+* `prefix_large.txt`
+
+You are given 8 datasets in CSV files. Each CSV file:
+* has either 20, 100, 1000 76920 entries
* is either ordered in alphabetical order of movie name or ordered randomly
**Example of alphabetical order**
@@ -98,7 +105,7 @@ money train,5.4
## Files to complete
* `movies.cpp, movies.h`: these files should contain any abstractions that you need to define.
- * We strongly discourage implementing any data structures from scratch.
+ * We strongly discourage implementing any data structures from scratch, although you might need to if you want the most efficient solution.
* `main.cpp`: this file should read in the movies from input files and produce the expected output.
* `Makefile`: this file generates the executable `runMovies`
@@ -110,21 +117,17 @@ This assignment has 3 parts. You should **separate your algorithm for part 1 fro
## Command-line arguments
```
-./runMovies filename prefix_1 prefix_2 prefix_3 ... prefix_m
+./runMovies movieFilename prefixFilename
```
-* `filename` represents the input file containing movies and ratings (as described before).
-* `prefix_i` is a prefix for one or more movie names.
+* `movieFilename` represents the input file containing movies and ratings (as described before).
+* `prefixFilename` is a .txt file which contains a list of prefixes, see `prefix_medium.txt` as an example.
* There may be up to `m` such prefixes in the command-line arguments.
- * If a prefix contains white spaces, it must be placed within quotation marks `"`.
+ * Prefixes may include whitespace, see `prefix_medium.txt` for examples. Each line in the file corresponds to exactly one prefix.
-**Example of a prefix with whitespaces**
-```
-./runMovies input_1000_random.csv "the american" ab
-```
# Part 1: Print all movie names and ratings
-Your program should print out all the movies in **alphabetical order of movie name**. You may use **only one data structure** of your choice to store the data from the CSV file. When testing this part, do not give any prefixes as command-line arguments!
+Your program should print out all the movies in **alphabetical order of movie name**. You may use **only one data structure** of your choice to store the data from the CSV file. When testing this part, do not include the prefix file as a command-line argument!
**Example with no prefixes**
```
@@ -159,7 +162,7 @@ If one or more prefixes are given as command-line arguments, then for each prefi
* Find the movies whose names start with that prefix.
* Find the highest rated movie for that prefix.
-You may use additional data structures from the C++ STL to help you solve this part of the assignment.
+You may use additional data structures from the C++ STL to help you solve this part of the assignment, or you may write your own structure.
### Part 2a: All movies starting with a prefix
First, for each prefix, your program should print out all the movies whose names start with that prefix in **decreasing order of rating**. If multiple movies have the same rating, then print them in alphabetical order of movie name. For example, print `the american president, 6.5` before `the confessional, 6.5`. If no movie names start with that prefix, then print
@@ -173,7 +176,7 @@ Second, for each prefix, your program should print the **highest rated** movie w
### Examples
**Example with 3 prefixes and multiple movies with same rating**
```
-./runMovies input_100_random.csv to th w
+./runMovies input_100_random.csv prefix_small.txt
```
This should produce the following output:
```
@@ -205,8 +208,9 @@ Best movie with prefix w is: wings of courage with rating 6.8
```
**Another example multiple movies with same rating**
+*let prefix.txt be a file that contains the prefix "be"*
```
-./runMovies input_1000_random.csv be
+./runMovies input_1000_random.csv prefix.txt
```
should produce the output:
```
@@ -227,8 +231,9 @@ Best movie with prefix be is: before sunrise with rating 7.7
```
**Example with no movies for a given prefix**
+*Let prefix.txt be a file that contains the prefixes: "t" and "xyz"
```
-./runMovies input_100_random.csv t xyz
+./runMovies input_100_random.csv prefix.txt
```
should produce the output
```
@@ -267,11 +272,23 @@ Analyze the worst case Big-O time complexity of your algorithm from part 2 of th
* all `n` movies are already stored in your data structure.
* all `m` prefixes are already stored in an array.
-You must provide the time complexity analysis as a **commented block** right after your `main()` function in `main.cpp`. Note that
+1. You must provide the time complexity analysis as a **commented block** right after your `main()` function in `main.cpp`. Note that
+
* your final answer will be some function of `n`, `m`, and/or `k`.
* your final answer will depend on your data structure and algorithm choices.
-You will be graded for the efficiency of your algorithms but also the clarity and correctness of your analysis. However, we are not giving you a target Big-O time complexity. A set of solutions that have similar Big-O time complexities will receive the same grade.
+2. Your analysis should also report on **specific running times achieved by your solution** on *each* random input file. For example, write down the number of milliseconds it takes for your solution to run on each input. Only report on the randomized datasets.
+
+* Be sure to check that your proposed time complexity from (1) somewhat matches with your runtimes from (2)
+
+You will be graded for the efficiency of your algorithms but also the clarity and correctness of your analysis.
+
+Here are runtime plots of three different types of solutions.
+* **Full credit will be given to solutions with an efficiency similar to `Mystery Implementation #2`**
+* The students with the top 5 runtimes will receive **extra credit**
+
+
+
### Part 3b: Analyze space complexity
Analyze the worst case Big-O space complexity of your algorithm from part 2 of the assignment. You may assume that
@@ -286,7 +303,7 @@ You will be graded for the efficiency of your algorithms but also the clarity an
### Part 3c: Explore tradeoffs between time/space complexity
Briefly state how you designed your algorithm from part 2 of the assignment for the task at hand. More specifically, answer this question:
-* Did you design your algorithm for a low time complexity, a low space complexity, or both?
+* Did you design your algorithm for a low time complexity, a low space complexity, or both? What were your target complexities?
Based on your answer to the question above, answer one of the following:
1. If you designed your algorithm for a low time complexity,
@@ -307,8 +324,8 @@ You will be graded for the clarity and thoughtfulness of your analysis.
## Requirements
For this programming assignment, you will have a lot of flexibility on your implementation (which just means we won't be providing a code framework for you to fill in). However, there are a few requirements that you need to keep in mind as you think about your solution:
-* You must make appropriate use of data structures from the STL
+* You must make appropriate use of data structures from the STL, or implement your own.
* Your code should be readable
* Your classes should define clear interfaces and hide implementation details as much as possible.
-* You must include your space and time complexity analyses in `main.cpp`, as a commented block under the `main()` function
+* You must include your space and time complexity analyses (part 3) in `main.cpp`, as a commented block under the `main()` function
* Your `Makefile` must produce an executable called `runMovies` from the `make` command.
From aa40d93fd22d64bde4f25731b678f85f84a50b92 Mon Sep 17 00:00:00 2001
From: Zackary Glazewski <77465877+zackglazewski@users.noreply.github.com>
Date: Mon, 20 Nov 2023 14:39:04 -0800
Subject: [PATCH 3/6] Update runtime
---
backup_pa/Part 2 Runtime Benchmarks.svg | 1 +
1 file changed, 1 insertion(+)
create mode 100644 backup_pa/Part 2 Runtime Benchmarks.svg
diff --git a/backup_pa/Part 2 Runtime Benchmarks.svg b/backup_pa/Part 2 Runtime Benchmarks.svg
new file mode 100644
index 00000000..12d928b9
--- /dev/null
+++ b/backup_pa/Part 2 Runtime Benchmarks.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
From fe1d0063af177e29f4cd80e0f315984faf3ad4b9 Mon Sep 17 00:00:00 2001
From: Zackary Glazewski <77465877+zackglazewski@users.noreply.github.com>
Date: Mon, 20 Nov 2023 14:39:28 -0800
Subject: [PATCH 4/6] Delete backup_pa/Part2RuntimeBenchmarks.svg
---
backup_pa/Part2RuntimeBenchmarks.svg | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 backup_pa/Part2RuntimeBenchmarks.svg
diff --git a/backup_pa/Part2RuntimeBenchmarks.svg b/backup_pa/Part2RuntimeBenchmarks.svg
deleted file mode 100644
index 4f4d0bb0..00000000
--- a/backup_pa/Part2RuntimeBenchmarks.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
From bd1d2db8dfcc0c785ef1fe51689d4d6b16937cee Mon Sep 17 00:00:00 2001
From: Zackary Glazewski <77465877+zackglazewski@users.noreply.github.com>
Date: Mon, 20 Nov 2023 14:39:47 -0800
Subject: [PATCH 5/6] Rename Part 2 Runtime Benchmarks.svg to
Part2RuntimeBenchmarks.svg
---
...Part 2 Runtime Benchmarks.svg => Part2RuntimeBenchmarks.svg} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename backup_pa/{Part 2 Runtime Benchmarks.svg => Part2RuntimeBenchmarks.svg} (99%)
diff --git a/backup_pa/Part 2 Runtime Benchmarks.svg b/backup_pa/Part2RuntimeBenchmarks.svg
similarity index 99%
rename from backup_pa/Part 2 Runtime Benchmarks.svg
rename to backup_pa/Part2RuntimeBenchmarks.svg
index 12d928b9..93632ab7 100644
--- a/backup_pa/Part 2 Runtime Benchmarks.svg
+++ b/backup_pa/Part2RuntimeBenchmarks.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
From 997af6f2e193b1c536ef8ab43944984c8e6fbb60 Mon Sep 17 00:00:00 2001
From: Zackary Glazewski <77465877+zackglazewski@users.noreply.github.com>
Date: Mon, 20 Nov 2023 14:40:52 -0800
Subject: [PATCH 6/6] Update pa02.md
---
backup_pa/pa02.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backup_pa/pa02.md b/backup_pa/pa02.md
index 369e7936..76eb7701 100644
--- a/backup_pa/pa02.md
+++ b/backup_pa/pa02.md
@@ -283,7 +283,7 @@ Analyze the worst case Big-O time complexity of your algorithm from part 2 of th
You will be graded for the efficiency of your algorithms but also the clarity and correctness of your analysis.
-Here are runtime plots of three different types of solutions.
+Here are runtime plots of three different types of solutions. These runtimes were gathered on the csil machines. If you want to get a proper runtime comparison, please run your code on csil.
* **Full credit will be given to solutions with an efficiency similar to `Mystery Implementation #2`**
* The students with the top 5 runtimes will receive **extra credit**