ProjectCSE105W25: Project

CSE105W25

Due March 19, 2025 at 8am

The CSE 105 project is designed for you to go deeper and extend your work on assignments and to see how some of the abstract notions we discuss can be implemented in concrete ways. The project is an individual assignment and has two tasks:

Task 1: Checking the consistency of two regular properties, and

Task 2: Illustrating a mapping reduction

In each task, you’ll be implementing some of the theoretical concepts we’ve talked about in a programming language of your choosing, and then presenting your reasoning and demonstrating your code. Getting practice with this style of presentation is a good thing for you to learn in general and a rich way for us to assess your skills.

What resources can you use?

This project must be completed individually, without any help from other people, including the course staff (other than logistics support if you get stuck with screencast). You should be the architect of your approach to the project. You can refer to any of this quarter’s CSE 105 offering (notes, readings, class videos, homework feedback). Tools for drawing state diagrams (like Flap.js and JFLAP and the PrairieLearn automata library) can be used to help draw the diagrams in the project too. However, do not copy / screenshot material that was not produced by you directly to your project writeup. Instead, you can refer to it in your own words and include a citation to the resource you referenced.

These resources should be more than enough. If you are struggling to get started and want to look elsewhere online, you must acknowledge this by listing and citing any resources you consult (even if you do not explicitly quote them), including any large-language model style resources (ChatGPT, Bard, Co-Pilot, etc.). Link directly to them and include the name of the author / video creator, any and all search strings or prompts you used, and the reason you consulted this reference. Also, a word of caution, make sure you validate and check any code produced by these aids. Last quarter there were a lot of examples of project submissions that fed the prompt of the project directly to a LLM code generator and got wrong implementations back.

Submitting the project You will submit a PDF plus a video file (.mp4) for each. All file submissions will be in Gradescope. Upload the four files themselves. It is your responsibility to ensure that the files are playable within Gradescope. No Google Drive links, YouTube links, or .mov files.

Your videos:

You may produce screencasts with any software you choose. One option is to record yourself with Zoom; a tutorial on how to use Zoom to record a screencast (courtesy of Prof. Joe Politz) is here:

https://drive.google.com/open?id=1KROMAQuTCk40zwrEFotlYSJJQdcG_GUU.

The video that was produced from that recording session in Zoom is here:

https://drive.google.com/open?id=1MxJN6CQcXqIbOekDYMxjh7mTt1TyRVMl

Please send an email to the instructor (minnes@ucsd.edu) if you have concerns about the video / screencast components of this project or cannot complete projects in this style for some reason.

Task 1: Checking the consistency of two regular properties

When we have a list of desired properties, it’s helpful to know whether there are any examples that satisfy *all* of them at once; in other words, whether the properties are consistent with each other. For example, the properties of a string starting with \(0\) and a string starting with \(1\) are not consistent, because there isn’t any example of a string that simultaneously starts with \(0\) and with \(1\). In this part of the project, you’ll use the decidability of the emptiness problem for DFA to build an algorithm that checks if two given regular properties are consistent.

Specifically:

  1. Write a program in Java, Python, JavaScript, C++ , or another programming language of your choosing that checks the consistency of two arbitrary regular properties. The function input must be a pair of strings and part of your work in this program is to design string representations for any arbitrary DFA since those DFAs will be how you represent the properties. The function output must be a boolean: true (if the pair of strings represent consistent regular properties) or false (if the pair of strings do not represent consistent regular properties).

  2. To demonstrate your program, you will show how it runs (at least) twice: once with the test input \(w_0, w_1\) described above, and once with test input \(x_0, x_1\) that you define to demonstrate when the program outputs true. Your choice of \(x_0, x_1\) needs to satisfy the following conditions:

    As part of your demonstration, describe your choice of \(x_0\) and \(x_1\), clearly specifying the DFAs they represent and the languages recognized by these DFAs. Each demo run of the program should include:

Checklist for submission For this task, you will submit a PDF file plus a 3-5 minute video.

Note: Clarity and brevity are both important aspects of your video. In previous years, we’ve seen students speed up their videos to get below the 5 minute upper bound. This is ok so long as it doesn’t compromise clarity. If the graders need to slow your video down to understand it, it may not earn full credit.

Possible extensions: If you’re enjoying working on this and want to go deeper, here are a few additions you can consider. You will not be graded on any of these, and you should still make sure your project has the core functionality described above, but these extensions give you an opportunity to explore further.

Task 2: Illustrating a mapping reduction

We can use mapping reductions to prove that interesting computational problems are undecidable, building on the undecidability of other computational problems. In this part of the project, you’ll choose a specific mapping reduction from an undecidable language of your choice to \[EQ_{TM} = \{ \langle M_1, M_2 \rangle \mid M_1, M_2 \text{ are Turing machines and } L(M_1) = L(M_2) \}\] and implement a computable function that witnesses it using a programming language of your choice (aka a high-level description of a Turing machine that computes it). You will then demonstrate how your construction works for some test examples.

Specifically:

  1. Choose an undecidable language (other than \(EQ_{TM}\)) that we discussed in class or in the homework or in review quizzes or in the textbook . Note: if you’d like to consider an undecidable language we have not discussed instead, please check with Prof. Minnes first. You must do so no later than the start of Week 10.

  2. Write a program in Java, Python, JavaScript, C++ , or another programming language of your choosing that implements a computable function witnessing this mapping reduction. The function input must be a string and the function output must be a string. Part of your work in this program is to design string representations for arbitrary instances of the model of computation the computational problems being compared in the mapping reduction.

  3. To demonstrate your program, you will need to run it for an example positive and negative instance. That is to say, if you are implementing a computable function witnessing \(X \leq_m EQ_{TM}\), you will select one string that is in \(X\) and one string that is not in \(X\), and you will demonstrate running your program on each of these strings and explain why the output of the function is good.

Checklist for submission For this task, you will submit a PDF file plus a 3-5 minute video.

Note: Clarity and brevity are both important aspects of your video. In previous years, we’ve seen students speed up their videos to get below the 5 minute upper bound. This is ok so long as it doesn’t compromise clarity. If the graders need to slow your video down to understand it, it may not earn full credit.


  1. To see why, notice that \(L(M_0)\) is the set of strings that start with \(0\) and \(L(M_1)\) is the set of strings that start with \(1\).↩︎