Explanation:
A.)
we have two machines M1 and M2
cpi stands for clocks per instruction.
to get cpi for machine 1:
= we multiply frequencies with their corresponding M1 cycles and add everything up
50/100 x 1 = 0.5
20/100 x 2 = 0.4
30/100 x 3 = 0.9
CPI for M1 = 0.5 + 0.4 + 0.9 = 1.8
We find CPI for machine 2
we use the same formula we used for 1 above
50/100 x 2 = 1
20/100 x 3 = 0.6
30/100 x 4 = 1.2
CPI for m2 = 1 + 0.6 + 1.2 = 2.8
B.)
CPU execution time for m1 and m2
this is calculated by using the formula;
I * CPI/clock cycle time
execution time for A:
= I * 1.8/60X10⁶
= I x 30 nsec
execution time b:
I x 2.8/80x10⁶
= I x 35 nsec
Answer And explanation
a)
has 1/
probability guess the correct source
b)
Each element in
is mapped by
/
. There are
So there are
-1 elements.
number of target elements = 
number of source elements =
-1
probability =
-1 /
c) Probability of the correct target element
1/
Answer:
import java.util.Scanner;
public class HollowSquare
{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
int size;
System.out.print("Enter the size : ");
size = scan.nextInt();
if(size>=1 && size<=20)
{
for(int i=0; i<size; i++)
{
for(int j=0; j<size; j++)
{
if(i==0 || j==0 || i==size-1 || j==size-1)
System.out.print("*");
else
System.out.print(" ");
}
System.out.println();
}
}
else
System.out.println("Invalid size.");
}
}
Answer:
True
Explanation:
Outsourcing, in a general term, means getting help from an external source. In software development context, outsourcing is an alternative systems building approach that may involve subscribing to an application service provider or hiring an external vendor to design and create software. In outsourcing, a business employs the service of a third-party application developer to design and create a software.
Some reasons why companies outsource a service are;
i. Shortage or lack of experienced developer in-house.
ii. To save time. Outsourcing can help reduce time taken to develop a software application because companies tend to outsource a developer that has designed similar application(s) in the past.
iii. To reduce cost. Outsourcing can help save cost considerably.
Answer:
Natural materials may include wood, cotton, fur, or wool. Human-made materials may include plastic, rubber, glass, and Styrofoam.