Design an algorithm to generate the sequence of positive integers (in increasing order) whose only prime divisors are 2 and 3; that is, your program should produce the sequence 2, 3, 4, 6, 8, 9, 12,...

Design an algorithm to generate the sequence of positive integers (in increasing order) whose only prime divisors are 2 and 3; that is, your program should produce the sequence 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, . . . . Does your program represent an algorithm in the strict sense? Answer the following questions in terms of the list: 19, 37, 53, 71, 96, 137, 289, 374, 559, 797, 979.                                                 a. Which search algorithm (sequential or binary) will find the number 137 more quickly? b. Which search algorithm (sequential or binary) will find the number 19 more quickly? c. Which search algorithm (sequential or binary) will detect the absence of the number 99 more quickly? d. Which search algorithm (sequential or binary) will detect the absence of the number 111 more quickly? e. How many numbers will be interrogated when searching for the number 96 when using the sequential search? How many will be interrogated when using the binary search?

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here