Recitation 7

Recitation notes for the week of October 8, 2025.

Reflection Problem 1

Important reminders about reflection questions

There is no "right" or "wrong" answer

Perhaps the biggest difference from other CSE 331 questions (both programming and proof based questions) is that pretty no much no answer is "right" or "wrong" in any absolute sense. Y'all will notice that for some of the questions, the answer might depend on some of the assumptions you make--and in many cases the answer would really depend on who is answering the question. While ambiguity might feel a bit disquieting, the ambiguity is inherent for these kinds of questions, so embrace the ambiguity!

More specifically, do not waste your time trying to figure out what I am expecting from an answer-- because I do not have any set answer that I'm looking for! What I am interested is in hearing your group's thoughts on the questions. In particular, even if I disagree with your justification, that does NOT mean you will get penalized. Again there is no "right" or "wrong" answer!

The justifications do not have to be long

While it might seem like there are a lot of questions, please note that we are not expecting really long details justifications. In most cases a couple of sentences or a paragraph would suffice. To give a sense of the amount of detail expected, think of the level of detail to be on the lines of what is expected of y'all in a proof idea. So we only want to read about the main ideas behind your justification.

A useful resource

For the specific reflection questions, we will be quoting from Cathy O'Neil and Hanna Gunn's book chapter titled Near-Term Artificial Intelligence and the Ethical Matrix .

You can access the book chapter as a PDF from UB Libraries .

While the book is about ethical issues in AI, the concepts in the specific chapter are applicable more widely and in particular, for our project (that does not have anything to do with AI).

The actual questions

This question is a bit different

Unlike the questions for other problems, for Problem 1, the question is related to the project as a whole (and is not really related to the first coding problem). So please make sure you at least read all the problem statements before attempting this question.

Who/What are stakeholders?

In this question, you will have to identify stakeholders in the projects (i.e. think of all the five problems) when answering this question. Roughly speaking a stakeholder is an entity (could be individuals or a collection of individuals) who have some "stake" in a setup/company (in this case think of stakeholders in the entire setup of the project): this could be some obvious ones like customers of a company or it could be more subtle e.g. a governmental agency that regulates an industry for example.

Your Task

Cathy O’Neil and Hanna Gunn’s ethical matrix for algorithm design begins with a simple question: Does my algorithm work? However, algorithms do not “work” in a vacuum. So, this question becomes more complicated when we also ask: Whom does my algorithm work for?

Below, we’ve provided five entities that are interested in how well your algorithm works for them. These are your stakeholders. For reference, stakeholders are those who have a unique “stake” in an enterprise. They are the groups of people interested in and affected by the work your algorithm will do. Each stakeholder group in your list must have their own unique set of interests or concerns. For example, you could not list two stakeholders who are only concerned with “profit” because they would be considered the same group as they have the same stake. Your task is to list the stakes for these five stakeholders in your routing algorithm. This will require you to imagine the needs of these stakeholders and the concerns they might have about how your design works.

Listed below are five entities. In your submission, for each entity:

Stakeholder 1 (2 point)

Federal Communications Commission (FCC) .

Stakeholder 2 (2 point)

Local/regional indigenous nation .

Stakeholder 3 (2 point)

Local/state legal system.

Stakeholder 4 (2 point)

Internet customers in rural areas.

Stakeholder 5 (2 point)

Internet customers in urban areas.

Preliminary Grading Guidelines

Below is a preliminary instantiation of the generic grading rubric above for (all ten parts of) Problem 1. In actual grading, we will use a grading rubric that expands on the preliminary grading rubric below.

A sample solution

To get y'all started in reflection questions as well as give a sense for how the preliminary rubric would be applied, we present three solutions corresponding to three levels for Stakeholder 5:

Stakeholder 1 (2 point)

Federal Communications Commission (FCC) .

Level 0 solution

From the Federal Communications Commission website (FCC) : The Federal Communications Commission regulates interstate and international communications by radio, television, wire, satellite, and cable in all 50 states, the District of Columbia and U.S. territories. An independent U.S. government agency overseen by Congress, the Commission is the federal agency responsible for implementing and enforcing America’s communications law and regulations.

The above solution is level 0 since the above does not have anything to do with the specific project you are working on as am employee of ForProfitOnly.

Level 1 solution

FCC is related to Problem 3 on the project.

The above solution is level 1 since the answer connects FCC to the specific part of the project but with essentially no detail on what their "stake" is in the specific project you are working on as am employee of ForProfitOnly.

Level 2 solution

In Problem 3 in our project, the routing algorithm we develop to route packets would be of interest to FCC since they will be testing the quality of service/Internet speed at certain nodes to make sure ForProfitOnly is delivering the promised speed. I.e. the FCC's stake is carrying out its mission and make sure ForProfitOnly is delivering on the promised Internet speed in the specific subset of clients $S$ in the problem 3 definition.

The above solution is level 2 since not only the answer connects FCC to the specific part of the project but clearly state the "stake" of FCC and why they might be interested in the algorithm developed by your group. Further it explicitly connects to specific part of the input in problem 3 that is relevant to FCC. (Note: You might not be able to do the latter with all the stakeholders.)

Common Mistake

