Posted on

Meaning of oracle database server error codes

ORA-00000:
normal, successful completion
Cause:
Normal exit.
Action:
None
ORA-00001
ORA-00001:
unique constraint (string.string) violated
Cause:
An UPDATE or INSERT statement attempted to insert a duplicate key. For Trusted Oracle configured in DBMS MAC mode, you may see this message if a duplicate entry exists at a different level.
Action:
Either remove the unique restriction or do not insert the key.
ORA-00017:
session requested to set trace event
Cause:
The current session was requested to set a trace event by another session.
Action:
This is used internally; no action is required.
ORA-00018:
maximum number of sessions exceeded
Cause:
All session state objects are in use.
Action:
Increase the value of the SESSIONS initialization parameter
ORA-00019:
maximum number of session licenses exceeded
Cause:
All licenses are in use.
Action:
Increase the value of the LICENSE MAX SESSIONS initialization parameter
ORA-00020:
maximum number of processes (string) exceeded
Cause:
All process state objects are in use.
Action:
Increase the value of the PROCESSES initialization parameter.
ORA-00021:
session attached to some other process; cannot switch session
Cause:
The user session is currently used by others.
Action:
Do not switch to a session attached to some other process.
ORA-00022:
invalid session ID; access denied
Cause:
Either the session specified does not exist or the caller does not have the privilege to access it.
Action:
Specify a valid session ID that you have privilege to access, that is either you own it or you have the CHANGE_USER privilege.
ORA-00023:
session references process private memory; cannot detach session
Cause:
An attempt was made to detach the current session when it contains references to process private memory.
Action:
A session may contain references to process memory (PGA) if it has an open network connection, a very large context area, or operating system privileges. To allow the detach, it may be necessary to close the session’s database links and/or cursors. Detaching a session with operating system privileges is always disallowed.
ORA-00024:
logins from more than one process not allowed in single-process mode
Cause:
Trying to login more than once from different processes for ORACLE started in single-process mode.
Action:
Logoff from the other process.
ORA-00025:
failed to allocate string
Cause:
Out of memory.
Action:
Restart with larger sga heap.
ORA-00026:
missing or invalid session ID
Cause:
Missing or invalid session ID string for ALTER SYSTEM KILL SESSION.
Action:
Retry with a valid session ID.
ORA-00027:
cannot kill current session
Cause:
Attempted to use ALTER SYSTEM KILL SESSION to kill the current session.
Action:
None.
ORA-00028:
your session has been killed
Cause:
A privileged user has killed your session and you are no longer logged on to the database.
Action:
Login again if you wish to continue working.

Posted on

Become force.com developer

The certification exam conducted by worlds largest cloud computing company salesforce.com is the force.com certified developer examination track. Here is the brief outline of exam syllabus from the salesforce.com website:

Application Design 5%
List and describe components of an application
Describe the model-view-controller design paradigm
Given a scenario, determine whether sufficient information is available to plan/build/design an application
Overview of Force.com Platform 5%
List and describe the steps required to design and deploy a successful application built using the declarative
capabilities of the Force.com platform
List and describe the building blocks of an application provided by the Force.com platform
Data Model 32%
Describe how to create a functional data model for a business application
Given a scenario, select the features required to create a functional data model for a business application
Describe the properties and implications of choosing one object relationship type over another and
distinguish among relationship types
Given a scenario, distinguish among object relationship types, describe how to create relationships, and
determine which relationship should be recommended
List and describe the features used to set permission and data access in a custom app
Given a scenario, select the appropriate feature (e.g., profiles, defaults, roles) to provide appropriate
permissions and data access in a custom app
List and describe optional (Salesforce-enabled) features for managing the application (e.g., create audit
fields, encrypted fields, multicurrency)
User Interface 15%
List and describe the components of any Force.com application user interface (e.g., tabs, applications, detail
pages, list views)
Given a scenario, determine the capabilities and constraints of the declarative framework for building a user
interface (e.g., what can and can’t be done in a page layout)
Describe use cases for how Visualforce can extend the user interface in the declarative framework and when
to do so
Describe the capabilities and functionality of Force.com Sites
Business Logic 23%
List and describe how to create formulas, validation rules, and workflow rules
Given a scenario, determine which Force.com feature to use to solve a business requirement and/or describe
how to apply the solution
List and describe the capabilities of the Force.com approval processes
Given a scenario, select the appropriate features of Force.com approval processes to satisfy business
requirements
List and describe the features of the Force.com platform for debugging and monitoring automated business
processes
Describe use cases for extending business logic through Apex
Objective WeightingApplication Design 5%List and describe components of an applicationDescribe the model-view-controller design paradigmGiven a scenario, determine whether sufficient information is available to plan/build/design an applicationOverview of Force.com Platform 5%List and describe the steps required to design and deploy a successful application built using the declarativecapabilities of the Force.com platformList and describe the building blocks of an application provided by the Force.com platformData Model 32%Describe how to create a functional data model for a business applicationGiven a scenario, select the features required to create a functional data model for a business applicationDescribe the properties and implications of choosing one object relationship type over another anddistinguish among relationship typesGiven a scenario, distinguish among object relationship types, describe how to create relationships, anddetermine which relationship should be recommendedList and describe the features used to set permission and data access in a custom appGiven a scenario, select the appropriate feature (e.g., profiles, defaults, roles) to provide appropriatepermissions and data access in a custom appList and describe optional (Salesforce-enabled) features for managing the application (e.g., create auditfields, encrypted fields, multicurrency)User Interface 15%List and describe the components of any Force.com application user interface (e.g., tabs, applications, detailpages, list views)Given a scenario, determine the capabilities and constraints of the declarative framework for building a userinterface (e.g., what can and can’t be done in a page layout)Describe use cases for how Visualforce can extend the user interface in the declarative framework and whento do soDescribe the capabilities and functionality of Force.com SitesBusiness Logic 23%List and describe how to create formulas, validation rules, and workflow rulesGiven a scenario, determine which Force.com feature to use to solve a business requirement and/or describehow to apply the solutionList and describe the capabilities of the Force.com approval processesGiven a scenario, select the appropriate features of Force.com approval processes to satisfy businessrequirementsList and describe the features of the Force.com platform for debugging and monitoring automated businessprocessesDescribe use cases for extending business logic through Apex

Posted on

Tamilnadu 10th standard exam preparation

Heredity and Evolution 1 mark question choose the best answer Series 1:
Heredity and evolution is the first lesson in 10th standard science book. We have launched this initiative to help students prepare for exam and secure centum. This is an initiative towards tmailnadu target centum project from www.trainerslisting.com. We will be publishing 1 mark question in this series. Avial this free opportunity and secure centum in science

1) Inheritance of characteristics through a generation is called?
a) Popularity
b) Heredity
c) Serenity
d) Genes
Answer : b – Heredity
Heredity is the inheritance of characteristics thorugh a generation. This can be seen in plants and animals
2) What is the differences in the characteristics among the individuals of the smae species?
a) Creation
b) Generation
c) Variation
d) Adoption
Answer : c – Variation
3) What is the other name of germ cells?
a) Gametes
b) Species
c) fruit
d) plants
Answer : a – Gametes is the other name of germ cells
4) Which variation is pertaining to bodycells and not inherited?
a) Germinal variation
b) Somatic Variation
c) Intraspecific variation
d) inter specific variation
Answer : b – somatic variation
5) The process of gradual development of more complex species from pre-existing simpler forms is called as:
a) Evolution
b) Creation
c) Adoption
d) Suction
Answer : a – Evolution
10th standard state board science Chapter 3 Free Practice Questions:
10th standard state board science Chapter 3 Free Practice Questions
Structure and Function of Human Body – Organ Systems – Chapter 3
1) Harmonius steady state of body functioning is called
a) Osteroporosis
b) Homeostasis
c) Homophorosis
d) Biphorosis
Answer : b
2) Process through which two or more organs intereact and compliment function of one another is called
a) Co-ordination
b) Citation
c) Vibration
d) Digestion
Answer : a
3) Which systems in human body do the function of co-ordinating and integrating all activities of the organs
a) Neural system and circulatory system
b) Circulatory system and excretory system
c) Neural system and endocrine system
d) Endocrine system and respirtory system
Answer : c
4) Nervous syste is also called as
a) Neural system
b) respiratory system
c) excretory system
d) nephrology system
Answer : a
5) Which system provides organized network of point to point connections for quicker coordination
a) Nervous system
b) Circulatory system
c) Excretory system
d) digestive system
Answer : a
6) Chemical integration through hormones is the function of
a) circulatory system
b) endocrine system
c) respiratory system
d) digestive system
Answer : b
7)Nerve cells are also referred to as
a) Neurons
b) lutron
c) poton
d) electron
Answr : a
8) Which part of nervous system can detect, receive and transmit different kinds of stimuli
a) Neurons (or) nerve cells
b) electron
c) Nerve fibres
d) Nerve conjuctions
Answer : a
9) Bundles of extended processes of nerve cells are
a) Nerve fibres
b) NEurons
c) Photon
d) bruton
Answer : a
10) Our brain is made up of __________ of neurons
a) million
b) hundred
c) thousands
d) billions
Answer : d

