5 Pages

midterm2_fall2006

Course: CS 421, Spring 2012
School: Bilkent University
Rating:
 
 
 
 
 

Word Count: 796

Document Preview

421: CS Computer Networks MIDTERM II December 6, 2006 120 minutes Name: Student No: FALL 2006 Show all your work very clearly. Partial credits will only be given if you carefully state your answer with a reasonable justification. Q1 Q2 Q3 TOT 1) a) (10 pts) Execute the Dijkstra algorithm at node C for the network shown below by filling in the following table. In the table, you need to give both the distance...

Register Now

Unformatted Document Excerpt

Coursehero >> Other International >> Bilkent University >> CS 421

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
421: CS Computer Networks MIDTERM II December 6, 2006 120 minutes Name: Student No: FALL 2006 Show all your work very clearly. Partial credits will only be given if you carefully state your answer with a reasonable justification. Q1 Q2 Q3 TOT 1) a) (10 pts) Execute the Dijkstra algorithm at node C for the network shown below by filling in the following table. In the table, you need to give both the distance D(v) and the previous node p(v). 6 6 B C D 2 E 4 H 2 8 5 F 1 3 9 3 2 2 K G 4 J 4 I iter. N D(B), p(B) D(D), p(D) D(E), p(E) D(F), p(F) D(G), p(G) D(H), p(H) D(I), p(I) D(J), p(J) D(K), p(K) b) The network below uses the distance-vector routing algorithm. Assume the following: Links have the same cost in both directions. Nodes exchange their routing info once every second, in perfect synchrony and with negligible transmission delays. Specifically, at every t = k, k = 0, 1, 2, 3,..., each node sends and receives routing info instantaneously, and updates its routing table; the update is completed by time t=k+0.1. At time t = 0, the link costs are as shown below and the routing tables have been stabilized. At time t = 0.5, the cost of the link (1,4) becomes 15. There are no further changes in the link costs. Route advertisements are only exchanged periodically, i.e., there are no immediate route advertisements after a link cost change. Hence the first route advertisement after the link cost change at t = 0.5 occurs at t = 1.0. Note: However, whenever a link cost change occurs, two nodes at the endpoints of this link immediately make corresponding changes in their distance tables. i. (10 pts) Assume that the distance vector algorithm does not use poisoned reverse. Give the evolution of the distance tables with respect to destination 4. Specifically, give the distance table entries for destination 4 at nodes 1-3, for t = 0.1, 0.5, 1.1, 2.1, ..., until all distance vectors stabilize. Present your final answer in the table given below where D i (j) is the distance vector denoting the distance from i to j . Time, t 0.1 0.5 1.1 2.1 3.1 4.1 5.1 6.1 7.1 8.1 9.1 10.1 11.1 ii. (10 pts) Redo part i. assuming that the distance vector algorithm uses poisoned reverse. Time, t 0.1 0.5 1.1 2.1 3.1 4.1 5.1 iii. (5 pts) Using the forwarding tables valid at t=2.5, find the paths followed by a packet sourced at node 1 and destined to node 4 for both parts i and ii above, i.e., with and without poisoned reverse. 4 2 1 1 4 1 3 8 2 D1 (4) via 3 4 D 2 ( 4) v i a 1 3 1 D 3 (4) via 2 4 D1 (4) via 3 D 2 ( 4) v i a 1 3 D 3 (4) via 2 2 4 1 4 2 2) a) You are given the assignment of setting subnet addresses for 4 buildings of your company. The number of Internet connected PCs in each building is given in the following table. Assume that the 151.118.96.0/20 address block is given to you for this purpose. i) (10 pts) Use the following table to show the addresses of the four subnets that you have created. Building 1 2 3 4 # of PCs 1200 420 470 230 Subnet address (CIDR format) ii) (5 pts) What is the size of the largest single CIDR address block that you can assign from the unassigned addresses in the address block 151.118.96.0/20 remaining after you assigned the addresses to these four buildings? b) (10 pts) Suppose a host transmits a 3500 byte IP packet over a link with an MTU of 500 bytes. Assuming that IP header does not contain any options, indicate the length (in bytes), more flag, and offset field values (specify the offset values in units of 8 bytes) of the fragments transmitted over the link in the table below. Fragment 1 2 3 4 5 6 7 8 Length Offset Flag 3) a) (6 pts) Where are IP fragments reassembled: at the destination host or at intermediate routers? Explain the reason for this choice. b) (6 pts) What are the most significant three changes included in IPv6 for speeding the processing of IP packets at the routers? c) (6 pts) Why does TCP/IP perform error checking using the checksum both at the transport and network layers? d) (6 pts) Explain why there is a need for an internal Border Gateway Protocol (iBGP) session when there is already an intra-Autonomous System (intra-AS) routing protocol in use. e) (6 pts) Give (at least) three reasons why NAT is currently widely used in small office and home networks. f) Assume that we have an IP router with 64 input and 64 output ports. Assume further that the router uses the switching via a single shared bus architecture we discussed in class. Each input and output port operates at the line speed of 2.4 Gbps (2.4 x 109 bits/sec) and each IP packet contains 1000 bytes. i) (5 pts) If forwarding decisions are made locally at each input port, what should be the speed of table lookup operations so that input port processing can be done at the line speed? ii) (5 pts) What should be the speed of the shared bus, in bits/sec, so that the bus will not become a bottleneck?
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Bilkent University - CS - 421
CS 421: Computer NetworksFALL 2007MIDTERM II December 4, 2007 120 minutesName: Student No: Show all your work very clearly. Partial credits will only be given if you carefully state your answer with a reasonable justification.Q1 Q2 Q3 TOT1) a) (12 pt
Bilkent University - CS - 421
CS 421: Computer Networks MIDTERM II April 28, 2005 120 minutes Name: Student No:SPRING 2005Show all your work very clearly. Partial credits will only be given if you carefully state your answer with a reasonable justification.1) a) (10 pts) Execute th
Bilkent University - CS - 421
CS 421: Computer Networks MIDTERM II April 27, 2006 120 minutes Name: Student No:SPRING 2006Show all your work very clearly. Partial credits will only be given if you carefully state your answer with a reasonable justification.1) a) (10 pts) Execute th
Bilkent University - CS - 421
CS 421: Computer NetworksSPRING 2007MIDTERM II April 26, 2007 120 minutesName: Student No: Show all your work very clearly. Partial credits will only be given if you carefully state your answer with a reasonable justification.Q1 Q2 Q3 TOT1) a) (12 pt
Riverside Community College - ACCOUNTING - 165A
Anderson Graduate School of ManagementUniversity of California, RiversideBSAD 165A - INTERMEDIATE ACCOUNTINGWinter 2012 #20725(updated 01-12-12)INSTRUCTORBruce SamuelsonOFFICEOLMH 2331OFFICE HOURS 12:40-2:00 p.m. TRCOURSEROOMHOURSe-mailBUS 1
Riverside Community College - ACCOUNTING - 165A
EXAM 2 TOPICSBSAD 165ASpring 20121.Define the field of financial accountingwhat does it prepare?(1)theidentification,measurement,andcommunicationoffinancialinformationabout(2)economic entitiesto(3)interestedparties.Financialaccountingistheprocesstha
Riverside Community College - ACCOUNTING - 165A
Solutions to exercises in lecture on Ch. 5, part aBRIEF EXERCISE 5-1Current assetsCash.Accounts receivable.Less: Allowance for doubtful accounts.Inventories.Prepaid insurance.Total current assets.$30,000$110,000(8,000)102,000290,0009,500$43
Riverside Community College - ACCOUNTING - 165A
Solutions to exercises in lecture: Ch. 6BRIEF EXERCISE 6-18% annual interesti = 8%PV = $15,000FV = ?0123n=3FV = $15,000 (FVF3, 8%)FV = $15,000 (1.25971)FV = $18,895.658% annual interest, compounded semiannuallyi = 4%PV = $15,0000FV = ?1
Riverside Community College - ACCOUNTING - 165A
Solutions to exercises in lecture: Ch. 8aBRIEF EXERCISE 8-2Inventory (150 X $34).Accounts Payable.5,100Accounts Payable (6 X $34).2045,100Inventory.Accounts Receivable (125 X $50).2046,250Sales.Cost of Goods Sold (125 X $34).Inventory.6,250
Riverside Community College - ACCOUNTING - 165A
Solutions to exercises in lecture: Ch. 8bBRIEF EXERCISE 8-92010 inventory at base amount ($22,140 1.08)2009 inventory at base amountIncrease in base inventory$20,500(19,750)$ 7502010 inventory under LIFOLayer oneLayer two$19,750 X 1.00$ 750 X
Riverside Community College - ACCOUNTING - 165A
BUS 165A 001Intermediate Financial AccountingInstructor:Office:Phone:Fax:E-mail:Bruce Samuelson, DBA & CPA2331 Olmstednone949-831-8112bus165a@cox.netQuarter:Spring 2012Lecture time: 2:10-3:30 p.m. TRClassroom:1212 OlmstedCourse Website: h
Riverside Community College - ACCOUNTING - 165A
BUS 165A 001Intermediate Financial Accountingcls268115Instructor:Office:Phone:Fax:E-mail:Bruce Samuelson, DBA & CPA2331 Olmstednone949-831-8112bus165a@cox.netQuarter:Spring 2012Lecture time: 2:10-3:30 p.m. TRClassroom:1212 OlmstedCourse
Riverside Community College - BUS - 147
Fixed investment = $3.5 millionFixed costs other than depreciation = $600,000Net working capital = 25%Variable cost = 35%7. Lillian Jordon is considering using some of the cash generated from her mail-order business to open aretail store. The fixed i
Golden Gate - ACCOUNTING - 360
1Marks:10Wagesaresubjecttothefederalincometaxandnotsubjecttoanyothertax.Chooseoneanswer.A. TrueB. FalseWagesaresubjecttoFICAandMedicaretaxwhichiscollectedbytheemployer.CorrectMarksforthissubmission:10/10.Question2Marks:10Whichofthefollowingisli
Golden Gate - ACCT - 360
Session 1 SolutionsChapter 1 - 14, 20, 45, 5214.Herman could have been overcharged, but at least part of the excessprobably is attributable to a hotel occupancy tax and a car rental tax. Inthe major cities, these types of excise taxes have become a p
Universidad del Norte - ING - 105
Diferentes tipos de conocimientosExtrado de http:/www.monografias.com/trabajos12/marcono/marcono.shtmlEl hombre, a lo largo de su existencia, ha sentido curiosidad por conocer el mundo que lerodea y ha pretendido dar explicaciones a una serie de interr
Technion - CS - 101
II1::: v1 w1 v2 vw2v:v = , w = M n1 ( F ) = n F - A = ( aij ) M mn ( F )MMv w n nvvA ( v ) = Av .1vvvvA ( v + w ) = Av + Aw .2kkA ci vi = ci Avi i =1 i =1..Auv- ei A .Ai:1. A M m n ( F ).vvAx = 0.3uvAei . A M
Technion - CS - 101
II2:.:1:2cfw_1, 2,., n". cfw_1, 2,., nSn ( k, l)1 k, l n:312.n (1) ( 2 ) . ( n ) ..-:5even 1sg = 1det A = A =:6 ( sg ) a ( ) a ( ) L a ( )11 Sn22nn:B M n ( F ) - A = ( aij ) M n ( F ):" A-B = A().1B=A .2B = Aa
Technion - CS - 101
II3::Ak 1 Ak 2 ,k =,A n.bAx = bA 0k-A:1:3 y + 2 x = z + 13 x + 2 z = 8 5 y3 z 1 = x 2 y:1 adj ( A ) = ( bij )adj ( A).i - j. A Mn (F )A-AM j ,i , bij = ( 1)i+ jM j ,i:24 5 3. A = 2 1 0 9 5 3 . adj ( A ):A1 = A ad
Technion - CS - 101
II4::1T. T :V W ,FW- V "W- Vv, v V T ( v + v ) = T ( v ) + T ( v ) ,T ( cv ) = cT ( v ) ,.1c F ,v V :.2:1T : [ x ] [ x ]T ( p ( x ) ) = p ( x ):2T : [ x ] [ x]T ( p ( x ) ) = p ( x )dx:3T : 2 [ x] , T ( p ( x ) ) = p ( ):4A M mn
Technion - CS - 101
II5::1T :V WT,cfw_. ker (T ) = v V T ( v ) = 0 V : ".V"ker (T ):1T :V W,:2"Im (T )T :V WT,. Im (T ) = cfw_Tv v V W : ".W:2T :V W,:13T : 3T ( x, y, z ) = ( x, y, 0 ).T :23:T : T (1, 0,1) = (1,1,1) .1( 0,1,1) Im T( 0,
Technion - CS - 101
II6::1T :V W.F" W- Vcfw_v , v ,., v cfw_T ( v ) , T ( v ) ,.,T ( v ),V.W112n2n:1T : 32T ( x, y, z ) = ( 3x + 2 y, x + z ).T -cfw_T ( v ) , T ( v ) ,.,T ( v )."12n". T ( p ( x ) ) = p ( ) "."TWcfw_v , v ,., v 12n":1
Technion - CS - 101
II7:v = a1 v1 + a2 v2 ++ an vn ,F.BV"cfw_B = v1 , v2 ,., vn a1 v = B a nv:1, cfw_ai i =1 Fn:1v , B.[ ]B : V .nF.V "2.R -cfw_u , u ,., u 12cfw_,B'- B -cfw_1:2B = v1 , v2 ,., vncfw_u ,vV Pcfw_A+ anj vnB, u2
Technion - CS - 101
II8:,Wcfw_C = w1 , w2 ,., wm - VC- B,( [Tvi ]CE1 [T ]E2T :V W(1):1T : 2 [ x ] 1 [ x ]:2T : ,. T ( x, y, z ) = x + y + z "E2) [T ]B = [Tv1 ]C , , [Tvn ]CCiC = cfw_1 + x,1 x , B = cfw_1, x, x. [T ]BCcfw_B = v1 , v2 ,., vnT
Technion - CS - 101
II9:1F .0 v V(") 0 v nF-A.FT :V V 0 v VT. Tv = v . "A Mn (F )F .(")"VT( "). Av = v. T ( x, y ) = ( 2 x + 2 y, x + 3 y ) ". "- "1. B = P AP -:2A, B M n ( F ), dim F V = n ,FV". [T ]D = B - [T ]C = A -"V:1A, B M n ( F )P M
Technion - CS - 101
II10:1.A:1mA ( x ):2. m( x)mA ( x ) / g ( x ) ""AmA ( x )g ( x ) F [ x]g ( A) = 0"A":.Mn (F ) -":11 0A=0 0":3.A":"A":2 5 6 6 A = 1 4 2 3 6 4 "":310A = 00021000002000000100310" 1 2A= 1 4
Technion - CS - 101
II11:1V())F .( VF - V V - :::(). < v1 + v2 , w > = < v1 , w > + < v2 , w > F , v1, v2 , w V . w, v V< v , w >=< w, v > :(. v = 0 < v,v > = 0 < v, v > 0 , v V:v = (v1 ,., vn ), w = ( w1 ,., wn ) ()():1.V = 2:2( n 1 ) V = nv = ( x
Technion - CS - 101
I N<Z<Q<R<C)2(a1 , b1) (a2 , b2)=(a1a2-b1b2 , b1a2+a1b . 1) i + j M ji( = [ adj( A) ] i j>(u1+u2,v)=<u1,v>+<u2,vA*adjA=(detA)I><u1,v>=<v1,u: A -0 0=> ><u,u .A0=> <u,u" 0=u: detAB=detA detB a-bi a+bi .): Zn=rn (cos(n) + i sin(n-
Technion - CS - 101
1:Web: http:/www.ash-college.ac.ilE-Mail: shapird@cs.brandeis.edu: G :1. 2. 3. 4. .: F +, ::1.2.3.4.5.:6. 7. 8. ) (9. 01.
Technion - CS - 101
2 :: = :1. )(a,b)+(c,d)=(a+c,b+d2. )(a,b)(c,d)=(ac-bd,ad+bc )1,0( - .i: ) z=(a,b . a z - Re z b z - Im z z=a+bi: z=a+biC z - z = a bi :1. z = z2. 2(
Technion - CS - 101
3 :: V )"( F:1. : u , v V - u + v V v V- cF - cv V2. : u , v , w V - )( u + v ) + w = u + ( v + w3. : 0 V v V - 0 + 0 + v = v4. : v V u V - 0 = u + v = v + u5. : u , v V - u + v = v + u6. u , v V- cF - c ( u + v ) =
Technion - CS - 101
4 , - :: V .Fk . u1 , u2 ,., uk V . U = u V u = ci ui , c1 , c2 ,., ck F 1= icfw_1( U " V . A = u1 , u2 ,., uk2( U" ,A .UU3( U " .A: U" " " A - ).Sp(A A U:
Technion - CS - 101
5 :: V" .F B = u1 , u2 ,., uk V V:cfw_1. )V=Sp(B2. B":1. 2. ][ xnn3. C" R C32234.: V V )dim(V:-n A -n ei ) A =
Technion - CS - 101
6 )(:: V" .F cfw_ A = v1 , v2 ,., vn:1. A2. A )( 3. A " : A", : V" .F A V " B V a A b B -: A = v1 , v2 ,., vk " - V-: " V
Technion - CS - 101
7 : F1= b2= b= bm+ . ++ . +1a11 x1a21 x+ . + amn xn1am1 xa1n xna2 n xn ( i = 1.m, j = 1.n ) aij , ( i = 1.m ) bi . bi = 0 i , .:: :1. 2.
Technion - CS - 101
8 :: A -0 A ) rank(A).r(A: A v1 ,., vn- B . w1 ,., wn B - A" A v1 ,., vn: A - Ac . ": A n.
Technion - CS - 101
9 :: V" U- W V )dim(U+W)=dim U +dim W dim(UW 1 : 0 = U = cfw_( x, y, z ) x + y + z- 2: ) 0 ,1,1 ( = 2 U = Sp cfw_u1 = (1, 0,1) , u-3.1. W = cfw_( 0, 0, z ) z 1 cfw_w1 , w2 , u -33. ?UW)1,0 ,2 ( = 2 W = Sp cfw_w1 = (1,1, 0 ) , w"
Technion - CS - 101
I 01:: :) A = ( aij ) , B = ( bij ) M mn ( F: ) A = ( a1 , a2 ,., an ) M 1n ( F n.) A + B = ( aij + bij ) M mn ( F 1 aa ) A = 2 M n1 ( F n. a n: : ) A = ( aij ) M mn ( F- F ) A = ( aij ) M mn ( F : ) A = ( aij ) , B = ( bij ) , C =
Technion - CS - 101
" 1 ' 1) : 90.11.11(1( ) , (:( a b 2= a + b- . a b = 3ab( ) 2 = cfw_2 z | z ( .2( ( 3 . ( 6,5,4,3,2 - 7 - 11. ( : 2 = 5 x 5 7 ? 3( : : Z1 = 3 4i , Z 2 = 5 + 12i , Z3 = 1 3i , Z 4 = 6
Technion - CS - 101
" 1 :1( ( , :a b ba= a + b . a b=b+a22( , , .2( (220111200012+012202110120000*012( 7 : 4 = 125 = 25 = 134 = 32 = 143 = 43 = 156 = 1611 : 9 = 28 = 37 = 46 = 55 = 62 = 51 = 64 = 125 = 132 = 143 =
Technion - CS - 101
" ' 2) 90.11.81(1( :. 3 + 3i. 5 5i21 4. )(2 + i )( i552( :. z 3 = i. z 6 = 1 + 3i013( : 1 + 3i 1 3i 4( z . z 3 = i ) (:.... . z = i0 < ) . Im( z0 = ) Re( z ) . Im( z1 =| | z . z
Technion - CS - 101
": 2 . 3 + 3i = 6cis.1( 47.. 5 5i = 50cis44 127. (2 + i )( i) = 4 4i = 32cis.554i = cis23i = cis 2z0 = cis61 + 3i = 2cis 363, k = 0,1, 2, z1 = cis.2( 53, z2 = cis62+ 2 k66, k = 0,1, 2,3, 4,5713, z2 = 6 2cis, .1818
Technion - CS - 101
" ' 3) 90.21.2(1( 4 V = R . R - U i ? V U i"- . - .4( = 0, ai Rai) 4, U1 = cfw_(a1 , a2 , a3 , a1= i( U 2 = cfw_(a1 , a2 , a3 , a4 ) ai > 0, ai R( . U 3 = cfw_(a1 , a2 , a3 , a4 ) a1 + 3a2 = a3 , a2 + a3 = a4 , ai R( 0 = U 4 = cfw_(a, b, c,
Technion - CS - 101
" 3 :1( . 1 U 4 . : 1 x, y U . 40 = x = ( x1 , x2 , x3 , x4 ), xi1= i40 = y = ( y1 , y2 , y3 , y4 ), yi1= i 1: x + y U) 4x + y = ( x1 , x2 , x3 , x4 ) + ( y1 , y2 , y3 , y4 ) = ( x1 + y1 , x2 + y2 , x3 + y3 , x4 + y4= 4= x1 + y1 + x2 + y2 + x
Technion - CS - 101
" ' 4) 90.21.9(1( S- . T :. ) Sp ( S ) + Sp (T ) = SP ( S T. ) Sp ( S ) + Sp (T ) = SP( S + T. 0 S ) Sp ( S ) Sp (T ) SP ( S + T2( S = cfw_s1 ,., sm , T = cfw_t1 ,., tn" 0cfw_ = ) Sp ( S ) Sp (T S T".3( ":. )0 ,1,2( ,)6 ,5,4( ,)3,2 ,1(, 3f1 (
Technion - CS - 101
" 4 :1( . . : . S = cfw_v1 ,., vk ; T = cfw_u1 ,., um . : . 1v1 + . + k vk + 1u1 + . + mum :) Sp ( S) Sp (T S T = cfw_v1 ,., vk , u1 ,., um : . 1v1 + . + k vk + k +1u1 + . + k + mum .".. . :)1,0(cfw_ = S = cfw_(1, 0); T)1,1(cfw_ = S + T) (
Technion - CS - 101
" ' 5) 90.21.61(1( : 4 v1 = (1, 0,1, 1) - 4 , v2 = (1,1, 1, 0) :4 . v = (a 2 , 2, a + 2, a) . a v ) 4 ( " 2? v1 , v. a ', v 2. v1 , v2( )0 ,3 ,1,1( ,)1,0 ,2 ,1( ,)1,3 ,1,2(cfw_ U = Sp 4 . . U3( " )!( ]: 3 [ x 2 cfw_1 + x 2 ,5 x x3 , 2 4 x 2 +
Technion - CS - 101
" 5 :1( . v 2 , spancfw_v1 , v :)1 ,1,0 ,1(a 2 , 2, a + 2, a ) = b(1,1, 1, 0) + c a2 = b + c2=ba +2 = cba = c2 = a. )1 ,1,0 ,1(2 + )0 ,1 ,1,1(2 = )2 ,0 ,2 ,4( .2( )0 ,3,1,1( ,)1,0 ,2 ,1( ,)1,3 ,1,2(cfw_. U = Sp ": 2 1 3 1 1 2 0 1 1 2 0 1 1
Technion - CS - 101
" ' 6) 90.21.03(1( ] R 4 [t - t -4. ? - .41 + . g1 (t ) = 2t 3 4t 2 + 9t + 5 , g 2 (t ) = t 3 t 2 8t + 2 , g 3 (t ) = 10t 2 + 2t2( ) cfw_(1 + i, 3 + 8i, 5 + 7i ), (1 i, 5, 2 + i ), (1 + i, 3 + 2i, 4 i - 3 C ? C 3 C ? R3( : 1 = x + 3z
Technion - CS - 101
" 6 :1( , , ":0 = )41 + a(2t 3 4t 2 + 9t + 5) + b(t 3 t 2 8t + 2) + c(10t 2 + 2tt 3 (2a + b) = 0 t 3 b = 2at 2 (4a b 10c) = 0 t 2 a = 5 c3t (9a 8b + 2c) = 0 t0 = 5a + 2b + 14c = 0 15c = 14c = 0 c = 0; a = 0; b ", 3.2( ) cfw_(1 + i, 3 + 8i, 5 + 7
Technion - CS - 101
" ' 7) 01.1.6(1( : 7 = x + 2 y 4z. 8 = 2 x y + 5 z3 = x + 12 y 30 z7 = 3 x + 3 y + z + 2 w3= x+ y+z.2= x+ y+w2( : 1 = (5 k ) x 2 y z2 = 2 x + (2 k ) y 2 z1 = x 2 y + (5 k ) z k ?3( 3 :
Technion - CS - 101
" 7 : 1 2 4 7 1 2 4 7 1 2 4 7 1( . 2 1 5 8 0 5 13 6 0 5 13 6 1 12 30 3 0 10 26 4 0 0 0 16 ..x4 = t1 + x3 = tx2 = s1x1 = (6 3t 3s ) = 2 t s33 3 1 2 7 3 3 1 2 7 3 3 1 2 7 1 1 1 0 3 0 0 2 2 2 0 0 2 2 2 1 1 0 1 2 0 0 1 1 1 0 0 0 0 0
Technion - CS - 101
" ' 8) 01.1.02(1( :1 2 1 0 3 2 1 2 2 1 2 5 1 3 1 3 2( . W :0 = 42 x1 + x2 + 3 x3 x0 = 43 x1 + 2 x2 2 x0 = 3 x + x + 9 x x342 1. : A ) . rankA + dim W = n (3( :. 01 V ,W 8 = . dim V = 9, dim W 7 = ) . dim(V W. 01 V ,W
Technion - CS - 101
" 8 :1( :10 1 2 1 0 2 11 2 1 0 1 2 1 0 2 0 4 2 2 2 4 0 3 2 1 2 0 4 2 2 2 1 2 5 0 5 0 5 0 0 10 10 0 0 10 10 1 3 1 3 0 1 2 3 0 0 10 10 0 0 0 0 3. )3 (.2(. ) - ( A: 2 1 3 1 2 1 3 1 2 1 3 1
Technion - CS - 101
" ' 9) 01.1.02(1( ) ( At , A + B , AB- , Bt:5. 03. 0 16. 9 2 43 1 1 A = 1 5 , B = 2 2 4 3 4 1 0 11 12 0A = 2 1 0 , B = 0 3 6 0 01 7 9 1 0A=, B = 5 0 13 0 42( 1
Technion - CS - 101
": 9 2 4 18 6 2 10 1 1 3 5 AB = 1 5 = 19 11 13 5 .1( 3 4 4 2 2 0 19 51 15 1 4 2 1 3 t 1 2 At = ,B = 3 2 4 5 45 0 1 0 1 1 1AB = 2 1 0 0 2 0 3 6 0 0 1 0 1 1 1A+ B = 2 1 0 + 0 20 3 6 0 03 1 1 20 = 2 4 6 .1 0 6 63 2 1 20 = 2 3 0
Technion - CS - 102
ASCIIdec32hex20chardechexchardechexchardechexchardechexchar[space]523447248H925C\11270p3321!533557349I935D]11371q3422"54366744AJ945E^11472r3523#55377754BK955F_11573s3624$5638
Technion - CS - 102
Recursive FunctionA function defined in terms of itself iscalled a recursive function.Introduction to Computer Sciencereturn_value rec_func(type arg1, type arg2, )cfw_rec_func();RecursionTo Iterate is Human, to Recurse, DivineL. Peter Deutsch1
Technion - CS - 102
Declaring variables - Remindertype variable_name;Introduction to Computer Science Before using a variable, one must declare it. The declaration introduces the variable type, then its name. When a variable is declared, its value is undefined.Pointers
Technion - CS - 102
Pointer Relational OperatorsComparing pointers:Two pointers can be compared if they point to the same type.Any pointer may be compared to the NULL (zero) pointer.Introduction to Computer ScienceExamples:Pointersint *p1 = NULL, *p2 = NULL;if (p1 =
Technion - CS - 102
What does this program do?Introduction to Computer ScienceMemory Allocation1Memory Allocation#include <stdio.h>char* suffix(char *str, int suffsize)cfw_#include <string.h>int length = strlen(str);#define MaxSize 50if(length<suffsize)char* suff