+ All Categories
Home > Documents > Balanced Programming - SJTU

Balanced Programming - SJTU

Date post: 15-Feb-2022
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
66
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction Baby step giant step Another Example Meet in the middle Thanks Balanced Programming Group Static Shanghai Jiao Tong University December 27, 2016 Group Static Balanced Programming
Transcript
Page 1: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balanced Programming

Group Static

Shanghai Jiao Tong University

December 27, 2016

Group Static Balanced Programming

Page 2: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Overview

1 Introduction

2 Baby step giant step

3 Another Example

4 Meet in the middle

Group Static Balanced Programming

Page 3: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Features

Kind of a useful designing idea.

Easy implementation and good performance in practice.

Group Static Balanced Programming

Page 4: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Features

Kind of a useful designing idea.Easy implementation and good performance in practice.

Group Static Balanced Programming

Page 5: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balances

Balanced in learning from each each other.

Balanced in the problem-solving processes.

Group Static Balanced Programming

Page 6: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balances

Balanced in learning from each each other.Balanced in the problem-solving processes.

Group Static Balanced Programming

Page 7: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Available occiasion

There are two algorithms, both of which have differentfeatures, such as one can answer queries very quickly and theother cam handle modification swiftly.

There is an algorithm to solve the problems, but is quitecomplicated. Actually this algorithm is not the best choice inpractice. The idea of balanced programming might be used toproduced a suitable algorithm.

Group Static Balanced Programming

Page 8: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Available occiasion

There are two algorithms, both of which have differentfeatures, such as one can answer queries very quickly and theother cam handle modification swiftly.There is an algorithm to solve the problems, but is quitecomplicated. Actually this algorithm is not the best choice inpractice. The idea of balanced programming might be used toproduced a suitable algorithm.

Group Static Balanced Programming

Page 9: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Overview

1 Introduction

2 Baby step giant step

3 Another Example

4 Meet in the middle

Group Static Balanced Programming

Page 10: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Problem

Find a smallest non-negative number x satisfying

Ax ≡ B (mod P)

which P is a prime, A,B ∈ [0,P).

Group Static Balanced Programming

Page 11: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach

According to Fermat Theorem, when A,P are coprime, we have:

AP ≡ A (mod P)

the only special case is A = 0, and in this case, B must be zero.

For A ̸= 0, we can just iterate x from 0 to P− 1 to check ifAx ≡ B (mod P). The complexity is O(P).

Group Static Balanced Programming

Page 12: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Yet Another Naive Algorithm

We mapped Ax → x, x ∈ [0,P) by using a Hash-Table.

In order to find B, we just need to query B in this Hash-Table,which only takes O(1) time.

Precalculating this Hash-Table costs O(P) time, and the totalcomplexity of which is O(P + 1) = O(P).

Group Static Balanced Programming

Page 13: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balanced Programming

First we choose a number S ∈ [1,P− 1].We mapped Ax → x, x ∈ [0,S) by using a Hash-Table.Calculate A−S by using Fast Exponentiation.

In this step, we needs S + log P operations.

Group Static Balanced Programming

Page 14: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balanced Programming

Ax ≡ B (mod P)

x can be represented as i× S + j, we can do such transforming:

Ai×S+j ≡ B⇔ Aj ≡ B× (A−S)i (mod P)

which j ∈ [0,S), and i < PS .

We can just iterate i from 0 to PS to check if B× (A−S)i is in

Hash-Table. In the worst occasion, we need to iterate PS times.

Group Static Balanced Programming

Page 15: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Total complexity evaluation

As you can see, the total operations we need to do are

S + log P +PS

we want to choose S optimally to get the best total complexity.

when S =√

P, the total operations are:

S + log P +PS = 2

√P + log P = O(

√P)

thus we get an O(√

P) algorithm by choosing S optimally.

Group Static Balanced Programming

Page 16: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Overview

1 Introduction

2 Baby step giant step

3 Another Example

4 Meet in the middle

Group Static Balanced Programming

Page 17: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Another Problem

an undirected graph

add x to uquery neighbors’sumO(m) = n

Group Static Balanced Programming

Page 18: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Another Problem

an undirected graphadd x to u

query neighbors’sumO(m) = n

