.mretdim eht fo taht naht retteb )yltcirts( si lanif eht morf deniatbo egatnecrep eht taht esnes eht ni ,mretdim eht revo tnemevorpmi na swohs maxe lanif esohw stneduts lla dnif ,retsemes a neviG
.tuoba yrrow ot deen t’nod uoy gnihtemos si hcihw ,secalp lamiced fo rebmun dexif a ot pu rebmun laer a etacnurt ot yaw a si ereht ,golorp nI
.retsemes taht rof tneduts eht fo ,001 fo tuo egatnecrep fo smret ni ,kram latot eht ot dnuob si latoT ,eman tneduts a dna retsemes a neviG )latoT- ,emaN+ ,retsemeS+(1yreuq
:etaciderp a enifeD )a( .smargorp ruoy tset ot esabatad siht esu yam uoY .esruoc eht ni epyT fo thgiew eht si egatnecrep dna epyT rof skram mumixam eht si xaM ,}lanif,mretdim,4sa,3sa,2sa,1sa{ fo eno si epyT erehw
Copyright By PowCoder代写 加微信 powcoder
)skram 2( 1 noitseuQ ——————————————————————————————————————————————-
.melborp eht ni deificeps sa stnemirepxe ruoy morf ecnatsni tupni na gniniatnoc hcae pl.>2ecnatsnIyrref< dna pl.>1ecnatsnIyrref< selif owt dna ,melborp yrref eht evlos ot edoc PSA eht rof pl.>yrref< deman elif a :selif eerhT .3
.melborp eht ni deificeps si elif siht fo tamrof ehT .gniroloc hparg htiw stnemirepxe ruoy no troper a si hcihw ,vsc.troper deman elif txet A .2
.ylraelc smelborp eseht lebal esaelP .elif siht ni stnemmoc golorP sa detneserp eb dluohs 2 noitseuQ ot rewsna nettirw ruoY .edoc golorP lla sniatnoc hcihw ,lp.>plc< deman elif A .1
sniatnoc taht redlof a morf deppiz si elif ehT .erawtfos piz tnereffid a esu uoy fi tnereffid eb nac piz noisnetxe elif ehT .piz.>4sa-DI< elif piz eno timbus dluohs uoY
.)PSA( gnimmargorP teS rewsnA tuoba era 7 dna 6 snoitseuQ .4 noitseuQ rof tpecxe setaciderp yrarbil yna esu ot dewolla era uoy ,margorp golorP a gnitirw nI .PSA ni margorp a ro ,)uoy rof noitulos a rof hcraes ot 2/gnilebal ro 1/lebal setaciderp )DF(PLC esu tsum uoy( )DF(PLC gnisu yb ro ,golorP ni rehtie margorp a etirw ot era uoy ,snoitseuq rehto eht fo hcae roF .ycnetsisnoC crA fo euqinhcet eht ot detaler noitseuq nettirw a si 2 noitseuQ .snoitseuq 7 fo stsisnoc tnemngissa sihT
.)L- ,retsemeS+(2yreuq :etaciderp a enifeD )b(
eslaf ;? 53333333333335.18 = X .)X ,mik ,1202_llaf(1yreuq -?
)egatnecreP,xaM,epyT,retsemeS(putes
mrof eht ni ,stnenopmoc esruoc fo putes eht tuoba stcaf emos era erehT
)lanif ,mretdim ,4sa ,3sa ,2sa ,1sa ,emaN ,retsemeS(523c seman etubirtta htiw noitaler a fo mrof eht ni ,523 tupmc rof skram tneduts fo esabatad a evah ew esoppuS
.skram tnemngissa 51 htrow si tnemngissa sihT .mp 55 11 ,6 lirpA ,yadseuT :etaD euD 4 tnemngissA - 523 TUPMC
)6 rpA eud ,2202 retniW( 4 tnemngissA
)6rpAeud,2202retniW(4tnemngissA / 42 ,22 raM :21 keeW / )2202 retniW 1B CEL( 523 TUPMC / sesruoc yM / draobhsaD
SEGAUGNAL GORP LARUDECORP-NON - 2202 retniW - 1B CEL 523 TUPMC
:esac tseT
orez-non ot tes eb ot rettel gnidael eht yfitnedi % yrarbil tsil eht ni etaciderp a ,setacilpud evomer %
ruoy ,rewsna hcae fo dne eht ta ";" gnipyt yB .seulav niamod etairporppa ot dnuob era laog eht ni selbairav eht erehw noitulos a etareneg dluohs
.orez dengissa eb tonnac drow yna ni tib gnidael eht taht etoN .1+N ro N rehtie si 3W fo htgnel eht neht ,N si 2W dna 1W fo htgnel eht fI
.htgnel emas eht fo era 2W dna 1W emussA .3W fo taht slauqe 2W dna 1W fo seulav eht fo noitidda eht taht os stigid tcnitsid htiw sdrow eht ni srettel eht ngissa ot
citemhtiratpyrc yna eldnah ot margorp siht dnetxe ot tnaw ew ,woN .yenom=erom+dnes rof margorp cigol tniartsnoc a nees evah eW
----------------------------------------------------------------------------------------------------------------------------------------------
.devomer eb tonnac ti yhw eugra ot deen uoy ;3-CA yb devomer eb tonnac taht seulav niamod fo 2 elpmaxE ni elpmaxe eno wohs ,nehT .1 elpmaxE ni seulav niamod fo lavomer fo selpmaxe 5 wohs ,tsriF .KCARTKCAB dna 3-CA fo smhtirogla eht ydutS .gnikcartkcab htiw denibmoc ,3-CA dellac ,mhtirogla ycnetsisnoc -cra eht gnisu noitagaporp tniartsnoc fo sliated eht ,ralucitrap ni dna PSC a sa devlos si ukodus woh fo sliated eht sevig etisbew sihT
)stnemmoc golorp sa srewsna ruoy etirw ;noitseuq nettirw a si siht( )skram 2( 2 noitseuQ ------------------------------------------------------------------------------------------------------------------------------------------
."dnuof ton drocer" egassem eht tnirp ,esabatad eht ni ton si drocer eht fI .kraMweN steg epyT erehw retsemeS rof emaN fo drocer eht setadpU )kraMweN+,epyT+,emaN+,retsemeS+(3yreuq
:selzzup citmehtiratpyrc fo selpmaxe rehtO
...... ,9..0 sni sretteL evoba eht oder ot deen reven % ,! ,3W = ]_|3retteLdaeL[ ,2W = ]_|2retteLdaeL[ ,1W = ]_|1retteLdaeL[ ,)sretteL,L(tes_ot_tsil ,)L,3W,W(dneppa ,)W,2W,1W(dneppa
sdrow fo shtgnel eht wonk ot deen uoy fi % ,)N,1W(htgnel -: )3W,2W,1W(tpyrcne trats yam uoy woh si ereH .etanimret dna snoitulos lla etareneg dluohs margorp
.)]Y,E,N,O,M[ ,]E,R,O,M[ ,]D,N,E,S[(tpyrcne -?
,)1N,3W(htgnel
)3W,2W,1W(tpyrcne etaciderp a enfieD .selzzup
.elpmaxe roF
)skram 2( 3 noitseuQ
eurt dnuof ton drocer .)35 ,1sa ,mij ,4102_llaf(3yreuq -?
eurt .)78 ,lanif ,mik ,1202_llaf(3yreuq -? :sesac tseT
.erom eb dluohs ereht ,eman eno tsil tsuj ew ,ereH
:etaciderp a enifeD )c(
]... ,frepa[ = X .)X ,1202_llaf(2yreuq -? :esac tseT
As a conference program chair, you are to assign papers to reviewers, given facts of the form paper(ID, Co-author1, Co-author2, Subject)
reviewer(Name, Subject1, Subject2)
where each paper is identified by its id number, co-authors (for simplicity assume no more than two; for single-authored papers, Co-author2 is
filled with xxx), and subject area, and each reviewer is identified by name and two subject areas of expertise. For example, the input data may look like
paper(2, john, lily, ai). paper(3, ken, xxx, database). reviewer(audrey, ai, logic). ......
What we want is a paper review assignment satisfying
(1) No one reviews his/her own paper;
(2) For a reviewer to review an assigned paper, one of his/her areas of expertise must match the paper's subject. (3) Each paper is assigned to 2 reviewers; and
(4) No reviewer is assigned more than k papers, where k will be given as a fact: workLoadAtMost(k).
You should write a program so that a paper assignment is generated by
where W1 and W2 denote a list of papers assigned to each be reviewed by two people. Positions in a list represents a paper ID. E.g.
W1 = [lily,john,...] W2 =[peter, ann,...]
means that paper #1 is assigned to lily and peter, and paper #2 to john and ann, etc. Papers will be numbered consecutively starting from 1. this instance for an example.
----------------------------------------------------------------------------------------------------------------------------------------
.elif vsc.troper detelpmoc eht timbuS .margorp ruoy yb desu sroloc fo rebmun eht yfidom ot deen lliw uoy ,rebmun citamorhc s'hparg a dnif ot redro nI .)rebmun citamorhc sti( ecnatsni na evlos ot dedeen sroloc fo rebmun muminim eht sa llew sa ,elif vsc.troper dedulcni eht ni sredaeh evitcepser eht rednu scitsitats emit eht tropeR .elif piz siht ni dedulcni shparg eht htiw ti tset dna margorp hcus yna pu kcip ot deksa era uoy ,noitseuq siht nI .hparg regral a si ereh dna ,esac tset a htiw eno si ereh ,.g.E .melborp gniroloc hparg eht evlos taht smargorp PSA emos nees evah eW
lanoitpo si scitsitats egasu yromem gnitroper ,noitseuq siht roF :etoN
)skram 2( 6 noitseuQ ----------------------------------------------------------------------------------------------------------------------------------------
)skram 3( 5 noitseuQ ------------------------------------------------------------------------------------------------------------------------------------------------
.enif era tsilpam dna =# sa hcus setaciderP .dfplc morf tcnitsid_lla ro esopsnart .g.E :setaciderp eseht gninifed ezilaivirt taht setaciderp yrarbil esu tonnac uoY :tnemeriuqeR
.snoitinifed eseht ni gnillif yb margorp siht etelpmoc ot si boj ruoY .gnissim era woleb setaciderp eerht eht fo snoitinifed eht erehw ,margorp siht htiw trats dluohs uoY .setaciderp eseht fo emos rof snoitinifed nwo ruoy etirw ot deksa era uoy ,noitseuq siht nI .desu era snoitinifed yrarbil emos erehw ukoduS fo melborp eht sevlos taht margorp a si ereht ssalCe ni 21 keeW nI
)skram 2( 4 noitseuQ --------------------------------------------------------------------------------------------------------------------------------------------
)skram 2( 7 noitseuQ
.)2W,1W(ngissa -?
1/tcnitsid-llax ,2/esopsnartx ,2/dirg
regnad=sdaor+ssorc semag=llab+esab trebor=dlareg+dlamod
.tey noissimbus a edam ton evah uoY
noissimbus ddA
.cte ,ezis MAR ,deeps rossecorp sa hcus ,enihcam eht fo rewop gnitupmoc eht troper ,enihcam ruoy no detcudnoc stnemirepxe roF
.enihcam ruoy ro ,enihcam bal ruo fo setunim 2 nihtiw elbavlos eb tsum secnatsni ruoy taht si tnemeriuqer rehtonA .)selcihev eht fo lla dna yrref eht fo noitacol eht sredisnoc etats a erehw( emit reilrae na ta derrucco taht etats a staeper ti fi detsaw si pets A .spets detsaw-non 01 tsael ta evah tsum nalp gnitluser eht taht hcus eb dluohs secnatsni ehT .tupni rof stcaf rehto dna snoitacol fo rebmun eht enimreted uoY .srac 5 htiw rehto eht dna srac 4 htiw eno ,secnatsni melborp owt poleved neht dna ,)stnemmoc sa elif eht ni deificeps( stniartsnoc emos gnidda yb krow edoc eht ekam ot deksa era uoy ,tsriF .pl.2nIyrref dna ,pl.1nIyrref ,pl.0nIyrref ,secnatsni melborp eerht htiw gnola ,melborp yrref eht rof edoc PSA etelpmocni emos nevig era uoy ,noitseuq siht nI
)2202 retniW 1B CEL( 523 TUPMC )tuo goL( naY gnehcgneP sa ni deggol era uoY
)0( stnemmoC
stnemmoc noissimbuS
- sruoh 5 syad 2 MP 95 11 ,2202 lirpA 6 ,yadsendeW dedarg toN tpmetta oN .1 tpmetta si sihT
deifidom tsaL gniniamer emiT etad euD sutats gnidarG sutats noissimbuS rebmun tpmettA
sutats noissimbuS
liamE pleH
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com