You are on page 1of 12

allocation

Frequency problem
R= { 91,92 } Allocation I ✓ Allocation 3W
,
93

n uh fi n wtf ,
{ fi fa fz FL }
-

, ,
F-
fz
=
, , , , )
92 we f- a gun
% wtf ,
N = { ( Mi
, 9g ) .
( 92 qz ) }
,
93 turfs

N Allocation a X
a , Ms ) E

9 → ft
different
,

* So r and I get fo
}
,
ins
Gz
frequencies .

~, f,
g,
.

A
A ,
=

¥ ,
Pij ) Each station

one
frequency
gets atleast

l k
k

(
station
A2 = A X Pln ; → 117
jet
pnj ) Each
gets
n -
I E- I at most one

ji
-

frequency .

A
Does
2
specify each statin
gets exactly
"

No
"
one
frequency ?
but why ?
If two stations are nearby they should not

get the same


frequency
In other words if ( M , , 92 ) E N then

They should not


get same
frequency .

.gl/7kaj)j=i
A EP ,

¥ ( big Pnj ) Aci


-

V '
-

ri , an > EN ,n ,
.

for each ( ,

A, Il Az ^
( A
Aiims)
" MEN .
'

msn.%ae.name mi .

j
4 It .
j
a
taj ) ) =

g.
II 419 ; v 7
taj)

s
II ( a
logo v '
Bj )
A, Il Az ^
( A
@ ith)
Aci ,n , ) is satisfiable

C- N

off
allocation
CK F N ) has a frequency .

, ,

Proof : Exercise .
Sudoku problem
blocks
9×9
grid 9

some Cells have some numbers


from d G-
'

9 .

you have to fill all the cells from { 1,2 -93 that
remaining such
.

in have Same nos


A no two cells a row

fame hog
€ no two cells in a Chunn have
u

* no two Cells in a
block have
game nos .
denotes position
Koja
i the
,j

[€¥ k
of cell

denies
.

them?
"

foggy.
is the iff the number in Cell Hs ) is 5

S is an instance of Sudoku (9×9)

write As such that

S has a Solin off As is Satisfiable

ahsfgignmentwig.hn/uhnonfs .
P uns P Program transformations
I 2
= =

High level low level .

P
,
vs
Pag ~)
Pq . .
.
w?Pz

Compiler optimization .

Are
p and Ps Equivalent ?
,
P, P2

/
b) hc / f

itseifcbs
) Ca) "
" C! A&R !

!
if

@lseieqs.csgf.g
"
go ;
else hci ;

{ if a a 7 b) then he
if a then f

)
else if b then
"
g
elite !:{ the g
-

else h
,

Al
Ib ) ah )
V
( ( Taa
( 79117 b ) X
( Gaa g) Xena
if p then
g
else r
= ( page ) v Gpa n )

then else
if p g
r z
( p → g) a Cap → )
n

AZ
write a
formula for Pz and check

A- E Az .

,
P g or Ip page 7bar B
, p→qtp-→r Ba

T T T T
T f T F T T

T T f f T F T T T
T

T F T F F F F f T F

T F F f f f f f T F

T T T
F T T F T T T

F T F F F F f f
T T

f F T F T T
T T T
T

F F F T F F T F F
f

You might also like