Ads

Pages

Showing posts with label CS and IT. Show all posts
Showing posts with label CS and IT. Show all posts

Sunday, January 1, 2012

IT430 VU Current Assignment No. 4 Fall 2011 – solution soon

Question: (10)

Economy of Pakistan is strongly affected by war on terror, law and order situation, energy shortage and other global financial crisis. These uncertain conditions are causing significant reduce in Pakistan’s imports and exports and slowing down the economic growth of Pakistan. In your vu solutions.com opinion, how E-Commerce can play a role to build the confidence among different organizations, consumers and society for the improvement in economic growth of Pakistan?

Your answer should consist of 1-2 page(s) and strictly to the point. Avoid irrelevant stories and lengthy answers otherwise your marks will be deducted.

NOTE:

Submit “.doc” file only. You can search the topic from internet but you have to write the answer in your own words. Exact copying of the assignment (or some portion of the assignment) from the internet or other student will lead to copy case and zero marks will be awarded. Different softwares will be used to check plagiarism in assignments. Do not post any assignment related query on MDB, if you have any query regarding assignment then email at it430@vu.edu.pk

cs615 VU Current Assignment No. 3 Fall 2011 solution

CS 615 assignments Solution

People are managed through an organizational structure. This hierarchical structure is based on the four cornerstones of management:

– Delegation

– Authority

– Responsibility

– Supervision.

Delegation bestows authority, and authority produces (and requires) responsibility. Both authority and responsibility require supervision, and effective supervision requires a suitable organizational structure:

Organization as a System

It helps to think of organizations are systems.

Simply put, a system is an organized collection of parts that are highly integrated in order to accomplish an overall goal. (Page 194)

Systems have inputs, processes, outputs and outcomes. To explain, inputs to the system include resources such as raw materials, money, technologies and people.

These inputs go through a process where they're aligned, moved along and carefully coordinated, ultimately to achieve the goals set for the system. Outputs are tangible results produced by processes in the system, such as products or services for consumers.

The organization is depicted by its organizational charts, job descriptions, marketing materials, etc.

The organizational system is also maintained or controlled by policies and procedures, budgets, information management systems, quality management systems, performance review systems, etc.


Structural Dimensions

The organization's structure, or design, is the overall arrangement of the organization's various roles, processes and their relationships in the organization.

The design of an organization is a means to accomplishing the organization's overall goal - the structure is not an end in itself.

In systems theory terms, the design ensures that the appropriate inputs go through the necessary processes to produce the required outputs to produce the intended outcomes.

�� Centralization -the extent to which functions are dispersed in the organization, either in terms of integration with other functions or geographically

�� Formalization - regarding the extent of policies and procedures in the organization

�� Hierarchy - regarding the extent and configuration of levels in the structure

�� Routinization - regarding the extent that organizational processes are standardized

�� Specialization - regarding the extent to which activities are refined

�� Training - regarding the extent of activities to equip organization members with knowledge and skills to carry out their roles.

Traditional Structures of Business Organization (Also see the page number 197 of handouts)

A little description related to the topic just read it:

Description of how new system is to be developed

– Technologies

– In House vs. Consultants

– Derivatives of existing (i.e. use existing object model)

– Architectural Layout – Layers


8. Communications management plan

A communications management plan is a document that provides:

• A collection and filing structure that details what methods will be used to gather and store various types of information. Procedures should also cover collecting and disseminating updates and corrections to previously distributed material.

• A distribution structure that, details to whom information (status reports, data, schedule, technical documentation, etc.) will flow, and what methods (written reports, meetings, etc.) will be used to distribute various types of information. This structure must be compatible with the responsibilities and reporting relationships described by the project organization chart.

• A description of the information to be distributed, including format, content, level of detail, and conventions/definitions to be used.

• Production schedules showing when each type of communication will be produced.

• Methods for accessing information between scheduled communications.

• A method for updating and refining the communications management plan as the project progresses and develops. The communications management plan may be formal or informal, highly detailed or broadly framed, based on the needs of the project. It is a subsidiary component of the overall project plan.

CS504 VU Current Assignment No. 3 Fall 2011

Question: [marks 10+10]

Consider a community website e.g. Facebook.com, which the people from different communities can use to share their status, videos, images, articles etc. with each other.

To use the website a person must be registered member, and for registration the user must have an email address on Gmail, Yahoo or Hotmail (But no other domain).

After registration the person becomes the member of the community, and can share anything with his/her friends.

However to make a friend he/she can have two options:

1) He/she can use the search service provided by the website to search friends (already members of the site), to which he sends the “friend request”, after that person (to whom the request was sent) accepts the request, they both become friends and can share anything with each other.

