ANSWER OPTION -
B) ITERATIVE
EXPLANATION -
WHAT IS LOOPING -
looping in any algorithm is the execution of any set pf instruction by parsing through each value provided by user untill a specific condition is deemed false.
SEQUENTIAL INSTRUCTION -
In general, given the same input data, a sequential program will always execute the same sequence of instructions and it will always produce the same results. Sequential program execution is deterministic.
it is just a set of instructions combined and grouped together and they are executed one after other. So it is not used for looping because , it does not involve any sort of counter mechanism
ITERATIVE INSTRUCTIONS -
iterative terms signifies to iterate, i,e to move through a particular element and then executes the same set pf instructions as per the value of the counter.
These are called the looping instruction . because they are repeated an fixed number of time iterating through any range of value provided. examples are - for loop , while loop
CONDITIONAL INSTRUCTION -
conditional instruction area set of boolean value instruction that produces either true or false using some relational or logical operators. It just is an statement or a group of few joined by some operators. they are static and will produce only true or false depeding on different values
HEIRARCHICAL INSTRUCTION -
As the word signifies a heirarchy but actually there are no such instruction in programming.
ASK ANY DOUBTS IN THE COMMENTS.
operations are the "looping" instructions of an algorithm. a) Sequential b) Iterative c) Conditional d) Hierarchal
II. ALGORITHM COMPLEXITY AND ASYMPTOTIC ANALYSIS The below visual representations of iterative looping structures are provided for Question 3 through Question 20. Algorithm 1 Algorithm 2 log.n 256 Algorithm 3 Algorithm 4 n (10) Match one of our algorithms to the below code snippet. for (int i = 0; i <n; i++) { for(int j = 0; j<n; j++) { for (int k = 0; k<n; k++) { nop++; nop++; nop++; } } } for (int i = 0; i...
Study the Fibonacci number sequence in the following two algorithmic forms: iterative (sequential) and recursive. 1) Examine the theoretical measure of complexity of each. a) Using theory compare the number of operations and time taken to compute Fibonacci numbers recursively versus that needed to compute them iteratively. b) How many prime Fibonacci numbers are there, and how many can you find? c) Find the smallest Fibonacci number greater than 1,000,000 and greater than 1,000,000,000
a. You need write a sequential search algorithm that is recursive format. b. Write a binary search algorithm that is recursive, then write the program to implement it. C++
Using the CSMA/CD back-off algorithm, compute the conditional probabilities of two nodes A and B having collision numbers as 1 and 3 respectively. Illustrate the probability of A’s and B’s chance for winning the collision and the chance for a no collision.
STATEMENT 3: Algorithm A takes n log, (n) + 10na elementary operations and algorithm B takes 1776 + n log, n. Then for large enough input algorithm A is faster than algorithm B. Statement 3 is (Select] STATEMENT 4: The running time of the following piece of code is nº log, (n)) k+1 fori + 1 to n do ifiis a power of 5 then while k <n do k elementary operations kk -- 1 Statement 4 is (Select]
QUESTION 9 Let X={a,b,c,d), f={(a,b),(6.a),(c,c),(d,d)}cXxX, and g={(a,m),(6,4),(c,b),(d,c)}cXxX. Find fog. a((aa),(b,d),(c,b),(d.c)) b.((a.d),(6.b),(c,a),(d.c)) c. ((a.a),(6.b),(c,c),(d,d)) d.((a.c),(b,d).(c.a),(d.b) QUESTION 10 Let X={a,b,c,d), f={(a,b),(b,a),(c,c),(d,d)}c XXX, and g={(a,d),(b,a),(c,b),(d,c)}cXXX. Find gog. a. ((a.a),(6,d),(c,b),(d,c)} b.([a,d),(6.b),(ca),(d.c)} c.{(a,a),(6.b),(c,c),(d,d)} d.((a.c),(b,d),(c,a),(d,b) QUESTION 11 What is the dominant operation in this algorithm? 1. Input the number of values n 2. Input the list of numbers x1, x2, ..., X 3. min = x 4. For i = 2 to n do 4.1. If xi < min then 4.1.1. min < x; 5. Output...
The following diagram describes a process that consists of eight separate operations, with sequential relationships and capacities (units per hour) as shown. Operation A: 15/hr. Operation B: 12/hr. Operation c: 20/hr. Operation G: 30/hr. Operation H: 25/hr. Operation D: 5/hr. Operation : 8/hr. Operation : 12/hr. (a) What is the current capacity of the entire process? (b) What is the throughput time? (c) If you could increase the capacity of only two operations through process improvement efforts, which two operations...
b. 80% c. 20% d. 10% 6. MC.19.90 Using the sequential method, Pone Hill Company allocates Janitorial Department costs based on s serviced. It allocates Cafeteria Department costs based on the number of employees served. It h allocate Janitorial costs before Cafeteria costs. It has the following information about its two service departments and two production departmen Assembly: Costs Square Feet Number of Employees 20 10 Janitorial Department $450,000 Cafeteria Department 200,000 Cutting Department 1,500,000 Assembly Department 3,000,000 10,000 2,000...
Bayes theorem is related to : a)Independent Probabilities b)Exhaustive probabilities c)Conditional probabilities d)None of the above e)All of the above
The probability of A, B, C, and D all equal .98. Please show
calculations.
2.3 Conditional probability and independence Example 3 An electrical system consists of four components as illustrated on the whiteboard. The system works if components A and B work and either of the components C or D works. The reliability (probability of working) of each component is also shown. Find the probability that [a] the entire system works and b] the component C does not work, given...