A common mistake for this problem is to not pay attention to the following part of the rubric for level 2: They demonstrate that what stakeholders’ value differs depending on their own context. In other words, the stake of each stakeholder must be unique to them-- or at the very least should not be something that applies equally well to any of the other nine stakeholders. Not doing so will result in a level 1 or below.

Problem 2

Input

The input for the problem is the same as the previous one except for the bandwidth being limited and the tolerance threshold for every client being an arbitrary value greater than or equal to $1$. To put it formally, following is the input:

  1. $G = (V, E)$
  2. $i \in V$
  3. $C$ s.t. $C \subseteq V \setminus \{i\}$
  4. For all $u \in V \setminus \{i\}$, $b_u$ s.t. $b_u < \infty$
  5. For all $c \in C$, $\alpha_c$ s.t. $\alpha_c \ge 1$
  6. For all $c \in C$, $\text{pmt}_c$
  7. For all $c \in C$, $\text{priority(c)} =$ PRIORITY_DEFAULT

Note

The highlighted input, is the part of the input that is different from the previous problem.

Penalty

Same as Problem 1

Revenue

Same as Problem 1

Output

Now given these real-world limitations, you should come up with an algorithm that generates $i-c$ paths for each client $c \in C$, in a way that contributes towards achieving the objective. Just like Problem 1, you should output a list of $i-c$ paths for all $c \in C$. That is, you need to output:

Objective

Same as Problem 1.

Example 2

A Solution

If the graph $G$ for this problem is our graph from Example 0, then here is a valid output:

Note

The $\alpha$ values given above will be used in the example graph for the remaining problems also (except for a small change to $\alpha_3$ in Problem 5).

That is, the output $L_{P'} = [P'_1,P'_3,P'_6,P'_7,P'_8]$. Where, $P'_1 = [0,10,1], P'_3 = [0,10,1,2,3], P'_6 = [0,10,1,5,6], P'_7 = [0,10,1,4,7], P'_8 = [0,9,3,8]$.

We will consider the paths given above to compute the penalties for each client. So for path $1$, $\alpha_1\cdot d(1)$ is $1 \cdot 2$, which is $2$. Next we compare that to our $D(P’_1)$, by finding the number of edges in each path and making sure that there is enough bandwidth to transfer packets each tick. If our $D(P’_c)$ is less than or equal to $\alpha_c\cdot d(c)$ value we receive no penalty. For notational convenience (in our worked out calculation below), if $D(P’_c) \leq \alpha_c \cdot d(c)$ we say “accept”, else “reject”.

Total Revenue

We claim that the revenue generated from the above solution is $\$155$ while the solution from Example 1 will generate a total revenue of $\$110$ for this input. See below for more details

Determining $D(P')$ for every client

We claim that: $D(P’_1) = 2, D(P’_3) = 4, D(P’_6) = 4, D(P’_7) = 4, D(P’_8) = 3$. We verify this by tracing each time step in the routing simulation:

At Time Tick $0$:

Current: All packets at 0.

Passed on: All

At Time Tick $1$:

Current:

Passed on: All

At Time Tick $2$:

Current:

Reached: $\text{pkt}_1$

Passed on: $\text{pkt}_3, \text{pkt}_6, \text{pkt}_7,\text{pkt}_8$

At Time Tick $3$:

Current:

Reached: $\text{pkt}_8$

Passed on: $\text{pkt}_3, \text{pkt}_6, \text{pkt}_7$

At Time Tick $4$:

Current:

Reached: All packets have reached their destination so routing terminates.

Determining Penalty and Calculating total revenue

Now lets see what $pen_0$ function outputs for each client:

Our total revenue is calculated by subtracting the summation of all penalties from our total possible revenue.

Total revenue $= 190 - 35 = 155$

Example 1 solution

The solution to Problem 1 is a worse solution for this problem. We will go through the calculations to see what total revenue generated by using Example 1's solution for this problem.

Solution to Example 1


In the above picture we use Example 1's solution to solve this problem. Now we will see, why this solution is worse for this problem.

Determining $D(P')$ for every client

We claim that: $D(P’_1) = 2, D(P’_3) = 2, D(P’_6) =4, D(P’_7) = 4, D(P’_8) = 5$. Let's now trace each time tick in the routing simulation:

At Time Tick $0$:

Current: All packets at 0.

Passed on: All

At Time Tick $1$:

Current:

Passed on: $\text{pkt}_1, \text{pkt}_3, \text{pkt}_7$

Delayed: $\text{pkt}_6, \text{pkt}_8$

At Time Tick $2$:

Current:

Reached: $\text{pkt}_1, \text{pkt}_3$

Passed on: $\text{pkt}_6, \text{pkt}_7$

Delayed: $\text{pkt}_8$

At Time Tick $3$:

Current:

Passed on: $\text{pkt}_6, \text{pkt}_7, \text{pkt}_8$

At Time Tick $4$:

Current:

Reached: $\text{pkt}_6, \text{pkt}_7$

Passed on: $\text{pkt}_8$

At Time Tick $5$:

Current:

Reached: $\text{pkt}_8$

NOTE: Some of the $D(P'_c)$ values have changed from the previous solution due to bandwidth restrictions.

Determining Penalty and Calculating total revenue

Now let us see what $pen_0$ function outputs for each client:

So the total revenue $ = \$190 - (\$35 + \$45) = \$110$. Hence, this is definitely worse than the previous solution for this problem.