Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Assignment No. 01 SEMESTER Fall 2019 CS502- Fundamentals of Algorithms

Assignment Statement:

 

In mathematics Prime is a number which can be only divisible by 1 and itself. Examples of prime numbers are, 1 , 3 , 5 , 7 ,  11 , 13 , 17 , 19 , 23 , 29 , 31 etc. When these numbers get large, then it is very difficult to manually identify them as to be prime or not prime. For example the numbers like, 443 and 44371 cannot easily identify as Prime.

There may be many algorithms which can be written for the identification of a number to be prime or not prime.

 

Question No  01:   (Marks:  10)

You are required to design (write) a simple algorithm (Only Pseudo code) which can identify a number to be Prime or Not Prime.

 

Question No  02:   (Marks:  10)

You are required to calculate (Step by Step) the worst case time complexity T(n) of the algorithm designed in Question No. 01.

Views: 136

Reply to This

Replies to This Discussion

RSS

Looking For Something? Search Below

Latest Activity

© 2022   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service