Heredity And Evolution Chapter1 Science Tamilnadu 10thstandard Practice Questions
1) Fifteen million years ago in africa existed
a) Gorilla
b) Alligator
c) snake
d) dragon
Answer : a
REproduction in Plants Pollination 10SSLC Practice Question Tamilnadu:
We are in process of creating 1 mark practice question on chapter 4 that deals with reproduction in plants. 1 Mark questions are the key to success in exams.

1) When do pollen grains start germinating
a) When pollen grains fall on a suitable stigma
b) When pollen grains fall on suitable leaves
c) When pollen grains fall on suitable anther
d) When pollen grains fall on suitable stem
Answer : a
2) What are the two cells that constitue pollen grains
a) Large generative cells and small vegetative cell
b) Large genertive cell and small agitative cells
c) Large vegetative cell and small generative cell
d) Large vegetative cell and small agitative cell
Answer : c
3) Vegetative cell grows and emerges through
a) extinct
b) instinct
c) generative cell
d) germination pore
Answer : d
4) Pollen grains are carried away by wind because
a) They are thick and dusty
b) They are dry and powdery
c) They are sandy
d) They are invisible
Answer : b
5) Pollination by water is known as
a) Hydrophobia
b) Hydrocephalous
c) Hydrogen
d) Hydrophily
Pollination Practice Questions Science 10th SSLC Tamilnadu:
The key secret behind scoring good and great in tamilnadu 10th standard,SSLC exam is concentrating on 1 mark question. Even if you are late if you have a good grep on 1 mark question you can score first class percentage. With this in mind, we’ve started with interesting, easy and possible exam questions on many different topics.
Pollination the interesting topic in plant fertilization, A part of Chapter 4 Reproduction In Plants is discussed here. We will be updating plenty (100s and 200s of question for your sure success). Keep reading our website
1) Pollination is the
a) Transfer of pollen grains from root to leaves
b) Transfer of pollen grains from stem to leaves
c) Transfer of pollen grains from anther to leaves
d) Transfer of pollen grains from anther to stigma
Answer : d
2) Pollen grains have protective walls called
a) inner wall and outer wall
b) exine and intine
c) echinodermata and endodermata
d) extinct and instinct
Answer : b
3) Germination pores are present in
a) Intine of pollen grains
b) Instinct of pollen grains
c) Endoderm of pollen grains
d) Exine of pollen grains

Answer : d

4) Which of the wall in pollen grain is thick
a) Outer wall echinoderm
b) Outer wall exine
c) Inner wall Intine
d) Inner wall endoderm
Answer : b
5) Inner wall of pollen grain is
a) thick and elastic
b) Thin and elastic
c) Thin and firm
d) Thick and firm
Reproduction in plants Practice 3 Tamilnadu 10th SSLC Exam:
Here is the third set of question in our mini question bank series that helps you gauge your level of preparation in the chapter 4 reproduction in plants of science subject. Remember that 1 mark question is the king. It helps you clear your exam so easily. Practice makes perfect
1) Aggregate fruit is developed from
a) Single flower with multicarpellary, apocarpous, superior ovary
b) Single flower with monocarpellary,apocarpous,superior ovary
c) Single flower with monocarpellary, apocarpous, inferior ovary
d) Single flower with multicarpellary,apocarpous,inferior ovary
Answer : a
2) Multiple fruit is also called as
a) Compound fruit
b) Composite fruit
c) Congregate fruit
d) Concert fruit
Answer : b
3) Which of the following fruits split open at maturity to liberate the seeds
a) Dry dehiscent fruit
b) Dry indehiscent fruit
c) Dry composite fruit
d) Dry aggregate fruit
4) Decay of dry indehiscent fruit is called as
a) Monocap
b) Apocap
c) Polycap
d) Pericap
Answer : d
5) Which of the following fruit break into many one seeded parts called mericarps
a) Schizocarpic fruits
b) Dehiscent fruits
c) Indehiscent fruits
d) Multiple fruits
Answer : a
Science 10th Standad Syllabus:
Here is the categorization tamilnadu 10th standard science syllabus.It is boradly classified into three major classification

1) Biology – Study of life of plants, animals

2) Chemistry – More information on chemicals

3) Physics

Following are the list of chapters covering all the aspects in detail
1) Heredity and evolution
2) Immune system
3) Structure and functions of human body-organ system
4) Reproduction in plants
5) A representative study of mammals
6) Life processes
7) Conservation of environment
8) Waste water management
9) Solutions
10) Atoms and molecules
11) Chemical reactions
12) Periodic Classification of elements
13) Carbon and its compounds
14) Measuring instruments
15) Laws of motion and gravitation
16) Electricity and energy
17) Magnetic effect of electric current and light
We will be discussing more on each and every lesson starting with simple 1 mark choose the best answer question

Posted on

Overview on NYSTCE Exam

Newyork state teacher certification exam, NYSTCE as it is popularly called is geared towards certifying educators who will take up the prospective employment as teacher in Newyork public schools.

It measures teh knowledge of an educator against established standards.IT is an objective basedexam

Text books developed based on curriculum and certification standards form the source of this examination.

NYSTCE includes tests for following level of certifications

1) Newyork teaching assistant certification

2) Tests for teacher certification

3) Tests for school leaders( previously administrators)

The list of test dates including regular registration, late registration, emergency registration is available online

http://www.nystce.nesinc.com/NY16_testdates.asp

Posted on

Know more on All Indian Engineering Entrance Examination AIEEE

AIEE,All India Engineering Entrance Examination is the entrance examination conducted on an all india basis for admissions to professional andtechnical programmes in the country.This includes Engineering programmes and architecture/planning programmes.

What is the AIEEE Examination pattern?
It is a 2 paper examination:

1) AIEEE 1st Paper – Maths,Physics,Chemistry – equal weightage

2) AIEEE 2nd Paper – Maths,Aptitude

If it is for B.Arch/B.Planning there is an additional drawing paper

It is to be noted that AIEEE is a objective multiple choice paper.

How is the examination valued? Are there any negative marking for wrong answer?

This is the examination conducted countrywide and hence quality had been the primary concern always. As a measure candidates are not allowed to choose optional answers. YES—THERE IS NEGATIVE MARKING.For each negative answer 1/4 of the mark alloted for that question will be deducted.Also more than one answer per question is treated the same way and there will be negative marking.

Can I make use of pen/pencil?

All answers are to be marked using ball point pen (blue/black)

Where do I find more details on the exam?

Examination pattern,rules are subject to change. Always visit the website to keep yourself updated :

http://aieee.nic.in/aieee2010/aieee/welcome.html

Posted on

Health and Fitness Never Failing Wealth

During start of the year all of us will be asked to choose the insurance policy to tkae care of our current, future medical, dental, vision expenses. As such we really focus on calculating the premium, how much to save on HSA for our future medical expense.
However, if we get flyers from local fitnes centre which usually happens during beginning og the year, it often gets overlooked for the simple reaosn we are hesitant to pay few bugs per month from our pocket. Many of us ahve common answer to avoid workout. This is none other than lack of time. The ismple answer will be I don’t have time for workout. But reality is that either we are not focussing on health thinking this will be the same forever, we are hesitant to spend the real useful money on health and fitness.
It would make wildest sense to think in real proactive fashion and give weightage to health same as we do to our wealth starting from tender age.
Now, why should I join health and coaching classes?
To start with we can buy a simple fitbit that comes less than $100 and can use this forever. We cna monitor and measure steps, calories burned, sleep pattern, heart rate to start with. However, it would be really interesting to join some health and coaching classes. Some interesting health and wellness regimen include one or more of the following activities:
1) Exercise
2) Yoga
3) Meditation
4) Dance Classes
5) Tai Chi
6) Aerobics Classes
7) Water Aerobics classes
If you want ot have real good feeling of all the above, it would be really better to join a fitness centre that offers many of these lessons on regular basis. In addition to regular stretches, exercises these activities will help you have real good health condition. However, if you want to focus on One thing look for trainers offering training in these activities
As such rather than exercising alone which will lead to boredom over a period of time it would make real good sense to practice these activities in group. Health and fitness is not a one time event. It should be a part of life for a hale, healthy, happy , energetic life

Posted on

GATE Exam Computer Science Practice Exam

