Skip to content

Commit

Permalink
networking & algorithm classes
Browse files Browse the repository at this point in the history
  • Loading branch information
SichangHe committed Sep 18, 2024
1 parent 0f54943 commit 20ef065
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 21 deletions.
2 changes: 1 addition & 1 deletion linked/JSphere
38 changes: 32 additions & 6 deletions src/notes/class_notes/csci651.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ flow: same source&destination (IP&port) & protocol

NABC for research: need, approach, benefit, competition

## *Some Reflections on Innovation and Invention*, George H. Heilmeier

- think about where field is going, not where it is
- involve researcher throughout deployment & business
- technology transfer: focus on what people "care about", what help people,
not mathematical beauty
- overcome existing benefit haver; marketing
- everything need to work, or else fail
- catechism for DARPA funding/ startup: goal, existing solution,
improvement & novelty, expected outcome, cost estimate

## *The design philosophy of the DARPA Internet protocols*, David D. Clark

- Internet: multiplexed utilization of existing interconnected networks
Expand Down Expand Up @@ -79,16 +90,28 @@ NABC for research: need, approach, benefit, competition

## *BBR: Congestion-Based Congestion Control*, Neal Cardwell, Yuchung Cheng, C. Stephen Gunn, Soheil Hassas Yeganeh, Van Jacobson

- avoid timeout
- better for WAN, cellular, large bandwidth+delay link
- adapt to larger queue routers have now
- avoid timeout & retransmission
- CUBIC struggle to keep many packet in flight because of
long feedback loop
- BBR try to run at performance knee not cliff
- TCP need to measure ideal window size: bandwidth-delay product (BDP)
= bottleneck bandwidth (BtlBw) × RTT (RTprop)
- measure RTT: exponential weighted moving average
(EWMA)—ACK time - sent time
- measure bandwidth: window size & packet loss & ACK rate
- TCP keep probing at equilibrium → oscillation
- router has larger queue now
- clear queue periodically
- pacing: additional to ACK clocking
- measure bandwidth periodically: window size & packet loss & ACK rate
- pacing: additional to ACK self-clocking
- try-faster (ProbeBW state, 98%): send 5/4 pace to
probe bandwidth (multiplicative increase), then send 3/4 to drain queue
- CUBIC keep probing at equilibrium → oscillation
- BBR more aggressive ⇒ dominate bandwidth when sharing
- try-slower (ProbeRTT state): send few packet to clear queue;
probe RTprop by taking minimum
- startup state (slow start)
- exit startup when BtlBw stay same for 3 RTT
- drain mode to clear queue
- converge to fair share

## *BGP Routing Policies in ISP Networks*, Matthew Caesar, Jennifer Rexford

Expand All @@ -97,6 +120,9 @@ NABC for research: need, approach, benefit, competition
community
- manual & unscalable configuration
- trick to enhance security, no systematic solution
- when can avoid BGP: connect to single network, default routing
- BGP multihoming goal: reachability, cost, performance, latency,
reliability, load balancing

## *How the Great Firewall of China detects and blocks fully encrypted traffic*, Wu, Mingshi, Jackson Sippe, Danesh Sivakumar, Jack Burg, Peter Anderson, Xiaokang Wang, Kevin Bock, Amir Houmansadr, Dave Levin, Eric Wustrow

