You are on page 1of 3

離散數學作業 電資⼆ 于可風

111820028

3 1,5
procedure duplicates
lnnan.inlegersinnndareusg.rder ki
jiiz it
then
ajiaj
kiktl
Ck

awiinanzài
ji j.tn procedure topthreeln.az auiintgers
if a Mz then a and a
jiejti interchange

cu.u lki.tn desired list if apg then interchange hand as


if a Mz then interchange a.andaz

decreasingorder
thefirstthree elements are innon

3.2g
a xhgxis not OM.ms is toosmall 2 4 4 34
gx grows slowly thuuxgsozx2txu.PE
叫 is the answer I上了 ⼼0

dgy4 is insignificant compared to xg therefore theanswer is 比5
E4 kl
For large X the fraction iscloseto 1 Take no y thefunction is ON ⼆
0以
time u for largen
anumber dseto 1 is not
lessthan a constant
Notethat my will notdogbecause

flyt ⼼必 以 for all X71 witnesses are


以and
my since for large xi fly王⽂kl tl
fcxjtbx'N GforallX71 witnesses are libkil
3.2.10
for an 妙 in 们
If it lij
thendividingbyDXEL.Since the latterconditioncannot
L V4 is not01刈

Ǘ
hold for all large X nomatterwhatvalue oftheconstant

3.3.1
tttij is excuted12timessothenumberof operations isOLD

The assignment statement is exlltdi 䛓times Thenumberofoperations isOlnj

5.4.8

iii
if 叫 then return 1
eh rtture sum of first M th

12357894671112 3 41517896 1 2 3 4 S 67M

啊吼啊 吼 啊 9 吼吼啊 呱 8 9
7.1.5
Hani number of ways to deposit h dollarsin undine
dollars
we wantto deposit udollars wemay startwith a dollarcoinandthen deposit in
an 1 waysto deposit n dollars
wemay startwith a dollar billandthendeposit in dollars
an1 waysto deposit n dollars
wemay startwith a dollarcoinandthen deposit usdollars
Unswaysto deposit n dollars
Therefore the relation is
aizamthy
47 a ⼆1 ayaiztyanzigaaih Each of sequence
ul's und B's corresponds
to a way to deposit n dollars means todeposit acoin Bmeans to deposit
a bill
7,1

I Compute Us no recurrence relation


dsihytnr2 16tkB 出⼆ 2 7 th y 140tfizgg
a 2as tu ⼆2'33 2 68 ⼆2788
542 16
以⼆ 比thiz.bg 444 agizgtua ⼆
Qnizagtas 2592 33 1217

1217ways to deposit 10diary

7.1.25

A bit string of 7 length has even number.to's


and only if it has and odd number of 1S Since the sum

of number of O's and l's namely 7 is odd


Due to the symmetric of Omdly theremust be as many以bit strings
with an even number of 0s as there with an Odd number of0s

Aus ihizi64
7.3.2
The relation is fln2H以 ⼆ 2

fy o flzjilotiiz.tl4 ˋ22 tzi 6


fgl ⼆2 6 2 14 HM 214 2
3of 32 62 fl6 州
4
fc 吋 2126 tzi25

You might also like