answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anastaziya [24]
2 years ago
11

Suppose that, even unrealistically, we are to search a list of 700 million items using Binary Search, Recursive (Algorithm 2.1).

What is the maximum number of comparisons that this algorithm must perform before finding a given item or concluding that it is not in the list
"Suppose that, in a divide-and-conquer algorithm, we always divide an instance of size n of a problem into n subinstances of size n/3, and the dividing and combining steps take linear time. Write a recurrence equation for the running time T(n), and solve this recurrence equation for T(n). Show your solution in order notation."

Computers and Technology
1 answer:
damaskus [11]2 years ago
7 0

Answer:

There is also an attachment below

Explanation:

Since we are talking about binary search, let's assume that the items are sorted according to some criteria.

Time complexity of binary search is O(logN) in worst case, best case and average case as well. That means it can search for an item in Log N time where N is size of the input. Here problem talks about the item not getting found. So, this is a worst case scenario. Even in this case, binary search runs in O(logN) time.

N = 700000000.

So, number of comparisions can be log(N) = 29.3 = 29.

So, in the worst case it does comparisions 29 times

You might be interested in
Write a function called add_tuples that takes three tuples, each with two values, and returns a single tuple with two values con
Leni [432]

In Python, tuples are indeed a data structure that also stores an ordered sequence of unchanging values, and following are the Python program to the given question:

Program Explanation:

  • Defining a method "add_tuples" that takes three variables "firstTuple, secondTuple, thirdTuple" into the parameter.
  • After accepting the parameter value a return keyword is used that adds a <em><u>single tuple with two values</u></em> and returns its value into the form of (x,y).
  • Outside the method, two print method is declared that calls the above method by passing value into its parameters.

Program:

def add_tuples(firstTuple, secondTuple, thirdTuple):#defining a method add_tuples that takes three variable in parameters

   return firstTuple[0]+secondTuple[0]+thirdTuple[0],firstTuple[1]+secondTuple[1]+thirdTuple[1] #using return keyword to add value

print(add_tuples((1,4), (8,3), (14,0)))#defining print method that calls add_tuples method takes value in parameters

print(add_tuples((3,2), (11,1), (-2,6)))#defining print method that calls add_tuples method takes value in parameters    

Output:

Please find the attached file.  

Learn more:

brainly.com/question/17079721

4 0
2 years ago
The ________ program displays graphics and loading screens during the boot process.
Minchanka [31]
Booting would be complete if the normal, runtime environment has been achieved. A boot loader is a program that loads operating system for the computer after the completion of power on tests. The boot manager is a program that displays graphics and loading screens during the boot process.
3 0
2 years ago
Into which of these files would you paste copied information to create an integrated document?
Oksanka [162]
D cause you will need to keep up with data also
7 0
2 years ago
Read 2 more answers
Each level of a smartphone app adds more gems for you to match. On level one, there were 13 gems. On level twelve, there were 12
Sidana [21]
<span>Level : 1,2,3,4,5,6,7,8,9,10,11,12
Gems : 13 to 123
We have to increase from 13 to 123 over a span of 11 levels.
That's an increase of 110 over 11 levels.
110 / 11 = 10
So we go up 10 gems each level Level : 1,2,3,4,5,6,7,8,9,10,11,12
Gems : 13 23 33 43 53 63 73 83 93 103 113 123</span>
5 0
2 years ago
In a Diffie-Hellman Key Exchange, Alice and Bob have chosen prime value q = 19 and primitive root a = 10. If Alice's secret key
34kurt

Answer:

a) 6

b) 11

c) 11

Explanation:

Given

Prime value q =n= 19

primitive root (a) =10

Alice secret key = 4

Bob secret key = 6

a) The value Alice Sends to Bob

a​​​​​Private key of Alice mod n

= 10^4 mod 19

= 10000 mod 19

=6

b)The value Bob sends to Alice

a​​​​​Private key of Bob mod n

= a​​​​​​3​​​​​ mod n

= 10^6 mod 19

=1000000 mod 19

= 11

c)

Both the parties calculate the value of secret key at their respective side.

secret key obtained by Alice

= 11

secret key obtained by Bob

= 11

Finally, both the parties obtain the same value of secret key.

The value of common secret key = 17

6 0
2 years ago
Other questions:
  • An mp3 takes up about 16 kilobytes of memory per second of music. if you owned a one terabyte hard drive and filled it with only
    15·1 answer
  • Which of the following is not one of the four methods for classifying the various instances of malware by using the primary trai
    9·1 answer
  • The main problem with radio transmission is which of the following? Select one: a. Radio waves cannot travel through walls. b. W
    9·2 answers
  • Enter an input statement using the input function at the shell prompt. When the prompt asks you for input, enter a number. Then,
    9·1 answer
  • Use the following data definitions data myBytes BYTE 10h,20h,30h,40h myWords WORD 3 DUP(?),2000h myString BYTE "ABCDE" What will
    9·1 answer
  • Assume there is a machine with the IP address 129.82.102.63 with netmask /23, and with a parent NW whose netmask is 255.255.224.
    9·1 answer
  • Assume each student is assigned an advisor from a department. Each classroom is assigned a classroom (class# determines Classroo
    14·1 answer
  • Write a function that takes a string like 'one five two' and returns the corresponding integer (in this case, 152). A function j
    11·2 answers
  • (Java) Which of the following code segments correctly declare a Strings and gives it a value of "fortran".
    12·1 answer
  • A company has deployed four 48-port access layer switches to a switch block. For redundancy each access layer switch will connec
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!