Expand Down
93 changes: 79 additions & 14 deletions src/notes/class_notes/csci670.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ P space: $∃x_1, ∀x_2, ∃x_3, \cdots\text{ s.t.
- P time $\in$ P space (equal?)
- PPAD

\#P: account #solution to NP problem

- each NP problem has \#P problem
- \#P-complete $\subseteq$ P space

linear programming: proved P

learning problem
Expand Down Expand Up @@ -196,18 +201,17 @@ given $G=(V,E,d)$ w/ metric $d$, $k$, want $(S_1,\cdots,S_k)$ s.t.
c_G(i_t)=\frac{w_{i_t}}{|S_{i_t}\cap U_t|} ≤ H(|S_{j_t}|)w_{j_t}
$$

where
[harmonic series](../mathematics/sequence_series.html#harmonic-series)
$H(k)=∑_{i=1}^k\frac{1}{i}$

- [harmonic
series](../mathematics/sequence_series.html#harmonic-series)
$H(k)=∑_{i=1}^k\frac{1}{i}$
- when $h$th (starting from 0) element $V_{\pi_h}$ in
$S_j$ is covered,
$\displaystyle c_G(\pi_n)≤\frac{w_j}{|S_j|-h}$ because at most
$h$ element is covered in $S_j$

### set function

$f:\{S|S\subseteq V\} → R$
$f:\{S|S\subseteq V\}\R$

- salary for group in society
- hypergraph: indicator set function determine if each subset is hyperedge
Expand All @@ -216,17 +220,56 @@ property:

1. grounded: $f(∅)=0$
1. monotone: $∀ S\subseteq T,f(S) ≤ f(T)$
1. submodular: $∀ S\subseteq T,∀ v\notin T$
1. submodular

$$
\nabla f_S(v) ≥ \nabla f_T(v)
$$
#### submodular function

$∀ S\subseteq T,∀ v\notin T$

$$
\nabla f_S(v) ≥ \nabla f_T(v)
$$

- diminishing return: less happier when having more and more chocolate
- discrete derivative: $\nabla f_S(v)=f(S\cup \{v\})-f(S)$
- how much value can $v$ add to $S$
- complementarity: $1 + 1 > 2$
- $f,g$ submodular $⇒ ∀\alpha\in[0,1], \alpha f+(1+\alpha)g$ submodular

problem

- input: submodular $f:\{S|S\subseteq V\} → \R^*$, $k$
- output: $S\subset V$, s.t. $|S|=k$, $\max f(S)$
- oracle model: can get $f(T)$

- example: max cover: for mapping $f:V → B$ choose $k$ element from $V$ to
maximize $|f(S)|$
- greedy algorithm $S'$: at time $t$, add $u_t$ that maximize
$\nabla f_{u_t}(S_{t-1}')$

- diminishing return: less happier when having more and more chocolate
- discrete derivative: $\nabla f_S(v)=f(S\cup \{v\})-f(S)$
- how much value can $v$ add to $S$
- complementarity: $1 + 1 > 2$
- $f,g$ submodular $⇒ ∀\alpha\in[0,1], \alpha f+(1+\alpha)g$ submodular
theorem: $∀f$ monotone & submodular, $∀k$, $f(S')≥(1-\frac{1}{e})f(S^*)$

proof:

$$
S^*=:\{v_1,\cdots,v_k\};\\
f(S^*)≤f(S^*\cup S_t')=f(S_t')+[f(S^*\cup S_t')-f(S_t')];\\
f(S^*\cup S_t')-f(S_t')=
∑_{i=1}^k[f(\{v_1,\cdots,v_i\}\cup S_t')-f(\{v_1,\cdots,v_{i-1}\}\cup S_t')]\\=
∑_{i=1}^k\nabla f_{v_i}(\{v_1,\cdots,v_{i-1}\}\cup S_t')≤
∑_{i=1}^k\nabla f_{v_i}(S_t')=
k\nabla f_{v_i}(S_t')\\≤
k\nabla f_{u_{t+1}}(S_t')=
k[f(S_{t+1}')-f(S_t)]\\
⇒ \delta_t:=f(S^*)-f(S_t')≤k[f(S_{t+1}')-f(S_t)]\\=
k[(f(S_{t+1}')-f(S^*))+(f(S^*)-f(S_t))]\\=
k[-\delta_{t+1}+\delta_t]\\
⇒ \delta_{t+1}≤\frac{k-1}{k}\delta_t≤\cdots≤
\left(1-\frac{1}{k}\right)^{t+1}\delta_0\\=
\left(1-\frac{1}{k}\right)^{t+1}f(S^*)≤
e^{-\frac{t+1}{k}}f(S^*)\\
⇒ f(S'_k)=f(S^*)-\delta_k≥\left(1-e^-\frac{k}{k}\right)f(S^*)
$$

### reachability

Expand All @@ -239,3 +282,25 @@ $f(S)=|\text{Reach}(S)|$
$$
\nabla f_S(v)=|\{x|\text{can reach }x\text{ from }v\text{ but not }S\}|
$$

### network influence

input $G=(V,E),p_e;t=1,\cdots,T$

- dynamic & complex compared to traditional static graph
- network influence maximization: often submodular

#### independent cascade (IC)

each node has probability $p$ to influence

- stochastic network influence; e.g., pandemic
- $S_t=S_{t-1}\cup N(S_{t-1})$
- influence spread $\sigma(S)=∑_{W\in 2^V}\Pr_W[S → W]|W|$
- generally \#P-complete

#### threshold model

each node $v$ has threshold $\theta_v$ to be influenced by neighbor

- deterministic/ stochastic by $\theta_v$, e.g., idea spreading

0 comments on commit 20ef065

Please sign in to comment.