The minimum number of cards to be dealt from an arbitrarily shuffled deck of 52 cards to
guarantee that three cards are from some same suit is
(a) 3
(b) 8
(c) 9
(d) 12
1.2 The determinant of the matrix
2 0 0 0
8 1 7 2.
2 0 2 0
9 0 6 1
(a) 4
(b) 0
(C) 15
(d) 20
2.17
80.
19. We wish to construct a 5 tree with fan-out (the number of pointers per node) equal to 3
for the following set of key values:
80, 50, 10, 70, 30, 100, 90
Assume that the tree is initially empty and the values are added in the order given.
(a) Show the tree after insertion of 10, after insertion of 30, and after insertion of 90.
Intermediate trees need not be shown.
(b) The key values 30 and 10 are now deleted from the tree in that order. Show the tree after
each deletion.
Which of the following does not interrupt a running process?
(a) A device
(b) Timer
(c) Scheduler process
(d) Power failure
2.18 Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If
the page size is 4KB, what is the approximate size of the page table?
(a) 16 MB
(b) 8 MB
(c) 2 MB
(d) 24 MB
2.19 Consider Peterson’s algorithm for mutual exclusion between two concurrent processes i
and j. The program executed by process is shown below.
repeat
flag[i] =true;
turn=j;
while (P) do no—op;
Enter critical section, perform actions, then
exit critical section
Flag[i] =false;
Perform other non—critical section actions. Until false;
For the program to guarantee mutual exclusion, the predicate P in the while loop
should be
(a) flag[j]=true and turn=i
(b) flag[j]=true and turn=j
(c) flag[i]=true and turn=j
(d) flag[i]=true and turn=i
2.20 R(A,B,C,D) is a relation. Which of the following does not have a lossless join, dependency
preserving BCNF decomposition?
(a)A-B,B-CD
(b)A-B,B-C,C-D
(c) AB – C, C – AD
(d) A – BCD
2.21 Which of the following relational calculus expressions is not safe?
(a)
{tu R (t[A1
=
u[A1)A -s
E
R2
(t[A1 =
s[A1)J
(b)
{tfru
E
R1 (u[A1
=
R
(t[A1 =
s[A1
A
s[A1
=
u[A1))}
(c) {t—i(tE
R1)}
(d)
{tuE R1
(t[A1 =
ULA1)ASE R2
(t[A1 =
s[A1)}
2.22 Consider a relation geq which represents “greater than or equal to”, that is, (x,y)E geq
only if y
y is deleted
(b) A tuple (z,w) with z
>
x is deleted
(C) A tuple (z,w) with w < x is deleted (d) The deletion of (x,y) is prohibited SECTION B This section consists of TWENTY questions of FIVE marks each. Any FIFTEEN out of these questions have to be answered on the Answer Book provided. 1. (a) prove that powerset (A n B) = powerset(A)npowerset(B) (b) Let sum(n)=O+1+2+ +n for all natural numbers n. give an induction proof to show that the following equation is true for all natural numbers m and n: sum(m+n)=sum(m)+sum(n)+mn 2. Consider the function h: NxN - N so that h (a,b) = (2a+1)2’’ —1,where N ={O,1,2,3, } is the set of natural numbers. (a) Prove that the function h is an injection (one-one). (b) Prove that it is also a Subjection (onto) 3. Construct DFA’s for the following languages: (a) L ={wwE {a,b}*, w has baab as a subsring) (b) L ={wwE {a,b}*, w has an odd number of a’s and an odd nuber of b’s) 4. Give a deterministic PDA for the language L = {acb2 fl (- 1) over the alphabet = = {a, b, c}. Specify the acceptance state. 5. Let a decision problem X be defined as follows: X: Given a Turing machine M over and nay word w E does M loop forever on w? You may assume that the halting problem of Turing machine is undecidable but partially decidable. (a) Show that X is undecidable. (b) Show that X is not even partially decidable. 6. Consider a disk with following specifications: 20 surface, 1000 tracks/surface, 16 sectors/track, data density 1 KB/sector, rotation speed 3000 rpm. The operating system initiates the transfer between the disk and the memory sector-wise. Once the head has been placed on the right track, the disk reads a sector in a single scan. It reads bits from the sector while the head is passing over the sector. The read bits are formed into bytes in a serial-in- parallel-out buffer and each byte is then transferred to memory. The disk writing is exactly a complementary process. For parts (c) and (d) below, assume memory read-write time = 0.1 microsecond/byte, interrupt driven transfer has an interrupt overhead = 0.4 microseconds, the DMA initialization and termination overhead is negligible compared to the total sector transfer time. DMA requests are always granted. (a) What is the total capacity of the disk? (b) What is the data transfer rate? (c) What is the percentage of time the CPU is required for this disk I/O for byte- wise interrupts driven transfer? (d) What is the maximum percentage of time the CPU is held up for this disk I/O for cycle- stealing DMA transfer? 7. A CPU has 32-bit memory address and a 256 KB cache memory. The cache is organized as a 4-way set associative cache with cache block size of 16 bytes. (a) What is the number of sets in the cache? (b) What is the size (in bits) of the tag field per cache block? (c) What is the number and size of comparators required for tag matching? (d) How many address bits are required to find the byte offset within a cache block? (e) What is the total amount of extra memory (in bytes) required for the tag bits? 8. (a) Is the 3-variable function f = (0,1,2,4) its self-dual? Justify your answer. (b) Give a minimal product-of-sum form of the b output of the following excess-3 to BCD converter. 9. A sequential circuit takes an input stream of 0’s and l’s and produces an output stream of 0’s and l’s. Initially it replicates the input on its output until two consecutive 0’s are encountered on the input. From then onward, it produces an output stream, which is the bit- wise complement of input stream until it encounters two consecutive l’s, whereupon the process repeats. An example of input and output stream is shown below. The inputstream: 1O11OOO1OO1O11 011 The desired output: 1O11OO1O11O1OO 0 11 J-K master-slave flip-flops are to be used to design the circuit. (a) Give the state transition diagram. (b) Give the minimized sum-of-product expression for J and K inputs of one of its state flip- flops. 10. Consider a 5-stage pipeline — IF (Instruction Fetch), ID (Instruction Decode and register read), EX (Execute), MEM (memory), and WB (Write Back). All (memory or register) reads take place in the second phase of a clock cycle and writes occur in the first phase of the clock cycle. Consider the execution of the following instruction sequence: 11: sub r2, r3, r4; / r2 - r3 — r4 12: sub r4, r2, r3; / r4 - r2 — r3 13: sw r2, 100(n) 1* M[rl+100]E- r2 / 14: sub r3, r4, r2; / r3 - r4 — r2 (a) Show all data dependencies between the four instructions. (b) Identify the data hazards. (c) Can all hazards be avoided by forwarding in this case? 11. Consider the following C program: void abc(char*s) { if(s[O]= =‘O’)return; abc(s+ 1); abc(s+ 1); printf(”°Ioc”,s[O]); } main () { abc(”123”) } (a) What will be the output of the program? (b) If abc(s) is called with a null-terminated string s of length n characters (not counting the null (‘’) character), how many characters will be printed by abc(s)? 11. (a) Insert the following keys one by one into a binary search tree in the order specified. 15, 32, 20, 9, 3, 25, 12, 1 Show the final binary search tree after the insertions. (b) Draw the binary search tree after deleting 15 from it. (c) Complete the statements Si, S2 and S3 in the following function so that the function computes the depth of a binary rooted at t. typedef struct tnode{ mt key; struct tnode *left, *right; } *Tree; mt depth (Tree t) { mt x,y; it (t ==NULL) returnO; x=depth(t-) left); Si: ___________ S2: if(x>y) return _______________
S3: else return _______________
}
12. Consider a weighted undirected graph with vertex set V = {ni,n2,n3,n4,n5,n6} and edge
set
E={(n i,n2,2),(ni,n3,8),(n i,n6,3),(n2,n4,4),(n2,n5,12),(n3,n4,7),(n4,n5,9), (n4,n6,4)}. The
third value in each tuple represents the weight of the edge specified in the tuple.
(a) List the edges of a minimum spanning tree of the graph.
(b) How many distinct minimum spanning trees does this graph have?
(c) Is the minimum among the edge weights of a minimum spanning tree unique overall
possible minimum spanning trees of a graph?
(d) Is the maximum among the edge weights of a minimum spanning tree unique over all
possible minimum spanning trees of a graph?
13. Consider the following grammar with terminal alphabet {a,(,),,*}and start symbol E. The
production rules of the grammar are:
E – aA
E – (E)
A – +E
A *E
A-E
(a) Compute the FIRST and FOLLOW sets for E and A.
(b) Complete the LL(i) parse table for the grammar.
14. The syntax of the repeat-until statement is given by the following grammar S – repeat S1
until E
Where E stands for expressions, S and S1 stand for statement. The non-terminals S and S1
have an attribute code that represents generated code. The non- terminal E has two
attributes. The attribute code represents generated code to evaluate the expression and store
its truth value in a distinct variable, and the attribute varName contains the name of the
variable in which the truth value is stored? The truth-value stored in the variable is 1 if E is
true, 0 if E is false.
Give a syntax-directed definition to generate three-address code for the repeat- until
statement. Assume that you can call a function newlabel( ) that returns a distinct label for a
statement. Use the operator’’ to concatenate two strings and the function gen(s) to generate
a line containing the string s.
15. (a) Remove left-recursion from the following grammar:
S – Sal Sb I a I b
(b) Consider the following grammar:
S – aSbSl bSaS Ic
Construct all possible parse trees for the string abab. Is the grammar ambiguous?
16. Two concurrent processes P1 and P2 want to use two resources Ri and R2 in a
mutually exclusive manner. Initially, Ri and R2 are free. The programs executed
by the two processes are given below.
Program for P1:
51: While (Ri is busy) do no-op;
S2: Set Ri – busy;
S3: While (R2 is busy) do no-op;
S4: Set R2 – busy;
S5: Use Ri and R2;
S6: Set Ri – free;
S7: Set R2 – free;
Program for P2:
Qi: While (Ri is busy) do no-op;
Q2: Set Ri – busy;
Q3: While (Ri is busy) do no-op;
Q4: Set Ri – busy;
Q5: Use Ri and R2;
Q6: Set R2 – free;
Q7: Set Ri – free;
(a) Is mutual exclusion guaranteed for Ri and R2? If not, show a possible interleaving of the
statements of P1 and P2 such that mutual exclusion is violated (i.e., both P1 and P2 use Ri or
R2 at the same time).
(b) Can deadlock occur in the above program? If yes, show a possible interleaving of the
statements of P1 and P2 leading to deadlock.
(c) Exchange the statements Q1 and Q3 and statements Q2 and Q4. Is mutual exclusion
guaranteed now? Can deadlock occur?
17. Consider a disk with the 100 tracks numbered from 0 to 99 rotating at 3000 rpm. The
number of sectors per track is 100. the time to move the head between two successive tracks
is 0.2 millisecond.
(a) Consider a set of disk requests to read data from tracks 32, 7, 45, 5 and 10. Assuming
that the elevator algorithm is used to schedule disk requests, and the head is initially at track
25 moving up (towards larger track numbers), what is the total seek time for servicing the
requests?
(b) Consider an initial set of 100 arbitrary disk requests and assume that no new disk requests
arrive while servicing these requests. If the head is initially at track 0 and the elevator
algorithm is used to schedule disk requests, what is the worst case time to complete all the
requests?
18. Consider the relation examinee (regno, name, score), where regno is the primary key to
score is a real number.
(a) Write a relational algebra using (fJ,G,p,x) to find the list of names which appear more than
once in examinee.
(b) Write an SQL query to list the
regno
of examinees who have a score greater than the
average score.
(c) Suppose the relation
appears (regno, centr_code)
specifies the center where an examinee
appears. Write an SQL query to list the
centr code
having an examinee of score greater than
(a) Suppose you are given an empty B+-tree where each node (leaf and internal) can
store up to 5 key values. Suppose values i,2, iO are inserted, in order, into the tree, Show the
tree pictorially
(i) After 6 insertions, and
(ii) After all iO insertions
Do NOT show intermediate stages.
(b) Suppose instead of splitting a node when it is full, we try to move a value to the left
sibling. If there is no left sibling, or the left sibling is full, we split the node. Show the tree
after values, i, 2, , 9 have been inserted. Assume, as in (a) that each node can hold up to 5
keys.
(c) In general, suppose a B+-tree node can hold a maximum of
m
keys, and you insert a long
sequence of keys in increasing order. Then what approximately is the average number of keys
in each leaf level node.
(i) In the normal case, and
(ii) With the insertion as in (b).
16. Consider a bank database with only one relation
transaction (transno, acctno, date, amount)
The amount attribute value is positive for deposits and negative for withdrawals.
(a) Define an SQL view TP containing the information.
(acctno, Ti.date, T2.amount)
for every pair of transactions Ti, T2 such that Ti and T2 are transaction on the same account
and the date of T2 is the date of Ti.
(b) Using only the above view TP, write a query to find for each account the minimum balance
it ever reached (not including the 0 balance when the account is created). Assume there is at
most one transaction per day on each account, and each account has had atleast one
transaction since it was created. To simply your query, break it up into 2 steps by defining an
intermediate view V.
1. This question consists of TWENTY-FIVE sub-questions (1.1 — 1.25) of ONE mark each. For
each of these sub-questions, four possible alternatives, A, B, C and D are provided. Choose
the most appropriate alternative and darken its bubble on the Objective Response Sheet
(ORS) against the corresponding sub-question number using a soft HB pencil. Do not darken
more than one bubble for any sub-question. Do not use the ORS for any rough work. You may
use the answer book for any rough work, if needed.
1.1 Consider the following statements:
S1: The sum of two singular n x n matrices may be non-singular
S2: The sum of two n x n non-singular matrices may be singular.
Which of the following statements is correct?
(a) 51 and S2 are both true
(b) 51 is true, S2 is false
(c) 51 is false, S2 is true
(d) 51 and S2 are both false
1.2 Consider the following relations:
Ri (a,b) iff (a+b) is even over the set of integers
R2 (a,b) iff (a+b) is odd over the set of integers
R3 (a,b) iff a.b > 0 over the set of non-zero rational numbers
R4 (a,b) iff a — bi 2 over the set of natural numbers
Which of the following statements is correct?
(a) Ri and R2 are equivalence relations, R3 and R4 are not
(b) Ri and R3 are equivalence relations, R2 and R4 are not
(c) Ri and R4 are equivalence relations, R2 and R3 are not
(d) Ri, R2, R3 and R4 are all equivalence relations
1.3 Consider two well-formed formulas in prepositional logic
El: P —iP E2: (Pi—iP)v(–iPiP)
Which of the following statements is correct?
(a) Fl is satisfiable, F2 is valid
(b) Fl unsatisfiable, F2 is satisfiable
(c) Fl is unsatisfiable, F2 is valid
(d) Fl and F2 are both satisfiable
1.4 consider the following two statements:
S1: {o2’Hn (- i)isa regular language
S2:
{ominom÷n rn
1 and
n
i} is a regular language
Which of the following statements is correct?
(a) Only Si is correct
(b) Only S2 is correct
(c) Both Si and S2 are correct
(d) None of Si and S2 is correct
1.5 Which of the following statements s true?
(a) If a language is context free it can always be accepted by a deterministic push-down
automaton
(b) The union of two context free languages is context free
(c) The intersection of two context free languages is context free
(d) The complement of a context free language is context free
1.6 Given an arbitary non-deterministic finite automaton (NFA) with N states, the maximum
number of states in an equivalent minimized DFA is at least
(a) N2
(b) 2N
(c) 2N
(d) N!
1.7 More than one word are put in one cache block to
(a) exploit the temporal locality of reference in a program
(b) exploit the spatial locality of reference in a program
(c) reduce the miss penalty
(d) none of the above
1.8 Which of the following statements is false?
(a) Virtual memory implements the translation of a program’s address space into physical
memory address space
(b) Virtual memory allows each program to exceed the size of the primary memory
(c) Virtual memory increases the degree of multiprogramming
(d) Virtual memory reduces the context switching overhead
1.9 A low memory can be connected to 8085 by using
(a) INTER
(b) RESET IN
(c) HOLD
(d) READY
1.10 Suppose a processor does not have any stack pointer register. Which of the following
statements is true?
(a) It cannot have subroutine call instruction
(b) It can have subroutine call instruction, but no nested subroutine calls
(c) Nested subroutine calls are possible, but interrupts are not
(d) All sequences of subroutine calls and also interrupts are possible
1.11 Given the following Karnaugh map, which one of the following represents the minimal
Sum-Of-Products of the map?
(a)
xy+y’z
(b)
wx’y’+xy+xz
(c)
w’x+y’z+xy
(d)xz+y
1.12 A processor needs software interrupt to
(a) test the interrupt system of the processor
(b) implement co-routines
(c) obtain system services which need execution of privileged instructions
(d) return from subroutine
1.13 A CPU has two modes-privileged and non-privileged. In order to change the mode from
privileged to non-privileged
(a) a hardware interrupt is needed
(b) a software interrupt is needed
(c) a privileged instruction (which does not generate an interrupt) is needed
(d) a non-privileged instruction (which does not generate an interrupt is needed
1.14 Randomized quicksort is an extension of quicksort where the pivot is chosen randomly.
What is the worst case complexity of sorting n numbers using randomized quicksort?
(a) 0(n)
(b) 0(n log n)
(c) 0(n2)
(d) 0(n!)
1.15 Consider any array representation of an n element binary heap where the elements are
stored from index 1 to index n of the array. For the element stored at index i of the array (I (-
n), the index of the parent is
(1+1)
(a) i-i
(b) L]
(c) r.i
(d) 2
Nwx
00 01 11 10
YZ
00 0 X 0 X
01 X 1 X 1
11 0 X 1 0
10 0 1 X 0
1.16 Let
f(n)
=
n2
logn and
g(n)
=
n(logn)1°
be two positive functions of n. Which of
the following statements is correct?
(a) f(n) = O(g(n) and g(n) O(f(n))
(b) g(n) = O(f(n) and f(n) O(g(n))
(c) f(n)=O(g(n)) and g(n) O(f(n))
(d) f(n)=O(g(n)) and g(n) =O(f(n))
1.17 The process of assigning load addresses to the various parts of the program and
adjusting the code and date in the program to reflect the assigned addresses is
called
(a) Assembly
(b) Parsing
(c) Relocation
(d) Symbol resolution
1.18 Which of the following statements is false?
(a) An unambiguous grammar has same leftmost and rightmost derivation
(b) An LL(1) parser is a top-down parser
(c) LALR is more powerful than SLR
(d) An ambiguous grammar can never be LR(k) for any k
1.19 Consider a set of n tasks with known runtimes r1, r2, …. r to be run on a uniprocessor
machine. Which of the following processor scheduling algorithms will result in the maximum
throughput?
(a) Round-Robin
(b) Shortest-Job-First
(c) Highest-Response-Ratio-Next
(d) First-Come-First-Served
1.20 Where does the swap space reside?
(a) RAM
(b) Disk
(c) ROM
(d) On-chip cache
1.21 Consider a virtual memory system with FIFO page replacement policy. For an arbitrary
page access pattern, increasing the number of page frames in main memory will
(a) always decrease the number of page faults
(b) always increase the number of page faults
(c) sometimes increase the number of page faults
(d) never affect the number of page faults
1.22 Which of the following requires a device driver?
(a) Register
(b) Cache
(c) Main memory
(d) Disk
1.23 Consider a schema R(A,B,C,D) and functional dependencies A – B and C – D. Then the
decomposition of R into R1 (AB) and R2(CD) is
(a) dependency preserving and lossless join
(b) lossless join but not dependency preserving
(c) dependency preserving but not lossless join
(d) not dependency preserving and not lossless join
1.24 Suppose the adjacency relation of vertices in a graph is represented in a table
Adj (X,Y). Which of the following queries cannot be expressed by a relational
algebra expression of constant length?
(a) List of all vertices adjacent to a given vertex
(b) List all vertices which have self loops
(c) List all vertices which belong to cycles of less than three vertices
(d) List all vertices reachable from a given vertex
1.25 Let r and s be two relations over the relation schemes R and S respectively, and
let A be an attribute in R. then the relational algebra expression
0Aa
(rXJ
5)
is
always equal to
(a)
oA_a(r)
(b) r
(c)
0Aa
(r)N s
(d) None of the above
2. This question consists of TWENTY-FIVE sub-questions (2.1 — 2.25) of TWO marks each. For
each of these sub-questions, four possible alternatives, A,B, C and D are provided. Choose the
most appropriate alternative and darken its bubble on the Objective Response Sheet (ORS)
against the corresponding sub-question number using a soft HB pencil. Do not darken more
than one bubble for any sub-question. Do not use the CR5 for any rough work. You may use
the answer book for any rough work, if needed.
2.1 How many 4-digit even numbers have all 4 digits distinct?
(a) 2240
(b) 2296
(c) 2620
(d) 4536
2.2 Consider the following statements:
S1: There exists infinite sets A, B, C such that An(BuC) is finite.
S2: There exists two irrational numbers x and y such that (x+y) is rational.
Which of the following is true about 51 and S2?
(a) Only 51 is correct
(b) Only S2 is correct
(c) Both 51 and S2 are correct
(d) None of 51 and S2 is correct
2.3 Let
f:
A – B be a function, and let E and F be subsets of A. Consider the following
statements about images.
Si:f(EuF)=f(E) uf(F)
S2:f(EnF)=f(E) nf(F)
Which of the following is true about Si and S2?
(a) Only Si is correct
(b) Only S2 is correct
(c) Both Si and S2 are correct
(d) None of Si and S2 is correct
2.4 Consider a DFA over ={a,b}accepting all strings which have number of a’s divisible by 6
and number of b’s divisible by 8. What is the minimum number of states that the DFA will
have?
(a) 8
(b) 14
(c) 15
(d) 48
2.5 Consider the following languages:
Li ={wwwE {a,b}*}
L2 =
{wwR w {a, b}*, wR
is the reverse of w}
L3
=
{021
i is an integer)
= {o2 i is an integer)
Which of the languages are regular?
(a) Only Li and L2
(b) Only L2, L3 and L4
(c) Only L3 and L4
(d) Only L3
2.6 Consider the following problem X.
Given a Turing machine M over the input alphabet , any state q of M
And a word w
E*,
does the computation of M on w visit the state q?
Which of the following statements about X is correct?
(a) X is decidable
(b) X is undecidable but partially decidable
(c) X is undecidable and not even partially decidable
(d) X is not a decision problem
2.7 Which is the most appropriate match for the items in the first column with the items in the
second column
X. Indirect Addressing I. Array implementation
Y. Indexed Addressing II. Writing re-locatable code
Z. Base Register Addressing III. Passing array as parameter
(a) (X, III) (Y, I) (Z, II)
(b) (X, II) (Y, III) (Z, I)
(c) (X, III) (Y, II) (Z, I)
(d) (X, I) (Y, III) (Z, II)
2.8 The 2’s complement representation of is hexadecimal is
(a) ABE (b) DBC (c) DE5 (d) 9E7
2.9 Consider the circuit given below1th initial state Qo =1, Q = Q2 = 0. The state of the circuit
is given by the value 4Q2 + 2Q1 + Q0 –
Clock
Which one of the following is the correct state sequence of the circuit?
(a) 1,3,4,6,7,5,2
(b) 1,2,5,3,7,6,4
(c) 1,2,7,3,5,6,4
(d) 1,6,5,7,2,3,4
2.10 Consider the following data path of a simple non-pilelined CPU. The registers A, B, A1,
A2, MDR, the bus and the ALU are 8-bit wide. SP and MAR are 16-bit registers. The MUX is of
size 8 x (2:1) and the DEMUX is of size 8 x (1:2). Each memory operation takes 2 CPU clock
cycles and uses MAR (Memory Address Register) and MDR (Memory Date Register). SP can be
decremented locally.
How many CPU clock cycles are needed to execute the “push r” instruction?
(a) 2
(b) 3
(c) 4
(d) 5
2.11 Consider an undirected unweighted graph G. Let a breadth-first traversal of G be done
starting from a node r. Let d(r,u) and d(r,v) be the lengths of the shortest paths from r to u
and v respectively in G. If u is visited before v during the breadth-first traversal, which of the
following statements is correct?
(a) d(r,u)d(r,v)
(c) d(r,u) 4 and x < 6, where x is an integer (c) x<5 not (x=5) (d) None of the above SECTION - B This section consists of TWENTY questions of FIVE marks each. Attempt ANY FIFTEEN questions. If more number of questions are attempted, score off the answer not to be evaluated, else only the first fifteen unscored answers will be considered. 1. A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it counting repetitions. (a) What is the number of multisets of size 4 that can be constructed from n distinct elements so that at least one element occurs exactly twice? (b) How many multisets can be consctructed from n distinct elements? 2. Let S be a set of n elements {1, 2, ...., n} and G a graph with 2 vertices, each vertex corresponding to a distinct subset of S. Two vertices are adjacent if the symmetric difference of the corresponding sets has exactly 2 elements. Note: The symmetric difference of two sets R1 and R2 is defined as u R2J R1 (a) Every vertex in G has the same degree. What is the degree of a vertex in G? (b) How many connected components does G have? 3. (a) Construct as minimal finite state machine that accepts the language, over {0,1}, of all strings that contain neither the substring 00 nor the substring 11. (b) Consider the grammar aSAb A- bA A- C Where 5, A are non-terminal symbols with S being the start symbol; a,b are terminal symbols and c is the empty string. This grammar generates strings of the form a’bfor some i, j 0, where i and j satisfy some condition. What is the condition on the values of i and j? 4. A pushdown automaton (pda) is given in the following extended notation of finite state diagrams: _______ 2.s/s 1.s/1.s 1,1.s/s The nodes denote the states while the edges denote the moves of the pda. The edge labels are of the form d, s/s’where d is the input symbol read and s,s’are the stack contents before and after the move. For example the edge labeled 1, s/1.s denotes the move from state q0 to q0in which the input symbol 1 is read and pushed to the stack. (a) Introduce two edges with appropriate labels in the above diagram so that the resulting pda accepts the language {x2xR x E {0, 1} *, xR denotes revese of x}, by empty stack. (b) Describe a non-deterministic pda with three states in the above notation that accept the language {o1m fl < m < 2n) by empty stack 4. Design a logic circuit to convert a single digit BCD number to the number modulo six as follows (Do not detect illegal input): (a) Write the truth table for all bits. Label the input bits I, 1, .... With I as the least significant bit. Label the output bits R1, R2, .... With R1 as the least significant bit. Use 1 to signify truth. (b) Draw one circuit for each output bit using, altogether, two two-input AND gates, one two- input gate and two NOT gates. 5. Consider the 8085 instruction IN 09H stored as follows: And the following incomplete timing diagram for the instruction: T1 T2 T3 T4 T5 T6 T7 T8 T9 TA A15-A8 AD7 C>
IO/M
(a) Write the contents of the boxes, A, B, C and D in hexadecimal in your answer sheet. Do
not draw any pictures.
(b) Write the state of both ALE and
RD
pins at time units Ti, T2, T3 and T4.
(c) How do you generate the signal that tells the peripheral to put the data on the bus?
Answer by completing the following statement in your answer book:
By combining signals
ii. Consider the following 8085 program segment, where registers B and C contain BCD
values:
Si: MVI A, 99H
MVI D, OOH
SUB C
ADD B
DAA
S2: JC S3
Memory Address Machine Code
3050 DA
3051 09
MOV E, A
MVI A, 99H
SUB E
MOV E, A
JZ S4
MVI D, FFH
JMP S4
S3: INC A
DAA
MOV E, A
S4
(a) For the two pairs (B = 44, C = 25) and (B = 33, C = 46) at Si,
(i) Find the values in register A when control reaches S2.
(ii) Find the values in registers D and E when control reaches S4.
(b) What, in general, is the value of D and E as a function of B and C when control reaches S4.
6. An instruction pipeline has five stages where each stage takes 2 nanoseconds and all
instructions use all five stages. Branch instructions are not overlapped, i.e., the instruction
after the branch is not fetched till the branch instruction is completed. Under ideal conditions.
(a) Calculate the average instruction execution time assuming that 2O% of all instruction
executed are branch instructions. Ignore the fact that some branch instructions may be
conditional.
(b) If a branch instruction is a conditional branch instruction, the branch need not be taken. If
the branch is not taken, the following instructions can be overlapped. When 8O/c of all branch
instructions are conditional branch instructions, and 5Q% of the conditional branch
instructions are such that the branch is taken, calculate the average instruction execution
time.
7. Suppose a stack implementation supports, in addition to PUSH and POP, an operation
REVERSE, which reverses the order of the elements on the stack.
(a) To implement a queue using the above stack implementation, show how to implement
ENQUEUE using a single operation and DEQUEUE using a sequence of 3 operations.
(b) The following postfix expression, containing single digit operands and arithmetic operators
+ and *, is evaluated using a stack.
52*34+52**+
Show the contents of the stack.
(i) After evaluating 5 2 * 3 4 +
(ii) After evaluating 5 2 * 3 4 + 5 2
(iii) At the end of evaluation.
8. Consider the line y = -2-x, where n and m are positive integers.
(a) If mq — np < 0, then is the point (p,q) above the line, below the line, or on the line? (b) Complete the following function, that returns true if the line segment with endpoints (p,q) and (r,s) intersects the line y = -2-x, by writing the line number and the content of each box in your answer book. 1: function clash (m, n, p. q, r, 5: integer): Boolean; 2: begin 3: clash = false; 4: if(m*q_n*p) lOthenclash : =true; 5: If(m*s — n * r) I IC then clash : = true; 6: if(m*q_n*p) IOand(m*s_n*r)I IOthenclash:=true; 7: if(m*q_n*p) Ioand(m*s_n*r)I Iothenclash:=true; 8: end; 9. Suppose you are given arrays p[1 N] and q[1 N] both uninitialized that is, each location may contain an arbitrary value), and a variable count, initialized to 0. Consider the following procedures set and iset: set (i) { count = count + 1; q [count] = i; p[i] = count; } is_set(i) { if (p[i] != 0 or p[i] > count)
return false;
if (q[p[i]] i)
return false;
return true;
}
(a) Suppose we make the following sequence of calls:
set (7); set (3); set(9);
After these quence of calls, what is the value of count, and what do q[1], q[2], q[3], p[7],
p[3] and p[9] contain?
(b) Complete the following statement “The first count elements of ________ contain values i
such that set ( ____________) has been called”.
(c) Show that if set (i) has not been called for some i, then regardless of what p[i] contains,
is_set (i) will return false.
10. A recursive program to compute Fibonacci numbers is shown below. Assume you are also
given an array f[O m] with all elements initialized to 0.
fib(n) {
if (n > M) error 0;
if ( n==0) return 1;
if(n ==1) return 1;
if(I I) (1)
return I I (2)
t = fib(n — 1) + fib (n — 2);
I I (3)
return t;
}
(a) Fill in the boxes with expressions/statements to make fibQ store and reuse computed
Fibonacci values. Write the box number and the corresponding contents in your answer book.
(b) What is the time complexity of the resulting program when computing fib(n)?
11. An array contains four occurrences of 0, five occurrences of 1, and three occurre3nces of 2
in any order. The array is to be sorted using swap operations (elements that are swapped
need to be adjacent).
(a) What is the minimum number of swaps needed to sort such an array in the worst case?
(b) Give an ordering of elements in the above array so that the minimum number of swaps
needed to sort the array is maximum.
12. Consider the following program is pseudo-Pascal syntax.
program main;
varx: integer;
procedure Q [z:integer);
begin
z: z + x;
writel n (z)
end;
procedure P (y:integer);
varx: integer;
begin
x: y + 2;
writeln(x)
end;
begin
x:=5;
P(x);
writeln(x)
end.
What is the output of the program, when
(a) The parameter passing mechanism is call-by-value and the scope rule is static scooping?
(b) The parameter passing mechanism is call-by-reference and the scope rule is dynamic
scooping?
13. Consider the syntax directed translation scheme (SDTS) given in the following. Assume
attribute evaluation with bottom-up parsing, i.e., attributes are evaluated immediately after a
reduction.
E – E1 * T {E.val = E1. val * T. val}
E-T{E.val =T.val}
T – F – T1 {T.val = F. val – T1. val}
T-F{T.val=F.val}
F – 2 {F. val =2}
F – 4 {F. val =4}
(a) Using this SDTS, construct a parse tree for the expression
4_2_4*2
and also compute its E.val.
(b) It is required to compute the total number of reductions performed to parse a given input.
Using synthesized attributes only, modify the SDTS given, without changing the grammar, to
find E.red, the number of reductions performed while reducing an input to E.
14. (a) Fill in the boxes below to get a solution for the readers-writers problem, using a single
binary semphore, mutex (initialized to 1) and busy waiting. Write the box numbers (1,2 and
3), and their contents in your answer book.
mt R = 0, W = 0;
Reader ( ) {
Li: wait (mutex);
If (W ==0) {
R = R +1;
I I (1)
}
else {
I I (2)
goto Li;
}
./* do the read */
wait (mutex)
R = R –
signal (mutex);
}
Writer () {
L2: wait(mutex);
If(I I) { (3)
signal (mutex);
goto L2;
}
W=i;
signal (mutex);
/*do the write*/
wa it( m utex)
W = 0;
signal (mutex);
(b) Can the above solution lead to starvation of writers?
E1 and E2 are events in a probability space satisfying the following constraints:
• Pr(E1) = Pr(E2)
• Pr(E1uE2)=1
• E1 and E2 are independent
The value of Pr(E1), the probability of the event E1, is
(a) 0
(b)
(c)
(d) 1
2.3. Let S=ilog21 and
100
andT=f
xlog2xdx
Which of the following statements is true?
(a) S>T
(b) S=T
(c) S T
(d) 2S < T 2.4. A polynomial p(x) satisfies the following: p(1) = p(3) = p(5) = 1 p(2) = p(4) = -1 The minimum degree of such a polynomial is (a) 1 (b) 2 (c) 3 (d) 4 2.5. A relation R is defined on the set of integers as x Ry iff (x+y) is even. Which of the following statements is true? (a) R is not an equivalence relation (b) R is an equivalence relation having 1 equivalence class (c) R is an equivalence relation having 2 equivalence classes (d) R is an equivalence relation having 3 equivalence classes 2.6. Let P(S) denotes the powerset of set S. Which of the following is always true? (a) P(P(S))=P(S) (b) P(S) nP(P(S)) = {Ø} (c) P(S) nS = P(S) (d) S P(S) 2.7. Let a, b, c, d be propositions. Assume that the equivalence a -* (b V-b) and b -* c hold. Then the truth-value of the formula (a A b) — (a A c) v d is always (a) True (b) False (c) Same as the truth-value of b (d) Same as the truth-value of d 2.8. What can be said about a regular language L over {a} whose minimal finite state automation has two states? (a) L must be {aIn is odd} (b) L must be {aIn is even} (c) L must be {aI0} (d) Either L must be {aIn is odd}, or L must be {aI n is even} 2.9. Consider the following decision problems: (P1) Does a given finite state machine accept a given string (P2) Does a given context free grammar generate an infinite number of stings Which of the following statements is true? (a) Both (P1) and (P2) are decidable (b) Neither (P1) nor (P2) are decidable (c) Only (P1) is decidable (d) Only (P2) is decidable 2.10. The simultaneous equations on the Boolean variables x, y, z and w, x+y+z= 1 xy = 0 xz + w = 1 xy+ W=0 have the following solution for x, y, z and w, respectively: (a) 0100 (b) 1101 (c) 1011 (d)1000 2.11. Which functions does NOT implement the Karnaugh map given below? 0 x 0 0 0 x 1 1 1 1 1 1 0 x 0 0 (a) (w+x)y (c) (w+x)(W+y)(+y) (b) xy+yw (d) None of the above 2.12. The following arrangement of master-slave flip flops has the initial state of P. Q as 0, 1 (respectively). After the clock cycles the output state P. Q is (respectively), (a) 1, 0 (b) 1, 1 (c) 0, 0 (d) 0, 1 2.13. A graphics card has on board memory of 1 MB. Which of the following modes can the card not support? (a) 1600 x 400 resolution with 256 colours on a 17 inch monitor (b) 1600 x 400 resolution with 16 million colours on a 14 inch monitor (c) 800 x 400 resolution with 16 million colours on a 17 inch monitor (d) 800 x 800 resolution with 256 colours on a 14 inch monitor 2.14. Consider the values of A = 2.0 x i03° B = -2.0 x i03°, C = 1.0, and the sequence X: = A + B X: = X + C Y:= A + c Y:= Y + B Executed on a computer where floating point numbers are represented with 32 bits. The values for X and Y will be (a) X = 1.0, Y = 1.0 (c) X = 0.0, Y = 1.0 (b) X = 1.0, Y = 0.0 (d) X = 0.0, Y = 0.0 2.15. Suppose you are given an array s[1...n] and a procedure reverse (s,i,j) which reverses the order of elements in a between positions i and j (both inclusive). What does the following sequence do, where 1 < k < n: reverse (5, 1, k); reverse (5, k + 1, n); reverse (5, 1, n); (a) Rotates s left by k positions (b) Leaves s unchanged (c) Reverses all elements of s (d) None of the above 2.16. Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited in a postorder, inorder and preorder traversal. Respectively, of a complete binary tree. Which of the following is always tree? (a) LASTIN = LASTPOST (b) LASTIN = LASTPRE (c) LASTPRE = LASTPOST (d) None of the above 2.17. Consider the following functions f(n) = 3n g (n) = 2JIog2 h(n) = n! Which of the following is true? (a) h(n) is 0 (f(n)) (b) h(n) is 0 (g(n)) (c) g(n) is not 0 (f(n)) (d) f(n) is 0(g(n)) 2.18. Let G be an undirected connected graph with distinct edge weight. Let emaxbe the edge with maximum weight and emjn the edge with minimum weight. Which of the following statements is false? (a) Every minimum spanning tree of G must contain emjn (b) If emax is in a minimum spanning tree, then its removal must disconnect G (c) No minimum spanning tree contains emax (d) G has a unique minimum spanning tree 2.19. Lt G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be the first new (unvisited) vertex visited after visiting u in the traversal. Which of the following statements is always true? (a) {u,v} must be an edge in G, and u is a descendant of v in T (b) {u,v} must be an edge in G, and v is a descendant of u in T (c) If {u,v} is not an edge in G then u is a leaf in T (d) If {u,v} is not an edge in G then u and v must have the same parent in T 2.20. The value of j at the end of the execution of the following C program mt incr (mt i) static mt count = 0; count = count + i; return (count); main () mt i,j; for (i = 0; i <=4; i++) j = incr(i); is (a) 10 (b) 4 (c) 6 (d) 7 2.21. Given the following expression grammar: EE*FIF+EIF F - F - I id which of the following is true? (a) * has higher precedence than + (b) - has higher precedence than * (c) + and — have same precedence (d) + has higher precedence than * 2.22. Suppose the time to service a page fault is on the average 10 milliseconds, while a memory access takes 1 microsecond. Then a 99.99% hit ratio results in average memory access time of (a) 1.9999 milliseconds (b) 1 millisecond (c) 9.999 microseconds (d) 1.9999 microseconds 2.23. Which of the following is NOT a valid deadlock prevention scheme? (a) Release all resources before requesting a new resource (b) Number the resources uniquely and never request a lower numbered resource than the last one requested. (c) Never request a resource after releasing any resource (d) Request and all required resources be allocated before execution. 2.24. Given the following relation instance xYz 142 153 163 322 Which of the following functional dependencies are satisfied by the instance? (a) XY-)ZandZ-Y (b) YZ-XandY-Z (c) YZ-XandX-)Z (d) XZ-YandY-X 2.25. Given relations r(w,x) and s(y,z), the result of select distinct w,x from r, s is guaranteed to be same as r, provided (a) r has no duplicates and s is non-empty (b) r and s have no duplicates (c) s has no duplicates and r is non-empty (d) r and s have the same number of tuples The number 43 in 2’s complement representation is (a) 01010101 (b) 11010101 (c) 00101011 (d) 10101011 1.6 To put the 8085 microprocessor in the wait state (a) lower the HOLD input (b) lower the READY input (c) raise the HOLD input (d) raise the READY input 1.7 Comparing the time Ti taken for a single instruction on a pipelined CPU with time T2 taken on a non-pipelined but identical CPU, we can say that (a) Ti = T2 (b) Ti > T2
(c) Ti value=5; 2: using uninitialized pointers
Z: char *p; *p’a’; 3. lost memory is:
(a) X—1 Y—3 Z-2
(b) X—2 Y—1 Z-3
(C) X—3 Y—2 Z-1
(d) X—3 Y—1 Z-2
1.12 The most appropriate matching for the following pairs
X: depth first search 1: heap
Y: breadth-first search 2: queue
Z: sorting 3: stack
is:
(a) X—1 Y—2 Z-3
(b) X—3 Y—1 Z-2
(c) X—3 Y—2 Z-1
(d) X—2 Y—3 Z-1
1.13 Consider the following nested representation of binary trees: (X Y Z) indicates Y and Z
are the left and right sub stress, respectively, of node X. Note that Y and Z
may be NULL, or further nested. Which of the following represents a valid binary
tree?
(a) (1 2 (4 5 6 7))
(b) (1 (2 3 4) 5 6) 7)
(c) (1 (2 3 4)(5 6 7))
(d) (1 (2 3 NULL) (4 5))
1.14 Let s be a sorted array of n integers. Let t(n) denote the time taken for the most efficient
algorithm to determined if there are two elements with sum less than 1000 in s. which of the
following statements is true?
(a) t (n) is 0(1)
(b) n t(n) n log2 n
(c) n log2 n t(n)
(d) t(n) =
1.15 Aliasing in the context of programming languages refers to
(a) multiple variables having the same memory location
(b) multiple variables having the same value
(c) multiple variables having the same identifier
(d) multiple uses of the same variable
1.16 Assume that objects of the type short, float and long occupy 2 bytes, 4 bytes and 8
bytes, respectively. The memory requirement for variable t, ignoring alignment
considerations, is
(a) 22 bytes
(b) 14 bytes
(c) 18 bytes
(d) 10 bytes
1.17 The number of tokens in the following C statement
printf(”i=%d, &%i”,i,&i);
is
(a) 3
(b) 26
(c) 10
(d) 21
1.18. Which of the following derivations does a top-down parser use while parsing an input
string? The input is assumed to be scanned in left to right order.
(a) Leftmost derivation
(b) Leftmost derivation traced out in reverse
(c) Rightmost derivation
(d) Rightmost derivation traced out in reverse
1.19. Which of the following need not necessarily be saved on a context switch
between processes?
(a) General purpose registers
(b) Translation look-aside buffer
(c) Program counter
(d) All of the above
1.20. Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processes.
Suppose each process P[i] executes the following:
wait (m[i];wait (m[(i+1) mode 4]);
release (m[i]); release (m[(i+1)mod 4]);
This could cause
(a) Thrashing
(b) Deadlock
(c) Starvation, but not deadlock
(d) None of the above
1.21. B -trees are preferred to binary trees in databases because
(a) Disk capacities are greater than memory capacities
(b) Disk access is much slower than memory access
(c) Disk data transfer rates are much less than memory data transfer rates
(d) Disks are more reliable than memory

Posted on

Proceed Further Overcoming Writers Block

As a freelance writer, blogger, someone interested in digital marketing with core focus on content marketing it becomes essentially mandate to know the ways to handle the stumbling blocks that might come along the way. This can be as simple as laziness until upto writers block wherein you virtually run out of ideas and didn’t know what to blog or write about. Here are some tips that are time tested that can be used to overcome this
1) Stop writing when you cant – This doesn not mean that you should stay away from blogging altogether. However, if you feel that rather than writing useful blog articles you spend much of your time on fancy internet browsing, entertainment element it becomes mandate to take a break, accept that you have no focus on creating good blogposts for now, start watching movies, listen to music and enjoy this to the fullest. Trust me. After few minutes this automatically helps you come out of your blockade and comeup wiht something real interesting
2) Don’t think too much – Always blogging is a success when you try to keep things simple. We see that people who express their knowledge, ideas in plain, simple language that many audience can understand win over others. So, if you are running out of fancy terms, use plain simple terms and create something simple. In case you are not convinced draft it, add more value later, publish it when you are 100% satisfied
3) Hunt for blog titles – When you spend time on job, career, business it ultimately turns out to be time value of money. so, if you can’t write posts aim at coming up with blog titles that can be your future blogposts next month, next year etc
4) See if you can focus on other aspects of digital media marketing – Though content marketing is the crown of digital media marketing if you are a solopreneur or hobbbyist finding absolute peace of mind wiht blogging look to see if you cna focus on publishing psots in socila media, email market the posts, create newsletter, learn SEO etc when you can’t create posts. Time saved is money earned
5) Outdoor blogging can be relaxing – If you are stuck inside, see if you can walk outside with your laptop and a bottle of plain water. At times changing location helps you come our of block