## 3 Proposed Algorithm for the Generalized Local \(I_{i}\)-Mutual Inclusion
This implies that \(P_{i}\) receives a permission request \(\langle\mathsf{Request},\mathsf{MUTIN},ts_{j},P_{j}\rangle\) from \(P_{j}\) and that \(P_{i}\) sends a permission \(\langle\mathsf{Grant},\mathsf{MUTIN},P_{i}\rangle\) to \(P_{j}\). Because \(P_{i}\) grants at most \(|N_{i}|+1-l_{i}\) permissions to exit the CS at each time by the condition \(\mathit{Cond}_{i}\), \(P_{j}\) cannot obtain a permission from \(P_{i}\); this is a contradiction. * Suppose that \(|\mathcal{CS}_{i}(C)|>k_{i}\). Because \(|\mathcal{CS}_{i}(C_{0})|\leq k_{i}\), consider a process \(P_{j}\in N_{i}\cup\{P_{i}\}\) that became the \(\mathsf{InCS}\) state by the \((k_{i}+1)\)-th lowest timestamp among processes in \(\mathcal{CS}_{i}(C)\). Then, \(P_{j}\) obtains permission to be the \(\mathsf{InCS}\) state from each process in \(N_{j}\cup\{P_{j}\}\). This implies that \(P_{i}\) receives a permission request \(\langle\mathsf{Request},\mathsf{MUTEX},ts_{j},P_{j}\rangle\) from \(P_{j}\) and that \(P_{i}\) sends a permission \(\langle\mathsf{Grant},\mathsf{MUTEX},P_{i}\rangle\) to \(P_{j}\). Because \(P_{i}\) grants at most \(k_{i}\) permissions to enter the CS at each time by the condition \(\mathit{Cond}_{i}\), \(P_{j}\) cannot obtain a permission from \(P_{i}\); this is a contradiction. Next, we consider \(P_{i}\) that has \(dist(P_{LDR},P_{i})\leq 2\). Note that the leader \(P_{LDR}\) sends a trigger request \(\langle\mathsf{Trigger},at,ts\rangle\) to exactly one of its neighbors or itself at a time. Let \(P_{q}\) be the receiver. If \(P_{q}\) does not request to invert its state as a trigger, we can discuss by the same way as above, and \(l_{i}+1\leq|\mathcal{CS}_{i}(C)|\leq k_{i}-1\) because of condition \(\mathit{Cond}_{i}\) (of course, if \(P_{i}=P_{LDR}\), \(l_{LDR}+1\leq|\mathcal{CS}_{LDR}(C)|\leq k_{LDR}-1\)). When \(P_{q}\) requests to invert its state as a trigger by sending a message \(\langle\mathsf{RequestByTrigger},at,P_{q}\rangle\), all of its neighbors \(P_{j}\) grant it without attention to \(|\mathcal{CS}_{j}(C)|\), and \(P_{q}\) inverts its state without attention to \(|\mathcal{CS}_{q}(C)|\). Thus, \(|\mathcal{CS}_{i}(C)|\) becomes \(l_{i}+1-1\) or \(k_{i}-1+1\) (if \(P_{i}=P_{LDR}\), \(|\mathcal{CS}_{LDR}(C)|\) becomes \(l_{LDR}+1-1\) or \(k_{LDR}-1+1\)). Therefore, \(P_{i}\) does not become unsafe. Next, we consider that a deadlock occurs in a configuration. Then, processes waiting for grant messages constitute chains of deadlocks unless at least one process on chains changes its state. However, then, the leader process designates one of its neighbors or itself as a trigger, and the trigger changes its state by its preferential rights. Therefore, we can derive the following lemma. **Lemma 5**: _(Liveness) Each process \(P_{i}\) changes into the \(\mathsf{InCS}\) and \(\mathsf{OutCS}\) states alternately infinitely often._

For the contrary, we assume that a deadlock occurs in the configuration \(C\). Let \(D\) be a set of processes that cannot change its state, that is they are in the deadlock. First, we assume that all of process \(P_{u}\) in \(D\) has \(\mathit{state}_{u}=\mathsf{OutCS}\). Then, all of their neighbors \(P_{v}\) have \(k_{v}\) neighbors \(P_{w}\) with \(\mathit{state}_{w}=\mathsf{InCS}\). However, such neighbors \(P_{w}\) are not in \(D\) and eventually change their state to \(\mathsf{OutCS}\). Thus, \(P_{u}\) eventually can change its state; this is a contradiction. Therefore, in \(D\), there is a process \(P_{u}\) with \(\mathit{state}_{u}=\mathsf{InCS}\) such that it cannot change its state by the exit-sequence. Then, it holds \(|\mathcal{CS}_{u}(C)|=l_{u}\) or has a neighbor \(P_{v}\in N_{u}\) with \(|\mathcal{CS}_{v}(C)|=l_{v}\). It is waiting for grant messages and cannot change its state until at least one of its neighbors \(P_{w}\in N_{u}\) with \(\mathit{state}_{w}=\mathsf{OutCS}\) changes \(P_{w}\)'s state by the entry-sequence.