VCE Algorithmics (HESS) 2015–2016 · During the 2015–2016 accreditation period for VCE...
Transcript of VCE Algorithmics (HESS) 2015–2016 · During the 2015–2016 accreditation period for VCE...
VCE Algorithmics (HESS) 2015–2016
Written examination – End of year
Examination specifications
Overall conditionsThe examination will be sat at a time and date to be set annually by the Victorian Curriculum and Assessment Authority (VCAA). VCAA examination rules will apply. Details of these rules are published annually in the VCE and VCAL Administrative Handbook.There will be 15 minutes reading time and 2 hours writing time.The examination will be marked by a panel appointed by the VCAA.The examination will contribute 60 per cent to the study score.
ContentThe VCE Algorithmics (HESS) Study Design 2015–2016 is the document for the development of the examination. All outcomes in Units 3 and 4 will be examined. All of the key knowledge and skills that underpin the outcomes in Units 3 and 4 are examinable.Students will not be required to use information and communications technology (ICT) in the examination.
FormatThe examination will be in the form of a question and answer book.The examination will consist of two sections.Section A will consist of 20 multiple-choice questions worth 1 mark each and will be worth a total of 20 marks.Section B will consist of a number of short- and extended-answer questions worth a total of 80 marks. Questions may include short scenarios, case studies, multiple parts and the use of stimulus material.All questions will be compulsory. The total marks for the examination will be 100.Answers to Section A are to be recorded on the answer sheet provided for multiple-choice questions.Answers to Section B are to be recorded in the spaces provided in the question and answer book.
Approved materials and equipment• Normalstationeryrequirements(pens,pencils,highlighters,erasers,sharpenersandrulers)• Onescientificcalculator
Relevant referencesThe following publications should be referred to in relation to the VCE Algorithmics (HESS) examination:• VCEAlgorithmics(HESS)StudyDesign2015–2016• VCAABulletin
©VICTORIANCURRICULUMANDASSESSMENTAUTHORITY2015
Version 2 – September 2015
VCEAlgorithmics(HESS)(Specificationsandsample)–Version2–September2015 2
AdviceDuring the 2015–2016 accreditation period for VCE Algorithmics (HESS), examinations will be prepared accordingtotheexaminationspecificationsabove.Eachexaminationwillconformtothesespecificationsandwill test a representative sample of the key knowledge and skills from all outcomes in Units 3 and 4.The following sample examination provides an indication of the types of questions teachers and students can expect until the current accreditation period is over.Answers to multiple-choice questions are provided on page 25.Answers to other questions are not provided.
ALGORITHMICS (HESS)Written examination
Day Date Reading time: *.** to *.** (15 minutes) Writing time: *.** to *.** (2 hours)
QUESTION AND ANSWER BOOK
Structure of bookSection Number of
questionsNumber of questions
to be answeredNumber of
marks
A 20 20 20B 14 14 80
Total 100
• Studentsarepermittedtobringintotheexaminationroom:pens,pencils,highlighters,erasers,sharpeners,rulersandonescientificcalculator.
• StudentsareNOTpermittedtobringintotheexaminationroom:blanksheetsofpaperand/orcorrectionfluid/tape.
Materials supplied• Questionandanswerbookof24pages.• Answersheetformultiple-choicequestions.
Instructions• Writeyourstudent numberinthespaceprovidedaboveonthispage.• Checkthatyournameandstudent numberasprintedonyouranswersheetformultiple-choice
questionsarecorrect,andsignyournameinthespaceprovidedtoverifythis.
• AllwrittenresponsesmustbeinEnglish.
At the end of the examination• Placetheanswersheetformultiple-choicequestionsinsidethefrontcoverofthisbook.
Students are NOT permitted to bring mobile phones and/or any other unauthorised electronic devices into the examination room.
©VICTORIANCURRICULUMANDASSESSMENTAUTHORITY2015
Version2–September2015
SUPERVISOR TO ATTACH PROCESSING LABEL HEREVictorian Certificate of Education Year
STUDENT NUMBER
Letter
ALGORITHMICS(SAMPLE) 2 Version2–September2015
SECTION A – continued
Question 1AheuristicisatechniquethatwillattempttofindA. aprecisesolutiontoaproblem.B. anoptimalsolutiontoaproblem.C. allofthepossiblesolutionstoaproblem.D. asolutiontoaprobleminareasonabletimeframe.
Question 2Whichoneofthefollowingtypesofalgorithmiscommonlyusedtodeterminetheminimumspanningtreeofagraph?A. PrimB. PageRankC. Bellman-FordD. Floyd-Warshall
Question 3
T(n)=T(n/2)+O(1)
WhichoneofthefollowingisthesolutiontotheaboverecurrencerelationusingtheMasterTheorem?A. Ө(n)B. Ө(n2)C. Ө(logn)D. Ө(nlogn)
Question 4Depth-firstsearchisanalgorithmthatcanbeusedtosearchgraphdatastructures.ThetimecomplexityofsearchingagraphwithVverticesandEedgesintheworstcaseisA. O(log|E |+log|V |)B. O(|E |+|V |)C. O(log|E |)D. O(log|V |)
SECTION A – Multiple-choice questions
Instructions for Section AAnswerallquestionsinpencilontheanswersheetprovidedformultiple-choicequestions.Choosetheresponsethatiscorrectorthatbest answersthequestion.Acorrectanswerscores1,anincorrectanswerscores0.Markswillnotbedeductedforincorrectanswers.Nomarkswillbegivenifmorethanoneansweriscompletedforanyquestion.
Version2–September2015 3 ALGORITHMICS(SAMPLE)
SECTION A – continuedTURN OVER
Question 5WhichoneofthefollowingisabenefitofDNAcomputing,whenimplementingalgorithms,incomparisonwithdigitalmethodsofcomputation?A. DNAcomputingsolvesallalgorithmsmuchfasterthandigitalmethodsofcomputation.B. DNAcomputingprovidesnewcapabilitiesofcomputabilitytheorythatdigitalmethodsofcomputation
donothave.C. EfficiencyisgreateranderrorsarefarfewerwithDNAcomputingthanwithdigitalmethodsof
computation.D. DNAcomputingcanprovidemassiveparallelismthatcanbeusedtospeedupasearchcomparedto
digitalmethodsofcomputation.
Use the following information to answer Questions 6 and 7.
A
B C
D E
H I
F G
Question 6Startingatnode(vertex)A,thefirstfournodesvisitedinadepth-firstsearchareA. A B D EB. A B D CC. A B C DD. A C F G
Question 7Startingatnode(vertex)A,thefirstfournodesvisitedinabreadth-firstsearchareA. A B D EB. A B D CC. A B C DD. A C F G
ALGORITHMICS(SAMPLE) 4 Version2–September2015
SECTION A – continued
Question 8Dynamicprogramminginvolvesusingarecurrencerelationtoidentifyandsolvesub-problemsandthenA. removingduplicatecomputationofsub-problems.B. minimisingthedifferencebetweensub-problemresults.C. backtrackingifthesub-problemhasalreadybeensolved.D. usinganiterativecomputationthatavoidstherepeatedcomputationofsharedsub-problems.
Question 9Themanagerofaverylargerestauranthasdetectedaproblemwiththetimetakentowashallofthedirtydishesthatareinasinglepilenearthesinksinthekitchen.Thebestabstractdatatype(ADT)torepresenttheprocessingofthedishesisaA. tree.B. stack.C. graph.D. queue.
Question 10Analgorithmcontainsaloopinvariant.Ifthealgorithmiscorrect,theloopinvariantmustbeA. trueatalltimes.B. trueonlyattheendofthebodyoftheloop.C. trueonlyatthestartofthebodyoftheloop.D. truebeforetheloopisexecutedandaftertheloophasfinished.
Question 11WhatisaTuringmachineusefulfor?A. analysingthelogicofcomputeralgorithmsasatheoreticaltoolB. theprocessingofalgorithmsusingpracticalcomputingtechnologyC. themodellingofthestrengthsofparticularalgorithms,includingoptimisationD. effectivelymodellingconcurrency,inparticularwithalways-haltingconcurrentsystems
Question 12
…isanalgorithmdesignpatternwhereinaproblemissolvedbysplittingitintosmaller,non-overlappingsub-problems,thenindividuallysolvingthesub-problemsandcombiningtheirsolutionstoformasolutiontotheoriginalproblem.
Whichoneofthefollowingdesignpatternsisdefinedabove?A. minimaxB. backtrackingC. divideandconquerD. dynamicprogramming
Version2–September2015 5 ALGORITHMICS(SAMPLE)
SECTION A – continuedTURN OVER
Question 13WhichoneofthefollowingoperationsistypicallyassociatedwiththegraphADT?A. popB. pushC. indexD. traverse
Question 14Eachofthediagramsbelowdepictsthesameweightedgraph.Assumingboldededgesshowasolution,whichdiagramalsoshowsasolutiontothetravellingsalesmanproblem?
16
43
17
56
32
27
W
XZ
Y
16
43
17
56
32
27
W
XZ
Y
16
43
17
56
32
27
W
XZ
Y
16
43
17
56
32
27
W
XZ
Y
A. B.
C. D.
Question 15An‘undecidable’decisionproblemisonewhereA. itcannotbedecidedhowaTuringmachinecansolvetheproblem.B. itcannotbedecidedbyaTuringmachineiftheproblemhasasolution.C. analgorithmforaTuringmachinetosolvetheproblemcannoteverbefound.D. analgorithmforaTuringmachinetosolvetheproblemcannotpresentlybefound.
ALGORITHMICS(SAMPLE) 6 Version2–September2015
SECTION A – continued
Use the following information to answer Questions 16 and 17.ATuringmachineissetupwiththeinstructionsshowninthefollowingtable,whereeachrowrepresentsonestepofthemachineandHisthehaltingstate.Itbeginsinstate1.
Current state
Tape symbol
Print operation
Head motion
Next state
1 blank 0 left H
1 0 none right 1
1 1 none none 2
2 blank 1 none H
2 0 1 left H
2 1 none right 2
H
Themachineisgiventhefollowingtape.Forthismachine,thetaperemainsstationarywhiletheheadmoves.Thearrowshowsthestartingpositionofthehead.
0 1 1
Question 16AftertheTuringmachine’sfirststep,itwillbeinA. state1andtheheadwillbeonepositiontotheright.B. state2andtheheadwillstillbeatthestartingposition.C. state1andtheheadwillstillbeatthestartingposition.D. thehaltingstateandtheheadwillbeonepositiontotheleft.
Question 17Whichoneofthefollowingbestrepresentsthetape’sappearanceandthepositionoftheheadwhentheTuringmachinehalts?
0 1 1 00 1 1
0 1 1
1
1 0 1 1
A. B.
C. D.
Version2–September2015 7 ALGORITHMICS(SAMPLE)
END OF SECTION ATURN OVER
Question 18Atablecomparingtwoadvancedalgorithmdesignpatternshasbeenprepared.Theleft-handcolumn’sheadingis‘characteristic’.Theremainingtwocolumnsarecurrentlylabelled 1 and 2 .
Characteristic 1 2
canmakeuseofrecursion yes yes
dividesproblemsintosub-problems no yes
equivalenttodepth-firstsearch yes no
Whichoneofthefollowingstatementsiscorrect?A. Label 1 shouldread‘divideandconquer’andlabel 2 shouldread‘backtracking’.B. Label 1 shouldread‘backtracking’andlabel 2 shouldread‘divideandconquer’.C. Label 1 shouldread‘dynamicprogramming’andlabel 2 shouldread‘divideandconquer’.D. Label 1 shouldread‘divideandconquer’andlabel 2 shouldread‘dynamicprogramming’.
Question 19AlimitationoftheChurch-TuringthesisisthatitdoesnotconsiderA. Turingmachines.B. analogcomputing.C. thelambdacalculus.D. algorithmsforcomputingmathematicalfunctions.
Question 20Intheearly1900s,DavidHilbertproposedaprogramtoformalisethefoundationofmathematicsbyestablishingaformalsystemforarithmeticthatwasconsistent,completeanddecidable.ChurchandTuringindependentlyshowedthattheredidnotexistaproceduretocomputetheanswertoanarbitrarystatementinfirst-orderlogicthatwasA. complete.B. decidable.C. completeordecidable.D. completeanddecidableatthesametime.
ALGORITHMICS(SAMPLE) 8 Version2–September2015
SECTION B – continued
Question 1 (5marks)Consideranalgorithmthathasthreeinputvariables,A,BandC,andaselectionoftestdatawheretwopossiblevaluesforeachoftheinputvariablesissuchthat
A={3,5} B={X,Y} C={7,9}
a. Whatisthetotalnumberofpossibletestcasesrequiredtotestthegivendata? 1mark
b. Describetheprocessthatwouldbeundertakentopair-wisetestthealgorithmwiththegivendata.Inyouranswer,giveallofthepossiblepair-wisetestcases. 4marks
SECTION B
Instructions for Section BAnswerallquestionsinthespacesprovided.
Version2–September2015 9 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
Question 2 (6marks)Considerthefollowingtypesofblack-boxtesting:
pair-wise boundaryvalue edgecase errorguessing
Describeandjustifythemostappropriateorderfortestinganalgorithmsolutionifalltypesoftestingweretobecarriedoutonanalgorithm.
ALGORITHMICS(SAMPLE) 10 Version2–September2015
SECTION B – continued
Question 3 (3marks)
A
B C
DE
G
H
I
F
a. Whatisthepathcoverageoftheabovegraph?Stateallpathsaspartofyoursolution. 2marks
b. Howmanypathsneedtobefollowedtoensurebranchcoverageoftheabovegraph? 1mark
Version2–September2015 11 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
Question 4 (4marks)ExplaintheprocessinvolvedwhenDNAcomputingisusedtosolveNon-deterministicPolynomial-time(NP)-hardproblems,suchasthetravellingsalesmanproblem.
ALGORITHMICS(SAMPLE) 12 Version2–September2015
SECTION B – continued
Question 5 (4marks)Considerthefollowingpseudocode.
AlgorithmsearchGraph(start,target) variables:Q,node //Qisaqueue setQtostart repeatuntilQisempty setnodetofirstnodeinqueue setQtoeverynodeexceptfirstnodeinqueue setnode.visitedtotrue foreachsuccessorofnode.neighbours ifsuccessor.visited=falsethen setsuccessor.predecessortonode Q.enqueue(successor) endif endfor endrepeat ifnode=targetthen variables:next setnexttotarget repeatuntilnext=start setnext.tracedtotrue setnexttonext.predecessor endrepeat endif setstart.tracedtotrue
Thepseudocodeaboverepresentsasearchingalgorithmthattakestwoinputs:asetofnodes(start)andthetargetthatisbeingsearchedfor(target).
UsingBig-Onotation,statethetimecomplexityofthealgorithmintheworstcase,wherethenumberofnodesinthesetofnodesisn.Showallworkingandcalculationsinyouranswer.
Version2–September2015 13 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
Question 6 (5marks)Compareaqueueandapriorityqueue.Useexamplesaspartofyourexplanation.
ALGORITHMICS(SAMPLE) 14 Version2–September2015
SECTION B – continued
Question 7 (6marks)
2 3
2
5
6
2
4
8
Stateandexplaintwopropertiesofthegraphabove.Foreachproperty,annotatethegraphtoshowwhereanexampleofthatpropertyislocated.
Property1
Property2
Version2–September2015 15 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
Question 8 (8marks)a. Sketchagraphthatcouldbeusedtomodelthefriendshipnetworkofagroupofsixpeople. 4marks
b. Selecttwoofthepropertiesyouincludedinthegraphabove.Justifytheuseofbothofthesepropertiesinthegraph. 4marks
Property1
Property2
ALGORITHMICS(SAMPLE) 16 Version2–September2015
SECTION B – continued
Question 9 (2marks)Tworesearchersuseequivalentgraphstorepresentthesocialstructureofpeoplewhobelongtoasmallgroup.Oneresearcherusedletterstolabelhergraph,theotherusednumbers.
1
2 3
4
5
6
7
a
b c
d
e
f
g
Inthespacebelow,drawanewgraphthatcombinesthetworesearchers’graphs.Labeleachnodewithtwo labels(letter,number)showingtheconnectionsbetweenthelettersandnumbersinthetwographs.
Version2–September2015 17 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
Question 10 (6marks)
A B C D E F
road ramp ferry
side road
Thediagramaboveshowsvehicleslineduponaroad,readytoboardaferry.Thevehiclesvaryinsizeandweight,andsotheyneedtoberearrangedtobalancetheferry’sloadbeforetheycanbedrivenontotheferry.ThecarsneedtoendupontherampintheorderACEBDF.Thevehiclescanonlybemovedaccordingtothefollowingrules:• oneormorevehiclesmovedfromtheroadtotheramp• oneormorevehiclesmovedfromtheroadtothesideroad• oneormorevehiclesmovedfromthesideroadtotheroad• vehiclesmaynotjumpinfrontoforpassothervehicles
Writeanalgorithminpseudocodethatproducesanend-stateofvehiclesintheorderACEBDFontherampleadingtotheferry.
ALGORITHMICS(SAMPLE) 18 Version2–September2015
SECTION B – Question 11–continued
Question 11 (5marks)Considerthegraphbelowrepresentingthecomputers(A–H)inasmalllocalareanetwork.Thenumbersontheconnectionsrepresentthelengths(inmetres)ofcablerequiredtoconnecteachcomputertotheonesnexttoit.
A
BC
E
H
D
G
F
6
4
3
4
5
3
2
6
3
2
5
2
2
Version2–September2015 19 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
a. Usingthetemplatebelow,drawtheconnectionsbetweencomputerstoshowtheminimumspanningtree.Labelthecablelengthsbetweeneachcomputer. 4marks
A
BC
E
H
D
G
F
b. State,inmetres,theminimumamountofcablerequiredtoconnectallofthecomputersasaminimumspanningtree. 1mark
ALGORITHMICS(SAMPLE) 20 Version2–September2015
SECTION B – Question 12–continued
Question 12 (8marks)SusanhaswrittenasimplerecursivefunctionforgeneratingthenthFibonaccinumber.Forexample, ifn=20,the20thFibonaccinumber,6765,isreturned.
functionfibonacci(n) if n<=1return n returnfibonacci(n−1)+fibonacci(n−2)
Aspartofhertestingofthealgorithm,Susanmeasuredthetimeittooktoreturnavalue.Forn=10,thefunctionreturnedthecorrectresultalmostinstantaneously,butforn=50ittookmorethananhour.Inordertotrytoworkoutwhyitwastakingsolong,Susanconstructedatreeshowingeachcalculationmadebythefunctionforn=5.
fibonacci(5)
fibonacci(4)
fibonacci(3)
fibonacci(2)
fibonacci(1) fibonacci(0)
fibonacci(1) fibonacci(1) fibonacci(0) fibonacci(1) fibonacci(0)
fibonacci(2) fibonacci(2) fibonacci(1)
fibonacci(3)
(5 – 1) (5 – 2)
(4 – 1)
(3 – 1)
(2 – 1) (2 – 2)
(3 – 2) (2 – 1) (2 – 2) (2 – 1) (2 – 2)
(4 – 2) (3 – 1) (3 – 2)
Version2–September2015 21 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
a. i. Whenlookingatherdiagram,whatshouldSusannoticeasthemostlylikelyreasonforherfunction’spoorperformance? 1mark
ii. Explainhowthisreasonaccountsforthefunction’sincreasinglypoorperformanceforincreasingvaluesofn. 2marks
b. i. Outlinehowyouwouldapplydynamicprogrammingtothisproblemtoimprovethefunction’sperformance. 3marks
ii. Explainhowyoursolutionismoreefficientthantheoriginalsolution. 2marks
ALGORITHMICS(SAMPLE) 22 Version2–September2015
SECTION B – Question 13–continued
Question 13 (10marks)Rodneyisdevelopingapattern-matchingalgorithm.Itmustsearchatextstring,T,foragivenstring,G,andstopifitfindsit.IfGisfoundinT,thealgorithmmustoutputthepositionofGinT,otherwiseitmustoutputzero(0).Tohelphimunderstandhowthealgorithmshouldwork,Rodneydecidestosolveasmallerproblemfirstbydrawingastategraphforfindingtheword‘cat’inT.ThediagrambelowshowswhatRodneyhasdrawnsofar.Theupper-caselettersAtoFarelabelsforthepartsofthediagramthatRodneyhasnotyetcompleted.EachtransitioninhisstategraphistriggeredbythereadingofthenextcharacterinT.
char is not ‘c’
char is ‘c’
charis ‘c’
CF
AD E
B
2. Found ‘c’3. Found ‘ca’+ record position
in T1. Searching
no more chars
5. End of T
char is not ‘a’and not ‘c’
char is not ‘t’
Version2–September2015 23 ALGORITHMICS(SAMPLE)
SECTION B – continuedTURN OVER
a. Forthetransitionfromstate2tostate5,whatlabelshouldRodneywriteatA? 1mark
b. Ifstate5isreached,Rodneyexpectssomeactiontotakeplace.
WhatactionshouldbewrittenatB? 1mark
c. Forthetransitionfromstate2tostate3,whatlabelshouldbewrittenatC? 1mark
d. Rodneyhasstartedtodrawatransitionfromstate3labelled‘charisnot“t”(D)’.
Towhichstate(1,2,3or5)shouldthistransitiongo? 1mark
e. Rodneyhasalsostartedanothertransition(E).
Whatshouldthistransitionbelabelled,andtowhichstate(1,2,3or5)shoulditgo? 2marks
f. State4hasnotyetbeendrawnonthediagram.Itisarrivedatviaatransitionfromstate3(F). i. Whatshouldthetransitionfromstate3tostate4belabelled? 1mark
ii. Whatshouldstate4belabelled? 1mark
iii. Whenstate4hasbeenreached,whataction(s),ifany,shouldbecarriedout?Ifyouexpectnoactiontobeundertaken,write‘none’andexplainwhynot. 2marks
ALGORITHMICS(SAMPLE) 24 Version2–September2015
END OF QUESTION AND ANSWER BOOK
Question 14 (8marks)OneargumentagainstSearle’sChineseRoomArgumentisthatacomputerwiththeabilitytointeractwiththeworldthewayahumandoes(forexample,arobot)couldlearnabouttheworldinthesamewayachilddoes.Thecomputercould,therefore,attachmeaningtosymbolsand,indoingso,understandnaturallanguage.
Discussthestrengthsandweaknessesofthisargument.Inyourresponse,provideanoutlineofSearle’sChineseRoomArgumentanditsconnectiontotheTuringtest.
Version2–September2015 25 ALGORITHMICS(SAMPLE)
Answers to multiple-choice questions
Question Answer
1 D
2 A
3 C
4 B
5 D
6 A
7 C
8 D
9 B
10 D
11 A
12 C
13 D
14 D
15 C
16 A
17 A
18 B
19 B
20 B