a) Suppose that computer A executes 1 billion instructions per second, and computer B executes 10 million instructions per second, i.e, Computer A is 100 times faster than computer B in raw computing power. Suppose an expert programmer implements insertion sort in machine language for computer A, and the resulting code requires 2 * n2 instructions to sort n numbers. Suppose an average programmer implements merge sort, using a high-level language on computer B, with the resulting code taking 5 * n *log2n instruction. How long does computer A and computer B take to sort 10 million numbers respectively?
b) For each of the following functions, either f (n) is in O(g(n)), f (n) is in Ω(g(n)), or f (n) is in Θ(g(n)). For each pair shown in the following table, determine which relationship is correct:
|
f(n) |
g(n) |
Relationship f (n) = ____ g(n) |
|
Logn2 |
logn + 5 |
|
|
nlogn + n |
logn |
|
|
log2n |
logn |
|
|
10 |
log10 |
|
|
2n |
10n2 |
|
|
2n |
3n |
Table 1: Relationship of pair of functions.

a) Suppose that computer A executes 1 billion instructions per second, and computer B executes 10...
1. (10 pts) For each of the following pairs of functions, indicate whether f = 0(g), f = Ω(g), or both (in which case f-6(1). You do not need to explain your answer. f(n) (n) a) n (b) n-1n+1 (c) 1000n 0.01n2 (d) 10n2 n (lg n)2 21 е) n (f) 3" (g) 4" rl. 72 i-0 2. (12 pts) Sort the following functions by increasing order of growth. For every pair of consecutive functions f(n) and g(n) in the...
3- What is the growth of the below function: (What is the most accurate answer?) ?(?) = 2^(????^3) + ?√? + 7???^6 ? + ?^2???? options: a) Θ(n) b) Θ (n3) c) Θ (n2logn) d) Θ (n√?) e) Θ (log6n) What is the growth of the below function: (What is the most accurate answer?) ?(?) = ??????? + 4???^2? + ????^2 options: a) O (logn) b) O (loglogn) c) O (log2n) d) O(logn2) e) Neither 5- Assume you want to...
Word Bank:
a) python
b) computer science
c) algorithm
d) program
e) interpreter
f) compiler
g) syntax
h) semantics
i) value
J) variable
k) operator
l) operand
m) expression
n) statement
o) input
p)output
q)call
r) arguments
s) library
t) bug
u) variable scope
v) local variable
w)global variable
x) variable lifetime
y) relational operators
z) logical operators
1) Compares operands and results in a bool: 2) The duration of a variable's existence: 3) A list of instructions to solve...
Write a PIC18Fxx2 assembly program that takes the variable A and save into B in inverted the 110010102, then the program finishes with B 010100112-The 1. bit order. For example, if A variable A shall preserve the original value at the end of the program execution. The program shall be implemented using any of the loop and shift techniques discussed in class. 2. Write a PIC18Fxx2 assembly program that makes the calculus of the first eigth (8) terms of the...
Suppose that Costa Rican worker Carlos can produce elther 100 pounds of coffee or 1 computer per week, and a second worker, Maria, can produce elther 150 pounds of coffee or 1 computer per week. Both Carlos and Maria work 50 weeks per year Instructions: Enter all values as absolute numbers. a. Carlos' opportunlty cost of producing a computer is pounds of coffee, and Maria's opportunity cost of producing a computer is pounds of coffee both workers completely specialize in...
Programming Assignment #2 EE 2372 MAKE SURE TO FOLLOW INSTRUCTIONS CAREFULLY, IF YOU HAVE ANY DOUBTS PLEASE EMAIL ME! This programming assignment will just be a small extension to programming assignment 1. In the first assignment each of the functions could only take a predefined number of inputs. This time the objective is to be able to complete these functions with any amount of inputs. The user will pass arguments through the command line (this means you will have to...
Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped with a Micro-1 processor Memory contains an array of integer cells: int cell[] = new int[CAP]; where CAP is the capacity of memory. Initially this is set to 256. Internally, the Micro-1 processor is equipped with eight 32-bit data/address registers and two 32 bit control registers: PC, the program counter, contains the address of the next instruction to execute. IR, the instruction register, contains...
pls answer all questions
1) A step-by-step solution to a problem is called a. hardware b. an operating system c. a computer language d. an algorithm 2) separated the programming task from the computer operation tasks. a. Algorithms b. Data processors c. High-level programming languages d. Operating systems 3) is a 16-bit code that can represent symbols in languages other than English. a. ASCII b. Extended ASCII c. EBCDIC d. Unicode 4) When you want to download music to a...
Compute the following problems using Math
Lab.
Instructions: Answer All Questions using MATLAB commands. Question 1. Create a vector of the even whole numbers between 31 and 75. Question 2. Let x [2516] a. Add 16 to each element b. Add 3 to just the odd-index elcments c. Compute the square root of each element d. Compute the square of each element Question 3. Let x 13 268T and y [4 1 3 5] (NB. x and y should be...
These are my answere to the following questions: are they right? 1. B 2. T 3. T 4. T 5. F 6. T 7. A 8. D 9. E 10. B 11. B 12. A 13. A 14. D 15. C 16. D 17. T 18. C 19. T 20. T 21. T 22. A 23. T 24. D 25. B 26. A 27. A 28. A 29. T 30. C 31. D 32. A 33. T 34. F 35....