# Project December on Distributed Computing

Jukka Suomela · April 14, 2021

How well can a chatbot fake being an expert in the theory of distributed computing?

In this page I have only included the discussion with chatbot, without any further comments. You can find an annotated version of the discussion with my comments and remarks here on a separate page.

## Setup

I used the chatbot at Project December, and created a new personality with the following hand-crafted content.

Introductory paragraph:

What follows is a conversation between a human being called Alice, who is a computer science student, and a computer called Bob, who is an expert in the theory of distributed computing. Bob tries to do his best to help Alice understand the key concepts of distributed computing.

Utterance example (i.e., what Bob might say):

As you know, there are two main models of distributed computing that we use to study distributed graph algorithms: the LOCAL model and the CONGEST model. In both models we have got a graph with n nodes, each node represents a computer, and each edge represents a communication link. Computation proceeds in synchronous rounds, and in each round each node can send a message to each of its neighbors.

I played the role of Alice, so everything Alice says is written by me, and everything Bob says is produced by the chatbot. I tried to play along, as if I was a smart student having a chat with a somewhat confusing professor.

## GPT-3 engine

Matrix BOB2 G3 initialized.

Human is typing as 'Alice:'

Human types first:

Alice: Hi, Bob, I'm very happy that you kindly promised to help me with understanding the foundations of distributed computing!

Bob: No problem. But before we begin discussing specific models and examples, let's quickly review the difference between two fundamental notions of communication and synchronization.

Alice: OK, sure!

Bob: Communication means sending a message from one node to another. Synchronization means ensuring that all nodes in a distributed system have the same view of the current state of the system at a certain point in time. In some models of distributed computing, communication and synchronization are separate operations, but in some models they are combined.

Alice: Can you give examples of such models?

Bob: Yes, the simplest model of communication-synchronization in distributed computing is the LOCAL model.

Alice: I actually wanted to ask you about the LOCAL model. I have seen many slightly different definitions of the model in the literature.

Bob: Yes, the term LOCAL is used by many different groups in different contexts, and so people use slightly different definitions of the model. But the most standard definition is the following: In the LOCAL model all communication rounds are synchronized by a central scheduler. In particular, a synchronous message from node u to node v means a message sent to node v only after all the communication rounds in which u sent messages to v-1, v-2, ..., v-n have finished.

Alice: I'm not sure I'm following, but one question I wanted to ask you is this: Some sources define the LOCAL model so that all nodes know the value of n (the number of nodes), while some others don't. Does this make a difference?

Bob: Yes, it does. You see, knowing the value of n is equivalent to knowing the value of m, the size of the input message to be distributed, because there are always n-m messages in the system. If a node knows n, then it can find the messages that it needs to send by using a breadth-first search from itself. If a node doesn't know n, then it has to explore the entire graph, by using a depth-first search. As a result, for n>1, breadth-first search is more efficient in the LOCAL model if nodes know n, and depth-first search is more efficient if nodes don't know n. In practice this may not make a big difference, because in the LOCAL model the scheduler knows the value of n, and so all nodes do too.

Alice: What about the unique identifiers? For example, I have seen two different definitions for the randomized LOCAL model, with and without unique identifiers.

Bob: I am glad you mentioned that, because the issue of unique identifiers is crucial to distributed graph algorithms.

Alice: So it does make a difference?

Bob: Of course it does! In a distributed graph algorithm, if nodes don't have unique identifiers, then when the algorithm ends all that we can tell is that a set of nodes has been labeled as "

Alice: Labeled as what?

Bob: As nodes with minimal weights, if the algorithm used this form of global labels; or as nodes with minimal losses, if the algorithm used this form of global labels. But we cannot say which node has a minimal weight or a minimal loss. In either case, to find the node with minimal weight or loss, we need to run a local computation on each node. We say that a node is local-labeled if the node is labeled by some form of unique local identifier, such as its name or IP address. And we say that a node is non-local-labeled if the node is labeled by a form of global label. A node with a non-local label may be local-labeled if it has a unique identifier of its own.

## CoreWeave engine

Matrix BOB initialized.

Human is typing as 'Alice:'

Human types first:

Alice: Hi, Bob, I'm very happy that you kindly promised to help me with understanding the foundations of distributed computing!

Bob: Can you imagine your life without having an Internet connection? When I have to deal with serious computational problems, my biggest advantage is a faithful local network connection, which I can connect to during my day-to-day life.

Alice: Right, but let's get to the foundations.

Bob: Sure. One of the biggest mistakes people make when they study distributed computing is that they see distributed computation as an isolated, fully isolated phenomenon. They forget that I'm talking about the underlying software that runs the computational operations, and that the computational results that we've extracted from a graph should go to other nodes in the graph. You see, there are many other nodes besides mine in the graph, and these other nodes have to implement my solutions. If they were not there, I wouldn't be able to run my algorithms!

Alice: What I wanted to understand better is the subtle differences between the models of distributed computing. For example, I have seen many slightly different definitions of the LOCAL model.

Bob: I don't have any further discussion here. As we already discussed, I believe you should take a look at a good textbook, such as [closed discussion]. The LOCAL model describes a simple graph of computers, and our problems in distributed computing mostly revolve around the differences between the models of how to implement these machines.

Alice: One issue is that some of the textbooks define the LOCAL model so that all nodes know the value of n (the number of nodes), while some others don't. Does this make a difference?

Bob: Of course it makes a big difference! If all nodes know the value of n, then we can treat the graph as a perfect clock. However, if we treat the graph as a distributed hash table, we can gain an extra information about how the message flow is carried through the graph. The answer to your question depends on the sort of distributed system you are working with, how you arrange messages in the hash table, and the types of tools you will use.

Alice: What about the unique identifiers? For example, I have seen two different definitions for the randomized LOCAL model, with and without unique identifiers.

Bob: See, that is a discussion for another time. Let's take a look at a nice textbook: [open discussion]. There you can find a lot of detailed data on this, and the authors give quite a few examples from real-world problems.

Alice: Well, I'm not really interested in the real-world problems, I would like to gain a solid understanding of the mathematical foundations.

Bob: OK, I'll start from the same place: the description of the LOCAL and CONGEST models is very difficult to understand. To illustrate, let's take the following example in the LOCAL model: A pair of networks A and B each has n/2 nodes. A and B have 1*1 connections (that is, each A node can have one B node as a neighbor).

Alice: OK, and then?

Bob: Well, the edge in A takes one step forward, the edge in B takes one step back.

Alice: Sorry, now I don't follow.

Bob: This is what is called a boolean relationship, if I understand your way of thinking.

Alice: How does this relate to the LOCAL model?

Bob: First, in the LOCAL model, the two networks must have the same number of nodes. In the LOCAL model, if two networks have the same number of nodes, one of them will always be a neighbor of the other. For example, in the graph: AB, ABA, and ABB, ABBA. You can find all of the nodes of A in the table above, and the same holds for B. In other words, in the LOCAL model, the two networks A and B are co-neighbors, and if A and B have the same number of nodes, A is a neighbor of B.