Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS502 Fundamentals of Algorithms Assignment No 1 Fall semester 3rd November 2012
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1

CS502 Fundamentals of Algorithms Assignment No 1 Fall semester 3rd November 2012





CS 502 Fundamental of Algorithms

Assignment # 01

Fall 2012

Total Marks = 20

Deadline


Your assignment must be uploaded / submitted before or on November 09, 2012


Upload Instructions

Please view the assignment submission process document provided to you by the Virtual University.


Rules for Marking

Please note that your assignment will not be graded if:

It is submitted after due date

The file you uploaded does not open

The file you uploaded is copied from someone else or from internet

It is in some format other than .doc



Note: Material that is an exact copy from handouts or internet would be graded

Zero marks. Your solution should consist of the material found through different sources and written in your own words.


Assignment Statements:


Question 1:

Consider the searching problem:

Input: A sequence of n numbers A = *a1, a2, . . . , an* and a value v.

Output: An index i such that v = A[i] or the special value NIL if v does not appear in A.



Observe that if the sequence A is sorted, we can check the midpoint of the sequence against v and eliminate half of the sequence from further consideration. Binary search is an algorithm that repeats this procedure, halving the size of the remaining portion of the sequence each time. Write Pseudo code, either iterative or recursive, for binary search. Argue that the worst-case running time of binary search is Θ (lg n).



Question 2:

Describe a Θ (n lg n)-time algorithm that, given a set S of n integers and another integer x, determines whether or not there exist two elements in S whose sum is exactly x.
Promote
4 members promoted this

Share Twitter

Views: 72

Attachments:

Fall 2012_CS502_1.doc Fall 2012_CS502_1.doc, 29 KB

Web hosting services
Running Shoes
Network Social
Social Network
Social Networking

Replies to This Discussion

Permalink Reply by ║ShafiQ KhaN™║ yesterday

Please Discuss here about Assignment no 1.....!

Permalink Reply by + M.Tariq Malik + yesterday

Please Discuss here about this assignment.Thanks

Permalink Reply by AQEEDAT HUSSAIN 2 hours ago

AA friends Please give any idea about the solution of assignment.

RSS

Welcome to

Sign Up
or Sign In

Or sign in with:

University Services

+ VU Orientation

+ Students Handbook

+ Open Courseware

+ VULMS Login Here

+ VU Official Site

+ VU Email

+ Handouts/Books

+ VU Content Library

+ VU Book Shop

+ VU TV Channels

+ VU Contacts List

+ VU Radio

+ Campus Career Portal

+ VU Alumni

+ Vu-Bytes Magazine

+ VU Sports

+ HEC Digital Library

+ VU Lecture Videos

+ We Care
Info

+ 36000+ Members

+ Top Points Members

+ About Us

+ VU Students Team

+ Become a Team Member

+ Moderators Group

+ Top Reputation Members

+ Angels Members

+ Intellectual Members

+ Report an Issue

+ Online Safety

+ Disclaimer

+ Advertise with Us

+ Site FAQ & Rules

Created By: M.Tariq Malik

Designed By: Amel

Chief Admin: M.Tariq Malik

Management: Moderators

+ Awards Badges List

+ Points Ranking System

Like Our Facebook Page





Attached Files
.doc   Fall2012_CS502_1.doc (Size: 29 KB / Downloads: 99)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SEO in Simple Words: How a VU Student Can Write a Clearer Assignment or Blog Post admin 0 1 4 hours ago
Last Post: admin
  Cs403 Assignment 3 Helping material May 8,2010 viki 1 5,224 04-28-2020, 03:19 PM
Last Post: ClaireBeauc
  cs301 assignment no 3 Solution 20 January 2016 Vuhelper 0 11,104 01-20-2016, 03:32 PM
Last Post: Vuhelper
  CS201 Assignment vo 3 Solution 20th January 2016 Vuhelper 2 2,617 01-20-2016, 03:28 PM
Last Post: Vuhelper
  CS101 Assignment no 3 Solution 20th January 2016 Vuhelper 0 2,298 01-20-2016, 03:25 PM
Last Post: Vuhelper
  SOC101 INTRODUCTION TO SOCIOLOGY assignment no 3 Solution 20 January 2016 Vuhelper 0 1,892 01-20-2016, 03:19 PM
Last Post: Vuhelper
  CS402 Assignment No 4 Solution & Discussion Xpert 0 2,116 08-01-2015, 02:33 AM
Last Post: Xpert
  cs101 Assignment No. 1 Solution 21 may spring 2015 semester Xpert 0 2,929 05-21-2015, 12:41 AM
Last Post: Xpert
  Assignment solution eng 301 due date 20 may 2015 rumesa khan 3 4,553 05-20-2015, 01:34 AM
Last Post: Xpert
  PHY301 Circuit Theory Assignment No. 1 idea Solution spring may 2015 semester Xpert 0 1,582 05-15-2015, 03:52 AM
Last Post: Xpert

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support