Group Static Balanced Programming

Page 19: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Another Problem

an undirected graphadd x to u

query neighbors’sumO(m) = n

Group Static Balanced Programming

Page 20: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Another Problem

an undirected graphadd x to u

query neighbors’sumO(m) = n

Group Static Balanced Programming

Page 21: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Another Problem

an undirected graphadd x to uquery neighbors’sum

O(m) = n

Group Static Balanced Programming

Page 22: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Another Problem

an undirected graphadd x to uquery neighbors’sum

O(m) = n

Group Static Balanced Programming

Page 23: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Another Problem

an undirected graphadd x to uquery neighbors’sumO(m) = n

Group Static Balanced Programming

Page 24: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 1

store the value v[x]

O(n) spaceO(1) time for addO(n) time for query

Group Static Balanced Programming

Page 25: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 1

store the value v[x]O(n) space

O(1) time for addO(n) time for query

Group Static Balanced Programming

Page 26: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 1

store the value v[x]O(n) spaceO(1) time for add

O(n) time for query

Group Static Balanced Programming

Page 27: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 1

store the value v[x]O(n) spaceO(1) time for addO(n) time for query

Group Static Balanced Programming

Page 28: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 2

store the sum s[x]

O(n) spaceO(n) time for addO(1) time for query

Group Static Balanced Programming

Page 29: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 2

store the sum s[x]O(n) space

O(n) time for addO(1) time for query

Group Static Balanced Programming

Page 30: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 2

store the sum s[x]O(n) spaceO(n) time for add

O(1) time for query

Group Static Balanced Programming

Page 31: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 2

store the sum s[x]O(n) spaceO(n) time for add

O(1) time for query

Group Static Balanced Programming

Page 32: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 2

store the sum s[x]O(n) spaceO(n) time for add

O(1) time for query

Group Static Balanced Programming

Page 33: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Naive Approach 2

store the sum s[x]O(n) spaceO(n) time for addO(1) time for query

Group Static Balanced Programming

Page 34: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Observation

bad when large deg(x)

”heavy” when deg(x) > B

Group Static Balanced Programming

Page 35: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Observation

bad when large deg(x)”heavy” when deg(x) > B

Group Static Balanced Programming

Page 36: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Heavy-Light Divide

Group Static Balanced Programming

Page 37: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Heavy-Light Divide

Group Static Balanced Programming

Page 38: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Combined Approach

s[x] =∑v[heavy neighbors] +∑v[light neighbors]

for∑

v[heavy neighbors]use approach 1for

∑v[light neighbors]

use approach 2

Group Static Balanced Programming

Page 39: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Combined Approach

s[x] =∑v[heavy neighbors] +∑v[light neighbors]

for∑

v[heavy neighbors]use approach 1for

∑v[light neighbors]

use approach 2

Group Static Balanced Programming

Page 40: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Add(u, x) details

if u is heavy,vh[u]← vh[u] + x

if u is light,sl[v]← sl[v] + x,u, v are neighborsO(1) time for heavyO(B) time for light

Group Static Balanced Programming

Page 41: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Add(u, x) details

if u is heavy,vh[u]← vh[u] + x

if u is light,sl[v]← sl[v] + x,u, v are neighborsO(1) time for heavyO(B) time for light

Group Static Balanced Programming

Page 42: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Add(u, x) details

if u is heavy,vh[u]← vh[u] + xif u is light,sl[v]← sl[v] + x,u, v are neighbors

O(1) time for heavyO(B) time for light

Group Static Balanced Programming

Page 43: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Add(u, x) details

if u is heavy,vh[u]← vh[u] + xif u is light,sl[v]← sl[v] + x,u, v are neighborsO(1) time for heavy

O(B) time for light

Group Static Balanced Programming

Page 44: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Add(u, x) details

if u is heavy,vh[u]← vh[u] + xif u is light,sl[v]← sl[v] + x,u, v are neighborsO(1) time for heavyO(B) time for light

Group Static Balanced Programming

Page 45: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Query(x) details

∑v[heavy neighbors] =∑y is heavy neighbor vh[y]

∑v[light neighbors] = sl[x]

O(1 + cnt_heavy) timecnt_heavy · B ≤ 2m = O(n)O(n/B) time

