202247 KES AGA / 2022 Summer Entrance Examination
Department of Creative
Informatics
abe Graduate School of Information
Science and Technology
Al) 3 iS 1 The University of Tokyo
AIS :
Creative Informatics 1
RRAFWRELARARA
eR
1 RREMOSMET, COMMMPER OBC.
LORBO TBCH SARSS MIC BRSTERAT SCE.
REARO SY THREE FHEWE FIC, DOM dDEOTH LO.
BERRONRS KOM, SBHSHLOMBSSESATKEATSCE
PEPE LUMEN FASS RWC.
INSTRUCTIONS,
1. Do not open this booklet until the start of the examination is announced.
2. Write your examinee ID number below on this cover page.
3. You may write on the back of the answer sheet.
4, Write your examinee ID number and the problem number inside the top blanks of
each sheet.
5. Do not bring the answer sheet or this booklet out of this room.
BES / Examinee 1D#14
nr PEOMMETS. Bia 1,2,...,.niHL, fp BMRA TEMS 1 BRS
HBB L. BMD WML ay OWT f(x) = 00 LFS. Ly a =r RHF ERO
FRM (01,..., cn) ERAT TM UMITNS, SHI, BABB OL file) SRA
KF SRTTAMEBER, JL TLORCO ROMAINE ENS. COME
WFO KS HMS NS.
xt Yoke)
&
Py sete De
et
olFER ORR,
(1) Bim 1,2,...,m FROMM IL, BR di(a) = fi(a) — fila — 1) BERL,
dia) a KL CHMMNCS 3 EET So (P) KATORMI TY AL Ag BA
FB.
Step 0: #=1,2,...,.nKHL. 7 O0E TS.
Step 1: AF OPE r BART: i= 1,2, NDB dj(aj +1) ERAKTS
HMOMEIE 7 EL. 2, 2,412 93.
ROBVICBR Le
(-l) r=5,n=3, UT fi, fa, fa BAFOMELSEDETS, TORK di, do,ds ld
HMM CHS CEE L. MRT VAV AA Ag LORE.
(1-2) (af, 23,-..,0) ERATURE TS. CHA (P) OMMBTHS ILE, UFOR
PERMIT CLMAIATH SCL ERE,
ip diet +2) Sin ea?)
(1-3) RAT VAY AL Ag #8 (P) OBMRSHWNT SOLER(2) (1) OFEMIMED READ Me UBA CIA, RAT VAY KL A to (P) ORG
MEMNTSLARSRV. TOT, SVMF SRBC, (P)On er eEN
2NN €(1,2,...,n} E RE {0,1,...,7} KMERALROME (PH) EBA So
x
BAG SaAe
Fe
q i
PD) ae le
a
aEFEROBB, = 1,...,N
COMMODORE oy(R) LIT. ROMWIEBA Le
(1) N > 20K EROPABM ATS gwalo) & flo} OBBAOT. an(R)
Re.
2) (P) DBE ga(r) EMF SDO, WAV MET VY AAO BE 1S
AACA, WR, LOFTY LAB Ap EMR.
(2:8) BIMOEHERT ATY XA Ay (KD (P) DBMS NSC YER.
(2-4) SHORT VY XA Ap OHRME BRT VAY) AL Ac OMBMEBR Ke
PERE LS fy Sn DH HO FINE RE LeProblem 1
Let n and r be positive integers. For i = 1,2,...,7, let fi be a univariate real-valued
function defined in the integer domain and let fi(2) be —oo for negative integer 2,
Any non-negative integer solution (a1,..-,tq) that satisfies 7, 2; = r is called &
feasible solution. In addition, a feasible solution that maximizes the objective function
Shur Jil) is called an optimal solution and the objective function value at the solution
is called the optimal value. This problem is expressed as follows.
Maximize Aled
)) subject to >
ay is a non-negative integer, i= 1,...,2
(1) For i= 1,2,...,n and non-negative integer a, define the function 4)(a) := fi(a] -
fifa —1) and assume that di(q) is non-increasing in terms of a. Apply the following
greedy algorithm Ag to (P)
Step 0: For i= 1,2,...,n, set aj <0.
Step 1: Repeat the following procedure for r times: Let y be any index i that
maximizes d(e;-+ 1) among i= 1,2,...,1, and set ay @ ty +1
Answer the following questions.
(1-1) Let r = 5,n=3, and let fa, fo, fs take the following values. Notice that di, d2, ds,
are non-incroasing. Answer the solution obtained by the greedy algorithm Ac.
fila)
fhla)}-2 1 -14 -40
fola)| 0-8 12 -22
(1-2) Let (xf, 7},...,2%) be 0 feasible solution. Show that it is an optimal solution of
(P) if and only if the following condition holds.
max | di(of +1) < min | di(a7)
Sime aa
(1-3) Show that the greedy algorithm Ag outputs an optimal solution of (P).(2) Unless the non-increasing assumption of (1) holds, the greedy algorithm Ag does
not always output an optimal solution of (P). To apply dynamic programming, we
consider the following problem (Pf) in which n and r in (P) are replaced with NV €
{1,2,....n} and Re {0,1,...,r}, respectively.
y
Maximize VA
a
(Pa)
subject to
7; is a non-negative integer, i iN
‘The optimal value of the problem is denoted by gv(R). Answer the following questions.
(2-1) Express gy(R) only with gr—s(¢) and fry(c) for any non-negative integer c in the
case of N > 2.
(2-2) Write a pscudo-code of @ dynamic programming algorithm within 15 lines to
output the optimal value ga(r) of (P). Hereafter, this algorithm is called Ap.
(2-3) Show that the optimal value of (P) is obtained by the dynamic programming
algorithm Ap.
(2-4) Answer the computational complexity of the dynamic programming algorithm.
Ap and the computational complexity of the greedy algorithm Ag. Ignore the
computational cost of caloulating fi,.... fa20224F EAB / 2022 summer Entrance Examination
Department of Creative
Informatics
aewnaeex Graduate School of Information
: Science and Technology
All eR 2 The University of Tokyo
ANI
Creative Informatics 2
ERAS HSELERARA
ERR
1 RRVAOSMET, COMEMFEMABT Ee.
2 LORMLN FBICH SRRSS MI BASSE BAT SCE
3. MSRMOSOCHKBR HAVER, 5b bHcdeoTo LD.
4 RERLOMESHKMAC, RRBSH LOMESSERAT KEATS CE
5, PERRSLOUMERFGESIBSETE.
INSTRUCTIONS
1. Donot open this booklet until the start of the examination is announced,
2. Write your examinee ID number below on this cover page.
3. You may write on the back of the answer sheet.
4, Write your examinee 1D number and the problem number inside the top blanks of
each sheet.
5, Do not bring the answer sheet or this booklet out of this room.
EE /EramineeID‘This page is blank.LORY.
‘This page is blank.38 21
BRR LEY Ea —AM CONT y PRE HR S,
BY, PAT Y RI = EDD PRA) — BAOHRICKE RT 7A VOT 7 FO-K
ATS. Oy SE OMULBS LU 2 OHMS DW, FHAP EO IAT
YJ Fi DIRS BIBT 7 KADF— FI y PRD SHES DOME
RENT y MAOF-FOPE 1 Ly HULO Ey PRY BRET BIBER 0 Osa
K