Answer:
QC process the same information in quantum bits or qubits which are 1s and 0s. qubits have a third state called “superposition” that allows them to represent a one or a zero at the same time
For Example, Factoring / Multiplying two large numbers is easy for any computer. But calculating the factors of a very large (say, 200-digit) number, on the other hand, is considered impossible for any PC. While Quantum Computers can perform the same task in few seconds.
B)-Two Inverters, four AND gates, and one OR gate.
C)-Two OR gates, four AND gates, and one Inverter.
D)-Two Inverters, four OR gates, and one AND gate.
E)-Two Inverters, four AND gates, and no OR gates.
Answer:
A decoder is a circuit which has n inputs and 2n outputs, and outputs 1 on the wire corresponding to the binary number represented by the inputs. For example, a 2-4 decoder might be drawn like this:
and its truth table (again, really four truth tables, one for each output) is:
i1 i0 d3 d2 d1 d0
0 0 0 0 0 1
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 0 0 0
Explanation:
The following circuit generates all four minterms from two inputs, and implements the 2-4 decoder.
Answer:
Following is the program in c++ language
#include <iostream> // header file
using namespace std; // namespace
int maxSum(int ar[][10],int r) // function definition of maxsum
{
int s=0; // varaible declaration
for(int k=0;k<r;k++)// iterating the loop
{
int maximum=ar[k][0]; //finding the maximum value
for(int k2=0;k2<10;k2++)// iterating the loop
{
if(maximum<ar[k][k2]) // check the condition
{
maximum=ar[k][k2]; // storing the value in the maximum variable
}
}
s=s+maximum;//adding maximum value to the sum
}
return s; // return the sum
}
int main() // main function
{
int ar[][10]={{5,2,8,-8,9,9,8,-5,-1,-5},{4,1,8,0,10,7,6,1,8,-5}}; // initilaized array
cout<<"sum of maximum value:";
int t=maxSum(ar,2); // function calling
cout<<t; // display the maximum value
}
Output:
sum of maximum value:19
Explanation:
Following are the description of Program
word2 = "board"
What is the correct way to concatenate the strings?
newWord = word1 / word2
newWord = word1 + word2
newWord = word1 * word2
newWord = word1 = word2
The correct way to concatenate the strings is:
newWord = word1 + word2
Answer:
newWord = word1 + word2
Explanation:
Answer:
Code is provided in the attachment form
Explanation:
Vector Multiplication code:
Vector_multiplication.c file contains C code.
See attachment no 1 attached below
Classification of Algorithm: For creating elements in vector c of size n, number of scalar multiplications is equal to n. The size of original two vectors scales directly with the number of operations. Hence, it is classified as O(n).
Answer: The shell sort is based on insertion sort. Here the list of elements are divided into smaller sub list which are sorted based on insertion sort.
Its best case time complexity is O(n* logn) and worst case is O(n* log^2 n)
Explanation:
Shell sort is an inplace sorting here we begin by dividing the list into sublist and sorting the list with insertion sort. We create interval for dividing the list into sub list until we reach the smallest interval of 1.
The best case is O(n* logn).
Answer:
The advantage and the disadvantage of the relevant query are illustrated in the explanation in the paragraph below.
Explanation:
Advantage:
Disadvantage: