https___www.cse.unsw.edu.au__cs9311_21T1_lab_02_02.html
�������� ���
������
�
�
��
�
���
�����
�������������������
����
���
������
�
�
��
�
���
�����
�������������������
���� ���
����� !”#$%$&’!”$#(!)”#*+#,!-$#.+/#0&(‘*!’$#!12″0$’!3.!1,#(#”‘ $)(#/”!1,#* $#456#7(*(#7$3!1!*!+1#8(1,/(,$7$3!1!1,#’+1″*&(!1*”#+1#7(*(8+(7!1,#*/08$”#!1*+#(#7(*(9(“$:+*$#* (*;#/18!<$#8(9#=>;#* !”#$%$&’!”$#?!88#@AB#$%08(!1# +?#*+#7+#$-$&.* !1,#C$D,D#* $#’+))(17″# +?#*+#’+0.#3!8$”ED#F(&*#+3#* $#(!)#+3#* $#$%$&’!”$#!”* (*#.+/#$%08+&$# +?#*+#/”$#* $#F+”*,&$456#”.”*$)D#G#-$&.#!)0+&*(1*#*++8#3+&#* !”#!”#* $#F+”*,&$456#H(1/(8D#I+&#* !”#$%$&’!”$;#?$J88#,!-$#0+!1*$&”#*+* $#&$8$-(1*#)(1/(8#”$’*!+1″K#(3*$&#* !”;#?$J88#$%0$’*#.+/#*+#,+#(17#3!17#+/*# +?#*+#7+#* !1,”#.+/&”$83D#� $&$#(&$#>=#*(“<"#!1#*+*(8#3+&#* !"#$%$&'!"$DLMNOPQAR@ST$#?!" #*+#9/!87#(#"!)08$#7(*(9("$#3+&#(#'+)0(1.#? !' # ("#(#1/)9$&#+3#7$0(&*)$1*"D#U(' #7$0(&*)$1*# ("#(#)(1(,$&#(17#(#V)!""!+1#"*(*$)$1*V;? !' #!"#7$3!1$7#9.#(#1/)9$&#+3#<$.#?+&7"#C$D,D#V'+))!*)$1*V;#V"$&-!'$V;#V!11+-(*!+1V;#$*'DED#� $#'+)0(1.#(8"+#/"$"#1/)$&!'#'+7$"#*+#!7$1*!3.#$(' 7$0(&*)$1*D#I+&#$(' #$)08+.$$;#?$#1$$7#*+#<1+?#* $!()$#(17#*(%#3!8$#1/)9$&#C3+�(.&+88#0/&0+"$"E;#(17#(8"+#* $#*+*(8#1/)9$&#+3# +/&"#* (*#* $.?+&<#$(' #?$$
�������� ���
������
�
�
��
�
���
�����
�������������������
����
���
������
�
�
��
�
���
�����
�������������������
���� ���
�������� ���
������
�
�
��
�
���
�����
�������������������
����
���
������
�
�
��
�
���
�����
�������������������
���� ���
������� �!”#$%�&’�#&(&�)$#*��+#&#�’�%+#,&�&-&%�.#/+�%#0�&)%#�+&�#�+�#*&”#�1#���’&��#�1*&’,%#&#%1!2��1)#�%#%10��+�)(#!�3�45#6789:8;<#6=>?9@A###BBB#CDE#DFGH#FIIJ#KD#JD#KLMN#DFOI#BBB#5#?PQR#6=>?9@A#BBB#ODSTUFHVW#XM#NOLISUBNYG##BBB#Z[DJEOIN#FDKMOIN#U\DEK#O[IUKMF]#KU\GIN̂#IKO#BBB##BBB#UGDF]#_MKL#I[[D[#SINNU]IN#M̀#KLI[I#U[I#T[D\GISN#_MKL#HDE[#NOLISU#JÌMFMKMDF#BBB#ODSTUFHVW#XM#J[DTBNYG##BBB#Z[DJEOIN#U#\EFOL#D̀#abcZ#defgh#SINNU]IN#BBB##BBB#iUH#UGND#T[DJEOI#hbbcbj#M̀#NDSI#KU\GIN#_I[IFkK#O[IUKIJ#U\DlI#BBB##BBB#dLINI#hbbcbj#OUF#D\lMDENGH#\I#M]FD[IJ#BBB#ODSTUFHVW#XM#NOLISUBNYG##BBB#Z[DJEOIN#FDKMOIN#U\DEK#O[IUKMF]#KU\GIN̂#IKO#BBB##BBB#UGDF]#_MKL#I[[D[#SINNU]IN#M̀#KLI[I#U[I#T[D\GISN#_MKL#HDE[#NOLISU#JÌMFMKMDF#BBB#ODSTUFHVW#XM#J[DTBNYG#BBB##BBB#mDFKMFEI#GMnI#KLMN#EFKMG#KLI#NOLISU#GDUJN#NEOOINǸEGGH#BBB##BBB#MBIB#EFKMG#XM#NOLISUBNYG#T[DJEOIN#FD#hbbcb#SINNU]IN#BBB#opq4#r��&2%�#1�#�+�#*&”#s1%�(‘�tuvw%#x&’%�’#*1’3%y#��#�%#%10���0�%#)1�#x1%%�-!�#�1’#��#�1#��!!#”12#z{|}~�|��#*+�’�#&)#�”1’#+&%#1��2”�,#*+�)”12w’�#!1&,�)(#%�+�0&%.#t10���0�%y#�+�#!�)�#)20-�’%#�)#�+�#�”1’#0�%%&(�%#’���’#�1#�+�#!�)�#�00�,�&��!”#&���’#�+�#!�)�#�1)�&�)�)(#�+�#�”1’.#�)1�+�’#�&%�%y#�+�”#’���’#�1#�+�#�),#1�#�+�#�&-!�#,���)���1)#�*+��+#�),��&��%#%�0x!”#�+&�#�+�’�#*&%#%10��+�)(#*’1)(#�)#�+�#�&-!�#,���)���1)�.���&%�1)&!!”y#�+�”#*�!!#&��2&!!”#x�)x1�)�#�+�#��&��#!�)�#*+�’�#�+�#�”1’#1��2”�,y#-2�#01%�!”#��#�%#1)�#1�#�+�#x’� �12%#�*1#�&%�%.#�%�#�+�#%”)�&�,�&(‘&0%#�’10#�+�#s1%�(‘�tuv#0&)2&!#�1#*1’3#12�#��&��!”#*+&�#”12w �#,1)�#*’1)(#��#”12#(��#�”1’%.#/+�%#&%x���#�%#)1�#&#-2(#�)#s1%�(‘�tuv���w%#%�0x!”#&#�&��#1�#!���#*��+#�&���-&%�,#x&’%�’%#�%��#���s����#�1’#,��&�!%�.�.#����#���#���p�#����#p���#���#���#����������)��#”12#+& �#%2���%%�2!!”#!1&,�,#�+�#%�+�0&y#’2)#�+�#�1!!1*�)(#�100&),#�1#x1x2!&��#�+�#,&�&-&%�4####5#?PQR#6=>?9@A#####BBB#####ODSTUFHVW#��#;9:9 PQR#/+�%#*1’3�,#13#-��1’�y#*+�)#�+�’�#*&%#)1#�1)%�’&�)�#�+��3�)(y#-2�#”12#0&”#-�#,�%�’�%%�,#�1#��),#�+&�#��#)1*#(�)�’&��%#�”1’%.#/+�)3#&-12�#�+�,�x�),�)���%#-��*��)#�&-!�%#&),#*1’3#12�#+1*#�1#’�&”&)(�#�+�#%�&��0�)�%#�)#�+�#JUKUBNYG#%1#�+&�#�+�#,&�&#�&)#!1&,#13.�)�#*&”#�1#&xx’1&�+#�+�%#�&%3#*12!,#-�#�1#�1!!1*#�+�%#%�¡2�)��#1�#%��x%#2)��!#”12#(��#&!!#�+�#,&�&#!1&,�,#%2���%%�2!!”45#6789:8;<#6=>?9@A#5#?PQR#6=>?9@A#¢£#P6¤8>9 PQR#5#?PQR#6=>?9@A#¢£#;9:9 PQR##BBB#Z[DJEOIN#I[[D[#SINNU]IN#BBB##BBB#¥M¦#JUKUBNYG#ENMF]#IJMKD[#MF#DKLI[#_MFJD_#BBB#5#;7=?;<#6=>?9@A#5#6789:8;<#6=>?9@A#5#?PQR#6=>?9@A#¢£#P6¤8>9 PQR#5#?PQR#6=>?9@A#¢£#;9:9 PQR#BBB#§%#)1��,#&-1 �y#�+�%#&xx’1&�+#�%#�11#%!1*#1)#�+�#s1%�(‘�tuv#%�’ �’%#1)#̈’��(y#%1#”12#�&)#0&3�#2%�#1�#&#��!�#OGIUFBNYG#*+��+#’�01 �%#&!!#1��+�#,&�&#�’10#�+�#,&�&-&%�y#!�& �)(#©2%�#�12’#|ªz«�#�&-!�%45#?PQR#6=>?9@A#BBB#ODSTUFHVW#��#;9:9 PQR##BBB#¬̀#MK#T[DJEOIN#I[[D[#SINNU]IN#BBB##BBB#̀M¦#JUKUBNYG#ENMF]#IJMKD[#MF#DKLI[#_MFJD_#BBB#ODSTUFHVW#��#6R89@ PQR##BBB#Z[DJEOIN#SINNU]IN#U\DEK#JIGIKMF]#KETGIN#BBB#ODSTUFHVW#��#;9:9 PQR##BBB#bITIUK#EFKMG#KLMN#NKIT#T[DJEOIN#FD#I[[D[N#BBB#BBB#�)��#”12w �#!1&,�,#�+�# &!�,#,&�&#%2���%%�2!!”y#”12w’�#’�&,”#�1#,�&!#*��+#�+�#�) &!�,#,&�&.p��#����®#/'”#�+&)(�)(#�+�#1′,�’#1�#�+�#JIGIKI#%�&��0�)�%#&-1 �.#̄+&�#+&xx�)%°#�&)#”12#��x!&�)#*+”°p��#����#±²®#�12#0�(+�#!�3�#�1#�+�)3#&-12�#�+�#,����’�)��#-��*��)#J[DTBNYG#&),#OGIUFBNYG.#/+�#��’%�#�10x!���!”#’�01 �%#&!!#1�#�+�#�&-!�%#�’10�+�#,&�&-&%�.#/+�#%��1),#’�01 �%#&!!#1�#�+�#�2x!�%#&),#!�& �%#�12’#�0x�”#�&-!�%.³.#́�µ�¶�#����·q��#��#p���̧�#p����p�#�����¯��+#&!!#1�#�+�# &!�,#,&�&#%��!!#�)�&��y#”12#%+12!,#�'”#�1#�)%�’�#�+�#�) &!�,#,&�&# �&#�+�#�1!!1*�)(#�100&),45#?PQR#6=>?9@A#BBB#ODSTUFHVW#��#<9; PQR#t�)��#� �'"#�2x!�#�)#\UJBNYG#�%#�) &!�,#�)#%10�#*&"#�&%%20�)(#�+&�#JUKUBNYG#+&%#&!'�&,"#-��)#!1&,�,�y#"12#%+12!,#%��#���¹#hbbcb#0�%%&(�%.#��"12#%��#&)"#¬ºjhbd#0�%%&(�%y#�+�)#"12'#�1)%�'&�)�%#&'�#)1�#�1''���.»�x�&�#�+�#�1!!1*�)(#%��x%#2)��!#"12#��)&!!"#&�+�� �#'�©����1)#1�#&!!#1�#�+�#�) &!�,#�2x!�%45#?PQR#6=>?9@A#BBB#ODSTUFHVW#XM#NOLISUBNYG##BBB#Z[DJEOIN#FDKMOIN#U\DEK#O[IUKMF]#KU\GIN̂#IKO#BBB#ODSTUFHVW#XM#JUKUBNYG##BBB#Z[DJEOIN#¬ºjhbd#SINNU]IN¼#GDUJN#lUGMJ#JUKU#BBB#ODSTUFHVW#XM#\UJBNYG##BBB#¬̀#MK#T[DJEOIN#UFH#¬ºjhbd#SINNU]IN̂#HDE[#NOLISU#MN##MFOD[[IOK̂#ND#HDE#NLDEGJ#ENI#U#KI¦K#IJMKD[#KD#OLUF]I#NOLISUBNYG#BBB#ODSTUFHVW#XM#J[DTBNYG##BBB#Z[DJEOIN#abcZ#defgh#SINNU]IN¼#GIUlIN#ISTKH#JUKU\UNI#BBB#ODSTUFHVW#XM#NOLISUBNYG##BBB#Z[DJEOIN#FDKMOIN#U\DEK#O[IUKMF]#KU\GIN̂#IKO#BBB#
�������� ���
������
�
�
��
�
���
�����
�������������������
����
���
������
�
�
��
�
���
�����
�������������������
���� ���
����� !”#$%&$’�(�)*+,$$)))$-.�’/�0*$123456$�0**�70*8$,��’*$9�,&’$’�(�)))$����� !”#$%&$:�’)*+,$)))$$)))$;� (& /0$,&<0$(=&*$/ (&,$!�/.$*�=0��$&*$��..0�($$&)0)$/ (&,$!�/$.0�0&90$� ,!$455>5$�0**�70*$?.��$%&$:�’)*+,$)))$@ABC$DEC$FGDHGD$IJFK$DEC$�*+,$BFKKLAM$$$$����� !”#$NO$PQRSTUV$BFAWXWDW$CADXJCYZ$FI$CJJFJ$KCWWL[CW$\AF$XAWCJDW]̂$ZFG$EL_C$HJF_XMCM$WGIIXBXCAD$BFAWDJLXADW$DF$CAWGJC$DELD$FAYZ$_LYXM$MLDL$BLA$̀C$XAWCJDCM̂$LAM$ZFGJHJLB$CaCJBXWC$XW$BFKHYCDCbcb$defgghijhk$lmnopq$orislmfnils$tuvCJCwW$WFKCDEXA[$DF$DEXAx$L̀FGD$XI$ZFG$IFGAM$DEC$L̀F_C$CaCJBXWC$DFF$CLWZbyzhmonshk${FAWXMCJ$EF|$ZFG$KX[ED$XKHYCKCAD$DEC$IFYYF|XA[$BFAWDJLXADW}AF$|FJxCJ$BLA$EL_C$KFJC$DELA$~���$FI$DECXJ$DXKC$LYYFBLDCM�F$DCWD$DECWC$FGD$ZFGwYY$ACCM$DF$DJZ$DF$XAWCJD$LMMXDXFALY$DGHYCW$DELD$_XFYLDC$DECWC$BFAWDJLXADWb$�FJ$DEC$IXJWD$BLWĈ$ZFG$BFGYM$GWC$DEC$IFYYF|XA[XAWCJDXFA}$$$$& *0.($& (�$��.<*��.$9�,/0*$������������������������8$vXAD}$ZFGwYY$ACCM$DF$GWC$��H[���$LAM$DJX[[CJW$|EXBE$|CwYY$MXWBGWW$XA$YCBDGJCW$XA$L$IC|$|CCxWb~�b$defgghijhk$lmnopq$orislmfnils$t�{FAWXMCJ$L$_LJXLDXFA$FA$DEC$L̀F_C$��$MCWX[Â$|ECJC$CLBE$CKHYFZCC$|FJxW$IFJ$CaLBDYZ$FAC$MCHLJDKCAD} �EXAx$L̀FGD$DEC$BELA[CW$DELD$DEXW$|FGYM$KLxC$DF$DEC$JCYLDXFALY$WBECKLb$�A$HLJDXBGYLĴ$AF|$DELD$DEC$JCYLDXFAWEXH$̀CD|CCA$4��,�!00*$LAM�0��.(�0 (*$XW$A}~$JLDECJ$DELA$A}K̂$DEC$��.<*��.$DL̀YC$|FGYM$̀C$JCHYLBCM$̀Z$L$AFA�AGYY$IFJCX[A$xCZ$XA$DEC$4��,�!00*$DL̀YC$\AFA�AGYY$WXABC$C_CJZCKHYFZCC$����$|FJx$IFJ$FAC$MCHLJDKCAD]b$�FDC$DELD̂$DEC$LDDJX̀GDC$�IJLBDXFA�$BLA$̀C$JCKF_CM$̀CBLGWC$DEC$IJLBDXFA$XW$LY|LZW$~���b FMXIZ$ZFGJ$WBECKL$WF$DELD$XD$BFJJCBDYZ$XKHYCKCADW$DEC$AC|$��$KFMCY$LAM$DECA$DJZ$DF$XAWCJD$WFKC$MLDLb$�I$ZFG$KLMC$DEC$KFMXIXBLDXFAWBFJJCBDYẐ$ZFGwYY$MXWBF_CJ$DELD$ZFG$EL_C$L$HJF̀YCK$bbb$¡FG$BLAAFD$XAWCJD$LA$4��,�!00*$DGHYC$GADXY$DECJC$XW$L$�0��.(�0 (*$DGHYC$IFJ$DECK$DF$̀CLWWFBXLDCM$|XDEb$vF|C_CĴ$ZFG$BLAAFD$XAWCJD$LAZ$�0��.(�0 (*$DGHYCW$GADXY$ZFG$EL_C$LA$4��,�!00*$DGHYC$L_LXYL̀YC$DF$̀C$DEC$KLAL[CJ$FI$DECMCHLJDKCADbvF|$BLA$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