Group Static Balanced Programming

Page 46: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Query(x) details

∑v[heavy neighbors] =∑y is heavy neighbor vh[y]∑v[light neighbors] = sl[x]

O(1 + cnt_heavy) timecnt_heavy · B ≤ 2m = O(n)O(n/B) time

Group Static Balanced Programming

Page 47: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Query(x) details

∑v[heavy neighbors] =∑y is heavy neighbor vh[y]∑v[light neighbors] = sl[x]

O(1 + cnt_heavy) timecnt_heavy · B ≤ 2m = O(n)O(n/B) time

Group Static Balanced Programming

Page 48: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Query(x) details

∑v[heavy neighbors] =∑y is heavy neighbor vh[y]∑v[light neighbors] = sl[x]

O(1 + cnt_heavy) time

cnt_heavy · B ≤ 2m = O(n)O(n/B) time

Group Static Balanced Programming

Page 49: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Query(x) details

∑v[heavy neighbors] =∑y is heavy neighbor vh[y]∑v[light neighbors] = sl[x]

O(1 + cnt_heavy) timecnt_heavy · B ≤ 2m = O(n)

O(n/B) time

Group Static Balanced Programming

Page 50: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Query(x) details

∑v[heavy neighbors] =∑y is heavy neighbor vh[y]∑v[light neighbors] = sl[x]

O(1 + cnt_heavy) timecnt_heavy · B ≤ 2m = O(n)O(n/B) time

Group Static Balanced Programming

Page 51: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balance

O(n) space

O(B) time for addO(n/B) time for querymake B =

√n

O(√

n) for each operation

Group Static Balanced Programming

Page 52: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balance

O(n) spaceO(B) time for add

O(n/B) time for querymake B =

√n

O(√

n) for each operation

Group Static Balanced Programming

Page 53: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balance

O(n) spaceO(B) time for addO(n/B) time for query

make B =√

nO(√

n) for each operation

Group Static Balanced Programming

Page 54: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balance

O(n) spaceO(B) time for addO(n/B) time for querymake B =

√n

O(√

n) for each operation

Group Static Balanced Programming

Page 55: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Balance

O(n) spaceO(B) time for addO(n/B) time for querymake B =

√n

O(√

n) for each operation

Group Static Balanced Programming

Page 56: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Overview

1 Introduction

2 Baby step giant step

3 Another Example

4 Meet in the middle

Group Static Balanced Programming

Page 57: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Search algorithm

Search algorithmexponential :O(xdepth)

Group Static Balanced Programming

Page 58: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Meet in the middle

Given an undirectedgraph whose nodes’degree is 5 and finda path from S to T.

dist(S, T) = LO(4L)

Meet in the middleO(4L/2)

Group Static Balanced Programming

Page 59: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Meet in the middle

Given an undirectedgraph whose nodes’degree is 5 and finda path from S to T.dist(S, T) = L

O(4L)

Meet in the middleO(4L/2)

Group Static Balanced Programming

Page 60: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Meet in the middle

Given an undirectedgraph whose nodes’degree is 5 and finda path from S to T.dist(S, T) = LO(4L)

Meet in the middleO(4L/2)

Group Static Balanced Programming

Page 61: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Meet in the middle

Given an undirectedgraph whose nodes’degree is 5 and finda path from S to T.dist(S, T) = LO(4L)

Meet in the middleO(4L/2)

Group Static Balanced Programming

Page 62: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Some other applications

Mo’s algorithm

Blocked listDinic(capacity is 1)......

Group Static Balanced Programming

Page 63: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Some other applications

Mo’s algorithmBlocked list

Dinic(capacity is 1)......

Group Static Balanced Programming

Page 64: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Some other applications

Mo’s algorithmBlocked listDinic(capacity is 1)

......

Group Static Balanced Programming

Page 65: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Some other applications

Mo’s algorithmBlocked listDinic(capacity is 1)......

Group Static Balanced Programming

Page 66: Balanced Programming - SJTU

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

IntroductionBaby step giant step

Another ExampleMeet in the middle

Thanks

Thanks

Thanks for listening.Questions are welcomed.

Group Static Balanced Programming


Recommended