Algorithm complexity The complexity of a computer algorithm is the number of operations or steps the algorithm needs to complete its task assuming there are n pieces of input (for example, the number of steps needed to put n numbers in ascending order). Four algorithms for doing the same task have complexities of A: n 3/2 , B: n log 2 n , C: n (log 2 n ) 2 , and D: n log 2 n . Rank the algorithms in order of increasing efficiency for large values of n . Graph the complexities as they vary with n and comment on your observations.
Algorithm complexity The complexity of a computer algorithm is the number of operations or steps the algorithm needs to complete its task assuming there are n pieces of input (for example, the number of steps needed to put n numbers in ascending order). Four algorithms for doing the same task have complexities of A: n 3/2 , B: n log 2 n , C: n (log 2 n ) 2 , and D: n log 2 n . Rank the algorithms in order of increasing efficiency for large values of n . Graph the complexities as they vary with n and comment on your observations.
Solution Summary: The author explains the ranking order of the algorithms from least to most efficient is A, C, B, D.
Algorithm complexity The complexity of a computer algorithm is the number of operations or steps the algorithm needs to complete its task assuming there are n pieces of input (for example, the number of steps needed to put n numbers in ascending order). Four algorithms for doing the same task have complexities of A: n3/2, B: n log2n, C: n(log2n)2, and D:
n
log
2
n
. Rank the algorithms in order of increasing efficiency for large values of n. Graph the complexities as they vary with n and comment on your observations.
=
Q6 What will be the allowable bearing capacity of sand having p = 37° and ydry
19 kN/m³ for (i) 1.5 m strip foundation (ii) 1.5 m x 1.5 m square footing and
(iii)1.5m x 2m rectangular footing. The footings are placed at a depth of 1.5 m
below ground level. Assume F, = 2.5. Use Terzaghi's equations.
0
Ne
Na
Ny
35 57.8 41.4 42.4
40 95.7 81.3 100.4
Q1 The SPT records versus depth are given in table below. Find qan for the raft 12%
foundation with BxB-10x10m and depth of raft D-2m, the allowable
settlement is 50mm.
Elevation, m 0.5 2
2 6.5 9.5 13 18 25
No.of blows, N 11 15 29 32 30 44
0
estigate shear
12%
Q2 A/ State the main field tests which may be carried out to investigate shear
strength of a soil layer?
B/ What are the main factors that affecting the spacing and number of
boreholes for a given project?
C/ Illustrate the causes of disturbance of Shelby tubes samples.
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, calculus and related others by exploring similar questions and additional content below.