2) Secondly he/she can select the option “Find friends using email contacts”. In this case the system fetches the contact list from his email account; requests are automatically sent to the persons that are already added in his/her email contacts (and are also the member of this community website). When all these members accept requests they become friends of the requester and can share anything with him/her.

Keeping in mind the Krutchen’s 4+1 architectural view model, develop diagrams to represent (at least one diagram for each):

1) Implementation view (Also called Development View or Code view)

2) Deployment View (Also called Physical view)

Note: you can use any notations and any software to draw the diagrams. For further concepts about Architectural Views, please revise Lecture no. 23

Deployment View:

The deployment view / physical view describe how the system is deployed in terms of its hardware resources [1]

Here in above diagram:

Client PC: is the any client system (desktop PC or mobile even) with a browser (client) application running on it. Members login to the registration server by providing their login information.

Registration Server: Registration server is the central database server (may be a mainframe system) with multiple processes (e.g. login validation and authentication process, contents management process, security related processes, external interface managers etc. etc.), running on it for overall operational site.

External / Remote Server: May be external server e.g. a Google server or Hotmail server etc. which is contacted by the internal (website registration server) through secure communication and interfaces to get needed information e.g. contact lists etc.

Implementation / Code View:

The code view is what a programmer sees. Thus the components of this view are things like classes, objects, procedures, and functions and their abstraction/composition into things like subsystems, layers and modules [1]. For the sake of simplicity we present a top level view of system in terms of main components and sub-components (up to first level only)

References :

[1] “Evaluating software Architectures: Methods and Case Studies”, by Paul Clements,

Rick Kazman, and Mark Klein. 2002 Addison-Wesley.

Monday, October 31, 2011

CS101 Assignment #01 Solution

Solution:

Q.1. There are multiple ways to enhance the performance of a computer system. Discuss what role a cache can play in boosting up the performance of a computer system? (5 Marks)

Answer:
A CPU cache is a cache used by the central processing unit of a computer to reduce the average time to access memory it is different as compare to the main memory which is used to copy data from the secondary storage it store the data inside the page file and then take it from there as compare to cache memory it exists inside the cpu and directly gives the data to cpu to process the instructions lets see a figure which will make it more clear. The cache is a smaller, faster memory which stores copies of the data from the most frequently used main memory locations. As long as most memory accesses are cached memory locations, the average latency of memory accesses will be closer to the cache latency than to the latency of main memory. It is Volatile memory, also known as volatile storage, is computer memory that requires power to maintain the stored information, When the processor needs to read from or write to a location in main memory, it first checks whether a copy of that data is in the cache. If so, the processor immediately reads from or writes to the cache, which is much faster than reading from or writing to main memory. Most modern desktop and server CPUs have at least three independent caches: an instruction cache to speed up executable instruction fetch, a data cache to speed up data fetch and store, and a translation [vu solutions] look aside buffer (TLB) used to speed up virtual-to-physical address translation for both executable instructions and data. Data cache is usually organized as a hierarchy of more cache levels which are L1 and L2 etc.

Q.2. Generally there is a concept that “Memory” and “Storage” are same terms. Do you agree? Justify your opinion with a real life example. (5 Marks)


Answer:
AS we know nowadays these are very common terms which we use in our daily life so for that you called mostly the Ram as the memory of the system and the Storage device which is called the hard disk or Flash (Usb) memory or can be a memory card. So what’s the difference between them lets see it in real life that in Memory which is Volatile and need powers to maintain if the electricity is off then it is going to wash each and everything. As compare to the Storage Non-Volatile memory which doesn’t need the power all the time when the data is store to it and power went off next time you can see the data inside it. As we can see a new functions which start from the Xp Windows Os from Microsoft. Hibernate it store the data to the hard drive from the Memory You can say the Memory to storage when you hibernate the system it will open next time all the files and applications where you were working. So it’s an example from real life.

Q3).Convert the following Octal Number to Hexadecimal Number by writing each and every step of conversion process: (5 Marks) (53324)8 => (?)16

First we will convert this to binary to decimal

CS506 Assignment No. 1 Fall 2011 Solution

Question:

Write a program that computes the average and standard deviation of the text floating point numbers in a file. Use the following formulas for the average and the standard deviation of N values. The formulas compute the sum, the sum of squares, the average, the average square, the variance, and finally, the standard deviation.

sum = x1 + x2 + x3 + ... + xN-1 + xN

sumSQ = x12 + x22 + x32 + ... + xN-12 + xN2

avg = sum/N

avgSQ = sumSQ/N

var = avgSQ - avg2

sd = var(1/2)

The input file will contain any number text floating point numbers, similar to the following:

10.5

12.9

9.67

12.05

8.23

10.08

10.23

7.7

10.4

11.34

Numbers could be several, or none per line, and negative numbers are perfectly OK.

Solution:

Input Text:

10.0

20.0

30.0

40.0

50.0

............

SAVE THIS FILE IN .JAVA

import java.io.*;

import java.util.*;

import javax.swing.*;

public class assignment1{

public static void main( String args[] ){

try{

FileReader fr = null;

BufferedReader br = null;

fr = new FileReader ("input.txt");

br = new BufferedReader (fr);

String line = br.readLine();

double sum =0 ;

while (line != null) {

double num = Double.parseDouble(line);

sum += num;

line = br.readLine();

}

JOptionPane.showMessageDialog(null, "Sum = " + sum);

br.close();

fr.close();

}

catch(NumberFormatException nfEx) {

System.out.println(nfEx);

}

catch(FileNotFoundException fnfEx){

System.out.println(fnfEx);

}

catch(IOException ioEx){

System.out.println(ioEx);

}

}

}

Saturday, October 29, 2011

CS401 Assignment No. 1 Fall 2011 solution


Question No. 1:

a)

Suppose your computer has a processor with 24-bit address lines. What is maximum amount of memory that can be attached in your system? (Show the step(s) for calculation of maximum addressable memory) (2.5 marks)

Solution: -

Accessible memory addresses = 2number of address bits

224 = 16777216 bytes

16777216 / 1024 = 16384 KB

16384 / 1024 = 16 MB

b)

How many address bits are required for accessing 1GB RAM? (Show the step(s) for calculation of required address bits) (2.5 marks)

Solution: -

As you know 1GB means 1024MB so we can write it as

1GB = 1024 x 1MB

As you know that 1MB is 220

So we can write the expression as

1024 x 220

This can be further simplified as

210 x 220

=230

Hence, 30 address lines are required to access 1GB RAM.

Question No. 2:

What are the contents of memory locations 0151, 0152, 0153, ………….,0158 if 0151 is starting address for Label1. (1 mark for each location)

Label1: dw 8494

db 42

dw 54

dw 7500

db 01

Solution: -

Memory location Contents

0151 94

0152 84

0153 42

0154 54

0155 00

0156 00

0157 75

0158 01

Question No. 3:

a)

Calculate physical address using the following segment offset pairs. (1 mark each)

1. 00EA:02A4

2. 0100:AA23

3. D3B8:F222

4. 00A0:1234

5. 8FEf:0FFF

Solution: -

Memory Location

Contents

0151

94

0152

84

0153

42

0154

54

0155

00

0156

00

0157

75

0158

01

Question No. 3:

a)

Calculate physical address using the following segment offset pairs. (1 mark each)

1. 00EA:02A4

2. 0100:AA23

3. D3B8:F222

4. 00A0:1234

5. 8FEf:0FFF

Solution: -

1)

00EA0

002A4 +

_______

01144 = physical address

2)

01000

0AA23 +

_______

0BA23 = physical address

3)

D3B80

0F222 +

______

E2DA2 = physical address

4)

00A00

01234 +

________

01C34 = physical address

5)

8FEF0

00FFF +

_________

90EEF = physical address

b)

What is effective address generated by the following instructions? Every instruction is independent of others. vusolutions Initially bx = 0x0101, bp=0x0222, si=0x1234, var1=0x1771 (1 mark each)

1. mov ax, [bx+si]

2. mov ax, [bx+100] (100 is in decimal)

3. mov ax, [bp+si]

4. mov ax, [var1+bp]

5. mov ax, [si+var1]

Solution: -

1)

Effectice address = [bx+si]

= [0101 + 1234]

= [1335]

2)

Effectice address = [bx + 100]

After converting 100 into hexadecimal

Effectice address = [bx + 64]

= [0101 + 64]

= [0165]

3)

Effective address = [bp+si]

= [0222 + 1234]

= [1456]

4)

Effective address = [var1+bp]

= [1771 + 0222]

= [1993]

5)

Effective address = [si + var1]

