www.vustudents.ning.com

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

1

2

3

4

5

Latest Activity

shahzeel khan, Najwa Yaminah, spacedata and 2 more joined Virtual University of Pakistan
55 minutes ago
Najwa Yaminah replied to irshad kausar's discussion math
2 hours ago
Misha princess is now friends with Muhammad Sohaib Akhtar and Muhammad Umar daraz
5 hours ago
5 hours ago
Izhar Ahmad liked Mani Siddiqui's discussion تو نے دیکھا ہے کبھی
6 hours ago
Fatima khan posted a discussion

Entrepreneurship Festival

7 hours ago
21 hours ago
DamianTyson joined + M.Tariq Malik's group

21 hours ago