POSTFIX NOTATION
Postfix also known as Reverse Polish Notation (or RPN), is a notational system where the operation/function follows the arguments. For example, "1 2 add" would be postfix notation for adding the numbers 1 and 2. Most programming languages use either prefix notation ("add(1, 2)" or "(add 1 2)") or infix notation ("1 add 2" or "1 + 2"). Prefix and infix are more familiar to most people, as they are the standard notations used for arithmetic and algebra. Why then should we use postfix notation when in actual fact it seems difficult to understand? Postfix is useful, especially for programming, because it clearly shows the order in which operations are performed, and because it disambiguates operator groupings. For example, the following postfix expression:1 2 + 3 * 6 + 2 3 + / means "take 1 and 2, add them, take 3 and multiply, take 6 and add, take 2 and 3, add them, and divide". In contrast, the equivalent expression in Infix Notation is: (((1 + 2) * 3) + 6) / (2 + 3)

This may seem more familiar, but note the need for parentheses to control the order of evaluation. The prefix notation would be: (/ (+ (* (+ 1 2) 3) 6) (+ 2 3)) which can be read "inside-out" to evaluate the expression.

In postfix notation which is also called Reverse Polish Notation (RPN) the operator follows the two operands, for example Infixpostfix
A+B =A B+
A*(B+C) =ABC+*
A*B/C =AB*C/

TRANSLATE INFIX TO POSTFIX
oAs before, you read the infix from left to right looking at each character in return oAs you go along you copy these operands and operators to the postfix output string the trick knowing when to copy what oIf the character in the infix string is an operand you copy it immediately to the postfix string. Knowing when to copy an operator is more complicated but is the same as the rule to evaluating infix expression.

Translating A+B*(C-D) to postfix

Character read from infix ExpressionInfix Expression parsed so farPostfix expression...

...Component Diagram Notations
The component diagram's main purpose is to show the structural relationships between the components of a system. In addition, component diagrams are useful communication tools for various groups. In creating a component diagram, there are different notations that can be used to show the different relationship of each component within the system. The component diagram notation set now makes it one of the easiest UML diagrams to draw:
* COMPONENT
A component can be shown as a rectangle with a keyword <<component>>, component name, and the visual stereotype or component icon.
* INTERFACE
A component defines its behaviour in terms of provided and required interfaces. An interface is the definition of a collection of one one or moore. It provides only the operations but not the implementation. Normally, an interface may be shown using a rectangle symbol with a reyword <<interface>>. An interface ca be used as a provided interface(a) or required interface(b):
A provided interface characterize services that the component offers to its environment. And it is modeled using a ball, labelled with the name, attached by a solid line to the component.. It is also known as a lollipop interface. While a required interface characterize services that the component expects from its environment. It is modeled modeled using a socket, labelled with the name, attached by a solid...

...MODERN PUBLIC SCHOOL
SHALIMAR BAGH, DELHI-110088
HOLIDAYS’ HOMEWORK, 2013
Dear Parent(s),
Summer Vacations are at our doorsteps. Holidays are a well deserved opportunity to relax and rewind by indulging in activities that are pleasurable and at the same time educative.
It is also a time to explore the exciting city of Delhi, visit places of interest and gather information about the magnificent monuments. Holidays’ Homework has been designed to fire the imagination of students while exciting them to explore, discover and reinvent. It is desirable that students work independently and seek assistance as and when required.
A few suggestions to be kept in mind.
Spend quality time with your children. Take them to see places of interest in Delhi. Remember to make notes and click photographs of the places you visit. Help your children to become independent by giving them responsibilities. Involve them in small household activities. Inculcate in them good manners, healthy habits and respect for elders. Help to imbibe the feelings of empathy, affection and tolerance in your children. Give them a chance to look after you and their younger brothers and sisters. Converse with your children in English. ‘Reading maketh a full man ’. Encourage your child to read well. Ensure that the choice of books he/she reads is purposeful while being entertaining. Let your child take classes in performing arts. Help your children improve their handwriting by making them write...