= [1234 +

CS402 Assignment No. 1 Fall 2011 solution


Theory of Automata

CS402

ASSIGNMENT NO.1

Total Marks= 20 (4+4+4+4+4)

Assignment Submission Deadline

Your assignment must be uploaded before or on 31-10-2011 [upload your assignment well before due date to avoid any assignment uploading related issues]

Rules for Marking

It should be clear that your assignment will not get any credit if:

o The assignment is submitted after due date

o The assignment is copied

Objectives

Objectives of this assignment are to make students able to understand the following concepts,

o Basic concepts clarification

o Recursive Definition of a language

o Regular Expression

o Finite Automata

Question No.1 Basic Concepts [Sets, Letters, Valid Alphabet, Languages, Strings and Words]

a. Which of the following are strings generated from alphabet Σ = {a, b}

i. abba

ii. baa$a

iii. abc.

iv. ba?

v. b.bba

b. Which of the following are valid words for language of all strings ending with bab defined for alphabet Σ = {a, c , bab}

i. acccba

ii. cccbaa

iii. cccbab

iv. babbb

v. baaab

Question No.2 Defining Languages [Using Recursive Definition, Re’s, Fa’s]

Give recursive definitions of following languages defined over alphabet Σ = {a, b}

i. Having all strings starting with b and having length greater than 2

ii. NOT having ab at any place.

Question No.3 Regular Expressions

Give Regular Expression for each of the following language defined over alphabet Σ = {a, b}

i. Even Length strings ending with b

ii. Strings with b’s count multiple of three

Question No.4 Models To Recognize Languages (Fa’s)

Give Finite Automata (FA) for each of the following language defined over alphabet Σ = {a, b}

i. Language having all strings NOT containing aa at any place

ii. Language of all strings NOT STARTING with bb

Question No.5 Models To Recognize Languages (Nfa’s)

Give Non Deterministic Finite Automata (NFA) for each of the following language defined over alphabet Σ = {a, b}

i. Language of all strings STARTING WITH bba

ii. Language having all strings NOT having even no of a’s and b’s

You can view the demo video in file,http://vulms.vu.edu.pk/Courses/CS402/Downloads/Assignment1.00.zipto see how to make FA in MS Word.

Note:

Please keep in view the following points while attempting any question:

• Where OR is used in the description of a language it means that expressions on both sides of ‘OR’ are parts of the language.

• Where NOT is used in the description of the language it means that language includes all strings except described in the ‘NOT’ condition, for example

language NOT starting with a, means all strings not having a in the start (you have to evaluate yourself what kinds of strings are these).

Assignment Uploading Instructions:

o Upload single word file having solutions for all parts as well as chart images.

o You can crop and compress images in the word file by double clicking on an image and selecting compress all images option to decrease file size before

uploading it.

Appendix:

Definition of Set:

A set can be defined as follows:

“Non repeating collection of elements”

Example Sets:

i. {car, bus }

ii. {table, chair , stand}

iii. {basket ,eggs}

iv. { ^, #, *, / }

However {car, car, bus} is NOT a set according to its definition.

Solution:


Question No.1 Basic Concepts [Sets, Letters, Valid Alphabet, Languages, Strings and Words]
a. Which of the following are strings generated from alphabet Σ = {a, b}
i. abba
ii. baa$a
iii. abc.
iv. ba?
v. b.bba

b. Which of the following are valid words for language of all strings ending with bab defined for alphabet Σ = {a, c , bab}
i. acccba
ii. cccbaa
iii. cccbab
iv. babbb
v. baaab


Question No.2 Defining Languages [Using Recursive Definition, Re’s, Fa’s]
Give recursive definitions of following languages defined over alphabet Σ = {a, b}

i. Having all strings starting with b and having length greater than 2

Answer. { baa, bab, bba, bbb, bba, baab, ….. .. }

ii. NOT having ab at any place.


Answer. {^, a, b, ba, bab, bba, bbb, baa, bbba,…..}

Question No.3 Regular Expressions
Give Regular Expression for each of the following language defined over alphabet Σ = {a, b}

i. Even Length strings ending with b

Answer. { ^ ,ab, bb, aabb,abab, bbbb, aaaabb, aaabab, ……}

ii. Strings with b’s count multiple of three

Answer. {^, bbb, bbbbbb, bbbbbbbbb, bbbbbbbbbbbb, bbbbbbbbbbbbbbb,
bbbbbbbbbbbbbbbbbb, bbbbbbbbbbbbbbbbbbbbb,………}


Question No.4 Models To Recognize Languages (Fa’s)
Give Finite Automata (FA) for each of the following language defined over alphabet Σ = {a, b}

i. Language having all strings NOT containing aa at any place

Answer. { ^, a, b, ab, ba, abb, bab,bba, baba, abbb, ….}

ii. Language of all strings NOT STARTING with bb

Answer. { ^, a, b, aab, aaab, abab, aabab, …….}

Question No.5 Models To Recognize Languages (Nfa’s)
Give Non Deterministic Finite Automata (NFA) for each of the following language defined over alphabet Σ = {a, b}

i. Language of all strings STARTING WITH bba

Answer. { ^, bba, bbaa, bbaba, bbaab, bbab, bbabb, …}

ii. Language having all strings NOT having even no of a’s and b’s

Answer. {^, a, b, aaab, bbba, ababab, aaaaab, bbbbba, ……}