Back to Library QID: #109896

Solution for QID #109896: Compose program that supplement number from the console, and | StudyHelpMe

Subject: Computer Science
Status: Made to Order
Compose program that supplement number from the console, and figure out the number is prime or not? Compose total C++ program to request that the client enter 4 numbers. The program should utilize a capacity to track down the LARGEST number among them and print it on the screen. Compose c++ program to ascertain the amount of the multitude of components in a cluster. : Compose C program to print the Fibonacci series utilizing for circle? (a) (I) Suppose that FX(x) is a dissemination work. Show the converse change result, specifically that, assuming U is an arbitrary variable consistently disseminated in the stretch (0, 1) then, at that point, X = F −1 X (U) is an arbitrary variable with dissemination work P(X ≤ x) = FX(x). [4 marks] (ii) Discuss the thought of a pseudo-arbitrary number generator for uniform irregular factors. Depict appropriate calculations for producing pseudorandom numbers. [6 marks] (iii) Using the converse change bring about part (a)(i) infer a technique to create a flood of autonomous pseudo-irregular numbers from an outstanding dissemination with boundary λ > 0. What are the genuine mean and change of these numbers as far as λ? [4 marks] (b) (I) Suppose that you lead a reproduction analysis to appraise the mean, µ, of an arbitrary amount X from an example of n values X1, X2, . . . , Xn. How could you appraise µ? [2 marks] (ii) Now guess that your recreation likewise yields an example of n values Y1, Y2, . . . , Yn of the irregular amount Y where E(Y ) = µY is a known number. How might you utilize the technique for control variates to get to the next level your assessor of µ? Your response should make reference to all amounts that may should be assessed and how you will work on the assessment of µ (a) Why does the conventional security definition for crash safe hash capacities require a critical s and a security boundary n, despite the fact that generally normally utilized standard secure hash capacities need such info boundaries? [4 marks] (b) If hs : {0, 1} ∗ → {0, 1} '(n) is an impact safe hash work, do the accompanying developments Hs likewise give crash safe hash capacities? Clarify your replies. [2 marks each] (I) Hs(x) = hs(x) k x (for example attach x) (ii) Hs(x) = hs(x) k LSB(x) (for example attach least huge piece of x) (iii) Hs(x) = hs(x | 1) (bitwise-or, for example set least critical piece of x to 1) (c) Use Euler's hypothesis to compute 5−1 mod 8. [4 marks] (d) The standard Digital Signature Algorithm (DSA) utilizes a cyclic subgroup G ⊂ Z ∗ p of the numbers modulo an excellent p, with prime request q, where q partitions p − 1. (I) Give two benefits of utilizing a multiplicative subgroup of prime request, as gone against to simply utilizing Z ∗ p , in cryptographic plans in view of the Discrete Logarithm issue. [2 marks] (ii) Why is it conceivable to pick q significantly more modest than p, and what is an benefit of doing as such? PROBLEM I [pointsz25] Suppose we are comparing the implementations of Algorithm A and Algorithm B on the same machine. For inputs of size :2, Algorithm A runs in 511 steps, and Algorithm B runs in Exit—1. steps. For which values of it does Algorithm A M Algorithm B? 0 Draw the graphs. 1- Find point(s) of intersection: 0 Algorithm A beats Algorithm B for the following values of n: Give the worst case running times as a function of n. Algorithm Smart: long factorial( int n ) if( n < = 1 ) return 1; else return (n * factorial( n - 1 )); Algorithm NotSmart: long factorial( int n ) { x=1; For (i=1; i<=n; i++) x =xi; return (x) Algorithm Foolish: long factorial( int n ) if( n <= 1) return 1; else return (factorial(n) * factorial( n - 1 )); A) All algorithms are of @ (n) B) All algorithms are of 0(n^2) C) Algorithm Smart: 0(n); Algorithm NotSmart: @ (n^2); Algorithm Foolish does not terminate D) Algorithm Smart: ((n) , Algorithm NotSmart: (0(n); Algorithm Foolish does not terminate E) Algorithm Smart: ((n*2); Algorithm NotSmart: @ (n^2); Algorithm Foolish does not terminate
ZERO AI
Human Written
PHD EXPERTS
Verified
TURNITIN
Clean Report
FAST DELIVERY
Instant/Hourly