...ULI101 – Quiz 2-1
Student name: ______________________________________
ULI101 Section: _______________
This quiz is worth 2.5% of your course grade.
Maximum time allowed is 20 minutes.
See the sample test file
Instructions:
Provide grep commands according to the following criteria, working with a file called
'input'. With the exception of question #12, all questions are worth 2 marks.
1. Display all lines that are exactly 5 characters long:
grep “^.....$” input more elegant way to find a line of ‘n’ characters is grep –E “^.{n}$” input or
grep “^.\{n\}$” input (Must ‘escape’ { and } with \) or use egrep instead of grep –E
2. Display all lines that have at least one letter 'o' in them, upper- or lower-case:
grep –i “o” input or grep “[oO]” input
3. Display all lines with string 'or' followed by an 'ate' anywhere after that:
grep “or.*ate” input
4. Show all lines that do not start with a lower-case letter:
grep “^[^a-z]” input grep –v “^[a-z]” will show blank lines as well
5. Display all lines that do not have two letters 'r' following each other:
grep –v “rr” input
6. Count all blank lines:
grep –c “^$” input
7. Show all lines that end with a comma followed by a single digit:
grep “,[0-9]$” input
8. Show all lines that contain an asterisk (*):
grep “\*” input
9. Display lines that contain a phone number (for example: 647-555-1234):
grep –E “[0-9]{3}-[0-9]{3}-[0-9]{4}” input (if you use grep...

...international competition of choral singing of the Concorso Polifnico which was created by Guido d'Arezzo.
2. What cultural artifacts were handed down through generations in our family?
-Dad’s answer: We do not have any cultural artifacts that have been handed down.
-Research: Although we do not have an actual artifact that has been passed down, our family can be musical. Guido d’Arezzo, one of our great ancestors, was a music theorist of the medieval era. He is regarded as the inventor of modern musical notation when he was thirty-four. He came up with a method for teaching the singers to learn chants in a short time, and quickly became famous throughout north Italy. However, he attracted the hostility of the other monks at the abbey, prompting him to move to Arezzo, a town which had no abbey, but which did have a large group of cathedral singers, who’s training Bishop Tedald invited him to conduct. While at Arezzo, he developed new techniques for teaching, such as staff notation and the use of the "ut–re–mi–fa–so–la" (do–re–mi–fa–so–la). The ut–re–mi-fa-so-la syllables are taken from the initial syllables of each of the first six half-lines of the first stanza of the hymn Ut queant laxis.
3. What was home life like growing up?
-Dad’s answer: Schooling was a lot stricter. While going to a Catholic school, the teachers were allowed to hit the children on the hands with rulers when they were being disobedient. When my dad was a child, the...

...SCIENTIFIC NOTATION
* Scientific notation is a way of writing very large and very small numbers in a compact form.
* A number written in scientific notation is written in the form: a x 10b
WRITING A NUMBER IN SCIENTIFIC NOTATION
* Shift the decimal point so that there is one digit before the decimal point.
* Multiply by a power of 10, equal to the number of places the decimal point has been moved.
* The power of 10 is positive if the decimal point is moved to the left and negative if the decimal point is moved to the right.
ENGINEERING NOTATION
* Engineering notation is similar to the scientific notation. In engineering notation the po0wers of ten are always multiples of 3.
* A number written in engineering notation is written in the form: a x 10b
Where: a is a number greater than 1 and less than 999
B is an integer multiple of three
WRITING A NUMBER IN ENGINEERING NOTATION
* Shift the decimal point in “gropus of three” until the number before the decimal point is betqween 0 and 99.
* Multiply by a power of 10 that is equal to the number of places the decimal point has been moved.
* The power of 10 is positive if the decimal poiint is moved to the left and negative if the decimal point is moved to the right.
SI PREFIXES
* SIprefixes are shorthand way of writing enineering...

...The Z Notation:
A Reference Manual
Second Edition
J. M. Spivey
Programming Research Group University of Oxford
Based on the work of J. R. Abrial, I. J. Hayes, C. A. R. Hoare, He Jifeng, C. C. Morgan, J. W. Sanders, I. H. Sørensen, J. M. Spivey, B. A. Sufrin
This edition ﬁrst published 1992 by Prentice Hall International (UK) Ltd Published 1998 by J. M. Spivey Oriel College, Oxford, OX1 4EW, England c J. M. Spivey, 1989, 1992 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form. or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior permission, in writing, from the publisher. For permission in all countries contact the author.
Contents
Preface 1 Tutorial Introduction What is a formal speciﬁcation? 1.1 1.2 The birthday book 1.3 Strengthening the speciﬁcation 1.4 From speciﬁcations to designs Implementing the birthday book 1.5 1.6 A simple checkpointing scheme Background 2.1 Objects and types 2.1.1 Sets and set types 2.1.2 Tuples and Cartesian product types 2.1.3 Bindings and schema types 2.1.4 Relations and functions 2.2 Properties and schemas 2.2.1 Combining properties 2.2.2 Decorations and renaming 2.2.3 Combining schemas 2.3 Variables and scope 2.3.1 Nested scopes 2.3.2 Schemas with global variables 2.4 Generic constructions 2.5 Partially-deﬁned expressions The Z Language 3.1 Syntactic conventions 3.1.1 Words, decorations and...

...HUMORESQUE
Music Score Analysis:
Humoresque is composed by Antonín Dvořák(September 8, 1941 - May 1, 1904, born in Bohemia), a czech composer of the romantic period. He was engaged in major music works comprising of chamber music, orchestral music, piano music, operas and songs(or vocal). A. Dvořák wrote a total of 8 Humoresque short classical pieces and this particular piece(Poco lento e grazioso) is the most popular one which has been produced for various musical arrangements.
This piece is split into 3 sections; Section 1(from bar 1 to 8), Section 2(from bar 9 to 16) and then we repeat section 1 before proceeding to Section 3(from bar 25 to 40). Section 1 and 2 are to be repeated from bar 41 until the end of the piece.
It is written in 2/4 time, started in the key of D. There is a change in key from D to F in section 3(bar 25 to 40) and then revert to D key from bar 41 until the end of piece. We need to present this piece gracefully and yet a little slowly.
For section 1, we expect to play the sets of semiquavers to sound like a ‘staccato’ effect in order to bring out the ‘humorous’ feel of the theme. It should not be played loud and some dynamism is expected in first bar 1, 4 and 5 and we need to repeat from the beginning once before proceeding to bar 9.
At section 2, there is a change in the mood setting and hence, we halt the staccato-like effect. It starts with a mf and crescendo effect to bring out the dramatic effect throughout this...

...(1/n)/ 1 = 0
n->∞ n->∞ n->∞
so f(n)grows at a slower rate than g(n).
Q2)
Show that log (n!) = Θ (nlog n);
Show that log (n!) = Θ (nlog n)
First
log (n!) = log 1+ log 2+...+log n log n+ log n+ …+log n
log (n!) n log n
log (n!) = O(n log n)
Then
log (n!) = log 1 +log 2 +... + log n log (n/2)+ log (n/2+1)+...+log (n)
log (n!) log (n/2) + log (n/2) +...+ log (n/2)
log (n!) (n/2) log (n/2) , n/2>0 for sufficiently large n
log (n!) = (n log n)
So
log (n!) = Θ (nlog n)
Q3)
Design an algorithm that uses comparisons to select the largest and the second largest of n elements. Find the time complexity of your algorithm (expressed using the big-O notation).
String MaxAndSecond(int a[],int n)
{
int max =0, second =0;
max = a[0];
for (i = 1; i < n; i++) {
if (a[i] >= max) {
second = max;
max = a[i];
} else if (a[i] > second) {
second = a[i];
}
}
}
T(n)=O(n)
Q4)
Given an a binary array or list of n elements, where each element is either a 0 or 1, we would like to arrange the elements so that all of those that are equal to 0's appear first followed by all the elements that are equal to 1's.
a) Write an algorithm or a function that uses comparisons to arrange the elements as given above. Do not use any extra arrays in your algorithm.
Use merge sorting...